From owner-svn-src-all@freebsd.org Sun Feb 5 00:32:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCAC8CBBB53; Sun, 5 Feb 2017 00:32:13 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4CA41D33; Sun, 5 Feb 2017 00:32:13 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150WCRk065037; Sun, 5 Feb 2017 00:32:12 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150WC0j065036; Sun, 5 Feb 2017 00:32:12 GMT (envelope-from br@FreeBSD.org) Message-Id: <201702050032.v150WC0j065036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 5 Feb 2017 00:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313254 - head/sys/riscv/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 00:32:14 -0000 Author: br Date: Sun Feb 5 00:32:12 2017 New Revision: 313254 URL: https://svnweb.freebsd.org/changeset/base/313254 Log: Implement atomic_fcmpset_*() for RISC-V. Requested by: mjg Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9447 Modified: head/sys/riscv/include/atomic.h Modified: head/sys/riscv/include/atomic.h ============================================================================== --- head/sys/riscv/include/atomic.h Sat Feb 4 20:57:09 2017 (r313253) +++ head/sys/riscv/include/atomic.h Sun Feb 5 00:32:12 2017 (r313254) @@ -120,6 +120,31 @@ atomic_cmpset_32(volatile uint32_t *p, u return (!res); } +static __inline int +atomic_fcmpset_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + uint32_t tmp; + int res; + + res = 0; + + __asm __volatile( + "0:" + "li %1, 1\n" /* Preset to fail */ + "lr.w %0, %2\n" /* Load old value */ + "bne %0, %z4, 1f\n" /* Compare */ + "sc.w %1, %z5, %2\n" /* Try to store new value */ + "j 2f\n" + "1:" + "sw %0, %3\n" /* Save old value */ + "2:" + : "=&r" (tmp), "=&r" (res), "+A" (*p), "+A" (*cmpval) + : "rJ" (*cmpval), "rJ" (newval) + : "memory"); + + return (!res); +} + static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) { @@ -152,6 +177,7 @@ atomic_readandclear_32(volatile uint32_t #define atomic_add_int atomic_add_32 #define atomic_clear_int atomic_clear_32 #define atomic_cmpset_int atomic_cmpset_32 +#define atomic_fcmpset_int atomic_fcmpset_32 #define atomic_fetchadd_int atomic_fetchadd_32 #define atomic_readandclear_int atomic_readandclear_32 #define atomic_set_int atomic_set_32 @@ -183,6 +209,27 @@ atomic_cmpset_rel_32(volatile uint32_t * return (atomic_cmpset_32(p, cmpval, newval)); } +static __inline int +atomic_fcmpset_acq_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + int res; + + res = atomic_fcmpset_32(p, cmpval, newval); + + fence(); + + return (res); +} + +static __inline int +atomic_fcmpset_rel_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + + fence(); + + return (atomic_fcmpset_32(p, cmpval, newval)); +} + static __inline uint32_t atomic_load_acq_32(volatile uint32_t *p) { @@ -207,6 +254,7 @@ atomic_store_rel_32(volatile uint32_t *p #define atomic_add_acq_int atomic_add_acq_32 #define atomic_clear_acq_int atomic_clear_acq_32 #define atomic_cmpset_acq_int atomic_cmpset_acq_32 +#define atomic_fcmpset_acq_int atomic_fcmpset_acq_32 #define atomic_load_acq_int atomic_load_acq_32 #define atomic_set_acq_int atomic_set_acq_32 #define atomic_subtract_acq_int atomic_subtract_acq_32 @@ -214,6 +262,7 @@ atomic_store_rel_32(volatile uint32_t *p #define atomic_add_rel_int atomic_add_rel_32 #define atomic_clear_rel_int atomic_add_rel_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 +#define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 #define atomic_set_rel_int atomic_set_rel_32 #define atomic_subtract_rel_int atomic_subtract_rel_32 #define atomic_store_rel_int atomic_store_rel_32 @@ -281,6 +330,31 @@ atomic_cmpset_64(volatile uint64_t *p, u return (!res); } +static __inline int +atomic_fcmpset_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + uint64_t tmp; + int res; + + res = 0; + + __asm __volatile( + "0:" + "li %1, 1\n" /* Preset to fail */ + "lr.d %0, %2\n" /* Load old value */ + "bne %0, %z4, 1f\n" /* Compare */ + "sc.d %1, %z5, %2\n" /* Try to store new value */ + "j 2f\n" + "1:" + "sd %0, %3\n" /* Save old value */ + "2:" + : "=&r" (tmp), "=&r" (res), "+A" (*p), "+A" (*cmpval) + : "rJ" (*cmpval), "rJ" (newval) + : "memory"); + + return (!res); +} + static __inline uint64_t atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) { @@ -339,6 +413,7 @@ atomic_swap_64(volatile uint64_t *p, uin #define atomic_add_long atomic_add_64 #define atomic_clear_long atomic_clear_64 #define atomic_cmpset_long atomic_cmpset_64 +#define atomic_fcmpset_long atomic_fcmpset_64 #define atomic_fetchadd_long atomic_fetchadd_64 #define atomic_readandclear_long atomic_readandclear_64 #define atomic_set_long atomic_set_64 @@ -347,6 +422,7 @@ atomic_swap_64(volatile uint64_t *p, uin #define atomic_add_ptr atomic_add_64 #define atomic_clear_ptr atomic_clear_64 #define atomic_cmpset_ptr atomic_cmpset_64 +#define atomic_fcmpset_ptr atomic_fcmpset_64 #define atomic_fetchadd_ptr atomic_fetchadd_64 #define atomic_readandclear_ptr atomic_readandclear_64 #define atomic_set_ptr atomic_set_64 @@ -378,6 +454,27 @@ atomic_cmpset_rel_64(volatile uint64_t * return (atomic_cmpset_64(p, cmpval, newval)); } +static __inline int +atomic_fcmpset_acq_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + int res; + + res = atomic_fcmpset_64(p, cmpval, newval); + + fence(); + + return (res); +} + +static __inline int +atomic_fcmpset_rel_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + + fence(); + + return (atomic_fcmpset_64(p, cmpval, newval)); +} + static __inline uint64_t atomic_load_acq_64(volatile uint64_t *p) { @@ -402,6 +499,7 @@ atomic_store_rel_64(volatile uint64_t *p #define atomic_add_acq_long atomic_add_acq_64 #define atomic_clear_acq_long atomic_add_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 +#define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 #define atomic_load_acq_long atomic_load_acq_64 #define atomic_set_acq_long atomic_set_acq_64 #define atomic_subtract_acq_long atomic_subtract_acq_64 @@ -409,6 +507,7 @@ atomic_store_rel_64(volatile uint64_t *p #define atomic_add_acq_ptr atomic_add_acq_64 #define atomic_clear_acq_ptr atomic_add_acq_64 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 +#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64 #define atomic_load_acq_ptr atomic_load_acq_64 #define atomic_set_acq_ptr atomic_set_acq_64 #define atomic_subtract_acq_ptr atomic_subtract_acq_64 @@ -447,6 +546,7 @@ atomic_thread_fence_seq_cst(void) #define atomic_add_rel_long atomic_add_rel_64 #define atomic_clear_rel_long atomic_clear_rel_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 +#define atomic_fcmpset_rel_long atomic_fcmpset_rel_64 #define atomic_set_rel_long atomic_set_rel_64 #define atomic_subtract_rel_long atomic_subtract_rel_64 #define atomic_store_rel_long atomic_store_rel_64 @@ -454,6 +554,7 @@ atomic_thread_fence_seq_cst(void) #define atomic_add_rel_ptr atomic_add_rel_64 #define atomic_clear_rel_ptr atomic_clear_rel_64 #define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_64 #define atomic_set_rel_ptr atomic_set_rel_64 #define atomic_subtract_rel_ptr atomic_subtract_rel_64 #define atomic_store_rel_ptr atomic_store_rel_64 From owner-svn-src-all@freebsd.org Sun Feb 5 00:39:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF970CBBC86; Sun, 5 Feb 2017 00:39:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF6E1F36; Sun, 5 Feb 2017 00:39:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150di0u066074; Sun, 5 Feb 2017 00:39:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150difE066072; Sun, 5 Feb 2017 00:39:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702050039.v150difE066072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Feb 2017 00:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313255 - in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 00:39:45 -0000 Author: kib Date: Sun Feb 5 00:39:44 2017 New Revision: 313255 URL: https://svnweb.freebsd.org/changeset/base/313255 Log: MFC r312954: Do not leave stale 4K TLB entries on pde (superpage) removal or protection change. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/i386/i386/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Sun Feb 5 00:32:12 2017 (r313254) +++ stable/11/sys/amd64/amd64/pmap.c Sun Feb 5 00:39:44 2017 (r313255) @@ -1041,7 +1041,12 @@ pmap_bootstrap(vm_paddr_t *firstaddr) virtual_avail = va; - /* Initialize the PAT MSR. */ + /* + * Initialize the PAT MSR. + * pmap_init_pat() clears and sets CR4_PGE, which, as a + * side-effect, invalidates stale PG_G TLB entries that might + * have been created in our pre-boot environment. + */ pmap_init_pat(); /* Initialize TLB Context Id. */ @@ -3441,6 +3446,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; + vm_offset_t sva; int PG_PTE_CACHE; PG_G = pmap_global_bit(pmap); @@ -3479,9 +3485,9 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e DMAP_MAX_ADDRESS ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); - pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free, - lockp); - pmap_invalidate_page(pmap, trunc_2mpage(va)); + sva = trunc_2mpage(va); + pmap_remove_pde(pmap, pde, sva, &free, lockp); + pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" " in pmap %p", va, pmap); @@ -3624,11 +3630,23 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; /* - * Machines that don't support invlpg, also don't support - * PG_G. - */ - if (oldpde & PG_G) - pmap_invalidate_page(kernel_pmap, sva); + * When workaround_erratum383 is false, a promotion to a 2M + * page mapping does not invalidate the 512 4K page mappings + * from the TLB. Consequently, at this point, the TLB may + * hold both 4K and 2M page mappings. Therefore, the entire + * range of addresses must be invalidated here. In contrast, + * when workaround_erratum383 is true, a promotion does + * invalidate the 512 4K page mappings, and so a single INVLPG + * suffices to invalidate the 2M page mapping. + */ + if ((oldpde & PG_G) != 0) { + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } + pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); @@ -4011,9 +4029,14 @@ retry: if (newpde != oldpde) { if (!atomic_cmpset_long(pde, oldpde, newpde)) goto retry; - if (oldpde & PG_G) - pmap_invalidate_page(pmap, sva); - else + if (oldpde & PG_G) { + /* See pmap_remove_pde() for explanation. */ + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } else anychanged = TRUE; } return (anychanged); Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Sun Feb 5 00:32:12 2017 (r313254) +++ stable/11/sys/i386/i386/pmap.c Sun Feb 5 00:39:44 2017 (r313255) @@ -508,7 +508,14 @@ pmap_bootstrap(vm_paddr_t firstaddr) for (i = 1; i < NKPT; i++) PTD[i] = 0; - /* Initialize the PAT MSR if present. */ + /* + * Initialize the PAT MSR if present. + * pmap_init_pat() clears and sets CR4_PGE, which, as a + * side-effect, invalidates stale PG_G TLB entries that might + * have been created in our pre-boot environment. We assume + * that PAT support implies PGE and in reverse, PGE presence + * comes with PAT. Both features were added for Pentium Pro. + */ pmap_init_pat(); /* Turn on PG_G on kernel page(s) */ @@ -565,7 +572,10 @@ pmap_init_pat(void) pat_table[PAT_WRITE_PROTECTED] = 3; pat_table[PAT_UNCACHED] = 3; - /* Bail if this CPU doesn't implement PAT. */ + /* + * Bail if this CPU doesn't implement PAT. + * We assume that PAT support implies PGE. + */ if ((cpu_feature & CPUID_PAT) == 0) { for (i = 0; i < PAT_INDEX_SIZE; i++) pat_index[i] = pat_table[i]; @@ -2633,6 +2643,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; + vm_offset_t sva; PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpde = *pde; @@ -2655,8 +2666,9 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t va >> PDRSHIFT, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); - pmap_remove_pde(pmap, pde, trunc_4mpage(va), &free); - pmap_invalidate_page(pmap, trunc_4mpage(va)); + sva = trunc_4mpage(va); + pmap_remove_pde(pmap, pde, sva, &free); + pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" " in pmap %p", va, pmap); @@ -2827,9 +2839,24 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t /* * Machines that don't support invlpg, also don't support * PG_G. - */ - if (oldpde & PG_G) - pmap_invalidate_page(kernel_pmap, sva); + * + * When workaround_erratum383 is false, a promotion to a 2M/4M + * page mapping does not invalidate the 512/1024 4K page mappings + * from the TLB. Consequently, at this point, the TLB may + * hold both 4K and 2M/4M page mappings. Therefore, the entire + * range of addresses must be invalidated here. In contrast, + * when workaround_erratum383 is true, a promotion does + * invalidate the 512/1024 4K page mappings, and so a single INVLPG + * suffices to invalidate the 2M/4M page mapping. + */ + if ((oldpde & PG_G) != 0) { + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } + pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; if (oldpde & PG_MANAGED) { pvh = pa_to_pvh(oldpde & PG_PS_FRAME); @@ -3139,9 +3166,14 @@ retry: if (newpde != oldpde) { if (!pde_cmpset(pde, oldpde, newpde)) goto retry; - if (oldpde & PG_G) - pmap_invalidate_page(pmap, sva); - else + if (oldpde & PG_G) { + /* See pmap_remove_pde() for explanation. */ + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } else anychanged = TRUE; } return (anychanged); From owner-svn-src-all@freebsd.org Sun Feb 5 00:42:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04A77CBBEE6; Sun, 5 Feb 2017 00:42:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D5F3E8; Sun, 5 Feb 2017 00:42:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150gFxw070009; Sun, 5 Feb 2017 00:42:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150gFjr070007; Sun, 5 Feb 2017 00:42:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702050042.v150gFjr070007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Feb 2017 00:42: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: r313256 - in stable/10/sys: amd64/amd64 i386/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 00:42:17 -0000 Author: kib Date: Sun Feb 5 00:42:15 2017 New Revision: 313256 URL: https://svnweb.freebsd.org/changeset/base/313256 Log: MFC r312954: Do not leave stale 4K TLB entries on pde (superpage) removal or protection change. Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/i386/i386/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Sun Feb 5 00:39:44 2017 (r313255) +++ stable/10/sys/amd64/amd64/pmap.c Sun Feb 5 00:42:15 2017 (r313256) @@ -912,7 +912,12 @@ pmap_bootstrap(vm_paddr_t *firstaddr) virtual_avail = va; - /* Initialize the PAT MSR. */ + /* + * Initialize the PAT MSR. + * pmap_init_pat() clears and sets CR4_PGE, which, as a + * side-effect, invalidates stale PG_G TLB entries that might + * have been created in our pre-boot environment. + */ pmap_init_pat(); /* Initialize TLB Context Id. */ @@ -3372,6 +3377,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; + vm_offset_t sva; int PG_PTE_CACHE; PG_G = pmap_global_bit(pmap); @@ -3410,9 +3416,9 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e DMAP_MAX_ADDRESS ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); - pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free, - lockp); - pmap_invalidate_page(pmap, trunc_2mpage(va)); + sva = trunc_2mpage(va); + pmap_remove_pde(pmap, pde, sva, &free, lockp); + pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" " in pmap %p", va, pmap); @@ -3555,11 +3561,23 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; /* - * Machines that don't support invlpg, also don't support - * PG_G. - */ - if (oldpde & PG_G) - pmap_invalidate_page(kernel_pmap, sva); + * When workaround_erratum383 is false, a promotion to a 2M + * page mapping does not invalidate the 512 4K page mappings + * from the TLB. Consequently, at this point, the TLB may + * hold both 4K and 2M page mappings. Therefore, the entire + * range of addresses must be invalidated here. In contrast, + * when workaround_erratum383 is true, a promotion does + * invalidate the 512 4K page mappings, and so a single INVLPG + * suffices to invalidate the 2M page mapping. + */ + if ((oldpde & PG_G) != 0) { + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } + pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); @@ -3914,9 +3932,14 @@ retry: if (newpde != oldpde) { if (!atomic_cmpset_long(pde, oldpde, newpde)) goto retry; - if (oldpde & PG_G) - pmap_invalidate_page(pmap, sva); - else + if (oldpde & PG_G) { + /* See pmap_remove_pde() for explanation. */ + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } else anychanged = TRUE; } return (anychanged); Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Sun Feb 5 00:39:44 2017 (r313255) +++ stable/10/sys/i386/i386/pmap.c Sun Feb 5 00:42:15 2017 (r313256) @@ -517,7 +517,14 @@ pmap_bootstrap(vm_paddr_t firstaddr) for (i = 1; i < NKPT; i++) PTD[i] = 0; - /* Initialize the PAT MSR if present. */ + /* + * Initialize the PAT MSR if present. + * pmap_init_pat() clears and sets CR4_PGE, which, as a + * side-effect, invalidates stale PG_G TLB entries that might + * have been created in our pre-boot environment. We assume + * that PAT support implies PGE and in reverse, PGE presence + * comes with PAT. Both features were added for Pentium Pro. + */ pmap_init_pat(); /* Turn on PG_G on kernel page(s) */ @@ -545,7 +552,10 @@ pmap_init_pat(void) pat_table[PAT_WRITE_PROTECTED] = 3; pat_table[PAT_UNCACHED] = 3; - /* Bail if this CPU doesn't implement PAT. */ + /* + * Bail if this CPU doesn't implement PAT. + * We assume that PAT support implies PGE. + */ if ((cpu_feature & CPUID_PAT) == 0) { for (i = 0; i < PAT_INDEX_SIZE; i++) pat_index[i] = pat_table[i]; @@ -2687,6 +2697,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; + vm_offset_t sva; PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpde = *pde; @@ -2709,8 +2720,9 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t va >> PDRSHIFT, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); - pmap_remove_pde(pmap, pde, trunc_4mpage(va), &free); - pmap_invalidate_page(pmap, trunc_4mpage(va)); + sva = trunc_4mpage(va); + pmap_remove_pde(pmap, pde, sva, &free); + pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" " in pmap %p", va, pmap); @@ -2881,9 +2893,24 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t /* * Machines that don't support invlpg, also don't support * PG_G. - */ - if (oldpde & PG_G) - pmap_invalidate_page(kernel_pmap, sva); + * + * When workaround_erratum383 is false, a promotion to a 2M/4M + * page mapping does not invalidate the 512/1024 4K page mappings + * from the TLB. Consequently, at this point, the TLB may + * hold both 4K and 2M/4M page mappings. Therefore, the entire + * range of addresses must be invalidated here. In contrast, + * when workaround_erratum383 is true, a promotion does + * invalidate the 512/1024 4K page mappings, and so a single INVLPG + * suffices to invalidate the 2M/4M page mapping. + */ + if ((oldpde & PG_G) != 0) { + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } + pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; if (oldpde & PG_MANAGED) { pvh = pa_to_pvh(oldpde & PG_PS_FRAME); @@ -3193,9 +3220,14 @@ retry: if (newpde != oldpde) { if (!pde_cmpset(pde, oldpde, newpde)) goto retry; - if (oldpde & PG_G) - pmap_invalidate_page(pmap, sva); - else + if (oldpde & PG_G) { + /* See pmap_remove_pde() for explanation. */ + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } else anychanged = TRUE; } return (anychanged); From owner-svn-src-all@freebsd.org Sun Feb 5 00:45:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9171CCBBFBA; Sun, 5 Feb 2017 00:45:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F2E7D3; Sun, 5 Feb 2017 00:45:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150j24T070172; Sun, 5 Feb 2017 00:45:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150j2j3070170; Sun, 5 Feb 2017 00:45:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702050045.v150j2j3070170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 5 Feb 2017 00:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313257 - head/sbin/nvmecontrol 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 00:45:03 -0000 Author: imp Date: Sun Feb 5 00:45:02 2017 New Revision: 313257 URL: https://svnweb.freebsd.org/changeset/base/313257 Log: Add some descriptions to the man page for the supported log pages as well as the new wdc commands. Make wdc be an alias for hgst when specifying the vendor to use to interpret the page. Modified: head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.8 Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:42:15 2017 (r313256) +++ head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:45:02 2017 (r313257) @@ -846,6 +846,8 @@ static struct logpage_function { sizeof(struct nvme_firmware_page)}, {HGST_INFO_LOG, "hgst", print_hgst_info_log, DEFAULT_SIZE}, + {HGST_INFO_LOG, "wdc", print_hgst_info_log, + DEFAULT_SIZE}, {INTEL_LOG_TEMP_STATS, "intel", print_intel_temp_stats, sizeof(struct intel_log_temp_stats)}, {INTEL_LOG_READ_LAT_LOG, "intel", print_intel_read_lat_log, Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:42:15 2017 (r313256) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:45:02 2017 (r313257) @@ -62,6 +62,7 @@ .Ic logpage .Aq Fl p Ar page_id .Op Fl x +.Op Fl v Ar vendor-string .Aq device id .Aq namespace id .Nm @@ -74,7 +75,7 @@ .Ic power .Op Fl l .Op Fl p power_state -.Op fl w workload_hint +.Op Fl w workload_hint .Nm .Ic wdc cap-diag .Op Fl o path_template @@ -96,6 +97,26 @@ .Sh DESCRIPTION NVM Express (NVMe) is a storage protocol standard, for SSDs and other high-speed storage devices over PCI Express. +.Pp +.Ss logpage +The logpage command knows how to print log pages of various types. +It also knows about vendor specific log pages from hgst/wdc and intel. +Page 0xc1 for hgst/wdc contains the advanced smart information about +the drive. +Page 0xc1 is read latency stats for intel. +Page 0xc2 is write latency stats for intel. +Page 0xc5 is temperature stats for intel. +Page 0xca is advanced smart information for intel. +.Ss wdc +The various wdc command retrieve log data from the wdc/hgst drives. +The +.Fl o +flag specifies a path template to use to output the files. +Each file takes the path template (which defaults to nothing), appends +the drive's serial number and the type of dump it is followed +by .bin. +These logs must be sent to the vendor for analysis. +This tool only provides a way to extract them. .Sh EXAMPLES .Dl nvmecontrol devlist .Pp From owner-svn-src-all@freebsd.org Sun Feb 5 00:55:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20EF0CC51FF; Sun, 5 Feb 2017 00:55:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAE81BD2; Sun, 5 Feb 2017 00:55:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v150t7dh074040; Sun, 5 Feb 2017 00:55:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v150t7v2074038; Sun, 5 Feb 2017 00:55:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702050055.v150t7v2074038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 5 Feb 2017 00:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313258 - head/sbin/nvmecontrol 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 00:55:09 -0000 Author: imp Date: Sun Feb 5 00:55:07 2017 New Revision: 313258 URL: https://svnweb.freebsd.org/changeset/base/313258 Log: Add the ability to dump log pages directly in binary to stdout. Update man page to include this flag, and an example of dumping a vendor-specific page while I'm here. Modified: head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.8 Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:45:02 2017 (r313257) +++ head/sbin/nvmecontrol/logpage.c Sun Feb 5 00:55:07 2017 (r313258) @@ -74,6 +74,12 @@ kv_lookup(const struct kv_name *kv, size return bad; } +static void +print_bin(void *data, uint32_t length) +{ + write(STDOUT_FILENO, data, length); +} + /* * 128-bit integer augments to standard values. On i386 this * doesn't exist, so we use 64-bit values. The 128-bit counters @@ -872,7 +878,7 @@ logpage(int argc, char *argv[]) { int fd, nsid; int log_page = 0, pageflag = false; - int hexflag = false, ns_specified; + int binflag = false, hexflag = false, ns_specified; char ch, *p; char cname[64]; uint32_t size; @@ -882,8 +888,11 @@ logpage(int argc, char *argv[]) struct nvme_controller_data cdata; print_fn_t print_fn; - while ((ch = getopt(argc, argv, "p:xv:")) != -1) { + while ((ch = getopt(argc, argv, "bp:xv:")) != -1) { switch (ch) { + case 'b': + binflag = true; + break; case 'p': /* TODO: Add human-readable ASCII page IDs */ log_page = strtol(optarg, &p, 0); @@ -942,7 +951,9 @@ logpage(int argc, char *argv[]) print_fn = print_hex; size = DEFAULT_SIZE; - if (!hexflag) { + if (binflag) + print_fn = print_bin; + if (!binflag && !hexflag) { /* * See if there is a pretty print function for the specified log * page. If one isn't found, we just revert to the default Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:45:02 2017 (r313257) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sun Feb 5 00:55:07 2017 (r313258) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2016 +.Dd February 4, 2017 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -63,6 +63,7 @@ .Aq Fl p Ar page_id .Op Fl x .Op Fl v Ar vendor-string +.Op Fl b .Aq device id .Aq namespace id .Nm @@ -147,10 +148,21 @@ Display a human-readable summary of the Log pages defined by the NVMe specification include Error Information Log (ID=1), SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3). .Pp +.Dl nvmecontrol logpage -p 0xc1 -v wdc nvme0 +.Pp +Display a human-readable summary of the nvme0's wdc-specific advanced +SMART data. +.Pp .Dl nvmecontrol logpage -p 1 -x nvme0 .Pp Display a hexadecimal dump of the nvme0 controller's Error Information Log. .Pp +.Dl nvmecontrol logpage -p 0xcb -b nvme0 > /tmp/page-cb.bin +.Pp +Print the contents of vendor specific page 0xcb as binary data on +standard out. +Redirect it to a temporary file. +.Pp .Dl nvmecontrol firmware -s 2 -f /tmp/nvme_firmware nvme0 .Pp Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the From owner-svn-src-all@freebsd.org Sun Feb 5 01:17:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B84D7CC5EE1; Sun, 5 Feb 2017 01:17:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 739B3192C; Sun, 5 Feb 2017 01:17:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id aBRncNba0cWiHaBRpcfhlP; Sat, 04 Feb 2017 18:16:58 -0700 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=kJ238s9Cgt9YSbS1S48A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B313DDDF; Sat, 4 Feb 2017 17:16:55 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v151Gtj1060849; Sat, 4 Feb 2017 17:16:55 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702050116.v151Gtj1060849@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol In-Reply-To: Message from Warner Losh of "Sat, 04 Feb 2017 05:53:01 +0000." <201702040553.v145r1wB002775@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 04 Feb 2017 17:16:55 -0800 X-CMAE-Envelope: MS4wfAw5oqgq6bLpMnCdPW81ajfGEKGn2PX0My8H7nMh0UjXj1xl2SoHd3yhTYwTK1cF1R5OcrgLJf0EDIWl9WKLgLXDPqrIVuUoFM1m8Q0SxmpBmCXid33q WdSZJew2PL9Bwi51UplBDBU6Vh0LM8y1xBpA5huXy/tl9K9KdhxezY2Gxpb7z6HbWvG8aCsrwm5UbBDjXjlmUJGgsUd5MdSJgIEiplRBGRRJoSvDqops6W6J 1c8vYMllVW+Ft9jwukNbcQJfKfu55alCbEii7cYDon7JgvznpYHJu4eVWUj8FxMP X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 01:17:06 -0000 In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh writes: > Author: imp > Date: Sat Feb 4 05:53:00 2017 > New Revision: 313191 > URL: https://svnweb.freebsd.org/changeset/base/313191 > > Log: > Implement 5 wdc-specific nvme control options for their HGST drives: > wdc cap-diag Capture diagnostic data from drive > wdc drive-log Capture drive history data from drive > wdc get-crash-dump Retrieve firmware crash dump from drive > > Added: > head/sbin/nvmecontrol/wdc.c (contents, props changed) > Modified: > head/sbin/nvmecontrol/Makefile > head/sbin/nvmecontrol/nvmecontrol.8 > head/sbin/nvmecontrol/nvmecontrol.c > head/sbin/nvmecontrol/nvmecontrol.h [...] > + while (len > 0) { > + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; > + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); > + if (write(fd2, buf, resid) != resid) Hi Warner, I'm seeing the following on i386. opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare] if (write(fd2, buf, resid) != resid) ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ 1 error generated. amd64 builds okay. > + err(1, "write"); > + offset += resid; > + len -= resid; > + } > + free(buf); > + close(fd2); [...] -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Feb 5 01:20:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9EA3CD008A; Sun, 5 Feb 2017 01:20:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B881B4A; Sun, 5 Feb 2017 01:20:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v151KdfK082266; Sun, 5 Feb 2017 01:20:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v151Kdsu082265; Sun, 5 Feb 2017 01:20:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702050120.v151Kdsu082265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 5 Feb 2017 01:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313259 - head/sbin/nvmecontrol 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 01:20:40 -0000 Author: imp Date: Sun Feb 5 01:20:39 2017 New Revision: 313259 URL: https://svnweb.freebsd.org/changeset/base/313259 Log: Use ssize_t instead of uint32_t to prevent warnings about a comparison with different signs. Due to the promotion rules, this would only happen on 32-bit platforms. Modified: head/sbin/nvmecontrol/wdc.c Modified: head/sbin/nvmecontrol/wdc.c ============================================================================== --- head/sbin/nvmecontrol/wdc.c Sun Feb 5 00:55:07 2017 (r313258) +++ head/sbin/nvmecontrol/wdc.c Sun Feb 5 01:20:39 2017 (r313259) @@ -127,7 +127,8 @@ wdc_do_dump(int fd, char *tmpl, const ch { int fd2; uint8_t *buf; - uint32_t len, resid, offset; + uint32_t len, offset; + ssize_t resid; wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix); From owner-svn-src-all@freebsd.org Sun Feb 5 01:21:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A650CD0247 for ; Sun, 5 Feb 2017 01:21:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 265321CF9 for ; Sun, 5 Feb 2017 01:21:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x241.google.com with SMTP id m98so5933806iod.2 for ; Sat, 04 Feb 2017 17:21:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=dHZFfgGmi7/Mein23dg3tC9cmBqROkHsvD68kswj900=; b=i/g98ht8vwvVpVeqae1wwNSYVdDxIxUBUDJKMIfEi0S8XKI6+J2HzGTtGF5M2C+O6E /628WOORBF0ciSSIgJMKwTTOqoVywiLAhLSpfvSilxTIsOJzdOr0V8iiE+xwG5wQpuZ6 4+c3Yp5xiV4m/YO7URrrKL8fQwPLrChTNpW2Un1wQ4uXoE6kjrHYEbxje1dO9OmeXALI n3qFrWVsn7Y9bhXFmKF0k5z3m5IBvxf8yWnVNMk2AvzXXHJzN2MCmYp+dawf3JoeO95v MYtnbg4IQ6ZXeQsK3KhRQ+V0yiX7OM6BdZUCfZ02IH120eePH6+5JsA+OO2zOaX/a5Tt gSbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=dHZFfgGmi7/Mein23dg3tC9cmBqROkHsvD68kswj900=; b=ll/HzqjiVqA8IEmjU50TiCsV/O3lnV3Cz4Mpv0ALUJabzR7XV2Lc9JC4KtLK33+6c4 ENPE2o55D+ewmXnDaumi8nHLL8svPWC//2A6WhBPitiZt83Ju6+55UGbbdSGHL/B/UbZ CtOKtKnyFxY8HPgIQtqo3OmWmlb+5OUNzoBuNCKFt/jHomoduuKLQS1Vi0sdbBUT8Y4l a6ylATgfIjdCDoHfD2DwLxVVKPuc9A/FzpbnrD+EQlea1RJjWOj5LoLhOa6/c0+aTIaG NiKJeTedHDT8FbyZZ0KfIBLRhlsrkpqqQB07FL5xKMFQxI3Zgr2MV2UjDGT8RO1GS5Np cemA== X-Gm-Message-State: AMke39lysID5/Ng8Xjea3rnHbkdl5UTphuz9H1cpKmPzNtvb3P3spB88k1rHl8N7SUJYrZNx1UVV73J5zpWEiw== X-Received: by 10.107.139.131 with SMTP id n125mr3014708iod.166.1486257664237; Sat, 04 Feb 2017 17:21:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Sat, 4 Feb 2017 17:21:02 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702050116.v151Gtj1060849@slippy.cwsent.com> References: <201702040553.v145r1wB002775@repo.freebsd.org> <201702050116.v151Gtj1060849@slippy.cwsent.com> From: Warner Losh Date: Sat, 4 Feb 2017 18:21:02 -0700 X-Google-Sender-Auth: aG4UViT5uFIHT9Icc8DAx5AtU4Q Message-ID: Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol To: Cy Schubert Cc: Warner Losh , src-committers , "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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 01:21:05 -0000 Thanks! Fixed in r313259. Warner On Sat, Feb 4, 2017 at 6:16 PM, Cy Schubert wrote: > In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh > writes: >> Author: imp >> Date: Sat Feb 4 05:53:00 2017 >> New Revision: 313191 >> URL: https://svnweb.freebsd.org/changeset/base/313191 >> >> Log: >> Implement 5 wdc-specific nvme control options for their HGST drives: >> wdc cap-diag Capture diagnostic data from drive >> wdc drive-log Capture drive history data from drive >> wdc get-crash-dump Retrieve firmware crash dump from drive >> >> Added: >> head/sbin/nvmecontrol/wdc.c (contents, props changed) >> Modified: >> head/sbin/nvmecontrol/Makefile >> head/sbin/nvmecontrol/nvmecontrol.8 >> head/sbin/nvmecontrol/nvmecontrol.c >> head/sbin/nvmecontrol/nvmecontrol.h > [...] >> + while (len > 0) { >> + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; >> + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); >> + if (write(fd2, buf, resid) != resid) > > Hi Warner, > > I'm seeing the following on i386. > > opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of > integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka > 'unsigned int') [-Werror,-Wsign-compare] > if (write(fd2, buf, resid) != resid) > ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ > 1 error generated. > > amd64 builds okay. > >> + err(1, "write"); >> + offset += resid; >> + len -= resid; >> + } >> + free(buf); >> + close(fd2); > [...] > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > From owner-svn-src-all@freebsd.org Sun Feb 5 01:26:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BB93CD03D9; Sun, 5 Feb 2017 01:26:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D41421CA; Sun, 5 Feb 2017 01:26:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id aBalcNdzIcWiHaBamcfiu4; Sat, 04 Feb 2017 18:26:12 -0700 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=pSDo845uDOqUOBJDyvoA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E5EDAE47; Sat, 4 Feb 2017 17:26:10 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v151QAfE005740; Sat, 4 Feb 2017 17:26:10 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702050126.v151QAfE005740@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol In-Reply-To: Message from Warner Losh of "Sat, 04 Feb 2017 18:21:02 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 04 Feb 2017 17:26:10 -0800 X-CMAE-Envelope: MS4wfCFKt1/Hb7D8lxi/MB2abphm3zNUPnmB2CuHquwSMdxDAo/41yQW6S9rFLZG9//8om+R3YDh3MklJYxD/9UKR7hKFYYQZNFJEDQE3pjswDP2Dj6SuKxr 1yjdUvaoCn02yb0dq9f4ngA39NpWf2FbvslbCjfWKCSoB1Xe6L+kf7LYWIoQCsxEv8kuGDwOZ7LAgM3U8uj/M3BI8mlvlFfL+Ne2rjfDiHzY9ZsKD03lQwg+ 40UgCZS3qBlw96DTEm5+ZSngNDODb63ka0QoSJP3hjDkWaC1x36qzwt3wrhBue/axgA8643J/MQuL0rIn93xmw== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 01:26:14 -0000 Thanks. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message , Warner Losh writes: > Thanks! Fixed in r313259. > > Warner > > On Sat, Feb 4, 2017 at 6:16 PM, Cy Schubert wrote: > > In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh > > writes: > >> Author: imp > >> Date: Sat Feb 4 05:53:00 2017 > >> New Revision: 313191 > >> URL: https://svnweb.freebsd.org/changeset/base/313191 > >> > >> Log: > >> Implement 5 wdc-specific nvme control options for their HGST drives: > >> wdc cap-diag Capture diagnostic data from drive > >> wdc drive-log Capture drive history data from drive > >> wdc get-crash-dump Retrieve firmware crash dump from drive > >> > >> Added: > >> head/sbin/nvmecontrol/wdc.c (contents, props changed) > >> Modified: > >> head/sbin/nvmecontrol/Makefile > >> head/sbin/nvmecontrol/nvmecontrol.8 > >> head/sbin/nvmecontrol/nvmecontrol.c > >> head/sbin/nvmecontrol/nvmecontrol.h > > [...] > >> + while (len > 0) { > >> + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; > >> + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); > >> + if (write(fd2, buf, resid) != resid) > > > > Hi Warner, > > > > I'm seeing the following on i386. > > > > opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of > > integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka > > 'unsigned int') [-Werror,-Wsign-compare] > > if (write(fd2, buf, resid) != resid) > > ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ > > 1 error generated. > > > > amd64 builds okay. > > > >> + err(1, "write"); > >> + offset += resid; > >> + len -= resid; > >> + } > >> + free(buf); > >> + close(fd2); > > [...] > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > > From owner-svn-src-all@freebsd.org Sun Feb 5 01:26:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E436ACD0468 for ; Sun, 5 Feb 2017 01:26:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC43834E for ; Sun, 5 Feb 2017 01:26:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id 203so5145367ith.2 for ; Sat, 04 Feb 2017 17:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=CMTG2H2XDvrdcdX9nl9tkvxLnJ+Qub0Rjq+NL8H9LXM=; b=H2MKMTvN1VVHwFG2IvZy3WtF6/ycODDptOUdcZwUkYDAKJ1IJx2NI9eqDvE5yvNiNB Mr4EP/oARitrhls/+8LaZq/GlbxquIiXJfvZM2xAwVV5K4toCbvGOTnxCVg4kDhaXb57 7OE3rwabJuxAYzpuU37OpNp28XmVinD9emnCwB4WNL5W73rHwUNAmAKkgbRozZXUXUvh Lh2gy6BeJb445GdhWV4Icllc8sB4PgX3ZD56Mw/6pb2hsLon0rUA9sPK4/Qk2fjRwImj ahB6i3J8IOYHE3nAjSIDVGpcaxz5dhX0bTkbE2AAXHEI1GjZfZwNz7nhJMpoTVq3w82M Kx3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=CMTG2H2XDvrdcdX9nl9tkvxLnJ+Qub0Rjq+NL8H9LXM=; b=aoEDZimYQPfyOJND7cThLTtGrq6WDMETYy8mBc3+yGaraIJKbSGGvEnydwCqpUhV2T 3DSwYs1sl8nIectXrRu1+qonzPfNtxP0a/cj4yXAuB7rCwddJQ0CExtDsybkFj1Skv1g 9V/kVrnrUd9dR8Kp4/6mKebPolMYjJF+tE+H2LPseVhHNlFNV+iTCk4ZVV24Ary/bmNH 4l3PZRp9EnTWm5BktSvac8DxVwnkVB35XnIgBMDqMQenudS5k8JsbwZFysj9/J7vERhO WOMOrrxuD2IV3HTeLsvuVt1ekYFqrFHAX79DGskyqekdI/mdv77LOjqa5nsYGL8zd4b4 Ja7A== X-Gm-Message-State: AIkVDXIS3kI0V+z1UzqwmoXNEUSOBKa+B2tUf/yWhHLQLFnOt7HYg6m3uZiLkamjx1e/HaN9ayF795fz5WMh4A== X-Received: by 10.36.178.21 with SMTP id u21mr2644967ite.103.1486258000029; Sat, 04 Feb 2017 17:26:40 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Sat, 4 Feb 2017 17:26:39 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702050126.v151QAfE005740@slippy.cwsent.com> References: <201702050126.v151QAfE005740@slippy.cwsent.com> From: Warner Losh Date: Sat, 4 Feb 2017 18:26:39 -0700 X-Google-Sender-Auth: 8Mg701qH0gjPyhZ4SP6Vn1wmpKI Message-ID: Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol To: Cy Schubert Cc: Warner Losh , src-committers , "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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 01:26:41 -0000 Sorry it took so long. Warner On Sat, Feb 4, 2017 at 6:26 PM, Cy Schubert wrote: > Thanks. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > In message om> > , Warner Losh writes: >> Thanks! Fixed in r313259. >> >> Warner >> >> On Sat, Feb 4, 2017 at 6:16 PM, Cy Schubert wrote: >> > In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh >> > writes: >> >> Author: imp >> >> Date: Sat Feb 4 05:53:00 2017 >> >> New Revision: 313191 >> >> URL: https://svnweb.freebsd.org/changeset/base/313191 >> >> >> >> Log: >> >> Implement 5 wdc-specific nvme control options for their HGST drives: >> >> wdc cap-diag Capture diagnostic data from drive >> >> wdc drive-log Capture drive history data from drive >> >> wdc get-crash-dump Retrieve firmware crash dump from drive >> >> >> >> Added: >> >> head/sbin/nvmecontrol/wdc.c (contents, props changed) >> >> Modified: >> >> head/sbin/nvmecontrol/Makefile >> >> head/sbin/nvmecontrol/nvmecontrol.8 >> >> head/sbin/nvmecontrol/nvmecontrol.c >> >> head/sbin/nvmecontrol/nvmecontrol.h >> > [...] >> >> + while (len > 0) { >> >> + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; >> >> + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); >> >> + if (write(fd2, buf, resid) != resid) >> > >> > Hi Warner, >> > >> > I'm seeing the following on i386. >> > >> > opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of >> > integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka >> > 'unsigned int') [-Werror,-Wsign-compare] >> > if (write(fd2, buf, resid) != resid) >> > ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ >> > 1 error generated. >> > >> > amd64 builds okay. >> > >> >> + err(1, "write"); >> >> + offset += resid; >> >> + len -= resid; >> >> + } >> >> + free(buf); >> >> + close(fd2); >> > [...] >> > >> > >> > -- >> > Cheers, >> > Cy Schubert >> > FreeBSD UNIX: Web: http://www.FreeBSD.org >> > >> > The need of the many outweighs the greed of the few. >> > >> > >> >> > > From owner-svn-src-all@freebsd.org Sun Feb 5 01:40:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD541CD0831; Sun, 5 Feb 2017 01:40:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA8B8B3A; Sun, 5 Feb 2017 01:40:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v151eRkZ090327; Sun, 5 Feb 2017 01:40:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v151eRXX090326; Sun, 5 Feb 2017 01:40:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050140.v151eRXX090326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 01:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313260 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 01:40:29 -0000 Author: mjg Date: Sun Feb 5 01:40:27 2017 New Revision: 313260 URL: https://svnweb.freebsd.org/changeset/base/313260 Log: fd: switch fget_unlocked to atomic_fcmpset Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Feb 5 01:20:39 2017 (r313259) +++ head/sys/kern/kern_descrip.c Sun Feb 5 01:40:27 2017 (r313260) @@ -2569,8 +2569,8 @@ fget_unlocked(struct filedesc *fdp, int if (error != 0) return (error); #endif - retry: count = fp->f_count; + retry: if (count == 0) { /* * Force a reload. Other thread could reallocate the @@ -2584,7 +2584,7 @@ fget_unlocked(struct filedesc *fdp, int * Use an acquire barrier to force re-reading of fdt so it is * refreshed for verification. */ - if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) + if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) goto retry; fdt = fdp->fd_files; #ifdef CAPABILITIES From owner-svn-src-all@freebsd.org Sun Feb 5 02:16:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8777DCD0FCB for ; Sun, 5 Feb 2017 02:16:14 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F32E1AEC for ; Sun, 5 Feb 2017 02:16:14 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x229.google.com with SMTP id r141so78951475wmg.1 for ; Sat, 04 Feb 2017 18:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=MSo5tbz1h+ykk1j1jOVNSQ9DPwphzTOrlroxw+e6RGY=; b=RZdR4TrL8qFQWdQnFAAnwh8jFcueSxsZn46ryM7kBprWMlpts0xafbr7AvOG3c1At0 Le6u6xr7VtS4+UJ8hK8EQFvWLWdMZZH4iS1+/+1Ao/ovF70EISfoqMyaywqMlOBNeeVZ InRxMQ3XqAsu0gi7I7KkVnur+2M8VFhbAAg8xGKsqIZcHFSv+Ehoa+OefhNvjapoeSYP urE2ETrnumxQ+ourHCF3/JoGpKxrnOniuMMdE4I5TAgpWOAC4s4RS29XBxa38Y8mrEkK dgBb3WI8EArU7uHWR0E+NTJ0rPNsl6i3IWctvuDRetCpJfCNbnLaaidtcI6jv0T/+Gry MU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=MSo5tbz1h+ykk1j1jOVNSQ9DPwphzTOrlroxw+e6RGY=; b=jYmHis2FfG1c0oPAMXkrhFy6gMSSEz/fQ+8QGi/5wbnx1Ke8CW/PBlsXnlkd+DTYBY MNPij1AkN+lCLm6sumgBGOmdT064pGXBemOMwJxKC62Q4pqNydW+itAP2uzW609CeIlG K+TmPbzyi3PjH2SgaXZnqwTkKquL0CvToNEvfA/E4di/G4LK738UgMuAVmljDRDLo11U n6hVH0IVf1qdNYDHIuouS8+IPLGmKuj8qYml1H91boxLoQJQu9qzcg4WpE4j/cHYvvaP gqKEznBGYPUGKVyBU6hOlYj2Z9KwRU+CfnqKed2ZVYTq5wY/1eVjXgyhvXnmH2vj18N6 Oauw== X-Gm-Message-State: AMke39nkLMOYz5duw1KyzCDBHeMOvHmBL5N0oz9ZbW2YQBgkAxYtGQ5vmQi/CeiNV/Qiy0j/ X-Received: by 10.28.127.13 with SMTP id a13mr3239591wmd.96.1486260972606; Sat, 04 Feb 2017 18:16:12 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id 198sm5253474wmn.11.2017.02.04.18.16.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Feb 2017 18:16:11 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702050140.v151eRXX090326@repo.freebsd.org> From: Steven Hartland Message-ID: <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> Date: Sun, 5 Feb 2017 02:16:12 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702050140.v151eRXX090326@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:16:14 -0000 Hi Mateusz could you improve on the commit message as it currently describes what is changed, which can be obtained from the diff, but not why? I hope on one feels like I'm trying to teach them to suck eggs, as I know everyone here has a wealth of experience, but I strongly believe commit messages are a very important way of improving the overall quality of the code base by sharing with others the reason for changes, which they can then learn from. I know I for one love picking up new nuggets of knowledge from others in this way. Also I believe this is area the project as a whole can improve on, so I don't mean to single out anyone here. Anyway I hope people find this useful: When I write a commit message I try to stick to the following rules which I believe helps to bring clarity for others about my actions. 1. First line is a brief summary of the out come of the change e.g. Fixed compiler warnings in nvmecontrol on 32bit platforms 2. Follow up paragraphs expand on #1 if needed including details about not just what but why the change was made e.g. Use ssize_t instead of uint32_t to prevent warnings about a comparison with different signs. Due to the promotion rules, this would only happen on 32-bit platforms. 3. When writing #2 include details that would not be obvious to non-experts in the particular area. #2 and #3 are really important to sharing knowledge that others may not know, its quite relevant to this commit msg, as while it may be obvious to you and others familiar with the atomic ops, to the rest of us we're just wondering why make this change? N.B. The example is based on Warner's recent commit purely as an example, which had a good why, just missing the brief summary. While on this subject are there any official guidelines to writing commit messages, if no should we create some? On 05/02/2017 01:40, Mateusz Guzik wrote: > Author: mjg > Date: Sun Feb 5 01:40:27 2017 > New Revision: 313260 > URL: https://svnweb.freebsd.org/changeset/base/313260 > > Log: > fd: switch fget_unlocked to atomic_fcmpset > > Modified: > head/sys/kern/kern_descrip.c > > Modified: head/sys/kern/kern_descrip.c > ============================================================================== > --- head/sys/kern/kern_descrip.c Sun Feb 5 01:20:39 2017 (r313259) > +++ head/sys/kern/kern_descrip.c Sun Feb 5 01:40:27 2017 (r313260) > @@ -2569,8 +2569,8 @@ fget_unlocked(struct filedesc *fdp, int > if (error != 0) > return (error); > #endif > - retry: > count = fp->f_count; > + retry: > if (count == 0) { > /* > * Force a reload. Other thread could reallocate the > @@ -2584,7 +2584,7 @@ fget_unlocked(struct filedesc *fdp, int > * Use an acquire barrier to force re-reading of fdt so it is > * refreshed for verification. > */ > - if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) > + if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) > goto retry; > fdt = fdp->fd_files; > #ifdef CAPABILITIES > From owner-svn-src-all@freebsd.org Sun Feb 5 02:27:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9915CD141B; Sun, 5 Feb 2017 02:27:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8F6318F; Sun, 5 Feb 2017 02:27:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152R4lm010438; Sun, 5 Feb 2017 02:27:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152R4Ev010437; Sun, 5 Feb 2017 02:27:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050227.v152R4Ev010437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313261 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:27:06 -0000 Author: markj Date: Sun Feb 5 02:27:04 2017 New Revision: 313261 URL: https://svnweb.freebsd.org/changeset/base/313261 Log: Make witness_warn() always print to the console. witness_warn() either breaks into the debugger or panics the system, so its output should go to the console regardless of the witness(4) output channel configuration. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sun Feb 5 01:40:27 2017 (r313260) +++ head/sys/kern/subr_witness.c Sun Feb 5 02:27:04 2017 (r313261) @@ -1732,15 +1732,14 @@ witness_warn(int flags, struct lock_obje continue; if (n == 0) { va_start(ap, fmt); - witness_voutput(fmt, ap); + vprintf(fmt, ap); va_end(ap); - witness_output( - " with the following %slocks held:\n", + printf(" with the following %slocks held:\n", (flags & WARN_SLEEPOK) != 0 ? "non-sleepable " : ""); } n++; - witness_list_lock(lock1, witness_output); + witness_list_lock(lock1, printf); } /* @@ -1765,11 +1764,11 @@ witness_warn(int flags, struct lock_obje return (0); va_start(ap, fmt); - witness_voutput(fmt, ap); + vprintf(fmt, ap); va_end(ap); - witness_output(" with the following %slocks held:\n", + printf(" with the following %slocks held:\n", (flags & WARN_SLEEPOK) != 0 ? "non-sleepable " : ""); - n += witness_list_locks(&lock_list, witness_output); + n += witness_list_locks(&lock_list, printf); } else sched_unpin(); if (flags & WARN_PANIC && n) From owner-svn-src-all@freebsd.org Sun Feb 5 02:39:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E913ECD16B4; Sun, 5 Feb 2017 02:39:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3D419BC; Sun, 5 Feb 2017 02:39:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152dCG8014512; Sun, 5 Feb 2017 02:39:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152dCQk014506; Sun, 5 Feb 2017 02:39:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050239.v152dCQk014506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313262 - in head: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys sys/cddl/dev/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:39:14 -0000 Author: markj Date: Sun Feb 5 02:39:12 2017 New Revision: 313262 URL: https://svnweb.freebsd.org/changeset/base/313262 Log: Use PC-relative relocations for USDT probe sites on i386 and amd64. When recording probe site addresses in the output DOF file, dtrace -G needs to emit relocations for the .SUNW_dof section in order to obtain the addresses of functions containing probe sites. DTrace expects the addresses to be relative to the base address of the final ELF file, and the amd64 USDT implementation was relying on some unspecified and incorrect behaviour in the base system GNU ld to achieve this. This change reimplements the probe site relocation handling to allow USDT to be used with lld and newer GNU binutils. Specifically, it makes use of R_X86_64_PC64/R_386_PC32 relocations to obtain the probe site address relative to the DOF file address, and adds and uses a new DOF relocation type which computes the final probe site address using these relative offsets. Reported by and discussed with: Rafael Espíndola MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9374 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/dev/dtrace/dtrace_ioctl.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sun Feb 5 02:39:12 2017 (r313262) @@ -462,18 +462,8 @@ dof_add_probe(dt_idhash_t *dhp, dt_ident dt_buf_write(dtp, &ddo->ddo_enoffs, pip->pi_enoffs, pip->pi_nenoffs * sizeof (uint32_t), sizeof (uint32_t)); - /* - * If pi_rname isn't set, the relocation will be against the - * function name. If it is, the relocation will be against - * pi_rname. This will be used if the function is scoped - * locally so an alternate symbol is added for the purpose - * of this relocation. - */ - if (pip->pi_rname == NULL) - dofr.dofr_name = dofpr.dofpr_func; - else - dofr.dofr_name = dof_add_string(ddo, pip->pi_rname); - dofr.dofr_type = DOF_RELO_SETX; + dofr.dofr_name = dof_add_string(ddo, pip->pi_rname); + dofr.dofr_type = DOF_RELO_DOFREL; dofr.dofr_offset = dt_buf_len(&ddo->ddo_probes); dofr.dofr_data = 0; Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:39:12 2017 (r313262) @@ -237,7 +237,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; rel->r_info = ELF32_R_INFO(count + dep->de_global, - R_386_32); + R_386_PC32); #elif defined(__mips__) /* XXX */ printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); @@ -253,15 +253,6 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ #elif defined(__riscv__) /* XXX */ printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#elif defined(__sparc) - /* - * Add 4 bytes to hit the low half of this 64-bit - * big-endian address. - */ - rel->r_offset = s->dofs_offset + - dofr[j].dofr_offset + 4; - rel->r_info = ELF32_R_INFO(count + dep->de_global, - R_SPARC_32); #else #error unknown ISA #endif @@ -270,7 +261,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -287,11 +278,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ sym->st_value = 0; sym->st_size = dof->dofh_filesz; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_OBJECT); -#ifdef illumos - sym->st_other = 0; -#else sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); -#endif sym->st_shndx = ESHDR_DOF; sym++; @@ -448,18 +435,8 @@ prepare_elf64(dtrace_hdl_t *dtp, const d #elif defined(__i386) || defined(__amd64) rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; -#ifdef illumos rel->r_info = ELF64_R_INFO(count + dep->de_global, - R_AMD64_64); -#else - rel->r_info = ELF64_R_INFO(count + dep->de_global, - R_X86_64_RELATIVE); -#endif -#elif defined(__sparc) - rel->r_offset = s->dofs_offset + - dofr[j].dofr_offset; - rel->r_info = ELF64_R_INFO(count + dep->de_global, - R_SPARC_64); + R_X86_64_PC64); #else #error unknown ISA #endif @@ -468,7 +445,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const d sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -485,11 +462,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const d sym->st_value = 0; sym->st_size = dof->dofh_filesz; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_OBJECT); -#ifdef illumos - sym->st_other = 0; -#else sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); -#endif sym->st_shndx = ESHDR_DOF; sym++; @@ -797,16 +770,15 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_ } static int -dt_symtab_lookup(Elf_Data *data_sym, int nsym, uintptr_t addr, uint_t shn, - GElf_Sym *sym, int uses_funcdesc, Elf *elf) +dt_symtab_lookup(Elf_Data *data_sym, int start, int end, uintptr_t addr, + uint_t shn, GElf_Sym *sym, int uses_funcdesc, Elf *elf) { - int i, ret = -1; Elf64_Addr symval; Elf_Scn *opd_scn; Elf_Data *opd_desc; - GElf_Sym s; + int i; - for (i = 0; i < nsym && gelf_getsym(data_sym, i, sym) != NULL; i++) { + for (i = start; i < end && gelf_getsym(data_sym, i, sym) != NULL; i++) { if (GELF_ST_TYPE(sym->st_info) == STT_FUNC) { symval = sym->st_value; if (uses_funcdesc) { @@ -816,20 +788,12 @@ dt_symtab_lookup(Elf_Data *data_sym, int *(uint64_t*)((char *)opd_desc->d_buf + symval); } if ((uses_funcdesc || shn == sym->st_shndx) && - symval <= addr && - addr < symval + sym->st_size) { - if (GELF_ST_BIND(sym->st_info) == STB_GLOBAL) - return (0); - - ret = 0; - s = *sym; - } + symval <= addr && addr < symval + sym->st_size) + return (0); } } - if (ret == 0) - *sym = s; - return (ret); + return (-1); } #if defined(__aarch64__) @@ -1237,7 +1201,7 @@ process_obj(dtrace_hdl_t *dtp, const cha dt_provider_t *pvp; dt_probe_t *prp; uint32_t off, eclass, emachine1, emachine2; - size_t symsize, nsym, isym, istr, len; + size_t symsize, osym, nsym, isym, istr, len; key_t objkey; dt_link_pair_t *pair, *bufs = NULL; dt_strtab_t *strtab; @@ -1374,12 +1338,13 @@ process_obj(dtrace_hdl_t *dtp, const cha * target (text) section to replace the call instruction with * one or more nops. * - * If the function containing the probe is locally scoped - * (static), we create an alias used by the relocation in the - * generated object. The alias, a new symbol, will be global - * (so that the relocation from the generated object can be - * resolved), and hidden (so that it is converted to a local - * symbol at link time). Such aliases have this form: + * To avoid runtime overhead, the relocations added to the + * generated object should be resolved at static link time. We + * therefore create aliases for the functions that contain + * probes. An alias is global (so that the relocation from the + * generated object can be resolved), and hidden (so that its + * address is known at static link time). Such aliases have this + * form: * * $dtrace. * @@ -1417,16 +1382,13 @@ process_obj(dtrace_hdl_t *dtp, const cha if (strncmp(s, dt_prefix, sizeof (dt_prefix) - 1) != 0) continue; - if (dt_symtab_lookup(data_sym, isym, rela.r_offset, - shdr_rel.sh_info, &fsym, - (emachine1 == EM_PPC64), elf) != 0) { + if (dt_symtab_lookup(data_sym, 0, isym, rela.r_offset, + shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64), + elf) != 0) { dt_strtab_destroy(strtab); goto err; } - if (GELF_ST_BIND(fsym.st_info) != STB_LOCAL) - continue; - if (fsym.st_name > data_str->d_size) { dt_strtab_destroy(strtab); goto err; @@ -1462,12 +1424,12 @@ process_obj(dtrace_hdl_t *dtp, const cha } /* - * If needed, allocate the additional space for the symbol - * table and string table copying the old data into the new - * buffers, and marking the buffers as dirty. We inject those - * newly allocated buffers into the libelf data structures, but - * are still responsible for freeing them once we're done with - * the elf handle. + * If any probes were found, allocate the additional space for + * the symbol table and string table, copying the old data into + * the new buffers, and marking the buffers as dirty. We inject + * those newly allocated buffers into the libelf data + * structures, but are still responsible for freeing them once + * we're done with the elf handle. */ if (nsym > 0) { /* @@ -1516,9 +1478,11 @@ process_obj(dtrace_hdl_t *dtp, const cha shdr_sym.sh_size += nsym * symsize; (void) gelf_update_shdr(scn_sym, &shdr_sym); + osym = isym; nsym += isym; } else { dt_strtab_destroy(strtab); + continue; } /* @@ -1577,8 +1541,11 @@ process_obj(dtrace_hdl_t *dtp, const cha bcopy(s, pname, p - s); pname[p - s] = '\0'; - if (dt_symtab_lookup(data_sym, isym, rela.r_offset, - shdr_rel.sh_info, &fsym, + if (dt_symtab_lookup(data_sym, osym, isym, + rela.r_offset, shdr_rel.sh_info, &fsym, + (emachine1 == EM_PPC64), elf) != 0 && + dt_symtab_lookup(data_sym, 0, osym, + rela.r_offset, shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64), elf) != 0) goto err; @@ -1588,37 +1555,30 @@ process_obj(dtrace_hdl_t *dtp, const cha assert(GELF_ST_TYPE(fsym.st_info) == STT_FUNC); /* - * If a NULL relocation name is passed to - * dt_probe_define(), the function name is used for the - * relocation. The relocation needs to use a mangled - * name if the symbol is locally scoped; the function - * name may need to change if we've found the global - * alias for the locally scoped symbol (we prefer - * global symbols to locals in dt_symtab_lookup()). + * If this is our first time encountering this symbol, + * emit an alias. */ s = (char *)data_str->d_buf + fsym.st_name; - r = NULL; - if (GELF_ST_BIND(fsym.st_info) == STB_LOCAL) { + if (strncmp(s, dt_symprefix, + sizeof (dt_symprefix) - 1) != 0) { + u_int bind = GELF_ST_BIND(fsym.st_info); + dsym = fsym; dsym.st_name = istr; - dsym.st_info = GELF_ST_INFO(STB_GLOBAL, - STT_FUNC); - dsym.st_other = - ELF64_ST_VISIBILITY(STV_ELIMINATE); + dsym.st_info = GELF_ST_INFO(bind == STB_LOCAL ? + STB_GLOBAL : bind, STT_FUNC); + dsym.st_other = GELF_ST_VISIBILITY(STV_HIDDEN); (void) gelf_update_sym(data_sym, isym, &dsym); - - r = (char *)data_str->d_buf + istr; - istr += 1 + sprintf(r, dt_symfmt, - dt_symprefix, objkey, s); + r = (char *) data_str->d_buf + istr; + istr += 1 + sprintf(r, dt_symfmt, dt_symprefix, objkey, + s); isym++; assert(isym <= nsym); - - } else if (strncmp(s, dt_symprefix, - strlen(dt_symprefix)) == 0) { + } else { r = s; - if ((s = strchr(s, '.')) == NULL) - goto err; + s = strchr(s, '.'); + assert(s != NULL); s++; } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c Sun Feb 5 02:39:12 2017 (r313262) @@ -545,9 +545,7 @@ dt_probe_define(dt_provider_t *pvp, dt_p for (pip = prp->pr_inst; pip != NULL; pip = pip->pi_next) { if (strcmp(pip->pi_fname, fname) == 0 && - ((rname == NULL && pip->pi_rname == NULL) || - (rname != NULL && pip->pi_rname != NULL && - strcmp(pip->pi_rname, rname) == 0))) + strcmp(pip->pi_rname, rname) == 0) break; } @@ -565,7 +563,7 @@ dt_probe_define(dt_provider_t *pvp, dt_p if ((pip->pi_fname = strdup(fname)) == NULL) goto nomem; - if (rname != NULL && (pip->pi_rname = strdup(rname)) == NULL) + if ((pip->pi_rname = strdup(rname)) == NULL) goto nomem; pip->pi_noffs = 0; @@ -605,7 +603,7 @@ dt_probe_define(dt_provider_t *pvp, dt_p dt_dprintf("defined probe %s %s:%s %s() +0x%x (%s)\n", isenabled ? "(is-enabled)" : "", pvp->pv_desc.dtvd_name, prp->pr_ident->di_name, fname, offset, - rname != NULL ? rname : fname); + rname); assert(*noffs < *maxoffs); (*offs)[(*noffs)++] = offset; Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:39:12 2017 (r313262) @@ -13917,12 +13917,13 @@ err: /* * Apply the relocations from the specified 'sec' (a DOF_SECT_URELHDR) to the - * specified DOF. At present, this amounts to simply adding 'ubase' to the - * site of any user SETX relocations to account for load object base address. - * In the future, if we need other relocations, this function can be extended. + * specified DOF. SETX relocations are computed using 'ubase', the base load + * address of the object containing the DOF, and DOFREL relocations are relative + * to the relocation offset within the DOF. */ static int -dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, uint64_t ubase) +dtrace_dof_relocate(dof_hdr_t *dof, dof_sec_t *sec, uint64_t ubase, + uint64_t udaddr) { uintptr_t daddr = (uintptr_t)dof; dof_relohdr_t *dofr = @@ -13960,6 +13961,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_ case DOF_RELO_NONE: break; case DOF_RELO_SETX: + case DOF_RELO_DOFREL: if (r->dofr_offset >= ts->dofs_size || r->dofr_offset + sizeof (uint64_t) > ts->dofs_size) { dtrace_dof_error(dof, "bad relocation offset"); @@ -13971,7 +13973,11 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_ return (-1); } - *(uint64_t *)taddr += ubase; + if (r->dofr_type == DOF_RELO_SETX) + *(uint64_t *)taddr += ubase; + else + *(uint64_t *)taddr += + udaddr + ts->dofs_offset + r->dofr_offset; break; default: dtrace_dof_error(dof, "invalid relocation type"); @@ -13992,7 +13998,7 @@ dtrace_dof_relocate(dof_hdr_t *dof, dof_ */ static int dtrace_dof_slurp(dof_hdr_t *dof, dtrace_vstate_t *vstate, cred_t *cr, - dtrace_enabling_t **enabp, uint64_t ubase, int noprobes) + dtrace_enabling_t **enabp, uint64_t ubase, uint64_t udaddr, int noprobes) { uint64_t len = dof->dofh_loadsz, seclen; uintptr_t daddr = (uintptr_t)dof; @@ -14154,7 +14160,7 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_ switch (sec->dofs_type) { case DOF_SECT_URELHDR: - if (dtrace_dof_relocate(dof, sec, ubase) != 0) + if (dtrace_dof_relocate(dof, sec, ubase, udaddr) != 0) return (-1); break; } @@ -15519,7 +15525,7 @@ dtrace_anon_property(void) } rv = dtrace_dof_slurp(dof, &state->dts_vstate, CRED(), - &dtrace_anon.dta_enabling, 0, B_TRUE); + &dtrace_anon.dta_enabling, 0, 0, B_TRUE); if (rv == 0) rv = dtrace_dof_options(dof, state); @@ -16290,7 +16296,7 @@ dtrace_helper_slurp(dof_hdr_t *dof, dof_ vstate = &help->dthps_vstate; if ((rv = dtrace_dof_slurp(dof, vstate, NULL, &enab, dhp->dofhp_addr, - B_FALSE)) != 0) { + dhp->dofhp_dof, B_FALSE)) != 0) { dtrace_dof_destroy(dof); return (rv); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Feb 5 02:27:04 2017 (r313261) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Feb 5 02:39:12 2017 (r313262) @@ -784,6 +784,7 @@ typedef struct dof_relodesc { #define DOF_RELO_NONE 0 /* empty relocation entry */ #define DOF_RELO_SETX 1 /* relocate setx value */ +#define DOF_RELO_DOFREL 2 /* relocate DOF-relative value */ typedef struct dof_optdesc { uint32_t dofo_option; /* option identifier */ Modified: head/sys/cddl/dev/dtrace/dtrace_ioctl.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_ioctl.c Sun Feb 5 02:27:04 2017 (r313261) +++ head/sys/cddl/dev/dtrace/dtrace_ioctl.c Sun Feb 5 02:39:12 2017 (r313262) @@ -429,7 +429,8 @@ dtrace_ioctl(struct cdev *dev, u_long cm return (EBUSY); } - if (dtrace_dof_slurp(dof, vstate, td->td_ucred, &enab, 0, B_TRUE) != 0) { + if (dtrace_dof_slurp(dof, vstate, td->td_ucred, &enab, 0, 0, + B_TRUE) != 0) { mutex_exit(&dtrace_lock); mutex_exit(&cpu_lock); dtrace_dof_destroy(dof); From owner-svn-src-all@freebsd.org Sun Feb 5 02:44:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF8F0CD1884; Sun, 5 Feb 2017 02:44:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81F44E3A; Sun, 5 Feb 2017 02:44:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152i8L9018235; Sun, 5 Feb 2017 02:44:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152i8QW018234; Sun, 5 Feb 2017 02:44:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050244.v152i8QW018234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313263 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:44:09 -0000 Author: markj Date: Sun Feb 5 02:44:08 2017 New Revision: 313263 URL: https://svnweb.freebsd.org/changeset/base/313263 Log: Fix a double free of libelf data buffers in the USDT link code. libdtrace needs to append to the input object files' string and symbol tables. Currently it does so by allocating a larger buffer, copying the existing sections into them, and swapping pointers in the libelf data descriptors. However, it also frees those buffers when its processing is complete, which leads to a double free since the elftoolchain libelf owns them and also frees them in elf_end(3). Instead, free the buffers originally allocated by libelf. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:39:12 2017 (r313262) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Feb 5 02:44:08 2017 (r313263) @@ -1205,6 +1205,7 @@ process_obj(dtrace_hdl_t *dtp, const cha key_t objkey; dt_link_pair_t *pair, *bufs = NULL; dt_strtab_t *strtab; + void *tmp; if ((fd = open64(obj, O_RDWR)) == -1) { return (dt_link_error(dtp, elf, fd, bufs, @@ -1463,7 +1464,9 @@ process_obj(dtrace_hdl_t *dtp, const cha bufs = pair; bcopy(data_str->d_buf, pair->dlp_str, data_str->d_size); + tmp = data_str->d_buf; data_str->d_buf = pair->dlp_str; + pair->dlp_str = tmp; data_str->d_size += len; (void) elf_flagdata(data_str, ELF_C_SET, ELF_F_DIRTY); @@ -1471,7 +1474,9 @@ process_obj(dtrace_hdl_t *dtp, const cha (void) gelf_update_shdr(scn_str, &shdr_str); bcopy(data_sym->d_buf, pair->dlp_sym, data_sym->d_size); + tmp = data_sym->d_buf; data_sym->d_buf = pair->dlp_sym; + pair->dlp_sym = tmp; data_sym->d_size += nsym * symsize; (void) elf_flagdata(data_sym, ELF_C_SET, ELF_F_DIRTY); @@ -1657,9 +1662,6 @@ process_obj(dtrace_hdl_t *dtp, const cha (void) elf_end(elf); (void) close(fd); -#ifndef illumos - if (nsym > 0) -#endif while ((pair = bufs) != NULL) { bufs = pair->dlp_next; dt_free(dtp, pair->dlp_str); From owner-svn-src-all@freebsd.org Sun Feb 5 02:44:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FD42CD18D9; Sun, 5 Feb 2017 02:44:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C87BF7C; Sun, 5 Feb 2017 02:44:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152im7k018301; Sun, 5 Feb 2017 02:44:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152imc7018300; Sun, 5 Feb 2017 02:44:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050244.v152imc7018300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313264 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:44:49 -0000 Author: markj Date: Sun Feb 5 02:44:48 2017 New Revision: 313264 URL: https://svnweb.freebsd.org/changeset/base/313264 Log: Avoid using Sun compiler-specific flags. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh Sun Feb 5 02:44:08 2017 (r313263) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh Sun Feb 5 02:44:48 2017 (r313264) @@ -77,7 +77,7 @@ main(int argc, char **argv) } EOF -cc -c -xO2 test.c +cc -c -O2 test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 From owner-svn-src-all@freebsd.org Sun Feb 5 02:45:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F7DCD1945; Sun, 5 Feb 2017 02:45:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7102910EA; Sun, 5 Feb 2017 02:45:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152jZU9018382; Sun, 5 Feb 2017 02:45:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152jZ8u018381; Sun, 5 Feb 2017 02:45:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050245.v152jZ8u018381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313265 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:45:36 -0000 Author: markj Date: Sun Feb 5 02:45:35 2017 New Revision: 313265 URL: https://svnweb.freebsd.org/changeset/base/313265 Log: Search for _DTRACE_VERSION in sys/sdt.h rather than unistd.h. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh Sun Feb 5 02:44:48 2017 (r313264) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.include.ksh Sun Feb 5 02:45:35 2017 (r313265) @@ -25,7 +25,7 @@ # # ident "%Z%%M% %I% %E% SMI" -# Make sure defines _DTRACE_VERSION +# Make sure defines _DTRACE_VERSION DIR=/var/tmp/dtest.$$ @@ -33,7 +33,7 @@ mkdir $DIR cd $DIR cat > test.c < +#include int main(int argc, char **argv) @@ -46,7 +46,7 @@ main(int argc, char **argv) } EOF -cc -xarch=generic -o test test.c +cc -o test test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 From owner-svn-src-all@freebsd.org Sun Feb 5 02:46:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D2EFCD19B1; Sun, 5 Feb 2017 02:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 199BE1277; Sun, 5 Feb 2017 02:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id e4so4313112pfg.0; Sat, 04 Feb 2017 18:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=qstsLE0OEOSucKRdZ/HKDVZ3nrDAbZtPaiKhPCOIpqs=; b=ZevhOQiQNtQviPhNlRnjfBsl4XfAGBL5fmoJeLwbRjngdx8+rUjbd5daXA+aAw/03E MIEXwtlUuBk7M73Z3FYC2KUXVz6xVtqzQNZN8aJ/OTIiZcxzz0xtwMLklUzJohXQv1To 2vyt+moJ8zIpt92cPZJkbXgcFzsK73vSaCBGjqYhnkZoSuy7uquY+M6jbF4zuLjLClmY /TL18nu07s9XMAg0gtCDqWVHtAlKV4d6lsXM1woW+Kdo4nyZwFxzkoUJSwcvnpzsBQUx T3dUyzcXt1oIKBDrkaX96vrHRwppiFh7lvJfgscg3tj6naR5nVS0bDuGlGjovAeHXjix fQug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=qstsLE0OEOSucKRdZ/HKDVZ3nrDAbZtPaiKhPCOIpqs=; b=MJuX7wb5CKW/daH9X3hvrUKUqwaRu/7rL5CmDktuIJSIa7tMSDxdlblzsfF6iXofQr CEMm9vPYO/ymO9KSkfhkPycgtr9kapAPMGzxs/bbSD9WA037qUMuMWw0slI5JNu/jFPa JFbQbNAkmHVPJr+J64VPzMq15WIFpaoS61EULFmYFjiKQzPIzIrA+RTtRpNMPBzPzxbG W4B5IacxHC4Fkk79Kw92o46dA324Kur0Plqna9Zweoz4QFQyAoJU9hk9JpbvorLUMzOf fCyCao4KcVo2z3m3iFIv18FLyutG8KtOFFS4mcDRpl1ZNOMvV/+rlPoAlR6l37pqjsYp kQJg== X-Gm-Message-State: AIkVDXIpFJeuV3rImPuKtuN8vqxTjeGzGKxZC4/9eQbdlFS0adzVpIRIeXs8Tk8P5BBq6A== X-Received: by 10.99.66.193 with SMTP id p184mr5804137pga.213.1486262782651; Sat, 04 Feb 2017 18:46:22 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y6sm78736533pgc.1.2017.02.04.18.46.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Feb 2017 18:46:22 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> Date: Sat, 4 Feb 2017 18:46:25 -0800 Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <978681FD-1FB2-4E5A-BBBF-43F3176DFE2B@gmail.com> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:46:23 -0000 --Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 4, 2017, at 18:16, Steven Hartland = wrote: >=20 > Hi Mateusz could you improve on the commit message as it currently = describes what is changed, which can be obtained from the diff, but not = why? >=20 > I hope on one feels like I'm trying to teach them to suck eggs, as I = know everyone here has a wealth of experience, but I strongly believe = commit messages are a very important way of improving the overall = quality of the code base by sharing with others the reason for changes, = which they can then learn from. I know I for one love picking up new = nuggets of knowledge from others in this way. >=20 > Also I believe this is area the project as a whole can improve on, so = I don't mean to single out anyone here. >=20 > Anyway I hope people find this useful: >=20 > When I write a commit message I try to stick to the following rules = which I believe helps to bring clarity for others about my actions. > 1. First line is a brief summary of the out come of the change e.g. > Fixed compiler warnings in nvmecontrol on 32bit platforms > 2. Follow up paragraphs expand on #1 if needed including details about = not just what but why the change was made e.g. > Use ssize_t instead of uint32_t to prevent warnings about a comparison = with different signs. Due to the promotion rules, this would only = happen on 32-bit platforms. > 3. When writing #2 include details that would not be obvious to = non-experts in the particular area. >=20 > #2 and #3 are really important to sharing knowledge that others may = not know, its quite relevant to this commit msg, as while it may be = obvious to you and others familiar with the atomic ops, to the rest of = us we're just wondering why make this change? >=20 > N.B. The example is based on Warner's recent commit purely as an = example, which had a good why, just missing the brief summary. >=20 > While on this subject are there any official guidelines to writing = commit messages, if no should we create some? Please. It really irritates me when I find similar commit = messages at $work from people that don=E2=80=99t describe the rationale = for the commit =E2=80=94 especially when I need to assess the risk = (backport needed, testing required, etc). Thanks! -Ngie --Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52 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 iQIcBAEBCgAGBQJYlpIBAAoJEPWDqSZpMIYV3HgP/3K80/KkQz9/Rhs4RdAbuYFb sFlOA1dE1enj07CkpG5cgz1iJYiBxZC09pL5cC1BLyzrJrcDNT9h4OEQY2hjg0NH 7mJdeBFpvnbP1qQazuhM3jO/Ww/GdVXmGlGpaTR17WzljVzIpjoe1B//f1HhQkLu GKVOgXolxvYYD8tMfUoGMXTJbd1KLwAKZLPAc4d59wBRrPpwDw5btAtIfZC9lJJ0 dH54RrjRFDfcTmAPTrdUuUNaqO6QCFPwlcKFWeO8MlFJicovAPqhTJJfUTJ1+4hF X8gQE9o65DZBd/RiY/y80MVHtqUIzbjzNwhEafRHsJXMPuY5LOV9roXHiGm/VMQw Wt57ROiDZqXoY02djIlOKQe3Ux5TqlB5kVfTGU6UXQ7kqUXYI19S76nEiU4aONS4 74KKiklzvVaAJlcF8RmI0RRQp3Cyqy1VIl+J09i/I7HycW+7ry6kcsSfMcIdGNKy Z6iRu+RkIZAOaHHNNQ3egQW0wgo2WUoPODg98eE+0XGRSWVr4KsbqvGm6O1KBPEl o/vFE7lqbchXeykNm1iZNZwJYwZB1ioXDxWE0Aw3oQ5bpFnbiF6yj52PjatLLzwl xHGkMRyUpy4W0O6XLYR+RZAXg1K/rzZvAmblAG7dLItz7EXGdZOK08spb5ESRv6K 1VWAyPOv3SoG2b1EHiM7 =6wLj -----END PGP SIGNATURE----- --Apple-Mail=_1CF7A619-F4AE-498A-8F1A-07565308AB52-- From owner-svn-src-all@freebsd.org Sun Feb 5 02:47:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91310CD1A29; Sun, 5 Feb 2017 02:47:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60A3313F0; Sun, 5 Feb 2017 02:47:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v152lYhc018496; Sun, 5 Feb 2017 02:47:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v152lYkC018495; Sun, 5 Feb 2017 02:47:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702050247.v152lYkC018495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 5 Feb 2017 02:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313266 - head/sys/cddl/contrib/opensolaris/uts/common/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 02:47:35 -0000 Author: markj Date: Sun Feb 5 02:47:34 2017 New Revision: 313266 URL: https://svnweb.freebsd.org/changeset/base/313266 Log: Ensure that the DOF string length is divisible by 2. It is an ASCII encoding of a hexadecimal representation of the DOF file used to enable anonymous tracing, so its length should always be even. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:45:35 2017 (r313265) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Feb 5 02:47:34 2017 (r313266) @@ -13346,8 +13346,11 @@ dtrace_dof_property(const char *name) data += strlen(name) + 1; /* skip past the '=' */ len = eol - data; + if (len % 2 != 0) { + dtrace_dof_error(NULL, "invalid DOF encoding length"); + goto doferr; + } bytes = len / 2; - if (bytes < sizeof(dof_hdr_t)) { dtrace_dof_error(NULL, "truncated header"); goto doferr; From owner-svn-src-all@freebsd.org Sun Feb 5 03:00:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B436DCD1C80; Sun, 5 Feb 2017 03:00:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 476D81AD4; Sun, 5 Feb 2017 03:00:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id r18so13979442wmd.3; Sat, 04 Feb 2017 19:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ydfKFIlnDAYHEuo0/eMD7YTKgawVvcK8KMjMgSQrr/s=; b=HED5PXgv9uAyKpmqi2Lp054dM1KAkwM+MrfFfQeVAD2iIJm+kaaivOBESn3RYAc1wq FacYgQVMTladLaKJ7YHnNJFTFthya28JHzFMKX7baZV4vNWr2ZCIAbAP8OMLMCa6FhI6 fNASazcVMTabdkKtCkgOiOqHU294UG7fFjuiUsZ8iRyAnnN5FKF8ivPiMlg5lKaz77it J83QFSb/W0iyrVoWNRpKK5AvNhCuvgGczq5ja3VNV983gHn6TVPVP0o9Jj3L29h6FzJZ hfHkWewbMmLivekeNOL0FqeYp5TDym5fCHmpewWtCzCU0noED0K15pfwKU3pSYG5Nj7p IlJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ydfKFIlnDAYHEuo0/eMD7YTKgawVvcK8KMjMgSQrr/s=; b=Fu+UjMl1uBYZNC/oixmWQcu6MGLu1tIbsOApQQBs/cupFlq3lu56f5j5R69uNl21GP M/ZF2vrVje5QQM+3u1dk2SecShNJqf1wDJmbPq/0aLqAiaEGh4FVWeb77DLfOr7z+dt8 M+vUxE/gm/cSOTWE0lvArURzNcQ2AtQ+OuNowBFNk4weCYS9X4VV8spAyUm+MH7rniRO K0KOhrSVyoeCE8hJuRjlLefRWZmlujWB/aCrxlrwyYaYJJmgCTogp+FdMY/tRH7SG2CY HxDo16+Y95T+j+BD90boYbgWzebglw4WE9dpe7OHZI0SGqf0eRITArQ4MwRM3ovlD4AZ Tlpw== X-Gm-Message-State: AMke39nPxDMqR1v92AbCWhVnVde2gOmqEo+/PXMYmIbjpqR/OpMmqHyZSgtPi49iWEM6jA== X-Received: by 10.28.147.147 with SMTP id v141mr4069813wmd.110.1486263609634; Sat, 04 Feb 2017 19:00:09 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id h3sm53139778wrb.31.2017.02.04.19.00.08 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 04 Feb 2017 19:00:09 -0800 (PST) Date: Sun, 5 Feb 2017 04:00:06 +0100 From: Mateusz Guzik To: Steven Hartland Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313260 - head/sys/kern Message-ID: <20170205030006.GB4375@dft-labs.eu> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 03:00:11 -0000 On Sun, Feb 05, 2017 at 02:16:12AM +0000, Steven Hartland wrote: > Hi Mateusz could you improve on the commit message as it currently > describes what is changed, which can be obtained from the diff, but > not why? > > I hope on one feels like I'm trying to teach them to suck eggs, as I > know everyone here has a wealth of experience, but I strongly believe > commit messages are a very important way of improving the overall > quality of the code base by sharing with others the reason for > changes, which they can then learn from. I know I for one love > picking up new nuggets of knowledge from others in this way. > In general I agree that commit messages should be descriptive (see below), but I also think there are things which are somewhat self-explanatory and if someone is unfamiliar with given concept, they can always ask and/or find it documented elsewhere. For instance, plugging an unused variable, a memory leak, doing a lockless check first etc. are all pretty standard and unless there is something unusual going on (e.g. complicated circumstances leading to a leak) there is not much to explain. In particular, I don't see why anyone would explain why leaks are bad on each commit plugging one. In the same spirit, the switch to fcmpset should be a routine change. Interested parties can check the man page and the commit message which introduced it. Arguably I should have elaborated more in there. The gist is as follows: there are plenty of cases where the kernel wants to atomically replace the value of a particular variable. Sometimes, like in this commit, we want to bump the counter by 1, but only if the current value is not 0. For that we need to read the value, see if it is 0 and if not, try to replace what we read with what we read + 1. We cannot just increment as the value could have changed to 0 in the meantime. But this also means that multiple cpus doing the same operation on the same variable will trip on each other - one will succeed while the rest will have to retry. Prior to this commit, each retry attempt would explicitly re-read the value. This induces cache coherency traffic slowing everyone down. amd64 has the nice property of giving us the value it found eleminating the need to explicitly re-read it. There is similar story on i386 and sparc. Other architectures may also benefit from this, but that I did not benchmark. In short under contention atomic_fcmpset is going to be faster than atomic_cmpset. I did not benchmark this particular change, but a switch of the sort easily gives 10%+ in microbenchmarks on amd64. That said, while one can argue this optimizes the code, it really depessimizes it as something of the sort should have been already employed. Parties interested in scalability problems (and cpu caches in particular) are encouraged to read: https://www.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html > Also I believe this is area the project as a whole can improve on, so > I don't mean to single out anyone here. > > Anyway I hope people find this useful: > > When I write a commit message I try to stick to the following rules > which I believe helps to bring clarity for others about my actions. > 1. First line is a brief summary of the out come of the change e.g. > Fixed compiler warnings in nvmecontrol on 32bit platforms This should be mandatory in the form of one sentence, preferably prefixed with a keyword. So in particular I would phrase this one as: nvme: fix compiler warnings in nvmecontrol on 32bit platforms or so > 2. Follow up paragraphs expand on #1 if needed including details > about not just what but why the change was made e.g. > Use ssize_t instead of uint32_t to prevent warnings about a > comparison with different signs. Due to the promotion rules, this > would only happen on 32-bit platforms. See above. Unclear how much explanation is needed. While a safe default would be to always elaborate, I don't think it is necessary in all cases. Things which do need elaborated commit messages is algorithm changes, bug fixes (unless the bug is trivial), > 3. When writing #2 include details that would not be obvious to > non-experts in the particular area. > > #2 and #3 are really important to sharing knowledge that others may > not know, its quite relevant to this commit msg, as while it may be > obvious to you and others familiar with the atomic ops, to the rest > of us we're just wondering why make this change? > Well, while I don't have the best track record with commit messages, I do believe I elaborate enough when it is needed, which I think is rare. see https://svnweb.freebsd.org/base?view=revision&revision=306608 or https://svnweb.freebsd.org/base?view=revision&revision=303643 or https://svnweb.freebsd.org/base?view=revision&revision=295233 for examples Other than that I think my changes are straightforward (and sometimes weirdly buggy :/). tl;dr I think my commit message here was perfectly fine > N.B. The example is based on Warner's recent commit purely as an > example, which had a good why, just missing the brief summary. > > While on this subject are there any official guidelines to writing > commit messages, if no should we create some? > I'm unaware of any. > On 05/02/2017 01:40, Mateusz Guzik wrote: > >Author: mjg > >Date: Sun Feb 5 01:40:27 2017 > >New Revision: 313260 > >URL: https://svnweb.freebsd.org/changeset/base/313260 > > > >Log: > > fd: switch fget_unlocked to atomic_fcmpset > > > >Modified: > > head/sys/kern/kern_descrip.c > > > >Modified: head/sys/kern/kern_descrip.c > >============================================================================== > >--- head/sys/kern/kern_descrip.c Sun Feb 5 01:20:39 2017 (r313259) > >+++ head/sys/kern/kern_descrip.c Sun Feb 5 01:40:27 2017 (r313260) > >@@ -2569,8 +2569,8 @@ fget_unlocked(struct filedesc *fdp, int > > if (error != 0) > > return (error); > > #endif > >- retry: > > count = fp->f_count; > >+ retry: > > if (count == 0) { > > /* > > * Force a reload. Other thread could reallocate the > >@@ -2584,7 +2584,7 @@ fget_unlocked(struct filedesc *fdp, int > > * Use an acquire barrier to force re-reading of fdt so it is > > * refreshed for verification. > > */ > >- if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) > >+ if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) > > goto retry; > > fdt = fdp->fd_files; > > #ifdef CAPABILITIES > > > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sun Feb 5 03:23:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5C3BCD16F1; Sun, 5 Feb 2017 03:23:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75A0B102B; Sun, 5 Feb 2017 03:23:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v153NG1k035134; Sun, 5 Feb 2017 03:23:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v153NGMP035133; Sun, 5 Feb 2017 03:23:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050323.v153NGMP035133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 03:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313268 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 03:23:17 -0000 Author: mjg Date: Sun Feb 5 03:23:16 2017 New Revision: 313268 URL: https://svnweb.freebsd.org/changeset/base/313268 Log: vfs: use atomic_fcmpset in vfs_refcount_* Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Feb 5 02:49:42 2017 (r313267) +++ head/sys/kern/vfs_subr.c Sun Feb 5 03:23:16 2017 (r313268) @@ -2461,11 +2461,11 @@ vfs_refcount_acquire_if_not_zero(volatil { u_int old; + old = *count; for (;;) { - old = *count; if (old == 0) return (0); - if (atomic_cmpset_int(count, old, old + 1)) + if (atomic_fcmpset_int(count, &old, old + 1)) return (1); } } @@ -2475,11 +2475,11 @@ vfs_refcount_release_if_not_last(volatil { u_int old; + old = *count; for (;;) { - old = *count; if (old == 1) return (0); - if (atomic_cmpset_int(count, old, old - 1)) + if (atomic_fcmpset_int(count, &old, old - 1)) return (1); } } From owner-svn-src-all@freebsd.org Sun Feb 5 03:26:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BB81CD17EE; Sun, 5 Feb 2017 03:26:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7E1D1224; Sun, 5 Feb 2017 03:26:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v153QY9m035292; Sun, 5 Feb 2017 03:26:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v153QYhP035290; Sun, 5 Feb 2017 03:26:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050326.v153QYhP035290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 03:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313269 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 03:26:36 -0000 Author: mjg Date: Sun Feb 5 03:26:34 2017 New Revision: 313269 URL: https://svnweb.freebsd.org/changeset/base/313269 Log: mtx: switch to fcmpset The found value is passed to locking routines in order to reduce cacheline accesses. mtx_unlock grows an explicit check for regular unlock. On ll/sc architectures the routine can fail even if the lock could have been handled by the inline primitive. Discussed with: jhb Tested by: pho (previous version) Modified: head/sys/kern/kern_mutex.c head/sys/sys/mutex.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 03:23:16 2017 (r313268) +++ head/sys/kern/kern_mutex.c Sun Feb 5 03:26:34 2017 (r313269) @@ -455,12 +455,11 @@ _mtx_trylock_flags_(volatile uintptr_t * * sleep waiting for it), or if we need to recurse on it. */ void -__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t tid, int opts, +__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, int opts, const char *file, int line) { struct mtx *m; struct turnstile *ts; - uintptr_t v; #ifdef ADAPTIVE_MUTEXES volatile struct thread *owner; #endif @@ -489,7 +488,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, lock_delay_arg_init(&lda, NULL); #endif m = mtxlock2mtx(c); - v = MTX_READ_VALUE(m); if (__predict_false(lv_mtx_owner(v) == (struct thread *)tid)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || @@ -520,9 +518,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, for (;;) { if (v == MTX_UNOWNED) { - if (_mtx_obtain_lock(m, tid)) + if (_mtx_obtain_lock_fetch(m, &v, tid)) break; - v = MTX_READ_VALUE(m); continue; } #ifdef KDTRACE_HOOKS @@ -674,12 +671,11 @@ _mtx_lock_spin_failed(struct mtx *m) * is handled inline. */ void -_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t tid, int opts, - const char *file, int line) +_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + int opts, const char *file, int line) { struct mtx *m; struct lock_delay_arg lda; - uintptr_t v; #ifdef LOCK_PROFILING int contested = 0; uint64_t waittime = 0; @@ -706,12 +702,10 @@ _mtx_lock_spin_cookie(volatile uintptr_t #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&m->lock_object); #endif - v = MTX_READ_VALUE(m); for (;;) { if (v == MTX_UNOWNED) { - if (_mtx_obtain_lock(m, tid)) + if (_mtx_obtain_lock_fetch(m, &v, tid)) break; - v = MTX_READ_VALUE(m); continue; } /* Give interrupts a chance while we spin. */ @@ -796,14 +790,11 @@ retry: m->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - v = MTX_READ_VALUE(m); for (;;) { - if (v == MTX_UNOWNED) { - if (_mtx_obtain_lock(m, tid)) - break; - v = MTX_READ_VALUE(m); + if (_mtx_obtain_lock_fetch(m, &v, tid)) + break; + if (v == MTX_UNOWNED) continue; - } if (v == tid) { m->mtx_recurse++; break; @@ -896,11 +887,18 @@ __mtx_unlock_sleep(volatile uintptr_t *c { struct mtx *m; struct turnstile *ts; + uintptr_t v; if (SCHEDULER_STOPPED()) return; m = mtxlock2mtx(c); + v = MTX_READ_VALUE(m); + + if (v == (uintptr_t)curthread) { + if (_mtx_release_lock(m, (uintptr_t)curthread)) + return; + } if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) Modified: head/sys/sys/mutex.h ============================================================================== --- head/sys/sys/mutex.h Sun Feb 5 03:23:16 2017 (r313268) +++ head/sys/sys/mutex.h Sun Feb 5 03:26:34 2017 (r313269) @@ -98,13 +98,13 @@ void mtx_sysinit(void *arg); int _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line); void mutex_init(void); -void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t tid, int opts, - const char *file, int line); +void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + int opts, const char *file, int line); void __mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file, int line); #ifdef SMP -void _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t tid, int opts, - const char *file, int line); +void _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + int opts, const char *file, int line); #endif void __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line); @@ -140,13 +140,13 @@ void thread_lock_flags_(struct thread *, _mtx_destroy(&(m)->mtx_lock) #define mtx_trylock_flags_(m, o, f, l) \ _mtx_trylock_flags_(&(m)->mtx_lock, o, f, l) -#define _mtx_lock_sleep(m, t, o, f, l) \ - __mtx_lock_sleep(&(m)->mtx_lock, t, o, f, l) +#define _mtx_lock_sleep(m, v, t, o, f, l) \ + __mtx_lock_sleep(&(m)->mtx_lock, v, t, o, f, l) #define _mtx_unlock_sleep(m, o, f, l) \ __mtx_unlock_sleep(&(m)->mtx_lock, o, f, l) #ifdef SMP -#define _mtx_lock_spin(m, t, o, f, l) \ - _mtx_lock_spin_cookie(&(m)->mtx_lock, t, o, f, l) +#define _mtx_lock_spin(m, v, t, o, f, l) \ + _mtx_lock_spin_cookie(&(m)->mtx_lock, v, t, o, f, l) #endif #define _mtx_lock_flags(m, o, f, l) \ __mtx_lock_flags(&(m)->mtx_lock, o, f, l) @@ -171,6 +171,11 @@ void thread_lock_flags_(struct thread *, #define _mtx_obtain_lock(mp, tid) \ atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) +#define _mtx_obtain_lock_fetch(mp, vp, tid) ({ \ + *vp = MTX_UNOWNED; \ + atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid)); \ +}) + /* Try to release mtx_lock if it is unrecursed and uncontested. */ #define _mtx_release_lock(mp, tid) \ atomic_cmpset_rel_ptr(&(mp)->mtx_lock, (tid), MTX_UNOWNED) @@ -188,9 +193,10 @@ void thread_lock_flags_(struct thread *, /* Lock a normal mutex. */ #define __mtx_lock(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ + uintptr_t _v; \ \ - if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid)))\ - _mtx_lock_sleep((mp), _tid, (opts), (file), (line)); \ + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ + _mtx_lock_sleep((mp), _v, _tid, (opts), (file), (line));\ else \ LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, \ mp, 0, 0, file, line); \ @@ -205,13 +211,14 @@ void thread_lock_flags_(struct thread *, #ifdef SMP #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ + uintptr_t _v; \ \ spinlock_enter(); \ - if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid))) {\ - if ((mp)->mtx_lock == _tid) \ + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ + if (_v == _tid) \ (mp)->mtx_recurse++; \ else \ - _mtx_lock_spin((mp), _tid, (opts), (file), (line)); \ + _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line));\ } else \ LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ mp, 0, 0, file, line); \ @@ -265,7 +272,7 @@ void thread_lock_flags_(struct thread *, \ if ((mp)->mtx_recurse == 0) \ LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, mp); \ - if ((mp)->mtx_lock != _tid || !_mtx_release_lock((mp), _tid)) \ + if (!_mtx_release_lock((mp), _tid)) \ _mtx_unlock_sleep((mp), (opts), (file), (line)); \ } while (0) From owner-svn-src-all@freebsd.org Sun Feb 5 04:53:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30F57CC5CD8; Sun, 5 Feb 2017 04:53:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5D6AEB2; Sun, 5 Feb 2017 04:53:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v154rEJB072598; Sun, 5 Feb 2017 04:53:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v154rDjf072595; Sun, 5 Feb 2017 04:53:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050453.v154rDjf072595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 04:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313270 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 04:53:15 -0000 Author: mjg Date: Sun Feb 5 04:53:13 2017 New Revision: 313270 URL: https://svnweb.freebsd.org/changeset/base/313270 Log: rwlock: switch to fcmpset Discussed with: jhb Tested by: pho Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Feb 5 03:26:34 2017 (r313269) +++ head/sys/kern/kern_rwlock.c Sun Feb 5 04:53:13 2017 (r313270) @@ -440,7 +440,7 @@ __rw_rlock(volatile uintptr_t *c, const * if the lock has been unlocked and write waiters * were present. */ - if (atomic_cmpset_acq_ptr(&rw->rw_lock, v, + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, v + RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR4(KTR_LOCK, @@ -449,7 +449,6 @@ __rw_rlock(volatile uintptr_t *c, const (void *)(v + RW_ONE_READER)); break; } - v = RW_READ_VALUE(rw); continue; } #ifdef KDTRACE_HOOKS @@ -675,7 +674,7 @@ _rw_runlock_cookie(volatile uintptr_t *c * just drop one and return. */ if (RW_READERS(x) > 1) { - if (atomic_cmpset_rel_ptr(&rw->rw_lock, x, + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, x - RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR4(KTR_LOCK, @@ -684,7 +683,6 @@ _rw_runlock_cookie(volatile uintptr_t *c (void *)(x - RW_ONE_READER)); break; } - x = RW_READ_VALUE(rw); continue; } /* @@ -694,14 +692,13 @@ _rw_runlock_cookie(volatile uintptr_t *c if (!(x & RW_LOCK_WAITERS)) { MPASS((x & ~RW_LOCK_WRITE_SPINNER) == RW_READERS_LOCK(1)); - if (atomic_cmpset_rel_ptr(&rw->rw_lock, x, + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, RW_UNLOCKED)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, rw); break; } - x = RW_READ_VALUE(rw); continue; } /* @@ -769,8 +766,8 @@ _rw_runlock_cookie(volatile uintptr_t *c * read or write lock. */ void -__rw_wlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, - int line) +__rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + const char *file, int line) { struct rwlock *rw; struct turnstile *ts; @@ -779,7 +776,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u int spintries = 0; int i; #endif - uintptr_t v, x; + uintptr_t x; #ifdef LOCK_PROFILING uint64_t waittime = 0; int contested = 0; @@ -803,7 +800,6 @@ __rw_wlock_hard(volatile uintptr_t *c, u lock_delay_arg_init(&lda, NULL); #endif rw = rwlock2rw(c); - v = RW_READ_VALUE(rw); if (__predict_false(lv_rw_wowner(v) == (struct thread *)tid)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, @@ -825,9 +821,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u #endif for (;;) { if (v == RW_UNLOCKED) { - if (_rw_write_lock(rw, tid)) + if (_rw_write_lock_fetch(rw, &v, tid)) break; - v = RW_READ_VALUE(rw); continue; } #ifdef KDTRACE_HOOKS Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Sun Feb 5 03:26:34 2017 (r313269) +++ head/sys/sys/rwlock.h Sun Feb 5 04:53:13 2017 (r313270) @@ -84,6 +84,11 @@ #define _rw_write_lock(rw, tid) \ atomic_cmpset_acq_ptr(&(rw)->rw_lock, RW_UNLOCKED, (tid)) +#define _rw_write_lock_fetch(rw, vp, tid) ({ \ + *vp = RW_UNLOCKED; \ + atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid)); \ +}) + /* Release a write lock quickly if there are no waiters. */ #define _rw_write_unlock(rw, tid) \ atomic_cmpset_rel_ptr(&(rw)->rw_lock, (tid), RW_UNLOCKED) @@ -97,9 +102,10 @@ /* Acquire a write lock. */ #define __rw_wlock(rw, tid, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ + uintptr_t _v; \ \ - if ((rw)->rw_lock != RW_UNLOCKED || !_rw_write_lock((rw), _tid))\ - _rw_wlock_hard((rw), _tid, (file), (line)); \ + if (!_rw_write_lock_fetch((rw), &_v, _tid)) \ + _rw_wlock_hard((rw), _v, _tid, (file), (line)); \ else \ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, \ 0, 0, file, line, LOCKSTAT_WRITER); \ @@ -114,7 +120,7 @@ else { \ LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, \ LOCKSTAT_WRITER); \ - if ((rw)->rw_lock != _tid || !_rw_write_unlock((rw), _tid))\ + if (!_rw_write_unlock((rw), _tid)) \ _rw_wunlock_hard((rw), _tid, (file), (line)); \ } \ } while (0) @@ -135,8 +141,8 @@ void _rw_wunlock_cookie(volatile uintptr void __rw_rlock(volatile uintptr_t *c, const char *file, int line); int __rw_try_rlock(volatile uintptr_t *c, const char *file, int line); void _rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line); -void __rw_wlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, - int line); +void __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, + const char *file, int line); void __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, int line); int __rw_try_upgrade(volatile uintptr_t *c, const char *file, int line); @@ -171,8 +177,8 @@ void __rw_assert(const volatile uintptr_ __rw_try_rlock(&(rw)->rw_lock, f, l) #define _rw_runlock(rw, f, l) \ _rw_runlock_cookie(&(rw)->rw_lock, f, l) -#define _rw_wlock_hard(rw, t, f, l) \ - __rw_wlock_hard(&(rw)->rw_lock, t, f, l) +#define _rw_wlock_hard(rw, v, t, f, l) \ + __rw_wlock_hard(&(rw)->rw_lock, v, t, f, l) #define _rw_wunlock_hard(rw, t, f, l) \ __rw_wunlock_hard(&(rw)->rw_lock, t, f, l) #define _rw_try_upgrade(rw, f, l) \ From owner-svn-src-all@freebsd.org Sun Feb 5 04:54:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D3F5CC5D9B; Sun, 5 Feb 2017 04:54:22 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B85B1009; Sun, 5 Feb 2017 04:54:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v154sLIt072684; Sun, 5 Feb 2017 04:54:21 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v154sKN3072682; Sun, 5 Feb 2017 04:54:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050454.v154sKN3072682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 04:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313271 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 04:54:22 -0000 Author: mjg Date: Sun Feb 5 04:54:20 2017 New Revision: 313271 URL: https://svnweb.freebsd.org/changeset/base/313271 Log: sx: switch to fcmpset Discussed with: jhb Tested by: pho (previous version) Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 04:53:13 2017 (r313270) +++ head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) @@ -530,15 +530,14 @@ sx_downgrade_(struct sx *sx, const char * accessible from at least sx.h. */ int -_sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, const char *file, - int line) +_sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t tid, int opts, + const char *file, int line) { GIANT_DECLARE; #ifdef ADAPTIVE_SX volatile struct thread *owner; u_int i, spintries = 0; #endif - uintptr_t x; #ifdef LOCK_PROFILING uint64_t waittime = 0; int contested = 0; @@ -563,8 +562,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t lock_delay_arg_init(&lda, NULL); #endif - x = SX_READ_VALUE(sx); - /* If we already hold an exclusive lock, then recurse. */ if (__predict_false(lv_sx_owner(x) == (struct thread *)tid)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, @@ -587,9 +584,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t #endif for (;;) { if (x == SX_LOCK_UNLOCKED) { - if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, tid)) + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) break; - x = SX_READ_VALUE(sx); continue; } #ifdef KDTRACE_HOOKS @@ -902,7 +898,7 @@ _sx_slock_hard(struct sx *sx, int opts, */ if (x & SX_LOCK_SHARED) { MPASS(!(x & SX_LOCK_SHARED_WAITERS)); - if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, x + SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, @@ -911,7 +907,6 @@ _sx_slock_hard(struct sx *sx, int opts, (void *)(x + SX_ONE_SHARER)); break; } - x = SX_READ_VALUE(sx); continue; } #ifdef KDTRACE_HOOKS @@ -1085,7 +1080,7 @@ _sx_sunlock_hard(struct sx *sx, const ch * so, just drop one and return. */ if (SX_SHARERS(x) > 1) { - if (atomic_cmpset_rel_ptr(&sx->sx_lock, x, + if (atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, x - SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, @@ -1094,8 +1089,6 @@ _sx_sunlock_hard(struct sx *sx, const ch (void *)(x - SX_ONE_SHARER)); break; } - - x = SX_READ_VALUE(sx); continue; } @@ -1105,14 +1098,14 @@ _sx_sunlock_hard(struct sx *sx, const ch */ if (!(x & SX_LOCK_EXCLUSIVE_WAITERS)) { MPASS(x == SX_SHARERS_LOCK(1)); - if (atomic_cmpset_rel_ptr(&sx->sx_lock, - SX_SHARERS_LOCK(1), SX_LOCK_UNLOCKED)) { + x = SX_SHARERS_LOCK(1); + if (atomic_fcmpset_rel_ptr(&sx->sx_lock, + &x, SX_LOCK_UNLOCKED)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, sx); break; } - x = SX_READ_VALUE(sx); continue; } Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Sun Feb 5 04:53:13 2017 (r313270) +++ head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) @@ -109,7 +109,7 @@ int _sx_slock(struct sx *sx, int opts, c int _sx_xlock(struct sx *sx, int opts, const char *file, int line); void _sx_sunlock(struct sx *sx, const char *file, int line); void _sx_xunlock(struct sx *sx, const char *file, int line); -int _sx_xlock_hard(struct sx *sx, uintptr_t tid, int opts, +int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, const char *file, int line); int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int @@ -153,11 +153,12 @@ __sx_xlock(struct sx *sx, struct thread int line) { uintptr_t tid = (uintptr_t)td; + uintptr_t v; int error = 0; - if (sx->sx_lock != SX_LOCK_UNLOCKED || - !atomic_cmpset_acq_ptr(&sx->sx_lock, SX_LOCK_UNLOCKED, tid)) - error = _sx_xlock_hard(sx, tid, opts, file, line); + v = SX_LOCK_UNLOCKED; + if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid)) + error = _sx_xlock_hard(sx, v, tid, opts, file, line); else LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, 0, 0, file, line, LOCKSTAT_WRITER); @@ -174,8 +175,7 @@ __sx_xunlock(struct sx *sx, struct threa if (sx->sx_recurse == 0) LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_WRITER); - if (sx->sx_lock != tid || - !atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + if (!atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) _sx_xunlock_hard(sx, tid, file, line); } From owner-svn-src-all@freebsd.org Sun Feb 5 05:20:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA2A4CD02DC; Sun, 5 Feb 2017 05:20:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A018119C6; Sun, 5 Feb 2017 05:20:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v155KTKf080847; Sun, 5 Feb 2017 05:20:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v155KTW8080845; Sun, 5 Feb 2017 05:20:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050520.v155KTW8080845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 05:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313272 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 05:20:30 -0000 Author: mjg Date: Sun Feb 5 05:20:29 2017 New Revision: 313272 URL: https://svnweb.freebsd.org/changeset/base/313272 Log: sx: uninline slock/sunlock Shared locking routines explicitly read the value and test it. If the change attempt fails, they fall back to a regular function which would retry in a loop. The problem is that with many concurrent readers the risk of failure is pretty high and even the value returned by fcmpset is very likely going to be stale by the time the loop in the fallback routine is reached. Uninline said primitives. It gives a throughput increase when doing concurrent slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s. Interestingly, rwlock primitives are already not inlined. Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) +++ head/sys/kern/kern_sx.c Sun Feb 5 05:20:29 2017 (r313272) @@ -276,29 +276,6 @@ sx_destroy(struct sx *sx) } int -_sx_slock(struct sx *sx, int opts, const char *file, int line) -{ - int error = 0; - - if (SCHEDULER_STOPPED()) - return (0); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), - ("sx_slock() by idle thread %p on sx %s @ %s:%d", - curthread, sx->lock_object.lo_name, file, line)); - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_slock() of destroyed sx @ %s:%d", file, line)); - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); - error = __sx_slock(sx, opts, file, line); - if (!error) { - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); - WITNESS_LOCK(&sx->lock_object, 0, file, line); - TD_LOCKS_INC(curthread); - } - - return (error); -} - -int sx_try_slock_(struct sx *sx, const char *file, int line) { uintptr_t x; @@ -391,21 +368,6 @@ sx_try_xlock_(struct sx *sx, const char } void -_sx_sunlock(struct sx *sx, const char *file, int line) -{ - - if (SCHEDULER_STOPPED()) - return; - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); - _sx_assert(sx, SA_SLOCKED, file, line); - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); - __sx_sunlock(sx, file, line); - TD_LOCKS_DEC(curthread); -} - -void _sx_xunlock(struct sx *sx, const char *file, int line) { @@ -840,14 +802,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ kick_proc0(); } -/* - * This function represents the so-called 'hard case' for sx_slock - * operation. All 'easy case' failures are redirected to this. Note - * that ideally this would be a static function, but it needs to be - * accessible from at least sx.h. - */ int -_sx_slock_hard(struct sx *sx, int opts, const char *file, int line) +_sx_slock(struct sx *sx, int opts, const char *file, int line) { GIANT_DECLARE; #ifdef ADAPTIVE_SX @@ -1051,14 +1007,8 @@ _sx_slock_hard(struct sx *sx, int opts, return (error); } -/* - * This function represents the so-called 'hard case' for sx_sunlock - * operation. All 'easy case' failures are redirected to this. Note - * that ideally this would be a static function, but it needs to be - * accessible from at least sx.h. - */ void -_sx_sunlock_hard(struct sx *sx, const char *file, int line) +_sx_sunlock(struct sx *sx, const char *file, int line) { uintptr_t x; int wakeup_swapper; @@ -1066,6 +1016,7 @@ _sx_sunlock_hard(struct sx *sx, const ch if (SCHEDULER_STOPPED()) return; + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); x = SX_READ_VALUE(sx); for (;;) { /* Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) +++ head/sys/sys/sx.h Sun Feb 5 05:20:29 2017 (r313272) @@ -111,10 +111,8 @@ void _sx_sunlock(struct sx *sx, const ch void _sx_xunlock(struct sx *sx, const char *file, int line); int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, const char *file, int line); -int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int line); -void _sx_sunlock_hard(struct sx *sx, const char *file, int line); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) void _sx_assert(const struct sx *sx, int what, const char *file, int line); #endif @@ -179,41 +177,6 @@ __sx_xunlock(struct sx *sx, struct threa _sx_xunlock_hard(sx, tid, file, line); } -/* Acquire a shared lock. */ -static __inline int -__sx_slock(struct sx *sx, int opts, const char *file, int line) -{ - uintptr_t x = sx->sx_lock; - int error = 0; - - if (!(x & SX_LOCK_SHARED) || - !atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) - error = _sx_slock_hard(sx, opts, file, line); - else - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, - 0, 0, file, line, LOCKSTAT_READER); - - return (error); -} - -/* - * Release a shared lock. We can just drop a single shared lock so - * long as we aren't trying to drop the last shared lock when other - * threads are waiting for an exclusive lock. This takes advantage of - * the fact that an unlocked lock is encoded as a shared lock with a - * count of 0. - */ -static __inline void -__sx_sunlock(struct sx *sx, const char *file, int line) -{ - uintptr_t x = sx->sx_lock; - - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); - if (x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS) || - !atomic_cmpset_rel_ptr(&sx->sx_lock, x, x - SX_ONE_SHARER)) - _sx_sunlock_hard(sx, file, line); -} - /* * Public interface for lock operations. */ @@ -227,12 +190,6 @@ __sx_sunlock(struct sx *sx, const char * _sx_xlock((sx), SX_INTERRUPTIBLE, (file), (line)) #define sx_xunlock_(sx, file, line) \ _sx_xunlock((sx), (file), (line)) -#define sx_slock_(sx, file, line) \ - (void)_sx_slock((sx), 0, (file), (line)) -#define sx_slock_sig_(sx, file, line) \ - _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) -#define sx_sunlock_(sx, file, line) \ - _sx_sunlock((sx), (file), (line)) #else #define sx_xlock_(sx, file, line) \ (void)__sx_xlock((sx), curthread, 0, (file), (line)) @@ -240,13 +197,13 @@ __sx_sunlock(struct sx *sx, const char * __sx_xlock((sx), curthread, SX_INTERRUPTIBLE, (file), (line)) #define sx_xunlock_(sx, file, line) \ __sx_xunlock((sx), curthread, (file), (line)) +#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ #define sx_slock_(sx, file, line) \ - (void)__sx_slock((sx), 0, (file), (line)) + (void)_sx_slock((sx), 0, (file), (line)) #define sx_slock_sig_(sx, file, line) \ - __sx_slock((sx), SX_INTERRUPTIBLE, (file), (line)) + _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) #define sx_sunlock_(sx, file, line) \ - __sx_sunlock((sx), (file), (line)) -#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ + _sx_sunlock((sx), (file), (line)) #define sx_try_slock(sx) sx_try_slock_((sx), LOCK_FILE, LOCK_LINE) #define sx_try_xlock(sx) sx_try_xlock_((sx), LOCK_FILE, LOCK_LINE) #define sx_try_upgrade(sx) sx_try_upgrade_((sx), LOCK_FILE, LOCK_LINE) From owner-svn-src-all@freebsd.org Sun Feb 5 05:36:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7EFACD0D48; Sun, 5 Feb 2017 05:36:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 823E51B0F; Sun, 5 Feb 2017 05:36:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v155apxw091922; Sun, 5 Feb 2017 05:36:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v155aplo091921; Sun, 5 Feb 2017 05:36:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702050536.v155aplo091921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 5 Feb 2017 05:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313273 - head/sbin/kldload 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 05:36:52 -0000 Author: ngie Date: Sun Feb 5 05:36:51 2017 New Revision: 313273 URL: https://svnweb.freebsd.org/changeset/base/313273 Log: style(9) cleanup - Delete trailing whitespace - Fix alignment/variable sorting - Delete single-line enclosing braces MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Sun Feb 5 05:20:29 2017 (r313272) +++ head/sbin/kldload/kldload.c Sun Feb 5 05:36:51 2017 (r313273) @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #define PATHCTL "kern.module_path" -static int path_check(const char *, int); -static void usage(void); - /* * Check to see if the requested module is specified as a filename with no * path. If so and if a file by the same name exists in the module path, @@ -52,43 +49,37 @@ static void usage(void); static int path_check(const char *kldname, int quiet) { - int mib[5], found; - size_t miblen, pathlen; - char kldpath[MAXPATHLEN]; char *path, *tmppath, *element; struct stat sb; + int mib[5]; + char kldpath[MAXPATHLEN]; + size_t miblen, pathlen; dev_t dev; ino_t ino; + int found; - if (strchr(kldname, '/') != NULL) { + if (strchr(kldname, '/') != NULL) return (0); - } - if (strstr(kldname, ".ko") == NULL) { + if (strstr(kldname, ".ko") == NULL) return (0); - } - if (stat(kldname, &sb) != 0) { + if (stat(kldname, &sb) != 0) return (0); - } found = 0; dev = sb.st_dev; ino = sb.st_ino; miblen = nitems(mib); - if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) { + if (sysctlnametomib(PATHCTL, mib, &miblen) != 0) err(1, "sysctlnametomib(%s)", PATHCTL); - } - if (sysctl(mib, miblen, NULL, &pathlen, NULL, 0) == -1) { + if (sysctl(mib, miblen, NULL, &pathlen, NULL, 0) == -1) err(1, "getting path: sysctl(%s) - size only", PATHCTL); - } path = malloc(pathlen + 1); - if (path == NULL) { + if (path == NULL) err(1, "allocating %lu bytes for the path", (unsigned long)pathlen + 1); - } - if (sysctl(mib, miblen, path, &pathlen, NULL, 0) == -1) { + if (sysctl(mib, miblen, path, &pathlen, NULL, 0) == -1) err(1, "getting path: sysctl(%s)", PATHCTL); - } tmppath = path; while ((element = strsep(&tmppath, ";")) != NULL) { @@ -97,39 +88,36 @@ path_check(const char *kldname, int quie strlcat(kldpath, "/", MAXPATHLEN); } strlcat(kldpath, kldname, MAXPATHLEN); - - if (stat(kldpath, &sb) == -1) { + + if (stat(kldpath, &sb) == -1) continue; - } found = 1; if (sb.st_dev != dev || sb.st_ino != ino) { - if (!quiet) { + if (!quiet) warnx("%s will be loaded from %s, not the " "current directory", kldname, element); - } break; - } else if (sb.st_dev == dev && sb.st_ino == ino) { + } else if (sb.st_dev == dev && sb.st_ino == ino) break; - } } free(path); - + if (!found) { - if (!quiet) { + if (!quiet) warnx("%s is not in the module path", kldname); - } return (-1); } - + return (0); } static void usage(void) { + fprintf(stderr, "usage: kldload [-nqv] file ...\n"); exit(1); } @@ -138,17 +126,17 @@ int main(int argc, char** argv) { int c; + int check_loaded; int errors; int fileid; - int verbose; int quiet; - int check_loaded; + int verbose; errors = 0; verbose = 0; quiet = 0; check_loaded = 0; - + while ((c = getopt(argc, argv, "nqv")) != -1) { switch (c) { case 'q': @@ -204,9 +192,8 @@ main(int argc, char** argv) printf("Loaded %s, id=%d\n", argv[0], fileid); } - } else { + } else errors++; - } argv++; } From owner-svn-src-all@freebsd.org Sun Feb 5 06:51:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD4D4CD1D97; Sun, 5 Feb 2017 06:51:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA8A1DBE; Sun, 5 Feb 2017 06:51:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v156pjeU023472; Sun, 5 Feb 2017 06:51:45 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v156pjuQ023471; Sun, 5 Feb 2017 06:51:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050651.v156pjuQ023471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 06:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313274 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 06:51:46 -0000 Author: mjg Date: Sun Feb 5 06:51:45 2017 New Revision: 313274 URL: https://svnweb.freebsd.org/changeset/base/313274 Log: sx: add witness support missed in r313272 Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 05:36:51 2017 (r313273) +++ head/sys/kern/kern_sx.c Sun Feb 5 06:51:45 2017 (r313274) @@ -833,6 +833,12 @@ _sx_slock(struct sx *sx, int opts, const #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, + ("sx_slock() of destroyed sx @ %s:%d", file, line)); + WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&sx->lock_object); #endif @@ -1000,9 +1006,13 @@ _sx_slock(struct sx *sx, int opts, const LOCKSTAT_READER, (state & SX_LOCK_SHARED) == 0, (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); #endif - if (error == 0) + if (error == 0) { LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, contested, waittime, file, line, LOCKSTAT_READER); + LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); + WITNESS_LOCK(&sx->lock_object, 0, file, line); + TD_LOCKS_INC(curthread); + } GIANT_RESTORE(); return (error); } @@ -1016,6 +1026,11 @@ _sx_sunlock(struct sx *sx, const char *f if (SCHEDULER_STOPPED()) return; + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, + ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); + _sx_assert(sx, SA_SLOCKED, file, line); + WITNESS_UNLOCK(&sx->lock_object, 0, file, line); + LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); x = SX_READ_VALUE(sx); for (;;) { @@ -1091,6 +1106,7 @@ _sx_sunlock(struct sx *sx, const char *f kick_proc0(); break; } + TD_LOCKS_DEC(curthread); } #ifdef INVARIANT_SUPPORT From owner-svn-src-all@freebsd.org Sun Feb 5 08:04:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F04BCD1395; Sun, 5 Feb 2017 08:04:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66F138BF; Sun, 5 Feb 2017 08:04:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1584C9A052483; Sun, 5 Feb 2017 08:04:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1584Cim052478; Sun, 5 Feb 2017 08:04:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050804.v1584Cim052478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 08:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313275 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 08:04:13 -0000 Author: mjg Date: Sun Feb 5 08:04:11 2017 New Revision: 313275 URL: https://svnweb.freebsd.org/changeset/base/313275 Log: mtx: move lockstat handling out of inline primitives Lockstat requires checking if it is enabled and if so, calling a 6 argument function. Further, determining whether to call it on unlock requires pre-reading the lock value. This is problematic in at least 3 ways: - more branches in the hot path than necessary - additional cacheline ping pong under contention - bigger code Instead, check first if lockstat handling is necessary and if so, just fall back to regular locking routines. For this purpose a new macro is introduced (LOCKSTAT_PROFILE_ENABLED). LOCK_PROFILING uninlines all primitives. Fold in the current inline lock variant into the _mtx_lock_flags to retain the support. With this change the inline variants are not used when LOCK_PROFILING is defined and thus can ignore its existence. This results in: text data bss dec hex filename 22259667 1303208 4994976 28557851 1b3c21b kernel.orig 21797315 1303208 4994976 28095499 1acb40b kernel.patched i.e. about 3% reduction in text size. A remaining action is to remove spurious arguments for internal kernel consumers. Modified: head/sys/kern/kern_mutex.c head/sys/sys/lockstat.h head/sys/sys/mutex.h head/sys/sys/sdt.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/kern/kern_mutex.c Sun Feb 5 08:04:11 2017 (r313275) @@ -265,6 +265,7 @@ void __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line) { struct mtx *m; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; @@ -282,7 +283,13 @@ __mtx_lock_flags(volatile uintptr_t *c, WITNESS_CHECKORDER(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - __mtx_lock(m, curthread, opts, file, line); + tid = (uintptr_t)curthread; + v = MTX_UNOWNED; + if (!_mtx_obtain_lock_fetch(m, &v, tid)) + _mtx_lock_sleep(m, v, tid, opts, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, + m, 0, 0, file, line); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); WITNESS_LOCK(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_EXCLUSIVE, @@ -310,7 +317,7 @@ __mtx_unlock_flags(volatile uintptr_t *c line); mtx_assert(m, MA_OWNED); - __mtx_unlock(m, curthread, opts, file, line); + __mtx_unlock_sleep(c, opts, file, line); TD_LOCKS_DEC(curthread); } @@ -887,20 +894,17 @@ __mtx_unlock_sleep(volatile uintptr_t *c { struct mtx *m; struct turnstile *ts; - uintptr_t v; if (SCHEDULER_STOPPED()) return; m = mtxlock2mtx(c); - v = MTX_READ_VALUE(m); - if (v == (uintptr_t)curthread) { + if (!mtx_recursed(m)) { + LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, m); if (_mtx_release_lock(m, (uintptr_t)curthread)) return; - } - - if (mtx_recursed(m)) { + } else { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/sys/lockstat.h Sun Feb 5 08:04:11 2017 (r313275) @@ -107,6 +107,10 @@ extern int lockstat_enabled; LOCKSTAT_RECORD1(probe, lp, a); \ } while (0) +#ifndef LOCK_PROFILING +#define LOCKSTAT_PROFILE_ENABLED(probe) SDT_PROBE_ENABLED(lockstat, , , probe) +#endif + struct lock_object; uint64_t lockstat_nsecs(struct lock_object *); @@ -130,6 +134,10 @@ uint64_t lockstat_nsecs(struct lock_obje #define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) \ LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) +#ifndef LOCK_PROFILING +#define LOCKSTAT_PROFILE_ENABLED(probe) 0 +#endif + #endif /* !KDTRACE_HOOKS */ #endif /* _KERNEL */ #endif /* _SYS_LOCKSTAT_H */ Modified: head/sys/sys/mutex.h ============================================================================== --- head/sys/sys/mutex.h Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/sys/mutex.h Sun Feb 5 08:04:11 2017 (r313275) @@ -171,10 +171,8 @@ void thread_lock_flags_(struct thread *, #define _mtx_obtain_lock(mp, tid) \ atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) -#define _mtx_obtain_lock_fetch(mp, vp, tid) ({ \ - *vp = MTX_UNOWNED; \ - atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid)); \ -}) +#define _mtx_obtain_lock_fetch(mp, vp, tid) \ + atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid)) /* Try to release mtx_lock if it is unrecursed and uncontested. */ #define _mtx_release_lock(mp, tid) \ @@ -193,13 +191,11 @@ void thread_lock_flags_(struct thread *, /* Lock a normal mutex. */ #define __mtx_lock(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ - uintptr_t _v; \ + uintptr_t _v = MTX_UNOWNED; \ \ - if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(adaptive__acquire) ||\ + !_mtx_obtain_lock_fetch((mp), &_v, _tid))) \ _mtx_lock_sleep((mp), _v, _tid, (opts), (file), (line));\ - else \ - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, \ - mp, 0, 0, file, line); \ } while (0) /* @@ -211,7 +207,7 @@ void thread_lock_flags_(struct thread *, #ifdef SMP #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ - uintptr_t _v; \ + uintptr_t _v = MTX_UNOWNED; \ \ spinlock_enter(); \ if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ @@ -270,9 +266,8 @@ void thread_lock_flags_(struct thread *, #define __mtx_unlock(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ \ - if ((mp)->mtx_recurse == 0) \ - LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, mp); \ - if (!_mtx_release_lock((mp), _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(adaptive__release) ||\ + !_mtx_release_lock((mp), _tid))) \ _mtx_unlock_sleep((mp), (opts), (file), (line)); \ } while (0) Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Sun Feb 5 06:51:45 2017 (r313274) +++ head/sys/sys/sdt.h Sun Feb 5 08:04:11 2017 (r313275) @@ -160,6 +160,9 @@ SET_DECLARE(sdt_argtypes_set, struct sdt #define SDT_PROBE_DECLARE(prov, mod, func, name) \ extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] +#define SDT_PROBE_ENABLED(prov, mod, func, name) \ + __predict_false((sdt_##prov##_##mod##_##func##_##name->id)) + #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ From owner-svn-src-all@freebsd.org Sun Feb 5 08:24:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8CD0CD196C; Sun, 5 Feb 2017 08:24:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98A891395; Sun, 5 Feb 2017 08:24:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v158ObZv061300; Sun, 5 Feb 2017 08:24:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v158Obwa061299; Sun, 5 Feb 2017 08:24:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702050824.v158Obwa061299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 5 Feb 2017 08:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313276 - head/etc 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 08:24:38 -0000 Author: ngie Date: Sun Feb 5 08:24:37 2017 New Revision: 313276 URL: https://svnweb.freebsd.org/changeset/base/313276 Log: Use kldload -n when loading if_deqna This fixes if_deqna from being loaded by accident twice if it's already loaded in the kernel. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Sun Feb 5 08:04:11 2017 (r313275) +++ head/etc/devd.conf Sun Feb 5 08:24:37 2017 (r313276) @@ -272,7 +272,7 @@ nomatch 10 { match "bus" "pccard[0-9]+"; match "manufacturer" "0x1234"; match "product" "0x2323"; - action "kldload if_deqna"; + action "kldload -n if_deqna"; }; attach 10 { device-name "deqna[0-9]+"; From owner-svn-src-all@freebsd.org Sun Feb 5 08:51:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C109CD111E; Sun, 5 Feb 2017 08:51:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D901F1ED0; Sun, 5 Feb 2017 08:51:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v158pfFT070354; Sun, 5 Feb 2017 08:51:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v158pfqG070353; Sun, 5 Feb 2017 08:51:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702050851.v158pfqG070353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 5 Feb 2017 08:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313277 - head/usr.bin/sed 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 08:51:43 -0000 Author: delphij Date: Sun Feb 5 08:51:41 2017 New Revision: 313277 URL: https://svnweb.freebsd.org/changeset/base/313277 Log: Restore r312404: Use S_ISREG instead of manual & (also it's better to compare the result from & and the pattern instead of just assuming it's one bit value). Pointed out by Tianjie Mao . MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4827 Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Sun Feb 5 08:24:37 2017 (r313276) +++ head/usr.bin/sed/main.c Sun Feb 5 08:51:41 2017 (r313277) @@ -391,7 +391,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag if (inplace != NULL) { if (lstat(fname, &sb) != 0) err(1, "%s", fname); - if (!(sb.st_mode & S_IFREG)) + if (!S_ISREG(sb.st_mode)) errx(1, "%s: %s %s", fname, "in-place editing only", "works for regular files"); From owner-svn-src-all@freebsd.org Sun Feb 5 09:35:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FD22CD027D; Sun, 5 Feb 2017 09:35:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 350C91642; Sun, 5 Feb 2017 09:35:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v159ZHoG089927; Sun, 5 Feb 2017 09:35:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v159ZHdR089926; Sun, 5 Feb 2017 09:35:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050935.v159ZHdR089926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 09:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313278 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 09:35:18 -0000 Author: mjg Date: Sun Feb 5 09:35:17 2017 New Revision: 313278 URL: https://svnweb.freebsd.org/changeset/base/313278 Log: mtx: fix up _mtx_obtain_lock_fetch usage in thread lock Since _mtx_obtain_lock_fetch no longer sets the argument to MTX_UNOWNED, callers have to do it on their own. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 08:51:41 2017 (r313277) +++ head/sys/kern/kern_mutex.c Sun Feb 5 09:35:17 2017 (r313278) @@ -782,6 +782,7 @@ thread_lock_flags_(struct thread *td, in #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif + v = MTX_UNOWNED; for (;;) { retry: spinlock_enter(); From owner-svn-src-all@freebsd.org Sun Feb 5 09:53:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1D20CD0690; Sun, 5 Feb 2017 09:53:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A18FC1DD8; Sun, 5 Feb 2017 09:53:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v159rDwi098007; Sun, 5 Feb 2017 09:53:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v159rDt8098006; Sun, 5 Feb 2017 09:53:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050953.v159rDt8098006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 09:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313279 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 09:53:14 -0000 Author: mjg Date: Sun Feb 5 09:53:13 2017 New Revision: 313279 URL: https://svnweb.freebsd.org/changeset/base/313279 Log: mtx: fixup r313278, the assignemnt was supposed to go inside the loop Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Feb 5 09:35:17 2017 (r313278) +++ head/sys/kern/kern_mutex.c Sun Feb 5 09:53:13 2017 (r313279) @@ -782,9 +782,9 @@ thread_lock_flags_(struct thread *td, in #ifdef KDTRACE_HOOKS spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif - v = MTX_UNOWNED; for (;;) { retry: + v = MTX_UNOWNED; spinlock_enter(); m = td->td_lock; KASSERT(m->mtx_lock != MTX_DESTROYED, From owner-svn-src-all@freebsd.org Sun Feb 5 09:54:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AFBECD06FE; Sun, 5 Feb 2017 09:54:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9D6F1F23; Sun, 5 Feb 2017 09:54:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v159sH9H098098; Sun, 5 Feb 2017 09:54:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v159sG3d098096; Sun, 5 Feb 2017 09:54:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702050954.v159sG3d098096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 09:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313280 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 09:54:18 -0000 Author: mjg Date: Sun Feb 5 09:54:16 2017 New Revision: 313280 URL: https://svnweb.freebsd.org/changeset/base/313280 Log: sx: move lockstat handling out of inline primitives See r313275 for details. Modified: head/sys/kern/kern_sx.c head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 5 09:53:13 2017 (r313279) +++ head/sys/kern/kern_sx.c Sun Feb 5 09:54:16 2017 (r313280) @@ -310,6 +310,7 @@ sx_try_slock_(struct sx *sx, const char int _sx_xlock(struct sx *sx, int opts, const char *file, int line) { + uintptr_t tid, x; int error = 0; if (SCHEDULER_STOPPED()) @@ -321,7 +322,13 @@ _sx_xlock(struct sx *sx, int opts, const ("sx_xlock() of destroyed sx @ %s:%d", file, line)); WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - error = __sx_xlock(sx, curthread, opts, file, line); + tid = (uintptr_t)curthread; + x = SX_LOCK_UNLOCKED; + if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) + error = _sx_xlock_hard(sx, x, tid, opts, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, + 0, 0, file, line, LOCKSTAT_WRITER); if (!error) { LOCK_LOG_LOCK("XLOCK", &sx->lock_object, 0, sx->sx_recurse, file, line); @@ -379,7 +386,7 @@ _sx_xunlock(struct sx *sx, const char *f WITNESS_UNLOCK(&sx->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("XUNLOCK", &sx->lock_object, 0, sx->sx_recurse, file, line); - __sx_xunlock(sx, curthread, file, line); + _sx_xunlock_hard(sx, (uintptr_t)curthread, file, line); TD_LOCKS_DEC(curthread); } @@ -757,8 +764,13 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ MPASS(!(sx->sx_lock & SX_LOCK_SHARED)); - /* If the lock is recursed, then unrecurse one level. */ - if (sx_xlocked(sx) && sx_recursed(sx)) { + if (!sx_recursed(sx)) { + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, + LOCKSTAT_WRITER); + if (atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + return; + } else { + /* The lock is recursed, unrecurse one level. */ if ((--sx->sx_recurse) == 0) atomic_clear_ptr(&sx->sx_lock, SX_LOCK_RECURSED); if (LOCK_LOG_TEST(&sx->lock_object, 0)) Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Sun Feb 5 09:53:13 2017 (r313279) +++ head/sys/sys/sx.h Sun Feb 5 09:54:16 2017 (r313280) @@ -145,21 +145,19 @@ struct sx_args { * deferred to 'tougher' functions. */ +#if (LOCK_DEBUG == 0) && !defined(SX_NOINLINE) /* Acquire an exclusive lock. */ static __inline int __sx_xlock(struct sx *sx, struct thread *td, int opts, const char *file, int line) { uintptr_t tid = (uintptr_t)td; - uintptr_t v; + uintptr_t v = SX_LOCK_UNLOCKED; int error = 0; - v = SX_LOCK_UNLOCKED; - if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid)) + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__acquire) || + !atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid))) error = _sx_xlock_hard(sx, v, tid, opts, file, line); - else - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, - 0, 0, file, line, LOCKSTAT_WRITER); return (error); } @@ -170,12 +168,11 @@ __sx_xunlock(struct sx *sx, struct threa { uintptr_t tid = (uintptr_t)td; - if (sx->sx_recurse == 0) - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, - LOCKSTAT_WRITER); - if (!atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__release) || + !atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED))) _sx_xunlock_hard(sx, tid, file, line); } +#endif /* * Public interface for lock operations. From owner-svn-src-all@freebsd.org Sun Feb 5 10:00:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D28E4CD0903; Sun, 5 Feb 2017 10:00:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94B93308; Sun, 5 Feb 2017 10:00:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1caJcB-000JsL-0y; Sun, 05 Feb 2017 13:00:11 +0300 Date: Sun, 5 Feb 2017 13:00:11 +0300 From: Slawa Olhovchenkov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313275 - in head/sys: kern sys Message-ID: <20170205100010.GB5366@zxy.spb.ru> References: <201702050804.v1584Cim052478@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702050804.v1584Cim052478@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 10:00:14 -0000 On Sun, Feb 05, 2017 at 08:04:12AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sun Feb 5 08:04:11 2017 > New Revision: 313275 > URL: https://svnweb.freebsd.org/changeset/base/313275 > > Log: > mtx: move lockstat handling out of inline primitives > > Lockstat requires checking if it is enabled and if so, calling a 6 argument > function. Further, determining whether to call it on unlock requires > pre-reading the lock value. > > This is problematic in at least 3 ways: > - more branches in the hot path than necessary > - additional cacheline ping pong under contention > - bigger code > > Instead, check first if lockstat handling is necessary and if so, just fall > back to regular locking routines. For this purpose a new macro is introduced > (LOCKSTAT_PROFILE_ENABLED). > > LOCK_PROFILING uninlines all primitives. Fold in the current inline lock > variant into the _mtx_lock_flags to retain the support. With this change > the inline variants are not used when LOCK_PROFILING is defined and thus > can ignore its existence. > > This results in: > text data bss dec hex filename > 22259667 1303208 4994976 28557851 1b3c21b kernel.orig > 21797315 1303208 4994976 28095499 1acb40b kernel.patched > > i.e. about 3% reduction in text size. > > A remaining action is to remove spurious arguments for internal kernel > consumers. Do you planed MFC all of this? From owner-svn-src-all@freebsd.org Sun Feb 5 10:01:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11270CD0A74; Sun, 5 Feb 2017 10:01:35 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BB718DE; Sun, 5 Feb 2017 10:01:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lf0-x243.google.com with SMTP id x1so1532409lff.0; Sun, 05 Feb 2017 02:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uk9Emlh4INh8+0TzplG1GM06ifLcD0JXMeH55OBB4O4=; b=Fj0W+08g9g7gIEKbdCPit+ooeE16ViIBmaUcPDchQdkm0csD4Jlfq4SMkt+z3yBJjw t1SXISl14EwWRusAb39mQ9X1hENNCvPqGCupNf7yviWvMMp/yc1TyjyzsQ9ioX7LL00S xornnZ69Nak9WACXVKPisHyn8ayEjhb1S8vR1FmQnKqP0QlvP9h+q1fBTg7SsLhtoBya qkea+r8PEt8rvCoPCKMAf/zgI1tcmATVt43kRkF3ZSFniZbGODB/C/vGz2LpiT8ZU4ZQ /YG4aXQzVZ76uUmLdBTC0H+/Barn0hrMv91LuMbpt7yxMx3ubq0aAdVzcdJaMdk6vOWG VMAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uk9Emlh4INh8+0TzplG1GM06ifLcD0JXMeH55OBB4O4=; b=TnMKM3mw0GL2jA3eS+HZuvIG19pQFoHOrE2QfHX6h280BWtvn+ICKSTGm54jLZUkFv Yw0fmdlLZ7K+pKQ7Q0zOXOl1cenvAKr30P5pXf5T8XizKcPD6MQELEEvFedHSutkHSNp haht+lBE8vFbJeK4vsZO79f+/x2wPZkH2hzmqpl/m3ZKelhd2615V++dh1/Osv0I7B2y 6iQZ9CJioLggdA6cV/CKNvMCDq6YlGUfhPwGEV2HYe3xpLoWe7DEF6LmQ51v7bmT3clC LwDAZMzmEp6ym5QcD3VGT7/wR65GvLdBGYFxHZdwAzioRiLUQ08GDPipF87UcFgAp44w 1s1g== X-Gm-Message-State: AIkVDXJ/AQfz9MTGRnX9abxhxa3oUOvDuoYPUei8zdS761hGdrB0HTvNMzNSYC6scNMx8A== X-Received: by 10.25.234.216 with SMTP id y85mr1667741lfi.35.1486288892130; Sun, 05 Feb 2017 02:01:32 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id 14sm9485004lju.16.2017.02.05.02.01.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 05 Feb 2017 02:01:31 -0800 (PST) Date: Sun, 5 Feb 2017 11:01:28 +0100 From: Mateusz Guzik To: Slawa Olhovchenkov Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313275 - in head/sys: kern sys Message-ID: <20170205100127.GC4375@dft-labs.eu> References: <201702050804.v1584Cim052478@repo.freebsd.org> <20170205100010.GB5366@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170205100010.GB5366@zxy.spb.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 10:01:35 -0000 On Sun, Feb 05, 2017 at 01:00:11PM +0300, Slawa Olhovchenkov wrote: > On Sun, Feb 05, 2017 at 08:04:12AM +0000, Mateusz Guzik wrote: > > > Author: mjg > > Date: Sun Feb 5 08:04:11 2017 > > New Revision: 313275 > > URL: https://svnweb.freebsd.org/changeset/base/313275 > > > > Log: > > mtx: move lockstat handling out of inline primitives > > > > Lockstat requires checking if it is enabled and if so, calling a 6 argument > > function. Further, determining whether to call it on unlock requires > > pre-reading the lock value. > > > > This is problematic in at least 3 ways: > > - more branches in the hot path than necessary > > - additional cacheline ping pong under contention > > - bigger code > > > > Instead, check first if lockstat handling is necessary and if so, just fall > > back to regular locking routines. For this purpose a new macro is introduced > > (LOCKSTAT_PROFILE_ENABLED). > > > > LOCK_PROFILING uninlines all primitives. Fold in the current inline lock > > variant into the _mtx_lock_flags to retain the support. With this change > > the inline variants are not used when LOCK_PROFILING is defined and thus > > can ignore its existence. > > > > This results in: > > text data bss dec hex filename > > 22259667 1303208 4994976 28557851 1b3c21b kernel.orig > > 21797315 1303208 4994976 28095499 1acb40b kernel.patched > > > > i.e. about 3% reduction in text size. > > > > A remaining action is to remove spurious arguments for internal kernel > > consumers. > > Do you planed MFC all of this? Yes, around march. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sun Feb 5 10:03:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6D63CD0C80; Sun, 5 Feb 2017 10:03:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 787FFAD6; Sun, 5 Feb 2017 10:03:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1caJf2-000Jy0-B1; Sun, 05 Feb 2017 13:03:08 +0300 Date: Sun, 5 Feb 2017 13:03:08 +0300 From: Slawa Olhovchenkov To: Mateusz Guzik Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313275 - in head/sys: kern sys Message-ID: <20170205100308.GF6599@zxy.spb.ru> References: <201702050804.v1584Cim052478@repo.freebsd.org> <20170205100010.GB5366@zxy.spb.ru> <20170205100127.GC4375@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170205100127.GC4375@dft-labs.eu> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 10:03:10 -0000 On Sun, Feb 05, 2017 at 11:01:28AM +0100, Mateusz Guzik wrote: > On Sun, Feb 05, 2017 at 01:00:11PM +0300, Slawa Olhovchenkov wrote: > > On Sun, Feb 05, 2017 at 08:04:12AM +0000, Mateusz Guzik wrote: > > > > > Author: mjg > > > Date: Sun Feb 5 08:04:11 2017 > > > New Revision: 313275 > > > URL: https://svnweb.freebsd.org/changeset/base/313275 > > > > > > Log: > > > mtx: move lockstat handling out of inline primitives > > > > > > Lockstat requires checking if it is enabled and if so, calling a 6 argument > > > function. Further, determining whether to call it on unlock requires > > > pre-reading the lock value. > > > > > > This is problematic in at least 3 ways: > > > - more branches in the hot path than necessary > > > - additional cacheline ping pong under contention > > > - bigger code > > > > > > Instead, check first if lockstat handling is necessary and if so, just fall > > > back to regular locking routines. For this purpose a new macro is introduced > > > (LOCKSTAT_PROFILE_ENABLED). > > > > > > LOCK_PROFILING uninlines all primitives. Fold in the current inline lock > > > variant into the _mtx_lock_flags to retain the support. With this change > > > the inline variants are not used when LOCK_PROFILING is defined and thus > > > can ignore its existence. > > > > > > This results in: > > > text data bss dec hex filename > > > 22259667 1303208 4994976 28557851 1b3c21b kernel.orig > > > 21797315 1303208 4994976 28095499 1acb40b kernel.patched > > > > > > i.e. about 3% reduction in text size. > > > > > > A remaining action is to remove spurious arguments for internal kernel > > > consumers. > > > > Do you planed MFC all of this? > > Yes, around march. Thanks! From owner-svn-src-all@freebsd.org Sun Feb 5 12:05:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAC68CD0E01; Sun, 5 Feb 2017 12:05:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5126D812; Sun, 5 Feb 2017 12:05:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id c85so15502054wmi.1; Sun, 05 Feb 2017 04:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UsUQEkBHiIeHOZ/qmd68oo3xAWq3u0hxKXUPLMuLgOA=; b=gD4QPKRGNl/ZOi+qWDOd92LmKvTKeiqPNJvWzctaNF3S/RiE8fcsz+zfU52HfeG4eN rVW2QCyg3tVm0cgPkQ3cv0Skujz1vestD+KzhBD0YRZ/E7Jf9PbW0bWC0QROGujl3XQv 6Ix5QW2m46f8MC0uNDOftYJ0qgJG9tHH/l9PORBZD+KBTNJXz6vpVh2ynVE7TmCD7VBP +gO8SPqLE2vYRA4xeU3CAsss4T0z/rFnVyBgFNh/J5nt/oZ4aI6t0yaA44+X7ScJ1S5O WkR4pvFVC80LL+ah16SB7tl9BJZz/o5mMhGxq/GzGOa1F28MIjuWsWAIs72Fj59SKe6T MpIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UsUQEkBHiIeHOZ/qmd68oo3xAWq3u0hxKXUPLMuLgOA=; b=ELFcm4uGRF5ZW8vU3L1FESsk8up1TqRQEbHfSAT8NK547d5k9HDHkkrj524EFfgCko RexP0XH3QQPz5Mjogx2/0vTTJgtspcRcYp44aZ0KNW11iA/YTBv7TzjQECptXK4/J2hw nXazmj7gYqh/lxiRjTZWnceGdQHfwE08demFdeZt1oM5/ZiK7CZIvd5+CNJZEdpEjWI2 bq+spQe9v+tivNKyzmAzeZZoAZxkdBItuxi27XXZ3w7ZzXvQ6RsU3xA0meK+WnebTv9B HYIp1vu+9bz51emlFDA9qAo6I0fGPmtKWGZrWDUUSIC71EsyQwFDLiF1QOFBjMM3cIgj wZQQ== X-Gm-Message-State: AMke39lMn31j9qcwlz7HKzMddsX6FeWEQLVexeQh8Db3aOU5f7IKREANXfAwp7qMPx02pA== X-Received: by 10.28.195.70 with SMTP id t67mr5021601wmf.98.1486296340031; Sun, 05 Feb 2017 04:05:40 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id o42sm54666151wrb.18.2017.02.05.04.05.38 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 05 Feb 2017 04:05:39 -0800 (PST) Date: Sun, 5 Feb 2017 13:05:36 +0100 From: Mateusz Guzik To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313272 - in head/sys: kern sys Message-ID: <20170205120536.GA16310@dft-labs.eu> References: <201702050520.v155KTW8080845@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702050520.v155KTW8080845@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 12:05:42 -0000 On Sun, Feb 05, 2017 at 05:20:29AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sun Feb 5 05:20:29 2017 > New Revision: 313272 > URL: https://svnweb.freebsd.org/changeset/base/313272 > > Log: > sx: uninline slock/sunlock > > Shared locking routines explicitly read the value and test it. If the > change attempt fails, they fall back to a regular function which would > retry in a loop. > > The problem is that with many concurrent readers the risk of failure is pretty > high and even the value returned by fcmpset is very likely going to be stale > by the time the loop in the fallback routine is reached. > > Uninline said primitives. It gives a throughput increase when doing concurrent > slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s. > > Interestingly, rwlock primitives are already not inlined. > Note that calling to "hard" primitives each is somewhat expensive. In order to remedy part of the cost I intend to introduce uninlined variants which only know how to spin. I have a WIP patch for rwlocks and after I flesh it out I'll adapt it for sx. > Modified: > head/sys/kern/kern_sx.c > head/sys/sys/sx.h > > Modified: head/sys/kern/kern_sx.c > ============================================================================== > --- head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) > +++ head/sys/kern/kern_sx.c Sun Feb 5 05:20:29 2017 (r313272) > @@ -276,29 +276,6 @@ sx_destroy(struct sx *sx) > } > > int > -_sx_slock(struct sx *sx, int opts, const char *file, int line) > -{ > - int error = 0; > - > - if (SCHEDULER_STOPPED()) > - return (0); > - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), > - ("sx_slock() by idle thread %p on sx %s @ %s:%d", > - curthread, sx->lock_object.lo_name, file, line)); > - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, > - ("sx_slock() of destroyed sx @ %s:%d", file, line)); > - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); > - error = __sx_slock(sx, opts, file, line); > - if (!error) { > - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); > - WITNESS_LOCK(&sx->lock_object, 0, file, line); > - TD_LOCKS_INC(curthread); > - } > - > - return (error); > -} > - > -int > sx_try_slock_(struct sx *sx, const char *file, int line) > { > uintptr_t x; > @@ -391,21 +368,6 @@ sx_try_xlock_(struct sx *sx, const char > } > > void > -_sx_sunlock(struct sx *sx, const char *file, int line) > -{ > - > - if (SCHEDULER_STOPPED()) > - return; > - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, > - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); > - _sx_assert(sx, SA_SLOCKED, file, line); > - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); > - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); > - __sx_sunlock(sx, file, line); > - TD_LOCKS_DEC(curthread); > -} > - > -void > _sx_xunlock(struct sx *sx, const char *file, int line) > { > > @@ -840,14 +802,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ > kick_proc0(); > } > > -/* > - * This function represents the so-called 'hard case' for sx_slock > - * operation. All 'easy case' failures are redirected to this. Note > - * that ideally this would be a static function, but it needs to be > - * accessible from at least sx.h. > - */ > int > -_sx_slock_hard(struct sx *sx, int opts, const char *file, int line) > +_sx_slock(struct sx *sx, int opts, const char *file, int line) > { > GIANT_DECLARE; > #ifdef ADAPTIVE_SX > @@ -1051,14 +1007,8 @@ _sx_slock_hard(struct sx *sx, int opts, > return (error); > } > > -/* > - * This function represents the so-called 'hard case' for sx_sunlock > - * operation. All 'easy case' failures are redirected to this. Note > - * that ideally this would be a static function, but it needs to be > - * accessible from at least sx.h. > - */ > void > -_sx_sunlock_hard(struct sx *sx, const char *file, int line) > +_sx_sunlock(struct sx *sx, const char *file, int line) > { > uintptr_t x; > int wakeup_swapper; > @@ -1066,6 +1016,7 @@ _sx_sunlock_hard(struct sx *sx, const ch > if (SCHEDULER_STOPPED()) > return; > > + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); > x = SX_READ_VALUE(sx); > for (;;) { > /* > > Modified: head/sys/sys/sx.h > ============================================================================== > --- head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) > +++ head/sys/sys/sx.h Sun Feb 5 05:20:29 2017 (r313272) > @@ -111,10 +111,8 @@ void _sx_sunlock(struct sx *sx, const ch > void _sx_xunlock(struct sx *sx, const char *file, int line); > int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, > const char *file, int line); > -int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); > void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int > line); > -void _sx_sunlock_hard(struct sx *sx, const char *file, int line); > #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) > void _sx_assert(const struct sx *sx, int what, const char *file, int line); > #endif > @@ -179,41 +177,6 @@ __sx_xunlock(struct sx *sx, struct threa > _sx_xunlock_hard(sx, tid, file, line); > } > > -/* Acquire a shared lock. */ > -static __inline int > -__sx_slock(struct sx *sx, int opts, const char *file, int line) > -{ > - uintptr_t x = sx->sx_lock; > - int error = 0; > - > - if (!(x & SX_LOCK_SHARED) || > - !atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) > - error = _sx_slock_hard(sx, opts, file, line); > - else > - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, > - 0, 0, file, line, LOCKSTAT_READER); > - > - return (error); > -} > - > -/* > - * Release a shared lock. We can just drop a single shared lock so > - * long as we aren't trying to drop the last shared lock when other > - * threads are waiting for an exclusive lock. This takes advantage of > - * the fact that an unlocked lock is encoded as a shared lock with a > - * count of 0. > - */ > -static __inline void > -__sx_sunlock(struct sx *sx, const char *file, int line) > -{ > - uintptr_t x = sx->sx_lock; > - > - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); > - if (x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS) || > - !atomic_cmpset_rel_ptr(&sx->sx_lock, x, x - SX_ONE_SHARER)) > - _sx_sunlock_hard(sx, file, line); > -} > - > /* > * Public interface for lock operations. > */ > @@ -227,12 +190,6 @@ __sx_sunlock(struct sx *sx, const char * > _sx_xlock((sx), SX_INTERRUPTIBLE, (file), (line)) > #define sx_xunlock_(sx, file, line) \ > _sx_xunlock((sx), (file), (line)) > -#define sx_slock_(sx, file, line) \ > - (void)_sx_slock((sx), 0, (file), (line)) > -#define sx_slock_sig_(sx, file, line) \ > - _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) > -#define sx_sunlock_(sx, file, line) \ > - _sx_sunlock((sx), (file), (line)) > #else > #define sx_xlock_(sx, file, line) \ > (void)__sx_xlock((sx), curthread, 0, (file), (line)) > @@ -240,13 +197,13 @@ __sx_sunlock(struct sx *sx, const char * > __sx_xlock((sx), curthread, SX_INTERRUPTIBLE, (file), (line)) > #define sx_xunlock_(sx, file, line) \ > __sx_xunlock((sx), curthread, (file), (line)) > +#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ > #define sx_slock_(sx, file, line) \ > - (void)__sx_slock((sx), 0, (file), (line)) > + (void)_sx_slock((sx), 0, (file), (line)) > #define sx_slock_sig_(sx, file, line) \ > - __sx_slock((sx), SX_INTERRUPTIBLE, (file), (line)) > + _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) > #define sx_sunlock_(sx, file, line) \ > - __sx_sunlock((sx), (file), (line)) > -#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ > + _sx_sunlock((sx), (file), (line)) > #define sx_try_slock(sx) sx_try_slock_((sx), LOCK_FILE, LOCK_LINE) > #define sx_try_xlock(sx) sx_try_xlock_((sx), LOCK_FILE, LOCK_LINE) > #define sx_try_upgrade(sx) sx_try_upgrade_((sx), LOCK_FILE, LOCK_LINE) > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sun Feb 5 13:11:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A76DECD128D; Sun, 5 Feb 2017 13:11:55 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sakura.ccs.furiru.org", Issuer "sakura.ccs.furiru.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4491EA82; Sun, 5 Feb 2017 13:11:53 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTPA id v15DBjPm028350; Sun, 5 Feb 2017 22:11:48 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sun, 05 Feb 2017 22:11:44 +0900 (JST) Message-Id: <20170205.221144.1616842004369178243.nyan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... From: TAKAHASHI Yoshihiro In-Reply-To: <201701280222.v0S2MFSR022477@repo.freebsd.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 13:11:55 -0000 I have decided to remove pc98 support on stable/11 as well after 2 weeks to reduce conflicts between head and stable/11. In article <201701280222.v0S2MFSR022477@repo.freebsd.org> Takahashi Yoshihiro writes: > Author: nyan > Date: Sat Jan 28 02:22:15 2017 > New Revision: 312910 > URL: https://svnweb.freebsd.org/changeset/base/312910 > > Log: > Remove pc98 support completely. > I thank all developers and contributors for pc98. > > Relnotes: yes > > Deleted: > head/etc/etc.pc98/ > head/libexec/Makefile.pc98 > head/release/pc98/ > head/sbin/Makefile.pc98 > head/sbin/fdisk_pc98/ > head/share/man/man4/man4.i386/ct.4 > head/share/man/man4/man4.i386/snc.4 > head/share/syscons/keymaps/jp.pc98.iso.kbd > head/share/syscons/keymaps/jp.pc98.kbd > head/share/vt/keymaps/jp.pc98.iso.kbd > head/share/vt/keymaps/jp.pc98.kbd > head/sys/boot/Makefile.pc98 > head/sys/boot/pc98/ > head/sys/conf/Makefile.pc98 > head/sys/conf/files.pc98 > head/sys/conf/options.pc98 > head/sys/dev/aic/aic_cbus.c > head/sys/dev/ata/ata-cbus.c > head/sys/dev/ct/ > head/sys/dev/ed/if_ed98.h > head/sys/dev/ed/if_ed_cbus.c > head/sys/dev/fdc/fdc_cbus.c > head/sys/dev/fe/if_fe_cbus.c > head/sys/dev/ic/i8251.h > head/sys/dev/ic/wd33c93reg.h > head/sys/dev/le/if_le_cbus.c > head/sys/dev/mse/mse_cbus.c > head/sys/dev/snc/ > head/sys/dev/uart/uart_cpu_pc98.c > head/sys/geom/geom_pc98.c > head/sys/geom/geom_pc98_enc.c > head/sys/geom/part/g_part_pc98.c > head/sys/modules/canbepm/ > head/sys/modules/canbus/ > head/sys/modules/ct/ > head/sys/modules/geom/geom_part/geom_part_pc98/ > head/sys/modules/geom/geom_pc98/ > head/sys/modules/pmc/ > head/sys/modules/snc/ > head/sys/pc98/ > head/sys/sys/disk/pc98.h > head/sys/sys/diskpc98.h > head/usr.bin/mkimg/pc98.c > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vmdk.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-1x1-512-pc98.vmdk.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.qcow.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.qcow2.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.raw.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu > head/usr.bin/mkimg/tests/img-63x255-512-pc98.vmdk.gz.uu > head/usr.sbin/boot98cfg/ > head/usr.sbin/bsdinstall/partedit/partedit_pc98.c > Modified: > head/Makefile > head/Makefile.inc1 > head/ObsoleteFiles.inc > head/etc/rc.d/syscons > head/lib/libsysdecode/Makefile > head/lib/libsysdecode/mkioctls > head/release/doc/README > head/release/doc/en_US.ISO8859-1/hardware/article.xml > head/release/doc/en_US.ISO8859-1/readme/article.xml > head/release/doc/share/examples/Makefile.relnotesng > head/release/doc/share/misc/dev.archlist.txt > head/release/doc/share/xml/release.ent > head/release/rc.local > head/rescue/rescue/Makefile > head/sbin/bsdlabel/bsdlabel.8 > head/sbin/bsdlabel/bsdlabel.c > head/sbin/geom/class/part/gpart.8 > head/share/examples/bootforth/frames.4th > head/share/man/man4/adv.4 > head/share/man/man4/ahc.4 > head/share/man/man4/apic.4 > head/share/man/man4/ed.4 > head/share/man/man4/esp.4 > head/share/man/man4/fxp.4 > head/share/man/man4/geom.4 > head/share/man/man4/man4.i386/Makefile > head/share/man/man4/man4.i386/aic.4 > head/share/man/man4/ncr.4 > head/share/man/man4/ncv.4 > head/share/man/man4/sym.4 > head/share/mk/bsd.stand.mk > head/share/mk/local.meta.sys.mk > head/share/syscons/keymaps/INDEX.keymaps > head/share/syscons/keymaps/Makefile > head/share/vt/keymaps/INDEX.keymaps > head/share/vt/keymaps/Makefile > head/sys/Makefile > head/sys/boot/common/Makefile.inc > head/sys/boot/common/isapnp.h > head/sys/boot/ficl/loader.c > head/sys/boot/forth/frames.4th > head/sys/cam/cam_xpt.c > head/sys/conf/NOTES > head/sys/conf/config.mk > head/sys/conf/files > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/conf/options > head/sys/crypto/aesni/aesni.h > head/sys/crypto/via/padlock.c > head/sys/crypto/via/padlock_hash.c > head/sys/dev/ata/ata-all.h > head/sys/dev/ep/if_ep_isa.c > head/sys/dev/exca/excareg.h > head/sys/dev/fb/fb.c > head/sys/dev/fb/splash_bmp.c > head/sys/dev/fdc/fdc.c > head/sys/dev/fdc/fdcvar.h > head/sys/dev/fe/if_fe.c > head/sys/dev/fe/if_fereg.h > head/sys/dev/kbd/kbd.c > head/sys/dev/le/am79900.c > head/sys/dev/mse/msevar.h > head/sys/dev/pccbb/pccbb_isa.c > head/sys/dev/pci/vga_pci.c > head/sys/dev/ppc/ppc.c > head/sys/dev/ppc/ppcreg.h > head/sys/dev/sio/sio_pccard.c > head/sys/dev/sio/sio_pci.c > head/sys/dev/sio/sio_puc.c > head/sys/dev/sio/siovar.h > head/sys/dev/sound/isa/mss.c > head/sys/dev/sound/isa/mss.h > head/sys/dev/sound/isa/sbc.c > head/sys/dev/syscons/daemon/daemon_saver.c > head/sys/dev/syscons/dragon/dragon_saver.c > head/sys/dev/syscons/fire/fire_saver.c > head/sys/dev/syscons/logo/logo_saver.c > head/sys/dev/syscons/plasma/plasma_saver.c > head/sys/dev/syscons/rain/rain_saver.c > head/sys/dev/syscons/scmouse.c > head/sys/dev/syscons/scvidctl.c > head/sys/dev/syscons/star/star_saver.c > head/sys/dev/syscons/syscons.c > head/sys/dev/syscons/syscons.h > head/sys/dev/syscons/warp/warp_saver.c > head/sys/dev/uart/uart.h > head/sys/dev/uart/uart_bus_isa.c > head/sys/geom/geom_bsd.c > head/sys/i386/bios/apm.c > head/sys/i386/bios/apm.h > head/sys/i386/i386/genassym.c > head/sys/i386/i386/initcpu.c > head/sys/i386/i386/locore.s > head/sys/i386/i386/machdep.c > head/sys/i386/i386/mp_machdep.c > head/sys/i386/i386/mpboot.s > head/sys/i386/i386/vm_machdep.c > head/sys/i386/isa/elink.h > head/sys/i386/isa/npx.c > head/sys/i386/pci/pci_pir.c > head/sys/isa/isareg.h > head/sys/isa/isavar.h > head/sys/isa/pnp.c > head/sys/isa/pnpreg.h > head/sys/modules/Makefile > head/sys/modules/Makefile.inc > head/sys/modules/aic/Makefile > head/sys/modules/apm/Makefile > head/sys/modules/ata/Makefile > head/sys/modules/drm2/Makefile > head/sys/modules/ed/Makefile > head/sys/modules/fdc/Makefile > head/sys/modules/fe/Makefile > head/sys/modules/geom/geom_part/Makefile > head/sys/modules/i2c/controllers/Makefile > head/sys/modules/le/Makefile > head/sys/modules/mse/Makefile > head/sys/modules/ppc/Makefile > head/sys/modules/sio/Makefile > head/sys/modules/sound/sound/Makefile > head/sys/sys/consio.h > head/sys/sys/copyright.h > head/sys/sys/fbio.h > head/sys/sys/fdcio.h > head/sys/x86/isa/atpic.c > head/sys/x86/isa/clock.c > head/sys/x86/isa/icu.h > head/sys/x86/isa/isa.c > head/sys/x86/x86/autoconf.c > head/sys/x86/x86/cpu_machdep.c > head/sys/x86/x86/intr_machdep.c > head/sys/x86/x86/mptable.c > head/sys/x86/x86/nexus.c > head/targets/pseudo/userland/Makefile.depend > head/targets/pseudo/userland/misc/Makefile.depend > head/tools/build/mk/OptionalObsoleteFiles.inc > head/tools/tools/kerninclude/kerninclude.sh > head/tools/tools/sysdoc/sysdoc.sh > head/tools/tools/vt/keymaps/KBDFILES.map > head/tools/tools/vt/keymaps/convert-keymap.pl > head/usr.bin/mkimg/Makefile > head/usr.bin/mkimg/tests/mkimg.sh > head/usr.sbin/Makefile.i386 > head/usr.sbin/bsdinstall/partedit/gpart_ops.c > head/usr.sbin/bsdinstall/partedit/part_wizard.c > head/usr.sbin/bsdinstall/partedit/scripted.c > head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c > head/usr.sbin/config/config.5 > head/usr.sbin/fdcontrol/Makefile > head/usr.sbin/fdformat/Makefile > head/usr.sbin/fdread/Makefile > head/usr.sbin/fdread/fdutil.c > head/usr.sbin/kgzip/kgzip.8 > head/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh > head/usr.sbin/pnpinfo/Makefile > head/usr.sbin/vidcontrol/vidcontrol.c > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sat Jan 28 00:40:36 2017 (r312909) > +++ head/Makefile Sat Jan 28 02:22:15 2017 (r312910) > @@ -236,7 +236,7 @@ _MAKE+= MK_META_MODE=no > > # Guess machine architecture from machine type, and vice versa. > .if !defined(TARGET_ARCH) && defined(TARGET) > -_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} > +_TARGET_ARCH= ${TARGET:S/arm64/aarch64/} > .elif !defined(TARGET) && defined(TARGET_ARCH) && \ > ${TARGET_ARCH} != ${MACHINE_ARCH} > _TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64(sf)?/riscv/} > @@ -417,13 +417,12 @@ worlds: .PHONY > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) > -TARGETS?=amd64 arm arm64 i386 mips pc98 powerpc sparc64 > +TARGETS?=amd64 arm arm64 i386 mips powerpc sparc64 > _UNIVERSE_TARGETS= ${TARGETS} > TARGET_ARCHES_arm?= arm armeb armv6 > TARGET_ARCHES_arm64?= aarch64 > TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf > TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe > -TARGET_ARCHES_pc98?= i386 > .for target in ${TARGETS} > TARGET_ARCHES_${target}?= ${target} > .endfor > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/Makefile.inc1 Sat Jan 28 02:22:15 2017 (r312910) > @@ -349,7 +349,6 @@ KNOWN_ARCHES?= aarch64/arm64 \ > armeb/arm \ > armv6/arm \ > i386 \ > - i386/pc98 \ > mips \ > mipsel/mips \ > mips64el/mips \ > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sat Jan 28 00:40:36 2017 (r312909) > +++ head/ObsoleteFiles.inc Sat Jan 28 02:22:15 2017 (r312910) > @@ -38,6 +38,17 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20170128: remove pc98 support > +OLD_FILES+=usr/include/dev/ic/i8251.h > +OLD_FILES+=usr/include/dev/ic/wd33c93reg.h > +OLD_FILES+=usr/include/sys/disk/pc98.h > +OLD_FILES+=usr/include/sys/diskpc98.h > +OLD_FILES+=usr/share/man/man4/i386/ct.4.gz > +OLD_FILES+=usr/share/man/man4/i386/snc.4.gz > +OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.iso.kbd > +OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.kbd > +OLD_FILES+=usr/share/vt/keymaps/jp.pc98.iso.kbd > +OLD_FILES+=usr/share/vt/keymaps/jp.pc98.kbd > # 20170110: Four files from ggate tests consolidated into one > OLD_FILES+=usr/tests/sys/geom/class/gate/1_test > OLD_FILES+=usr/tests/sys/geom/class/gate/2_test > > Modified: head/etc/rc.d/syscons > ============================================================================== > --- head/etc/rc.d/syscons Sat Jan 28 00:40:36 2017 (r312909) > +++ head/etc/rc.d/syscons Sat Jan 28 02:22:15 2017 (r312910) > @@ -112,7 +112,6 @@ icelandic.iso) echo is;; > it.iso) echo it;; > jp.106x) echo jp.capsctrl;; > jp.106) echo jp;; > -#?? jp.pc98.iso) echo jp.pc98;; > kk.pt154.io) echo kz.io;; > kk.pt154.kst) echo kz.kst;; > latinamerican.iso.acc) echo latinamerican.acc;; > > Modified: head/lib/libsysdecode/Makefile > ============================================================================== > --- head/lib/libsysdecode/Makefile Sat Jan 28 00:40:36 2017 (r312909) > +++ head/lib/libsysdecode/Makefile Sat Jan 28 02:22:15 2017 (r312910) > @@ -120,7 +120,7 @@ tables.h: mktables > ioctl.c: .PHONY > .endif > ioctl.c: mkioctls .META > - env MACHINE=${MACHINE} CPP="${CPP}" \ > + env CPP="${CPP}" \ > /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET} > > beforedepend: ioctl.c tables.h > > Modified: head/lib/libsysdecode/mkioctls > ============================================================================== > --- head/lib/libsysdecode/mkioctls Sat Jan 28 00:40:36 2017 (r312909) > +++ head/lib/libsysdecode/mkioctls Sat Jan 28 02:22:15 2017 (r312910) > @@ -24,15 +24,7 @@ ioctl_includes=$( > awk '{printf("#include <%s>\\n", $1)}' > ) > > -: ${MACHINE=$(uname -m)} > -case "${MACHINE}" in > -*pc98*) > - ioctl_includes="$ioctl_includes#include \\n" > - ;; > -*) > - ioctl_includes="$ioctl_includes#include \\n" > - ;; > -esac > +ioctl_includes="$ioctl_includes#include \\n" > > awk -v x="$ioctl_includes" 'BEGIN {print x}' | > $CPP -nostdinc -I$includedir -dM -DCOMPAT_43TTY - | > > Modified: head/release/doc/README > ============================================================================== > --- head/release/doc/README Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/README Sat Jan 28 02:22:15 2017 (r312910) > @@ -99,7 +99,7 @@ element will be included. For example: > > SPARC64-specific text > > -The currently-supported architectures are amd64, arm, i386, pc98, > +The currently-supported architectures are amd64, arm, i386, > powerpc and sparc64. An element may appear for multiple architectures > by specifying a comma-separated list of architectures > (i.e. arch="sparc64,amd64"). > > Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml > ============================================================================== > --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Jan 28 02:22:15 2017 (r312910) > @@ -252,35 +252,6 @@ > more information. > > > - > - pc98 > - > - NEC PC-9801/9821 series with almost all &i386;-compatible > - processors, including 80486, &pentium;, &pentium; Pro, > - &pentium; II, and variants. All &i386;-compatible processors > - by AMD, Cyrix, IBM, and IDT are also supported. > - > - NEC FC-9801/9821 series, and NEC SV-98 series (both of > - them are compatible with PC-9801/9821 series) should be > - supported. > - > - EPSON PC-386/486/586 series, which are compatible with NEC > - PC-9801 series are supported. > - > - High-resolution mode is not supported. NEC > - PC-98XA/XL/RL/XL^2, and NEC PC-H98 series are supported in > - normal (PC-9801 compatible) mode only. > - > - Although there are some multi-processor systems (such as > - Rs20/B20), SMP-related features of &os; are not supported > - yet. > - > - PC-9801/9821 standard bus (called C-Bus), PC-9801NOTE > - expansion bus (110pin), and PCI bus are supported. New Extend > - Standard Architecture (NESA) bus (used in PC-H98, SV-H98, and > - FC-H98 series) is not supported. > - > - > > powerpc > > @@ -636,17 +607,9 @@ > > Disk Controllers > > - [&arch.amd64;, &arch.i386;, &arch.pc98;, &arch.sparc64;] > + [&arch.amd64;, &arch.i386;, &arch.sparc64;] > IDE/ATA controllers (&man.ata.4; driver) > > - [&arch.pc98;] IDE/ATA controllers (wdc driver) > - > - > - > - On-board IDE controller > - > - > - > &hwlist.aac; > > &hwlist.adv; > @@ -673,8 +636,6 @@ > > &hwlist.ciss; > > - &hwlist.ct; > - > &hwlist.dpt; > > > @@ -894,8 +855,6 @@ > > &hwlist.sn; > > - &hwlist.snc; > - > &hwlist.ste; > > &hwlist.stge; > @@ -904,7 +863,7 @@ > > &hwlist.tl; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] SMC 83c17x > + [&arch.amd64;, &arch.i386;] SMC 83c17x > (EPIC)-based Ethernet NICs (&man.tx.4; driver) > > &hwlist.txp; > @@ -934,8 +893,7 @@ > > FDDI Interfaces > > - [&arch.i386;, &arch.pc98;] DEC DEFPA PCI (&man.fpa.4; > - driver) > + [&arch.i386;] DEC DEFPA PCI (&man.fpa.4; driver) > > [&arch.i386;] DEC DEFEA EISA (&man.fpa.4; driver) > > @@ -943,28 +901,28 @@ > > ATM Interfaces > > - [&arch.i386;, &arch.pc98;] Midway-based ATM interfaces > + [&arch.i386;] Midway-based ATM interfaces > (&man.en.4; driver) > > - [&arch.i386;, &arch.pc98; &arch.sparc64;] FORE Systems, > + [&arch.i386;, &arch.sparc64;] FORE Systems, > Inc. PCA-200E ATM PCI Adapters (hfa and &man.fatm.4; > drivers) > > - [&arch.i386;, &arch.pc98;] IDT NICStAR 77201/211-based ATM > + [&arch.i386;] IDT NICStAR 77201/211-based ATM > Adapters (&man.idt.4; driver) > > - [&arch.i386;, &arch.pc98; &arch.sparc64;] FORE Systems, > + [&arch.i386;, &arch.sparc64;] FORE Systems, > Inc. HE155 and HE622 ATM interfaces (&man.hatm.4; > driver) > > - [&arch.i386;, &arch.pc98;] IDT77252-based ATM cards > + [&arch.i386;] IDT77252-based ATM cards > (&man.patm.4; driver) > > > > Wireless Network Interfaces > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Cisco/Aironet > + [&arch.amd64;, &arch.i386;] Cisco/Aironet > 802.11b wireless adapters (&man.an.4; driver) > > &hwlist.ath; > @@ -1016,7 +974,7 @@ > > &hwlist.urtw; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent > + [&arch.amd64;, &arch.i386;] Lucent > Technologies WaveLAN/IEEE 802.11b wireless network adapters > and workalikes using the Lucent Hermes, Intersil PRISM-II, > Intersil PRISM-2.5, Intersil Prism-3, and Symbol Spectrum24 > @@ -1214,77 +1172,6 @@ > > &hwlist.rc; > > - [&arch.pc98;] Internel serial interfaces (&man.sio.4; > - driver) > - > - > - > - PC-9801 on-board > - > - > - PC-9821 2'nd CCU (flags 0x12000000) > - > - > - > - [&arch.pc98;] NEC PC-9861K, PC-9801-101 and Midori-Denshi > - MDC-926Rs (&man.sio.4; driver) > - > - > - > - COM2 (flags 0x01000000) > - > - > - > - COM3 (flags 0x02000000) > - > - > - > - [&arch.pc98;] NEC PC-9801-120 (&man.sio.4; driver) > - > - > - "flags 0x11000000" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Microcore MC-16550, MC-16550II, MC-RS98 > - (&man.sio.4; driver) > - > - > - "flags 0x14000?01" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Media Intelligent RSB-2000, RSB-3000 and > - AIWA B98-02 (&man.sio.4; driver) > - > - > - "flags 0x15000?01" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Media Intelligent RSB-384 (&man.sio.4; > - driver) > - > - > - "flags 0x16000001" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] I-O DATA RSA-98III (&man.sio.4; > - driver) > - > - > - "flags 0x18000?01" is necessary in kernel > - configuration. > - > - > - [&arch.pc98;] Hayes ESP98 (&man.sio.4; driver) > - > - > - "options COM_ESP" and "flags 0x19000000" are necessary > - in kernel configuration. > - > - > > > > @@ -1350,35 +1237,6 @@ > > &hwlist.snd.vibes; > > - [&arch.pc98;] NEC PC-9801-73, 86 and compatibles (nss > - driver) > - > - > - > - NEC A-MATE internal sound > - > - > - > - Q-Vision WaveStar, WaveMaster > - > - > - > - [&arch.pc98;] NEC X-MATE, CanBe, ValueStar internal (mss > - driver) > - > - [&arch.pc98;] Creative Technologies SoundBlaster(98) > - (&man.sb.4; driver) > - > - [&arch.pc98;] I-O DATA CD-BOX (&man.sb.4; driver) > - > - [&arch.pc98;] MPU-401 and compatible interfaces (mpu > - driver) > - > - > - > - Q-Vision WaveStar > - > - > > > > @@ -1392,7 +1250,7 @@ > > USB Devices > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] A > + [&arch.amd64;, &arch.i386;] A > range of USB peripherals are supported; devices known to work > are listed in this section. Owing to the generic nature of > most USB devices, with some exceptions any device of a given > @@ -1400,14 +1258,14 @@ > here. > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB Ethernet adapters can be found in the section listing > Ethernet > interfaces. > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB Bluetooth adapters can be found in Bluetooth section. > > > @@ -1415,18 +1273,15 @@ > > &hwlist.uhci; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] USB > + [&arch.amd64;, &arch.i386;] USB > 2.0 controllers using the EHCI interface (&man.ehci.4; > driver) > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Hubs > + [&arch.amd64;, &arch.i386;] Hubs > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Keyboards (&man.ukbd.4; driver) > + [&arch.amd64;, &arch.i386;] Keyboards (&man.ukbd.4; driver) > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Miscellaneous > + [&arch.amd64;, &arch.i386;] Miscellaneous > > > > @@ -1454,8 +1309,7 @@ > > &hwlist.umodem; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Mice > - (&man.ums.4; driver) > + [&arch.amd64;, &arch.i386;] Mice (&man.ums.4; driver) > > &hwlist.ulpt; > > @@ -1471,7 +1325,7 @@ > > &hwlist.umass; > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Audio Devices > + [&arch.amd64;, &arch.i386;] Audio Devices > (&man.uaudio.4; driver) > > &hwlist.uvisor; > @@ -1507,8 +1361,7 @@ > > Miscellaneous > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - FAX-Modem/PCCARD > + [&arch.amd64;, &arch.i386;] FAX-Modem/PCCARD > > > > @@ -1521,7 +1374,7 @@ > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Floppy drives > + [&arch.amd64;, &arch.i386;] Floppy drives > (&man.fdc.4; driver) > > [&arch.amd64;, &arch.i386;] VGA-compatible video cards > @@ -1533,8 +1386,7 @@ > found at http://www.x.org/. > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > - Keyboards including: > + [&arch.amd64;, &arch.i386;] Keyboards including: > > > > @@ -1548,21 +1400,17 @@ > > > > - [&arch.pc98;] Standard keyboards > - > - > - > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB keyboards (&man.ukbd.4; driver) > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > Pointing devices including: > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] Bus mice and > + [&arch.amd64;, &arch.i386;] Bus mice and > compatible devices (&man.mse.4; driver) > > > @@ -1577,7 +1425,7 @@ > > > > - [&arch.amd64;, &arch.i386;, &arch.pc98;] > + [&arch.amd64;, &arch.i386;] > USB mice (&man.ums.4; driver) > > > @@ -1591,17 +1439,10 @@ > [&arch.amd64;, &arch.i386;] PC standard > parallel ports (&man.ppc.4; driver) > > - [&arch.pc98;] PC-9821 standard parallel > - ports (&man.ppc.4; driver) > - > [&arch.i386;, &arch.amd64;] PC-compatible joysticks > (&man.joy.4; driver) > > - [&arch.pc98;] Joystick port of SoundBlaster(98) > - (&man.joy.4; driver) > - > - [&arch.i386;, &arch.pc98;] PHS Data Communication > - Card/PCCARD > + [&arch.i386;] PHS Data Communication Card/PCCARD > > > > @@ -1621,8 +1462,6 @@ > cards compatible with the HOT1 from Virtual Computers (xrpu > driver). > > - [&arch.pc98;] Power Management Controller of NEC PC-98 > - Note (pmc driver) > > > > > Modified: head/release/doc/en_US.ISO8859-1/readme/article.xml > ============================================================================== > --- head/release/doc/en_US.ISO8859-1/readme/article.xml Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/en_US.ISO8859-1/readme/article.xml Sat Jan 28 02:22:15 2017 (r312910) > @@ -69,7 +69,6 @@ > &os; is an operating system based on 4.4 BSD Lite for > AMD64 and Intel EM64T based PC hardware (&arch.amd64;), > Intel, AMD, Cyrix or NexGen x86 based PC hardware (&arch.i386;), > - NEC PC-9801/9821 series PCs and compatibles (&arch.pc98;), > and &ultrasparc; machines (&arch.sparc64;). Versions > for the &arm; (&arch.arm;), &mips; (&arch.mips;), and > &powerpc; (&arch.powerpc;) architectures are currently under > @@ -324,7 +323,7 @@ > > > On platforms that support &man.bsdinstall.8; (currently > - &arch.amd64;, &arch.i386;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the > + &arch.amd64;, &arch.i386;, and &arch.sparc64;), these documents are generally available via the > Documentation menu during installation. Once the system is > installed, you can revisit this menu by re-running the > &man.bsdinstall.8; utility. > > Modified: head/release/doc/share/examples/Makefile.relnotesng > ============================================================================== > --- head/release/doc/share/examples/Makefile.relnotesng Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/share/examples/Makefile.relnotesng Sat Jan 28 02:22:15 2017 (r312910) > @@ -6,7 +6,7 @@ > # the build tree. > # > > -ARCHS= amd64 i386 pc98 powerpc sparc64 > +ARCHS= amd64 i386 powerpc sparc64 > MULTITEXTS= > UNITEXTS= hardware readme relnotes errata > > > Modified: head/release/doc/share/misc/dev.archlist.txt > ============================================================================== > --- head/release/doc/share/misc/dev.archlist.txt Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/share/misc/dev.archlist.txt Sat Jan 28 02:22:15 2017 (r312910) > @@ -36,43 +36,42 @@ > # [,...] > # > aac i386,amd64 > -adv i386,pc98,amd64 > -adw i386,pc98,amd64 > +adv i386,amd64 > +adw i386,amd64 > aha i386 > ahb i386 > ahd i386,sparc64,amd64 > -aic i386,pc98,amd64 > -amd i386,pc98,amd64 > +aic i386,amd64 > +amd i386,amd64 > arcmsr i386,amd64 > asr i386 > -ath i386,pc98,amd64,sparc64 > -aue i386,pc98,amd64,powerpc > -axe i386,pc98,amd64,powerpc > +ath i386,amd64,sparc64 > +aue i386,amd64,powerpc > +axe i386,amd64,powerpc > bce i386,amd64 > -bge i386,pc98,sparc64,amd64 > -bktr i386,pc98 > +bge i386,sparc64,amd64 > +bktr i386 > bt i386,amd64 > bxe i386,amd64 > -cdce i386,pc98,amd64,powerpc > +cdce i386,amd64,powerpc > ciss i386,amd64 > -ce i386,pc98 > +ce i386 > cm i386 > -cnw i386,pc98,amd64 > -cp i386,pc98 > -ct pc98 > +cnw i386,amd64 > +cp i386 > ctau i386 > -cue i386,pc98,amd64,powerpc > +cue i386,amd64,powerpc > cx i386 > cxgb i386,amd64 > -de i386,pc98,amd64 > +de i386,amd64 > dpt i386,amd64 > -ed i386,pc98 > -ep i386,pc98,amd64 > +ed i386 > +ep i386,amd64 > esp sparc64 > ex i386,amd64 > -fe i386,pc98,amd64 > +fe i386,amd64 > fwohci i386,sparc64,amd64,powerpc > -hifn i386,pc98,amd64 > +hifn i386,amd64 > hpt27xx i386,amd64 > hptiop i386,amd64 > hptmv i386,amd64 > @@ -83,26 +82,26 @@ iir i386,amd64 > ips i386,amd64 > isci i386,amd64 > ixgb i386,amd64 > -kue i386,pc98,amd64,powerpc > -lge i386,pc98,amd64 > +kue i386,amd64,powerpc > +lge i386,amd64 > mfi i386,amd64 > mlx i386,amd64 > mly i386,amd64 > msk i386,amd64 > mxge i386,amd64 > -my i386,pc98 > -ncr i386,pc98,amd64 > -ncv i386,pc98 > +my i386 > +ncr i386,amd64 > +ncv i386 > nfe i386,amd64 > -ng_bt3c i386,pc98,amd64 > -ng_ubt i386,pc98,amd64 > -nsp i386,pc98 > +ng_bt3c i386,amd64 > +ng_ubt i386,amd64 > +nsp i386 > nxge i386,amd64 > oce i386,amd64 > -ohci i386,pc98,amd64,powerpc > +ohci i386,amd64,powerpc > oltr i386 > otus i386,amd64 > -pcn i386,pc98,amd64 > +pcn i386,amd64 > pst i386 > qlxgb amd64 > qlxgbe amd64 > @@ -110,14 +109,13 @@ qlxge amd64 > rc i386 > ral i386,amd64 > rsu i386,amd64 > -rue i386,pc98,amd64 > +rue i386,amd64 > rum i386,amd64 > run i386,amd64 > -safe i386,pc98,amd64 > +safe i386,amd64 > sbp i386,sparc64,amd64 > sfgxe amd64 > sn i386,amd64 > -snc pc98 > snd_ad1816 i386,amd64 > snd_als4000 i386 > snd_atiixp i386,amd64 > @@ -148,31 +146,31 @@ snd_t4dwave i386,amd64,sparc64 > snd_via8233 i386,amd64 > snd_via82c686 i386,amd64 > snd_vibes i386,amd64 > -stg i386,pc98 > -ti i386,pc98,amd64,sparc64 > -tl i386,pc98,amd64 > +stg i386 > +ti i386,amd64,sparc64 > +tl i386,amd64 > trm i386,amd64 > twa i386,amd64 > twe i386,amd64 > tws i386,amd64 > -ubsa i386,pc98,amd64 > -ubsec i386,pc98,amd64 > -ubser i386,pc98,amd64 > -ucycom i386,pc98,amd64 > -udav i386,pc98,amd64 > -uftdi i386,pc98,amd64 > -uhci i386,pc98,amd64,powerpc > -ulpt i386,pc98,amd64,powerpc > -umass i386,pc98,amd64,powerpc > -umodem i386,pc98,amd64 > -uplcom i386,pc98,amd64 > +ubsa i386,amd64 > +ubsec i386,amd64 > +ubser i386,amd64 > +ucycom i386,amd64 > +udav i386,amd64 > +uftdi i386,amd64 > +uhci i386,amd64,powerpc > +ulpt i386,amd64,powerpc > +umass i386,amd64,powerpc > +umodem i386,amd64 > +uplcom i386,amd64 > ural i386,amd64 > -urio i386,pc98,amd64,powerpc > -uvisor i386,pc98,amd64 > -uvscom i386,pc98,amd64 > +urio i386,amd64,powerpc > +uvisor i386,amd64 > +uvscom i386,amd64 > vpo i386 > -vx i386,pc98,amd64 > +vx i386,amd64 > vxge i386,amd64 > -wb i386,pc98,amd64 > +wb i386,amd64 > xe i386,amd64 > zyd i386,amd64 > > Modified: head/release/doc/share/xml/release.ent > ============================================================================== > --- head/release/doc/share/xml/release.ent Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/doc/share/xml/release.ent Sat Jan 28 02:22:15 2017 (r312910) > @@ -73,7 +73,6 @@ > > > > - > > > > > Modified: head/release/rc.local > ============================================================================== > --- head/release/rc.local Sat Jan 28 00:40:36 2017 (r312909) > +++ head/release/rc.local Sat Jan 28 02:22:15 2017 (r312910) > @@ -16,11 +16,7 @@ mkdir /tmp/bsdinstall_etc > kbdcontrol -d >/dev/null 2>&1 > if [ $? -eq 0 ]; then > # Syscons: use xterm, start interesting things on other VTYs > - if [ ${MACHINE} = "pc98" ]; then > - TERM=cons25w > - else > - TERM=xterm > - fi > + TERM=xterm > > # Don't send ESC on function-key 62/63 (left/right command key) > kbdcontrol -f 62 '' > /dev/null 2>&1 > > Modified: head/rescue/rescue/Makefile > ============================================================================== > --- head/rescue/rescue/Makefile Sat Jan 28 00:40:36 2017 (r312909) > +++ head/rescue/rescue/Makefile Sat Jan 28 02:22:15 2017 (r312910) > @@ -141,10 +141,6 @@ CRUNCH_ALIAS_bsdlabel= disklabel > #CRUNCH_LIBS+= -lsmb > .endif > > -.if ${MACHINE} == "pc98" > -CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98 > -.endif > - > .if ${MACHINE_CPUARCH} == "sparc64" > CRUNCH_PROGS_sbin+= bsdlabel sunlabel > .endif > > Modified: head/sbin/bsdlabel/bsdlabel.8 > ============================================================================== > --- head/sbin/bsdlabel/bsdlabel.8 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/sbin/bsdlabel/bsdlabel.8 Sat Jan 28 02:22:15 2017 (r312910) > @@ -109,9 +109,9 @@ argument forces > .Nm > to use a layout suitable for a different architecture. > Current valid values are > -.Cm i386 , amd64 , > +.Cm i386 > and > -.Cm pc98 . > +.Cm amd64 . > If this option is omitted, > .Nm > will use a layout suitable for the current machine. > > Modified: head/sbin/bsdlabel/bsdlabel.c > ============================================================================== > --- head/sbin/bsdlabel/bsdlabel.c Sat Jan 28 00:40:36 2017 (r312909) > +++ head/sbin/bsdlabel/bsdlabel.c Sat Jan 28 02:22:15 2017 (r312910) > @@ -164,8 +164,7 @@ main(int argc, char *argv[]) > break; > case 'm': > if (!strcmp(optarg, "i386") || > - !strcmp(optarg, "amd64") || > - !strcmp(optarg, "pc98")) { > + !strcmp(optarg, "amd64")) { > labelsoffset = 1; > labeloffset = 0; > bbsize = 8192; > > Modified: head/sbin/geom/class/part/gpart.8 > ============================================================================== > --- head/sbin/geom/class/part/gpart.8 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/sbin/geom/class/part/gpart.8 Sat Jan 28 02:22:15 2017 (r312910) > @@ -543,11 +543,6 @@ The > option enables backward compatibility for partition names > in the EBR scheme. > It also prevents any type of actions on such partitions. > -.It Cm PC98 > -An MBR variant for NEC PC-98 and compatible computers. > -Requires the > -.Cm GEOM_PART_PC98 > -kernel option. > .It Cm VTOC8 > Sun's SMI Volume Table Of Contents, used by > .Tn SPARC64 > @@ -945,12 +940,6 @@ The scheme-specific attributes for MBR: > .Bl -tag -width ".Cm active" > .It Cm active > .El > -.Pp > -The scheme-specific attributes for PC98: > -.Bl -tag -width ".Cm bootable" > -.It Cm active > -.It Cm bootable > -.El > .Sh BOOTSTRAPPING > .Fx > supports several partitioning schemes and each scheme uses different > > Modified: head/share/examples/bootforth/frames.4th > ============================================================================== > --- head/share/examples/bootforth/frames.4th Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/examples/bootforth/frames.4th Sat Jan 28 02:22:15 2017 (r312910) > @@ -12,49 +12,26 @@ variable rt_el > variable rb_el > variable fill > > -s" arch-pc98" environment? [if] > - \ Single frames > - 149 constant sh_el > - 150 constant sv_el > - 152 constant slt_el > - 154 constant slb_el > - 153 constant srt_el > - 155 constant srb_el > - \ Double frames > - 149 constant dh_el > - 150 constant dv_el > - 152 constant dlt_el > - 154 constant dlb_el > - 153 constant drt_el > - 155 constant drb_el > - \ Fillings > - 0 constant fill_none > - 32 constant fill_blank > - 135 constant fill_dark > - 135 constant fill_med > - 135 constant fill_bright > -[else] > - \ Single frames > - 196 constant sh_el > - 179 constant sv_el > - 218 constant slt_el > - 192 constant slb_el > - 191 constant srt_el > - 217 constant srb_el > - \ Double frames > - 205 constant dh_el > - 186 constant dv_el > - 201 constant dlt_el > - 200 constant dlb_el > - 187 constant drt_el > - 188 constant drb_el > - \ Fillings > - 0 constant fill_none > - 32 constant fill_blank > - 176 constant fill_dark > - 177 constant fill_med > - 178 constant fill_bright > -[then] > +\ Single frames > +196 constant sh_el > +179 constant sv_el > +218 constant slt_el > +192 constant slb_el > +191 constant srt_el > +217 constant srb_el > +\ Double frames > +205 constant dh_el > +186 constant dv_el > +201 constant dlt_el > +200 constant dlb_el > +187 constant drt_el > +188 constant drb_el > +\ Fillings > +0 constant fill_none > +32 constant fill_blank > +176 constant fill_dark > +177 constant fill_med > +178 constant fill_bright > > : hline ( len x y -- ) \ Draw horizontal single line > at-xy \ move cursor > > Modified: head/share/man/man4/adv.4 > ============================================================================== > --- head/share/man/man4/adv.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/adv.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -204,12 +204,6 @@ AdvanSys ABP950 > AdvanSys ABP980, ABP980U > .It > AdvanSys ABP980UA/3980UA > -.It > -MELCO IFC-USP (PC-98) > -.It > -RATOC REX-PCI30 (PC-98) > -.It > -@Nifty FNECHARD IFC-USUP-TX (PC-98) > .El > .Sh SEE ALSO > .Xr adw 4 , > > Modified: head/share/man/man4/ahc.4 > ============================================================================== > --- head/share/man/man4/ahc.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/ahc.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -349,14 +349,6 @@ Adaptec > Adaptec > .Tn 4944UW > .It > -NEC PC-9821Xt13 (PC-98) > -.It > -NEC RvII26 (PC-98) > -.It > -NEC PC-9821X-B02L/B09 (PC-98) > -.It > -NEC SV-98/2-B03 (PC-98) > -.It > Many motherboards with on-board > .Tn SCSI > support > > Modified: head/share/man/man4/apic.4 > ============================================================================== > --- head/share/man/man4/apic.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/apic.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -32,7 +32,7 @@ > .Nd Advanced Programmable Interrupt Controller (APIC) driver > .Sh SYNOPSIS > This driver is a mandatory part of amd64 kernel. > -To compile this driver into i386 or pc98 kernel, > +To compile this driver into i386 kernel, > place the following line in your > kernel configuration file: > .Bd -ragged -offset indent > > Modified: head/share/man/man4/ed.4 > ============================================================================== > --- head/share/man/man4/ed.4 Sat Jan 28 00:40:36 2017 (r312909) > +++ head/share/man/man4/ed.4 Sat Jan 28 02:22:15 2017 (r312910) > @@ -133,12 +133,6 @@ Accton EN2212/EN2216/UE2216 > .It > Allied Telesis CentreCOM LA100-PCM_V2 > .It > -Allied Telesis LA-98 (flags 0x000000) (PC-98) > -.It > -Allied Telesis SIC-98, SIC-98NOTE (110pin), SIU-98 (flags 0x600000) (PC-98) > -.It > -Allied Telesis SIU-98-D (flags 0x610000) (PC-98) > -.It > AmbiCom 10BaseT card (8002, 8002T, 8010 and 8610) > .It > Bay Networks NETGEAR FA410TXC Fast Ethernet > @@ -163,12 +157,6 @@ Compex Net-A adapter > .It > Compex RL2000 > .It > -Contec C-NET(98), RT-1007(98), C-NET(9N) (110pin) (flags 0xa00000) (PC-98) > -.It > -Contec C-NET(98)E-A, C-NET(98)L-A, C-NET(98)P (flags 0x300000) (PC-98) > -.It > -Corega Ether98-T (flags 0x000000) (PC-98) > -.It > Corega Ether PCC-T/EtherII PCC-T/FEther PCC-TXF/PCC-TXD PCC-T/Fether II TXD > .It > Corega LAPCCTXD (TC5299J) > @@ -179,16 +167,10 @@ DEC EtherWorks DE305 > .It > Danpex EN-6200P2 > .It > -D-Link DE-298, DE-298P (flags 0x500000) (PC-98) > -.It > D-Link DE-660, DE-660+ > .It > D-Link IC-CARD/IC-CARD+ Ethernet > .It > -ELECOM LD-98P (flags 0x500000) (PC-98) > -.It > -ELECOM LD-BDN, LD-NW801G (flags 0x200000) (PC-98) > -.It > ELECOM Laneed LD-CDL/TX, LD-CDF, LD-CDS, LD-10/100CD, LD-CDWA (DP83902A) > .It > Hawking PN652TX PC Card (AX88790) > @@ -198,17 +180,10 @@ HP PC Lan+ 27247B and 27252A > .It > IBM Creditcard Ethernet I/II > .It > -ICM AD-ET2-T, DT-ET-25, DT-ET-T5, IF-2766ET, IF-2771ET, NB-ET-T (110pin) > -(flags 0x500000) (PC-98) > -.It > -I-O DATA LA/T-98, LA/T-98SB, LA2/T-98, ET/T-98 (flags 0x900000) (PC-98) > -.It > I-O DATA ET2/T-PCI > .It > I-O DATA PCLATE > .It > -Kansai KLA-98C/T (flags 0x900000) (PC-98) > -.It > Kingston KNE-PC2, CIO10T, KNE-PCM/x Ethernet > .It > KTI ET32P2 PCI > @@ -217,28 +192,14 @@ Linksys EC2T/PCMPC100/PCM100, PCMLM56 > .It > Linksys EtherFast 10/100 PC Card, Combo PCMCIA Ethernet Card (PCMPC100 V2) > .It > -Logitec LAN-98T (flags 0xb00000) (PC-98) > -.It > MACNICA Ethernet ME1 for JEIDA > .It > -MACNICA ME98 (flags 0x900000) (PC-98) > -.It > -MACNICA NE2098 (flags 0x400000) (PC-98) > -.It > -MELCO EGY-98 (flags 0x300000) (PC-98) > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > --- TAKAHASHI Yoshihiro From owner-svn-src-all@freebsd.org Sun Feb 5 13:24:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA77ACD1598; Sun, 5 Feb 2017 13:24:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 824E31074; Sun, 5 Feb 2017 13:24:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15DOsQ5084558; Sun, 5 Feb 2017 13:24:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15DOsdK084554; Sun, 5 Feb 2017 13:24:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702051324.v15DOsdK084554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 5 Feb 2017 13:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313281 - in head/sys: compat/freebsd32 compat/linux 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 13:24:55 -0000 Author: trasz Date: Sun Feb 5 13:24:54 2017 New Revision: 313281 URL: https://svnweb.freebsd.org/changeset/base/313281 Log: Add kern_cpuset_getaffinity() and kern_cpuset_getaffinity(), and use it in compats instead of their sys_*() counterparts. Reviewed by: kib, jhb, dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9383 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_misc.c head/sys/kern/kern_cpuset.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Feb 5 13:24:54 2017 (r313281) @@ -2554,30 +2554,18 @@ int freebsd32_cpuset_getaffinity(struct thread *td, struct freebsd32_cpuset_getaffinity_args *uap) { - struct cpuset_getaffinity_args ap; - ap.level = uap->level; - ap.which = uap->which; - ap.id = PAIR32TO64(id_t,uap->id); - ap.cpusetsize = uap->cpusetsize; - ap.mask = uap->mask; - - return (sys_cpuset_getaffinity(td, &ap)); + return (kern_cpuset_getaffinity(td, uap->level, uap->which, + PAIR32TO64(id_t,uap->id), uap->cpusetsize, uap->mask)); } int freebsd32_cpuset_setaffinity(struct thread *td, struct freebsd32_cpuset_setaffinity_args *uap) { - struct cpuset_setaffinity_args ap; - - ap.level = uap->level; - ap.which = uap->which; - ap.id = PAIR32TO64(id_t,uap->id); - ap.cpusetsize = uap->cpusetsize; - ap.mask = uap->mask; - return (sys_cpuset_setaffinity(td, &ap)); + return (kern_cpuset_setaffinity(td, uap->level, uap->which, + PAIR32TO64(id_t,uap->id), uap->cpusetsize, uap->mask)); } int Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/compat/linux/linux_misc.c Sun Feb 5 13:24:54 2017 (r313281) @@ -2102,7 +2102,6 @@ linux_sched_getaffinity(struct thread *t { int error; struct thread *tdt; - struct cpuset_getaffinity_args cga; #ifdef DEBUG if (ldebug(sched_getaffinity)) @@ -2117,13 +2116,10 @@ linux_sched_getaffinity(struct thread *t return (ESRCH); PROC_UNLOCK(tdt->td_proc); - cga.level = CPU_LEVEL_WHICH; - cga.which = CPU_WHICH_TID; - cga.id = tdt->td_tid; - cga.cpusetsize = sizeof(cpuset_t); - cga.mask = (cpuset_t *) args->user_mask_ptr; - if ((error = sys_cpuset_getaffinity(td, &cga)) == 0) + error = kern_cpuset_getaffinity(td, CPU_LEVEL_WHICH, CPU_WHICH_TID, + tdt->td_tid, sizeof(cpuset_t), (cpuset_t *)args->user_mask_ptr); + if (error == 0) td->td_retval[0] = sizeof(cpuset_t); return (error); @@ -2136,7 +2132,6 @@ int linux_sched_setaffinity(struct thread *td, struct linux_sched_setaffinity_args *args) { - struct cpuset_setaffinity_args csa; struct thread *tdt; #ifdef DEBUG @@ -2152,13 +2147,9 @@ linux_sched_setaffinity(struct thread *t return (ESRCH); PROC_UNLOCK(tdt->td_proc); - csa.level = CPU_LEVEL_WHICH; - csa.which = CPU_WHICH_TID; - csa.id = tdt->td_tid; - csa.cpusetsize = sizeof(cpuset_t); - csa.mask = (cpuset_t *) args->user_mask_ptr; - return (sys_cpuset_setaffinity(td, &csa)); + return (kern_cpuset_setaffinity(td, CPU_LEVEL_WHICH, CPU_WHICH_TID, + tdt->td_tid, sizeof(cpuset_t), (cpuset_t *) args->user_mask_ptr)); } struct linux_rlimit64 { Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/kern/kern_cpuset.c Sun Feb 5 13:24:54 2017 (r313281) @@ -1078,6 +1078,15 @@ struct cpuset_getaffinity_args { int sys_cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap) { + + return (kern_cpuset_getaffinity(td, uap->level, uap->which, + uap->id, uap->cpusetsize, uap->mask)); +} + +int +kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id, size_t cpusetsize, cpuset_t *maskp) +{ struct thread *ttd; struct cpuset *nset; struct cpuset *set; @@ -1086,18 +1095,17 @@ sys_cpuset_getaffinity(struct thread *td int error; size_t size; - if (uap->cpusetsize < sizeof(cpuset_t) || - uap->cpusetsize > CPU_MAXSIZE / NBBY) + if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - size = uap->cpusetsize; + size = cpusetsize; mask = malloc(size, M_TEMP, M_WAITOK | M_ZERO); - error = cpuset_which(uap->which, uap->id, &p, &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error) goto out; - switch (uap->level) { + switch (level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: case CPU_WHICH_PID: thread_lock(ttd); @@ -1112,7 +1120,7 @@ sys_cpuset_getaffinity(struct thread *td error = EINVAL; goto out; } - if (uap->level == CPU_LEVEL_ROOT) + if (level == CPU_LEVEL_ROOT) nset = cpuset_refroot(set); else nset = cpuset_refbase(set); @@ -1120,7 +1128,7 @@ sys_cpuset_getaffinity(struct thread *td cpuset_rel(nset); break; case CPU_LEVEL_WHICH: - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: thread_lock(ttd); CPU_COPY(&ttd->td_cpuset->cs_mask, mask); @@ -1138,13 +1146,13 @@ sys_cpuset_getaffinity(struct thread *td CPU_COPY(&set->cs_mask, mask); break; case CPU_WHICH_IRQ: - error = intr_getaffinity(uap->id, mask); + error = intr_getaffinity(id, mask); break; case CPU_WHICH_DOMAIN: - if (uap->id < 0 || uap->id >= MAXMEMDOM) + if (id < 0 || id >= MAXMEMDOM) error = ESRCH; else - CPU_COPY(&cpuset_domain[uap->id], mask); + CPU_COPY(&cpuset_domain[id], mask); break; } break; @@ -1157,7 +1165,7 @@ sys_cpuset_getaffinity(struct thread *td if (p) PROC_UNLOCK(p); if (error == 0) - error = copyout(mask, uap->mask, size); + error = copyout(mask, maskp, size); out: free(mask, M_TEMP); return (error); @@ -1175,6 +1183,15 @@ struct cpuset_setaffinity_args { int sys_cpuset_setaffinity(struct thread *td, struct cpuset_setaffinity_args *uap) { + + return (kern_cpuset_setaffinity(td, uap->level, uap->which, + uap->id, uap->cpusetsize, uap->mask)); +} + +int +kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id, size_t cpusetsize, const cpuset_t *maskp) +{ struct cpuset *nset; struct cpuset *set; struct thread *ttd; @@ -1182,22 +1199,21 @@ sys_cpuset_setaffinity(struct thread *td cpuset_t *mask; int error; - if (uap->cpusetsize < sizeof(cpuset_t) || - uap->cpusetsize > CPU_MAXSIZE / NBBY) + if (cpusetsize < sizeof(cpuset_t) || cpusetsize > CPU_MAXSIZE / NBBY) return (ERANGE); - mask = malloc(uap->cpusetsize, M_TEMP, M_WAITOK | M_ZERO); - error = copyin(uap->mask, mask, uap->cpusetsize); + mask = malloc(cpusetsize, M_TEMP, M_WAITOK | M_ZERO); + error = copyin(maskp, mask, cpusetsize); if (error) goto out; /* * Verify that no high bits are set. */ - if (uap->cpusetsize > sizeof(cpuset_t)) { + if (cpusetsize > sizeof(cpuset_t)) { char *end; char *cp; end = cp = (char *)&mask->__bits; - end += uap->cpusetsize; + end += cpusetsize; cp += sizeof(cpuset_t); while (cp != end) if (*cp++ != 0) { @@ -1206,13 +1222,13 @@ sys_cpuset_setaffinity(struct thread *td } } - switch (uap->level) { + switch (level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: - error = cpuset_which(uap->which, uap->id, &p, &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error) break; - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: case CPU_WHICH_PID: thread_lock(ttd); @@ -1228,7 +1244,7 @@ sys_cpuset_setaffinity(struct thread *td error = EINVAL; goto out; } - if (uap->level == CPU_LEVEL_ROOT) + if (level == CPU_LEVEL_ROOT) nset = cpuset_refroot(set); else nset = cpuset_refbase(set); @@ -1237,24 +1253,23 @@ sys_cpuset_setaffinity(struct thread *td cpuset_rel(set); break; case CPU_LEVEL_WHICH: - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: - error = cpuset_setthread(uap->id, mask); + error = cpuset_setthread(id, mask); break; case CPU_WHICH_PID: - error = cpuset_setproc(uap->id, NULL, mask); + error = cpuset_setproc(id, NULL, mask); break; case CPU_WHICH_CPUSET: case CPU_WHICH_JAIL: - error = cpuset_which(uap->which, uap->id, &p, - &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error == 0) { error = cpuset_modify(set, mask); cpuset_rel(set); } break; case CPU_WHICH_IRQ: - error = intr_setaffinity(uap->id, mask); + error = intr_setaffinity(id, mask); break; default: error = EINVAL; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Sun Feb 5 09:54:16 2017 (r313280) +++ head/sys/sys/syscallsubr.h Sun Feb 5 13:24:54 2017 (r313281) @@ -33,6 +33,7 @@ #include #include #include +#include struct file; struct filecaps; @@ -86,6 +87,11 @@ int kern_clock_settime(struct thread *td int kern_close(struct thread *td, int fd); int kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); +int kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, + cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *maskp); +int kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, + cpuwhich_t which, id_t id, size_t cpusetsize, + const cpuset_t *maskp); int kern_cpuset_getid(struct thread *td, cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); int kern_cpuset_setid(struct thread *td, cpuwhich_t which, From owner-svn-src-all@freebsd.org Sun Feb 5 13:37:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 744FFCD1B7D; Sun, 5 Feb 2017 13:37:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E54618D0; Sun, 5 Feb 2017 13:37:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15DbO0V088957; Sun, 5 Feb 2017 13:37:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15DbOfU088955; Sun, 5 Feb 2017 13:37:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702051337.v15DbOfU088955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Feb 2017 13:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313282 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 13:37:25 -0000 Author: mjg Date: Sun Feb 5 13:37:23 2017 New Revision: 313282 URL: https://svnweb.freebsd.org/changeset/base/313282 Log: rwlock: move lockstat handling out of inline primitives See r313275 for details. One difference here is that recursion handling was removed from the fallback routine. As it is it was never supposed to see a recursed lock in the first place. Future changes will move it out of inline variants, but right now there is no easy to way to test if the lock is recursed without reading additional words. Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Feb 5 13:24:54 2017 (r313281) +++ head/sys/kern/kern_rwlock.c Sun Feb 5 13:37:23 2017 (r313282) @@ -283,6 +283,7 @@ void _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line) { struct rwlock *rw; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; @@ -296,7 +297,14 @@ _rw_wlock_cookie(volatile uintptr_t *c, ("rw_wlock() of destroyed rwlock @ %s:%d", file, line)); WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); - __rw_wlock(rw, curthread, file, line); + tid = (uintptr_t)curthread; + v = RW_UNLOCKED; + if (!_rw_write_lock_fetch(rw, &v, tid)) + _rw_wlock_hard(rw, v, tid, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, + 0, 0, file, line, LOCKSTAT_WRITER); + LOCK_LOG_LOCK("WLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); WITNESS_LOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); TD_LOCKS_INC(curthread); @@ -355,7 +363,11 @@ _rw_wunlock_cookie(volatile uintptr_t *c WITNESS_UNLOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); - __rw_wunlock(rw, curthread, file, line); + if (rw->rw_recurse) + rw->rw_recurse--; + else + _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line); + TD_LOCKS_DEC(curthread); } @@ -998,13 +1010,12 @@ __rw_wunlock_hard(volatile uintptr_t *c, return; rw = rwlock2rw(c); + MPASS(!rw_recursed(rw)); - if (rw_wlocked(rw) && rw_recursed(rw)) { - rw->rw_recurse--; - if (LOCK_LOG_TEST(&rw->lock_object, 0)) - CTR2(KTR_LOCK, "%s: %p unrecursing", __func__, rw); + LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, + LOCKSTAT_WRITER); + if (_rw_write_unlock(rw, tid)) return; - } KASSERT(rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS), ("%s: neither of the waiter flags are set", __func__)); Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Sun Feb 5 13:24:54 2017 (r313281) +++ head/sys/sys/rwlock.h Sun Feb 5 13:37:23 2017 (r313282) @@ -84,10 +84,8 @@ #define _rw_write_lock(rw, tid) \ atomic_cmpset_acq_ptr(&(rw)->rw_lock, RW_UNLOCKED, (tid)) -#define _rw_write_lock_fetch(rw, vp, tid) ({ \ - *vp = RW_UNLOCKED; \ - atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid)); \ -}) +#define _rw_write_lock_fetch(rw, vp, tid) \ + atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid)) /* Release a write lock quickly if there are no waiters. */ #define _rw_write_unlock(rw, tid) \ @@ -102,13 +100,11 @@ /* Acquire a write lock. */ #define __rw_wlock(rw, tid, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ - uintptr_t _v; \ + uintptr_t _v = RW_UNLOCKED; \ \ - if (!_rw_write_lock_fetch((rw), &_v, _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__acquire) || \ + !_rw_write_lock_fetch((rw), &_v, _tid))) \ _rw_wlock_hard((rw), _v, _tid, (file), (line)); \ - else \ - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, \ - 0, 0, file, line, LOCKSTAT_WRITER); \ } while (0) /* Release a write lock. */ @@ -118,9 +114,8 @@ if ((rw)->rw_recurse) \ (rw)->rw_recurse--; \ else { \ - LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, \ - LOCKSTAT_WRITER); \ - if (!_rw_write_unlock((rw), _tid)) \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) ||\ + !_rw_write_unlock((rw), _tid))) \ _rw_wunlock_hard((rw), _tid, (file), (line)); \ } \ } while (0) From owner-svn-src-all@freebsd.org Sun Feb 5 14:03:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40CEDCD2365; Sun, 5 Feb 2017 14:03:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1056DA51; Sun, 5 Feb 2017 14:03:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15E3QVU001258; Sun, 5 Feb 2017 14:03:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15E3QwK001257; Sun, 5 Feb 2017 14:03:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702051403.v15E3QwK001257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 5 Feb 2017 14:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313283 - head/sys/compat/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 14:03:27 -0000 Author: trasz Date: Sun Feb 5 14:03:25 2017 New Revision: 313283 URL: https://svnweb.freebsd.org/changeset/base/313283 Log: Fix linux_pipe() and linux_pipe2() to close file descriptors on copyout error. Reviewed by: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9425 Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Feb 5 13:37:23 2017 (r313282) +++ head/sys/compat/linux/linux_file.c Sun Feb 5 14:03:25 2017 (r313283) @@ -1537,11 +1537,16 @@ linux_pipe(struct thread *td, struct lin #endif error = kern_pipe(td, fildes, 0, NULL, NULL); - if (error) + if (error != 0) return (error); - /* XXX: Close descriptors on error. */ - return (copyout(fildes, args->pipefds, sizeof(fildes))); + error = copyout(fildes, args->pipefds, sizeof(fildes)); + if (error != 0) { + (void)kern_close(td, fildes[0]); + (void)kern_close(td, fildes[1]); + } + + return (error); } int @@ -1564,11 +1569,16 @@ linux_pipe2(struct thread *td, struct li if ((args->flags & LINUX_O_CLOEXEC) != 0) flags |= O_CLOEXEC; error = kern_pipe(td, fildes, flags, NULL, NULL); - if (error) + if (error != 0) return (error); - /* XXX: Close descriptors on error. */ - return (copyout(fildes, args->pipefds, sizeof(fildes))); + error = copyout(fildes, args->pipefds, sizeof(fildes)); + if (error != 0) { + (void)kern_close(td, fildes[0]); + (void)kern_close(td, fildes[1]); + } + + return (error); } int From owner-svn-src-all@freebsd.org Sun Feb 5 14:17:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D101CD2626; Sun, 5 Feb 2017 14:17:12 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A23110A0; Sun, 5 Feb 2017 14:17:11 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15EHAJ3006051; Sun, 5 Feb 2017 14:17:10 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15EHAC7006044; Sun, 5 Feb 2017 14:17:10 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702051417.v15EHAC7006044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 5 Feb 2017 14:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313284 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 14:17:12 -0000 Author: dchagin Date: Sun Feb 5 14:17:09 2017 New Revision: 313284 URL: https://svnweb.freebsd.org/changeset/base/313284 Log: Update syscall.master to 4.10-rc6. Also fix comments, a typo, and wrong numbering for a few unimplemented syscalls. For 32-bit Linuxulator, socketcall() syscall was historically the entry point for the sockets API. Starting in Linux 4.3, direct syscalls are provided for the sockets API. Enable it. The initial version of patch was provided by trasz@ and extended by me. Submitted by: trasz MFC after: 2 week Differential Revision: https://reviews.freebsd.org/D9381 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/compat/linux/linux_socket.h head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux/linux_dummy.c Sun Feb 5 14:17:09 2017 (r313284) @@ -82,41 +82,86 @@ DUMMY(mq_timedreceive); DUMMY(mq_notify); DUMMY(mq_getsetattr); DUMMY(kexec_load); +/* linux 2.6.11: */ DUMMY(add_key); DUMMY(request_key); DUMMY(keyctl); +/* linux 2.6.13: */ DUMMY(ioprio_set); DUMMY(ioprio_get); DUMMY(inotify_init); DUMMY(inotify_add_watch); DUMMY(inotify_rm_watch); +/* linux 2.6.16: */ DUMMY(migrate_pages); DUMMY(unshare); +/* linux 2.6.17: */ DUMMY(splice); DUMMY(tee); DUMMY(sync_file_range); DUMMY(vmsplice); +/* linux 2.6.18: */ DUMMY(move_pages); +/* linux 2.6.22: */ DUMMY(signalfd); -DUMMY(timerfd); +DUMMY(timerfd_create); +/* linux 2.6.25: */ DUMMY(timerfd_settime); DUMMY(timerfd_gettime); +/* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ DUMMY(preadv); DUMMY(pwritev); -DUMMY(rt_tsigqueueinfo); +/* linux 2.6.31: */ +DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); +/* linux 2.6.38: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); +/* linux 2.6.39: */ DUMMY(name_to_handle_at); DUMMY(open_by_handle_at); DUMMY(clock_adjtime); +/* linux 3.0: */ DUMMY(setns); +DUMMY(getcpu); +/* linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); +/* linux 3.5: */ DUMMY(kcmp); +/* linux 3.8: */ DUMMY(finit_module); +DUMMY(sched_setattr); +DUMMY(sched_getattr); +/* linux 3.14: */ +DUMMY(renameat2); +/* linux 3.15: */ +DUMMY(seccomp); +DUMMY(getrandom); +DUMMY(memfd_create); +DUMMY(kexec_file_load); +/* linux 3.18: */ +DUMMY(bpf); +/* linux 3.19: */ +DUMMY(execveat); +/* linux 4.2: */ +DUMMY(userfaultfd); +/* linux 4.3: */ +DUMMY(membarrier); +/* linux 4.4: */ +DUMMY(mlock2); +/* linux 4.5: */ +DUMMY(copy_file_range); +/* linux 4.6: */ +DUMMY(preadv2); +DUMMY(pwritev2); +/* linux 4.8: */ +DUMMY(pkey_mprotect); +DUMMY(pkey_alloc); +DUMMY(pkey_free); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux/syscalls.master Sun Feb 5 14:17:09 2017 (r313284) @@ -11,18 +11,20 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL +; type one of STD, NOPROTO, UNIMPL ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different ; alttag name of args struct tag if different from [o]`name'"_args" ; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments +; for UNIMPL, name continues with comments ; types: ; STD always included -; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only +; NOPROTO same as STD except do not create structure or +; function prototype in sys/sysproto.h. Does add a +; definition to syscall.h besides adding a sysent. #include #include @@ -369,7 +371,7 @@ 206 AUE_NULL UNIMPL linux_io_setup 207 AUE_NULL UNIMPL linux_io_destroy 208 AUE_NULL UNIMPL linux_io_getevents -209 AUE_NULL UNIMPL inux_io_submit +209 AUE_NULL UNIMPL linux_io_submit 210 AUE_NULL UNIMPL linux_io_cancel 211 AUE_NULL UNIMPL linux_get_thread_area 212 AUE_NULL STD { int linux_lookup_dcookie(void); } @@ -473,7 +475,7 @@ 281 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ l_int maxevents, l_int timeout, l_sigset_t *mask); } 282 AUE_NULL STD { int linux_signalfd(void); } -283 AUE_NULL STD { int linux_timerfd(void); } +283 AUE_NULL STD { int linux_timerfd_create(void); } 284 AUE_NULL STD { int linux_eventfd(l_uint initval); } 285 AUE_NULL STD { int linux_fallocate(l_int fd, l_int mode, \ l_loff_t offset, l_loff_t len); } @@ -481,35 +483,114 @@ 287 AUE_NULL STD { int linux_timerfd_gettime(void); } 288 AUE_ACCEPT STD { int linux_accept4(l_int s, l_uintptr_t addr, \ l_uintptr_t namelen, int flags); } +; linux 2.6.27: 289 AUE_NULL STD { int linux_signalfd4(void); } 290 AUE_NULL STD { int linux_eventfd2(l_uint initval, l_int flags); } 291 AUE_NULL STD { int linux_epoll_create1(l_int flags); } 292 AUE_NULL STD { int linux_dup3(l_int oldfd, \ l_int newfd, l_int flags); } 293 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } -294 AUE_NULL STD { int linux_inotify_init1(void); } -295 AUE_NULL STD { int linux_preadv(void); } -296 AUE_NULL STD { int linux_pwritev(void); } -297 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +294 AUE_NULL STD { int linux_inotify_init1(l_int flags); } +; linux 2.6.30: +295 AUE_NULL STD { int linux_preadv(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +296 AUE_NULL STD { int linux_pwritev(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +; linux 2.6.31: +297 AUE_NULL STD { int linux_rt_tgsigqueueinfo(l_pid_t tgid, \ + l_pid_t tid, l_int sig, l_siginfo_t *uinfo); } 298 AUE_NULL STD { int linux_perf_event_open(void); } +; linux 2.6.33: 299 AUE_NULL STD { int linux_recvmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags, struct l_timespec *timeout); } +; linux 2.6.37: 300 AUE_NULL STD { int linux_fanotify_init(void); } 301 AUE_NULL STD { int linux_fanotify_mark(void); } +; linux 2.6.36: 302 AUE_NULL STD { int linux_prlimit64(l_pid_t pid, l_uint resource, \ struct rlimit *new, struct rlimit *old); } +; linux 2.6.39 (glibc 2.14): 303 AUE_NULL STD { int linux_name_to_handle_at(void); } 304 AUE_NULL STD { int linux_open_by_handle_at(void); } 305 AUE_NULL STD { int linux_clock_adjtime(void); } 306 AUE_SYNC STD { int linux_syncfs(l_int fd); } +; linux 3.0 (glibc 2.14): 307 AUE_NULL STD { int linux_sendmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags); } -308 AUE_NULL STD { int linux_setns(void); } -309 AUE_NULL STD { int linux_process_vm_readv(void); } -310 AUE_NULL STD { int linux_process_vm_writev(void); } -311 AUE_NULL STD { int linux_kcmp(void); } -312 AUE_NULL STD { int linux_finit_module(void); } +308 AUE_NULL STD { int linux_setns(l_int fd, l_int nstype); } +; linux 2.6.19 (no glibc wrapper): +309 AUE_NULL STD { int linux_getcpu(l_uint *cpu, l_uint *node, \ + void *cache); } +; linux 3.2 (glibc 2.15): +310 AUE_NULL STD { int linux_process_vm_readv(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +311 AUE_NULL STD { int linux_process_vm_writev(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +; linux 3.5 (no glibc wrapper): +312 AUE_NULL STD { int linux_kcmp(l_pid_t pid1, l_pid_t pid2, \ + l_int type, l_ulong idx1, l_ulong idx); } +; linux 3.8 (no glibc wrapper): +313 AUE_NULL STD { int linux_finit_module(l_int fd, \ + const char *uargs, l_int flags); } +; linux 3.14: +314 AUE_NULL STD { int linux_sched_setattr(l_pid_t pid, \ + void *attr, l_uint flags); } +315 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ + void *attr, l_uint size, l_uint flags); } +; linux 3.15: +316 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ + const char *oldname, l_int newfd, \ + const char *newname, unsigned int flags); } +; linux 3.17: +317 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ + const char *uargs); } +318 AUE_NULL STD { int linux_getrandom(char *buf, \ + l_size_t count, l_uint flags); } +319 AUE_NULL STD { int linux_memfd_create(const char *uname_ptr, \ + l_uint flags); } +320 AUE_NULL STD { int linux_kexec_file_load(l_int kernel_fd, \ + l_int initrd_fd, l_ulong cmdline_len, \ + const char *cmdline_ptr, l_ulong flags); } +; linux 3.18: +321 AUE_NULL STD { int linux_bpf(l_int cmd, void *attr, \ + l_uint size); } +; linux 3.19: +322 AUE_NULL STD { int linux_execveat(l_int dfd, \ + const char *filename, const char **argv, \ + const char **envp, l_int flags); } +; linux 4.2: +323 AUE_NULL STD { int linux_userfaultfd(l_int flags); } +; linux 4.3: +324 AUE_NULL STD { int linux_membarrier(l_int cmd, l_int flags); } +; linux 4.4: +325 AUE_NULL STD { int linux_mlock2(l_ulong start, l_size_t len, \ + l_int flags); } +; linux 4.5: +326 AUE_NULL STD { int linux_copy_file_range(l_int fd_in, \ + l_loff_t *off_in, l_int fd_out, \ + l_loff_t *off_out, l_size_t len, \ + l_uint flags); } +; linux 4.6: +327 AUE_NULL STD { int linux_preadv2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +328 AUE_NULL STD { int linux_pwritev2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +; linux 4.8: +329 AUE_NULL STD { int linux_pkey_mprotect(l_ulong start, \ + l_size_t len, l_ulong prot, l_int pkey); } +330 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ + l_ulong init_val); } +331 AUE_NULL STD { int linux_pkey_free(l_int pkey); } + ; please, keep this line at the end. -313 AUE_NULL UNIMPL nosys +332 AUE_NULL UNIMPL nosys Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux32/linux32_dummy.c Sun Feb 5 14:17:09 2017 (r313284) @@ -114,18 +114,51 @@ DUMMY(inotify_init1); DUMMY(preadv); DUMMY(pwritev); /* linux 2.6.31: */ -DUMMY(rt_tsigqueueinfo); +DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); -/* later: */ +/* linux 2.6.39: */ DUMMY(name_to_handle_at); DUMMY(open_by_handle_at); DUMMY(clock_adjtime); +/* linux 3.0: */ DUMMY(setns); +/* linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); +/* linux 3.5: */ +DUMMY(kcmp); +/* linux 3.8: */ +DUMMY(finit_module); +DUMMY(sched_setattr); +DUMMY(sched_getattr); +/* linux 3.14: */ +DUMMY(renameat2); +/* linux 3.15: */ +DUMMY(seccomp); +DUMMY(getrandom); +DUMMY(memfd_create); +/* linux 3.18: */ +DUMMY(bpf); +/* linux 3.19: */ +DUMMY(execveat); +/* linux 4.2: */ +DUMMY(userfaultfd); +/* linux 4.3: */ +DUMMY(membarrier); +/* linux 4.4: */ +DUMMY(mlock2); +/* linux 4.5: */ +DUMMY(copy_file_range); +/* linux 4.6: */ +DUMMY(preadv2); +DUMMY(pwritev2); +/* linux 4.8: */ +DUMMY(pkey_mprotect); +DUMMY(pkey_alloc); +DUMMY(pkey_free); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/amd64/linux32/syscalls.master Sun Feb 5 14:17:09 2017 (r313284) @@ -11,18 +11,20 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL +; type one of STD, NOPROTO, UNIMPL ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different ; alttag name of args struct tag if different from [o]`name'"_args" ; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments +; for UNIMPL, name continues with comments ; types: ; STD always included -; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only +; NOPROTO same as STD except do not create structure or +; function prototype in sys/sysproto.h. Does add a +; definition to syscall.h besides adding a sysent. #include "opt_compat.h" #include @@ -553,10 +555,15 @@ 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } ; linux 2.6.30: -333 AUE_NULL STD { int linux_preadv(void); } -334 AUE_NULL STD { int linux_pwritev(void); } +333 AUE_NULL STD { int linux_preadv(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +334 AUE_NULL STD { int linux_pwritev(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } ; linux 2.6.31: -335 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +335 AUE_NULL STD { int linux_rt_tgsigqueueinfo(l_pid_t tgid, \ + l_pid_t tid, l_int sig, l_siginfo_t *uinfo); } 336 AUE_NULL STD { int linux_perf_event_open(void); } ; linux 2.6.33: 337 AUE_NULL STD { int linux_recvmmsg(l_int s, \ @@ -569,16 +576,113 @@ l_uint resource, \ struct rlimit *new, \ struct rlimit *old); } -; later: +; linux 2.6.39: 341 AUE_NULL STD { int linux_name_to_handle_at(void); } 342 AUE_NULL STD { int linux_open_by_handle_at(void); } 343 AUE_NULL STD { int linux_clock_adjtime(void); } 344 AUE_SYNC STD { int linux_syncfs(l_int fd); } +; linux 3.0: 345 AUE_NULL STD { int linux_sendmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags); } 346 AUE_NULL STD { int linux_setns(void); } -347 AUE_NULL STD { int linux_process_vm_readv(void); } -348 AUE_NULL STD { int linux_process_vm_writev(void); } +; linux 3.2 (glibc 2.15): +347 AUE_NULL STD { int linux_process_vm_readv(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +348 AUE_NULL STD { int linux_process_vm_writev(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +; linux 3.5 (no glibc wrapper): +349 AUE_NULL STD { int linux_kcmp(l_pid_t pid1, l_pid_t pid2, \ + l_int type, l_ulong idx1, l_ulong idx); } +; linux 3.8 (no glibc wrapper): +350 AUE_NULL STD { int linux_finit_module(l_int fd, \ + const char *uargs, l_int flags); } +; linux 3.14: +351 AUE_NULL STD { int linux_sched_setattr(l_pid_t pid, \ + void *attr, l_uint flags); } +352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ + void *attr, l_uint size, l_uint flags); } +; linux 3.15: +353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ + const char *oldname, l_int newfd, \ + const char *newname, unsigned int flags); } +; linux 3.17: +354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ + const char *uargs); } +355 AUE_NULL STD { int linux_getrandom(char *buf, \ + l_size_t count, l_uint flags); } +356 AUE_NULL STD { int linux_memfd_create(const char *uname_ptr, \ + l_uint flags); } +; linux 3.18: +357 AUE_NULL STD { int linux_bpf(l_int cmd, void *attr, \ + l_uint size); } +; linux 3.19: +358 AUE_NULL STD { int linux_execveat(l_int dfd, \ + const char *filename, const char **argv, \ + const char **envp, l_int flags); } +; linux 4.3: sockets now direct system calls: +359 AUE_SOCKET STD { int linux_socket(l_int domain, l_int type, \ + l_int protocol); } +360 AUE_SOCKETPAIR STD { int linux_socketpair(l_int domain, \ + l_int type, l_int protocol, l_uintptr_t rsv); } +361 AUE_BIND STD { int linux_bind(l_int s, l_uintptr_t name, \ + l_int namelen); } +362 AUE_CONNECT STD { int linux_connect(l_int s, l_uintptr_t name, \ + l_int namelen); } +363 AUE_LISTEN STD { int linux_listen(l_int s, l_int backlog); } +364 AUE_ACCEPT STD { int linux_accept4(l_int s, l_uintptr_t addr, \ + l_uintptr_t namelen, l_int flags); } +365 AUE_GETSOCKOPT STD { int linux_getsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_uintptr_t optlen); } +366 AUE_SETSOCKOPT STD { int linux_setsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_int optlen); } +367 AUE_GETSOCKNAME STD { int linux_getsockname(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +368 AUE_GETPEERNAME STD { int linux_getpeername(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +369 AUE_SENDTO STD { int linux_sendto(l_int s, l_uintptr_t msg, \ + l_int len, l_int flags, l_uintptr_t to, \ + l_int tolen); } +370 AUE_SENDMSG STD { int linux_sendmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +371 AUE_RECVFROM STD { int linux_recvfrom(l_int s, l_uintptr_t buf, \ + l_size_t len, l_int flags, l_uintptr_t from, \ + l_uintptr_t fromlen); } +372 AUE_RECVMSG STD { int linux_recvmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +373 AUE_NULL STD { int linux_shutdown(l_int s, l_int how); } +; +; linux 4.2: +374 AUE_NULL STD { int linux_userfaultfd(l_int flags); } +; linux 4.3: +375 AUE_NULL STD { int linux_membarrier(l_int cmd, l_int flags); } +; linux 4.4: +376 AUE_NULL STD { int linux_mlock2(l_ulong start, l_size_t len, \ + l_int flags); } +; linux 4.5: +377 AUE_NULL STD { int linux_copy_file_range(l_int fd_in, \ + l_loff_t *off_in, l_int fd_out, \ + l_loff_t *off_out, l_size_t len, \ + l_uint flags); } +; linux 4.6: +378 AUE_NULL STD { int linux_preadv2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +379 AUE_NULL STD { int linux_pwritev2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +; linux 4.8: +380 AUE_NULL STD { int linux_pkey_mprotect(l_ulong start, \ + l_size_t len, l_ulong prot, l_int pkey); } +381 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ + l_ulong init_val); } +382 AUE_NULL STD { int linux_pkey_free(l_int pkey); } + ; please, keep this line at the end. -349 AUE_NULL UNIMPL nosys +383 AUE_NULL UNIMPL nosys Modified: head/sys/compat/linux/linux_socket.h ============================================================================== --- head/sys/compat/linux/linux_socket.h Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/compat/linux/linux_socket.h Sun Feb 5 14:17:09 2017 (r313284) @@ -142,131 +142,18 @@ struct l_ucred { #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) -struct linux_sendto_args { - int s; - l_uintptr_t msg; - int len; - int flags; - l_uintptr_t to; - int tolen; -}; - -struct linux_socket_args { - int domain; - int type; - int protocol; -}; - -struct linux_bind_args { - int s; - l_uintptr_t name; - int namelen; -}; - -struct linux_connect_args { - int s; - l_uintptr_t name; - int namelen; -}; - -struct linux_listen_args { - int s; - int backlog; -}; - struct linux_accept_args { int s; l_uintptr_t addr; l_uintptr_t namelen; }; -struct linux_accept4_args { - int s; - l_uintptr_t addr; - l_uintptr_t namelen; - int flags; -}; - -struct linux_getsockname_args { - int s; - l_uintptr_t addr; - l_uintptr_t namelen; -}; - -struct linux_getpeername_args { - int s; - l_uintptr_t addr; - l_uintptr_t namelen; -}; - -struct linux_socketpair_args { - int domain; - int type; - int protocol; - l_uintptr_t rsv; -}; - -struct linux_recvfrom_args { - int s; - l_uintptr_t buf; - int len; - int flags; - l_uintptr_t from; - l_uintptr_t fromlen; -}; - -struct linux_sendmsg_args { - int s; - l_uintptr_t msg; - int flags; -}; - -struct linux_recvmsg_args { - int s; - l_uintptr_t msg; - int flags; -}; - -struct linux_shutdown_args { - int s; - int how; -}; - -struct linux_setsockopt_args { - int s; - int level; - int optname; - l_uintptr_t optval; - int optlen; -}; - -struct linux_getsockopt_args { - int s; - int level; - int optname; - l_uintptr_t optval; - l_uintptr_t optlen; -}; - -int linux_socket(struct thread *td, struct linux_socket_args *args); -int linux_bind(struct thread *td, struct linux_bind_args *args); -int linux_connect(struct thread *, struct linux_connect_args *); -int linux_listen(struct thread *td, struct linux_listen_args *args); int linux_accept(struct thread *td, struct linux_accept_args *args); -int linux_accept4(struct thread *td, struct linux_accept4_args *args); -int linux_getsockname(struct thread *td, struct linux_getsockname_args *args); -int linux_getpeername(struct thread *td, struct linux_getpeername_args *args); -int linux_socketpair(struct thread *td, struct linux_socketpair_args *args); -int linux_sendto(struct thread *td, struct linux_sendto_args *args); -int linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args); -int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args); -int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args); -int linux_shutdown(struct thread *td, struct linux_shutdown_args *args); -int linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args); -int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args); #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ + + /* Operations for socketcall */ #define LINUX_SOCKET 1 Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/i386/linux/linux_dummy.c Sun Feb 5 14:17:09 2017 (r313284) @@ -109,19 +109,52 @@ DUMMY(inotify_init1); /* linux 2.6.30: */ DUMMY(preadv); DUMMY(pwritev); -/* linux 2.6.31 */ -DUMMY(rt_tsigqueueinfo); +/* linux 2.6.31: */ +DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); -/* later: */ +/* linux 2.6.39: */ DUMMY(name_to_handle_at); DUMMY(open_by_handle_at); DUMMY(clock_adjtime); +/* linux 3.0: */ DUMMY(setns); +/* linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); +/* linux 3.5: */ +DUMMY(kcmp); +/* linux 3.8: */ +DUMMY(finit_module); +DUMMY(sched_setattr); +DUMMY(sched_getattr); +/* linux 3.14: */ +DUMMY(renameat2); +/* linux 3.15: */ +DUMMY(seccomp); +DUMMY(getrandom); +DUMMY(memfd_create); +/* linux 3.18: */ +DUMMY(bpf); +/* linux 3.19: */ +DUMMY(execveat); +/* linux 4.2: */ +DUMMY(userfaultfd); +/* linux 4.3: */ +DUMMY(membarrier); +/* linux 4.4: */ +DUMMY(mlock2); +/* linux 4.5: */ +DUMMY(copy_file_range); +/* linux 4.6: */ +DUMMY(preadv2); +DUMMY(pwritev2); +/* linux 4.8: */ +DUMMY(pkey_mprotect); +DUMMY(pkey_alloc); +DUMMY(pkey_free); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sun Feb 5 14:03:25 2017 (r313283) +++ head/sys/i386/linux/syscalls.master Sun Feb 5 14:17:09 2017 (r313284) @@ -11,18 +11,20 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL +; type one of STD, NOPROTO, UNIMPL ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different ; alttag name of args struct tag if different from [o]`name'"_args" ; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments +; for UNIMPL, name continues with comments ; types: ; STD always included -; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only +; NOPROTO same as STD except do not create structure or +; function prototype in sys/sysproto.h. Does add a +; definition to syscall.h besides adding a sysent. #include #include @@ -561,10 +563,15 @@ 331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } ; linux 2.6.30: -333 AUE_NULL STD { int linux_preadv(void); } -334 AUE_NULL STD { int linux_pwritev(void); } +333 AUE_NULL STD { int linux_preadv(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } +334 AUE_NULL STD { int linux_pwritev(l_ulong fd, \ + struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h); } ; linux 2.6.31: -335 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +335 AUE_NULL STD { int linux_rt_tgsigqueueinfo(l_pid_t tgid, \ + l_pid_t tid, l_int sig, l_siginfo_t *uinfo); } 336 AUE_NULL STD { int linux_perf_event_open(void); } ; linux 2.6.33: 337 AUE_NULL STD { int linux_recvmmsg(l_int s, \ @@ -577,16 +584,112 @@ l_uint resource, \ struct rlimit *new, \ struct rlimit *old); } -; later: +; linux 2.6.39: 341 AUE_NULL STD { int linux_name_to_handle_at(void); } 342 AUE_NULL STD { int linux_open_by_handle_at(void); } 343 AUE_NULL STD { int linux_clock_adjtime(void); } 344 AUE_SYNC STD { int linux_syncfs(l_int fd); } +; linux 3.0: 345 AUE_NULL STD { int linux_sendmmsg(l_int s, \ struct l_mmsghdr *msg, l_uint vlen, \ l_uint flags); } 346 AUE_NULL STD { int linux_setns(void); } -347 AUE_NULL STD { int linux_process_vm_readv(void); } -348 AUE_NULL STD { int linux_process_vm_writev(void); } +; linux 3.2 (glibc 2.15): +347 AUE_NULL STD { int linux_process_vm_readv(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +348 AUE_NULL STD { int linux_process_vm_writev(l_pid_t pid, \ + const struct iovec *lvec, l_ulong liovcnt, \ + const struct iovec *rvec, l_ulong riovcnt, \ + l_ulong flags); } +; linux 3.5 (no glibc wrapper): +349 AUE_NULL STD { int linux_kcmp(l_pid_t pid1, l_pid_t pid2, \ + l_int type, l_ulong idx1, l_ulong idx); } +; linux 3.8 (no glibc wrapper): +350 AUE_NULL STD { int linux_finit_module(l_int fd, \ + const char *uargs, l_int flags); } +; linux 3.14: +351 AUE_NULL STD { int linux_sched_setattr(l_pid_t pid, \ + void *attr, l_uint flags); } +352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ + void *attr, l_uint size, l_uint flags); } +; linux 3.15: +353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ + const char *oldname, l_int newfd, \ + const char *newname, unsigned int flags); } +; linux 3.17: +354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ + const char *uargs); } +355 AUE_NULL STD { int linux_getrandom(char *buf, \ + l_size_t count, l_uint flags); } +356 AUE_NULL STD { int linux_memfd_create(const char *uname_ptr, \ + l_uint flags); } +; linux 3.18: +357 AUE_NULL STD { int linux_bpf(l_int cmd, void *attr, \ + l_uint size); } +; linux 3.19: +358 AUE_NULL STD { int linux_execveat(l_int dfd, \ + const char *filename, const char **argv, \ + const char **envp, l_int flags); } +; linux 4.3: sockets now direct system calls: +359 AUE_SOCKET STD { int linux_socket(l_int domain, l_int type, \ + l_int protocol); } +360 AUE_SOCKETPAIR STD { int linux_socketpair(l_int domain, \ + l_int type, l_int protocol, l_uintptr_t rsv); } +361 AUE_BIND STD { int linux_bind(l_int s, l_uintptr_t name, \ + l_int namelen); } +362 AUE_CONNECT STD { int linux_connect(l_int s, l_uintptr_t name, \ + l_int namelen); } +363 AUE_LISTEN STD { int linux_listen(l_int s, l_int backlog); } +364 AUE_ACCEPT STD { int linux_accept4(l_int s, l_uintptr_t addr, \ + l_uintptr_t namelen, l_int flags); } +365 AUE_GETSOCKOPT STD { int linux_getsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_uintptr_t optlen); } +366 AUE_SETSOCKOPT STD { int linux_setsockopt(l_int s, l_int level, \ + l_int optname, l_uintptr_t optval, \ + l_int optlen); } +367 AUE_GETSOCKNAME STD { int linux_getsockname(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +368 AUE_GETPEERNAME STD { int linux_getpeername(l_int s, \ + l_uintptr_t addr, l_uintptr_t namelen); } +369 AUE_SENDTO STD { int linux_sendto(l_int s, l_uintptr_t msg, \ + l_int len, l_int flags, l_uintptr_t to, \ + l_int tolen); } +370 AUE_SENDMSG STD { int linux_sendmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +371 AUE_RECVFROM STD { int linux_recvfrom(l_int s, l_uintptr_t buf, \ + l_size_t len, l_int flags, l_uintptr_t from, \ + l_uintptr_t fromlen); } +372 AUE_RECVMSG STD { int linux_recvmsg(l_int s, l_uintptr_t msg, \ + l_int flags); } +373 AUE_NULL STD { int linux_shutdown(l_int s, l_int how); } +; linux 4.2: +374 AUE_NULL STD { int linux_userfaultfd(l_int flags); } +; linux 4.3: +375 AUE_NULL STD { int linux_membarrier(l_int cmd, l_int flags); } +; linux 4.4: +376 AUE_NULL STD { int linux_mlock2(l_ulong start, l_size_t len, \ + l_int flags); } +; linux 4.5: +377 AUE_NULL STD { int linux_copy_file_range(l_int fd_in, \ + l_loff_t *off_in, l_int fd_out, \ + l_loff_t *off_out, l_size_t len, \ + l_uint flags); } +; linux 4.6: +378 AUE_NULL STD { int linux_preadv2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +379 AUE_NULL STD { int linux_pwritev2(l_ulong fd, \ + const struct iovec *vec, l_ulong vlen, \ + l_ulong pos_l, l_ulong pos_h, l_int flags); } +; linux 4.8: +380 AUE_NULL STD { int linux_pkey_mprotect(l_ulong start, \ + l_size_t len, l_ulong prot, l_int pkey); } +381 AUE_NULL STD { int linux_pkey_alloc(l_ulong flags, \ + l_ulong init_val); } +382 AUE_NULL STD { int linux_pkey_free(l_int pkey); } + ; please, keep this line at the end. -349 AUE_NULL UNIMPL nosys +383 AUE_NULL UNIMPL nosys From owner-svn-src-all@freebsd.org Sun Feb 5 14:19:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4F17CD26D9; Sun, 5 Feb 2017 14:19:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71FC4128F; Sun, 5 Feb 2017 14:19:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15EJJD9006170; Sun, 5 Feb 2017 14:19:19 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15EJJil006164; Sun, 5 Feb 2017 14:19:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702051419.v15EJJil006164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 5 Feb 2017 14:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313285 - in head/sys: amd64/linux amd64/linux32 i386/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 14:19:20 -0000 Author: dchagin Date: Sun Feb 5 14:19:19 2017 New Revision: 313285 URL: https://svnweb.freebsd.org/changeset/base/313285 Log: Regen after r313284. MFC after: 2 week Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_syscall.h head/sys/amd64/linux/linux_syscalls.c head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_proto.h Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ @@ -1000,7 +1000,7 @@ struct linux_epoll_pwait_args { struct linux_signalfd_args { register_t dummy; }; -struct linux_timerfd_args { +struct linux_timerfd_create_args { register_t dummy; }; struct linux_eventfd_args { @@ -1044,16 +1044,27 @@ struct linux_pipe2_args { char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_inotify_init1_args { - register_t dummy; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_preadv_args { - register_t dummy; + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(struct iovec *)]; struct iovec * vec; char vec_r_[PADR_(struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; }; struct linux_pwritev_args { - register_t dummy; -}; -struct linux_rt_tsigqueueinfo_args { - register_t dummy; + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(struct iovec *)]; struct iovec * vec; char vec_r_[PADR_(struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; +}; +struct linux_rt_tgsigqueueinfo_args { + char tgid_l_[PADL_(l_pid_t)]; l_pid_t tgid; char tgid_r_[PADR_(l_pid_t)]; + char tid_l_[PADL_(l_pid_t)]; l_pid_t tid; char tid_r_[PADR_(l_pid_t)]; + char sig_l_[PADL_(l_int)]; l_int sig; char sig_r_[PADR_(l_int)]; + char uinfo_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * uinfo; char uinfo_r_[PADR_(l_siginfo_t *)]; }; struct linux_perf_event_open_args { register_t dummy; @@ -1096,19 +1107,141 @@ struct linux_sendmmsg_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_setns_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char nstype_l_[PADL_(l_int)]; l_int nstype; char nstype_r_[PADR_(l_int)]; +}; +struct linux_getcpu_args { + char cpu_l_[PADL_(l_uint *)]; l_uint * cpu; char cpu_r_[PADR_(l_uint *)]; + char node_l_[PADL_(l_uint *)]; l_uint * node; char node_r_[PADR_(l_uint *)]; + char cache_l_[PADL_(void *)]; void * cache; char cache_r_[PADR_(void *)]; }; struct linux_process_vm_readv_args { - register_t dummy; + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char lvec_l_[PADL_(const struct iovec *)]; const struct iovec * lvec; char lvec_r_[PADR_(const struct iovec *)]; + char liovcnt_l_[PADL_(l_ulong)]; l_ulong liovcnt; char liovcnt_r_[PADR_(l_ulong)]; + char rvec_l_[PADL_(const struct iovec *)]; const struct iovec * rvec; char rvec_r_[PADR_(const struct iovec *)]; + char riovcnt_l_[PADL_(l_ulong)]; l_ulong riovcnt; char riovcnt_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; }; struct linux_process_vm_writev_args { - register_t dummy; + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char lvec_l_[PADL_(const struct iovec *)]; const struct iovec * lvec; char lvec_r_[PADR_(const struct iovec *)]; + char liovcnt_l_[PADL_(l_ulong)]; l_ulong liovcnt; char liovcnt_r_[PADR_(l_ulong)]; + char rvec_l_[PADL_(const struct iovec *)]; const struct iovec * rvec; char rvec_r_[PADR_(const struct iovec *)]; + char riovcnt_l_[PADL_(l_ulong)]; l_ulong riovcnt; char riovcnt_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; }; struct linux_kcmp_args { - register_t dummy; + char pid1_l_[PADL_(l_pid_t)]; l_pid_t pid1; char pid1_r_[PADR_(l_pid_t)]; + char pid2_l_[PADL_(l_pid_t)]; l_pid_t pid2; char pid2_r_[PADR_(l_pid_t)]; + char type_l_[PADL_(l_int)]; l_int type; char type_r_[PADR_(l_int)]; + char idx1_l_[PADL_(l_ulong)]; l_ulong idx1; char idx1_r_[PADR_(l_ulong)]; + char idx_l_[PADL_(l_ulong)]; l_ulong idx; char idx_r_[PADR_(l_ulong)]; }; struct linux_finit_module_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char uargs_l_[PADL_(const char *)]; const char * uargs; char uargs_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_sched_setattr_args { + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char attr_l_[PADL_(void *)]; void * attr; char attr_r_[PADR_(void *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_sched_getattr_args { + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; + char attr_l_[PADL_(void *)]; void * attr; char attr_r_[PADR_(void *)]; + char size_l_[PADL_(l_uint)]; l_uint size; char size_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_renameat2_args { + char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; + char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; + char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; +}; +struct linux_seccomp_args { + char op_l_[PADL_(l_uint)]; l_uint op; char op_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; + char uargs_l_[PADL_(const char *)]; const char * uargs; char uargs_r_[PADR_(const char *)]; +}; +struct linux_getrandom_args { + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_memfd_create_args { + char uname_ptr_l_[PADL_(const char *)]; const char * uname_ptr; char uname_ptr_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_kexec_file_load_args { + char kernel_fd_l_[PADL_(l_int)]; l_int kernel_fd; char kernel_fd_r_[PADR_(l_int)]; + char initrd_fd_l_[PADL_(l_int)]; l_int initrd_fd; char initrd_fd_r_[PADR_(l_int)]; + char cmdline_len_l_[PADL_(l_ulong)]; l_ulong cmdline_len; char cmdline_len_r_[PADR_(l_ulong)]; + char cmdline_ptr_l_[PADL_(const char *)]; const char * cmdline_ptr; char cmdline_ptr_r_[PADR_(const char *)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; +}; +struct linux_bpf_args { + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char attr_l_[PADL_(void *)]; void * attr; char attr_r_[PADR_(void *)]; + char size_l_[PADL_(l_uint)]; l_uint size; char size_r_[PADR_(l_uint)]; +}; +struct linux_execveat_args { + char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; + char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; + char argv_l_[PADL_(const char **)]; const char ** argv; char argv_r_[PADR_(const char **)]; + char envp_l_[PADL_(const char **)]; const char ** envp; char envp_r_[PADR_(const char **)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_userfaultfd_args { + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_membarrier_args { + char cmd_l_[PADL_(l_int)]; l_int cmd; char cmd_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_mlock2_args { + char start_l_[PADL_(l_ulong)]; l_ulong start; char start_r_[PADR_(l_ulong)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_copy_file_range_args { + char fd_in_l_[PADL_(l_int)]; l_int fd_in; char fd_in_r_[PADR_(l_int)]; + char off_in_l_[PADL_(l_loff_t *)]; l_loff_t * off_in; char off_in_r_[PADR_(l_loff_t *)]; + char fd_out_l_[PADL_(l_int)]; l_int fd_out; char fd_out_r_[PADR_(l_int)]; + char off_out_l_[PADL_(l_loff_t *)]; l_loff_t * off_out; char off_out_r_[PADR_(l_loff_t *)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; +}; +struct linux_preadv2_args { + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(const struct iovec *)]; const struct iovec * vec; char vec_r_[PADR_(const struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_pwritev2_args { + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char vec_l_[PADL_(const struct iovec *)]; const struct iovec * vec; char vec_r_[PADR_(const struct iovec *)]; + char vlen_l_[PADL_(l_ulong)]; l_ulong vlen; char vlen_r_[PADR_(l_ulong)]; + char pos_l_l_[PADL_(l_ulong)]; l_ulong pos_l; char pos_l_r_[PADR_(l_ulong)]; + char pos_h_l_[PADL_(l_ulong)]; l_ulong pos_h; char pos_h_r_[PADR_(l_ulong)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; +}; +struct linux_pkey_mprotect_args { + char start_l_[PADL_(l_ulong)]; l_ulong start; char start_r_[PADR_(l_ulong)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char prot_l_[PADL_(l_ulong)]; l_ulong prot; char prot_r_[PADR_(l_ulong)]; + char pkey_l_[PADL_(l_int)]; l_int pkey; char pkey_r_[PADR_(l_int)]; +}; +struct linux_pkey_alloc_args { + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; + char init_val_l_[PADL_(l_ulong)]; l_ulong init_val; char init_val_r_[PADR_(l_ulong)]; +}; +struct linux_pkey_free_args { + char pkey_l_[PADL_(l_int)]; l_int pkey; char pkey_r_[PADR_(l_int)]; }; #define nosys linux_nosys int linux_open(struct thread *, struct linux_open_args *); @@ -1339,7 +1472,7 @@ int linux_move_pages(struct thread *, st int linux_utimensat(struct thread *, struct linux_utimensat_args *); int linux_epoll_pwait(struct thread *, struct linux_epoll_pwait_args *); int linux_signalfd(struct thread *, struct linux_signalfd_args *); -int linux_timerfd(struct thread *, struct linux_timerfd_args *); +int linux_timerfd_create(struct thread *, struct linux_timerfd_create_args *); int linux_eventfd(struct thread *, struct linux_eventfd_args *); int linux_fallocate(struct thread *, struct linux_fallocate_args *); int linux_timerfd_settime(struct thread *, struct linux_timerfd_settime_args *); @@ -1353,7 +1486,7 @@ int linux_pipe2(struct thread *, struct int linux_inotify_init1(struct thread *, struct linux_inotify_init1_args *); int linux_preadv(struct thread *, struct linux_preadv_args *); int linux_pwritev(struct thread *, struct linux_pwritev_args *); -int linux_rt_tsigqueueinfo(struct thread *, struct linux_rt_tsigqueueinfo_args *); +int linux_rt_tgsigqueueinfo(struct thread *, struct linux_rt_tgsigqueueinfo_args *); int linux_perf_event_open(struct thread *, struct linux_perf_event_open_args *); int linux_recvmmsg(struct thread *, struct linux_recvmmsg_args *); int linux_fanotify_init(struct thread *, struct linux_fanotify_init_args *); @@ -1365,10 +1498,29 @@ int linux_clock_adjtime(struct thread *, int linux_syncfs(struct thread *, struct linux_syncfs_args *); int linux_sendmmsg(struct thread *, struct linux_sendmmsg_args *); int linux_setns(struct thread *, struct linux_setns_args *); +int linux_getcpu(struct thread *, struct linux_getcpu_args *); int linux_process_vm_readv(struct thread *, struct linux_process_vm_readv_args *); int linux_process_vm_writev(struct thread *, struct linux_process_vm_writev_args *); int linux_kcmp(struct thread *, struct linux_kcmp_args *); int linux_finit_module(struct thread *, struct linux_finit_module_args *); +int linux_sched_setattr(struct thread *, struct linux_sched_setattr_args *); +int linux_sched_getattr(struct thread *, struct linux_sched_getattr_args *); +int linux_renameat2(struct thread *, struct linux_renameat2_args *); +int linux_seccomp(struct thread *, struct linux_seccomp_args *); +int linux_getrandom(struct thread *, struct linux_getrandom_args *); +int linux_memfd_create(struct thread *, struct linux_memfd_create_args *); +int linux_kexec_file_load(struct thread *, struct linux_kexec_file_load_args *); +int linux_bpf(struct thread *, struct linux_bpf_args *); +int linux_execveat(struct thread *, struct linux_execveat_args *); +int linux_userfaultfd(struct thread *, struct linux_userfaultfd_args *); +int linux_membarrier(struct thread *, struct linux_membarrier_args *); +int linux_mlock2(struct thread *, struct linux_mlock2_args *); +int linux_copy_file_range(struct thread *, struct linux_copy_file_range_args *); +int linux_preadv2(struct thread *, struct linux_preadv2_args *); +int linux_pwritev2(struct thread *, struct linux_pwritev2_args *); +int linux_pkey_mprotect(struct thread *, struct linux_pkey_mprotect_args *); +int linux_pkey_alloc(struct thread *, struct linux_pkey_alloc_args *); +int linux_pkey_free(struct thread *, struct linux_pkey_free_args *); #ifdef COMPAT_43 @@ -1632,7 +1784,7 @@ int linux_finit_module(struct thread *, #define LINUX_SYS_AUE_linux_utimensat AUE_FUTIMESAT #define LINUX_SYS_AUE_linux_epoll_pwait AUE_NULL #define LINUX_SYS_AUE_linux_signalfd AUE_NULL -#define LINUX_SYS_AUE_linux_timerfd AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_create AUE_NULL #define LINUX_SYS_AUE_linux_eventfd AUE_NULL #define LINUX_SYS_AUE_linux_fallocate AUE_NULL #define LINUX_SYS_AUE_linux_timerfd_settime AUE_NULL @@ -1646,7 +1798,7 @@ int linux_finit_module(struct thread *, #define LINUX_SYS_AUE_linux_inotify_init1 AUE_NULL #define LINUX_SYS_AUE_linux_preadv AUE_NULL #define LINUX_SYS_AUE_linux_pwritev AUE_NULL -#define LINUX_SYS_AUE_linux_rt_tsigqueueinfo AUE_NULL +#define LINUX_SYS_AUE_linux_rt_tgsigqueueinfo AUE_NULL #define LINUX_SYS_AUE_linux_perf_event_open AUE_NULL #define LINUX_SYS_AUE_linux_recvmmsg AUE_NULL #define LINUX_SYS_AUE_linux_fanotify_init AUE_NULL @@ -1658,10 +1810,29 @@ int linux_finit_module(struct thread *, #define LINUX_SYS_AUE_linux_syncfs AUE_SYNC #define LINUX_SYS_AUE_linux_sendmmsg AUE_NULL #define LINUX_SYS_AUE_linux_setns AUE_NULL +#define LINUX_SYS_AUE_linux_getcpu AUE_NULL #define LINUX_SYS_AUE_linux_process_vm_readv AUE_NULL #define LINUX_SYS_AUE_linux_process_vm_writev AUE_NULL #define LINUX_SYS_AUE_linux_kcmp AUE_NULL #define LINUX_SYS_AUE_linux_finit_module AUE_NULL +#define LINUX_SYS_AUE_linux_sched_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_sched_getattr AUE_NULL +#define LINUX_SYS_AUE_linux_renameat2 AUE_NULL +#define LINUX_SYS_AUE_linux_seccomp AUE_NULL +#define LINUX_SYS_AUE_linux_getrandom AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_create AUE_NULL +#define LINUX_SYS_AUE_linux_kexec_file_load AUE_NULL +#define LINUX_SYS_AUE_linux_bpf AUE_NULL +#define LINUX_SYS_AUE_linux_execveat AUE_NULL +#define LINUX_SYS_AUE_linux_userfaultfd AUE_NULL +#define LINUX_SYS_AUE_linux_membarrier AUE_NULL +#define LINUX_SYS_AUE_linux_mlock2 AUE_NULL +#define LINUX_SYS_AUE_linux_copy_file_range AUE_NULL +#define LINUX_SYS_AUE_linux_preadv2 AUE_NULL +#define LINUX_SYS_AUE_linux_pwritev2 AUE_NULL +#define LINUX_SYS_AUE_linux_pkey_mprotect AUE_NULL +#define LINUX_SYS_AUE_linux_pkey_alloc AUE_NULL +#define LINUX_SYS_AUE_linux_pkey_free AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/amd64/linux/linux_syscall.h ============================================================================== --- head/sys/amd64/linux/linux_syscall.h Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_syscall.h Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX_SYS_read 0 @@ -277,7 +277,7 @@ #define LINUX_SYS_linux_utimensat 280 #define LINUX_SYS_linux_epoll_pwait 281 #define LINUX_SYS_linux_signalfd 282 -#define LINUX_SYS_linux_timerfd 283 +#define LINUX_SYS_linux_timerfd_create 283 #define LINUX_SYS_linux_eventfd 284 #define LINUX_SYS_linux_fallocate 285 #define LINUX_SYS_linux_timerfd_settime 286 @@ -291,7 +291,7 @@ #define LINUX_SYS_linux_inotify_init1 294 #define LINUX_SYS_linux_preadv 295 #define LINUX_SYS_linux_pwritev 296 -#define LINUX_SYS_linux_rt_tsigqueueinfo 297 +#define LINUX_SYS_linux_rt_tgsigqueueinfo 297 #define LINUX_SYS_linux_perf_event_open 298 #define LINUX_SYS_linux_recvmmsg 299 #define LINUX_SYS_linux_fanotify_init 300 @@ -303,8 +303,27 @@ #define LINUX_SYS_linux_syncfs 306 #define LINUX_SYS_linux_sendmmsg 307 #define LINUX_SYS_linux_setns 308 -#define LINUX_SYS_linux_process_vm_readv 309 -#define LINUX_SYS_linux_process_vm_writev 310 -#define LINUX_SYS_linux_kcmp 311 -#define LINUX_SYS_linux_finit_module 312 -#define LINUX_SYS_MAXSYSCALL 314 +#define LINUX_SYS_linux_getcpu 309 +#define LINUX_SYS_linux_process_vm_readv 310 +#define LINUX_SYS_linux_process_vm_writev 311 +#define LINUX_SYS_linux_kcmp 312 +#define LINUX_SYS_linux_finit_module 313 +#define LINUX_SYS_linux_sched_setattr 314 +#define LINUX_SYS_linux_sched_getattr 315 +#define LINUX_SYS_linux_renameat2 316 +#define LINUX_SYS_linux_seccomp 317 +#define LINUX_SYS_linux_getrandom 318 +#define LINUX_SYS_linux_memfd_create 319 +#define LINUX_SYS_linux_kexec_file_load 320 +#define LINUX_SYS_linux_bpf 321 +#define LINUX_SYS_linux_execveat 322 +#define LINUX_SYS_linux_userfaultfd 323 +#define LINUX_SYS_linux_membarrier 324 +#define LINUX_SYS_linux_mlock2 325 +#define LINUX_SYS_linux_copy_file_range 326 +#define LINUX_SYS_linux_preadv2 327 +#define LINUX_SYS_linux_pwritev2 328 +#define LINUX_SYS_linux_pkey_mprotect 329 +#define LINUX_SYS_linux_pkey_alloc 330 +#define LINUX_SYS_linux_pkey_free 331 +#define LINUX_SYS_MAXSYSCALL 333 Modified: head/sys/amd64/linux/linux_syscalls.c ============================================================================== --- head/sys/amd64/linux/linux_syscalls.c Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_syscalls.c Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux_syscallnames[] = { @@ -217,7 +217,7 @@ const char *linux_syscallnames[] = { "#206", /* 206 = linux_io_setup */ "#207", /* 207 = linux_io_destroy */ "#208", /* 208 = linux_io_getevents */ - "#209", /* 209 = inux_io_submit */ + "#209", /* 209 = linux_io_submit */ "#210", /* 210 = linux_io_cancel */ "#211", /* 211 = linux_get_thread_area */ "linux_lookup_dcookie", /* 212 = linux_lookup_dcookie */ @@ -291,7 +291,7 @@ const char *linux_syscallnames[] = { "linux_utimensat", /* 280 = linux_utimensat */ "linux_epoll_pwait", /* 281 = linux_epoll_pwait */ "linux_signalfd", /* 282 = linux_signalfd */ - "linux_timerfd", /* 283 = linux_timerfd */ + "linux_timerfd_create", /* 283 = linux_timerfd_create */ "linux_eventfd", /* 284 = linux_eventfd */ "linux_fallocate", /* 285 = linux_fallocate */ "linux_timerfd_settime", /* 286 = linux_timerfd_settime */ @@ -305,7 +305,7 @@ const char *linux_syscallnames[] = { "linux_inotify_init1", /* 294 = linux_inotify_init1 */ "linux_preadv", /* 295 = linux_preadv */ "linux_pwritev", /* 296 = linux_pwritev */ - "linux_rt_tsigqueueinfo", /* 297 = linux_rt_tsigqueueinfo */ + "linux_rt_tgsigqueueinfo", /* 297 = linux_rt_tgsigqueueinfo */ "linux_perf_event_open", /* 298 = linux_perf_event_open */ "linux_recvmmsg", /* 299 = linux_recvmmsg */ "linux_fanotify_init", /* 300 = linux_fanotify_init */ @@ -317,9 +317,28 @@ const char *linux_syscallnames[] = { "linux_syncfs", /* 306 = linux_syncfs */ "linux_sendmmsg", /* 307 = linux_sendmmsg */ "linux_setns", /* 308 = linux_setns */ - "linux_process_vm_readv", /* 309 = linux_process_vm_readv */ - "linux_process_vm_writev", /* 310 = linux_process_vm_writev */ - "linux_kcmp", /* 311 = linux_kcmp */ - "linux_finit_module", /* 312 = linux_finit_module */ - "#313", /* 313 = nosys */ + "linux_getcpu", /* 309 = linux_getcpu */ + "linux_process_vm_readv", /* 310 = linux_process_vm_readv */ + "linux_process_vm_writev", /* 311 = linux_process_vm_writev */ + "linux_kcmp", /* 312 = linux_kcmp */ + "linux_finit_module", /* 313 = linux_finit_module */ + "linux_sched_setattr", /* 314 = linux_sched_setattr */ + "linux_sched_getattr", /* 315 = linux_sched_getattr */ + "linux_renameat2", /* 316 = linux_renameat2 */ + "linux_seccomp", /* 317 = linux_seccomp */ + "linux_getrandom", /* 318 = linux_getrandom */ + "linux_memfd_create", /* 319 = linux_memfd_create */ + "linux_kexec_file_load", /* 320 = linux_kexec_file_load */ + "linux_bpf", /* 321 = linux_bpf */ + "linux_execveat", /* 322 = linux_execveat */ + "linux_userfaultfd", /* 323 = linux_userfaultfd */ + "linux_membarrier", /* 324 = linux_membarrier */ + "linux_mlock2", /* 325 = linux_mlock2 */ + "linux_copy_file_range", /* 326 = linux_copy_file_range */ + "linux_preadv2", /* 327 = linux_preadv2 */ + "linux_pwritev2", /* 328 = linux_pwritev2 */ + "linux_pkey_mprotect", /* 329 = linux_pkey_mprotect */ + "linux_pkey_alloc", /* 330 = linux_pkey_alloc */ + "linux_pkey_free", /* 331 = linux_pkey_free */ + "#332", /* 332 = nosys */ }; Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_sysent.c Sun Feb 5 14:19:19 2017 (r313285) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 302515 2016-07-10 08:15:50Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include @@ -227,7 +227,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 206 = linux_io_setup */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 207 = linux_io_destroy */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 209 = inux_io_submit */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 209 = linux_io_submit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = linux_io_cancel */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = linux_get_thread_area */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 212 = linux_lookup_dcookie */ @@ -301,7 +301,7 @@ struct sysent linux_sysent[] = { { AS(linux_utimensat_args), (sy_call_t *)linux_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = linux_utimensat */ { AS(linux_epoll_pwait_args), (sy_call_t *)linux_epoll_pwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 281 = linux_epoll_pwait */ { 0, (sy_call_t *)linux_signalfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 282 = linux_signalfd */ - { 0, (sy_call_t *)linux_timerfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 283 = linux_timerfd */ + { 0, (sy_call_t *)linux_timerfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 283 = linux_timerfd_create */ { AS(linux_eventfd_args), (sy_call_t *)linux_eventfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 284 = linux_eventfd */ { AS(linux_fallocate_args), (sy_call_t *)linux_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 285 = linux_fallocate */ { 0, (sy_call_t *)linux_timerfd_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 286 = linux_timerfd_settime */ @@ -312,10 +312,10 @@ struct sysent linux_sysent[] = { { AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 291 = linux_epoll_create1 */ { AS(linux_dup3_args), (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 292 = linux_dup3 */ { AS(linux_pipe2_args), (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 293 = linux_pipe2 */ - { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 294 = linux_inotify_init1 */ - { 0, (sy_call_t *)linux_preadv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 295 = linux_preadv */ - { 0, (sy_call_t *)linux_pwritev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 296 = linux_pwritev */ - { 0, (sy_call_t *)linux_rt_tsigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = linux_rt_tsigqueueinfo */ + { AS(linux_inotify_init1_args), (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 294 = linux_inotify_init1 */ + { AS(linux_preadv_args), (sy_call_t *)linux_preadv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 295 = linux_preadv */ + { AS(linux_pwritev_args), (sy_call_t *)linux_pwritev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 296 = linux_pwritev */ + { AS(linux_rt_tgsigqueueinfo_args), (sy_call_t *)linux_rt_tgsigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 297 = linux_rt_tgsigqueueinfo */ { 0, (sy_call_t *)linux_perf_event_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 298 = linux_perf_event_open */ { AS(linux_recvmmsg_args), (sy_call_t *)linux_recvmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 299 = linux_recvmmsg */ { 0, (sy_call_t *)linux_fanotify_init, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 300 = linux_fanotify_init */ @@ -326,10 +326,29 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_clock_adjtime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 305 = linux_clock_adjtime */ { AS(linux_syncfs_args), (sy_call_t *)linux_syncfs, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 306 = linux_syncfs */ { AS(linux_sendmmsg_args), (sy_call_t *)linux_sendmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 307 = linux_sendmmsg */ - { 0, (sy_call_t *)linux_setns, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = linux_setns */ - { 0, (sy_call_t *)linux_process_vm_readv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = linux_process_vm_readv */ - { 0, (sy_call_t *)linux_process_vm_writev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_process_vm_writev */ - { 0, (sy_call_t *)linux_kcmp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_kcmp */ - { 0, (sy_call_t *)linux_finit_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_finit_module */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = nosys */ + { AS(linux_setns_args), (sy_call_t *)linux_setns, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = linux_setns */ + { AS(linux_getcpu_args), (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = linux_getcpu */ + { AS(linux_process_vm_readv_args), (sy_call_t *)linux_process_vm_readv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = linux_process_vm_readv */ + { AS(linux_process_vm_writev_args), (sy_call_t *)linux_process_vm_writev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = linux_process_vm_writev */ + { AS(linux_kcmp_args), (sy_call_t *)linux_kcmp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = linux_kcmp */ + { AS(linux_finit_module_args), (sy_call_t *)linux_finit_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 313 = linux_finit_module */ + { AS(linux_sched_setattr_args), (sy_call_t *)linux_sched_setattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sched_setattr */ + { AS(linux_sched_getattr_args), (sy_call_t *)linux_sched_getattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_sched_getattr */ + { AS(linux_renameat2_args), (sy_call_t *)linux_renameat2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_renameat2 */ + { AS(linux_seccomp_args), (sy_call_t *)linux_seccomp, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = linux_seccomp */ + { AS(linux_getrandom_args), (sy_call_t *)linux_getrandom, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getrandom */ + { AS(linux_memfd_create_args), (sy_call_t *)linux_memfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = linux_memfd_create */ + { AS(linux_kexec_file_load_args), (sy_call_t *)linux_kexec_file_load, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = linux_kexec_file_load */ + { AS(linux_bpf_args), (sy_call_t *)linux_bpf, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = linux_bpf */ + { AS(linux_execveat_args), (sy_call_t *)linux_execveat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 322 = linux_execveat */ + { AS(linux_userfaultfd_args), (sy_call_t *)linux_userfaultfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 323 = linux_userfaultfd */ + { AS(linux_membarrier_args), (sy_call_t *)linux_membarrier, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 324 = linux_membarrier */ + { AS(linux_mlock2_args), (sy_call_t *)linux_mlock2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 325 = linux_mlock2 */ + { AS(linux_copy_file_range_args), (sy_call_t *)linux_copy_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_copy_file_range */ + { AS(linux_preadv2_args), (sy_call_t *)linux_preadv2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_preadv2 */ + { AS(linux_pwritev2_args), (sy_call_t *)linux_pwritev2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_pwritev2 */ + { AS(linux_pkey_mprotect_args), (sy_call_t *)linux_pkey_mprotect, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_pkey_mprotect */ + { AS(linux_pkey_alloc_args), (sy_call_t *)linux_pkey_alloc, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_pkey_alloc */ + { AS(linux_pkey_free_args), (sy_call_t *)linux_pkey_free, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pkey_free */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 332 = nosys */ }; Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Sun Feb 5 14:17:09 2017 (r313284) +++ head/sys/amd64/linux/linux_systrace_args.c Sun Feb 5 14:19:19 2017 (r313285) @@ -2076,7 +2076,7 @@ systrace_args(int sysnum, void *params, *n_args = 0; break; } - /* linux_timerfd */ + /* linux_timerfd_create */ case 283: { *n_args = 0; break; @@ -2157,22 +2157,41 @@ systrace_args(int sysnum, void *params, } /* linux_inotify_init1 */ case 294: { - *n_args = 0; + struct linux_inotify_init1_args *p = params; + iarg[0] = p->flags; /* l_int */ + *n_args = 1; break; } /* linux_preadv */ case 295: { - *n_args = 0; + struct linux_preadv_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + *n_args = 5; break; } /* linux_pwritev */ case 296: { - *n_args = 0; + struct linux_pwritev_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + *n_args = 5; break; } - /* linux_rt_tsigqueueinfo */ + /* linux_rt_tgsigqueueinfo */ case 297: { - *n_args = 0; + struct linux_rt_tgsigqueueinfo_args *p = params; + iarg[0] = p->tgid; /* l_pid_t */ + iarg[1] = p->tid; /* l_pid_t */ + iarg[2] = p->sig; /* l_int */ + uarg[3] = (intptr_t) p->uinfo; /* l_siginfo_t * */ + *n_args = 4; break; } /* linux_perf_event_open */ @@ -2245,27 +2264,235 @@ systrace_args(int sysnum, void *params, } /* linux_setns */ case 308: { - *n_args = 0; + struct linux_setns_args *p = params; + iarg[0] = p->fd; /* l_int */ + iarg[1] = p->nstype; /* l_int */ + *n_args = 2; break; } - /* linux_process_vm_readv */ + /* linux_getcpu */ case 309: { - *n_args = 0; + struct linux_getcpu_args *p = params; + uarg[0] = (intptr_t) p->cpu; /* l_uint * */ + uarg[1] = (intptr_t) p->node; /* l_uint * */ + uarg[2] = (intptr_t) p->cache; /* void * */ + *n_args = 3; break; } - /* linux_process_vm_writev */ + /* linux_process_vm_readv */ case 310: { - *n_args = 0; + struct linux_process_vm_readv_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->lvec; /* const struct iovec * */ + iarg[2] = p->liovcnt; /* l_ulong */ + uarg[3] = (intptr_t) p->rvec; /* const struct iovec * */ + iarg[4] = p->riovcnt; /* l_ulong */ + iarg[5] = p->flags; /* l_ulong */ + *n_args = 6; break; } - /* linux_kcmp */ + /* linux_process_vm_writev */ case 311: { - *n_args = 0; + struct linux_process_vm_writev_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->lvec; /* const struct iovec * */ + iarg[2] = p->liovcnt; /* l_ulong */ + uarg[3] = (intptr_t) p->rvec; /* const struct iovec * */ + iarg[4] = p->riovcnt; /* l_ulong */ + iarg[5] = p->flags; /* l_ulong */ + *n_args = 6; break; } - /* linux_finit_module */ + /* linux_kcmp */ case 312: { - *n_args = 0; + struct linux_kcmp_args *p = params; + iarg[0] = p->pid1; /* l_pid_t */ + iarg[1] = p->pid2; /* l_pid_t */ + iarg[2] = p->type; /* l_int */ + iarg[3] = p->idx1; /* l_ulong */ + iarg[4] = p->idx; /* l_ulong */ + *n_args = 5; + break; + } + /* linux_finit_module */ + case 313: { + struct linux_finit_module_args *p = params; + iarg[0] = p->fd; /* l_int */ + uarg[1] = (intptr_t) p->uargs; /* const char * */ + iarg[2] = p->flags; /* l_int */ + *n_args = 3; + break; + } + /* linux_sched_setattr */ + case 314: { + struct linux_sched_setattr_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->attr; /* void * */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; + break; + } + /* linux_sched_getattr */ + case 315: { + struct linux_sched_getattr_args *p = params; + iarg[0] = p->pid; /* l_pid_t */ + uarg[1] = (intptr_t) p->attr; /* void * */ + iarg[2] = p->size; /* l_uint */ + iarg[3] = p->flags; /* l_uint */ + *n_args = 4; + break; + } + /* linux_renameat2 */ + case 316: { + struct linux_renameat2_args *p = params; + iarg[0] = p->oldfd; /* l_int */ + uarg[1] = (intptr_t) p->oldname; /* const char * */ + iarg[2] = p->newfd; /* l_int */ + uarg[3] = (intptr_t) p->newname; /* const char * */ + uarg[4] = p->flags; /* unsigned int */ + *n_args = 5; + break; + } + /* linux_seccomp */ + case 317: { + struct linux_seccomp_args *p = params; + iarg[0] = p->op; /* l_uint */ + iarg[1] = p->flags; /* l_uint */ + uarg[2] = (intptr_t) p->uargs; /* const char * */ + *n_args = 3; + break; + } + /* linux_getrandom */ + case 318: { + struct linux_getrandom_args *p = params; + uarg[0] = (intptr_t) p->buf; /* char * */ + iarg[1] = p->count; /* l_size_t */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; + break; + } + /* linux_memfd_create */ + case 319: { + struct linux_memfd_create_args *p = params; + uarg[0] = (intptr_t) p->uname_ptr; /* const char * */ + iarg[1] = p->flags; /* l_uint */ + *n_args = 2; + break; + } + /* linux_kexec_file_load */ + case 320: { + struct linux_kexec_file_load_args *p = params; + iarg[0] = p->kernel_fd; /* l_int */ + iarg[1] = p->initrd_fd; /* l_int */ + iarg[2] = p->cmdline_len; /* l_ulong */ + uarg[3] = (intptr_t) p->cmdline_ptr; /* const char * */ + iarg[4] = p->flags; /* l_ulong */ + *n_args = 5; + break; + } + /* linux_bpf */ + case 321: { + struct linux_bpf_args *p = params; + iarg[0] = p->cmd; /* l_int */ + uarg[1] = (intptr_t) p->attr; /* void * */ + iarg[2] = p->size; /* l_uint */ + *n_args = 3; + break; + } + /* linux_execveat */ + case 322: { + struct linux_execveat_args *p = params; + iarg[0] = p->dfd; /* l_int */ + uarg[1] = (intptr_t) p->filename; /* const char * */ + uarg[2] = (intptr_t) p->argv; /* const char ** */ + uarg[3] = (intptr_t) p->envp; /* const char ** */ + iarg[4] = p->flags; /* l_int */ + *n_args = 5; + break; + } + /* linux_userfaultfd */ + case 323: { + struct linux_userfaultfd_args *p = params; + iarg[0] = p->flags; /* l_int */ + *n_args = 1; + break; + } + /* linux_membarrier */ + case 324: { + struct linux_membarrier_args *p = params; + iarg[0] = p->cmd; /* l_int */ + iarg[1] = p->flags; /* l_int */ + *n_args = 2; + break; + } + /* linux_mlock2 */ + case 325: { + struct linux_mlock2_args *p = params; + iarg[0] = p->start; /* l_ulong */ + iarg[1] = p->len; /* l_size_t */ + iarg[2] = p->flags; /* l_int */ + *n_args = 3; + break; + } + /* linux_copy_file_range */ + case 326: { + struct linux_copy_file_range_args *p = params; + iarg[0] = p->fd_in; /* l_int */ + uarg[1] = (intptr_t) p->off_in; /* l_loff_t * */ + iarg[2] = p->fd_out; /* l_int */ + uarg[3] = (intptr_t) p->off_out; /* l_loff_t * */ + iarg[4] = p->len; /* l_size_t */ + iarg[5] = p->flags; /* l_uint */ + *n_args = 6; + break; + } + /* linux_preadv2 */ + case 327: { + struct linux_preadv2_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* const struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + iarg[5] = p->flags; /* l_int */ + *n_args = 6; + break; + } + /* linux_pwritev2 */ + case 328: { + struct linux_pwritev2_args *p = params; + iarg[0] = p->fd; /* l_ulong */ + uarg[1] = (intptr_t) p->vec; /* const struct iovec * */ + iarg[2] = p->vlen; /* l_ulong */ + iarg[3] = p->pos_l; /* l_ulong */ + iarg[4] = p->pos_h; /* l_ulong */ + iarg[5] = p->flags; /* l_int */ + *n_args = 6; + break; + } + /* linux_pkey_mprotect */ + case 329: { + struct linux_pkey_mprotect_args *p = params; + iarg[0] = p->start; /* l_ulong */ + iarg[1] = p->len; /* l_size_t */ + iarg[2] = p->prot; /* l_ulong */ + iarg[3] = p->pkey; /* l_int */ + *n_args = 4; + break; + } + /* linux_pkey_alloc */ + case 330: { + struct linux_pkey_alloc_args *p = params; + iarg[0] = p->flags; /* l_ulong */ + iarg[1] = p->init_val; /* l_ulong */ + *n_args = 2; + break; + } + /* linux_pkey_free */ + case 331: { + struct linux_pkey_free_args *p = params; + iarg[0] = p->pkey; /* l_int */ + *n_args = 1; break; } default: @@ -5415,7 +5642,7 @@ systrace_entry_setargdesc(int sysnum, in /* linux_signalfd */ case 282: break; - /* linux_timerfd */ + /* linux_timerfd_create */ case 283: break; /* linux_eventfd */ @@ -5529,15 +5756,76 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_inotify_init1 */ case 294: + switch(ndx) { + case 0: + p = "l_int"; + break; + default: + break; + }; break; /* linux_preadv */ case 295: + switch(ndx) { + case 0: + p = "l_ulong"; + break; + case 1: + p = "userland struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "l_ulong"; + break; + case 4: + p = "l_ulong"; + break; + default: + break; + }; break; /* linux_pwritev */ case 296: + switch(ndx) { + case 0: + p = "l_ulong"; + break; + case 1: + p = "userland struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "l_ulong"; + break; + case 4: + p = "l_ulong"; + break; + default: + break; + }; break; - /* linux_rt_tsigqueueinfo */ + /* linux_rt_tgsigqueueinfo */ case 297: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "l_pid_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "userland l_siginfo_t *"; + break; + default: + break; + }; break; /* linux_perf_event_open */ case 298: @@ -5629,23 +5917,443 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_setns */ case 308: + switch(ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + default: + break; + }; break; - /* linux_process_vm_readv */ + /* linux_getcpu */ case 309: + switch(ndx) { + case 0: + p = "userland l_uint *"; + break; + case 1: + p = "userland l_uint *"; + break; + case 2: + p = "userland void *"; + break; + default: + break; + }; break; - /* linux_process_vm_writev */ + /* linux_process_vm_readv */ case 310: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "userland const struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "userland const struct iovec *"; + break; + case 4: + p = "l_ulong"; + break; + case 5: + p = "l_ulong"; + break; + default: + break; + }; break; - /* linux_kcmp */ + /* linux_process_vm_writev */ case 311: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "userland const struct iovec *"; + break; + case 2: + p = "l_ulong"; + break; + case 3: + p = "userland const struct iovec *"; + break; + case 4: + p = "l_ulong"; + break; + case 5: + p = "l_ulong"; + break; + default: + break; + }; break; - /* linux_finit_module */ + /* linux_kcmp */ case 312: + switch(ndx) { + case 0: + p = "l_pid_t"; + break; + case 1: + p = "l_pid_t"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "l_ulong"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 5 14:25:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CA27CD28BC; Sun, 5 Feb 2017 14:25:33 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BC091827; Sun, 5 Feb 2017 14:25:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15EPWqx010121; Sun, 5 Feb 2017 14:25:32 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15EPWph010120; Sun, 5 Feb 2017 14:25:32 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201702051425.v15EPWph010120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 5 Feb 2017 14:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313286 - stable/11/share/skel X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 14:25:33 -0000 Author: jilles Date: Sun Feb 5 14:25:31 2017 New Revision: 313286 URL: https://svnweb.freebsd.org/changeset/base/313286 Log: MFC r312721: skel: Remove reference to deleted part in previous commit to this file. Modified: stable/11/share/skel/dot.shrc Directory Properties: stable/11/ (props changed) Modified: stable/11/share/skel/dot.shrc ============================================================================== --- stable/11/share/skel/dot.shrc Sun Feb 5 14:19:19 2017 (r313285) +++ stable/11/share/skel/dot.shrc Sun Feb 5 14:25:31 2017 (r313286) @@ -13,8 +13,8 @@ # # umask 022 -# Uncomment this and comment the above to enable the builtin vi(1) command -# line editor in sh(1), e.g. ESC to go into visual mode. +# Uncomment this to enable the builtin vi(1) command line editor in sh(1), +# e.g. ESC to go into visual mode. # set -o vi From owner-svn-src-all@freebsd.org Sun Feb 5 15:17:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 800F2CD17CF; Sun, 5 Feb 2017 15:17:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60DD41366; Sun, 5 Feb 2017 15:17:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id B26E01DC1; Sun, 5 Feb 2017 15:17:46 +0000 (UTC) Date: Sun, 5 Feb 2017 15:17:46 +0000 From: Alexey Dokuchaev To: Mateusz Guzik Cc: Steven Hartland , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r313260 - head/sys/kern Message-ID: <20170205151746.GA6841@FreeBSD.org> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170205030006.GB4375@dft-labs.eu> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 15:17:47 -0000 On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: > For instance, plugging an unused variable, a memory leak, doing a > lockless check first etc. are all pretty standard and unless there is > something unusual going on (e.g. complicated circumstances leading to a > leak) there is not much to explain. In particular, I don't see why > anyone would explain why leaks are bad on each commit plugging one. Right; these (unused variable, resource leaks) usually do not warrant elaborate explanation. [ Some linefeeds below were trimmed for brevity ] > The gist is as follows: there are plenty of cases where the kernel wants > to atomically replace the value of a particular variable. Sometimes, > like in this commit, we want to bump the counter by 1, but only if the > current value is not 0. For that we need to read the value, see if it is > 0 and if not, try to replace what we read with what we read + 1. We > cannot just increment as the value could have changed to 0 in the > meantime. > But this also means that multiple cpus doing the same operation on the > same variable will trip on each other - one will succeed while the rest > will have to retry. > Prior to this commit, each retry attempt would explicitly re-read the > value. This induces cache coherency traffic slowing everyone down. > amd64 has the nice property of giving us the value it found eleminating > the need to explicitly re-read it. There is similar story on i386 and > sparc. > Other architectures may also benefit from this, but that I did not > benchmark. > > In short[,] under contention atomic_fcmpset is going to be faster than > atomic_cmpset. > I did not benchmark this particular change, but a switch of the sort > easily gives 10%+ in microbenchmarks on amd64. > That said, while one can argue this optimizes the code, it really > depessimizes it as something of the sort should have been already > employed. Given the above, IMHO it's quite far from an obvious or of manpage-lookup thing, and thus requires proper explanation in the commit log. > > While on this subject are there any official guidelines to writing > > commit messages, if no should we create some? > > I'm unaware of any. We might not have official guidelines, but 30%-what/70%-why rule would apply perfectly here. ;-) ./danfe From owner-svn-src-all@freebsd.org Sun Feb 5 15:45:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD78DCD1DDA; Sun, 5 Feb 2017 15:45:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61DEB19A; Sun, 5 Feb 2017 15:45:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15FjVMZ043052; Sun, 5 Feb 2017 15:45:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15FjVvr043049; Sun, 5 Feb 2017 15:45:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702051545.v15FjVvr043049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 5 Feb 2017 15:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313287 - head/sys/dev/usb/serial 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 15:45:32 -0000 Author: ian Date: Sun Feb 5 15:45:31 2017 New Revision: 313287 URL: https://svnweb.freebsd.org/changeset/base/313287 Log: Add tsw_busy support to usb_serial (ucom). The tty layer uses tsw_busy to poll for busy/idle status of the transmitter hardware during close() and tcdrain(). The ucom layer defines ULSR_TXRDY and ULSR_TSRE bits for the line status register; when both are set, the transmitter is idle. Not all chip drivers maintain those bits in the sc_lsr field, and if the bits never get set the transmitter will always appear busy, causing hangs in tcdrain(). These changes add a new sc_flag bit, UCOM_FLAG_LSRTXIDLE. When this flag is set, ucom_busy() uses the lsr bits to return busy vs. idle state, otherwise it always returns idle (which is effectively what happened before this change because tsw_busy wasn't implemented). For the uftdi chip driver, these changes stop masking out the tx idle bits when processing the status register (because now they're useful), and it calls ucom_use_lsr_txbits() to indicate the bits are maintained by the driver and can be used by ucom_busy(). Differential Revision: https://reviews.freebsd.org/D9183 Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sun Feb 5 14:25:31 2017 (r313286) +++ head/sys/dev/usb/serial/uftdi.c Sun Feb 5 15:45:31 2017 (r313287) @@ -1123,6 +1123,9 @@ uftdi_attach(device_t dev) FTDI_SIO_SET_DATA_PARITY_NONE | FTDI_SIO_SET_DATA_BITS(8)); + /* Indicate tx bits in sc_lsr can be used to determine busy vs idle. */ + ucom_use_lsr_txbits(&sc->sc_ucom); + error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &uftdi_callback, &sc->sc_mtx); if (error) { @@ -1279,16 +1282,20 @@ uftdi_read_callback(struct usb_xfer *xfe offset = 0; /* * Extract packet headers and payload bytes from the buffer. - * Feed payload bytes to ucom/tty layer; OR-accumulate header - * status bits which are transient and could toggle with each - * packet. After processing all packets in the buffer, process - * the accumulated transient MSR and LSR values along with the + * Feed payload bytes to ucom/tty layer; OR-accumulate the + * receiver-related header status bits which are transient and + * could toggle with each packet, but for transmitter-related + * bits keep only the ones from the last packet. + * + * After processing all packets in the buffer, process the + * accumulated transient MSR and LSR values along with the * non-transient bits from the last packet header. */ while (buflen >= UFTDI_IHDRSIZE) { usbd_copy_out(pc, offset, buf, UFTDI_IHDRSIZE); offset += UFTDI_IHDRSIZE; buflen -= UFTDI_IHDRSIZE; + lsr &= ~(ULSR_TXRDY | ULSR_TSRE); lsr |= FTDI_GET_LSR(buf); if (FTDI_GET_MSR(buf) & FTDI_SIO_RI_MASK) msr |= SER_RI; @@ -1311,8 +1318,7 @@ uftdi_read_callback(struct usb_xfer *xfe if (ftdi_msr & FTDI_SIO_RLSD_MASK) msr |= SER_DCD; - if ((sc->sc_msr != msr) || - ((sc->sc_lsr & FTDI_LSR_MASK) != (lsr & FTDI_LSR_MASK))) { + if (sc->sc_msr != msr || sc->sc_lsr != lsr) { DPRINTF("status change msr=0x%02x (0x%02x) " "lsr=0x%02x (0x%02x)\n", msr, sc->sc_msr, lsr, sc->sc_lsr); Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Sun Feb 5 14:25:31 2017 (r313286) +++ head/sys/dev/usb/serial/usb_serial.c Sun Feb 5 15:45:31 2017 (r313287) @@ -161,6 +161,7 @@ static tsw_param_t ucom_param; static tsw_outwakeup_t ucom_outwakeup; static tsw_inwakeup_t ucom_inwakeup; static tsw_free_t ucom_free; +static tsw_busy_t ucom_busy; static struct ttydevsw ucom_class = { .tsw_flags = TF_INITLOCK | TF_CALLOUT, @@ -172,6 +173,7 @@ static struct ttydevsw ucom_class = { .tsw_param = ucom_param, .tsw_modem = ucom_modem, .tsw_free = ucom_free, + .tsw_busy = ucom_busy, }; MODULE_DEPEND(ucom, usb, 1, 1, 1); @@ -1294,6 +1296,27 @@ ucom_outwakeup(struct tty *tp) ucom_start_transfers(sc); } +static bool +ucom_busy(struct tty *tp) +{ + struct ucom_softc *sc = tty_softc(tp); + const uint8_t txidle = ULSR_TXRDY | ULSR_TSRE; + + UCOM_MTX_ASSERT(sc, MA_OWNED); + + DPRINTFN(3, "sc = %p lsr 0x%02x\n", sc, sc->sc_lsr); + + /* + * If the driver maintains the txidle bits in LSR, we can use them to + * determine whether the transmitter is busy or idle. Otherwise we have + * to assume it is idle to avoid hanging forever on tcdrain(3). + */ + if (sc->sc_flag & UCOM_FLAG_LSRTXIDLE) + return ((sc->sc_lsr & txidle) != txidle); + else + return (false); +} + /*------------------------------------------------------------------------* * ucom_get_data * Modified: head/sys/dev/usb/serial/usb_serial.h ============================================================================== --- head/sys/dev/usb/serial/usb_serial.h Sun Feb 5 14:25:31 2017 (r313286) +++ head/sys/dev/usb/serial/usb_serial.h Sun Feb 5 15:45:31 2017 (r313287) @@ -180,6 +180,7 @@ struct ucom_softc { #define UCOM_FLAG_WAIT_REFS 0x0100 /* set if we must wait for refs */ #define UCOM_FLAG_FREE_UNIT 0x0200 /* set if we must free the unit */ #define UCOM_FLAG_INWAKEUP 0x0400 /* set if we are in the tsw_inwakeup callback */ +#define UCOM_FLAG_LSRTXIDLE 0x0800 /* set if sc_lsr bits ULSR_TSRE+TXRDY work */ uint8_t sc_lsr; uint8_t sc_msr; uint8_t sc_mcr; @@ -218,4 +219,12 @@ void ucom_drain(struct ucom_super_softc void ucom_drain_all(void *); void ucom_ref(struct ucom_super_softc *); int ucom_unref(struct ucom_super_softc *); + +static inline void +ucom_use_lsr_txbits(struct ucom_softc *sc) +{ + + sc->sc_flag |= UCOM_FLAG_LSRTXIDLE; +} + #endif /* _USB_SERIAL_H_ */ From owner-svn-src-all@freebsd.org Sun Feb 5 15:46:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FAC5CD1E3C; Sun, 5 Feb 2017 15:46:07 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0689308; Sun, 5 Feb 2017 15:46:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Fk5kh043128; Sun, 5 Feb 2017 15:46:05 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15Fk50o043127; Sun, 5 Feb 2017 15:46:05 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201702051546.v15Fk50o043127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 5 Feb 2017 15:46: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: r313288 - stable/10/share/skel 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 15:46:07 -0000 Author: jilles Date: Sun Feb 5 15:46:05 2017 New Revision: 313288 URL: https://svnweb.freebsd.org/changeset/base/313288 Log: MFC r312721: skel: Remove reference to deleted part in previous commit to this file. Modified: stable/10/share/skel/dot.shrc Directory Properties: stable/10/ (props changed) Modified: stable/10/share/skel/dot.shrc ============================================================================== --- stable/10/share/skel/dot.shrc Sun Feb 5 15:45:31 2017 (r313287) +++ stable/10/share/skel/dot.shrc Sun Feb 5 15:46:05 2017 (r313288) @@ -13,8 +13,8 @@ # # umask 022 -# Uncomment this and comment the above to enable the builtin vi(1) command -# line editor in sh(1), e.g. ESC to go into visual mode. +# Uncomment this to enable the builtin vi(1) command line editor in sh(1), +# e.g. ESC to go into visual mode. # set -o vi From owner-svn-src-all@freebsd.org Sun Feb 5 16:09:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3C65CD26C9 for ; Sun, 5 Feb 2017 16:09:04 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85552150A for ; Sun, 5 Feb 2017 16:09:04 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x231.google.com with SMTP id t18so28129389wmt.0 for ; Sun, 05 Feb 2017 08:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=Frg5uuv7u8B21upAZiJlZdYMYmy4SVZL0cXYdEL4Cq0=; b=zjcBUbSvw63aDFVhHCk8BzlyHNOjbqYDbtSpuZ2GpZnUEmWXLrOy4/6n99/PlV+nAY Hj4A6IKEgfMT60GFYXYdqHVJBQn1RqIsRemaPIA3JTAhDYzBluY3mwY40AIP0EHY2LPm VbPmAR6dvhV37/eYNpjRSn42PJsmfO7qgq66NyyB0i3pxGRAnf0j2N/L4mLKRes6LBBP fz6riWKMe5Y2fk4YM6o+4G0Uc4Y/v9rGDPy91yQowUAaXtDCTKeTisWs731/Qzaz8EXm DtfY9oQYoQsgqQMQ8M8yiUfVjRCK/rcBqnP5D9zEzX9XJm3s+Zcizcj4mNp6OhQHspQE fpfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=Frg5uuv7u8B21upAZiJlZdYMYmy4SVZL0cXYdEL4Cq0=; b=OLpEsxHgIycgePEgWnDJ/e/pXbjPLUQExsaOhYiG0Mbf7UmZP6C5fqq4qlQ9JAQXE6 aHjj3Cu6I/LE10TN9mWU5qHIn6wIZyLr91NQpXpO3T1qXgd8HNjwsF+s11dh01BaD3qe 5eQ0+utQ2Bz5+3KqaZn1LzkSxl1WlAlfoTCf55kEhakw/5GqPeret7LfnryUkKTbOB8w RCKStKIA5Nbluq9tV/V/x3GyFO8VzAfihMXErKGGVKg+lhSoHiUuPZzlSnVOnXjsHYmZ lqidOF0SwOaYECF7cAThQMCqkkeyVjJwVF94zIxo7rIrwNPKWYzy/jZrUyAZSNHGHYrX /PZA== X-Gm-Message-State: AMke39nCiHhMNSUwgeqcEAgLRYCpGoXk2jXCLyIf48xYwHVMVZLP555k99Lb8k7kPCP3ouJV X-Received: by 10.28.57.131 with SMTP id g125mr5069528wma.33.1486310942030; Sun, 05 Feb 2017 08:09:02 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id 202sm8081826wmp.20.2017.02.05.08.09.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 08:09:01 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Alexey Dokuchaev , Mateusz Guzik References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik From: Steven Hartland Message-ID: <853ff396-92ce-2539-6986-c6d3fb4bea97@multiplay.co.uk> Date: Sun, 5 Feb 2017 16:09:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170205151746.GA6841@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 16:09:05 -0000 On 05/02/2017 15:17, Alexey Dokuchaev wrote: > On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: >> For instance, plugging an unused variable, a memory leak, doing a >> lockless check first etc. are all pretty standard and unless there is >> something unusual going on (e.g. complicated circumstances leading to a >> leak) there is not much to explain. In particular, I don't see why >> anyone would explain why leaks are bad on each commit plugging one. > Right; these (unused variable, resource leaks) usually do not warrant > elaborate explanation. Indeed these are self explanatory >> The gist is as follows: there are plenty of cases where the kernel wants >> to atomically replace the value of a particular variable. Sometimes, >> like in this commit, we want to bump the counter by 1, but only if the >> current value is not 0. For that we need to read the value, see if it is >> 0 and if not, try to replace what we read with what we read + 1. We >> cannot just increment as the value could have changed to 0 in the >> meantime. >> But this also means that multiple cpus doing the same operation on the >> same variable will trip on each other - one will succeed while the rest >> will have to retry. >> Prior to this commit, each retry attempt would explicitly re-read the >> value. This induces cache coherency traffic slowing everyone down. >> amd64 has the nice property of giving us the value it found eleminating >> the need to explicitly re-read it. There is similar story on i386 and >> sparc. >> Other architectures may also benefit from this, but that I did not >> benchmark. >> >> In short[,] under contention atomic_fcmpset is going to be faster than >> atomic_cmpset. >> I did not benchmark this particular change, but a switch of the sort >> easily gives 10%+ in microbenchmarks on amd64. >> That said, while one can argue this optimizes the code, it really >> depessimizes it as something of the sort should have been already >> employed. > Given the above, IMHO it's quite far from an obvious or of manpage-lookup > thing, and thus requires proper explanation in the commit log. Absolutely, I would encourage everyone to not only think about others making similar changes but also providing education for those who may uses similar code in other areas. If said changes where using older code as an example, without knowing otherwise they may not use the updated methodologies. Sharing the detail you have done above is fantastic, allowing others to take note without having to do the research that the may well not have time for, with the result being improved code quality moving forward; so thanks for that :) > >>> While on this subject are there any official guidelines to writing >>> commit messages, if no should we create some? >> I'm unaware of any. > We might not have official guidelines, but 30%-what/70%-why rule would > apply perfectly here. ;-) > Sounds like a good guide. Regards Steve From owner-svn-src-all@freebsd.org Sun Feb 5 18:58:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADEF1CD2706; Sun, 5 Feb 2017 18:58:15 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-oi0-x242.google.com (mail-oi0-x242.google.com [IPv6:2607:f8b0:4003:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68FE21C81; Sun, 5 Feb 2017 18:58:15 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-oi0-x242.google.com with SMTP id u143so5053956oif.3; Sun, 05 Feb 2017 10:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/1eObKWATfOUpgTvXWKEc3/BB+8Y12ZOszjRmSkZdfo=; b=TrEB6dv8I8lt1jGz4ScmO1EIC24I/q++QgPk1SrcqXnpDOy/ORlUH+rbDQbn4nFhcW exzl8RtdZEbYsl9/oJQy0d3fz5gnymYLcVeWWT9VDPFviZXqdwMAH3o3vssOX6WhNfMM sRJOba/Gu1mZ3vY17I8BlGTLY6vJAnToow8d8Cy6KQ4bXLYkHXJ1Mp5Vk80vHBw0eb31 sN7e0x7rqyF7qvz/qtODBD8m9OA2ZAh3t9nUjYJWdES1kAJJrPiswkwQvhtFikgzjcha u28fr0ppKpJgd9pk7lUqK1r8AdBPhl01zHPpeJ82ToCxUpfWVOKa2XJrUQrwuCBv1SAP S7DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/1eObKWATfOUpgTvXWKEc3/BB+8Y12ZOszjRmSkZdfo=; b=fBAJvm+q/SGpKgTPwgdzoIxLm5B7FJYUC0kZ4rlJHDD0NuBa49rM0rGFowuh3u+Wx+ Y47rwxilgwYDlex1nskwFiKqSr3PCkQEn8dTSSySPp5f6EPV6YdMyQ6EJu6Ma52HAghb juKvh2PoIog+h/Wwnk2LSKiWvewV8Xbi7LJelDR9dzE07Gg06ovx2KohurOHeLpxM3Uy EcG0ao/ARCqPwVvvQuJ8qB7YjZjlMexP7BuBffu/QY6pM4/fyjzaszwO96s5oDsTx/xq BhaFzxmEuywNl2KsJTNqAEQWNI42YZJekY7hNAdnS4HTPyKjppkKwdYy/zu+vZTz6YMj BxqQ== X-Gm-Message-State: AMke39ltxNpZjDzYadYb4tzt65yDf8ognCGTx+eZ1rGLPkVedP+lfW2lgwEqslu+GswoQnmGz5ndvNIYSoeoBw== X-Received: by 10.202.193.65 with SMTP id r62mr3481370oif.90.1486321094479; Sun, 05 Feb 2017 10:58:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Sun, 5 Feb 2017 10:58:13 -0800 (PST) In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Jason Harmening Date: Sun, 5 Feb 2017 10:58:13 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Svatopluk Kraus Cc: Andreas Tobler , Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits X-Mailman-Approved-At: Sun, 05 Feb 2017 19:12:39 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 18:58:15 -0000 Hmm, it's a good idea to consider the possibility of a barrier issue. It wouldn't be the first time we've had such a problem on a weakly-ordered architecture. That said, I don't see a problem in this case. smp_rendezvous_cpus() takes a spinlock and then issues atomic_store_rel_int() to ensure the rendezvous params are visible to other cpus. The latter corresponds to lwsync on powerpc, which AFAIK should be sufficient to ensure visibility of prior stores. For now I'm going with the simpler explanation that I made a bad assumption in the powerpc get_pcpu() and there is some context in which the read of sprg0 doesn't return a consistent pointer value. Unfortunately I don't see where that might be right now. On the mips side, Kurt/Alexander can you test the attached patch? It contains a simple fix to ensure get_pcpu() returns the consistent per-cpu pointer. On Sat, Feb 4, 2017 at 1:34 PM, Svatopluk Kraus wrote: > Probably not related. But when I took short look to the patch to see > what could go wrong, I walked into the following comment in > _rm_wlock(): "Assumes rm->rm_writecpus update is visible on other CPUs > before rm_cleanIPI is called." There is no explicit barrier to ensure > it. However, there might be some barriers inside of > smp_rendezvous_cpus(). I have no idea what could happened if this > assumption is not met. Note that rm_cleanIPI() is affected by the > patch. > > > > On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening > wrote: > > Can you post an example of such panic? Only 2 MI pieces were changed, > > netisr and rmlock. I haven't seen problems on my own amd64/i386/arm > testing > > of this, so a backtrace might help to narrow down the cause. > > > > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler > > wrote: > >> > >> On 04.02.17 20:54, Jason Harmening wrote: > >>> > >>> I suspect this broke rmlocks for mips because the rmlock implementation > >>> takes the address of the per-CPU pc_rm_queue when building tracker > >>> lists. That address may be later accessed from another CPU and will > >>> then translate to the wrong physical region if the address was taken > >>> relative to the globally-constant pcpup VA used on mips. > >>> > >>> Regardless, for mips get_pcpup() should be implemented as > >>> pcpu_find(curcpu) since returning an address that may mean something > >>> different depending on the CPU seems like a big POLA violation if > >>> nothing else. > >>> > >>> I'm more concerned about the report of powerpc breakage. For powerpc > we > >>> simply take each pcpu pointer from the pc_allcpu list (which is the > same > >>> value stored in the cpuid_to_pcpu array) and pass it through the > ap_pcpu > >>> global to each AP's startup code, which then stores it in sprg0. It > >>> should be globally unique and won't have the variable-translation > issues > >>> seen on mips. Andreas, are you certain this change was responsible > the > >>> breakage you saw, and was it the same sort of hang observed on mips? > >> > >> > >> I'm really sure. 313036 booted fine, allowed me to execute heavy > >> compilation jobs, np. 313037 on the other side gave me various patterns > of > >> panics. During startup, but I also succeeded to get into multiuser and > then > >> the panic happend during port building. > >> > >> I have no deeper inside where pcpu data is used. Justin mentioned > netisr? > >> > >> Andreas > >> > > > From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4012DCD21CE; Sun, 5 Feb 2017 19:37:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E570E168C; Sun, 5 Feb 2017 19:37:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15JbXs1038737; Sun, 5 Feb 2017 19:37:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JbVg8038724; Sun, 5 Feb 2017 19:37:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JbVg8038724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313289 - in vendor/llvm/dist: lib/CodeGen/SelectionDAG lib/Transforms/InstCombine lib/Transforms/Scalar test/CodeGen/AMDGPU test/CodeGen/NVPTX test/CodeGen/PowerPC test/Object/Inputs t... 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:34 -0000 Author: dim Date: Sun Feb 5 19:37:31 2017 New Revision: 313289 URL: https://svnweb.freebsd.org/changeset/base/313289 Log: Vendor import of llvm release_40 branch r294123: https://llvm.org/svn/llvm-project/llvm/branches/release_40@294123 Added: vendor/llvm/dist/test/Object/Inputs/phdr-note.elf-x86-64 (contents, props changed) vendor/llvm/dist/test/Object/Inputs/phdrs.elf-x86-64 (contents, props changed) vendor/llvm/dist/test/Transforms/LoopStrengthReduce/AMDGPU/preserve-addrspace-assert.ll vendor/llvm/dist/test/tools/llvm-objdump/X86/openbsd-headers.test vendor/llvm/dist/test/tools/llvm-objdump/X86/phdrs.test Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/fma-combine.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mad-combine.ll vendor/llvm/dist/test/CodeGen/NVPTX/fma-assoc.ll vendor/llvm/dist/test/CodeGen/PowerPC/fma-assoc.ll vendor/llvm/dist/test/Transforms/InstCombine/minmax-fold.ll vendor/llvm/dist/tools/llvm-objdump/ELFDump.cpp vendor/llvm/dist/utils/release/test-release.sh Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Feb 5 19:37:31 2017 (r313289) @@ -8123,9 +8123,12 @@ SDValue DAGCombiner::visitFADDForFMAComb } // More folding opportunities when target permits. - if ((AllowFusion || HasFMAD) && Aggressive) { + if (Aggressive) { // fold (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y (fma u, v, z)) - if (N0.getOpcode() == PreferredFusedOpcode && + // FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF + // are currently only supported on binary nodes. + if (Options.UnsafeFPMath && + N0.getOpcode() == PreferredFusedOpcode && N0.getOperand(2).getOpcode() == ISD::FMUL && N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) { return DAG.getNode(PreferredFusedOpcode, SL, VT, @@ -8137,7 +8140,10 @@ SDValue DAGCombiner::visitFADDForFMAComb } // fold (fadd x, (fma y, z, (fmul u, v)) -> (fma y, z (fma u, v, x)) - if (N1->getOpcode() == PreferredFusedOpcode && + // FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF + // are currently only supported on binary nodes. + if (Options.UnsafeFPMath && + N1->getOpcode() == PreferredFusedOpcode && N1.getOperand(2).getOpcode() == ISD::FMUL && N1->hasOneUse() && N1.getOperand(2)->hasOneUse()) { return DAG.getNode(PreferredFusedOpcode, SL, VT, @@ -8367,10 +8373,13 @@ SDValue DAGCombiner::visitFSUBForFMAComb } // More folding opportunities when target permits. - if ((AllowFusion || HasFMAD) && Aggressive) { + if (Aggressive) { // fold (fsub (fma x, y, (fmul u, v)), z) // -> (fma x, y (fma u, v, (fneg z))) - if (N0.getOpcode() == PreferredFusedOpcode && + // FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF + // are currently only supported on binary nodes. + if (Options.UnsafeFPMath && + N0.getOpcode() == PreferredFusedOpcode && N0.getOperand(2).getOpcode() == ISD::FMUL && N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) { return DAG.getNode(PreferredFusedOpcode, SL, VT, @@ -8384,7 +8393,10 @@ SDValue DAGCombiner::visitFSUBForFMAComb // fold (fsub x, (fma y, z, (fmul u, v))) // -> (fma (fneg y), z, (fma (fneg u), v, x)) - if (N1.getOpcode() == PreferredFusedOpcode && + // FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF + // are currently only supported on binary nodes. + if (Options.UnsafeFPMath && + N1.getOpcode() == PreferredFusedOpcode && N1.getOperand(2).getOpcode() == ISD::FMUL) { SDValue N20 = N1.getOperand(2).getOperand(0); SDValue N21 = N1.getOperand(2).getOperand(1); Modified: vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp Sun Feb 5 19:37:31 2017 (r313289) @@ -4039,11 +4039,6 @@ Instruction *InstCombiner::foldICmpUsing Constant *CMinus1 = ConstantInt::get(Op0->getType(), *CmpC - 1); return new ICmpInst(ICmpInst::ICMP_EQ, Op0, CMinus1); } - // (x (x >s -1) -> true if sign bit clear - if (CmpC->isMinSignedValue()) { - Constant *AllOnes = Constant::getAllOnesValue(Op0->getType()); - return new ICmpInst(ICmpInst::ICMP_SGT, Op0, AllOnes); - } } break; } @@ -4063,11 +4058,6 @@ Instruction *InstCombiner::foldICmpUsing if (*CmpC == Op0Max - 1) return new ICmpInst(ICmpInst::ICMP_EQ, Op0, ConstantInt::get(Op1->getType(), *CmpC + 1)); - - // (x >u 2147483647) -> (x true if sign bit set - if (CmpC->isMaxSignedValue()) - return new ICmpInst(ICmpInst::ICMP_SLT, Op0, - Constant::getNullValue(Op0->getType())); } break; } @@ -4299,6 +4289,27 @@ Instruction *InstCombiner::visitICmpInst (SI->getOperand(2) == Op0 && SI->getOperand(1) == Op1)) return nullptr; + // FIXME: We only do this after checking for min/max to prevent infinite + // looping caused by a reverse canonicalization of these patterns for min/max. + // FIXME: The organization of folds is a mess. These would naturally go into + // canonicalizeCmpWithConstant(), but we can't move all of the above folds + // down here after the min/max restriction. + ICmpInst::Predicate Pred = I.getPredicate(); + const APInt *C; + if (match(Op1, m_APInt(C))) { + // For i32: x >u 2147483647 -> x true if sign bit set + if (Pred == ICmpInst::ICMP_UGT && C->isMaxSignedValue()) { + Constant *Zero = Constant::getNullValue(Op0->getType()); + return new ICmpInst(ICmpInst::ICMP_SLT, Op0, Zero); + } + + // For i32: x x >s -1 -> true if sign bit clear + if (Pred == ICmpInst::ICMP_ULT && C->isMinSignedValue()) { + Constant *AllOnes = Constant::getAllOnesValue(Op0->getType()); + return new ICmpInst(ICmpInst::ICMP_SGT, Op0, AllOnes); + } + } + if (Instruction *Res = foldICmpInstWithConstant(I)) return Res; Modified: vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sun Feb 5 19:37:31 2017 (r313289) @@ -158,8 +158,9 @@ struct MemAccessTy { bool operator!=(MemAccessTy Other) const { return !(*this == Other); } - static MemAccessTy getUnknown(LLVMContext &Ctx) { - return MemAccessTy(Type::getVoidTy(Ctx), UnknownAddressSpace); + static MemAccessTy getUnknown(LLVMContext &Ctx, + unsigned AS = UnknownAddressSpace) { + return MemAccessTy(Type::getVoidTy(Ctx), AS); } }; @@ -2279,8 +2280,10 @@ bool LSRInstance::reconcileNewOffset(LSR // TODO: Be less conservative when the type is similar and can use the same // addressing modes. if (Kind == LSRUse::Address) { - if (AccessTy != LU.AccessTy) - NewAccessTy = MemAccessTy::getUnknown(AccessTy.MemTy->getContext()); + if (AccessTy.MemTy != LU.AccessTy.MemTy) { + NewAccessTy = MemAccessTy::getUnknown(AccessTy.MemTy->getContext(), + AccessTy.AddrSpace); + } } // Conservatively assume HasBaseReg is true for now. Modified: vendor/llvm/dist/test/CodeGen/AMDGPU/fma-combine.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/AMDGPU/fma-combine.ll Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/test/CodeGen/AMDGPU/fma-combine.ll Sun Feb 5 19:37:31 2017 (r313289) @@ -1,6 +1,6 @@ -; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -fp-contract=fast < %s | FileCheck -check-prefix=SI-NOFMA -check-prefix=SI -check-prefix=FUNC %s -; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs -fp-contract=fast < %s | FileCheck -check-prefix=SI-NOFMA -check-prefix=SI -check-prefix=FUNC %s -; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -fp-contract=fast -enable-no-infs-fp-math -mattr=+fp32-denormals < %s | FileCheck -check-prefix=SI-FMA -check-prefix=SI -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -fp-contract=fast < %s | FileCheck -check-prefix=SI-NOFMA -check-prefix=SI-SAFE -check-prefix=SI -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs -fp-contract=fast < %s | FileCheck -check-prefix=SI-NOFMA -check-prefix=SI-SAFE -check-prefix=SI -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -fp-contract=fast -enable-no-infs-fp-math -enable-unsafe-fp-math -mattr=+fp32-denormals < %s | FileCheck -check-prefix=SI-FMA -check-prefix=SI-UNSAFE -check-prefix=SI -check-prefix=FUNC %s ; Note: The SI-FMA conversions of type x * (y + 1) --> x * y + x would be ; beneficial even without fp32 denormals, but they do require no-infs-fp-math @@ -308,8 +308,14 @@ define void @combine_to_fma_fsub_2_f64_2 ; SI-DAG: buffer_load_dwordx2 [[Z:v\[[0-9]+:[0-9]+\]]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:16{{$}} ; SI-DAG: buffer_load_dwordx2 [[U:v\[[0-9]+:[0-9]+\]]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:24{{$}} ; SI-DAG: buffer_load_dwordx2 [[V:v\[[0-9]+:[0-9]+\]]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:32{{$}} -; SI: v_fma_f64 [[FMA0:v\[[0-9]+:[0-9]+\]]], [[U]], [[V]], -[[Z]] -; SI: v_fma_f64 [[RESULT:v\[[0-9]+:[0-9]+\]]], [[X]], [[Y]], [[FMA0]] + +; SI-SAFE: v_mul_f64 [[TMP0:v\[[0-9]+:[0-9]+\]]], [[U]], [[V]] +; SI-SAFE: v_fma_f64 [[TMP1:v\[[0-9]+:[0-9]+\]]], [[X]], [[Y]], [[TMP0]] +; SI-SAFE: v_add_f64 [[RESULT:v\[[0-9]+:[0-9]+\]]], [[TMP1]], -[[Z]] + +; SI-UNSAFE: v_fma_f64 [[FMA0:v\[[0-9]+:[0-9]+\]]], [[U]], [[V]], -[[Z]] +; SI-UNSAFE: v_fma_f64 [[RESULT:v\[[0-9]+:[0-9]+\]]], [[X]], [[Y]], [[FMA0]] + ; SI: buffer_store_dwordx2 [[RESULT]] define void @aggressive_combine_to_fma_fsub_0_f64(double addrspace(1)* noalias %out, double addrspace(1)* noalias %in) #1 { %tid = tail call i32 @llvm.amdgcn.workitem.id.x() #0 @@ -343,8 +349,14 @@ define void @aggressive_combine_to_fma_f ; SI-DAG: buffer_load_dwordx2 [[Z:v\[[0-9]+:[0-9]+\]]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:16{{$}} ; SI-DAG: buffer_load_dwordx2 [[U:v\[[0-9]+:[0-9]+\]]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:24{{$}} ; SI-DAG: buffer_load_dwordx2 [[V:v\[[0-9]+:[0-9]+\]]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:32{{$}} -; SI: v_fma_f64 [[FMA0:v\[[0-9]+:[0-9]+\]]], -[[U]], [[V]], [[X]] -; SI: v_fma_f64 [[RESULT:v\[[0-9]+:[0-9]+\]]], -[[Y]], [[Z]], [[FMA0]] + +; SI-SAFE: v_mul_f64 [[TMP0:v\[[0-9]+:[0-9]+\]]], [[U]], [[V]] +; SI-SAFE: v_fma_f64 [[TMP1:v\[[0-9]+:[0-9]+\]]], [[Y]], [[Z]], [[TMP0]] +; SI-SAFE: v_add_f64 [[RESULT:v\[[0-9]+:[0-9]+\]]], [[X]], -[[TMP1]] + +; SI-UNSAFE: v_fma_f64 [[FMA0:v\[[0-9]+:[0-9]+\]]], -[[U]], [[V]], [[X]] +; SI-UNSAFE: v_fma_f64 [[RESULT:v\[[0-9]+:[0-9]+\]]], -[[Y]], [[Z]], [[FMA0]] + ; SI: buffer_store_dwordx2 [[RESULT]] define void @aggressive_combine_to_fma_fsub_1_f64(double addrspace(1)* noalias %out, double addrspace(1)* noalias %in) #1 { %tid = tail call i32 @llvm.amdgcn.workitem.id.x() #0 Modified: vendor/llvm/dist/test/CodeGen/AMDGPU/mad-combine.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/AMDGPU/mad-combine.ll Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/test/CodeGen/AMDGPU/mad-combine.ll Sun Feb 5 19:37:31 2017 (r313289) @@ -1,12 +1,12 @@ ; Make sure we still form mad even when unsafe math or fp-contract is allowed instead of fma. -; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=SI-STD -check-prefix=FUNC %s -; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -fp-contract=fast < %s | FileCheck -check-prefix=SI -check-prefix=SI-STD -check-prefix=FUNC %s -; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -enable-unsafe-fp-math < %s | FileCheck -check-prefix=SI -check-prefix=SI-STD -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=SI-STD -check-prefix=SI-STD-SAFE -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -fp-contract=fast < %s | FileCheck -check-prefix=SI -check-prefix=SI-STD -check-prefix=SI-STD-SAFE -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs -enable-unsafe-fp-math < %s | FileCheck -check-prefix=SI -check-prefix=SI-STD -check-prefix=SI-STD-UNSAFE -check-prefix=FUNC %s ; Make sure we don't form mad with denormals -; RUN: llc -march=amdgcn -mcpu=tahiti -mattr=+fp32-denormals -fp-contract=fast -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=SI-DENORM -check-prefix=FUNC %s -; RUN: llc -march=amdgcn -mcpu=verde -mattr=+fp32-denormals -fp-contract=fast -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=SI-DENORM-SLOWFMAF -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=tahiti -mattr=+fp32-denormals -fp-contract=fast -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=SI-DENORM -check-prefix=SI-DENORM-FASTFMAF -check-prefix=FUNC %s +; RUN: llc -march=amdgcn -mcpu=verde -mattr=+fp32-denormals -fp-contract=fast -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=SI-DENORM -check-prefix=SI-DENORM-SLOWFMAF -check-prefix=FUNC %s declare i32 @llvm.amdgcn.workitem.id.x() #0 declare float @llvm.fabs.f32(float) #0 @@ -21,7 +21,7 @@ declare float @llvm.fmuladd.f32(float, f ; SI-STD: v_mac_f32_e32 [[C]], [[B]], [[A]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], [[C]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], [[C]] ; SI-DENORM-SLOWFMAF-NOT: v_fma ; SI-DENORM-SLOWFMAF-NOT: v_mad @@ -58,8 +58,8 @@ define void @combine_to_mad_f32_0(float ; SI-STD-DAG: v_mac_f32_e32 [[C]], [[B]], [[A]] ; SI-STD-DAG: v_mac_f32_e32 [[D]], [[B]], [[A]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], [[A]], [[B]], [[C]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], [[D]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], [[A]], [[B]], [[C]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], [[D]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF-DAG: v_add_f32_e32 [[RESULT0:v[0-9]+]], [[C]], [[TMP]] @@ -100,7 +100,7 @@ define void @combine_to_mad_f32_0_2use(f ; SI-DAG: buffer_load_dword [[C:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:8{{$}} ; SI-STD: v_mac_f32_e32 [[C]], [[B]], [[A]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], [[C]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], [[C]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF: v_add_f32_e32 [[RESULT:v[0-9]+]], [[TMP]], [[C]] @@ -131,7 +131,7 @@ define void @combine_to_mad_f32_1(float ; SI-DAG: buffer_load_dword [[C:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:8{{$}} ; SI-STD: v_mad_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], -[[C]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], -[[C]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], -[[C]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[C]], [[TMP]] @@ -164,8 +164,8 @@ define void @combine_to_mad_fsub_0_f32(f ; SI-STD-DAG: v_mad_f32 [[RESULT0:v[0-9]+]], [[A]], [[B]], -[[C]] ; SI-STD-DAG: v_mad_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], -[[D]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], [[A]], [[B]], -[[C]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], -[[D]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], [[A]], [[B]], -[[C]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], -[[D]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF-DAG: v_subrev_f32_e32 [[RESULT0:v[0-9]+]], [[C]], [[TMP]] @@ -203,7 +203,7 @@ define void @combine_to_mad_fsub_0_f32_2 ; SI-DAG: buffer_load_dword [[C:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:8{{$}} ; SI-STD: v_mad_f32 [[RESULT:v[0-9]+]], -[[A]], [[B]], [[C]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], -[[A]], [[B]], [[C]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[RESULT:v[0-9]+]], -[[A]], [[B]], [[C]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[TMP]], [[C]] @@ -235,8 +235,8 @@ define void @combine_to_mad_fsub_1_f32(f ; SI-STD-DAG: v_mad_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], [[C]] ; SI-STD-DAG: v_mad_f32 [[RESULT1:v[0-9]+]], -[[A]], [[B]], [[D]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], [[C]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], -[[A]], [[B]], [[D]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], [[C]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], -[[A]], [[B]], [[D]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF-DAG: v_subrev_f32_e32 [[RESULT0:v[0-9]+]], [[TMP]], [[C]] @@ -275,7 +275,7 @@ define void @combine_to_mad_fsub_1_f32_2 ; SI-STD: v_mad_f32 [[RESULT:v[0-9]+]], [[A]], -[[B]], -[[C]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], -[[A]], [[B]], -[[C]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[RESULT:v[0-9]+]], -[[A]], [[B]], -[[C]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e64 [[TMP:v[0-9]+]], [[A]], -[[B]] ; SI-DENORM-SLOWFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[C]], [[TMP]] @@ -309,8 +309,8 @@ define void @combine_to_mad_fsub_2_f32(f ; SI-STD-DAG: v_mad_f32 [[RESULT0:v[0-9]+]], [[A]], -[[B]], -[[C]] ; SI-STD-DAG: v_mad_f32 [[RESULT1:v[0-9]+]], [[A]], -[[B]], -[[D]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], -[[C]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], -[[A]], [[B]], -[[D]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], -[[C]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], -[[A]], [[B]], -[[D]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e64 [[TMP:v[0-9]+]], [[A]], -[[B]] ; SI-DENORM-SLOWFMAF-DAG: v_subrev_f32_e32 [[RESULT0:v[0-9]+]], [[C]], [[TMP]] @@ -352,8 +352,8 @@ define void @combine_to_mad_fsub_2_f32_2 ; SI-STD-DAG: v_mad_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], -[[C]] ; SI-STD-DAG: v_mad_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], -[[D]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], -[[C]] -; SI-DENORM-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], -[[D]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT0:v[0-9]+]], -[[A]], [[B]], -[[C]] +; SI-DENORM-FASTFMAF-DAG: v_fma_f32 [[RESULT1:v[0-9]+]], [[A]], [[B]], -[[D]] ; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF-DAG: v_sub_f32_e64 [[RESULT0:v[0-9]+]], -[[TMP]], [[C]] @@ -399,12 +399,9 @@ define void @combine_to_mad_fsub_2_f32_2 ; SI-STD: v_fma_f32 [[TMP1:v[0-9]+]], [[A]], [[B]], [[TMP0]] ; SI-STD: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[C]], [[TMP1]] -; SI-DENORM: v_fma_f32 [[TMP0:v[0-9]+]], [[D]], [[E]], -[[C]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], [[TMP0]] - -; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] -; SI-DENORM-SLOWFMAF: v_fma_f32 [[TMP1:v[0-9]+]], [[A]], [[B]], [[TMP0]] -; SI-DENORM-SLOWFMAF: v_subrev_f32_e32 [[RESULT1:v[0-9]+]], [[C]], [[TMP1]] +; SI-DENORM: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] +; SI-DENORM: v_fma_f32 [[TMP1:v[0-9]+]], [[A]], [[B]], [[TMP0]] +; SI-DENORM: v_subrev_f32_e32 [[RESULT1:v[0-9]+]], [[C]], [[TMP1]] ; SI: buffer_store_dword [[RESULT]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64{{$}} define void @aggressive_combine_to_mad_fsub_0_f32(float addrspace(1)* noalias %out, float addrspace(1)* noalias %in) #1 { @@ -444,12 +441,9 @@ define void @aggressive_combine_to_mad_f ; SI-STD: v_fma_f32 [[TMP1:v[0-9]+]], [[B]], [[C]], [[TMP0]] ; SI-STD: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[TMP1]], [[A]] -; SI-DENORM: v_fma_f32 [[TMP0:v[0-9]+]], -[[D]], [[E]], [[A]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], -[[B]], [[C]], [[TMP0]] - -; SI-DENORM-SLOWFMAF: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] -; SI-DENORM-SLOWFMAF: v_fma_f32 [[TMP1:v[0-9]+]], [[B]], [[C]], [[TMP0]] -; SI-DENORM-SLOWFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[TMP1]], [[A]] +; SI-DENORM: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] +; SI-DENORM: v_fma_f32 [[TMP1:v[0-9]+]], [[B]], [[C]], [[TMP0]] +; SI-DENORM: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[TMP1]], [[A]] ; SI: buffer_store_dword [[RESULT]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64{{$}} ; SI: s_endpgm @@ -485,19 +479,23 @@ define void @aggressive_combine_to_mad_f ; SI-DAG: buffer_load_dword [[D:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:12{{$}} ; SI-DAG: buffer_load_dword [[E:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:16{{$}} -; SI-STD: v_mad_f32 [[TMP:v[0-9]+]], [[D]], [[E]], -[[C]] -; SI-STD: v_mac_f32_e32 [[TMP]], [[B]], [[A]] - -; SI-DENORM: v_fma_f32 [[TMP:v[0-9]+]], [[D]], [[E]], -[[C]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], [[A]], [[B]], [[TMP]] +; SI-STD-SAFE: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] +; SI-STD-SAFE: v_mac_f32_e32 [[TMP0]], [[B]], [[A]] +; SI-STD-SAFE: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[C]], [[TMP0]] + +; SI-STD-UNSAFE: v_mad_f32 [[RESULT:v[0-9]+]], [[D]], [[E]], -[[C]] +; SI-STD-UNSAFE: v_mac_f32_e32 [[RESULT]], [[B]], [[A]] + +; SI-DENORM-FASTFMAF: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[TMP1:v[0-9]+]], [[A]], [[B]], [[TMP0]] +; SI-DENORM-FASTFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[C]], [[TMP1]] ; SI-DENORM-SLOWFMAF-DAG: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] ; SI-DENORM-SLOWFMAF-DAG: v_mul_f32_e32 [[TMP1:v[0-9]+]], [[B]], [[A]] ; SI-DENORM-SLOWFMAF: v_add_f32_e32 [[TMP2:v[0-9]+]], [[TMP0]], [[TMP1]] ; SI-DENORM-SLOWFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[C]], [[TMP2]] -; SI-DENORM: buffer_store_dword [[RESULT]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64{{$}} -; SI-STD: buffer_store_dword [[TMP]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64{{$}} +; SI: buffer_store_dword [[RESULT]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64{{$}} ; SI: s_endpgm define void @aggressive_combine_to_mad_fsub_2_f32(float addrspace(1)* noalias %out, float addrspace(1)* noalias %in) #1 { %tid = tail call i32 @llvm.amdgcn.workitem.id.x() #0 @@ -532,11 +530,16 @@ define void @aggressive_combine_to_mad_f ; SI-DAG: buffer_load_dword [[D:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:12{{$}} ; SI-DAG: buffer_load_dword [[E:v[0-9]+]], v{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0 addr64 offset:16{{$}} -; SI-STD: v_mad_f32 [[TMP:v[0-9]+]], -[[D]], [[E]], [[A]] -; SI-STD: v_mad_f32 [[RESULT:v[0-9]+]], -[[B]], [[C]], [[TMP]] - -; SI-DENORM: v_fma_f32 [[TMP:v[0-9]+]], -[[D]], [[E]], [[A]] -; SI-DENORM: v_fma_f32 [[RESULT:v[0-9]+]], -[[B]], [[C]], [[TMP]] +; SI-STD-SAFE: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] +; SI-STD-SAFE: v_mac_f32_e32 [[TMP0]], [[C]], [[B]] +; SI-STD-SAFE: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[TMP0]], [[A]] + +; SI-STD-UNSAFE: v_mad_f32 [[TMP:v[0-9]+]], -[[D]], [[E]], [[A]] +; SI-STD-UNSAFE: v_mad_f32 [[RESULT:v[0-9]+]], -[[B]], [[C]], [[TMP]] + +; SI-DENORM-FASTFMAF: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] +; SI-DENORM-FASTFMAF: v_fma_f32 [[TMP1:v[0-9]+]], [[B]], [[C]], [[TMP0]] +; SI-DENORM-FASTFMAF: v_subrev_f32_e32 [[RESULT:v[0-9]+]], [[TMP1]], [[A]] ; SI-DENORM-SLOWFMAF-DAG: v_mul_f32_e32 [[TMP0:v[0-9]+]], [[E]], [[D]] ; SI-DENORM-SLOWFMAF-DAG: v_mul_f32_e32 [[TMP1:v[0-9]+]], [[C]], [[B]] Modified: vendor/llvm/dist/test/CodeGen/NVPTX/fma-assoc.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/NVPTX/fma-assoc.ll Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/test/CodeGen/NVPTX/fma-assoc.ll Sun Feb 5 19:37:31 2017 (r313289) @@ -1,9 +1,10 @@ -; RUN: llc < %s -march=nvptx -mcpu=sm_20 -fp-contract=fast | FileCheck %s +; RUN: llc < %s -march=nvptx -mcpu=sm_20 -fp-contract=fast | FileCheck %s -check-prefix=CHECK +; RUN: llc < %s -march=nvptx -mcpu=sm_20 -fp-contract=fast -enable-unsafe-fp-math | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-UNSAFE define ptx_device float @t1_f32(float %x, float %y, float %z, float %u, float %v) { -; CHECK: fma.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}; -; CHECK: fma.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}; +; CHECK-UNSAFE: fma.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}; +; CHECK-UNSAFE: fma.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}; ; CHECK: ret; %a = fmul float %x, %y %b = fmul float %u, %v @@ -14,8 +15,8 @@ define ptx_device float @t1_f32(float %x define ptx_device double @t1_f64(double %x, double %y, double %z, double %u, double %v) { -; CHECK: fma.rn.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}; -; CHECK: fma.rn.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}; +; CHECK-UNSAFE: fma.rn.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}; +; CHECK-UNSAFE: fma.rn.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}; ; CHECK: ret; %a = fmul double %x, %y %b = fmul double %u, %v Modified: vendor/llvm/dist/test/CodeGen/PowerPC/fma-assoc.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/PowerPC/fma-assoc.ll Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/test/CodeGen/PowerPC/fma-assoc.ll Sun Feb 5 19:37:31 2017 (r313289) @@ -1,5 +1,7 @@ -; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck %s -; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX %s +; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK -check-prefix=CHECK-SAFE %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX -check-prefix=CHECK-VSX-SAFE %s +; RUN: llc -verify-machineinstrs < %s -march=ppc32 -fp-contract=fast -enable-unsafe-fp-math -mattr=-vsx -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK -check-prefix=CHECK-UNSAFE %s +; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -fp-contract=fast -enable-unsafe-fp-math -mattr=+vsx -mcpu=pwr7 -disable-ppc-vsx-fma-mutation=false | FileCheck -check-prefix=CHECK-VSX -check-prefix=CHECK-UNSAFE-VSX %s define double @test_FMADD_ASSOC1(double %A, double %B, double %C, double %D, double %E) { @@ -8,16 +10,28 @@ define double @test_FMADD_ASSOC1(double %H = fadd double %F, %G ; [#uses=1] %I = fadd double %H, %E ; [#uses=1] ret double %I -; CHECK-LABEL: test_FMADD_ASSOC1: -; CHECK: fmadd -; CHECK-NEXT: fmadd -; CHECK-NEXT: blr - -; CHECK-VSX-LABEL: test_FMADD_ASSOC1: -; CHECK-VSX: xsmaddmdp -; CHECK-VSX-NEXT: xsmaddadp -; CHECK-VSX-NEXT: fmr -; CHECK-VSX-NEXT: blr +; CHECK-SAFE-LABEL: test_FMADD_ASSOC1: +; CHECK-SAFE: fmul +; CHECK-SAFE-NEXT: fmadd +; CHECK-SAFE-NEXT: fadd +; CHECK-SAFE-NEXT: blr + +; CHECK-UNSAFE-LABEL: test_FMADD_ASSOC1: +; CHECK-UNSAFE: fmadd +; CHECK-UNSAFE-NEXT: fmadd +; CHECK-UNSAFE-NEXT: blr + +; CHECK-VSX-SAFE-LABEL: test_FMADD_ASSOC1: +; CHECK-VSX-SAFE: xsmuldp +; CHECK-VSX-SAFE-NEXT: xsmaddadp +; CHECK-VSX-SAFE-NEXT: xsadddp +; CHECK-VSX-SAFE-NEXT: blr + +; CHECK-VSX-UNSAFE-LABEL: test_FMADD_ASSOC1: +; CHECK-VSX-UNSAFE: xsmaddmdp +; CHECK-VSX-UNSAFE-NEXT: xsmaddadp +; CHECK-VSX-UNSAFE-NEXT: fmr +; CHECK-VSX-UNSAFE-NEXT: blr } define double @test_FMADD_ASSOC2(double %A, double %B, double %C, @@ -27,16 +41,28 @@ define double @test_FMADD_ASSOC2(double %H = fadd double %F, %G ; [#uses=1] %I = fadd double %E, %H ; [#uses=1] ret double %I -; CHECK-LABEL: test_FMADD_ASSOC2: -; CHECK: fmadd -; CHECK-NEXT: fmadd -; CHECK-NEXT: blr - -; CHECK-VSX-LABEL: test_FMADD_ASSOC2: -; CHECK-VSX: xsmaddmdp -; CHECK-VSX-NEXT: xsmaddadp -; CHECK-VSX-NEXT: fmr -; CHECK-VSX-NEXT: blr +; CHECK-SAFE-LABEL: test_FMADD_ASSOC2: +; CHECK-SAFE: fmul +; CHECK-SAFE-NEXT: fmadd +; CHECK-SAFE-NEXT: fadd +; CHECK-SAFE-NEXT: blr + +; CHECK-UNSAFE-LABEL: test_FMADD_ASSOC2: +; CHECK-UNSAFE: fmadd +; CHECK-UNSAFE-NEXT: fmadd +; CHECK-UNSAFE-NEXT: blr + +; CHECK-VSX-SAFE-LABEL: test_FMADD_ASSOC2: +; CHECK-VSX-SAFE: xsmuldp +; CHECK-VSX-SAFE-NEXT: xsmaddadp +; CHECK-VSX-SAFE-NEXT: xsadddp +; CHECK-VSX-SAFE-NEXT: blr + +; CHECK-VSX-UNSAFE-LABEL: test_FMADD_ASSOC2: +; CHECK-VSX-UNSAFE: xsmaddmdp +; CHECK-VSX-UNSAFE-NEXT: xsmaddadp +; CHECK-VSX-UNSAFE-NEXT: fmr +; CHECK-VSX-UNSAFE-NEXT: blr } define double @test_FMSUB_ASSOC1(double %A, double %B, double %C, @@ -46,16 +72,28 @@ define double @test_FMSUB_ASSOC1(double %H = fadd double %F, %G ; [#uses=1] %I = fsub double %H, %E ; [#uses=1] ret double %I -; CHECK-LABEL: test_FMSUB_ASSOC1: -; CHECK: fmsub -; CHECK-NEXT: fmadd -; CHECK-NEXT: blr - -; CHECK-VSX-LABEL: test_FMSUB_ASSOC1: -; CHECK-VSX: xsmsubmdp -; CHECK-VSX-NEXT: xsmaddadp -; CHECK-VSX-NEXT: fmr -; CHECK-VSX-NEXT: blr +; CHECK-SAFE-LABEL: test_FMSUB_ASSOC1: +; CHECK-SAFE: fmul +; CHECK-SAFE-NEXT: fmadd +; CHECK-SAFE-NEXT: fsub +; CHECK-SAFE-NEXT: blr + +; CHECK-UNSAFE-LABEL: test_FMSUB_ASSOC1: +; CHECK-UNSAFE: fmsub +; CHECK-UNSAFE-NEXT: fmadd +; CHECK-UNSAFE-NEXT: blr + +; CHECK-SAFE-VSX-LABEL: test_FMSUB_ASSOC1: +; CHECK-SAFE-VSX: xsmuldp +; CHECK-SAFE-VSX-NEXT: xsmaddadp +; CHECK-SAFE-VSX-NEXT: xssubdp +; CHECK-SAFE-VSX-NEXT: blr + +; CHECK-UNSAFE-VSX-LABEL: test_FMSUB_ASSOC1: +; CHECK-UNSAFE-VSX: xsmsubmdp +; CHECK-UNSAFE-VSX-NEXT: xsmaddadp +; CHECK-UNSAFE-VSX-NEXT: fmr +; CHECK-UNSAFE-VSX-NEXT: blr } define double @test_FMSUB_ASSOC2(double %A, double %B, double %C, @@ -65,16 +103,28 @@ define double @test_FMSUB_ASSOC2(double %H = fadd double %F, %G ; [#uses=1] %I = fsub double %E, %H ; [#uses=1] ret double %I -; CHECK-LABEL: test_FMSUB_ASSOC2: -; CHECK: fnmsub -; CHECK-NEXT: fnmsub -; CHECK-NEXT: blr - -; CHECK-VSX-LABEL: test_FMSUB_ASSOC2: -; CHECK-VSX: xsnmsubmdp -; CHECK-VSX-NEXT: xsnmsubadp -; CHECK-VSX-NEXT: fmr -; CHECK-VSX-NEXT: blr +; CHECK-SAFE-LABEL: test_FMSUB_ASSOC2: +; CHECK-SAFE: fmul +; CHECK-SAFE-NEXT: fmadd +; CHECK-SAFE-NEXT: fsub +; CHECK-SAFE-NEXT: blr + +; CHECK-UNSAFE-LABEL: test_FMSUB_ASSOC2: +; CHECK-UNSAFE: fnmsub +; CHECK-UNSAFE-NEXT: fnmsub +; CHECK-UNSAFE-NEXT: blr + +; CHECK-SAFE-VSX-LABEL: test_FMSUB_ASSOC2: +; CHECK-SAFE-VSX: xsmuldp +; CHECK-SAFE-VSX-NEXT: xsmaddadp +; CHECK-SAFE-VSX-NEXT: xssubdp +; CHECK-SAFE-VSX-NEXT: blr + +; CHECK-UNSAFE-VSX-LABEL: test_FMSUB_ASSOC2: +; CHECK-UNSAFE-VSX: xsnmsubmdp +; CHECK-UNSAFE-VSX-NEXT: xsnmsubadp +; CHECK-UNSAFE-VSX-NEXT: fmr +; CHECK-UNSAFE-VSX-NEXT: blr } define double @test_FMADD_ASSOC_EXT1(float %A, float %B, double %C, Added: vendor/llvm/dist/test/Object/Inputs/phdr-note.elf-x86-64 ============================================================================== Binary file. No diff available. Added: vendor/llvm/dist/test/Object/Inputs/phdrs.elf-x86-64 ============================================================================== Binary file. No diff available. Modified: vendor/llvm/dist/test/Transforms/InstCombine/minmax-fold.ll ============================================================================== --- vendor/llvm/dist/test/Transforms/InstCombine/minmax-fold.ll Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/test/Transforms/InstCombine/minmax-fold.ll Sun Feb 5 19:37:31 2017 (r313289) @@ -339,3 +339,84 @@ define i32 @test75(i32 %x) { ret i32 %retval } +; The next 3 min tests should canonicalize to the same form...and not infinite loop. + +define double @PR31751_umin1(i32 %x) { +; CHECK-LABEL: @PR31751_umin1( +; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i32 %x, 2147483647 +; CHECK-NEXT: [[CONV1:%.*]] = select i1 [[TMP1]], i32 %x, i32 2147483647 +; CHECK-NEXT: [[TMP2:%.*]] = sitofp i32 [[CONV1]] to double +; CHECK-NEXT: ret double [[TMP2]] +; + %cmp = icmp slt i32 %x, 0 + %sel = select i1 %cmp, i32 2147483647, i32 %x + %conv = sitofp i32 %sel to double + ret double %conv +} + +define double @PR31751_umin2(i32 %x) { +; CHECK-LABEL: @PR31751_umin2( +; CHECK-NEXT: [[CMP:%.*]] = icmp ult i32 %x, 2147483647 +; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 %x, i32 2147483647 +; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[SEL]] to double +; CHECK-NEXT: ret double [[CONV]] +; + %cmp = icmp ult i32 %x, 2147483647 + %sel = select i1 %cmp, i32 %x, i32 2147483647 + %conv = sitofp i32 %sel to double + ret double %conv +} + +define double @PR31751_umin3(i32 %x) { +; CHECK-LABEL: @PR31751_umin3( +; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i32 %x, 2147483647 +; CHECK-NEXT: [[SEL:%.*]] = select i1 [[TMP1]], i32 %x, i32 2147483647 +; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[SEL]] to double +; CHECK-NEXT: ret double [[CONV]] +; + %cmp = icmp ugt i32 %x, 2147483647 + %sel = select i1 %cmp, i32 2147483647, i32 %x + %conv = sitofp i32 %sel to double + ret double %conv +} + +; The next 3 max tests should canonicalize to the same form...and not infinite loop. + +define double @PR31751_umax1(i32 %x) { +; CHECK-LABEL: @PR31751_umax1( +; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i32 %x, -2147483648 +; CHECK-NEXT: [[CONV1:%.*]] = select i1 [[TMP1]], i32 %x, i32 -2147483648 +; CHECK-NEXT: [[TMP2:%.*]] = sitofp i32 [[CONV1]] to double +; CHECK-NEXT: ret double [[TMP2]] +; + %cmp = icmp sgt i32 %x, -1 + %sel = select i1 %cmp, i32 2147483648, i32 %x + %conv = sitofp i32 %sel to double + ret double %conv +} + +define double @PR31751_umax2(i32 %x) { +; CHECK-LABEL: @PR31751_umax2( +; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i32 %x, -2147483648 +; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], i32 %x, i32 -2147483648 +; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[SEL]] to double +; CHECK-NEXT: ret double [[CONV]] +; + %cmp = icmp ugt i32 %x, 2147483648 + %sel = select i1 %cmp, i32 %x, i32 2147483648 + %conv = sitofp i32 %sel to double + ret double %conv +} + +define double @PR31751_umax3(i32 %x) { +; CHECK-LABEL: @PR31751_umax3( +; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i32 %x, -2147483648 +; CHECK-NEXT: [[SEL:%.*]] = select i1 [[TMP1]], i32 %x, i32 -2147483648 +; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[SEL]] to double +; CHECK-NEXT: ret double [[CONV]] +; + %cmp = icmp ult i32 %x, 2147483648 + %sel = select i1 %cmp, i32 2147483648, i32 %x + %conv = sitofp i32 %sel to double + ret double %conv +} Added: vendor/llvm/dist/test/Transforms/LoopStrengthReduce/AMDGPU/preserve-addrspace-assert.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/Transforms/LoopStrengthReduce/AMDGPU/preserve-addrspace-assert.ll Sun Feb 5 19:37:31 2017 (r313289) @@ -0,0 +1,54 @@ +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -loop-reduce %s | FileCheck %s + +; Test for assert resulting from inconsistent isLegalAddressingMode +; answers when the address space was dropped from the query. + +target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-p24:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64" + +%0 = type { i32, double, i32, float } + +; CHECK-LABEL: @lsr_crash_preserve_addrspace_unknown_type( +; CHECK: %tmp4 = bitcast %0 addrspace(3)* %tmp to double addrspace(3)* +; CHECK: %scevgep5 = getelementptr double, double addrspace(3)* %tmp4, i32 1 +; CHEC: load double, double addrspace(3)* %scevgep5 + +; CHECK: %scevgep = getelementptr i32, i32 addrspace(3)* %tmp1, i32 4 +; CHECK:%tmp14 = load i32, i32 addrspace(3)* %scevgep +define void @lsr_crash_preserve_addrspace_unknown_type() #0 { +bb: + br label %bb1 + +bb1: ; preds = %bb17, %bb + %tmp = phi %0 addrspace(3)* [ undef, %bb ], [ %tmp18, %bb17 ] + %tmp2 = getelementptr inbounds %0, %0 addrspace(3)* %tmp, i64 0, i32 1 + %tmp3 = load double, double addrspace(3)* %tmp2, align 8 + br label %bb4 + +bb4: ; preds = %bb1 + br i1 undef, label %bb8, label %bb5 + +bb5: ; preds = %bb4 + unreachable + +bb8: ; preds = %bb4 + %tmp9 = getelementptr inbounds %0, %0 addrspace(3)* %tmp, i64 0, i32 0 + %tmp10 = load i32, i32 addrspace(3)* %tmp9, align 4 + %tmp11 = icmp eq i32 0, %tmp10 + br i1 %tmp11, label %bb12, label %bb17 + +bb12: ; preds = %bb8 + %tmp13 = getelementptr inbounds %0, %0 addrspace(3)* %tmp, i64 0, i32 2 + %tmp14 = load i32, i32 addrspace(3)* %tmp13, align 4 + %tmp15 = icmp eq i32 0, %tmp14 + br i1 %tmp15, label %bb16, label %bb17 + +bb16: ; preds = %bb12 + unreachable + +bb17: ; preds = %bb12, %bb8 + %tmp18 = getelementptr inbounds %0, %0 addrspace(3)* %tmp, i64 2 + br label %bb1 +} + +attributes #0 = { nounwind } +attributes #1 = { nounwind readnone } Added: vendor/llvm/dist/test/tools/llvm-objdump/X86/openbsd-headers.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/tools/llvm-objdump/X86/openbsd-headers.test Sun Feb 5 19:37:31 2017 (r313289) @@ -0,0 +1,20 @@ +## openbsd-phdrs.elf-x86-64 was generated using GNU ld (GNU Binutils for Ubuntu) 2.26.1. +## llvm-mc -filetype=obj -triple=x86_64-pc-linux test.s -o main.o +## ld -script linker.script main.o -o openbsd-phdrs.elf-x86-64 +## +## test.s is an empty file. +## linker.script: +## PHDRS { text PT_LOAD FILEHDR PHDRS; foo 0x65a3dbe6; bar 0x65a3dbe7; zed 0x65a41be6; } +## Where 0x65a3dbe6 is the value of PT_OPENBSD_RANDOMIZE, +## 0x65a3dbe7 is the value of PT_OPENBSD_WXNEEDED, +## 0x65a41be6 is the value of PT_OPENBSD_BOOTDATA +## SECTIONS { . = SIZEOF_HEADERS; .all : { *(.*) } : text } +RUN: llvm-objdump -p %p/../../../Object/Inputs/openbsd-phdrs.elf-x86-64 \ +RUN: | FileCheck %s + +CHECK: OPENBSD_RANDOMIZE off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 +CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags --- +CHECK-NEXT: OPENBSD_WXNEEDED off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 +CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags --- +CHECK-NEXT: OPENBSD_BOOTDATA off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 +CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags --- Added: vendor/llvm/dist/test/tools/llvm-objdump/X86/phdrs.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/tools/llvm-objdump/X86/phdrs.test Sun Feb 5 19:37:31 2017 (r313289) @@ -0,0 +1,32 @@ +## phdrs.elf-x86-64 was generated using lld (3.9). +## llvm-mc -filetype=obj -triple=x86_64-unknown-linux test.s -o test.o +## lld test.o -o phdrs.elf-x86-64 +## +## test.s: +## .global _start +## _start: +## +## .global d +## .section .foo,"awT",@progbits +## d: +## .long 2 +## +RUN: llvm-objdump -p %p/../../../Object/Inputs/phdrs.elf-x86-64 \ +RUN: | FileCheck %s + +CHECK: RELRO off 0x0000000000001000 vaddr 0x0000000000201000 paddr 0x0000000000201000 align 2**0 +CHECK-NEXT: filesz 0x0000000000000004 memsz 0x0000000000001000 flags r-- + +## phdr-note.elf-x86-64 was generated using lld (3.9). +## llvm-mc -filetype=obj -triple=x86_64-pc-linux test.s -o test.o +## lld test.o -o phdr-note.elf-x86-64 -shared +## +## test.s: +## .section .note.test,"a",@note +## .quad 42 + +RUN: llvm-objdump -p %p/../../../Object/Inputs/phdr-note.elf-x86-64 \ +RUN: | FileCheck %s --check-prefix=NOTE + +NOTE: NOTE off 0x0000000000000200 vaddr 0x0000000000000200 paddr 0x0000000000000200 align 2**0 +NOTE-NEXT: filesz 0x0000000000000008 memsz 0x0000000000000008 flags r-- Modified: vendor/llvm/dist/tools/llvm-objdump/ELFDump.cpp ============================================================================== --- vendor/llvm/dist/tools/llvm-objdump/ELFDump.cpp Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/tools/llvm-objdump/ELFDump.cpp Sun Feb 5 19:37:31 2017 (r313289) @@ -36,6 +36,9 @@ template void printProgramH case ELF::PT_GNU_EH_FRAME: outs() << "EH_FRAME "; break; + case ELF::PT_GNU_RELRO: + outs() << " RELRO "; + break; case ELF::PT_GNU_STACK: outs() << " STACK "; break; @@ -45,6 +48,18 @@ template void printProgramH case ELF::PT_LOAD: outs() << " LOAD "; break; + case ELF::PT_NOTE: + outs() << " NOTE "; + break; + case ELF::PT_OPENBSD_BOOTDATA: + outs() << " OPENBSD_BOOTDATA "; + break; + case ELF::PT_OPENBSD_RANDOMIZE: + outs() << " OPENBSD_RANDOMIZE "; + break; + case ELF::PT_OPENBSD_WXNEEDED: + outs() << " OPENBSD_WXNEEDED "; + break; case ELF::PT_PHDR: outs() << " PHDR "; break; Modified: vendor/llvm/dist/utils/release/test-release.sh ============================================================================== --- vendor/llvm/dist/utils/release/test-release.sh Sun Feb 5 15:46:05 2017 (r313288) +++ vendor/llvm/dist/utils/release/test-release.sh Sun Feb 5 19:37:31 2017 (r313289) @@ -36,6 +36,7 @@ do_libs="yes" do_libunwind="yes" do_test_suite="yes" do_openmp="yes" +do_lld="yes" do_lldb="no" do_polly="no" BuildDir="`pwd`" @@ -64,6 +65,7 @@ function usage() { echo " -no-libunwind Disable check-out & build libunwind" echo " -no-test-suite Disable check-out & build test-suite" echo " -no-openmp Disable check-out & build libomp" + echo " -no-lld Disable check-out & build lld" echo " -lldb Enable check-out & build lldb" echo " -no-lldb Disable check-out & build lldb (default)" echo " -polly Enable check-out & build Polly" @@ -143,6 +145,9 @@ while [ $# -gt 0 ]; do -no-openmp ) do_openmp="no" ;; + -no-lld ) + do_lld="no" + ;; -lldb ) do_lldb="yes" ;; @@ -225,6 +230,9 @@ esac if [ $do_openmp = "yes" ]; then projects="$projects openmp" fi +if [ $do_lld = "yes" ]; then + projects="$projects lld" +fi if [ $do_lldb = "yes" ]; then projects="$projects lldb" fi @@ -297,7 +305,7 @@ function export_sources() { cfe) projsrc=llvm.src/tools/clang ;; - lldb|polly) + lld|lldb|polly) projsrc=llvm.src/tools/$proj ;; clang-tools-extra) From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5DF1CD21D3; Sun, 5 Feb 2017 19:37:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BCD0168D; Sun, 5 Feb 2017 19:37:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15JbZCK038785; Sun, 5 Feb 2017 19:37:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JbZUg038784; Sun, 5 Feb 2017 19:37:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JbZUg038784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313290 - vendor/llvm/llvm-release_40-r294123 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:37 -0000 Author: dim Date: Sun Feb 5 19:37:35 2017 New Revision: 313290 URL: https://svnweb.freebsd.org/changeset/base/313290 Log: Tag llvm release_40 branch r294123. Added: vendor/llvm/llvm-release_40-r294123/ - copied from r313289, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2CF3CD2215; Sun, 5 Feb 2017 19:37:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 753E216E9; Sun, 5 Feb 2017 19:37:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Jbfjd038842; Sun, 5 Feb 2017 19:37:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15Jbe9m038834; Sun, 5 Feb 2017 19:37:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15Jbe9m038834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313291 - in vendor/clang/dist: lib/Sema lib/StaticAnalyzer/Checkers lib/StaticAnalyzer/Core test/Analysis test/SemaObjCXX 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:42 -0000 Author: dim Date: Sun Feb 5 19:37:40 2017 New Revision: 313291 URL: https://svnweb.freebsd.org/changeset/base/313291 Log: Vendor import of clang release_40 branch r294123: https://llvm.org/svn/llvm-project/cfe/branches/release_40@294123 Added: vendor/clang/dist/test/Analysis/null-deref-static.m Modified: vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/MemRegion.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp vendor/clang/dist/test/Analysis/dispatch-once.m vendor/clang/dist/test/SemaObjCXX/typo-correction.mm Modified: vendor/clang/dist/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Sun Feb 5 19:37:40 2017 (r313291) @@ -7190,14 +7190,6 @@ public: ExprResult TransformBlockExpr(BlockExpr *E) { return Owned(E); } - ExprResult TransformObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { - return Owned(E); - } - - ExprResult TransformObjCIvarRefExpr(ObjCIvarRefExpr *E) { - return Owned(E); - } - ExprResult Transform(Expr *E) { ExprResult Res; while (true) { Modified: vendor/clang/dist/lib/Sema/TreeTransform.h ============================================================================== --- vendor/clang/dist/lib/Sema/TreeTransform.h Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/lib/Sema/TreeTransform.h Sun Feb 5 19:37:40 2017 (r313291) @@ -2932,16 +2932,17 @@ public: ExprResult RebuildObjCIvarRefExpr(Expr *BaseArg, ObjCIvarDecl *Ivar, SourceLocation IvarLoc, bool IsArrow, bool IsFreeIvar) { - // FIXME: We lose track of the IsFreeIvar bit. CXXScopeSpec SS; DeclarationNameInfo NameInfo(Ivar->getDeclName(), IvarLoc); - return getSema().BuildMemberReferenceExpr(BaseArg, BaseArg->getType(), - /*FIXME:*/IvarLoc, IsArrow, - SS, SourceLocation(), - /*FirstQualifierInScope=*/nullptr, - NameInfo, - /*TemplateArgs=*/nullptr, - /*S=*/nullptr); + ExprResult Result = getSema().BuildMemberReferenceExpr( + BaseArg, BaseArg->getType(), + /*FIXME:*/ IvarLoc, IsArrow, SS, SourceLocation(), + /*FirstQualifierInScope=*/nullptr, NameInfo, + /*TemplateArgs=*/nullptr, + /*S=*/nullptr); + if (IsFreeIvar && Result.isUsable()) + cast(Result.get())->setIsFreeIvar(IsFreeIvar); + return Result; } /// \brief Build a new Objective-C property reference expression. Modified: vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp ============================================================================== --- vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp Sun Feb 5 19:37:40 2017 (r313291) @@ -94,11 +94,18 @@ void MacOSXAPIChecker::CheckDispatchOnce bool SuggestStatic = false; os << "Call to '" << FName << "' uses"; if (const VarRegion *VR = dyn_cast(RB)) { + const VarDecl *VD = VR->getDecl(); + // FIXME: These should have correct memory space and thus should be filtered + // out earlier. This branch only fires when we're looking from a block, + // which we analyze as a top-level declaration, onto a static local + // in a function that contains the block. + if (VD->isStaticLocal()) + return; // We filtered out globals earlier, so it must be a local variable // or a block variable which is under UnknownSpaceRegion. if (VR != R) os << " memory within"; - if (VR->getDecl()->hasAttr()) + if (VD->hasAttr()) os << " the block variable '"; else os << " the local variable '"; Modified: vendor/clang/dist/lib/StaticAnalyzer/Core/MemRegion.cpp ============================================================================== --- vendor/clang/dist/lib/StaticAnalyzer/Core/MemRegion.cpp Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/lib/StaticAnalyzer/Core/MemRegion.cpp Sun Feb 5 19:37:40 2017 (r313291) @@ -816,9 +816,11 @@ const VarRegion* MemRegionManager::getVa const StackFrameContext *STC = V.get(); - if (!STC) + if (!STC) { + // FIXME: Assign a more sensible memory space to static locals + // we see from within blocks that we analyze as top-level declarations. sReg = getUnknownRegion(); - else { + } else { if (D->hasLocalStorage()) { sReg = isa(D) || isa(D) ? static_cast(getStackArgumentsRegion(STC)) Modified: vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp ============================================================================== --- vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp Sun Feb 5 19:37:40 2017 (r313291) @@ -1849,6 +1849,8 @@ SVal RegionStoreManager::getBindingForVa // Function-scoped static variables are default-initialized to 0; if they // have an initializer, it would have been processed by now. + // FIXME: This is only true when we're starting analysis from main(). + // We're losing a lot of coverage here. if (isa(MS)) return svalBuilder.makeZeroVal(T); Modified: vendor/clang/dist/test/Analysis/dispatch-once.m ============================================================================== --- vendor/clang/dist/test/Analysis/dispatch-once.m Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/test/Analysis/dispatch-once.m Sun Feb 5 19:37:40 2017 (r313291) @@ -107,3 +107,10 @@ void test_block_var_from_outside_block() }; dispatch_once(&once, ^{}); // expected-warning{{Call to 'dispatch_once' uses the block variable 'once' for the predicate value.}} } + +void test_static_var_from_outside_block() { + static dispatch_once_t once; + ^{ + dispatch_once(&once, ^{}); // no-warning + }; +} Added: vendor/clang/dist/test/Analysis/null-deref-static.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/Analysis/null-deref-static.m Sun Feb 5 19:37:40 2017 (r313291) @@ -0,0 +1,35 @@ +// RUN: %clang_cc1 -w -fblocks -analyze -analyzer-checker=core,deadcode,alpha.core,debug.ExprInspection -verify %s + +void *malloc(unsigned long); +void clang_analyzer_warnIfReached(); + +void test_static_from_block() { + static int *x; + ^{ + *x; // no-warning + }; +} + +void test_static_within_block() { + ^{ + static int *x; + *x; // expected-warning{{Dereference of null pointer}} + }; +} + +void test_static_control_flow(int y) { + static int *x; + if (x) { + // FIXME: Should be reachable. + clang_analyzer_warnIfReached(); // no-warning + } + if (y) { + // We are not sure if this branch is possible, because the developer + // may argue that function is always called with y == 1 for the first time. + // In this case, we can only advise the developer to add assertions + // for suppressing such path. + *x; // expected-warning{{Dereference of null pointer}} + } else { + x = malloc(1); + } +} Modified: vendor/clang/dist/test/SemaObjCXX/typo-correction.mm ============================================================================== --- vendor/clang/dist/test/SemaObjCXX/typo-correction.mm Sun Feb 5 19:37:35 2017 (r313290) +++ vendor/clang/dist/test/SemaObjCXX/typo-correction.mm Sun Feb 5 19:37:40 2017 (r313291) @@ -21,3 +21,18 @@ public: self.m_prop2 = new ClassB(m_prop1); // expected-error {{use of undeclared identifier 'm_prop1'; did you mean '_m_prop1'?}} } @end + +// rdar://30310772 + +@interface InvalidNameInIvarAndPropertyBase +{ +@public + float _a; +} +@property float _b; +@end + +void invalidNameInIvarAndPropertyBase() { + float a = ((InvalidNameInIvarAndPropertyBase*)node)->_a; // expected-error {{use of undeclared identifier 'node'}} + float b = ((InvalidNameInIvarAndPropertyBase*)node)._b; // expected-error {{use of undeclared identifier 'node'}} +} From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 982E6CD222D; Sun, 5 Feb 2017 19:37:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BFCB1741; Sun, 5 Feb 2017 19:37:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Jbihr038888; Sun, 5 Feb 2017 19:37:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JbivT038887; Sun, 5 Feb 2017 19:37:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JbivT038887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313292 - vendor/clang/clang-release_40-r294123 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:45 -0000 Author: dim Date: Sun Feb 5 19:37:44 2017 New Revision: 313292 URL: https://svnweb.freebsd.org/changeset/base/313292 Log: Tag clang release_40 branch r294123. Added: vendor/clang/clang-release_40-r294123/ - copied from r313291, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A213CD2269; Sun, 5 Feb 2017 19:37:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7259F17CA; Sun, 5 Feb 2017 19:37:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Jbmoi038942; Sun, 5 Feb 2017 19:37:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JblIs038935; Sun, 5 Feb 2017 19:37:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JblIs038935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313293 - in vendor/compiler-rt/dist: lib/asan lib/lsan lib/sanitizer_common lib/sanitizer_common/tests test/asan/TestCases 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:49 -0000 Author: dim Date: Sun Feb 5 19:37:47 2017 New Revision: 313293 URL: https://svnweb.freebsd.org/changeset/base/313293 Log: Vendor import of compiler-rt release_40 branch r294123: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@294123 Added: vendor/compiler-rt/dist/test/asan/TestCases/malloc-no-intercept.c (contents, props changed) Modified: vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc Modified: vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc Sun Feb 5 19:37:44 2017 (r313292) +++ vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc Sun Feb 5 19:37:47 2017 (r313293) @@ -50,12 +50,14 @@ INTERCEPTOR(void, free, void *ptr) { asan_free(ptr, &stack, FROM_MALLOC); } +#if SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void, cfree, void *ptr) { GET_STACK_TRACE_FREE; if (UNLIKELY(IsInDlsymAllocPool(ptr))) return; asan_free(ptr, &stack, FROM_MALLOC); } +#endif // SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void*, malloc, uptr size) { if (UNLIKELY(!asan_inited)) @@ -91,22 +93,24 @@ INTERCEPTOR(void*, realloc, void *ptr, u return asan_realloc(ptr, size, &stack); } +#if SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, memalign, uptr boundary, uptr size) { GET_STACK_TRACE_MALLOC; return asan_memalign(boundary, size, &stack, FROM_MALLOC); } -INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) { - GET_STACK_TRACE_MALLOC; - return asan_memalign(boundary, size, &stack, FROM_MALLOC); -} - INTERCEPTOR(void*, __libc_memalign, uptr boundary, uptr size) { GET_STACK_TRACE_MALLOC; void *res = asan_memalign(boundary, size, &stack, FROM_MALLOC); DTLS_on_libc_memalign(res, size); return res; } +#endif // SANITIZER_INTERCEPT_MEMALIGN + +INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) { + GET_STACK_TRACE_MALLOC; + return asan_memalign(boundary, size, &stack, FROM_MALLOC); +} INTERCEPTOR(uptr, malloc_usable_size, void *ptr) { GET_CURRENT_PC_BP_SP; @@ -114,6 +118,7 @@ INTERCEPTOR(uptr, malloc_usable_size, vo return asan_malloc_usable_size(ptr, pc, bp); } +#if SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO // We avoid including malloc.h for portability reasons. // man mallinfo says the fields are "long", but the implementation uses int. // It doesn't matter much -- we just need to make sure that the libc's mallinfo @@ -131,6 +136,7 @@ INTERCEPTOR(struct fake_mallinfo, mallin INTERCEPTOR(int, mallopt, int cmd, int value) { return -1; } +#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) { GET_STACK_TRACE_MALLOC; @@ -143,10 +149,12 @@ INTERCEPTOR(void*, valloc, uptr size) { return asan_valloc(size, &stack); } +#if SANITIZER_INTERCEPT_PVALLOC INTERCEPTOR(void*, pvalloc, uptr size) { GET_STACK_TRACE_MALLOC; return asan_pvalloc(size, &stack); } +#endif // SANITIZER_INTERCEPT_PVALLOC INTERCEPTOR(void, malloc_stats, void) { __asan_print_accumulated_stats(); Modified: vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc Sun Feb 5 19:37:44 2017 (r313292) +++ vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc Sun Feb 5 19:37:47 2017 (r313293) @@ -56,11 +56,6 @@ void _free_base(void *ptr) { } ALLOCATION_FUNCTION_ATTRIBUTE -void cfree(void *ptr) { - CHECK(!"cfree() should not be used on Windows"); -} - -ALLOCATION_FUNCTION_ATTRIBUTE void *malloc(size_t size) { GET_STACK_TRACE_MALLOC; return asan_malloc(size, &stack); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Sun Feb 5 19:37:44 2017 (r313292) +++ vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Sun Feb 5 19:37:47 2017 (r313293) @@ -19,6 +19,7 @@ #include "sanitizer_common/sanitizer_flags.h" #include "sanitizer_common/sanitizer_internal_defs.h" #include "sanitizer_common/sanitizer_linux.h" +#include "sanitizer_common/sanitizer_platform_interceptors.h" #include "sanitizer_common/sanitizer_platform_limits_posix.h" #include "sanitizer_common/sanitizer_tls_get_addr.h" #include "lsan.h" @@ -86,11 +87,26 @@ INTERCEPTOR(void*, realloc, void *q, upt return Reallocate(stack, q, size, 1); } +#if SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, memalign, uptr alignment, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; return Allocate(stack, size, alignment, kAlwaysClearMemory); } +#define LSAN_MAYBE_INTERCEPT_MEMALIGN INTERCEPT_FUNCTION(memalign) + +INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) { + ENSURE_LSAN_INITED; + GET_STACK_TRACE_MALLOC; + void *res = Allocate(stack, size, alignment, kAlwaysClearMemory); + DTLS_on_libc_memalign(res, size); + return res; +} +#define LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN INTERCEPT_FUNCTION(__libc_memalign) +#else +#define LSAN_MAYBE_INTERCEPT_MEMALIGN +#define LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN +#endif // SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, aligned_alloc, uptr alignment, uptr size) { ENSURE_LSAN_INITED; @@ -106,14 +122,6 @@ INTERCEPTOR(int, posix_memalign, void ** return 0; } -INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) { - ENSURE_LSAN_INITED; - GET_STACK_TRACE_MALLOC; - void *res = Allocate(stack, size, alignment, kAlwaysClearMemory); - DTLS_on_libc_memalign(res, size); - return res; -} - INTERCEPTOR(void*, valloc, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; @@ -127,6 +135,7 @@ INTERCEPTOR(uptr, malloc_usable_size, vo return GetMallocUsableSize(ptr); } +#if SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO struct fake_mallinfo { int x[10]; }; @@ -136,11 +145,18 @@ INTERCEPTOR(struct fake_mallinfo, mallin internal_memset(&res, 0, sizeof(res)); return res; } +#define LSAN_MAYBE_INTERCEPT_MALLINFO INTERCEPT_FUNCTION(mallinfo) INTERCEPTOR(int, mallopt, int cmd, int value) { return -1; } +#define LSAN_MAYBE_INTERCEPT_MALLOPT INTERCEPT_FUNCTION(mallopt) +#else +#define LSAN_MAYBE_INTERCEPT_MALLINFO +#define LSAN_MAYBE_INTERCEPT_MALLOPT +#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO +#if SANITIZER_INTERCEPT_PVALLOC INTERCEPTOR(void*, pvalloc, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; @@ -152,8 +168,17 @@ INTERCEPTOR(void*, pvalloc, uptr size) { } return Allocate(stack, size, GetPageSizeCached(), kAlwaysClearMemory); } +#define LSAN_MAYBE_INTERCEPT_PVALLOC INTERCEPT_FUNCTION(pvalloc) +#else +#define LSAN_MAYBE_INTERCEPT_PVALLOC +#endif // SANITIZER_INTERCEPT_PVALLOC +#if SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void, cfree, void *p) ALIAS(WRAPPER_NAME(free)); +#define LSAN_MAYBE_INTERCEPT_CFREE INTERCEPT_FUNCTION(cfree) +#else +#define LSAN_MAYBE_INTERCEPT_CFREE +#endif // SANITIZER_INTERCEPT_CFREE #define OPERATOR_NEW_BODY \ ENSURE_LSAN_INITED; \ @@ -277,17 +302,18 @@ namespace __lsan { void InitializeInterceptors() { INTERCEPT_FUNCTION(malloc); INTERCEPT_FUNCTION(free); - INTERCEPT_FUNCTION(cfree); + LSAN_MAYBE_INTERCEPT_CFREE; INTERCEPT_FUNCTION(calloc); INTERCEPT_FUNCTION(realloc); - INTERCEPT_FUNCTION(memalign); + LSAN_MAYBE_INTERCEPT_MEMALIGN; + LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN; + INTERCEPT_FUNCTION(aligned_alloc); INTERCEPT_FUNCTION(posix_memalign); - INTERCEPT_FUNCTION(__libc_memalign); INTERCEPT_FUNCTION(valloc); - INTERCEPT_FUNCTION(pvalloc); + LSAN_MAYBE_INTERCEPT_PVALLOC; INTERCEPT_FUNCTION(malloc_usable_size); - INTERCEPT_FUNCTION(mallinfo); - INTERCEPT_FUNCTION(mallopt); + LSAN_MAYBE_INTERCEPT_MALLINFO; + LSAN_MAYBE_INTERCEPT_MALLOPT; INTERCEPT_FUNCTION(pthread_create); INTERCEPT_FUNCTION(pthread_join); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h Sun Feb 5 19:37:44 2017 (r313292) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h Sun Feb 5 19:37:47 2017 (r313293) @@ -316,4 +316,9 @@ #define SANITIZER_INTERCEPT_UTMP SI_NOT_WINDOWS && !SI_MAC && !SI_FREEBSD #define SANITIZER_INTERCEPT_UTMPX SI_LINUX_NOT_ANDROID || SI_MAC || SI_FREEBSD +#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO (!SI_FREEBSD && !SI_MAC) +#define SANITIZER_INTERCEPT_MEMALIGN (!SI_FREEBSD && !SI_MAC) +#define SANITIZER_INTERCEPT_PVALLOC (!SI_FREEBSD && !SI_MAC) +#define SANITIZER_INTERCEPT_CFREE (!SI_FREEBSD && !SI_MAC) + #endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc Sun Feb 5 19:37:44 2017 (r313292) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc Sun Feb 5 19:37:47 2017 (r313293) @@ -139,6 +139,7 @@ void *realloc(void *p, size_t size) { return p; } +#if SANITIZER_INTERCEPT_MEMALIGN void *memalign(size_t alignment, size_t size) { if (UNLIKELY(!thread_inited)) thread_init(); @@ -146,6 +147,7 @@ void *memalign(size_t alignment, size_t SANITIZER_MALLOC_HOOK(p, size); return p; } +#endif // SANITIZER_INTERCEPT_MEMALIGN int posix_memalign(void **memptr, size_t alignment, size_t size) { if (UNLIKELY(!thread_inited)) @@ -165,18 +167,26 @@ void *valloc(size_t size) { return p; } +#if SANITIZER_INTERCEPT_CFREE void cfree(void *p) ALIAS("free"); +#endif // SANITIZER_INTERCEPT_CFREE +#if SANITIZER_INTERCEPT_PVALLOC void *pvalloc(size_t size) ALIAS("valloc"); +#endif // SANITIZER_INTERCEPT_PVALLOC +#if SANITIZER_INTERCEPT_MEMALIGN void *__libc_memalign(size_t alignment, size_t size) ALIAS("memalign"); +#endif // SANITIZER_INTERCEPT_MEMALIGN void malloc_usable_size() { } +#if SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO void mallinfo() { } void mallopt() { } +#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO } // extern "C" namespace std { Added: vendor/compiler-rt/dist/test/asan/TestCases/malloc-no-intercept.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/test/asan/TestCases/malloc-no-intercept.c Sun Feb 5 19:37:47 2017 (r313293) @@ -0,0 +1,24 @@ +// Test that on non-glibc platforms, a number of malloc-related functions are +// not intercepted. + +// RUN: not %clang_asan -Dtestfunc=mallinfo %s -o %t +// RUN: not %clang_asan -Dtestfunc=mallopt %s -o %t +// RUN: not %clang_asan -Dtestfunc=memalign %s -o %t +// RUN: not %clang_asan -Dtestfunc=pvalloc %s -o %t +// RUN: not %clang_asan -Dtestfunc=cfree %s -o %t + +#include + +// For glibc, cause link failures by referencing a nonexistent function. +#ifdef __GLIBC__ +#undef testfunc +#define testfunc nonexistent_function +#endif + +void testfunc(void); + +int main(void) +{ + testfunc(); + return 0; +} From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88AB5CD228A; Sun, 5 Feb 2017 19:37:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A3551830; Sun, 5 Feb 2017 19:37:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15JbpND038989; Sun, 5 Feb 2017 19:37:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JbpEe038988; Sun, 5 Feb 2017 19:37:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JbpEe038988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313294 - vendor/compiler-rt/compiler-rt-release_40-r294123 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:52 -0000 Author: dim Date: Sun Feb 5 19:37:51 2017 New Revision: 313294 URL: https://svnweb.freebsd.org/changeset/base/313294 Log: Tag compiler-rt release_40 branch r294123. Added: vendor/compiler-rt/compiler-rt-release_40-r294123/ - copied from r313293, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61575CD22E3; Sun, 5 Feb 2017 19:37:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE1918BC; Sun, 5 Feb 2017 19:37:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15JbtIZ039038; Sun, 5 Feb 2017 19:37:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JbtND039036; Sun, 5 Feb 2017 19:37:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JbtND039036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313295 - in vendor/libc++/dist: include test/libcxx/containers/associative 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:56 -0000 Author: dim Date: Sun Feb 5 19:37:54 2017 New Revision: 313295 URL: https://svnweb.freebsd.org/changeset/base/313295 Log: Vendor import of libc++ release_40 branch r294123: https://llvm.org/svn/llvm-project/libcxx/branches/release_40@294123 Added: vendor/libc++/dist/test/libcxx/containers/associative/undef_min_max.pass.cpp (contents, props changed) Modified: vendor/libc++/dist/include/__tree Modified: vendor/libc++/dist/include/__tree ============================================================================== --- vendor/libc++/dist/include/__tree Sun Feb 5 19:37:51 2017 (r313294) +++ vendor/libc++/dist/include/__tree Sun Feb 5 19:37:54 2017 (r313295) @@ -17,6 +17,8 @@ #include #include +#include <__undef_min_max> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif Added: vendor/libc++/dist/test/libcxx/containers/associative/undef_min_max.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/containers/associative/undef_min_max.pass.cpp Sun Feb 5 19:37:54 2017 (r313295) @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#if defined(__GNUC__) +#pragma GCC diagnostic ignored "-W#warnings" +#endif + +#define min THIS IS A NASTY MACRO! +#define max THIS IS A NASTY MACRO! + +#include + +int main() { + std::map m; + ((void)m); +} From owner-svn-src-all@freebsd.org Sun Feb 5 19:37:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45B53CD231F; Sun, 5 Feb 2017 19:37:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE97B1919; Sun, 5 Feb 2017 19:37:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15JbwWZ039086; Sun, 5 Feb 2017 19:37:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JbwhV039085; Sun, 5 Feb 2017 19:37:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051937.v15JbwhV039085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313296 - vendor/libc++/libc++-release_40-r294123 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:37:59 -0000 Author: dim Date: Sun Feb 5 19:37:57 2017 New Revision: 313296 URL: https://svnweb.freebsd.org/changeset/base/313296 Log: Tag libc++ release_40 branch r294123. Added: vendor/libc++/libc++-release_40-r294123/ - copied from r313295, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sun Feb 5 19:38:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A3B9CD236C; Sun, 5 Feb 2017 19:38:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 130A019CC; Sun, 5 Feb 2017 19:38:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Jc3xl039163; Sun, 5 Feb 2017 19:38:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15Jc0jU039136; Sun, 5 Feb 2017 19:38:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051938.v15Jc0jU039136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313297 - in vendor/lld/dist: ELF test/ELF 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:38:04 -0000 Author: dim Date: Sun Feb 5 19:38:00 2017 New Revision: 313297 URL: https://svnweb.freebsd.org/changeset/base/313297 Log: Vendor import of lld release_40 branch r294123: https://llvm.org/svn/llvm-project/lld/branches/release_40@294123 Added: vendor/lld/dist/test/ELF/relocatable-common.s (contents, props changed) Modified: vendor/lld/dist/ELF/Config.h vendor/lld/dist/ELF/Driver.cpp vendor/lld/dist/ELF/Options.td vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/ELF/basic-mips.s vendor/lld/dist/test/ELF/eh-frame-hdr-abs-fde.s vendor/lld/dist/test/ELF/mips-64-disp.s vendor/lld/dist/test/ELF/mips-64-got.s vendor/lld/dist/test/ELF/mips-64-rels.s vendor/lld/dist/test/ELF/mips-got-and-copy.s vendor/lld/dist/test/ELF/mips-got-extsym.s vendor/lld/dist/test/ELF/mips-got-hilo.s vendor/lld/dist/test/ELF/mips-got-redundant.s vendor/lld/dist/test/ELF/mips-got-relocs.s vendor/lld/dist/test/ELF/mips-got-weak.s vendor/lld/dist/test/ELF/mips-got16.s vendor/lld/dist/test/ELF/mips-gp-ext.s vendor/lld/dist/test/ELF/mips-gp-lowest.s vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.s vendor/lld/dist/test/ELF/mips-gprel32-relocs.s vendor/lld/dist/test/ELF/mips-hilo-gp-disp.s vendor/lld/dist/test/ELF/mips-n32-rels.s vendor/lld/dist/test/ELF/mips-options.s vendor/lld/dist/test/ELF/mips-tls-64.s vendor/lld/dist/test/ELF/mips-tls-hilo.s vendor/lld/dist/test/ELF/mips-tls-static.s vendor/lld/dist/test/ELF/mips-tls.s vendor/lld/dist/test/ELF/mips-xgot-order.s Modified: vendor/lld/dist/ELF/Config.h ============================================================================== --- vendor/lld/dist/ELF/Config.h Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/ELF/Config.h Sun Feb 5 19:38:00 2017 (r313297) @@ -98,6 +98,7 @@ struct Configuration { bool Bsymbolic; bool BsymbolicFunctions; bool ColorDiagnostics = false; + bool DefineCommon; bool Demangle = true; bool DisableVerify; bool EhFrameHdr; Modified: vendor/lld/dist/ELF/Driver.cpp ============================================================================== --- vendor/lld/dist/ELF/Driver.cpp Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/ELF/Driver.cpp Sun Feb 5 19:38:00 2017 (r313297) @@ -496,6 +496,8 @@ void LinkerDriver::readConfigs(opt::Inpu Config->Pie = getArg(Args, OPT_pie, OPT_nopie, false); Config->PrintGcSections = Args.hasArg(OPT_print_gc_sections); Config->Relocatable = Args.hasArg(OPT_relocatable); + Config->DefineCommon = getArg(Args, OPT_define_common, OPT_no_define_common, + !Config->Relocatable); Config->Discard = getDiscardOption(Args); Config->SaveTemps = Args.hasArg(OPT_save_temps); Config->SingleRoRx = Args.hasArg(OPT_no_rosegment); Modified: vendor/lld/dist/ELF/Options.td ============================================================================== --- vendor/lld/dist/ELF/Options.td Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/ELF/Options.td Sun Feb 5 19:38:00 2017 (r313297) @@ -45,6 +45,9 @@ def color_diagnostics: F<"color-diagnost def color_diagnostics_eq: J<"color-diagnostics=">, HelpText<"Use colors in diagnostics">; +def define_common: F<"define-common">, + HelpText<"Assign space to common symbols">; + def disable_new_dtags: F<"disable-new-dtags">, HelpText<"Disable new dynamic tags">; @@ -130,6 +133,9 @@ def no_as_needed: F<"no-as-needed">, def no_color_diagnostics: F<"no-color-diagnostics">, HelpText<"Do not use colors in diagnostics">; +def no_define_common: F<"no-define-common">, + HelpText<"Do not assign space to common symbols">; + def no_demangle: F<"no-demangle">, HelpText<"Do not demangle symbol names">; @@ -255,6 +261,9 @@ def alias_Bstatic_dn: F<"dn">, Alias, Alias; def alias_Bstatic_static: F<"static">, Alias; def alias_L__library_path: J<"library-path=">, Alias; +def alias_define_common_d: Flag<["-"], "d">, Alias; +def alias_define_common_dc: F<"dc">, Alias; +def alias_define_common_dp: F<"dp">, Alias; def alias_discard_all_x: Flag<["-"], "x">, Alias; def alias_discard_locals_X: Flag<["-"], "X">, Alias; def alias_dynamic_list: J<"dynamic-list=">, Alias; @@ -320,7 +329,6 @@ def plugin_opt_eq: J<"plugin-opt=">; // Options listed below are silently ignored for now for compatibility. def allow_shlib_undefined: F<"allow-shlib-undefined">; def cref: Flag<["--"], "cref">; -def define_common: F<"define-common">; def demangle: F<"demangle">; def detect_odr_violations: F<"detect-odr-violations">; def g: Flag<["-"], "g">; @@ -347,9 +355,6 @@ def G: JoinedOrSeparate<["-"], "G">; def Qy : F<"Qy">; // Aliases for ignored options -def alias_define_common_d: Flag<["-"], "d">, Alias; -def alias_define_common_dc: F<"dc">, Alias; -def alias_define_common_dp: F<"dp">, Alias; def alias_Map_eq: J<"Map=">, Alias; def alias_version_script_version_script: J<"version-script=">, Alias; Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/ELF/Symbols.cpp Sun Feb 5 19:38:00 2017 (r313297) @@ -73,6 +73,8 @@ static typename ELFT::uint getSymVA(cons return VA; } case SymbolBody::DefinedCommonKind: + if (!Config->DefineCommon) + return 0; return In::Common->OutSec->Addr + In::Common->OutSecOff + cast(Body).Offset; case SymbolBody::SharedKind: { Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Sun Feb 5 19:38:00 2017 (r313297) @@ -59,6 +59,9 @@ template InputSection ArrayRef(), "COMMON"); Ret->Live = true; + if (!Config->DefineCommon) + return Ret; + // Sort the common symbols by alignment as an heuristic to pack them better. std::vector Syms = getCommonSymbols(); std::stable_sort(Syms.begin(), Syms.end(), @@ -434,7 +437,7 @@ template void GotSection MipsGotSection::MipsGotSection() : SyntheticSection(SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL, - SHT_PROGBITS, Target->GotEntrySize, ".got") {} + SHT_PROGBITS, 16, ".got") {} template void MipsGotSection::addEntry(SymbolBody &Sym, uintX_t Addend, @@ -1168,10 +1171,14 @@ void SymbolTableSection::writeGlob ESym->setVisibility(Body->symbol()->Visibility); ESym->st_value = Body->getVA(); - if (const OutputSectionBase *OutSec = getOutputSection(Body)) + if (const OutputSectionBase *OutSec = getOutputSection(Body)) { ESym->st_shndx = OutSec->SectionIndex; - else if (isa>(Body)) + } else if (isa>(Body)) { ESym->st_shndx = SHN_ABS; + } else if (isa(Body)) { + ESym->st_shndx = SHN_COMMON; + ESym->st_value = cast(Body)->Alignment; + } if (Config->EMachine == EM_MIPS) { // On MIPS we need to mark symbol which has a PLT entry and requires @@ -1203,6 +1210,8 @@ SymbolTableSection::getOutputSecti break; } case SymbolBody::DefinedCommonKind: + if (!Config->DefineCommon) + return nullptr; return In::Common->OutSec; case SymbolBody::SharedKind: { auto &SS = cast>(*Sym); Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/ELF/Writer.cpp Sun Feb 5 19:38:00 2017 (r313297) @@ -476,6 +476,16 @@ static int getPPC64SectionRank(StringRef .Default(1); } +// All sections with SHF_MIPS_GPREL flag should be grouped together +// because data in these sections is addressable with a gp relative address. +static int getMipsSectionRank(const OutputSectionBase *S) { + if ((S->Flags & SHF_MIPS_GPREL) == 0) + return 0; + if (S->getName() == ".got") + return 1; + return 2; +} + template bool elf::isRelroSection(const OutputSectionBase *Sec) { if (!Config->ZRelro) return false; @@ -494,8 +504,6 @@ template bool elf::isRelroS return true; if (In::Got && Sec == In::Got->OutSec) return true; - if (In::MipsGot && Sec == In::MipsGot->OutSec) - return true; if (Sec == Out::BssRelRo) return true; StringRef S = Sec->getName(); @@ -595,6 +603,8 @@ static bool compareSectionsNonScript(con if (Config->EMachine == EM_PPC64) return getPPC64SectionRank(A->getName()) < getPPC64SectionRank(B->getName()); + if (Config->EMachine == EM_MIPS) + return getMipsSectionRank(A) < getMipsSectionRank(B); return false; } Modified: vendor/lld/dist/test/ELF/basic-mips.s ============================================================================== --- vendor/lld/dist/test/ELF/basic-mips.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/basic-mips.s Sun Feb 5 19:38:00 2017 (r313297) @@ -35,7 +35,7 @@ __start: # CHECK-NEXT: ] # CHECK-NEXT: HeaderSize: 52 # CHECK-NEXT: ProgramHeaderEntrySize: 32 -# CHECK-NEXT: ProgramHeaderCount: 6 +# CHECK-NEXT: ProgramHeaderCount: 5 # CHECK-NEXT: SectionHeaderEntrySize: 40 # CHECK-NEXT: SectionHeaderCount: 11 # CHECK-NEXT: StringTableSectionIndex: 9 @@ -62,8 +62,8 @@ __start: # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x100F8 -# CHECK-NEXT: Offset: 0xF8 +# CHECK-NEXT: Address: 0x100D8 +# CHECK-NEXT: Offset: 0xD8 # CHECK-NEXT: Size: 24 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -77,8 +77,8 @@ __start: # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x10110 -# CHECK-NEXT: Offset: 0x110 +# CHECK-NEXT: Address: 0x100F0 +# CHECK-NEXT: Offset: 0xF0 # CHECK-NEXT: Size: 24 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -131,7 +131,7 @@ __start: # CHECK-NEXT: Size: 8 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 -# CHECK-NEXT: AddressAlignment: 4 +# CHECK-NEXT: AddressAlignment: 16 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: } # CHECK-NEXT: Section { @@ -142,7 +142,7 @@ __start: # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: SHF_WRITE (0x1) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x40000 +# CHECK-NEXT: Address: 0x30010 # CHECK-NEXT: Offset: 0x20008 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Link: 0 @@ -246,8 +246,8 @@ __start: # CHECK-NEXT: Offset: 0x34 # CHECK-NEXT: VirtualAddress: 0x10034 # CHECK-NEXT: PhysicalAddress: 0x10034 -# CHECK-NEXT: FileSize: 192 -# CHECK-NEXT: MemSize: 192 +# CHECK-NEXT: FileSize: 160 +# CHECK-NEXT: MemSize: 160 # CHECK-NEXT: Flags [ (0x4) # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: ] @@ -258,8 +258,8 @@ __start: # CHECK-NEXT: Offset: 0x0 # CHECK-NEXT: VirtualAddress: 0x10000 # CHECK-NEXT: PhysicalAddress: 0x10000 -# CHECK-NEXT: FileSize: 296 -# CHECK-NEXT: MemSize: 296 +# CHECK-NEXT: FileSize: 264 +# CHECK-NEXT: MemSize: 264 # CHECK-NEXT: Flags [ (0x4) # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: ] @@ -284,7 +284,7 @@ __start: # CHECK-NEXT: VirtualAddress: 0x30000 # CHECK-NEXT: PhysicalAddress: 0x30000 # CHECK-NEXT: FileSize: 8 -# CHECK-NEXT: MemSize: 65536 +# CHECK-NEXT: MemSize: 16 # CHECK-NEXT: Flags [ # CHECK-NEXT: PF_R # CHECK-NEXT: PF_W @@ -292,18 +292,6 @@ __start: # CHECK-NEXT: Alignment: 65536 # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { -# CHECK-NEXT: Type: PT_GNU_RELRO (0x6474E552) -# CHECK-NEXT: Offset: 0x20000 -# CHECK-NEXT: VirtualAddress: 0x30000 -# CHECK-NEXT: PhysicalAddress: 0x30000 -# CHECK-NEXT: FileSize: 8 -# CHECK-NEXT: MemSize: 65536 -# CHECK-NEXT: Flags [ (0x4) -# CHECK-NEXT: PF_R (0x4) -# CHECK-NEXT: ] -# CHECK-NEXT: Alignment: 1 -# CHECK-NEXT: } -# CHECK-NEXT: ProgramHeader { # CHECK-NEXT: Type: PT_GNU_STACK # CHECK-NEXT: Offset: 0x0 # CHECK-NEXT: VirtualAddress: 0x0 Modified: vendor/lld/dist/test/ELF/eh-frame-hdr-abs-fde.s ============================================================================== --- vendor/lld/dist/test/ELF/eh-frame-hdr-abs-fde.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/eh-frame-hdr-abs-fde.s Sun Feb 5 19:38:00 2017 (r313297) @@ -9,10 +9,10 @@ # REQUIRES: mips # CHECK: Contents of section .eh_frame_hdr: -# CHECK-NEXT: 10148 011b033b 00000010 00000001 0000feb8 -# ^-- 0x20000 - 0x10148 +# CHECK-NEXT: 10128 011b033b 00000010 00000001 0000fed8 +# ^-- 0x20000 - 0x10138 # .text - .eh_frame_hdr -# CHECK-NEXT: 10158 0000002c +# CHECK-NEXT: 10138 0000002c # CHECK: Contents of section .text: # CHECK-NEXT: 20000 00000000 Modified: vendor/lld/dist/test/ELF/mips-64-disp.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-64-disp.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-64-disp.s Sun Feb 5 19:38:00 2017 (r313297) @@ -18,23 +18,22 @@ # CHECK-NEXT: 20010: 24 42 80 38 addiu $2, $2, -32712 # CHECK: 0000000000020014 .text 00000000 foo -# CHECK: 0000000000047ff0 *ABS* 00000000 .hidden _gp # CHECK: 0000000000020000 .text 00000000 __start # CHECK: 0000000000000000 g F *UND* 00000000 foo1a # GOT: Relocations [ # GOT-NEXT: ] # GOT-NEXT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x47FF0 +# GOT-NEXT: Canonical gp value: # GOT-NEXT: Reserved entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40000 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32752 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Purpose: Lazy resolver # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x8000000000000000 # GOT-NEXT: Purpose: Module pointer (GNU extension) @@ -42,29 +41,29 @@ # GOT-NEXT: ] # GOT-NEXT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x20014 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40018 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32728 # GOT-NEXT: Initial: 0x20004 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40020 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32720 # GOT-NEXT: Initial: 0x20008 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40028 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32712 # GOT-NEXT: Initial: 0x2000C # GOT-NEXT: } # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40030 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32704 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 Modified: vendor/lld/dist/test/ELF/mips-64-got.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-64-got.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-64-got.s Sun Feb 5 19:38:00 2017 (r313297) @@ -19,23 +19,22 @@ # CHECK-NEXT: 20010: 24 42 80 38 addiu $2, $2, -32712 # CHECK: 0000000000020018 .text 00000000 foo -# CHECK: 0000000000047ff0 *ABS* 00000000 .hidden _gp # CHECK: 0000000000020000 .text 00000000 __start # CHECK: 0000000000020014 .text 00000000 bar # GOT: Relocations [ # GOT-NEXT: ] # GOT-NEXT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x47FF0 +# GOT-NEXT: Canonical gp value: # GOT-NEXT: Reserved entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40000 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32752 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Purpose: Lazy resolver # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x8000000000000000 # GOT-NEXT: Purpose: Module pointer (GNU extension) @@ -43,29 +42,29 @@ # GOT-NEXT: ] # GOT-NEXT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x20000 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40018 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32728 # GOT-NEXT: Initial: 0x30000 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40020 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32720 # GOT-NEXT: Initial: 0x20014 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40028 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32712 # GOT-NEXT: Initial: 0x20018 # GOT-NEXT: } # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40030 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32704 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 Modified: vendor/lld/dist/test/ELF/mips-64-rels.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-64-rels.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-64-rels.s Sun Feb 5 19:38:00 2017 (r313297) @@ -20,7 +20,7 @@ # ^-- %lo(0x17ff0) # CHECK: Contents of section .rodata: -# CHECK-NEXT: 10190 ffffffff fffe8014 +# CHECK-NEXT: 10158 ffffffff fffe8014 # ^-- 0x20004 - 0x37ff0 = 0xfffffffffffe8014 # CHECK: 0000000000020004 .text 00000000 loc Modified: vendor/lld/dist/test/ELF/mips-got-and-copy.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got-and-copy.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got-and-copy.s Sun Feb 5 19:38:00 2017 (r313297) @@ -14,29 +14,29 @@ # CHECK: Relocations [ # CHECK-NEXT: Section (7) .rel.dyn { -# CHECK-NEXT: 0x{{[0-9A-F]+}} R_MIPS_COPY data0 -# CHECK-NEXT: 0x{{[0-9A-F]+}} R_MIPS_COPY data1 +# CHECK-NEXT: 0x[[DATA0:[0-9A-F]+]] R_MIPS_COPY data0 +# CHECK-NEXT: 0x[[DATA1:[0-9A-F]+]] R_MIPS_COPY data1 # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Primary GOT { -# CHECK-NEXT: Canonical gp value: 0x47FF0 +# CHECK-NEXT: Canonical gp value: # CHECK-NEXT: Reserved entries [ # CHECK: ] # CHECK-NEXT: Local entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40008 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32744 -# CHECK-NEXT: Initial: 0x50000 +# CHECK-NEXT: Initial: 0x[[DATA0]] # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Global entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x4000C +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32740 -# CHECK-NEXT: Initial: 0x50004 -# CHECK-NEXT: Value: 0x50004 -# CHECK-NEXT: Type: Object (0x1) -# CHECK-NEXT: Section: .bss (0xD) +# CHECK-NEXT: Initial: 0x[[DATA1]] +# CHECK-NEXT: Value: 0x[[DATA1]] +# CHECK-NEXT: Type: Object +# CHECK-NEXT: Section: .bss # CHECK-NEXT: Name: data1@ # CHECK-NEXT: } # CHECK-NEXT: ] Modified: vendor/lld/dist/test/ELF/mips-got-extsym.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got-extsym.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got-extsym.s Sun Feb 5 19:38:00 2017 (r313297) @@ -30,7 +30,7 @@ # CHECK: Local entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40008 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32744 # CHECK-NEXT: Initial: 0x20008 # ^-- bar @@ -38,7 +38,7 @@ # CHECK-NEXT: ] # CHECK-NEXT: Global entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x4000C +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32740 # CHECK-NEXT: Initial: 0x0 # CHECK-NEXT: Value: 0x0 Modified: vendor/lld/dist/test/ELF/mips-got-hilo.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got-hilo.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got-hilo.s Sun Feb 5 19:38:00 2017 (r313297) @@ -20,22 +20,22 @@ # GOT-NEXT: ] # GOT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x37FF0 +# GOT-NEXT: Canonical gp value: # GOT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x30008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x20000 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x3000C +# GOT-NEXT: Address: # GOT-NEXT: Access: -32740 # GOT-NEXT: Initial: 0x20004 # GOT-NEXT: } # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x30010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 Modified: vendor/lld/dist/test/ELF/mips-got-redundant.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got-redundant.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got-redundant.s Sun Feb 5 19:38:00 2017 (r313297) @@ -8,25 +8,25 @@ # CHECK: Local entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40008 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32744 # CHECK-NEXT: Initial: 0x20000 # ^-- loc1 # CHECK-NEXT: } # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x4000C +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32740 # CHECK-NEXT: Initial: 0x30000 # ^-- loc2, loc3, loc4 # CHECK-NEXT: } # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40010 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32736 # CHECK-NEXT: Initial: 0x40000 # ^-- redundant # CHECK-NEXT: } # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40014 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32732 # CHECK-NEXT: Initial: 0x30008 # ^-- glb1 Modified: vendor/lld/dist/test/ELF/mips-got-relocs.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got-relocs.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got-relocs.s Sun Feb 5 19:38:00 2017 (r313297) @@ -45,21 +45,21 @@ v1: .word 0 # EXE_SYM: Sections: -# EXE_SYM: .got 0000000c 0000000000040000 DATA +# EXE_SYM: .got 0000000c 0000000000030010 DATA # EXE_SYM: SYMBOL TABLE: -# EXE_SYM: 00047ff0 *ABS* 00000000 .hidden _gp +# EXE_SYM: 00038000 *ABS* 00000000 .hidden _gp # ^-- .got + GP offset (0x7ff0) # EXE_SYM: 00030000 g .data 00000004 v1 # EXE_GOT_BE: Contents of section .got: -# EXE_GOT_BE: 40000 00000000 80000000 00030000 +# EXE_GOT_BE: 30010 00000000 80000000 00030000 # ^ ^ ^-- v1 (0x30000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) # EXE_GOT_EL: Contents of section .got: -# EXE_GOT_EL: 40000 00000000 00000080 00000300 +# EXE_GOT_EL: 30010 00000000 00000080 00000300 # ^ ^ ^-- v1 (0x30000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) @@ -69,20 +69,20 @@ v1: # EXE_DIS_EL: 20000: 18 80 02 3c lui $2, 32792 # DSO_SYM: Sections: -# DSO_SYM: .got 0000000c 0000000000030000 DATA +# DSO_SYM: .got 0000000c 0000000000020010 DATA # DSO_SYM: SYMBOL TABLE: -# DSO_SYM: 00037ff0 *ABS* 00000000 .hidden _gp +# DSO_SYM: 00028000 *ABS* 00000000 .hidden _gp # ^-- .got + GP offset (0x7ff0) # DSO_SYM: 00020000 g .data 00000004 v1 # DSO_GOT_BE: Contents of section .got: -# DSO_GOT_BE: 30000 00000000 80000000 00020000 +# DSO_GOT_BE: 20010 00000000 80000000 00020000 # ^ ^ ^-- v1 (0x20000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) # DSO_GOT_EL: Contents of section .got: -# DSO_GOT_EL: 30000 00000000 00000080 00000200 +# DSO_GOT_EL: 20010 00000000 00000080 00000200 # ^ ^ ^-- v1 (0x20000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) Modified: vendor/lld/dist/test/ELF/mips-got-weak.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got-weak.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got-weak.s Sun Feb 5 19:38:00 2017 (r313297) @@ -47,16 +47,16 @@ # NOSYM-NEXT: 0x70000013 MIPS_GOTSYM 0x1 # NOSYM: Primary GOT { -# NOSYM-NEXT: Canonical gp value: 0x37FF0 +# NOSYM-NEXT: Canonical gp value: # NOSYM-NEXT: Reserved entries [ # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30000 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32752 # NOSYM-NEXT: Initial: 0x0 # NOSYM-NEXT: Purpose: Lazy resolver # NOSYM-NEXT: } # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30004 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32748 # NOSYM-NEXT: Initial: 0x80000000 # NOSYM-NEXT: Purpose: Module pointer (GNU extension) @@ -66,7 +66,7 @@ # NOSYM-NEXT: ] # NOSYM-NEXT: Global entries [ # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30008 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32744 # NOSYM-NEXT: Initial: 0x20000 # NOSYM-NEXT: Value: 0x20000 @@ -75,7 +75,7 @@ # NOSYM-NEXT: Name: foo # NOSYM-NEXT: } # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x3000C +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32740 # NOSYM-NEXT: Initial: 0x0 # NOSYM-NEXT: Value: 0x0 @@ -84,7 +84,7 @@ # NOSYM-NEXT: Name: bar # NOSYM-NEXT: } # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30010 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32736 # NOSYM-NEXT: Initial: 0x20004 # NOSYM-NEXT: Value: 0x20004 @@ -115,16 +115,16 @@ # SYM-NEXT: 0x70000013 MIPS_GOTSYM 0x3 # SYM: Primary GOT { -# SYM-NEXT: Canonical gp value: 0x37FF0 +# SYM-NEXT: Canonical gp value: # SYM-NEXT: Reserved entries [ # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30000 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32752 # SYM-NEXT: Initial: 0x0 # SYM-NEXT: Purpose: Lazy resolver # SYM-NEXT: } # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30004 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32748 # SYM-NEXT: Initial: 0x80000000 # SYM-NEXT: Purpose: Module pointer (GNU extension) @@ -132,19 +132,19 @@ # SYM-NEXT: ] # SYM-NEXT: Local entries [ # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30008 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32744 # SYM-NEXT: Initial: 0x20000 # SYM-NEXT: } # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x3000C +# SYM-NEXT: Address: # SYM-NEXT: Access: -32740 # SYM-NEXT: Initial: 0x20004 # SYM-NEXT: } # SYM-NEXT: ] # SYM-NEXT: Global entries [ # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30010 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32736 # SYM-NEXT: Initial: 0x0 # SYM-NEXT: Value: 0x0 Modified: vendor/lld/dist/test/ELF/mips-got16.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-got16.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-got16.s Sun Feb 5 19:38:00 2017 (r313297) @@ -29,16 +29,16 @@ # GOT-NEXT: ] # GOT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x57FF0 +# GOT-NEXT: Canonical gp value: # GOT-NEXT: Reserved entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50000 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32752 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Purpose: Lazy resolver # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50004 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32748 # GOT-NEXT: Initial: 0x80000000 # GOT-NEXT: Purpose: Module pointer (GNU extension) @@ -46,44 +46,44 @@ # GOT-NEXT: ] # GOT-NEXT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x10000 # ^-- (0x1002c + 0x8000) & ~0xffff # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x5000C +# GOT-NEXT: Address: # GOT-NEXT: Access: -32740 # GOT-NEXT: Initial: 0x20000 # ^-- redundant unused entry # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x20000 # ^-- redundant unused entry # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50014 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32732 # GOT-NEXT: Initial: 0x30000 # ^-- (0x29000 + 0x8000) & ~0xffff # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50018 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32728 # GOT-NEXT: Initial: 0x40000 # ^-- (0x29000 + 0x10004 + 0x8000) & ~0xffff # ^-- (0x29000 + 0x18004 + 0x8000) & ~0xffff # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x5001C +# GOT-NEXT: Address: # GOT-NEXT: Access: -32724 # GOT-NEXT: Initial: 0x50000 # ^-- redundant unused entry # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50020 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32720 # GOT-NEXT: Initial: 0x41008 # ^-- 'bar' address @@ -91,7 +91,7 @@ # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50024 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32716 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 Modified: vendor/lld/dist/test/ELF/mips-gp-ext.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-gp-ext.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-gp-ext.s Sun Feb 5 19:38:00 2017 (r313297) @@ -20,10 +20,10 @@ # REQUIRES: mips # REL: Contents of section .text: -# REL-NEXT: 0000 3c080000 2108010c 8f82fff0 +# REL-NEXT: 0000 3c080000 2108010c 8f82fffc # ^-- %hi(_gp_disp) # ^-- %lo(_gp_disp) -# ^-- 8 - (0x10c - 0xf4) +# ^-- 8 - (0x10c - 0x100) # G - (GP - .got) # REL: Contents of section .reginfo: @@ -40,10 +40,10 @@ # REL: 0000010c *ABS* 00000000 .hidden _gp # ABS: Contents of section .text: -# ABS-NEXT: 0000 3c080000 21080200 8f82fefc +# ABS-NEXT: 0000 3c080000 21080200 8f82ff08 # ^-- %hi(_gp_disp) # ^-- %lo(_gp_disp) -# ^-- 8 - (0x200 - 0xf4) +# ^-- 8 - (0x200 - 0x100) # G - (GP - .got) # ABS: Contents of section .reginfo: Modified: vendor/lld/dist/test/ELF/mips-gp-lowest.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-gp-lowest.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-gp-lowest.s Sun Feb 5 19:38:00 2017 (r313297) @@ -26,7 +26,7 @@ foo: # CHECK-NEXT: SHF_MIPS_GPREL # CHECK-NEXT: SHF_WRITE # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0xDD +# CHECK-NEXT: Address: 0xE0 # CHECK: } # CHECK: Section { # CHECK: Name: .got @@ -40,5 +40,5 @@ foo: # CHECK: } # CHECK: Name: _gp (5) -# CHECK-NEXT: Value: 0x80CD -# ^-- 0xDD + 0x7ff0 +# CHECK-NEXT: Value: 0x80D0 +# ^-- 0xE0 + 0x7ff0 Modified: vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.s Sun Feb 5 19:38:00 2017 (r313297) @@ -22,7 +22,7 @@ # DSO: GP: 0x27FF0 # DUMP: Contents of section .rodata: -# DUMP: 0114 ffff0004 ffff0008 +# DUMP: 00f4 ffff0004 ffff0008 # ^ 0x10004 + 0x7ff0 - 0x27ff0 # ^ 0x10008 + 0x7ff0 - 0x27ff0 Modified: vendor/lld/dist/test/ELF/mips-gprel32-relocs.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-gprel32-relocs.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-gprel32-relocs.s Sun Feb 5 19:38:00 2017 (r313297) @@ -21,7 +21,7 @@ v1: .gpword bar # CHECK: Contents of section .rodata: -# CHECK: 0114 fffe8014 fffe8018 +# CHECK: 00f4 fffe8014 fffe8018 # ^ 0x10004 - 0x27ff0 # ^ 0x10008 - 0x27ff0 Modified: vendor/lld/dist/test/ELF/mips-hilo-gp-disp.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-hilo-gp-disp.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-hilo-gp-disp.s Sun Feb 5 19:38:00 2017 (r313297) @@ -24,32 +24,32 @@ bar: # EXE-NEXT: __start: # EXE-NEXT: 20000: 3c 08 00 02 lui $8, 2 # ^-- %hi(0x47ff0-0x20000) -# EXE-NEXT: 20004: 21 08 7f f0 addi $8, $8, 32752 -# ^-- %lo(0x47ff0-0x20004+4) +# EXE-NEXT: 20004: 21 08 80 00 addi $8, $8, -32768 +# ^-- %lo(0x38000-0x20004+4) # EXE: bar: -# EXE-NEXT: 2000c: 3c 08 00 02 lui $8, 2 -# ^-- %hi(0x47ff0-0x2000c) -# EXE-NEXT: 20010: 21 08 7f e4 addi $8, $8, 32740 -# ^-- %lo(0x47ff0-0x20010+4) +# EXE-NEXT: 2000c: 3c 08 00 01 lui $8, 1 +# ^-- %hi(0x38000-0x2000c) +# EXE-NEXT: 20010: 21 08 7f f4 addi $8, $8, 32756 +# ^-- %lo(0x38000-0x20010+4) # EXE: SYMBOL TABLE: # EXE: 0002000c .text 00000000 bar -# EXE: 00047ff0 *ABS* 00000000 .hidden _gp +# EXE: 00038000 *ABS* 00000000 .hidden _gp # EXE: 00020000 .text 00000000 __start # SO: Disassembly of section .text: # SO-NEXT: __start: # SO-NEXT: 10000: 3c 08 00 02 lui $8, 2 -# ^-- %hi(0x37ff0-0x10000) -# SO-NEXT: 10004: 21 08 7f f0 addi $8, $8, 32752 -# ^-- %lo(0x37ff0-0x10004+4) +# ^-- %hi(0x28000-0x10000) +# SO-NEXT: 10004: 21 08 80 00 addi $8, $8, -32768 +# ^-- %lo(0x28000-0x10004+4) # SO: bar: -# SO-NEXT: 1000c: 3c 08 00 02 lui $8, 2 -# ^-- %hi(0x37ff0-0x1000c) -# SO-NEXT: 10010: 21 08 7f e4 addi $8, $8, 32740 -# ^-- %lo(0x37ff0-0x10010+4) +# SO-NEXT: 1000c: 3c 08 00 01 lui $8, 1 +# ^-- %hi(0x28000-0x1000c) +# SO-NEXT: 10010: 21 08 7f f4 addi $8, $8, 32756 +# ^-- %lo(0x28000-0x10010+4) # SO: SYMBOL TABLE: # SO: 0001000c .text 00000000 bar -# SO: 00037ff0 *ABS* 00000000 .hidden _gp +# SO: 00028000 *ABS* 00000000 .hidden _gp # SO: 00010000 .text 00000000 __start Modified: vendor/lld/dist/test/ELF/mips-n32-rels.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-n32-rels.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-n32-rels.s Sun Feb 5 19:38:00 2017 (r313297) @@ -38,7 +38,7 @@ # ^-- %lo(0x17ff0) # CHECK: Contents of section .rodata: -# CHECK-NEXT: 100f4 00020004 +# CHECK-NEXT: 100d4 00020004 # ^-- loc # CHECK: 00020004 .text 00000000 loc Modified: vendor/lld/dist/test/ELF/mips-options.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-options.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-options.s Sun Feb 5 19:38:00 2017 (r313297) @@ -17,11 +17,11 @@ __start: lui $gp, %hi(%neg(%gp_rel(g1))) # CHECK: Name: _gp -# CHECK-NEXT: Value: 0x100008258 +# CHECK-NEXT: Value: 0x[[GP:[0-9A-F]+]] # CHECK: MIPS Options { # CHECK-NEXT: ODK_REGINFO { -# CHECK-NEXT: GP: 0x100008258 +# CHECK-NEXT: GP: 0x[[GP]] # CHECK-NEXT: General Mask: 0x10000001 # CHECK-NEXT: Co-Proc Mask0: 0x0 # CHECK-NEXT: Co-Proc Mask1: 0x0 Modified: vendor/lld/dist/test/ELF/mips-tls-64.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-tls-64.s Sun Feb 5 19:37:57 2017 (r313296) +++ vendor/lld/dist/test/ELF/mips-tls-64.s Sun Feb 5 19:38:00 2017 (r313297) @@ -23,11 +23,11 @@ # DIS-NEXT: 20010: 24 62 80 58 addiu $2, $3, -32680 # DIS: Contents of section .got: -# DIS-NEXT: 40008 00000000 00000000 80000000 00000000 -# DIS-NEXT: 40018 00000000 00000000 00000000 00000000 -# DIS-NEXT: 40028 00000000 00000000 00000000 00000001 -# DIS-NEXT: 40038 00000000 00000000 00000000 00000001 -# DIS-NEXT: 40048 ffffffff ffff8004 ffffffff ffff9004 +# DIS-NEXT: 30010 00000000 00000000 80000000 00000000 +# DIS-NEXT: 30020 00000000 00000000 00000000 00000000 +# DIS-NEXT: 30030 00000000 00000000 00000000 00000001 +# DIS-NEXT: 30040 00000000 00000000 00000000 00000001 +# DIS-NEXT: 30050 ffffffff ffff8004 ffffffff ffff9004 # DIS: 0000000000040000 l .tdata 00000000 .tdata # DIS: 0000000000040000 l .tdata 00000000 loc @@ -36,13 +36,13 @@ # CHECK: Relocations [ # CHECK-NEXT: Section (7) .rela.dyn { -# CHECK-NEXT: 0x40018 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# CHECK-NEXT: 0x40020 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# CHECK-NEXT: 0x40028 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# CHECK-NEXT: 0x30020 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# CHECK-NEXT: 0x30028 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# CHECK-NEXT: 0x30030 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Primary GOT { -# CHECK-NEXT: Canonical gp value: 0x47FF8 +# CHECK-NEXT: Canonical gp value: 0x38000 # CHECK-NEXT: Reserved entries [ # CHECK: ] # CHECK-NEXT: Local entries [ @@ -60,25 +60,25 @@ # ^-- -32680 R_MIPS_TLS_GOTTPREL VA - 0x7000 bar # DIS-SO: Contents of section .got: -# DIS-SO-NEXT: 20008 00000000 00000000 80000000 00000000 -# DIS-SO-NEXT: 20018 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20028 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20038 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20048 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20000 00000000 00000000 80000000 00000000 +# DIS-SO-NEXT: 20010 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20020 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20030 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20040 00000000 00000000 00000000 00000000 # SO: Relocations [ # SO-NEXT: Section (7) .rela.dyn { -# SO-NEXT: 0x20030 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE - 0x0 -# SO-NEXT: 0x20040 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 -# SO-NEXT: 0x20048 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 -# SO-NEXT: 0x20050 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 -# SO-NEXT: 0x20018 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# SO-NEXT: 0x20020 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# SO-NEXT: 0x20028 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# SO-NEXT: 0x20028 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE - 0x0 +# SO-NEXT: 0x20038 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 +# SO-NEXT: 0x20040 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 +# SO-NEXT: 0x20048 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 +# SO-NEXT: 0x20010 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# SO-NEXT: 0x20018 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# SO-NEXT: 0x20020 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 # SO-NEXT: } # SO-NEXT: ] # SO-NEXT: Primary GOT { -# SO-NEXT: Canonical gp value: 0x27FF8 +# SO-NEXT: Canonical gp value: 0x27FF0 # SO-NEXT: Reserved entries [ # SO: ] # SO-NEXT: Local entries [ @@ -86,14 +86,14 @@ # SO-NEXT: Global entries [ # SO-NEXT: ] # SO-NEXT: Number of TLS and multi-GOT entries: 8 -# ^-- 0x20018 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD64 foo *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 5 19:38:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB09ECD23DE; Sun, 5 Feb 2017 19:38:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D9A21AB6; Sun, 5 Feb 2017 19:38:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15JcA4E039260; Sun, 5 Feb 2017 19:38:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15JcASk039259; Sun, 5 Feb 2017 19:38:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051938.v15JcASk039259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313299 - vendor/lldb/lldb-release_40-r294123 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:38:11 -0000 Author: dim Date: Sun Feb 5 19:38:10 2017 New Revision: 313299 URL: https://svnweb.freebsd.org/changeset/base/313299 Log: Tag lldb release_40 branch r294123. Added: vendor/lldb/lldb-release_40-r294123/ - copied from r313298, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sun Feb 5 19:38:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E598CD2388; Sun, 5 Feb 2017 19:38:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCB7D1A24; Sun, 5 Feb 2017 19:38:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Jc5aG039211; Sun, 5 Feb 2017 19:38:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15Jc5cb039210; Sun, 5 Feb 2017 19:38:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702051938.v15Jc5cb039210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Feb 2017 19:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313298 - vendor/lld/lld-release_40-r294123 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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 19:38:07 -0000 Author: dim Date: Sun Feb 5 19:38:05 2017 New Revision: 313298 URL: https://svnweb.freebsd.org/changeset/base/313298 Log: Tag lld release_40 branch r294123. Added: vendor/lld/lld-release_40-r294123/ - copied from r313297, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sun Feb 5 20:55:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48E90CD1C55; Sun, 5 Feb 2017 20:55:03 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20CEF10E9; Sun, 5 Feb 2017 20:55:03 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15Kt2Hx071913; Sun, 5 Feb 2017 20:55:02 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15Kt2UM071911; Sun, 5 Feb 2017 20:55:02 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201702052055.v15Kt2UM071911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 5 Feb 2017 20:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313302 - in stable/11: sys/kern tests/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 20:55:03 -0000 Author: jilles Date: Sun Feb 5 20:55:01 2017 New Revision: 313302 URL: https://svnweb.freebsd.org/changeset/base/313302 Log: MFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work. Modified: stable/11/sys/kern/kern_procctl.c stable/11/tests/sys/kern/reaper.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_procctl.c ============================================================================== --- stable/11/sys/kern/kern_procctl.c Sun Feb 5 20:03:05 2017 (r313301) +++ stable/11/sys/kern/kern_procctl.c Sun Feb 5 20:55:01 2017 (r313302) @@ -243,7 +243,7 @@ reap_kill(struct thread *td, struct proc return (ECAPMODE); if (rk->rk_sig <= 0 || rk->rk_sig > _SIG_MAXSIG) return (EINVAL); - if ((rk->rk_flags & ~REAPER_KILL_CHILDREN) != 0) + if ((rk->rk_flags & ~(REAPER_KILL_CHILDREN | REAPER_KILL_SUBTREE)) != 0) return (EINVAL); PROC_UNLOCK(p); reap = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p; Modified: stable/11/tests/sys/kern/reaper.c ============================================================================== --- stable/11/tests/sys/kern/reaper.c Sun Feb 5 20:03:05 2017 (r313301) +++ stable/11/tests/sys/kern/reaper.c Sun Feb 5 20:55:01 2017 (r313302) @@ -639,6 +639,107 @@ ATF_TC_BODY(reaper_kill_normal, tc) ATF_REQUIRE_EQ(0, r); } +ATF_TC_WITHOUT_HEAD(reaper_kill_subtree); +ATF_TC_BODY(reaper_kill_subtree, tc) +{ + struct procctl_reaper_kill params; + ssize_t sr; + pid_t parent, child1, child2, grandchild1, grandchild2, pid; + int r, status; + int pip[2]; + + parent = getpid(); + r = procctl(P_PID, parent, PROC_REAP_ACQUIRE, NULL); + ATF_REQUIRE_EQ(0, r); + + r = pipe(pip); + ATF_REQUIRE_EQ(0, r); + child1 = fork(); + ATF_REQUIRE(child1 != -1); + if (child1 == 0) { + if (close(pip[0]) != 0) + _exit(100); + grandchild1 = fork(); + if (grandchild1 == -1) + _exit(101); + if (grandchild1 == 0) { + if (write(pip[1], &(uint8_t){ 0 }, 1) != 1) + _exit(102); + for (;;) + pause(); + } + for (;;) + pause(); + } + child2 = fork(); + ATF_REQUIRE(child2 != -1); + if (child2 == 0) { + if (close(pip[0]) != 0) + _exit(100); + grandchild2 = fork(); + if (grandchild2 == -1) + _exit(101); + if (grandchild2 == 0) { + if (write(pip[1], &(uint8_t){ 0 }, 1) != 1) + _exit(102); + for (;;) + pause(); + } + for (;;) + pause(); + } + r = close(pip[1]); + ATF_REQUIRE_EQ(0, r); + + sr = read(pip[0], &(uint8_t){ 0 }, 1); + ATF_REQUIRE_EQ(1, sr); + sr = read(pip[0], &(uint8_t){ 0 }, 1); + ATF_REQUIRE_EQ(1, sr); + + params.rk_sig = SIGUSR1; + params.rk_flags = REAPER_KILL_SUBTREE; + params.rk_subtree = child1; + params.rk_killed = 77; + r = procctl(P_PID, parent, PROC_REAP_KILL, ¶ms); + ATF_REQUIRE_EQ(0, r); + ATF_REQUIRE_EQ(2, params.rk_killed); + ATF_CHECK_EQ(-1, params.rk_fpid); + + pid = waitpid(child1, &status, 0); + ATF_REQUIRE_EQ(child1, pid); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR1); + + pid = waitpid(-1, &status, 0); + ATF_REQUIRE(pid > 0); + ATF_CHECK(pid != parent); + ATF_CHECK(pid != child1); + ATF_CHECK(pid != child2); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR1); + + params.rk_sig = SIGUSR2; + params.rk_flags = REAPER_KILL_SUBTREE; + params.rk_subtree = child2; + params.rk_killed = 77; + r = procctl(P_PID, parent, PROC_REAP_KILL, ¶ms); + ATF_REQUIRE_EQ(0, r); + ATF_REQUIRE_EQ(2, params.rk_killed); + ATF_CHECK_EQ(-1, params.rk_fpid); + + pid = waitpid(child2, &status, 0); + ATF_REQUIRE_EQ(child2, pid); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR2); + + pid = waitpid(-1, &status, 0); + ATF_REQUIRE(pid > 0); + ATF_CHECK(pid != parent); + ATF_CHECK(pid != child1); + ATF_CHECK(pid != child2); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR2); + + r = close(pip[0]); + ATF_REQUIRE_EQ(0, r); +} + ATF_TP_ADD_TCS(tp) { @@ -652,5 +753,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, reaper_kill_sigzero); ATF_TP_ADD_TC(tp, reaper_kill_empty); ATF_TP_ADD_TC(tp, reaper_kill_normal); + ATF_TP_ADD_TC(tp, reaper_kill_subtree); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Sun Feb 5 21:31:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCAACCD2EED; Sun, 5 Feb 2017 21:31:41 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4A4F1377; Sun, 5 Feb 2017 21:31:41 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15LVeLF087024; Sun, 5 Feb 2017 21:31:40 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15LVefH087022; Sun, 5 Feb 2017 21:31:40 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201702052131.v15LVefH087022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 5 Feb 2017 21:31: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: r313303 - in stable/10: sys/kern tests/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.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 21:31:42 -0000 Author: jilles Date: Sun Feb 5 21:31:40 2017 New Revision: 313303 URL: https://svnweb.freebsd.org/changeset/base/313303 Log: MFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work. Modified: stable/10/sys/kern/kern_procctl.c stable/10/tests/sys/kern/reaper.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_procctl.c ============================================================================== --- stable/10/sys/kern/kern_procctl.c Sun Feb 5 20:55:01 2017 (r313302) +++ stable/10/sys/kern/kern_procctl.c Sun Feb 5 21:31:40 2017 (r313303) @@ -243,7 +243,7 @@ reap_kill(struct thread *td, struct proc return (ECAPMODE); if (rk->rk_sig <= 0 || rk->rk_sig > _SIG_MAXSIG) return (EINVAL); - if ((rk->rk_flags & ~REAPER_KILL_CHILDREN) != 0) + if ((rk->rk_flags & ~(REAPER_KILL_CHILDREN | REAPER_KILL_SUBTREE)) != 0) return (EINVAL); PROC_UNLOCK(p); reap = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p; Modified: stable/10/tests/sys/kern/reaper.c ============================================================================== --- stable/10/tests/sys/kern/reaper.c Sun Feb 5 20:55:01 2017 (r313302) +++ stable/10/tests/sys/kern/reaper.c Sun Feb 5 21:31:40 2017 (r313303) @@ -639,6 +639,107 @@ ATF_TC_BODY(reaper_kill_normal, tc) ATF_REQUIRE_EQ(0, r); } +ATF_TC_WITHOUT_HEAD(reaper_kill_subtree); +ATF_TC_BODY(reaper_kill_subtree, tc) +{ + struct procctl_reaper_kill params; + ssize_t sr; + pid_t parent, child1, child2, grandchild1, grandchild2, pid; + int r, status; + int pip[2]; + + parent = getpid(); + r = procctl(P_PID, parent, PROC_REAP_ACQUIRE, NULL); + ATF_REQUIRE_EQ(0, r); + + r = pipe(pip); + ATF_REQUIRE_EQ(0, r); + child1 = fork(); + ATF_REQUIRE(child1 != -1); + if (child1 == 0) { + if (close(pip[0]) != 0) + _exit(100); + grandchild1 = fork(); + if (grandchild1 == -1) + _exit(101); + if (grandchild1 == 0) { + if (write(pip[1], &(uint8_t){ 0 }, 1) != 1) + _exit(102); + for (;;) + pause(); + } + for (;;) + pause(); + } + child2 = fork(); + ATF_REQUIRE(child2 != -1); + if (child2 == 0) { + if (close(pip[0]) != 0) + _exit(100); + grandchild2 = fork(); + if (grandchild2 == -1) + _exit(101); + if (grandchild2 == 0) { + if (write(pip[1], &(uint8_t){ 0 }, 1) != 1) + _exit(102); + for (;;) + pause(); + } + for (;;) + pause(); + } + r = close(pip[1]); + ATF_REQUIRE_EQ(0, r); + + sr = read(pip[0], &(uint8_t){ 0 }, 1); + ATF_REQUIRE_EQ(1, sr); + sr = read(pip[0], &(uint8_t){ 0 }, 1); + ATF_REQUIRE_EQ(1, sr); + + params.rk_sig = SIGUSR1; + params.rk_flags = REAPER_KILL_SUBTREE; + params.rk_subtree = child1; + params.rk_killed = 77; + r = procctl(P_PID, parent, PROC_REAP_KILL, ¶ms); + ATF_REQUIRE_EQ(0, r); + ATF_REQUIRE_EQ(2, params.rk_killed); + ATF_CHECK_EQ(-1, params.rk_fpid); + + pid = waitpid(child1, &status, 0); + ATF_REQUIRE_EQ(child1, pid); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR1); + + pid = waitpid(-1, &status, 0); + ATF_REQUIRE(pid > 0); + ATF_CHECK(pid != parent); + ATF_CHECK(pid != child1); + ATF_CHECK(pid != child2); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR1); + + params.rk_sig = SIGUSR2; + params.rk_flags = REAPER_KILL_SUBTREE; + params.rk_subtree = child2; + params.rk_killed = 77; + r = procctl(P_PID, parent, PROC_REAP_KILL, ¶ms); + ATF_REQUIRE_EQ(0, r); + ATF_REQUIRE_EQ(2, params.rk_killed); + ATF_CHECK_EQ(-1, params.rk_fpid); + + pid = waitpid(child2, &status, 0); + ATF_REQUIRE_EQ(child2, pid); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR2); + + pid = waitpid(-1, &status, 0); + ATF_REQUIRE(pid > 0); + ATF_CHECK(pid != parent); + ATF_CHECK(pid != child1); + ATF_CHECK(pid != child2); + ATF_CHECK(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR2); + + r = close(pip[0]); + ATF_REQUIRE_EQ(0, r); +} + ATF_TP_ADD_TCS(tp) { @@ -652,5 +753,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, reaper_kill_sigzero); ATF_TP_ADD_TC(tp, reaper_kill_empty); ATF_TP_ADD_TC(tp, reaper_kill_normal); + ATF_TP_ADD_TC(tp, reaper_kill_subtree); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Sun Feb 5 21:56:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C405CD2759; Sun, 5 Feb 2017 21:56:37 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58CAA2D1; Sun, 5 Feb 2017 21:56:37 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15LuaHM097679; Sun, 5 Feb 2017 21:56:36 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15LuakM097678; Sun, 5 Feb 2017 21:56:36 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201702052156.v15LuakM097678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Sun, 5 Feb 2017 21:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313304 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 21:56:37 -0000 Author: bcr (doc committer) Date: Sun Feb 5 21:56:36 2017 New Revision: 313304 URL: https://svnweb.freebsd.org/changeset/base/313304 Log: MFC r308583: Fix a broken link to the USB audio class specs. PR: 214240 Submitted by: Tobias Kortkamp t@tobik.me Modified: stable/11/share/man/man4/snd_uaudio.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/snd_uaudio.4 ============================================================================== --- stable/11/share/man/man4/snd_uaudio.4 Sun Feb 5 21:31:40 2017 (r313303) +++ stable/11/share/man/man4/snd_uaudio.4 Sun Feb 5 21:56:36 2017 (r313304) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2015 +.Dd November 12, 2016 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -73,7 +73,7 @@ for more information. .Xr usb 4 .Rs .%T "USB Audio Class Specifications" -.%U http://www.usb.org/developers/devclass_docs/ +.%U http://www.usb.org/developers/docs/devclass_docs/ .Re .Sh HISTORY The From owner-svn-src-all@freebsd.org Sun Feb 5 22:18:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49054CD2D5E; Sun, 5 Feb 2017 22:18:47 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 015261048; Sun, 5 Feb 2017 22:18:46 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v15MIkfv006237; Sun, 5 Feb 2017 22:18:46 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v15MIkSL006236; Sun, 5 Feb 2017 22:18:46 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201702052218.v15MIkSL006236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Sun, 5 Feb 2017 22:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313305 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 22:18:47 -0000 Author: bcr (doc committer) Date: Sun Feb 5 22:18:45 2017 New Revision: 313305 URL: https://svnweb.freebsd.org/changeset/base/313305 Log: MFC r303802: Update with the members of the 9th core team. Modified: stable/11/share/misc/organization.dot Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/organization.dot ============================================================================== --- stable/11/share/misc/organization.dot Sun Feb 5 21:56:36 2017 (r313304) +++ stable/11/share/misc/organization.dot Sun Feb 5 22:18:45 2017 (r313305) @@ -25,7 +25,7 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted -core [label="Core Team\ncore@FreeBSD.org\nbapt, emaste, gavin,\nglebius, gnn, hrs,\npeter, rwatson, theraven"] +core [label="Core Team\ncore@FreeBSD.org\nallanjude, bapt, bcr,\nbenno, emaste, gnn,\nhrs, jhb, kmoore"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\nmatthew"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] From owner-svn-src-all@freebsd.org Sun Feb 5 18:59:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7E01CD27EB; Sun, 5 Feb 2017 18:59:06 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-ot0-x243.google.com (mail-ot0-x243.google.com [IPv6:2607:f8b0:4003:c0f::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9253117D; Sun, 5 Feb 2017 18:59:06 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-ot0-x243.google.com with SMTP id 65so8085641otq.2; Sun, 05 Feb 2017 10:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YOsWwwnUpNul4B1X0J/EorgqK2kCN9Zt6pRCnysFF2I=; b=vajO0pzKWxgAZNFS99eYkhyw4oIweyNw090vRUjFNnMUaY2rBwROo+I6Gp40mMpL5f iOuhYcEVdeBMk9xN2kRVV5x6jLAHVbmltR4MqAJWA/SCQsO6tme+2ERENJCGnmjarA8A hmXFphpBw/OWFQj3fwcA+vtQf4QZIZ8f6R3o4eDv3dkk+Hj/tewi+AqXO9nP8+bsY+dr 2BApT3pN6s5+RVFwKsfy3BZxMkuNRyfi+mMIBIvPce0Toxx9KY6yaPkO17ansf19KzJa 3/9g8vaImkaN0x/Ou+9tPGYds/cDJSeqSvaOgLCBMQg/6zj4rh3ycpzmy1jTTU9zCKre M0zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YOsWwwnUpNul4B1X0J/EorgqK2kCN9Zt6pRCnysFF2I=; b=OpWjyND3xURHt1sAMKvptgBKetKoDqZwq1vK1kdmHBDsCMfRiCbX1c4d65EihliLMP TJsOJYibT3L/BfMv4uLLlpfQtJ0CVHNRCLR5Pp93vCSKA83ODtHlV4CghuYaxvSa95Kw RE5LrVcmaFOBniqVoyMd5u6g00wlbU/Ntjxi9F4eOlwLdTvBvdWpB1A/uFiqWlbyiZao n0z7zvamuASaszvc3GISEzUTXNqrXfBzCeg97ULsv/m9VL+cNcD/245WEUy7r9l+jR0v RlbUE95yDz1H/pyjRn+LOFMfYnXtX5ZQ0RY2gI4Bn55aNZEruoyRI3S65iaMYIbCZNXQ WY8g== X-Gm-Message-State: AIkVDXLbwqkHGXx9SwvULs51sYjzNWAahwbJ3BqjrhVbLCr0e3P9mumZBDZDEaBWBFdGDhKaHJXvkmbOzT7sFg== X-Received: by 10.157.27.208 with SMTP id v16mr3066558otv.200.1486321145841; Sun, 05 Feb 2017 10:59:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Sun, 5 Feb 2017 10:59:05 -0800 (PST) In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Jason Harmening Date: Sun, 5 Feb 2017 10:59:05 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Svatopluk Kraus Cc: Andreas Tobler , Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits Content-Type: multipart/mixed; boundary=001a1141481aebafb20547cd1b65 X-Mailman-Approved-At: Mon, 06 Feb 2017 00:33:22 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 18:59:07 -0000 --001a1141481aebafb20547cd1b65 Content-Type: text/plain; charset=UTF-8 Actually attaching the patch this time (**** gmail client) On Sun, Feb 5, 2017 at 10:58 AM, Jason Harmening wrote: > Hmm, it's a good idea to consider the possibility of a barrier issue. It > wouldn't be the first time we've had such a problem on a weakly-ordered > architecture. That said, I don't see a problem in this case. > smp_rendezvous_cpus() takes a spinlock and then issues > atomic_store_rel_int() to ensure the rendezvous params are visible to > other cpus. The latter corresponds to lwsync on powerpc, which AFAIK > should be sufficient to ensure visibility of prior stores. > > For now I'm going with the simpler explanation that I made a bad > assumption in the powerpc get_pcpu() and there is some context in which > the read of sprg0 doesn't return a consistent pointer value. Unfortunately > I don't see where that might be right now. > > On the mips side, Kurt/Alexander can you test the attached patch? It > contains a simple fix to ensure get_pcpu() returns the consistent per-cpu > pointer. > > On Sat, Feb 4, 2017 at 1:34 PM, Svatopluk Kraus wrote: > >> Probably not related. But when I took short look to the patch to see >> what could go wrong, I walked into the following comment in >> _rm_wlock(): "Assumes rm->rm_writecpus update is visible on other CPUs >> before rm_cleanIPI is called." There is no explicit barrier to ensure >> it. However, there might be some barriers inside of >> smp_rendezvous_cpus(). I have no idea what could happened if this >> assumption is not met. Note that rm_cleanIPI() is affected by the >> patch. >> >> >> >> On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening >> wrote: >> > Can you post an example of such panic? Only 2 MI pieces were changed, >> > netisr and rmlock. I haven't seen problems on my own amd64/i386/arm >> testing >> > of this, so a backtrace might help to narrow down the cause. >> > >> > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler >> > wrote: >> >> >> >> On 04.02.17 20:54, Jason Harmening wrote: >> >>> >> >>> I suspect this broke rmlocks for mips because the rmlock >> implementation >> >>> takes the address of the per-CPU pc_rm_queue when building tracker >> >>> lists. That address may be later accessed from another CPU and will >> >>> then translate to the wrong physical region if the address was taken >> >>> relative to the globally-constant pcpup VA used on mips. >> >>> >> >>> Regardless, for mips get_pcpup() should be implemented as >> >>> pcpu_find(curcpu) since returning an address that may mean something >> >>> different depending on the CPU seems like a big POLA violation if >> >>> nothing else. >> >>> >> >>> I'm more concerned about the report of powerpc breakage. For powerpc >> we >> >>> simply take each pcpu pointer from the pc_allcpu list (which is the >> same >> >>> value stored in the cpuid_to_pcpu array) and pass it through the >> ap_pcpu >> >>> global to each AP's startup code, which then stores it in sprg0. It >> >>> should be globally unique and won't have the variable-translation >> issues >> >>> seen on mips. Andreas, are you certain this change was responsible >> the >> >>> breakage you saw, and was it the same sort of hang observed on mips? >> >> >> >> >> >> I'm really sure. 313036 booted fine, allowed me to execute heavy >> >> compilation jobs, np. 313037 on the other side gave me various >> patterns of >> >> panics. During startup, but I also succeeded to get into multiuser and >> then >> >> the panic happend during port building. >> >> >> >> I have no deeper inside where pcpu data is used. Justin mentioned >> netisr? >> >> >> >> Andreas >> >> >> > >> > > --001a1141481aebafb20547cd1b65 Content-Type: text/plain; charset=US-ASCII; name="patch_get_pcpu.txt" Content-Disposition: attachment; filename="patch_get_pcpu.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iyt18bxx0 SW5kZXg6IHN5cy9hbWQ2NC9pbmNsdWRlL3BjcHUuaAo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvYW1kNjQv aW5jbHVkZS9wY3B1LmgJKHJldmlzaW9uIDMxMzE5MykKKysrIHN5cy9hbWQ2NC9pbmNsdWRlL3Bj cHUuaAkod29ya2luZyBjb3B5KQpAQCAtNzgsNiArNzgsNyBAQAogCiBleHRlcm4gc3RydWN0IHBj cHUgKnBjcHVwOwogCisjZGVmaW5lCWdldF9wY3B1KCkJCShwY3B1cCkKICNkZWZpbmUJUENQVV9H RVQobWVtYmVyKQkocGNwdXAtPnBjXyAjIyBtZW1iZXIpCiAjZGVmaW5lCVBDUFVfQUREKG1lbWJl ciwgdmFsKQkocGNwdXAtPnBjXyAjIyBtZW1iZXIgKz0gKHZhbCkpCiAjZGVmaW5lCVBDUFVfSU5D KG1lbWJlcikJUENQVV9BREQobWVtYmVyLCAxKQpAQCAtMjAzLDYgKzIwNCwxNSBAQAogCX0JCQkJ CQkJCVwKIH0KIAorI2RlZmluZQlnZXRfcGNwdSgpIF9fZXh0ZW5zaW9uX18gKHsJCQkJCVwKKwlz dHJ1Y3QgcGNwdSAqX19wYzsJCQkJCQlcCisJCQkJCQkJCQlcCisJX19hc20gX192b2xhdGlsZSgi bW92cSAlJWdzOiUxLCUwIgkJCQlcCisJICAgIDogIj1yIiAoX19wYykJCQkJCQlcCisJICAgIDog Im0iICgqKHN0cnVjdCBwY3B1ICopKF9fcGNwdV9vZmZzZXQocGNfcHJ2c3BhY2UpKSkpOwlcCisJ X19wYzsJCQkJCQkJCVwKK30pCisKICNkZWZpbmUJUENQVV9HRVQobWVtYmVyKQlfX1BDUFVfR0VU KHBjXyAjIyBtZW1iZXIpCiAjZGVmaW5lCVBDUFVfQUREKG1lbWJlciwgdmFsKQlfX1BDUFVfQURE KHBjXyAjIyBtZW1iZXIsIHZhbCkKICNkZWZpbmUJUENQVV9JTkMobWVtYmVyKQlfX1BDUFVfSU5D KHBjXyAjIyBtZW1iZXIpCkluZGV4OiBzeXMva2Vybi9rZXJuX3JtbG9jay5jCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K LS0tIHN5cy9rZXJuL2tlcm5fcm1sb2NrLmMJKHJldmlzaW9uIDMxMzE5MykKKysrIHN5cy9rZXJu L2tlcm5fcm1sb2NrLmMJKHdvcmtpbmcgY29weSkKQEAgLTE1Niw3ICsxNTYsNyBAQAogCQkgKi8K IAkJY3JpdGljYWxfZW50ZXIoKTsKIAkJdGQgPSBjdXJ0aHJlYWQ7Ci0JCXBjID0gcGNwdV9maW5k KGN1cmNwdSk7CisJCXBjID0gZ2V0X3BjcHUoKTsKIAkJZm9yIChxdWV1ZSA9IHBjLT5wY19ybV9x dWV1ZS5ybXFfbmV4dDsKIAkJICAgIHF1ZXVlICE9ICZwYy0+cGNfcm1fcXVldWU7IHF1ZXVlID0g cXVldWUtPnJtcV9uZXh0KSB7CiAJCQl0cmFja2VyID0gKHN0cnVjdCBybV9wcmlvdHJhY2tlciAq KXF1ZXVlOwpAQCAtMjU4LDcgKzI1OCw3IEBACiAJc3RydWN0IHJtbG9jayAqcm0gPSBhcmc7CiAJ c3RydWN0IHJtX3ByaW90cmFja2VyICp0cmFja2VyOwogCXN0cnVjdCBybV9xdWV1ZSAqcXVldWU7 Ci0JcGMgPSBwY3B1X2ZpbmQoY3VyY3B1KTsKKwlwYyA9IGdldF9wY3B1KCk7CiAKIAlmb3IgKHF1 ZXVlID0gcGMtPnBjX3JtX3F1ZXVlLnJtcV9uZXh0OyBxdWV1ZSAhPSAmcGMtPnBjX3JtX3F1ZXVl OwogCSAgICBxdWV1ZSA9IHF1ZXVlLT5ybXFfbmV4dCkgewpAQCAtMzU1LDcgKzM1NSw3IEBACiAJ c3RydWN0IHBjcHUgKnBjOwogCiAJY3JpdGljYWxfZW50ZXIoKTsKLQlwYyA9IHBjcHVfZmluZChj dXJjcHUpOworCXBjID0gZ2V0X3BjcHUoKTsKIAogCS8qIENoZWNrIGlmIHdlIGp1c3QgbmVlZCB0 byBkbyBhIHByb3BlciBjcml0aWNhbF9leGl0LiAqLwogCWlmICghQ1BVX0lTU0VUKHBjLT5wY19j cHVpZCwgJnJtLT5ybV93cml0ZWNwdXMpKSB7CkBAIC00MTYsNyArNDE2LDcgQEAKIAl9CiAKIAlj cml0aWNhbF9lbnRlcigpOwotCXBjID0gcGNwdV9maW5kKGN1cmNwdSk7CisJcGMgPSBnZXRfcGNw dSgpOwogCUNQVV9DTFIocGMtPnBjX2NwdWlkLCAmcm0tPnJtX3dyaXRlY3B1cyk7CiAJcm1fdHJh Y2tlcl9hZGQocGMsIHRyYWNrZXIpOwogCXNjaGVkX3BpbigpOwpAQCAtNjQxLDcgKzY0MSw3IEBA CiAjaWZkZWYgSU5WQVJJQU5UUwogCWlmICghKHJtLT5sb2NrX29iamVjdC5sb19mbGFncyAmIExP X1JFQ1VSU0FCTEUpICYmICF0cnlsb2NrKSB7CiAJCWNyaXRpY2FsX2VudGVyKCk7Ci0JCUtBU1NF UlQocm1fdHJhY2tlcnNfcHJlc2VudChwY3B1X2ZpbmQoY3VyY3B1KSwgcm0sCisJCUtBU1NFUlQo cm1fdHJhY2tlcnNfcHJlc2VudChnZXRfcGNwdSgpLCBybSwKIAkJICAgIGN1cnRocmVhZCkgPT0g MCwKIAkJICAgICgicm1fcmxvY2s6IHJlY3Vyc2VkIG9uIG5vbi1yZWN1cnNpdmUgcm1sb2NrICVz IEAgJXM6JWRcbiIsCiAJCSAgICBybS0+bG9ja19vYmplY3QubG9fbmFtZSwgZmlsZSwgbGluZSkp OwpAQCAtNzcxLDcgKzc3MSw3IEBACiAJCX0KIAogCQljcml0aWNhbF9lbnRlcigpOwotCQljb3Vu dCA9IHJtX3RyYWNrZXJzX3ByZXNlbnQocGNwdV9maW5kKGN1cmNwdSksIHJtLCBjdXJ0aHJlYWQp OworCQljb3VudCA9IHJtX3RyYWNrZXJzX3ByZXNlbnQoZ2V0X3BjcHUoKSwgcm0sIGN1cnRocmVh ZCk7CiAJCWNyaXRpY2FsX2V4aXQoKTsKIAogCQlpZiAoY291bnQgPT0gMCkKQEAgLTc5Nyw3ICs3 OTcsNyBAQAogCQkJICAgIHJtLT5sb2NrX29iamVjdC5sb19uYW1lLCBmaWxlLCBsaW5lKTsKIAog CQljcml0aWNhbF9lbnRlcigpOwotCQljb3VudCA9IHJtX3RyYWNrZXJzX3ByZXNlbnQocGNwdV9m aW5kKGN1cmNwdSksIHJtLCBjdXJ0aHJlYWQpOworCQljb3VudCA9IHJtX3RyYWNrZXJzX3ByZXNl bnQoZ2V0X3BjcHUoKSwgcm0sIGN1cnRocmVhZCk7CiAJCWNyaXRpY2FsX2V4aXQoKTsKIAogCQlp ZiAoY291bnQgIT0gMCkKSW5kZXg6IHN5cy9taXBzL2luY2x1ZGUvcGNwdS5oCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K LS0tIHN5cy9taXBzL2luY2x1ZGUvcGNwdS5oCShyZXZpc2lvbiAzMTMxOTMpCisrKyBzeXMvbWlw cy9pbmNsdWRlL3BjcHUuaAkod29ya2luZyBjb3B5KQpAQCAtMzksMTYgKzM5LDE3IEBACiAJc3Ry dWN0CXBtYXAJKnBjX2N1cnBtYXA7CQkvKiBwbWFwIG9mIGN1cnRocmVhZCAqLwlcCiAJdV9pbnQz Ml90CXBjX25leHRfYXNpZDsJCS8qIG5leHQgQVNJRCB0byBhbGxvYyAqLyBcCiAJdV9pbnQzMl90 CXBjX2FzaWRfZ2VuZXJhdGlvbjsJLyogY3VycmVudCBBU0lEIGdlbmVyYXRpb24gKi8gXAotCXVf aW50CQlwY19wZW5kaW5nX2lwaXM7CS8qIElQSXMgcGVuZGluZyB0byB0aGlzIENQVSAqLworCXVf aW50CQlwY19wZW5kaW5nX2lwaXM7CS8qIElQSXMgcGVuZGluZyB0byB0aGlzIENQVSAqLyBcCisJ c3RydWN0CXBjcHUJKnBjX3NlbGY7CQkvKiBnbG9iYWxseS11bmlxZSBzZWxmIHBvaW50ZXIgKi8K IAogI2lmZGVmCV9fbWlwc19uNjQKICNkZWZpbmUJUENQVV9NRF9NSVBTNjRfRklFTERTCQkJCQkJ XAogCVBDUFVfTURfQ09NTU9OX0ZJRUxEUwkJCQkJCVwKLQljaGFyCQlfX3BhZFs2MV0KKwljaGFy CQlfX3BhZFs1M10KICNlbHNlCiAjZGVmaW5lCVBDUFVfTURfTUlQUzMyX0ZJRUxEUwkJCQkJCVwK IAlQQ1BVX01EX0NPTU1PTl9GSUVMRFMJCQkJCQlcCi0JY2hhcgkJX19wYWRbMTkzXQorCWNoYXIJ CV9fcGFkWzE4OV0KICNlbmRpZgogCiAjaWZkZWYJX19taXBzX242NApAQCAtNjUsNiArNjYsMTMg QEAKIGV4dGVybiBzdHJ1Y3QgcGNwdSAqcGNwdXA7CiAjZGVmaW5lCVBDUFVQCXBjcHVwCiAKKy8q CisgKiBTaW5jZSB3ZSB1c2UgYSB3aXJlZCBUTEIgZW50cnkgdG8gbWFwIHRoZSBzYW1lIFZBIHRv IGEgZGlmZmVyZW50CisgKiBwaHlzaWNhbCBwYWdlIGZvciBlYWNoIENQVSwgZ2V0X3BjcHUoKSBt dXN0IHVzZSB0aGUgcGNfc2VsZgorICogZmllbGQgdG8gb2J0YWluIGEgZ2xvYmFsbHktdW5pcXVl IHBvaW50ZXIuCisgKi8KKyNkZWZpbmUJZ2V0X3BjcHUoKQkJKFBDUFVQLT5wY19zZWxmKQorCiAj ZGVmaW5lCVBDUFVfQUREKG1lbWJlciwgdmFsdWUpCShQQ1BVUC0+cGNfICMjIG1lbWJlciArPSAo dmFsdWUpKQogI2RlZmluZQlQQ1BVX0dFVChtZW1iZXIpCShQQ1BVUC0+cGNfICMjIG1lbWJlcikK ICNkZWZpbmUJUENQVV9JTkMobWVtYmVyKQlQQ1BVX0FERChtZW1iZXIsIDEpCkluZGV4OiBzeXMv bWlwcy9taXBzL21hY2hkZXAuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvbWlwcy9taXBzL21hY2hkZXAu YwkocmV2aXNpb24gMzEzMTkzKQorKysgc3lzL21pcHMvbWlwcy9tYWNoZGVwLmMJKHdvcmtpbmcg Y29weSkKQEAgLTQ3NSw2ICs0NzUsNyBAQAogCiAJcGNwdS0+cGNfbmV4dF9hc2lkID0gMTsKIAlw Y3B1LT5wY19hc2lkX2dlbmVyYXRpb24gPSAxOworCXBjcHUtPnBjX3NlbGYgPSBwY3B1OwogI2lm ZGVmIFNNUAogCWlmICgodm1fb2Zmc2V0X3QpcGNwdXAgPj0gVk1fTUlOX0tFUk5FTF9BRERSRVNT ICYmCiAJICAgICh2bV9vZmZzZXRfdClwY3B1cCA8PSBWTV9NQVhfS0VSTkVMX0FERFJFU1MpIHsK SW5kZXg6IHN5cy9uZXQvbmV0aXNyLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL25ldC9uZXRpc3IuYwko cmV2aXNpb24gMzEzMTkzKQorKysgc3lzL25ldC9uZXRpc3IuYwkod29ya2luZyBjb3B5KQpAQCAt MTI2OCw5ICsxMjY4LDcgQEAKIHN0YXRpYyB2b2lkCiBuZXRpc3JfaW5pdCh2b2lkICphcmcpCiB7 Ci0jaWZkZWYgRUFSTFlfQVBfU1RBUlRVUAogCXN0cnVjdCBwY3B1ICpwYzsKLSNlbmRpZgogCiAJ TkVUSVNSX0xPQ0tfSU5JVCgpOwogCWlmIChuZXRpc3JfbWF4dGhyZWFkcyA9PSAwIHx8IG5ldGlz cl9tYXh0aHJlYWRzIDwgLTEgKQpAQCAtMTMwOCw3ICsxMzA2LDggQEAKIAkJbmV0aXNyX3N0YXJ0 X3N3aShwYy0+cGNfY3B1aWQsIHBjKTsKIAl9CiAjZWxzZQotCW5ldGlzcl9zdGFydF9zd2koY3Vy Y3B1LCBwY3B1X2ZpbmQoY3VyY3B1KSk7CisJcGMgPSBnZXRfcGNwdSgpOworCW5ldGlzcl9zdGFy dF9zd2kocGMtPnBjX2NwdWlkLCBwYyk7CiAjZW5kaWYKIH0KIFNZU0lOSVQobmV0aXNyX2luaXQs IFNJX1NVQl9TT0ZUSU5UUiwgU0lfT1JERVJfRklSU1QsIG5ldGlzcl9pbml0LCBOVUxMKTsKSW5k ZXg6IHN5cy9wb3dlcnBjL2luY2x1ZGUvY3B1ZnVuYy5oCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9wb3dl cnBjL2luY2x1ZGUvY3B1ZnVuYy5oCShyZXZpc2lvbiAzMTMxOTMpCisrKyBzeXMvcG93ZXJwYy9p bmNsdWRlL2NwdWZ1bmMuaAkod29ya2luZyBjb3B5KQpAQCAtMjAxLDcgKzIwMSw3IEBACiB9CiAK IHN0YXRpYyBfX2lubGluZSBzdHJ1Y3QgcGNwdSAqCi1wb3dlcnBjX2dldF9wY3B1cCh2b2lkKQor Z2V0X3BjcHUodm9pZCkKIHsKIAlzdHJ1Y3QgcGNwdSAqcmV0OwogCkluZGV4OiBzeXMvcG93ZXJw Yy9pbmNsdWRlL3BjcHUuaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvcG93ZXJwYy9pbmNsdWRlL3BjcHUu aAkocmV2aXNpb24gMzEzMTkzKQorKysgc3lzL3Bvd2VycGMvaW5jbHVkZS9wY3B1LmgJKHdvcmtp bmcgY29weSkKQEAgLTE0Miw3ICsxNDIsNyBAQAogCiAjaWZkZWYgX0tFUk5FTAogCi0jZGVmaW5l IHBjcHVwCSgoc3RydWN0IHBjcHUgKikgcG93ZXJwY19nZXRfcGNwdXAoKSkKKyNkZWZpbmUgcGNw dXAJKGdldF9wY3B1KCkpCiAKIHN0YXRpYyBfX2lubGluZSBfX3B1cmUyIHN0cnVjdCB0aHJlYWQg KgogX19jdXJ0aHJlYWQodm9pZCkKSW5kZXg6IHN5cy9zcGFyYzY0L2luY2x1ZGUvcGNwdS5oCj09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0KLS0tIHN5cy9zcGFyYzY0L2luY2x1ZGUvcGNwdS5oCShyZXZpc2lvbiAzMTMxOTMp CisrKyBzeXMvc3BhcmM2NC9pbmNsdWRlL3BjcHUuaAkod29ya2luZyBjb3B5KQpAQCAtNzQsNiAr NzQsNyBAQAogcmVnaXN0ZXIgc3RydWN0IHBjYiAqY3VycGNiIF9fYXNtX18oX19YU1RSSU5HKFBD Ql9SRUcpKTsKIHJlZ2lzdGVyIHN0cnVjdCBwY3B1ICpwY3B1cCBfX2FzbV9fKF9fWFNUUklORyhQ Q1BVX1JFRykpOwogCisjZGVmaW5lCWdldF9wY3B1KCkJCShwY3B1cCkKICNkZWZpbmUJUENQVV9H RVQobWVtYmVyKQkocGNwdXAtPnBjXyAjIyBtZW1iZXIpCiAKIHN0YXRpYyBfX2lubGluZSBfX3B1 cmUyIHN0cnVjdCB0aHJlYWQgKgo= --001a1141481aebafb20547cd1b65-- From owner-svn-src-all@freebsd.org Sun Feb 5 21:06:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F3B4CD24EB; Sun, 5 Feb 2017 21:06:59 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7D211DF8; Sun, 5 Feb 2017 21:06:58 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 7FC1F10D06A; Sun, 5 Feb 2017 22:06:46 +0100 (CET) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening , Svatopluk Kraus References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> Cc: Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits From: Andreas Tobler Message-ID: Date: Sun, 5 Feb 2017 22:06:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-Mailman-Approved-At: Mon, 06 Feb 2017 00:33:51 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 05 Feb 2017 21:06:59 -0000 On 05.02.17 19:59, Jason Harmening wrote: > Actually attaching the patch this time (**** gmail client) > > On Sun, Feb 5, 2017 at 10:58 AM, Jason Harmening > > wrote: > > Hmm, it's a good idea to consider the possibility of a barrier > issue. It wouldn't be the first time we've had such a problem on a > weakly-ordered architecture. That said, I don't see a problem in > this case. smp_rendezvous_cpus() takes a spinlock and then issues > atomic_store_rel_int() to ensure the rendezvous params are visible > to other cpus. The latter corresponds to lwsync on powerpc, which > AFAIK should be sufficient to ensure visibility of prior stores. > > For now I'm going with the simpler explanation that I made a bad > assumption in the powerpc get_pcpu() and there is some context in > which the read of sprg0 doesn't return a consistent pointer value. > Unfortunately I don't see where that might be right now. > > On the mips side, Kurt/Alexander can you test the attached patch? > It contains a simple fix to ensure get_pcpu() returns the consistent > per-cpu pointer. Here the panic I received with the latest patch you sent. World & kernel are on 313286 + patch. https://people.freebsd.org/~andreast/pcpu/ It is the same panic, pic 2 is with a try to get a core .... The load issue was a gmake -j8 bootstrap of todays gcc trunk sources. The machine has 2 physical CPU's, two threads pre cpu :) I revert now and see if the situation becomes stable again or if there is something else. Andreas From owner-svn-src-all@freebsd.org Mon Feb 6 01:57:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42977CD2C28; Mon, 6 Feb 2017 01:57:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F94F16BC; Mon, 6 Feb 2017 01:57:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v161vgfI098086; Mon, 6 Feb 2017 01:57:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v161vgln098085; Mon, 6 Feb 2017 01:57:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060157.v161vgln098085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 01:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313306 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 01:57:43 -0000 Author: adrian Date: Mon Feb 6 01:57:41 2017 New Revision: 313306 URL: https://svnweb.freebsd.org/changeset/base/313306 Log: [iwm] free node reference if rxparams addition fails. Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sun Feb 5 22:18:45 2017 (r313305) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 01:57:41 2017 (r313306) @@ -2994,8 +2994,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2; rxs.c_nf = sc->sc_noise; - if (ieee80211_add_rx_params(m, &rxs) == 0) + if (ieee80211_add_rx_params(m, &rxs) == 0) { + if (ni) + ieee80211_free_node(ni); goto fail; + } if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -3042,7 +3045,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, return; -fail: counter_u64_add(ic->ic_ierrors, 1); +fail: + counter_u64_add(ic->ic_ierrors, 1); } static int From owner-svn-src-all@freebsd.org Mon Feb 6 01:58:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DE1CCD2C69; Mon, 6 Feb 2017 01:58:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB39180C; Mon, 6 Feb 2017 01:58:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v161vx43098139; Mon, 6 Feb 2017 01:57:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v161vxQK098138; Mon, 6 Feb 2017 01:57:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060157.v161vxQK098138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 01:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313307 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 01:58:00 -0000 Author: adrian Date: Mon Feb 6 01:57:59 2017 New Revision: 313307 URL: https://svnweb.freebsd.org/changeset/base/313307 Log: [iwm] TODO for QOS support. Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Mon Feb 6 01:57:41 2017 (r313306) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Mon Feb 6 01:57:59 2017 (r313307) @@ -318,6 +318,11 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s = htole32((ic->ic_flags & IEEE80211_F_SHSLOT) ? IWM_MAC_FLG_SHORT_SLOT : 0); + /* + * XXX TODO: if we're doing QOS.. + * cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA) + */ + /* XXX TODO: set wme parameters; also handle getting updated wme parameters */ for (i = 0; i < IWM_AC_NUM+1; i++) { int txf = i; From owner-svn-src-all@freebsd.org Mon Feb 6 02:01:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5417CD2DDA; Mon, 6 Feb 2017 02:01:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74E661B86; Mon, 6 Feb 2017 02:01:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1621MXW099054; Mon, 6 Feb 2017 02:01:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1621Mb4099051; Mon, 6 Feb 2017 02:01:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060201.v1621Mb4099051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 02:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313308 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 02:01:23 -0000 Author: adrian Date: Mon Feb 6 02:01:22 2017 New Revision: 313308 URL: https://svnweb.freebsd.org/changeset/base/313308 Log: [iwm] The HW Revision stepping constants should be in if_iwmreg.h. Obtained from: dragonflybsd 84292f0c38594c462c719c0e59da5908b93aba5f Modified: head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 01:57:59 2017 (r313307) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:01:22 2017 (r313308) @@ -297,6 +297,16 @@ #define IWM_CSR_HW_REV_DASH(_val) (((_val) & 0x0000003) >> 0) #define IWM_CSR_HW_REV_STEP(_val) (((_val) & 0x000000C) >> 2) +/** + * hw_rev values + */ +enum { + IWM_SILICON_A_STEP = 0, + IWM_SILICON_B_STEP, + IWM_SILICON_C_STEP, +}; + + #define IWM_CSR_HW_REV_TYPE_MSK (0x000FFF0) #define IWM_CSR_HW_REV_TYPE_5300 (0x0000020) #define IWM_CSR_HW_REV_TYPE_5350 (0x0000030) Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 01:57:59 2017 (r313307) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:01:22 2017 (r313308) @@ -432,10 +432,6 @@ struct iwm_softc { int ict_cur; int sc_hw_rev; -#define IWM_SILICON_A_STEP 0 -#define IWM_SILICON_B_STEP 1 -#define IWM_SILICON_C_STEP 2 -#define IWM_SILICON_D_STEP 3 int sc_hw_id; int sc_device_family; #define IWM_DEVICE_FAMILY_7000 1 From owner-svn-src-all@freebsd.org Mon Feb 6 02:14:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2AD2CD1134; Mon, 6 Feb 2017 02:14:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D7826F; Mon, 6 Feb 2017 02:14:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v162EYbp005952; Mon, 6 Feb 2017 02:14:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v162EYOV005946; Mon, 6 Feb 2017 02:14:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060214.v162EYOV005946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 02:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313309 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 02:14:35 -0000 Author: adrian Date: Mon Feb 6 02:14:34 2017 New Revision: 313309 URL: https://svnweb.freebsd.org/changeset/base/313309 Log: [iwm] Sync if_iwm_phy_db code with Linux iwlwifi. Obtained from: Dragonflybsd commit c1019b6bfff36c856f7b4fccbdf3bb13ac27750c Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_phy_db.h head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:14:34 2017 (r313309) @@ -4619,11 +4619,9 @@ iwm_init_hw(struct iwm_softc *sc) goto error; } - /* Send phy db control command and then phy db calibration*/ - if ((error = iwm_send_phy_db_data(sc)) != 0) { - device_printf(sc->sc_dev, "phy_db_data failed\n"); + /* Send phy db control command and then phy db calibration */ + if ((error = iwm_send_phy_db_data(sc->sc_phy_db)) != 0) goto error; - } if ((error = iwm_send_phy_cfg_cmd(sc)) != 0) { device_printf(sc->sc_dev, "phy_cfg_cmd failed\n"); @@ -5251,7 +5249,7 @@ iwm_notif_intr(struct iwm_softc *sc) struct iwm_calib_res_notif_phy_db *phy_db_notif; phy_db_notif = (void *)pkt->data; - iwm_phy_db_set_section(sc, phy_db_notif); + iwm_phy_db_set_section(sc->sc_phy_db, phy_db_notif); break; } @@ -5774,6 +5772,13 @@ iwm_attach(device_t dev) callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc); + /* Init phy db */ + sc->sc_phy_db = iwm_phy_db_init(sc); + if (!sc->sc_phy_db) { + device_printf(dev, "Cannot init phy_db\n"); + goto fail; + } + /* PCI attach */ error = iwm_pci_attach(dev); if (error != 0) @@ -6223,7 +6228,8 @@ iwm_detach_local(struct iwm_softc *sc, i ieee80211_ifdetach(&sc->sc_ic); } - iwm_phy_db_free(sc); + iwm_phy_db_free(sc->sc_phy_db); + sc->sc_phy_db = NULL; /* Free descriptor rings */ iwm_free_rx_ring(sc, &sc->rxq); Modified: head/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 02:14:34 2017 (r313309) @@ -150,26 +150,104 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include +#include "if_iwmreg.h" +#include "if_iwmvar.h" +#include "if_iwm_debug.h" +#include "if_iwm_util.h" +#include "if_iwm_phy_db.h" + +#define CHANNEL_NUM_SIZE 4 /* num of channels in calib_ch size */ + +struct iwm_phy_db_entry { + uint16_t size; + uint8_t *data; +}; + +/** + * struct iwm_phy_db - stores phy configuration and calibration data. + * + * @cfg: phy configuration. + * @calib_nch: non channel specific calibration data. + * @calib_ch: channel specific calibration data. + * @n_group_papd: number of entries in papd channel group. + * @calib_ch_group_papd: calibration data related to papd channel group. + * @n_group_txp: number of entries in tx power channel group. + * @calib_ch_group_txp: calibration data related to tx power chanel group. + */ +struct iwm_phy_db { + struct iwm_phy_db_entry cfg; + struct iwm_phy_db_entry calib_nch; + int n_group_papd; + struct iwm_phy_db_entry *calib_ch_group_papd; + int n_group_txp; + struct iwm_phy_db_entry *calib_ch_group_txp; + + struct iwm_softc *sc; +}; + +enum iwm_phy_db_section_type { + IWM_PHY_DB_CFG = 1, + IWM_PHY_DB_CALIB_NCH, + IWM_PHY_DB_UNUSED, + IWM_PHY_DB_CALIB_CHG_PAPD, + IWM_PHY_DB_CALIB_CHG_TXP, + IWM_PHY_DB_MAX +}; + +#define PHY_DB_CMD 0x6c /* TEMP API - The actual is 0x8c */ + +/* + * phy db - configure operational ucode + */ +struct iwm_phy_db_cmd { + uint16_t type; + uint16_t length; + uint8_t data[]; +} __packed; + +/* for parsing of tx power channel group data that comes from the firmware*/ +struct iwm_phy_db_chg_txp { + uint32_t space; + uint16_t max_channel_idx; +} __packed; /* - * BEGIN iwl-phy-db.c + * phy db - Receive phy db chunk after calibrations */ +struct iwm_calib_res_notif_phy_db { + uint16_t type; + uint16_t length; + uint8_t data[]; +} __packed; + +struct iwm_phy_db * +iwm_phy_db_init(struct iwm_softc *sc) +{ + struct iwm_phy_db *phy_db = malloc(sizeof(struct iwm_phy_db), + M_DEVBUF, M_NOWAIT | M_ZERO); + + if (!phy_db) + return phy_db; + + phy_db->sc = sc; + + phy_db->n_group_txp = -1; + phy_db->n_group_papd = -1; + + /* TODO: add default values of the phy db. */ + return phy_db; +} + /* * get phy db section: returns a pointer to a phy db section specified by * type and channel group id. */ static struct iwm_phy_db_entry * -iwm_phy_db_get_section(struct iwm_softc *sc, - enum iwm_phy_db_section_type type, uint16_t chg_id) +iwm_phy_db_get_section(struct iwm_phy_db *phy_db, + enum iwm_phy_db_section_type type, + uint16_t chg_id) { - struct iwm_phy_db *phy_db = &sc->sc_phy_db; - - if (type >= IWM_PHY_DB_MAX) + if (!phy_db || type >= IWM_PHY_DB_MAX) return NULL; switch (type) { @@ -178,11 +256,11 @@ iwm_phy_db_get_section(struct iwm_softc case IWM_PHY_DB_CALIB_NCH: return &phy_db->calib_nch; case IWM_PHY_DB_CALIB_CHG_PAPD: - if (chg_id >= IWM_NUM_PAPD_CH_GROUPS) + if (chg_id >= phy_db->n_group_papd) return NULL; return &phy_db->calib_ch_group_papd[chg_id]; case IWM_PHY_DB_CALIB_CHG_TXP: - if (chg_id >= IWM_NUM_TXP_CH_GROUPS) + if (chg_id >= phy_db->n_group_txp) return NULL; return &phy_db->calib_ch_group_txp[chg_id]; default: @@ -191,24 +269,92 @@ iwm_phy_db_get_section(struct iwm_softc return NULL; } +static void +iwm_phy_db_free_section(struct iwm_phy_db *phy_db, + enum iwm_phy_db_section_type type, uint16_t chg_id) +{ + struct iwm_phy_db_entry *entry = + iwm_phy_db_get_section(phy_db, type, chg_id); + if (!entry) + return; + + if (entry->data != NULL) + free(entry->data, M_DEVBUF); + entry->data = NULL; + entry->size = 0; +} + +void +iwm_phy_db_free(struct iwm_phy_db *phy_db) +{ + int i; + + if (!phy_db) + return; + + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CFG, 0); + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CALIB_NCH, 0); + + for (i = 0; i < phy_db->n_group_papd; i++) + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CALIB_CHG_PAPD, i); + if (phy_db->calib_ch_group_papd != NULL) + free(phy_db->calib_ch_group_papd, M_DEVBUF); + + for (i = 0; i < phy_db->n_group_txp; i++) + iwm_phy_db_free_section(phy_db, IWM_PHY_DB_CALIB_CHG_TXP, i); + if (phy_db->calib_ch_group_txp != NULL) + free(phy_db->calib_ch_group_txp, M_DEVBUF); + + free(phy_db, M_DEVBUF); +} + int -iwm_phy_db_set_section(struct iwm_softc *sc, - struct iwm_calib_res_notif_phy_db *phy_db_notif) +iwm_phy_db_set_section(struct iwm_phy_db *phy_db, + struct iwm_calib_res_notif_phy_db *phy_db_notif) { enum iwm_phy_db_section_type type = le16toh(phy_db_notif->type); - uint16_t size = le16toh(phy_db_notif->length); - struct iwm_phy_db_entry *entry; - uint16_t chg_id = 0; + uint16_t size = le16toh(phy_db_notif->length); + struct iwm_phy_db_entry *entry; + uint16_t chg_id = 0; - if (type == IWM_PHY_DB_CALIB_CHG_PAPD || - type == IWM_PHY_DB_CALIB_CHG_TXP) + if (!phy_db) + return EINVAL; + + if (type == IWM_PHY_DB_CALIB_CHG_PAPD) { chg_id = le16toh(*(uint16_t *)phy_db_notif->data); + if (phy_db && !phy_db->calib_ch_group_papd) { + /* + * Firmware sends the largest index first, so we can use + * it to know how much we should allocate. + */ + phy_db->calib_ch_group_papd = malloc( + (chg_id + 1) * sizeof(struct iwm_phy_db_entry), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!phy_db->calib_ch_group_papd) + return ENOMEM; + phy_db->n_group_papd = chg_id + 1; + } + } else if (type == IWM_PHY_DB_CALIB_CHG_TXP) { + chg_id = le16toh(*(uint16_t *)phy_db_notif->data); + if (phy_db && !phy_db->calib_ch_group_txp) { + /* + * Firmware sends the largest index first, so we can use + * it to know how much we should allocate. + */ + phy_db->calib_ch_group_txp = malloc( + (chg_id + 1) * sizeof(struct iwm_phy_db_entry), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!phy_db->calib_ch_group_txp) + return ENOMEM; + phy_db->n_group_txp = chg_id + 1; + } + } - entry = iwm_phy_db_get_section(sc, type, chg_id); + entry = iwm_phy_db_get_section(phy_db, type, chg_id); if (!entry) return EINVAL; - if (entry->data) + if (entry->data != NULL) free(entry->data, M_DEVBUF); entry->data = malloc(size, M_DEVBUF, M_NOWAIT); if (!entry->data) { @@ -216,17 +362,18 @@ iwm_phy_db_set_section(struct iwm_softc return ENOMEM; } memcpy(entry->data, phy_db_notif->data, size); + entry->size = size; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s(%d): [PHYDB]SET: Type %d , Size: %d, data: %p\n", - __func__, __LINE__, type, size, entry->data); + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_RESET, + "%s(%d): [PHYDB]SET: Type %d , Size: %d\n", + __func__, __LINE__, type, size); return 0; } static int -iwm_is_valid_channel(uint16_t ch_id) +is_valid_channel(uint16_t ch_id) { if (ch_id <= 14 || (36 <= ch_id && ch_id <= 64 && ch_id % 4 == 0) || @@ -237,10 +384,10 @@ iwm_is_valid_channel(uint16_t ch_id) } static uint8_t -iwm_ch_id_to_ch_index(uint16_t ch_id) +ch_id_to_ch_index(uint16_t ch_id) { - if (!iwm_is_valid_channel(ch_id)) - return 0xff; + if (!is_valid_channel(ch_id)) + return 0xff; if (ch_id <= 14) return ch_id - 1; @@ -253,9 +400,9 @@ iwm_ch_id_to_ch_index(uint16_t ch_id) static uint16_t -iwm_channel_id_to_papd(uint16_t ch_id) +channel_id_to_papd(uint16_t ch_id) { - if (!iwm_is_valid_channel(ch_id)) + if (!is_valid_channel(ch_id)) return 0xff; if (1 <= ch_id && ch_id <= 14) @@ -268,17 +415,15 @@ iwm_channel_id_to_papd(uint16_t ch_id) } static uint16_t -iwm_channel_id_to_txp(struct iwm_softc *sc, uint16_t ch_id) +channel_id_to_txp(struct iwm_phy_db *phy_db, uint16_t ch_id) { - struct iwm_phy_db *phy_db = &sc->sc_phy_db; struct iwm_phy_db_chg_txp *txp_chg; int i; - uint8_t ch_index = iwm_ch_id_to_ch_index(ch_id); - + uint8_t ch_index = ch_id_to_ch_index(ch_id); if (ch_index == 0xff) return 0xff; - for (i = 0; i < IWM_NUM_TXP_CH_GROUPS; i++) { + for (i = 0; i < phy_db->n_group_txp; i++) { txp_chg = (void *)phy_db->calib_ch_group_txp[i].data; if (!txp_chg) return 0xff; @@ -293,71 +438,79 @@ iwm_channel_id_to_txp(struct iwm_softc * } static int -iwm_phy_db_get_section_data(struct iwm_softc *sc, - uint32_t type, uint8_t **data, uint16_t *size, uint16_t ch_id) +iwm_phy_db_get_section_data(struct iwm_phy_db *phy_db, + uint32_t type, uint8_t **data, uint16_t *size, + uint16_t ch_id) { struct iwm_phy_db_entry *entry; uint16_t ch_group_id = 0; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, "->%s\n", __func__); + if (!phy_db) + return EINVAL; + /* find wanted channel group */ if (type == IWM_PHY_DB_CALIB_CHG_PAPD) - ch_group_id = iwm_channel_id_to_papd(ch_id); + ch_group_id = channel_id_to_papd(ch_id); else if (type == IWM_PHY_DB_CALIB_CHG_TXP) - ch_group_id = iwm_channel_id_to_txp(sc, ch_id); + ch_group_id = channel_id_to_txp(phy_db, ch_id); - entry = iwm_phy_db_get_section(sc, type, ch_group_id); + entry = iwm_phy_db_get_section(phy_db, type, ch_group_id); if (!entry) return EINVAL; *data = entry->data; *size = entry->size; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s(%d): [PHYDB] GET: Type %d , Size: %d\n", - __func__, __LINE__, type, *size); + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_RESET, + "%s(%d): [PHYDB] GET: Type %d , Size: %d\n", + __func__, __LINE__, type, *size); return 0; } static int -iwm_send_phy_db_cmd(struct iwm_softc *sc, uint16_t type, - uint16_t length, void *data) +iwm_send_phy_db_cmd(struct iwm_phy_db *phy_db, uint16_t type, + uint16_t length, void *data) { struct iwm_phy_db_cmd phy_db_cmd; struct iwm_host_cmd cmd = { - .id = IWM_PHY_DB_CMD, - .flags = IWM_CMD_SYNC, + .id = PHY_DB_CMD, }; - IWM_DPRINTF(sc, IWM_DEBUG_CMD, - "Sending PHY-DB hcmd of type %d, of length %d\n", - type, length); + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_RESET, + "Sending PHY-DB hcmd of type %d, of length %d\n", + type, length); /* Set phy db cmd variables */ - phy_db_cmd.type = le16toh(type); - phy_db_cmd.length = le16toh(length); + phy_db_cmd.type = htole16(type); + phy_db_cmd.length = htole16(length); /* Set hcmd variables */ cmd.data[0] = &phy_db_cmd; cmd.len[0] = sizeof(struct iwm_phy_db_cmd); cmd.data[1] = data; cmd.len[1] = length; +#ifdef notyet + cmd.dataflags[1] = IWM_HCMD_DFL_NOCOPY; +#endif - return iwm_send_cmd(sc, &cmd); + return iwm_send_cmd(phy_db->sc, &cmd); } static int -iwm_phy_db_send_all_channel_groups(struct iwm_softc *sc, - enum iwm_phy_db_section_type type, uint8_t max_ch_groups) +iwm_phy_db_send_all_channel_groups(struct iwm_phy_db *phy_db, + enum iwm_phy_db_section_type type, + uint8_t max_ch_groups) { uint16_t i; int err; struct iwm_phy_db_entry *entry; - /* Send all the channel-specific groups to operational fw */ + /* Send all the channel specific groups to operational fw */ for (i = 0; i < max_ch_groups; i++) { - entry = iwm_phy_db_get_section(sc, type, i); + entry = iwm_phy_db_get_section(phy_db, + type, + i); if (!entry) return EINVAL; @@ -365,16 +518,18 @@ iwm_phy_db_send_all_channel_groups(struc continue; /* Send the requested PHY DB section */ - err = iwm_send_phy_db_cmd(sc, type, entry->size, entry->data); + err = iwm_send_phy_db_cmd(phy_db, + type, + entry->size, + entry->data); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD, - "%s: Can't SEND phy_db section %d (%d), " - "err %d\n", __func__, type, i, err); + device_printf(phy_db->sc->sc_dev, + "Can't SEND phy_db section %d (%d), err %d\n", + type, i, err); return err; } - DELAY(1000); - IWM_DPRINTF(sc, IWM_DEBUG_CMD, + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_CMD, "Sent PHY_DB HCMD, type = %d num = %d\n", type, i); } @@ -382,102 +537,73 @@ iwm_phy_db_send_all_channel_groups(struc } int -iwm_send_phy_db_data(struct iwm_softc *sc) +iwm_send_phy_db_data(struct iwm_phy_db *phy_db) { uint8_t *data = NULL; uint16_t size = 0; int err; - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, "%s: Sending phy db data and configuration to runtime image\n", __func__); /* Send PHY DB CFG section */ - err = iwm_phy_db_get_section_data(sc, IWM_PHY_DB_CFG, &data, &size, 0); + err = iwm_phy_db_get_section_data(phy_db, IWM_PHY_DB_CFG, + &data, &size, 0); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot get Phy DB cfg section, %d\n", __func__, err); return err; } - err = iwm_send_phy_db_cmd(sc, IWM_PHY_DB_CFG, size, data); + err = iwm_send_phy_db_cmd(phy_db, IWM_PHY_DB_CFG, size, data); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send HCMD of Phy DB cfg section, %d\n", __func__, err); return err; } - err = iwm_phy_db_get_section_data(sc, IWM_PHY_DB_CALIB_NCH, + err = iwm_phy_db_get_section_data(phy_db, IWM_PHY_DB_CALIB_NCH, &data, &size, 0); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot get Phy DB non specific channel section, " "%d\n", __func__, err); return err; } - err = iwm_send_phy_db_cmd(sc, IWM_PHY_DB_CALIB_NCH, size, data); + err = iwm_send_phy_db_cmd(phy_db, IWM_PHY_DB_CALIB_NCH, size, data); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send HCMD of Phy DB non specific channel " "sect, %d\n", __func__, err); return err; } /* Send all the TXP channel specific data */ - err = iwm_phy_db_send_all_channel_groups(sc, - IWM_PHY_DB_CALIB_CHG_PAPD, IWM_NUM_PAPD_CH_GROUPS); + err = iwm_phy_db_send_all_channel_groups(phy_db, + IWM_PHY_DB_CALIB_CHG_PAPD, phy_db->n_group_papd); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send channel specific PAPD groups, %d\n", __func__, err); return err; } /* Send all the TXP channel specific data */ - err = iwm_phy_db_send_all_channel_groups(sc, - IWM_PHY_DB_CALIB_CHG_TXP, IWM_NUM_TXP_CH_GROUPS); + err = iwm_phy_db_send_all_channel_groups(phy_db, + IWM_PHY_DB_CALIB_CHG_TXP, phy_db->n_group_txp); if (err) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + device_printf(phy_db->sc->sc_dev, "%s: Cannot send channel specific TX power groups, " "%d\n", __func__, err); return err; } - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, + IWM_DPRINTF(phy_db->sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, "%s: Finished sending phy db non channel data\n", __func__); return 0; } - -static void -iwm_phy_db_free_section(struct iwm_softc *sc, - enum iwm_phy_db_section_type type, uint16_t chg_id) -{ - struct iwm_phy_db_entry *entry = - iwm_phy_db_get_section(sc, type, chg_id); - if (!entry) - return; - - if (entry->data != NULL) - free(entry->data, M_DEVBUF); - entry->data = NULL; - entry->size = 0; -} - -void -iwm_phy_db_free(struct iwm_softc *sc) -{ - int i; - - iwm_phy_db_free_section(sc, IWM_PHY_DB_CFG, 0); - iwm_phy_db_free_section(sc, IWM_PHY_DB_CALIB_NCH, 0); - - for (i = 0; i < IWM_NUM_PAPD_CH_GROUPS; i++) - iwm_phy_db_free_section(sc, IWM_PHY_DB_CALIB_CHG_PAPD, i); - - for (i = 0; i < IWM_NUM_TXP_CH_GROUPS; i++) - iwm_phy_db_free_section(sc, IWM_PHY_DB_CALIB_CHG_TXP, i); -} Modified: head/sys/dev/iwm/if_iwm_phy_db.h ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 02:14:34 2017 (r313309) @@ -106,8 +106,12 @@ #ifndef __IF_IWM_PHY_DB_H__ #define __IF_IWM_PHY_DB_H__ -extern int iwm_phy_db_set_section(struct iwm_softc *sc, +struct iwm_calib_res_notif_phy_db; + +extern struct iwm_phy_db *iwm_phy_db_init(struct iwm_softc *sc); +extern void iwm_phy_db_free(struct iwm_phy_db *phy_db); +extern int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, struct iwm_calib_res_notif_phy_db *phy_db_notif); -extern int iwm_send_phy_db_data(struct iwm_softc *sc); -extern void iwm_phy_db_free(struct iwm_softc *sc); +extern int iwm_send_phy_db_data(struct iwm_phy_db *phy_db); + #endif /* __IF_IWM_PHY_DB_H__ */ Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:14:34 2017 (r313309) @@ -2013,45 +2013,6 @@ struct iwm_phy_cfg_cmd { #define IWM_PHY_CFG_RX_CHAIN_B (1 << 13) #define IWM_PHY_CFG_RX_CHAIN_C (1 << 14) -/* - * PHY db - */ - -enum iwm_phy_db_section_type { - IWM_PHY_DB_CFG = 1, - IWM_PHY_DB_CALIB_NCH, - IWM_PHY_DB_UNUSED, - IWM_PHY_DB_CALIB_CHG_PAPD, - IWM_PHY_DB_CALIB_CHG_TXP, - IWM_PHY_DB_MAX -}; - -#define IWM_PHY_DB_CMD 0x6c /* TEMP API - The actual is 0x8c */ - -/* - * phy db - configure operational ucode - */ -struct iwm_phy_db_cmd { - uint16_t type; - uint16_t length; - uint8_t data[]; -} __packed; - -/* for parsing of tx power channel group data that comes from the firmware */ -struct iwm_phy_db_chg_txp { - uint32_t space; - uint16_t max_channel_idx; -} __packed; - -/* - * phy db - Receive phy db chunk after calibrations - */ -struct iwm_calib_res_notif_phy_db { - uint16_t type; - uint16_t length; - uint8_t data[]; -} __packed; - /* Target of the IWM_NVM_ACCESS_CMD */ enum { Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:01:22 2017 (r313308) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:14:34 2017 (r313309) @@ -314,25 +314,6 @@ enum iwm_hcmd_dataflag { IWM_HCMD_DFL_DUP = (1 << 1), }; -/* - * iwlwifi/iwl-phy-db - */ - -#define IWM_NUM_PAPD_CH_GROUPS 9 -#define IWM_NUM_TXP_CH_GROUPS 9 - -struct iwm_phy_db_entry { - uint16_t size; - uint8_t *data; -}; - -struct iwm_phy_db { - struct iwm_phy_db_entry cfg; - struct iwm_phy_db_entry calib_nch; - struct iwm_phy_db_entry calib_ch_group_papd[IWM_NUM_PAPD_CH_GROUPS]; - struct iwm_phy_db_entry calib_ch_group_txp[IWM_NUM_TXP_CH_GROUPS]; -}; - struct iwm_int_sta { uint32_t sta_id; uint32_t tfd_queue_msk; @@ -474,7 +455,7 @@ struct iwm_softc { struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; struct iwm_nvm_data sc_nvm; - struct iwm_phy_db sc_phy_db; + struct iwm_phy_db *sc_phy_db; struct iwm_bf_data sc_bf; From owner-svn-src-all@freebsd.org Mon Feb 6 02:20:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3707CD1214; Mon, 6 Feb 2017 02:20:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B32F264E; Mon, 6 Feb 2017 02:20:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v162K5MJ006185; Mon, 6 Feb 2017 02:20:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v162K5JH006183; Mon, 6 Feb 2017 02:20:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060220.v162K5JH006183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 02:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313310 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 02:20:07 -0000 Author: adrian Date: Mon Feb 6 02:20:05 2017 New Revision: 313310 URL: https://svnweb.freebsd.org/changeset/base/313310 Log: [iwm] make sure we call iwm_detach_local() only once. Obtained from: DragonflyBSD git ebd4ceab76a6f161362029cbfd08efaedaab0519 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:14:34 2017 (r313309) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:20:05 2017 (r313310) @@ -5766,6 +5766,7 @@ iwm_attach(device_t dev) int txq_i, i; sc->sc_dev = dev; + sc->sc_attached = 1; IWM_LOCK_INIT(sc); mbufq_init(&sc->sc_snd, ifqmaxlen); callout_init_mtx(&sc->sc_watchdog_to, &sc->sc_mtx, 0); @@ -6218,6 +6219,10 @@ iwm_detach_local(struct iwm_softc *sc, i device_t dev = sc->sc_dev; int i; + if (!sc->sc_attached) + return 0; + sc->sc_attached = 0; + if (do_net80211) ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:14:34 2017 (r313309) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:20:05 2017 (r313310) @@ -369,6 +369,7 @@ struct iwm_node { struct iwm_softc { device_t sc_dev; uint32_t sc_debug; + int sc_attached; struct mtx sc_mtx; struct mbufq sc_snd; From owner-svn-src-all@freebsd.org Mon Feb 6 03:06:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D5D3CD1E0E; Mon, 6 Feb 2017 03:06:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0CE91CC5; Mon, 6 Feb 2017 03:06:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1636C9H026953; Mon, 6 Feb 2017 03:06:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1636BCg026948; Mon, 6 Feb 2017 03:06:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060306.v1636BCg026948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 03:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313311 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 03:06:13 -0000 Author: adrian Date: Mon Feb 6 03:06:11 2017 New Revision: 313311 URL: https://svnweb.freebsd.org/changeset/base/313311 Log: [iwm] Sync nvm parsing code with Linux iwlwifi. * sc->sc_nvm becomes sc->nvm_data and is now a pointer instead of an inlined struct. * Add sc->eeprom_size and sc->nvm_hw_section_num configuration values to struct iwm_softc. * For now continue to avoid negative error return-values, and use pointer variables for some return values, as before. * Continue to omit LAR (location aware regulatory) related code as well. Tested: * Intel 7260, STA mode (2GHz) Obtained from: dragonflybsd commit 39f8331b1a6f295291e08c377da12a8e7a5436c0 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 03:06:11 2017 (r313311) @@ -260,20 +260,23 @@ static int iwm_post_alive(struct iwm_sof static int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t, uint8_t *, uint16_t *); static int iwm_nvm_read_section(struct iwm_softc *, uint16_t, uint8_t *, - uint16_t *, size_t); + uint16_t *, uint32_t); static uint32_t iwm_eeprom_channel_flags(uint16_t); static void iwm_add_channel_band(struct iwm_softc *, struct ieee80211_channel[], int, int *, int, size_t, const uint8_t[]); static void iwm_init_channel_map(struct ieee80211com *, int, int *, struct ieee80211_channel[]); -static int iwm_parse_nvm_data(struct iwm_softc *, const uint16_t *, - const uint16_t *, const uint16_t *, - const uint16_t *, const uint16_t *, - const uint16_t *); -static void iwm_set_hw_address_8000(struct iwm_softc *, - struct iwm_nvm_data *, - const uint16_t *, const uint16_t *); +static struct iwm_nvm_data * + iwm_parse_nvm_data(struct iwm_softc *, const uint16_t *, + const uint16_t *, const uint16_t *, + const uint16_t *, const uint16_t *, + const uint16_t *); +static void iwm_free_nvm_data(struct iwm_nvm_data *); +static void iwm_set_hw_address_family_8000(struct iwm_softc *, + struct iwm_nvm_data *, + const uint16_t *, + const uint16_t *); static int iwm_get_sku(const struct iwm_softc *, const uint16_t *, const uint16_t *); static int iwm_get_nvm_version(const struct iwm_softc *, const uint16_t *); @@ -283,8 +286,8 @@ static int iwm_get_n_hw_addrs(const stru const uint16_t *); static void iwm_set_radio_cfg(const struct iwm_softc *, struct iwm_nvm_data *, uint32_t); -static int iwm_parse_nvm_sections(struct iwm_softc *, - struct iwm_nvm_section *); +static struct iwm_nvm_data * + iwm_parse_nvm_sections(struct iwm_softc *, struct iwm_nvm_section *); static int iwm_nvm_init(struct iwm_softc *); static int iwm_firmware_load_sect(struct iwm_softc *, uint32_t, const uint8_t *, uint32_t); @@ -1646,21 +1649,11 @@ iwm_post_alive(struct iwm_softc *sc) * iwlwifi/mvm/nvm.c */ -/* list of NVM sections we are allowed/need to read */ -const int nvm_to_read[] = { - IWM_NVM_SECTION_TYPE_HW, - IWM_NVM_SECTION_TYPE_SW, - IWM_NVM_SECTION_TYPE_REGULATORY, - IWM_NVM_SECTION_TYPE_CALIBRATION, - IWM_NVM_SECTION_TYPE_PRODUCTION, - IWM_NVM_SECTION_TYPE_HW_8000, - IWM_NVM_SECTION_TYPE_MAC_OVERRIDE, - IWM_NVM_SECTION_TYPE_PHY_SKU, -}; +#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 +#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 /* Default NVM size to read */ #define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) -#define IWM_MAX_NVM_SECTION_SIZE 8192 #define IWM_NVM_WRITE_OPCODE 1 #define IWM_NVM_READ_OPCODE 0 @@ -1675,7 +1668,6 @@ static int iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, uint16_t offset, uint16_t length, uint8_t *data, uint16_t *len) { - offset = 0; struct iwm_nvm_access_cmd nvm_access_cmd = { .offset = htole16(offset), .length = htole16(length), @@ -1702,17 +1694,9 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, } pkt = cmd.resp_pkt; - if (pkt->hdr.flags & IWM_CMD_FAILED_MSK) { - device_printf(sc->sc_dev, - "Bad return from IWM_NVM_ACCES_COMMAND (0x%08X)\n", - pkt->hdr.flags); - ret = EIO; - goto exit; - } /* Extract NVM response */ nvm_resp = (void *)pkt->data; - ret = le16toh(nvm_resp->status); bytes_read = le16toh(nvm_resp->length); offset_read = le16toh(nvm_resp->offset); @@ -1758,6 +1742,7 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, goto exit; } + /* Write data to NVM */ memcpy(data + offset, resp_data, bytes_read); *len = bytes_read; @@ -1778,34 +1763,40 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, */ static int iwm_nvm_read_section(struct iwm_softc *sc, - uint16_t section, uint8_t *data, uint16_t *len, size_t max_len) + uint16_t section, uint8_t *data, uint16_t *len, uint32_t size_read) { - uint16_t chunklen, seglen; - int error = 0; + uint16_t seglen, length, offset = 0; + int ret; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "reading NVM section %d\n", section); + /* Set nvm section read length */ + length = IWM_NVM_DEFAULT_CHUNK_SIZE; - chunklen = seglen = IWM_NVM_DEFAULT_CHUNK_SIZE; - *len = 0; + seglen = length; - /* Read NVM chunks until exhausted (reading less than requested) */ - while (seglen == chunklen && *len < max_len) { - error = iwm_nvm_read_chunk(sc, - section, *len, chunklen, data, &seglen); - if (error) { - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "Cannot read from NVM section " - "%d at offset %d\n", section, *len); - return error; + /* Read the NVM until exhausted (reading less than requested) */ + while (seglen == length) { + /* Check no memory assumptions fail and cause an overflow */ + if ((size_read + offset + length) > + sc->eeprom_size) { + device_printf(sc->sc_dev, + "EEPROM size is too small for NVM\n"); + return ENOBUFS; } - *len += seglen; + + ret = iwm_nvm_read_chunk(sc, section, offset, length, data, &seglen); + if (ret) { + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "Cannot read NVM from section %d offset %d, length %d\n", + section, offset, length); + return ret; + } + offset += seglen; } - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "NVM section %d read completed (%d bytes, error=%d)\n", - section, *len, error); - return error; + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "NVM section %d read completed\n", section); + *len = offset; + return 0; } /* @@ -1889,7 +1880,7 @@ enum nvm_sku_bits { * @IWM_NVM_CHANNEL_IBSS: usable as an IBSS channel * @IWM_NVM_CHANNEL_ACTIVE: active scanning allowed * @IWM_NVM_CHANNEL_RADAR: radar detection required - * XXX cannot find this (DFS) flag in iwl-nvm-parse.c + * XXX cannot find this (DFS) flag in iwm-nvm-parse.c * @IWM_NVM_CHANNEL_DFS: dynamic freq selection candidate * @IWM_NVM_CHANNEL_WIDE: 20 MHz channel okay (?) * @IWM_NVM_CHANNEL_40MHZ: 40 MHz channel okay (?) @@ -1908,6 +1899,10 @@ enum iwm_nvm_channel_flags { IWM_NVM_CHANNEL_160MHZ = (1 << 11), }; +/* lower blocks contain EEPROM image and calibration data */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ + /* * Translate EEPROM flags to net80211. */ @@ -1935,7 +1930,7 @@ iwm_add_channel_band(struct iwm_softc *s int maxchans, int *nchans, int ch_idx, size_t ch_num, const uint8_t bands[]) { - const uint16_t * const nvm_ch_flags = sc->sc_nvm.nvm_ch_flags; + const uint16_t * const nvm_ch_flags = sc->nvm_data->nvm_ch_flags; uint32_t nflags; uint16_t ch_flags; uint8_t ieee; @@ -1976,7 +1971,7 @@ iwm_init_channel_map(struct ieee80211com struct ieee80211_channel chans[]) { struct iwm_softc *sc = ic->ic_softc; - struct iwm_nvm_data *data = &sc->sc_nvm; + struct iwm_nvm_data *data = sc->nvm_data; uint8_t bands[IEEE80211_MODE_BYTES]; size_t ch_num; @@ -2005,7 +2000,7 @@ iwm_init_channel_map(struct ieee80211com } static void -iwm_set_hw_address_8000(struct iwm_softc *sc, struct iwm_nvm_data *data, +iwm_set_hw_address_family_8000(struct iwm_softc *sc, struct iwm_nvm_data *data, const uint16_t *mac_override, const uint16_t *nvm_hw) { const uint8_t *hw_addr; @@ -2128,15 +2123,57 @@ iwm_set_radio_cfg(const struct iwm_softc } static int +iwm_set_hw_address(struct iwm_softc *sc, struct iwm_nvm_data *data, + const uint16_t *nvm_hw, const uint16_t *mac_override) +{ +#ifdef notyet /* for FAMILY 9000 */ + if (cfg->mac_addr_from_csr) { + iwm_set_hw_address_from_csr(sc, data); + } else +#endif + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + const uint8_t *hw_addr = (const uint8_t *)(nvm_hw + IWM_HW_ADDR); + + /* The byte order is little endian 16 bit, meaning 214365 */ + data->hw_addr[0] = hw_addr[1]; + data->hw_addr[1] = hw_addr[0]; + data->hw_addr[2] = hw_addr[3]; + data->hw_addr[3] = hw_addr[2]; + data->hw_addr[4] = hw_addr[5]; + data->hw_addr[5] = hw_addr[4]; + } else { + iwm_set_hw_address_family_8000(sc, data, mac_override, nvm_hw); + } + + if (!iwm_is_valid_ether_addr(data->hw_addr)) { + device_printf(sc->sc_dev, "no valid mac address was found\n"); + return EINVAL; + } + + return 0; +} + +static struct iwm_nvm_data * iwm_parse_nvm_data(struct iwm_softc *sc, const uint16_t *nvm_hw, const uint16_t *nvm_sw, const uint16_t *nvm_calib, const uint16_t *mac_override, const uint16_t *phy_sku, const uint16_t *regulatory) { - struct iwm_nvm_data *data = &sc->sc_nvm; - uint8_t hw_addr[IEEE80211_ADDR_LEN]; + struct iwm_nvm_data *data; uint32_t sku, radio_cfg; + if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + data = malloc(sizeof(*data) + + IWM_NUM_CHANNELS * sizeof(uint16_t), + M_DEVBUF, M_NOWAIT | M_ZERO); + } else { + data = malloc(sizeof(*data) + + IWM_NUM_CHANNELS_8000 * sizeof(uint16_t), + M_DEVBUF, M_NOWAIT | M_ZERO); + } + if (!data) + return NULL; + data->nvm_version = iwm_get_nvm_version(sc, nvm_sw); radio_cfg = iwm_get_radio_cfg(sc, nvm_sw, phy_sku); @@ -2149,17 +2186,10 @@ iwm_parse_nvm_data(struct iwm_softc *sc, data->n_hw_addrs = iwm_get_n_hw_addrs(sc, nvm_sw); - /* The byte order is little endian 16 bit, meaning 214365 */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { - IEEE80211_ADDR_COPY(hw_addr, nvm_hw + IWM_HW_ADDR); - data->hw_addr[0] = hw_addr[1]; - data->hw_addr[1] = hw_addr[0]; - data->hw_addr[2] = hw_addr[3]; - data->hw_addr[3] = hw_addr[2]; - data->hw_addr[4] = hw_addr[5]; - data->hw_addr[5] = hw_addr[4]; - } else { - iwm_set_hw_address_8000(sc, data, mac_override, nvm_hw); + /* If no valid mac address was found - bail out */ + if (iwm_set_hw_address(sc, data, nvm_hw, mac_override)) { + free(data, M_DEVBUF); + return NULL; } if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { @@ -2170,14 +2200,17 @@ iwm_parse_nvm_data(struct iwm_softc *sc, IWM_NUM_CHANNELS_8000 * sizeof(uint16_t)); } - return 0; + return data; } -/* - * END NVM PARSE - */ +static void +iwm_free_nvm_data(struct iwm_nvm_data *data) +{ + if (data != NULL) + free(data, M_DEVBUF); +} -static int +static struct iwm_nvm_data * iwm_parse_nvm_sections(struct iwm_softc *sc, struct iwm_nvm_section *sections) { const uint16_t *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; @@ -2185,42 +2218,38 @@ iwm_parse_nvm_sections(struct iwm_softc /* Checking for required sections */ if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { if (!sections[IWM_NVM_SECTION_TYPE_SW].data || - !sections[IWM_NVM_SECTION_TYPE_HW].data) { + !sections[sc->nvm_hw_section_num].data) { device_printf(sc->sc_dev, "Can't parse empty OTP/NVM sections\n"); - return ENOENT; + return NULL; } - - hw = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_HW].data; } else if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { /* SW and REGULATORY sections are mandatory */ if (!sections[IWM_NVM_SECTION_TYPE_SW].data || !sections[IWM_NVM_SECTION_TYPE_REGULATORY].data) { device_printf(sc->sc_dev, "Can't parse empty OTP/NVM sections\n"); - return ENOENT; + return NULL; } /* MAC_OVERRIDE or at least HW section must exist */ - if (!sections[IWM_NVM_SECTION_TYPE_HW_8000].data && + if (!sections[sc->nvm_hw_section_num].data && !sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data) { device_printf(sc->sc_dev, "Can't parse mac_address, empty sections\n"); - return ENOENT; + return NULL; } /* PHY_SKU section is mandatory in B0 */ if (!sections[IWM_NVM_SECTION_TYPE_PHY_SKU].data) { device_printf(sc->sc_dev, "Can't parse phy_sku in B0, empty sections\n"); - return ENOENT; + return NULL; } - - hw = (const uint16_t *) - sections[IWM_NVM_SECTION_TYPE_HW_8000].data; } else { panic("unknown device family %d\n", sc->sc_device_family); } + hw = (const uint16_t *) sections[sc->nvm_hw_section_num].data; sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data; calib = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data; @@ -2237,46 +2266,57 @@ iwm_parse_nvm_sections(struct iwm_softc static int iwm_nvm_init(struct iwm_softc *sc) { - struct iwm_nvm_section nvm_sections[IWM_NVM_NUM_OF_SECTIONS]; - int i, section, error; + struct iwm_nvm_section nvm_sections[IWM_NVM_MAX_NUM_SECTIONS]; + int i, ret, section; + uint32_t size_read = 0; + uint8_t *nvm_buffer, *temp; uint16_t len; - uint8_t *buf; - const size_t bufsz = IWM_MAX_NVM_SECTION_SIZE; - memset(nvm_sections, 0 , sizeof(nvm_sections)); + memset(nvm_sections, 0, sizeof(nvm_sections)); - buf = malloc(bufsz, M_DEVBUF, M_NOWAIT); - if (buf == NULL) - return ENOMEM; + if (sc->nvm_hw_section_num >= IWM_NVM_MAX_NUM_SECTIONS) + return EINVAL; - for (i = 0; i < nitems(nvm_to_read); i++) { - section = nvm_to_read[i]; - KASSERT(section <= nitems(nvm_sections), - ("too many sections")); + /* load NVM values from nic */ + /* Read From FW NVM */ + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM, "Read from NVM\n"); - error = iwm_nvm_read_section(sc, section, buf, &len, bufsz); - if (error) { - error = 0; + nvm_buffer = malloc(sc->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO); + if (!nvm_buffer) + return ENOMEM; + for (section = 0; section < IWM_NVM_MAX_NUM_SECTIONS; section++) { + /* we override the constness for initial read */ + ret = iwm_nvm_read_section(sc, section, nvm_buffer, + &len, size_read); + if (ret) continue; - } - nvm_sections[section].data = malloc(len, M_DEVBUF, M_NOWAIT); - if (nvm_sections[section].data == NULL) { - error = ENOMEM; + size_read += len; + temp = malloc(len, M_DEVBUF, M_NOWAIT); + if (!temp) { + ret = ENOMEM; break; } - memcpy(nvm_sections[section].data, buf, len); + memcpy(temp, nvm_buffer, len); + + nvm_sections[section].data = temp; nvm_sections[section].length = len; } - free(buf, M_DEVBUF); - if (error == 0) - error = iwm_parse_nvm_sections(sc, nvm_sections); + if (!size_read) + device_printf(sc->sc_dev, "OTP is blank\n"); + free(nvm_buffer, M_DEVBUF); - for (i = 0; i < IWM_NVM_NUM_OF_SECTIONS; i++) { + sc->nvm_data = iwm_parse_nvm_sections(sc, nvm_sections); + if (!sc->nvm_data) + return EINVAL; + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "nvm version = %x\n", sc->nvm_data->nvm_version); + + for (i = 0; i < IWM_NVM_MAX_NUM_SECTIONS; i++) { if (nvm_sections[i].data != NULL) free(nvm_sections[i].data, M_DEVBUF); } - return error; + return 0; } /* @@ -2673,7 +2713,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc device_printf(sc->sc_dev, "failed to read nvm\n"); return error; } - IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->sc_nvm.hw_addr); + IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->nvm_data->hw_addr); return 0; } @@ -2694,7 +2734,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc __func__, ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS), - sc->sc_nvm.valid_tx_ant, + sc->nvm_data->valid_tx_ant, iwm_fw_valid_tx_ant(sc)); @@ -5648,6 +5688,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_3160_2: sc->sc_fwname = "iwm3160fw"; sc->host_interrupt_operation_mode = 1; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5655,6 +5697,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_3165_2: sc->sc_fwname = "iwm7265fw"; sc->host_interrupt_operation_mode = 0; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5662,6 +5706,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_7260_2: sc->sc_fwname = "iwm7260fw"; sc->host_interrupt_operation_mode = 1; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5669,6 +5715,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_7265_2: sc->sc_fwname = "iwm7265fw"; sc->host_interrupt_operation_mode = 0; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); @@ -5676,6 +5724,8 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_8260_2: sc->sc_fwname = "iwm8000Cfw"; sc->host_interrupt_operation_mode = 0; + sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000; + sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_8000; sc->sc_device_family = IWM_DEVICE_FAMILY_8000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; return (0); @@ -5993,10 +6043,10 @@ iwm_preinit(void *arg) device_printf(dev, "hw rev 0x%x, fw ver %s, address %s\n", sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK, - sc->sc_fwver, ether_sprintf(sc->sc_nvm.hw_addr)); + sc->sc_fwver, ether_sprintf(sc->nvm_data->hw_addr)); /* not all hardware can do 5GHz band */ - if (!sc->sc_nvm.sku_cap_band_52GHz_enable) + if (!sc->nvm_data->sku_cap_band_52GHz_enable) memset(&ic->ic_sup_rates[IEEE80211_MODE_11A], 0, sizeof(ic->ic_sup_rates[IEEE80211_MODE_11A])); IWM_UNLOCK(sc); @@ -6236,6 +6286,8 @@ iwm_detach_local(struct iwm_softc *sc, i iwm_phy_db_free(sc->sc_phy_db); sc->sc_phy_db = NULL; + iwm_free_nvm_data(sc->nvm_data); + /* Free descriptor rings */ iwm_free_rx_ring(sc, &sc->rxq); for (i = 0; i < nitems(sc->txq); i++) Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 03:06:11 2017 (r313311) @@ -407,7 +407,7 @@ iwm_mvm_fill_probe_req(struct iwm_softc remain -= 3; } - if (sc->sc_nvm.sku_cap_band_52GHz_enable) { + if (sc->nvm_data->sku_cap_band_52GHz_enable) { /* Fill in 5GHz IEs. */ rs = &ic->ic_sup_rates[IEEE80211_MODE_11A]; if (rs->rs_nrates > IEEE80211_RATE_SIZE) { @@ -674,7 +674,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc) req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED); req->flags = htole32(IWM_PHY_BAND_24); - if (sc->sc_nvm.sku_cap_band_52GHz_enable) + if (sc->nvm_data->sku_cap_band_52GHz_enable) req->flags |= htole32(IWM_PHY_BAND_5); req->filter_flags = htole32(IWM_MAC_FILTER_ACCEPT_GRP | IWM_MAC_FILTER_IN_BEACON); Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 03:06:11 2017 (r313311) @@ -437,8 +437,8 @@ iwm_fw_valid_tx_ant(struct iwm_softc *sc tx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS); - if (sc->sc_nvm.valid_tx_ant) - tx_ant &= sc->sc_nvm.valid_tx_ant; + if (sc->nvm_data->valid_tx_ant) + tx_ant &= sc->nvm_data->valid_tx_ant; return tx_ant; } @@ -451,8 +451,8 @@ iwm_fw_valid_rx_ant(struct iwm_softc *sc rx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RX_CHAIN) >> IWM_FW_PHY_CFG_RX_CHAIN_POS); - if (sc->sc_nvm.valid_rx_ant) - rx_ant &= sc->sc_nvm.valid_rx_ant; + if (sc->nvm_data->valid_rx_ant) + rx_ant &= sc->nvm_data->valid_rx_ant; return rx_ant; } Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 03:06:11 2017 (r313311) @@ -2023,18 +2023,13 @@ enum { /* Section types for IWM_NVM_ACCESS_CMD */ enum { - IWM_NVM_SECTION_TYPE_HW = 0, - IWM_NVM_SECTION_TYPE_SW, - IWM_NVM_SECTION_TYPE_PAPD, - IWM_NVM_SECTION_TYPE_REGULATORY, - IWM_NVM_SECTION_TYPE_CALIBRATION, - IWM_NVM_SECTION_TYPE_PRODUCTION, - IWM_NVM_SECTION_TYPE_POST_FCS_CALIB, - /* 7, 8, 9 unknown */ - IWM_NVM_SECTION_TYPE_HW_8000 = 10, - IWM_NVM_SECTION_TYPE_MAC_OVERRIDE, - IWM_NVM_SECTION_TYPE_PHY_SKU, - IWM_NVM_NUM_OF_SECTIONS, + IWM_NVM_SECTION_TYPE_SW = 1, + IWM_NVM_SECTION_TYPE_REGULATORY = 3, + IWM_NVM_SECTION_TYPE_CALIBRATION = 4, + IWM_NVM_SECTION_TYPE_PRODUCTION = 5, + IWM_NVM_SECTION_TYPE_MAC_OVERRIDE = 11, + IWM_NVM_SECTION_TYPE_PHY_SKU = 12, + IWM_NVM_MAX_NUM_SECTIONS = 13, }; /** Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 02:20:05 2017 (r313310) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 03:06:11 2017 (r313311) @@ -192,10 +192,10 @@ struct iwm_nvm_data { #define IWM_NUM_CHANNELS 39 #define IWM_NUM_CHANNELS_8000 51 - uint16_t nvm_ch_flags[IWM_NUM_CHANNELS_8000]; - uint16_t nvm_version; uint8_t max_tx_pwr_half_dbm; + + uint16_t nvm_ch_flags[]; }; /* max bufs per tfd the driver will use */ @@ -291,10 +291,6 @@ struct iwm_ucode_status { #define IWM_CMD_RESP_MAX PAGE_SIZE -/* lower blocks contain EEPROM image and calibration data */ -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 16384 -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 32768 - #define IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 500 #define IWM_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS 400 @@ -455,7 +451,7 @@ struct iwm_softc { int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; - struct iwm_nvm_data sc_nvm; + struct iwm_nvm_data *nvm_data; struct iwm_phy_db *sc_phy_db; struct iwm_bf_data sc_bf; @@ -493,6 +489,9 @@ struct iwm_softc { struct iwm_tx_radiotap_header sc_txtap; int sc_max_rssi; + + uint16_t eeprom_size; + uint8_t nvm_hw_section_num; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-all@freebsd.org Mon Feb 6 03:29:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99EECD2223; Mon, 6 Feb 2017 03:29:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0B6A66; Mon, 6 Feb 2017 03:29:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v163Tojo034754; Mon, 6 Feb 2017 03:29:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v163TofP034751; Mon, 6 Feb 2017 03:29:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060329.v163TofP034751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 03:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313312 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 03:29:51 -0000 Author: adrian Date: Mon Feb 6 03:29:50 2017 New Revision: 313312 URL: https://svnweb.freebsd.org/changeset/base/313312 Log: [iwm] Use chipset configuration structs like iwlwifi does. * This makes it a bit easier to factor out common parts for e.g. the 7000 chipset family. * Add iwm7265d config, and recognize the 7265D chipset variant via the hardware revision. Tested: * 7260, STA mode (2ghz) Obtained from: Dragonflybsd commit cc8d6ccf5583fd45964f3bde9b057ee4f834c0e0 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 03:06:11 2017 (r313311) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 03:29:50 2017 (r313312) @@ -165,6 +165,67 @@ __FBSDID("$FreeBSD$"); #include #include +#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 +#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 + +/* lower blocks contain EEPROM image and calibration data */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */ +#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ + +#define IWM7260_FW "iwm7260fw" +#define IWM3160_FW "iwm3160fw" +#define IWM7265_FW "iwm7265fw" +#define IWM7265D_FW "iwm7265Dfw" +#define IWM8000_FW "iwm8000Cfw" + +#define IWM_DEVICE_7000_COMMON \ + .device_family = IWM_DEVICE_FAMILY_7000, \ + .eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000, \ + .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000 + +const struct iwm_cfg iwm7260_cfg = { + .fw_name = IWM7260_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 1, +}; + +const struct iwm_cfg iwm3160_cfg = { + .fw_name = IWM3160_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 1, +}; + +const struct iwm_cfg iwm3165_cfg = { + /* XXX IWM7265D_FW doesn't seem to work properly yet */ + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +const struct iwm_cfg iwm7265_cfg = { + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +const struct iwm_cfg iwm7265d_cfg = { + /* XXX IWM7265D_FW doesn't seem to work properly yet */ + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +#define IWM_DEVICE_8000_COMMON \ + .device_family = IWM_DEVICE_FAMILY_8000, \ + .eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000, \ + .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_8000 + +const struct iwm_cfg iwm8260_cfg = { + .fw_name = IWM8000_FW, + IWM_DEVICE_8000_COMMON, + .host_interrupt_operation_mode = 0, +}; + const uint8_t iwm_nvm_channels[] = { /* 2.4 GHz */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, @@ -512,12 +573,12 @@ iwm_read_firmware(struct iwm_softc *sc, * fw_fp will be set. */ IWM_UNLOCK(sc); - fwp = firmware_get(sc->sc_fwname); + fwp = firmware_get(sc->cfg->fw_name); IWM_LOCK(sc); if (fwp == NULL) { device_printf(sc->sc_dev, "could not read firmware %s (error %d)\n", - sc->sc_fwname, error); + sc->cfg->fw_name, error); goto out; } fw->fw_fp = fwp; @@ -536,7 +597,7 @@ iwm_read_firmware(struct iwm_softc *sc, if (*(const uint32_t *)fw->fw_fp->data != 0 || le32toh(uhdr->magic) != IWM_TLV_UCODE_MAGIC) { device_printf(sc->sc_dev, "invalid firmware %s\n", - sc->sc_fwname); + sc->cfg->fw_name); error = EINVAL; goto out; } @@ -1370,7 +1431,7 @@ iwm_mvm_nic_config(struct iwm_softc *sc) * (PCIe power is lost before PERST# is asserted), causing ME FW * to lose ownership and not being able to obtain it back. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { iwm_set_bits_mask_prph(sc, IWM_APMG_PS_CTRL_REG, IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, ~IWM_APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); @@ -1416,7 +1477,7 @@ iwm_nic_rx_init(struct iwm_softc *sc) IWM_WRITE_1(sc, IWM_CSR_INT_COALESCING, IWM_HOST_INT_TIMEOUT_DEF); /* W/A for interrupt coalescing bug in 7260 and 3160 */ - if (sc->host_interrupt_operation_mode) + if (sc->cfg->host_interrupt_operation_mode) IWM_SETBITS(sc, IWM_CSR_INT_COALESCING, IWM_HOST_INT_OPER_MODE); /* @@ -1473,7 +1534,7 @@ iwm_nic_init(struct iwm_softc *sc) int error; iwm_apm_init(sc); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) iwm_set_pwr(sc); iwm_mvm_nic_config(sc); @@ -1633,7 +1694,7 @@ iwm_post_alive(struct iwm_softc *sc) IWM_FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); /* Enable L1-Active */ - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { iwm_clear_bits_prph(sc, IWM_APMG_PCIDEV_STT_REG, IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS); } @@ -1649,9 +1710,6 @@ iwm_post_alive(struct iwm_softc *sc) * iwlwifi/mvm/nvm.c */ -#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 -#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 - /* Default NVM size to read */ #define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) @@ -1777,7 +1835,7 @@ iwm_nvm_read_section(struct iwm_softc *s while (seglen == length) { /* Check no memory assumptions fail and cause an overflow */ if ((size_read + offset + length) > - sc->eeprom_size) { + sc->cfg->eeprom_size) { device_printf(sc->sc_dev, "EEPROM size is too small for NVM\n"); return ENOBUFS; @@ -1899,10 +1957,6 @@ enum iwm_nvm_channel_flags { IWM_NVM_CHANNEL_160MHZ = (1 << 11), }; -/* lower blocks contain EEPROM image and calibration data */ -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */ -#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */ - /* * Translate EEPROM flags to net80211. */ @@ -1938,7 +1992,7 @@ iwm_add_channel_band(struct iwm_softc *s for (; ch_idx < ch_num; ch_idx++) { ch_flags = le16_to_cpup(nvm_ch_flags + ch_idx); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) ieee = iwm_nvm_channels[ch_idx]; else ieee = iwm_nvm_channels_8000[ch_idx]; @@ -1988,7 +2042,7 @@ iwm_init_channel_map(struct ieee80211com IWM_NUM_2GHZ_CHANNELS - 1, IWM_NUM_2GHZ_CHANNELS, bands); if (data->sku_cap_band_52GHz_enable) { - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) ch_num = nitems(iwm_nvm_channels); else ch_num = nitems(iwm_nvm_channels_8000); @@ -2062,7 +2116,7 @@ static int iwm_get_sku(const struct iwm_softc *sc, const uint16_t *nvm_sw, const uint16_t *phy_sku) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_SKU); return le32_to_cpup((const uint32_t *)(phy_sku + IWM_SKU_8000)); @@ -2071,7 +2125,7 @@ iwm_get_sku(const struct iwm_softc *sc, static int iwm_get_nvm_version(const struct iwm_softc *sc, const uint16_t *nvm_sw) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_NVM_VERSION); else return le32_to_cpup((const uint32_t *)(nvm_sw + @@ -2082,7 +2136,7 @@ static int iwm_get_radio_cfg(const struct iwm_softc *sc, const uint16_t *nvm_sw, const uint16_t *phy_sku) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_RADIO_CFG); return le32_to_cpup((const uint32_t *)(phy_sku + IWM_RADIO_CFG_8000)); @@ -2093,7 +2147,7 @@ iwm_get_n_hw_addrs(const struct iwm_soft { int n_hw_addr; - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) return le16_to_cpup(nvm_sw + IWM_N_HW_ADDRS); n_hw_addr = le32_to_cpup((const uint32_t *)(nvm_sw + IWM_N_HW_ADDRS_8000)); @@ -2105,7 +2159,7 @@ static void iwm_set_radio_cfg(const struct iwm_softc *sc, struct iwm_nvm_data *data, uint32_t radio_cfg) { - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { data->radio_cfg_type = IWM_NVM_RF_CFG_TYPE_MSK(radio_cfg); data->radio_cfg_step = IWM_NVM_RF_CFG_STEP_MSK(radio_cfg); data->radio_cfg_dash = IWM_NVM_RF_CFG_DASH_MSK(radio_cfg); @@ -2131,7 +2185,7 @@ iwm_set_hw_address(struct iwm_softc *sc, iwm_set_hw_address_from_csr(sc, data); } else #endif - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { const uint8_t *hw_addr = (const uint8_t *)(nvm_hw + IWM_HW_ADDR); /* The byte order is little endian 16 bit, meaning 214365 */ @@ -2162,7 +2216,7 @@ iwm_parse_nvm_data(struct iwm_softc *sc, struct iwm_nvm_data *data; uint32_t sku, radio_cfg; - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { data = malloc(sizeof(*data) + IWM_NUM_CHANNELS * sizeof(uint16_t), M_DEVBUF, M_NOWAIT | M_ZERO); @@ -2192,7 +2246,7 @@ iwm_parse_nvm_data(struct iwm_softc *sc, return NULL; } - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { memcpy(data->nvm_ch_flags, &nvm_sw[IWM_NVM_CHANNELS], IWM_NUM_CHANNELS * sizeof(uint16_t)); } else { @@ -2216,14 +2270,14 @@ iwm_parse_nvm_sections(struct iwm_softc const uint16_t *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; /* Checking for required sections */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { if (!sections[IWM_NVM_SECTION_TYPE_SW].data || - !sections[sc->nvm_hw_section_num].data) { + !sections[sc->cfg->nvm_hw_section_num].data) { device_printf(sc->sc_dev, "Can't parse empty OTP/NVM sections\n"); return NULL; } - } else if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + } else if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { /* SW and REGULATORY sections are mandatory */ if (!sections[IWM_NVM_SECTION_TYPE_SW].data || !sections[IWM_NVM_SECTION_TYPE_REGULATORY].data) { @@ -2232,7 +2286,7 @@ iwm_parse_nvm_sections(struct iwm_softc return NULL; } /* MAC_OVERRIDE or at least HW section must exist */ - if (!sections[sc->nvm_hw_section_num].data && + if (!sections[sc->cfg->nvm_hw_section_num].data && !sections[IWM_NVM_SECTION_TYPE_MAC_OVERRIDE].data) { device_printf(sc->sc_dev, "Can't parse mac_address, empty sections\n"); @@ -2246,10 +2300,10 @@ iwm_parse_nvm_sections(struct iwm_softc return NULL; } } else { - panic("unknown device family %d\n", sc->sc_device_family); + panic("unknown device family %d\n", sc->cfg->device_family); } - hw = (const uint16_t *) sections[sc->nvm_hw_section_num].data; + hw = (const uint16_t *) sections[sc->cfg->nvm_hw_section_num].data; sw = (const uint16_t *)sections[IWM_NVM_SECTION_TYPE_SW].data; calib = (const uint16_t *) sections[IWM_NVM_SECTION_TYPE_CALIBRATION].data; @@ -2274,14 +2328,14 @@ iwm_nvm_init(struct iwm_softc *sc) memset(nvm_sections, 0, sizeof(nvm_sections)); - if (sc->nvm_hw_section_num >= IWM_NVM_MAX_NUM_SECTIONS) + if (sc->cfg->nvm_hw_section_num >= IWM_NVM_MAX_NUM_SECTIONS) return EINVAL; /* load NVM values from nic */ /* Read From FW NVM */ IWM_DPRINTF(sc, IWM_DEBUG_EEPROM, "Read from NVM\n"); - nvm_buffer = malloc(sc->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO); + nvm_buffer = malloc(sc->cfg->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO); if (!nvm_buffer) return ENOMEM; for (section = 0; section < IWM_NVM_MAX_NUM_SECTIONS; section++) { @@ -2562,7 +2616,7 @@ iwm_load_firmware(struct iwm_softc *sc, { int error, w; - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) error = iwm_load_firmware_8000(sc, ucode_type); else error = iwm_load_firmware_7000(sc, ucode_type); @@ -2575,7 +2629,7 @@ iwm_load_firmware(struct iwm_softc *sc, } if (error || !sc->sc_uc.uc_ok) { device_printf(sc->sc_dev, "could not load firmware\n"); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { device_printf(sc->sc_dev, "cpu1 status: 0x%x\n", iwm_read_prph(sc, IWM_SB_CPU_1_STATUS)); device_printf(sc->sc_dev, "cpu2 status: 0x%x\n", @@ -4498,7 +4552,7 @@ iwm_mvm_sf_config(struct iwm_softc *sc, }; int ret = 0; - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) sf_cmd.state |= htole32(IWM_SF_CFG_DUMMY_NOTIF_OFF); switch (new_state) { @@ -4686,7 +4740,7 @@ iwm_init_hw(struct iwm_softc *sc) } /* Initialize tx backoffs to the minimum. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) iwm_mvm_tt_tx_backoff(sc, 0); error = iwm_mvm_power_update_device(sc); @@ -5682,51 +5736,30 @@ iwm_dev_check(device_t dev) sc = device_get_softc(dev); - sc->sc_hw_rev = IWM_READ(sc, IWM_CSR_HW_REV); switch (pci_get_device(dev)) { case PCI_PRODUCT_INTEL_WL_3160_1: case PCI_PRODUCT_INTEL_WL_3160_2: - sc->sc_fwname = "iwm3160fw"; - sc->host_interrupt_operation_mode = 1; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm3160_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_3165_1: case PCI_PRODUCT_INTEL_WL_3165_2: - sc->sc_fwname = "iwm7265fw"; - sc->host_interrupt_operation_mode = 0; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm3165_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_7260_1: case PCI_PRODUCT_INTEL_WL_7260_2: - sc->sc_fwname = "iwm7260fw"; - sc->host_interrupt_operation_mode = 1; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm7260_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_7265_1: case PCI_PRODUCT_INTEL_WL_7265_2: - sc->sc_fwname = "iwm7265fw"; - sc->host_interrupt_operation_mode = 0; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000; - sc->sc_device_family = IWM_DEVICE_FAMILY_7000; + sc->cfg = &iwm7265_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; return (0); case PCI_PRODUCT_INTEL_WL_8260_1: case PCI_PRODUCT_INTEL_WL_8260_2: - sc->sc_fwname = "iwm8000Cfw"; - sc->host_interrupt_operation_mode = 0; - sc->eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000; - sc->nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_8000; - sc->sc_device_family = IWM_DEVICE_FAMILY_8000; + sc->cfg = &iwm8260_cfg; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; return (0); default: @@ -5842,16 +5875,14 @@ iwm_attach(device_t dev) if (error != 0) goto fail; - /* - * We now start fiddling with the hardware - */ + sc->sc_hw_rev = IWM_READ(sc, IWM_CSR_HW_REV); /* * In the 8000 HW family the format of the 4 bytes of CSR_HW_REV have * changed, and now the revision step also includes bit 0-1 (no more * "dash" value). To keep hw_rev backwards compatible - we'll store it * in the old format. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) sc->sc_hw_rev = (sc->sc_hw_rev & 0xfff0) | (IWM_CSR_HW_REV_STEP(sc->sc_hw_rev << 2) << 2); @@ -5860,7 +5891,7 @@ iwm_attach(device_t dev) goto fail; } - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { int ret; uint32_t hw_step; @@ -5898,6 +5929,12 @@ iwm_attach(device_t dev) } } + /* special-case 7265D, it has the same PCI IDs. */ + if (sc->cfg == &iwm7265_cfg && + (sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK) == IWM_CSR_HW_REV_TYPE_7265D) { + sc->cfg = &iwm7265d_cfg; + } + /* Allocate DMA memory for firmware transfers. */ if ((error = iwm_alloc_fwmem(sc)) != 0) { device_printf(dev, "could not allocate memory for firmware\n"); Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Mon Feb 6 03:06:11 2017 (r313311) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Mon Feb 6 03:29:50 2017 (r313312) @@ -256,7 +256,7 @@ iwm_nic_lock(struct iwm_softc *sc) IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) DELAY(2); if (iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, @@ -425,7 +425,7 @@ iwm_apm_init(struct iwm_softc *sc) IWM_DPRINTF(sc, IWM_DEBUG_RESET, "iwm apm start\n"); /* Disable L0S exit timer (platform NMI Work/Around) */ - if (sc->sc_device_family != IWM_DEVICE_FAMILY_8000) { + if (sc->cfg->device_family != IWM_DEVICE_FAMILY_8000) { IWM_SETBITS(sc, IWM_CSR_GIO_CHICKEN_BITS, IWM_CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); } @@ -476,7 +476,7 @@ iwm_apm_init(struct iwm_softc *sc) goto out; } - if (sc->host_interrupt_operation_mode) { + if (sc->cfg->host_interrupt_operation_mode) { /* * This is a bit of an abuse - This is needed for 7260 / 3160 * only check host_interrupt_operation_mode even if this is @@ -505,7 +505,7 @@ iwm_apm_init(struct iwm_softc *sc) * do not disable clocks. This preserves any hardware bits already * set by default in "CLK_CTRL_REG" after reset. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000) { + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); DELAY(20); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 03:06:11 2017 (r313311) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 03:29:50 2017 (r313312) @@ -362,6 +362,27 @@ struct iwm_node { #define IWM_ICT_COUNT (IWM_ICT_SIZE / sizeof (uint32_t)) #define IWM_ICT_PADDR_SHIFT 12 +enum iwm_device_family { + IWM_DEVICE_FAMILY_UNDEFINED, + IWM_DEVICE_FAMILY_7000, + IWM_DEVICE_FAMILY_8000, +}; + +/** + * struct iwm_cfg + * @fw_name: Firmware filename. + * @host_interrupt_operation_mode: device needs host interrupt operation + * mode set + * @nvm_hw_section_num: the ID of the HW NVM section + */ +struct iwm_cfg { + const char *fw_name; + uint16_t eeprom_size; + enum iwm_device_family device_family; + int host_interrupt_operation_mode; + uint8_t nvm_hw_section_num; +}; + struct iwm_softc { device_t sc_dev; uint32_t sc_debug; @@ -411,9 +432,6 @@ struct iwm_softc { int sc_hw_rev; int sc_hw_id; - int sc_device_family; -#define IWM_DEVICE_FAMILY_7000 1 -#define IWM_DEVICE_FAMILY_8000 2 struct iwm_dma_info kw_dma; struct iwm_dma_info fw_dma; @@ -445,12 +463,12 @@ struct iwm_softc { */ int sc_generation; - const char *sc_fwname; bus_size_t sc_fwdmasegsz; struct iwm_fw_info sc_fw; int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; + const struct iwm_cfg *cfg; struct iwm_nvm_data *nvm_data; struct iwm_phy_db *sc_phy_db; @@ -481,17 +499,12 @@ struct iwm_softc { struct iwm_notif_statistics sc_stats; int sc_noise; - int host_interrupt_operation_mode; - caddr_t sc_drvbpf; struct iwm_rx_radiotap_header sc_rxtap; struct iwm_tx_radiotap_header sc_txtap; int sc_max_rssi; - - uint16_t eeprom_size; - uint8_t nvm_hw_section_num; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-all@freebsd.org Mon Feb 6 05:03:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 377C2CD263F; Mon, 6 Feb 2017 05:03:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 047681C40; Mon, 6 Feb 2017 05:03:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1653gds074640; Mon, 6 Feb 2017 05:03:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1653fLN074634; Mon, 6 Feb 2017 05:03:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060503.v1653fLN074634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313314 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:03:43 -0000 Author: adrian Date: Mon Feb 6 05:03:41 2017 New Revision: 313314 URL: https://svnweb.freebsd.org/changeset/base/313314 Log: [iwm] Sync valid_tx_ant and valid_rx_ant mask handling with iwlwifi. * This fixes the phy_cfg field sent in the iwm_send_phy_cfg_cmd() command, which wasn't taking into account the valid_rx_ant and valid_tx_ant masks from nvm_data before. Tested: * 7260, STA mode, 2G and 5G Obtained from: DragonflyBSD commit cbb82693c18fd71b4eb86855b82d03995f352d65 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:03:41 2017 (r313314) @@ -771,8 +771,14 @@ iwm_read_firmware(struct iwm_softc *sc, (int) tlv_len); goto parse_out; } - sc->sc_fw_phy_config = + sc->sc_fw.phy_config = le32toh(*(const uint32_t *)tlv_data); + sc->sc_fw.valid_tx_ant = (sc->sc_fw.phy_config & + IWM_FW_PHY_CFG_TX_CHAIN) >> + IWM_FW_PHY_CFG_TX_CHAIN_POS; + sc->sc_fw.valid_rx_ant = (sc->sc_fw.phy_config & + IWM_FW_PHY_CFG_RX_CHAIN) >> + IWM_FW_PHY_CFG_RX_CHAIN_POS; break; case IWM_UCODE_TLV_API_CHANGES_SET: { @@ -1401,12 +1407,13 @@ iwm_mvm_nic_config(struct iwm_softc *sc) { uint8_t radio_cfg_type, radio_cfg_step, radio_cfg_dash; uint32_t reg_val = 0; + uint32_t phy_config = iwm_mvm_get_phy_config(sc); - radio_cfg_type = (sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RADIO_TYPE) >> + radio_cfg_type = (phy_config & IWM_FW_PHY_CFG_RADIO_TYPE) >> IWM_FW_PHY_CFG_RADIO_TYPE_POS; - radio_cfg_step = (sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RADIO_STEP) >> + radio_cfg_step = (phy_config & IWM_FW_PHY_CFG_RADIO_STEP) >> IWM_FW_PHY_CFG_RADIO_STEP_POS; - radio_cfg_dash = (sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RADIO_DASH) >> + radio_cfg_dash = (phy_config & IWM_FW_PHY_CFG_RADIO_DASH) >> IWM_FW_PHY_CFG_RADIO_DASH_POS; /* SKU control */ @@ -2696,7 +2703,7 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *s enum iwm_ucode_type ucode_type = sc->sc_uc_current; /* Set parameters */ - phy_cfg_cmd.phy_cfg = htole32(sc->sc_fw_phy_config); + phy_cfg_cmd.phy_cfg = htole32(iwm_mvm_get_phy_config(sc)); phy_cfg_cmd.calib_control.event_trigger = sc->sc_default_calib[ucode_type].event_trigger; phy_cfg_cmd.calib_control.flow_trigger = @@ -2783,6 +2790,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc if (error != 0) return error; +#if 0 IWM_DPRINTF(sc, IWM_DEBUG_RESET, "%s: phy_txant=0x%08x, nvm_valid_tx_ant=0x%02x, valid=0x%02x\n", __func__, @@ -2790,10 +2798,11 @@ iwm_run_init_mvm_ucode(struct iwm_softc >> IWM_FW_PHY_CFG_TX_CHAIN_POS), sc->nvm_data->valid_tx_ant, iwm_fw_valid_tx_ant(sc)); - +#endif /* Send TX valid antennas before triggering calibrations */ - if ((error = iwm_send_tx_ant_cfg(sc, iwm_fw_valid_tx_ant(sc))) != 0) { + error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); + if (error != 0) { device_printf(sc->sc_dev, "failed to send antennas before calibration: %d\n", error); return error; @@ -4238,11 +4247,11 @@ iwm_setrates(struct iwm_softc *sc, struc #if 0 if (txant == 0) - txant = iwm_fw_valid_tx_ant(sc); + txant = iwm_mvm_get_valid_tx_ant(sc); nextant = 1<<(ffs(txant)-1); txant &= ~nextant; #else - nextant = iwm_fw_valid_tx_ant(sc); + nextant = iwm_mvm_get_valid_tx_ant(sc); #endif /* * Map the rate id into a rate index into @@ -4708,7 +4717,8 @@ iwm_init_hw(struct iwm_softc *sc) goto error; } - if ((error = iwm_send_tx_ant_cfg(sc, iwm_fw_valid_tx_ant(sc))) != 0) { + error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); + if (error != 0) { device_printf(sc->sc_dev, "antenna config failed\n"); goto error; } Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_ctxt.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_phy_ctxt.c Mon Feb 6 05:03:41 2017 (r313314) @@ -202,8 +202,8 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof ieee80211_chan2ieee(ic, chan), chains_static, chains_dynamic, - iwm_fw_valid_rx_ant(sc), - iwm_fw_valid_tx_ant(sc)); + iwm_mvm_get_valid_rx_ant(sc), + iwm_mvm_get_valid_tx_ant(sc)); cmd->ci.band = IEEE80211_IS_CHAN_2GHZ(chan) ? @@ -217,13 +217,13 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof idle_cnt = chains_static; active_cnt = chains_dynamic; - cmd->rxchain_info = htole32(iwm_fw_valid_rx_ant(sc) << + cmd->rxchain_info = htole32(iwm_mvm_get_valid_rx_ant(sc) << IWM_PHY_RX_CHAIN_VALID_POS); cmd->rxchain_info |= htole32(idle_cnt << IWM_PHY_RX_CHAIN_CNT_POS); cmd->rxchain_info |= htole32(active_cnt << IWM_PHY_RX_CHAIN_MIMO_CNT_POS); - cmd->txchain_info = htole32(iwm_fw_valid_tx_ant(sc)); + cmd->txchain_info = htole32(iwm_mvm_get_valid_tx_ant(sc)); } /* Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_scan.c Mon Feb 6 05:03:41 2017 (r313314) @@ -172,7 +172,7 @@ iwm_mvm_scan_rx_chain(struct iwm_softc * uint16_t rx_chain; uint8_t rx_ant; - rx_ant = iwm_fw_valid_rx_ant(sc); + rx_ant = iwm_mvm_get_valid_rx_ant(sc); rx_chain = rx_ant << IWM_PHY_RX_CHAIN_VALID_POS; rx_chain |= rx_ant << IWM_PHY_RX_CHAIN_FORCE_MIMO_SEL_POS; rx_chain |= rx_ant << IWM_PHY_RX_CHAIN_FORCE_SEL_POS; @@ -209,7 +209,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_sof for (i = 0, ind = sc->sc_scan_last_antenna; i < IWM_RATE_MCS_ANT_NUM; i++) { ind = (ind + 1) % IWM_RATE_MCS_ANT_NUM; - if (iwm_fw_valid_tx_ant(sc) & (1 << ind)) { + if (iwm_mvm_get_valid_tx_ant(sc) & (1 << ind)) { sc->sc_scan_last_antenna = ind; break; } @@ -469,8 +469,8 @@ iwm_mvm_config_umac_scan(struct iwm_soft if (scan_config == NULL) return ENOMEM; - scan_config->tx_chains = htole32(iwm_fw_valid_tx_ant(sc)); - scan_config->rx_chains = htole32(iwm_fw_valid_rx_ant(sc)); + scan_config->tx_chains = htole32(iwm_mvm_get_valid_tx_ant(sc)); + scan_config->rx_chains = htole32(iwm_mvm_get_valid_rx_ant(sc)); scan_config->legacy_rates = htole32(rates | IWM_SCAN_CONFIG_SUPPORTED_RATE(rates)); Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_util.c Mon Feb 6 05:03:41 2017 (r313314) @@ -428,31 +428,3 @@ iwm_free_resp(struct iwm_softc *sc, stru sc->sc_wantresp = -1; wakeup(&sc->sc_wantresp); } - -uint8_t -iwm_fw_valid_tx_ant(struct iwm_softc *sc) -{ - uint8_t tx_ant; - - tx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) - >> IWM_FW_PHY_CFG_TX_CHAIN_POS); - - if (sc->nvm_data->valid_tx_ant) - tx_ant &= sc->nvm_data->valid_tx_ant; - - return tx_ant; -} - -uint8_t -iwm_fw_valid_rx_ant(struct iwm_softc *sc) -{ - uint8_t rx_ant; - - rx_ant = ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_RX_CHAIN) - >> IWM_FW_PHY_CFG_RX_CHAIN_POS); - - if (sc->nvm_data->valid_rx_ant) - rx_ant &= sc->nvm_data->valid_rx_ant; - - return rx_ant; -} Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwm_util.h Mon Feb 6 05:03:41 2017 (r313314) @@ -116,7 +116,34 @@ extern int iwm_mvm_send_cmd_pdu_status(s uint16_t len, const void *data, uint32_t *status); extern void iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd); -extern uint8_t iwm_fw_valid_tx_ant(struct iwm_softc *sc); -extern uint8_t iwm_fw_valid_rx_ant(struct iwm_softc *sc); +static inline uint8_t +iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc) +{ + return sc->nvm_data && sc->nvm_data->valid_tx_ant ? + sc->sc_fw.valid_tx_ant & sc->nvm_data->valid_tx_ant : + sc->sc_fw.valid_tx_ant; +} + +static inline uint8_t +iwm_mvm_get_valid_rx_ant(struct iwm_softc *sc) +{ + return sc->nvm_data && sc->nvm_data->valid_rx_ant ? + sc->sc_fw.valid_rx_ant & sc->nvm_data->valid_rx_ant : + sc->sc_fw.valid_rx_ant; +} + +static inline uint32_t +iwm_mvm_get_phy_config(struct iwm_softc *sc) +{ + uint32_t phy_config = ~(IWM_FW_PHY_CFG_TX_CHAIN | + IWM_FW_PHY_CFG_RX_CHAIN); + uint32_t valid_rx_ant = iwm_mvm_get_valid_rx_ant(sc); + uint32_t valid_tx_ant = iwm_mvm_get_valid_tx_ant(sc); + + phy_config |= valid_tx_ant << IWM_FW_PHY_CFG_TX_CHAIN_POS | + valid_rx_ant << IWM_FW_PHY_CFG_RX_CHAIN_POS; + + return sc->sc_fw.phy_config & phy_config; +} #endif /* __IF_IWM_UTIL_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 04:30:18 2017 (r313313) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:03:41 2017 (r313314) @@ -172,6 +172,10 @@ struct iwm_fw_info { } fw_sect[IWM_UCODE_SECT_MAX]; int fw_count; } fw_sects[IWM_UCODE_TYPE_MAX]; + + uint32_t phy_config; + uint8_t valid_tx_ant; + uint8_t valid_rx_ant; }; struct iwm_nvm_data { @@ -465,7 +469,6 @@ struct iwm_softc { bus_size_t sc_fwdmasegsz; struct iwm_fw_info sc_fw; - int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; const struct iwm_cfg *cfg; From owner-svn-src-all@freebsd.org Mon Feb 6 05:07:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 069BACD271B; Mon, 6 Feb 2017 05:07:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B907C1DAE; Mon, 6 Feb 2017 05:07:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1657FrX074809; Mon, 6 Feb 2017 05:07:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1657Fa8074807; Mon, 6 Feb 2017 05:07:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060507.v1657Fa8074807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313315 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:07:17 -0000 Author: adrian Date: Mon Feb 6 05:07:15 2017 New Revision: 313315 URL: https://svnweb.freebsd.org/changeset/base/313315 Log: [iwm] Get rid of some gratuitous constant renaming wrt. Linux iwlwifi. * IWM_UCODE_SECT_MAX -> IWM_UCODE_SECTION_MAX * IWM_UCODE_TYPE_* -> IWM_UCODE_* (except for IWM_UCODE_TYPE_MAX which stays). Obtained from: DragonflyBSD commit ff4d1fc3ed002c9fb362423da6c45d711b65658a Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:03:41 2017 (r313314) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:07:15 2017 (r313315) @@ -490,7 +490,7 @@ iwm_firmware_store_section(struct iwm_so return EINVAL; fws = &sc->sc_fw.fw_sects[type]; - if (fws->fw_count >= IWM_UCODE_SECT_MAX) + if (fws->fw_count >= IWM_UCODE_SECTION_MAX) return EINVAL; fwone = &fws->fw_sect[fws->fw_count]; @@ -558,7 +558,7 @@ iwm_read_firmware(struct iwm_softc *sc, size_t len; if (fw->fw_status == IWM_FW_STATUS_DONE && - ucode_type != IWM_UCODE_TYPE_INIT) + ucode_type != IWM_UCODE_INIT) return 0; while (fw->fw_status == IWM_FW_STATUS_INPROGRESS) @@ -716,9 +716,9 @@ iwm_read_firmware(struct iwm_softc *sc, } case IWM_UCODE_TLV_SEC_RT: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_REGULAR, tlv_data, tlv_len)) != 0) { + IWM_UCODE_REGULAR, tlv_data, tlv_len)) != 0) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TYPE_REGULAR: iwm_firmware_store_section() failed; %d\n", + "%s: IWM_UCODE_REGULAR: iwm_firmware_store_section() failed; %d\n", __func__, error); goto parse_out; @@ -726,9 +726,9 @@ iwm_read_firmware(struct iwm_softc *sc, break; case IWM_UCODE_TLV_SEC_INIT: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_INIT, tlv_data, tlv_len)) != 0) { + IWM_UCODE_INIT, tlv_data, tlv_len)) != 0) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TYPE_INIT: iwm_firmware_store_section() failed; %d\n", + "%s: IWM_UCODE_INIT: iwm_firmware_store_section() failed; %d\n", __func__, error); goto parse_out; @@ -736,9 +736,9 @@ iwm_read_firmware(struct iwm_softc *sc, break; case IWM_UCODE_TLV_SEC_WOWLAN: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_WOW, tlv_data, tlv_len)) != 0) { + IWM_UCODE_WOWLAN, tlv_data, tlv_len)) != 0) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TYPE_WOW: iwm_firmware_store_section() failed; %d\n", + "%s: IWM_UCODE_WOWLAN: iwm_firmware_store_section() failed; %d\n", __func__, error); goto parse_out; @@ -829,7 +829,7 @@ iwm_read_firmware(struct iwm_softc *sc, case IWM_UCODE_TLV_SEC_RT_USNIFFER: if ((error = iwm_firmware_store_section(sc, - IWM_UCODE_TYPE_REGULAR_USNIFFER, tlv_data, + IWM_UCODE_REGULAR_USNIFFER, tlv_data, tlv_len)) != 0) goto parse_out; break; @@ -2492,7 +2492,7 @@ iwm_load_cpu_sections_8000(struct iwm_so (*first_ucode_section)++; } - for (i = *first_ucode_section; i < IWM_UCODE_SECT_MAX; i++) { + for (i = *first_ucode_section; i < IWM_UCODE_SECTION_MAX; i++) { last_read_idx = i; data = fws->fw_sect[i].fws_data; dlen = fws->fw_sect[i].fws_len; @@ -2764,7 +2764,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc sc->sc_init_complete = 0; if ((error = iwm_mvm_load_ucode_wait_alive(sc, - IWM_UCODE_TYPE_INIT)) != 0) { + IWM_UCODE_INIT)) != 0) { device_printf(sc->sc_dev, "failed to load init firmware\n"); return error; } @@ -4706,7 +4706,7 @@ iwm_init_hw(struct iwm_softc *sc) } /* omstart, this time with the regular firmware */ - error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_REGULAR); + error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_REGULAR); if (error) { device_printf(sc->sc_dev, "could not load firmware\n"); goto error; Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:03:41 2017 (r313314) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:07:15 2017 (r313315) @@ -137,7 +137,7 @@ struct iwm_tx_radiotap_header { (1 << IEEE80211_RADIOTAP_CHANNEL)) -#define IWM_UCODE_SECT_MAX 16 +#define IWM_UCODE_SECTION_MAX 16 #define IWM_FWDMASEGSZ (192*1024) #define IWM_FWDMASEGSZ_8000 (320*1024) /* sanity check value */ @@ -152,11 +152,21 @@ struct iwm_tx_radiotap_header { #define IWM_FW_STATUS_INPROGRESS 1 #define IWM_FW_STATUS_DONE 2 +/** + * enum iwm_ucode_type + * + * The type of ucode. + * + * @IWM_UCODE_REGULAR: Normal runtime ucode + * @IWM_UCODE_INIT: Initial ucode + * @IWM_UCODE_WOWLAN: Wake on Wireless enabled ucode + * @IWM_UCODE_REGULAR_USNIFFER: Normal runtime ucode when using usniffer image + */ enum iwm_ucode_type { - IWM_UCODE_TYPE_REGULAR, - IWM_UCODE_TYPE_INIT, - IWM_UCODE_TYPE_WOW, - IWM_UCODE_TYPE_REGULAR_USNIFFER, + IWM_UCODE_REGULAR, + IWM_UCODE_INIT, + IWM_UCODE_WOWLAN, + IWM_UCODE_REGULAR_USNIFFER, IWM_UCODE_TYPE_MAX }; @@ -169,7 +179,7 @@ struct iwm_fw_info { const void *fws_data; uint32_t fws_len; uint32_t fws_devoff; - } fw_sect[IWM_UCODE_SECT_MAX]; + } fw_sect[IWM_UCODE_SECTION_MAX]; int fw_count; } fw_sects[IWM_UCODE_TYPE_MAX]; From owner-svn-src-all@freebsd.org Mon Feb 6 05:08:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F04CD27A8; Mon, 6 Feb 2017 05:08:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00A991F09; Mon, 6 Feb 2017 05:08:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1658MME074891; Mon, 6 Feb 2017 05:08:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1658LtK074887; Mon, 6 Feb 2017 05:08:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060508.v1658LtK074887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313316 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:08:23 -0000 Author: adrian Date: Mon Feb 6 05:08:21 2017 New Revision: 313316 URL: https://svnweb.freebsd.org/changeset/base/313316 Log: [iwm] Store paging_mem_size field in firmware image information struct. Obtained from: DragonflyBSD commit a8524cc6c440e5ce9490ba2b0507c99ff6777c6d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:07:15 2017 (r313315) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:08:21 2017 (r313316) @@ -554,6 +554,8 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode_tlv_type tlv_type; const struct firmware *fwp; const uint8_t *data; + uint32_t usniffer_img; + uint32_t paging_mem_size; int error = 0; size_t len; @@ -834,6 +836,38 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; break; + case IWM_UCODE_TLV_PAGING: + if (tlv_len != sizeof(uint32_t)) { + error = EINVAL; + goto parse_out; + } + paging_mem_size = le32toh(*(const uint32_t *)tlv_data); + + IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, + "%s: Paging: paging enabled (size = %u bytes)\n", + __func__, paging_mem_size); + if (paging_mem_size > IWM_MAX_PAGING_IMAGE_SIZE) { + device_printf(sc->sc_dev, + "%s: Paging: driver supports up to %u bytes for paging image\n", + __func__, IWM_MAX_PAGING_IMAGE_SIZE); + error = EINVAL; + goto out; + } + if (paging_mem_size & (IWM_FW_PAGING_SIZE - 1)) { + device_printf(sc->sc_dev, + "%s: Paging: image isn't multiple %u\n", + __func__, IWM_FW_PAGING_SIZE); + error = EINVAL; + goto out; + } + + sc->sc_fw.fw_sects[IWM_UCODE_REGULAR].paging_mem_size = + paging_mem_size; + usniffer_img = IWM_UCODE_REGULAR_USNIFFER; + sc->sc_fw.fw_sects[usniffer_img].paging_mem_size = + paging_mem_size; + break; + case IWM_UCODE_TLV_N_SCAN_CHANNELS: if (tlv_len != sizeof(uint32_t)) { error = EINVAL; Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 05:07:15 2017 (r313315) +++ head/sys/dev/iwm/if_iwmreg.h Mon Feb 6 05:08:21 2017 (r313316) @@ -888,6 +888,28 @@ struct iwm_fw_cipher_scheme { uint8_t hw_cipher; } __packed; +/* + * Block paging calculations + */ +#define IWM_PAGE_2_EXP_SIZE 12 /* 4K == 2^12 */ +#define IWM_FW_PAGING_SIZE (1 << IWM_PAGE_2_EXP_SIZE) /* page size is 4KB */ +#define IWM_PAGE_PER_GROUP_2_EXP_SIZE 3 +/* 8 pages per group */ +#define IWM_NUM_OF_PAGE_PER_GROUP (1 << IWM_PAGE_PER_GROUP_2_EXP_SIZE) +/* don't change, support only 32KB size */ +#define IWM_PAGING_BLOCK_SIZE (IWM_NUM_OF_PAGE_PER_GROUP * IWM_FW_PAGING_SIZE) +/* 32K == 2^15 */ +#define IWM_BLOCK_2_EXP_SIZE (IWM_PAGE_2_EXP_SIZE + IWM_PAGE_PER_GROUP_2_EXP_SIZE) + +/* + * Image paging calculations + */ +#define IWM_BLOCK_PER_IMAGE_2_EXP_SIZE 5 +/* 2^5 == 32 blocks per image */ +#define IWM_NUM_OF_BLOCK_PER_IMAGE (1 << IWM_BLOCK_PER_IMAGE_2_EXP_SIZE) +/* maximum image size 1024KB */ +#define IWM_MAX_PAGING_IMAGE_SIZE (IWM_NUM_OF_BLOCK_PER_IMAGE * IWM_PAGING_BLOCK_SIZE) + /** * struct iwm_fw_cscheme_list - a cipher scheme list * @size: a number of entries Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:07:15 2017 (r313315) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:08:21 2017 (r313316) @@ -181,6 +181,7 @@ struct iwm_fw_info { uint32_t fws_devoff; } fw_sect[IWM_UCODE_SECTION_MAX]; int fw_count; + uint32_t paging_mem_size; } fw_sects[IWM_UCODE_TYPE_MAX]; uint32_t phy_config; From owner-svn-src-all@freebsd.org Mon Feb 6 05:09:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27F71CD281C; Mon, 6 Feb 2017 05:09:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3785B6; Mon, 6 Feb 2017 05:09:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1659gC1074977; Mon, 6 Feb 2017 05:09:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1659g61074974; Mon, 6 Feb 2017 05:09:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060509.v1659g61074974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313317 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:09:44 -0000 Author: adrian Date: Mon Feb 6 05:09:42 2017 New Revision: 313317 URL: https://svnweb.freebsd.org/changeset/base/313317 Log: [iwm] Change 2nd arg of iwm_phy_db_set_section() to struct iwm_rx_packet. * This matches the function declaration in Linux's iwlwifi. Obtained from: DragonflyBSD commit de7995a5e0ebf2d0016a87a0142a98c75db58fb4 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_phy_db.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:08:21 2017 (r313316) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:09:42 2017 (r313317) @@ -5383,13 +5383,9 @@ iwm_notif_intr(struct iwm_softc *sc) wakeup(&sc->sc_uc); break; } - case IWM_CALIB_RES_NOTIF_PHY_DB: { - struct iwm_calib_res_notif_phy_db *phy_db_notif; - phy_db_notif = (void *)pkt->data; - - iwm_phy_db_set_section(sc->sc_phy_db, phy_db_notif); - - break; } + case IWM_CALIB_RES_NOTIF_PHY_DB: + iwm_phy_db_set_section(sc->sc_phy_db, pkt); + break; case IWM_STATISTICS_NOTIFICATION: { struct iwm_notif_statistics *stats; Modified: head/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 05:08:21 2017 (r313316) +++ head/sys/dev/iwm/if_iwm_phy_db.c Mon Feb 6 05:09:42 2017 (r313317) @@ -310,8 +310,10 @@ iwm_phy_db_free(struct iwm_phy_db *phy_d int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, - struct iwm_calib_res_notif_phy_db *phy_db_notif) + struct iwm_rx_packet *pkt) { + struct iwm_calib_res_notif_phy_db *phy_db_notif = + (struct iwm_calib_res_notif_phy_db *)pkt->data; enum iwm_phy_db_section_type type = le16toh(phy_db_notif->type); uint16_t size = le16toh(phy_db_notif->length); struct iwm_phy_db_entry *entry; Modified: head/sys/dev/iwm/if_iwm_phy_db.h ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 05:08:21 2017 (r313316) +++ head/sys/dev/iwm/if_iwm_phy_db.h Mon Feb 6 05:09:42 2017 (r313317) @@ -111,7 +111,7 @@ struct iwm_calib_res_notif_phy_db; extern struct iwm_phy_db *iwm_phy_db_init(struct iwm_softc *sc); extern void iwm_phy_db_free(struct iwm_phy_db *phy_db); extern int iwm_phy_db_set_section(struct iwm_phy_db *phy_db, - struct iwm_calib_res_notif_phy_db *phy_db_notif); + struct iwm_rx_packet *pkt); extern int iwm_send_phy_db_data(struct iwm_phy_db *phy_db); #endif /* __IF_IWM_PHY_DB_H__ */ From owner-svn-src-all@freebsd.org Mon Feb 6 05:19:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46310CD2AF6; Mon, 6 Feb 2017 05:19:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D4B7D8; Mon, 6 Feb 2017 05:19:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165JUpW078893; Mon, 6 Feb 2017 05:19:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165JU1e078891; Mon, 6 Feb 2017 05:19:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702060519.v165JU1e078891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 6 Feb 2017 05:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313318 - in head: share/man/man4 sys/dev/cxgbe 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:19:31 -0000 Author: np Date: Mon Feb 6 05:19:29 2017 New Revision: 313318 URL: https://svnweb.freebsd.org/changeset/base/313318 Log: cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/t4_main.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Mon Feb 6 05:09:42 2017 (r313317) +++ head/share/man/man4/cxgbe.4 Mon Feb 6 05:19:29 2017 (r313318) @@ -167,6 +167,10 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +There are multiple tunables that control the number of queues of various +types. +A negative value for such a tunable instructs the driver to create +up to that many queues if there are enough CPU cores available. .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g Number of tx queues used for a 10Gb or higher-speed port. Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Feb 6 05:09:42 2017 (r313317) +++ head/sys/dev/cxgbe/t4_main.c Mon Feb 6 05:19:29 2017 (r313318) @@ -232,8 +232,8 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables. See tweak_tunables() too. * * Each tunable is set to a default value here if it's known at compile-time. - * Otherwise it is set to -1 as an indication to tweak_tunables() that it should - * provide a reasonable default when the driver is loaded. + * Otherwise it is set to -n as an indication to tweak_tunables() that it should + * provide a reasonable default (upto n) when the driver is loaded. * * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. @@ -243,27 +243,27 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Number of queues for tx and rx, 10G and 1G, NIC and offload. */ #define NTXQ_10G 16 -int t4_ntxq10g = -1; +int t4_ntxq10g = -NTXQ_10G; TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); #define NRXQ_10G 8 -int t4_nrxq10g = -1; +int t4_nrxq10g = -NRXQ_10G; TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); #define NTXQ_1G 4 -int t4_ntxq1g = -1; +int t4_ntxq1g = -NTXQ_1G; TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); #define NRXQ_1G 2 -int t4_nrxq1g = -1; +int t4_nrxq1g = -NRXQ_1G; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); #define NTXQ_VI 1 -static int t4_ntxq_vi = -1; +static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); #define NRXQ_VI 1 -static int t4_nrxq_vi = -1; +static int t4_nrxq_vi = -NRXQ_VI; TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); static int t4_rsrv_noflowq = 0; @@ -271,37 +271,37 @@ TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4 #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -1; +static int t4_nofldtxq10g = -NOFLDTXQ_10G; TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); #define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -1; +static int t4_nofldrxq10g = -NOFLDRXQ_10G; TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); #define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -1; +static int t4_nofldtxq1g = -NOFLDTXQ_1G; TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); #define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -1; +static int t4_nofldrxq1g = -NOFLDRXQ_1G; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #define NOFLDTXQ_VI 1 -static int t4_nofldtxq_vi = -1; +static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 -static int t4_nofldrxq_vi = -1; +static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 -static int t4_nnmtxq_vi = -1; +static int t4_nnmtxq_vi = -NNMTXQ_VI; TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); #define NNMRXQ_VI 2 -static int t4_nnmrxq_vi = -1; +static int t4_nnmrxq_vi = -NNMRXQ_VI; TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif @@ -9532,6 +9532,22 @@ uld_active(struct adapter *sc, int uld_i #endif /* + * t = ptr to tunable. + * nc = number of CPUs. + * c = compiled in default for that tunable. + */ +static void +calculate_nqueues(int *t, int nc, const int c) +{ + int nq; + + if (*t > 0) + return; + nq = *t < 0 ? -*t : c; + *t = min(nc, nq); +} + +/* * Come up with reasonable defaults for some of the tunables, provided they're * not set by the user (in which case we'll use the values as is). */ @@ -9544,7 +9560,7 @@ tweak_tunables(void) #ifdef RSS t4_ntxq10g = rss_getnumbuckets(); #else - t4_ntxq10g = min(nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); #endif } @@ -9553,18 +9569,17 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_ntxq1g = rss_getnumbuckets(); #else - t4_ntxq1g = min(nc, NTXQ_1G); + calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); #endif } - if (t4_ntxq_vi < 1) - t4_ntxq_vi = min(nc, NTXQ_VI); + calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); if (t4_nrxq10g < 1) { #ifdef RSS t4_nrxq10g = rss_getnumbuckets(); #else - t4_nrxq10g = min(nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); #endif } @@ -9573,31 +9588,19 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_nrxq1g = rss_getnumbuckets(); #else - t4_nrxq1g = min(nc, NRXQ_1G); + calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); #endif } - if (t4_nrxq_vi < 1) - t4_nrxq_vi = min(nc, NRXQ_VI); + calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - if (t4_nofldtxq10g < 1) - t4_nofldtxq10g = min(nc, NOFLDTXQ_10G); - - if (t4_nofldtxq1g < 1) - t4_nofldtxq1g = min(nc, NOFLDTXQ_1G); - - if (t4_nofldtxq_vi < 1) - t4_nofldtxq_vi = min(nc, NOFLDTXQ_VI); - - if (t4_nofldrxq10g < 1) - t4_nofldrxq10g = min(nc, NOFLDRXQ_10G); - - if (t4_nofldrxq1g < 1) - t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); - - if (t4_nofldrxq_vi < 1) - t4_nofldrxq_vi = min(nc, NOFLDRXQ_VI); + calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); + calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); + calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); + calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; @@ -9624,11 +9627,8 @@ tweak_tunables(void) #endif #ifdef DEV_NETMAP - if (t4_nnmtxq_vi < 1) - t4_nnmtxq_vi = min(nc, NNMTXQ_VI); - - if (t4_nnmrxq_vi < 1) - t4_nnmrxq_vi = min(nc, NNMRXQ_VI); + calculate_nqueues(&t4_nnmtxq_vi, nc, NNMTXQ_VI); + calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-all@freebsd.org Mon Feb 6 05:22:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99515CD2CB3; Mon, 6 Feb 2017 05:22:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6865FBA5; Mon, 6 Feb 2017 05:22:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165Mton082860; Mon, 6 Feb 2017 05:22:55 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165Mt5a082859; Mon, 6 Feb 2017 05:22:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702060522.v165Mt5a082859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Feb 2017 05:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313319 - stable/11/usr.bin/mail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:22:56 -0000 Author: delphij Date: Mon Feb 6 05:22:55 2017 New Revision: 313319 URL: https://svnweb.freebsd.org/changeset/base/313319 Log: MFC r312664: Always initialize 'c'. Modified: stable/11/usr.bin/mail/send.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/send.c ============================================================================== --- stable/11/usr.bin/mail/send.c Mon Feb 6 05:19:29 2017 (r313318) +++ stable/11/usr.bin/mail/send.c Mon Feb 6 05:22:55 2017 (r313319) @@ -59,7 +59,7 @@ sendmessage(struct message *mp, FILE *ob FILE *ibuf; char *cp, *cp2, line[LINESIZE]; int ishead, infld, ignoring, dostat, firstline; - int c, length, prefixlen; + int c = 0, length, prefixlen; /* * Compute the prefix string, without trailing whitespace From owner-svn-src-all@freebsd.org Mon Feb 6 05:24:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 366CBCD2D49; Mon, 6 Feb 2017 05:24:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 030A3CDA; Mon, 6 Feb 2017 05:24:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165OIxh082954; Mon, 6 Feb 2017 05:24:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165OIBC082953; Mon, 6 Feb 2017 05:24:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702060524.v165OIBC082953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Feb 2017 05:24:18 +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: r313320 - stable/10/usr.bin/mail 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:24:19 -0000 Author: delphij Date: Mon Feb 6 05:24:17 2017 New Revision: 313320 URL: https://svnweb.freebsd.org/changeset/base/313320 Log: MFC r312664: Always initialize 'c'. Modified: stable/10/usr.bin/mail/send.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mail/send.c ============================================================================== --- stable/10/usr.bin/mail/send.c Mon Feb 6 05:22:55 2017 (r313319) +++ stable/10/usr.bin/mail/send.c Mon Feb 6 05:24:17 2017 (r313320) @@ -59,7 +59,7 @@ sendmessage(struct message *mp, FILE *ob FILE *ibuf; char *cp, *cp2, line[LINESIZE]; int ishead, infld, ignoring, dostat, firstline; - int c, length, prefixlen; + int c = 0, length, prefixlen; /* * Compute the prefix string, without trailing whitespace From owner-svn-src-all@freebsd.org Mon Feb 6 05:27:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F0DCCD2DCF; Mon, 6 Feb 2017 05:27:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 570B5E1E; Mon, 6 Feb 2017 05:27:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165R5NV083149; Mon, 6 Feb 2017 05:27:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165R5LS083148; Mon, 6 Feb 2017 05:27:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702060527.v165R5LS083148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Feb 2017 05: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: r313321 - stable/10/usr.bin/sort 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:27:06 -0000 Author: pfg Date: Mon Feb 6 05:27:05 2017 New Revision: 313321 URL: https://svnweb.freebsd.org/changeset/base/313321 Log: MFC r312667: sort - Don't live-loop threads. Worker threads now use a pthread_cond_t to wait for work instead of burning the cpu up. Obtained from: DragonflyBSD (07774aea0ccf64a48fcfad8899e3bf7c8f18277a) Modified: stable/10/usr.bin/sort/radixsort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/radixsort.c ============================================================================== --- stable/10/usr.bin/sort/radixsort.c Mon Feb 6 05:24:17 2017 (r313320) +++ stable/10/usr.bin/sort/radixsort.c Mon Feb 6 05:27:05 2017 (r313321) @@ -83,12 +83,12 @@ static struct level_stack *g_ls; #if defined(SORT_THREADS) /* stack guarding mutex */ +static pthread_cond_t g_ls_cond; static pthread_mutex_t g_ls_mutex; /* counter: how many items are left */ static size_t sort_left; /* guarding mutex */ -static pthread_mutex_t sort_left_mutex; /* semaphore to count threads */ static sem_t mtsem; @@ -99,23 +99,25 @@ static sem_t mtsem; static inline void sort_left_dec(size_t n) { - - pthread_mutex_lock(&sort_left_mutex); + pthread_mutex_lock(&g_ls_mutex); sort_left -= n; - pthread_mutex_unlock(&sort_left_mutex); + if (sort_left == 0 && nthreads > 1) + pthread_cond_broadcast(&g_ls_cond); + pthread_mutex_unlock(&g_ls_mutex); } /* * Do we have something to sort ? + * + * This routine does not need to be locked. */ static inline bool have_sort_left(void) { bool ret; - pthread_mutex_lock(&sort_left_mutex); ret = (sort_left > 0); - pthread_mutex_unlock(&sort_left_mutex); + return (ret); } @@ -146,6 +148,11 @@ push_ls(struct sort_level* sl) #if defined(SORT_THREADS) if (nthreads > 1) + pthread_cond_signal(&g_ls_cond); +#endif + +#if defined(SORT_THREADS) + if (nthreads > 1) pthread_mutex_unlock(&g_ls_mutex); #endif } @@ -184,13 +191,19 @@ pop_ls_mt(void) pthread_mutex_lock(&g_ls_mutex); - if (g_ls) { - sl = g_ls->sl; - saved_ls = g_ls; - g_ls = g_ls->next; - } else { + for (;;) { + if (g_ls) { + sl = g_ls->sl; + saved_ls = g_ls; + g_ls = g_ls->next; + break; + } sl = NULL; saved_ls = NULL; + + if (have_sort_left() == 0) + break; + pthread_cond_wait(&g_ls_cond, &g_ls_mutex); } pthread_mutex_unlock(&g_ls_mutex); @@ -493,13 +506,8 @@ run_sort_cycle_mt(void) for (;;) { slc = pop_ls_mt(); - if (slc == NULL) { - if (have_sort_left()) { - pthread_yield(); - continue; - } + if (slc == NULL) break; - } run_sort_level_next(slc); } } @@ -510,9 +518,7 @@ run_sort_cycle_mt(void) static void* sort_thread(void* arg) { - run_sort_cycle_mt(); - sem_post(&mtsem); return (arg); @@ -608,8 +614,7 @@ run_top_sort_level(struct sort_level *sl pthread_t pth; pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, - PTHREAD_DETACHED); + pthread_attr_setdetachstate(&attr, PTHREAD_DETACHED); for (;;) { int res = pthread_create(&pth, &attr, @@ -626,7 +631,7 @@ run_top_sort_level(struct sort_level *sl pthread_attr_destroy(&attr); } - for(i = 0; i < nthreads; ++i) + for (i = 0; i < nthreads; ++i) sem_wait(&mtsem); } #endif /* defined(SORT_THREADS) */ @@ -649,7 +654,7 @@ run_sort(struct sort_list_item **base, s pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ADAPTIVE_NP); pthread_mutex_init(&g_ls_mutex, &mattr); - pthread_mutex_init(&sort_left_mutex, &mattr); + pthread_cond_init(&g_ls_cond, NULL); pthread_mutexattr_destroy(&mattr); @@ -677,7 +682,6 @@ run_sort(struct sort_list_item **base, s if (nthreads > 1) { sem_destroy(&mtsem); pthread_mutex_destroy(&g_ls_mutex); - pthread_mutex_destroy(&sort_left_mutex); } nthreads = nthreads_save; #endif From owner-svn-src-all@freebsd.org Mon Feb 6 05:27:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97C60CD2DE4; Mon, 6 Feb 2017 05:27:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60845E23; Mon, 6 Feb 2017 05:27:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165R87V083203; Mon, 6 Feb 2017 05:27:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165R8bO083196; Mon, 6 Feb 2017 05:27:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060527.v165R8bO083196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313322 - in head/sys: conf dev/iwm modules/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:27:09 -0000 Author: adrian Date: Mon Feb 6 05:27:07 2017 New Revision: 313322 URL: https://svnweb.freebsd.org/changeset/base/313322 Log: [iwm] Add implementation of the notification wait api from iwlwifi. Obtained from: Linux iwlwifi Obtained from: DragonflyBSD commit 94dc1dadceb57b688036211262d678bc6bbdde37 Added: head/sys/dev/iwm/if_iwm_notif_wait.c (contents, props changed) head/sys/dev/iwm/if_iwm_notif_wait.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h head/sys/modules/iwm/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/conf/files Mon Feb 6 05:27:07 2017 (r313322) @@ -1882,6 +1882,7 @@ dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm +dev/netif/iwm/if_iwm_notif_wait.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:27:07 2017 (r313322) @@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -5277,6 +5278,8 @@ iwm_notif_intr(struct iwm_softc *sc) continue; } + iwm_notification_wait_notify(sc->sc_notif_wait, code, pkt); + switch (code) { case IWM_REPLY_RX_PHY_CMD: iwm_mvm_rx_rx_phy_cmd(sc, pkt, data); @@ -5896,6 +5899,12 @@ iwm_attach(device_t dev) callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc); + sc->sc_notif_wait = iwm_notification_wait_init(sc); + if (sc->sc_notif_wait == NULL) { + device_printf(dev, "failed to init notification wait struct\n"); + goto fail; + } + /* Init phy db */ sc->sc_phy_db = iwm_phy_db_init(sc); if (!sc->sc_phy_db) { @@ -6383,6 +6392,11 @@ iwm_detach_local(struct iwm_softc *sc, i /* Finished with the hardware - detach things */ iwm_pci_detach(dev); + if (sc->sc_notif_wait != NULL) { + iwm_notification_wait_free(sc->sc_notif_wait); + sc->sc_notif_wait = NULL; + } + mbufq_drain(&sc->sc_snd); IWM_LOCK_DESTROY(sc); Added: head/sys/dev/iwm/if_iwm_notif_wait.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_notif_wait.c Mon Feb 6 05:27:07 2017 (r313322) @@ -0,0 +1,219 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + ****************************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2015 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define IWM_WAIT_LOCK_INIT(_n, _s) \ + mtx_init(&(_n)->lk_mtx, (_s), "iwm wait_notif", MTX_DEF); +#define IWM_WAIT_LOCK(_n) mtx_lock(&(_n)->lk_mtx) +#define IWM_WAIT_UNLOCK(_n) mtx_unlock(&(_n)->lk_mtx) +#define IWM_WAIT_LOCK_DESTROY(_n) mtx_destroy(&(_n)->lk_mtx) + +struct iwm_notif_wait_data { + struct mtx lk_mtx; + char lk_buf[32]; + STAILQ_HEAD(, iwm_notification_wait) list; + struct iwm_softc *sc; +}; + +struct iwm_notif_wait_data * +iwm_notification_wait_init(struct iwm_softc *sc) +{ + struct iwm_notif_wait_data *data; + + data = malloc(sizeof(*data), M_DEVBUF, M_NOWAIT | M_ZERO); + if (data != NULL) { + snprintf(data->lk_buf, 32, "iwm wait_notif"); + IWM_WAIT_LOCK_INIT(data, data->lk_buf); + STAILQ_INIT(&data->list); + data->sc = sc; + } + + return data; +} + +void +iwm_notification_wait_free(struct iwm_notif_wait_data *notif_data) +{ + KASSERT(STAILQ_EMPTY(¬if_data->list), ("notif list isn't empty")); + IWM_WAIT_LOCK_DESTROY(notif_data); + free(notif_data, M_DEVBUF); +} + +/* XXX Get rid of separate cmd argument, like in iwlwifi's code */ +void +iwm_notification_wait_notify(struct iwm_notif_wait_data *notif_data, + uint16_t cmd, struct iwm_rx_packet *pkt) +{ + struct iwm_notification_wait *wait_entry; + + IWM_WAIT_LOCK(notif_data); + STAILQ_FOREACH(wait_entry, ¬if_data->list, entry) { + int found = FALSE; + int i; + + /* + * If it already finished (triggered) or has been + * aborted then don't evaluate it again to avoid races, + * Otherwise the function could be called again even + * though it returned true before + */ + if (wait_entry->triggered || wait_entry->aborted) + continue; + + for (i = 0; i < wait_entry->n_cmds; i++) { + if (cmd == wait_entry->cmds[i]) { + found = TRUE; + break; + } + } + if (!found) + continue; + + if (!wait_entry->fn || + wait_entry->fn(notif_data->sc, pkt, wait_entry->fn_data)) { + wait_entry->triggered = 1; + wakeup(wait_entry); + } + } + IWM_WAIT_UNLOCK(notif_data); +} + +void +iwm_abort_notification_waits(struct iwm_notif_wait_data *notif_data) +{ + struct iwm_notification_wait *wait_entry; + + IWM_WAIT_LOCK(notif_data); + STAILQ_FOREACH(wait_entry, ¬if_data->list, entry) { + wait_entry->aborted = 1; + wakeup(wait_entry); + } + IWM_WAIT_UNLOCK(notif_data); +} + +void +iwm_init_notification_wait(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, const uint16_t *cmds, int n_cmds, + int (*fn)(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data), + void *fn_data) +{ + KASSERT(n_cmds <= IWM_MAX_NOTIF_CMDS, + ("n_cmds %d is too large", n_cmds)); + wait_entry->fn = fn; + wait_entry->fn_data = fn_data; + wait_entry->n_cmds = n_cmds; + memcpy(wait_entry->cmds, cmds, n_cmds * sizeof(uint16_t)); + wait_entry->triggered = 0; + wait_entry->aborted = 0; + + IWM_WAIT_LOCK(notif_data); + STAILQ_INSERT_TAIL(¬if_data->list, wait_entry, entry); + IWM_WAIT_UNLOCK(notif_data); +} + +int +iwm_wait_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, int timeout) +{ + int ret = 0; + + IWM_WAIT_LOCK(notif_data); + if (!wait_entry->triggered && !wait_entry->aborted) { + ret = msleep(wait_entry, ¬if_data->lk_mtx, 0, "iwm_notif", + timeout); + } + STAILQ_REMOVE(¬if_data->list, wait_entry, iwm_notification_wait, + entry); + IWM_WAIT_UNLOCK(notif_data); + + return ret; +} + +void +iwm_remove_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry) +{ + IWM_WAIT_LOCK(notif_data); + STAILQ_REMOVE(¬if_data->list, wait_entry, iwm_notification_wait, + entry); + IWM_WAIT_UNLOCK(notif_data); +} Added: head/sys/dev/iwm/if_iwm_notif_wait.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_notif_wait.h Mon Feb 6 05:27:07 2017 (r313322) @@ -0,0 +1,138 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + ****************************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2015 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/* $FreeBSD$ */ + +#ifndef __IF_IWN_NOTIF_WAIT_H__ +#define __IF_IWN_NOTIF_WAIT_H__ + +#include + +#define IWM_MAX_NOTIF_CMDS 5 + +struct iwm_rx_packet; +struct iwm_softc; + +/** + * struct iwm_notification_wait - notification wait entry + * @entry: link for global list + * @fn: Function called with the notification. If the function + * returns true, the wait is over, if it returns false then + * the waiter stays blocked. If no function is given, any + * of the listed commands will unblock the waiter. + * @cmds: command IDs + * @n_cmds: number of command IDs + * @triggered: waiter should be woken up + * @aborted: wait was aborted + * + * This structure is not used directly, to wait for a + * notification declare it on the stack, and call + * iwm_init_notification_wait() with appropriate + * parameters. Then do whatever will cause the ucode + * to notify the driver, and to wait for that then + * call iwm_wait_notification(). + * + * Each notification is one-shot. If at some point we + * need to support multi-shot notifications (which + * can't be allocated on the stack) we need to modify + * the code for them. + */ +struct iwm_notification_wait { + STAILQ_ENTRY(iwm_notification_wait) entry; + + int (*fn)(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data); + void *fn_data; + + uint16_t cmds[IWM_MAX_NOTIF_CMDS]; + uint8_t n_cmds; + int triggered, aborted; +}; + +/* caller functions */ +extern struct iwm_notif_wait_data *iwm_notification_wait_init( + struct iwm_softc *sc); +extern void iwm_notification_wait_free(struct iwm_notif_wait_data *notif_data); +extern void iwm_notification_wait_notify( + struct iwm_notif_wait_data *notif_data, uint16_t cmd, + struct iwm_rx_packet *pkt); +extern void iwm_abort_notification_waits( + struct iwm_notif_wait_data *notif_data); + +/* user functions */ +extern void iwm_init_notification_wait(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, + const uint16_t *cmds, int n_cmds, + int (*fn)(struct iwm_softc *sc, + struct iwm_rx_packet *pkt, void *data), + void *fn_data); +extern int iwm_wait_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry, int timeout); +extern void iwm_remove_notification(struct iwm_notif_wait_data *notif_data, + struct iwm_notification_wait *wait_entry); + +#endif /* __IF_IWN_NOTIF_WAIT_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:27:07 2017 (r313322) @@ -519,6 +519,8 @@ struct iwm_softc { struct iwm_tx_radiotap_header sc_txtap; int sc_max_rssi; + + struct iwm_notif_wait_data *sc_notif_wait; }; #define IWM_LOCK_INIT(_sc) \ Modified: head/sys/modules/iwm/Makefile ============================================================================== --- head/sys/modules/iwm/Makefile Mon Feb 6 05:27:05 2017 (r313321) +++ head/sys/modules/iwm/Makefile Mon Feb 6 05:27:07 2017 (r313322) @@ -6,7 +6,7 @@ KMOD= if_iwm # Main driver SRCS= if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c SRCS+= if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c -SRCS+= if_iwm_power.c if_iwm_scan.c if_iwm_led.c +SRCS+= if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c # bus layer SRCS+= if_iwm_pcie_trans.c SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h From owner-svn-src-all@freebsd.org Mon Feb 6 05:29:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92FD0CD2EDF; Mon, 6 Feb 2017 05:29:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F74310B0; Mon, 6 Feb 2017 05:29:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165TZYM083327; Mon, 6 Feb 2017 05:29:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165TZIU083326; Mon, 6 Feb 2017 05:29:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702060529.v165TZIU083326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Feb 2017 05:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313323 - stable/11/usr.bin/mail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:29:36 -0000 Author: delphij Date: Mon Feb 6 05:29:35 2017 New Revision: 313323 URL: https://svnweb.freebsd.org/changeset/base/313323 Log: MFC r312663: When creating record file, use umask 077 instead of the default. Modified: stable/11/usr.bin/mail/send.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/send.c ============================================================================== --- stable/11/usr.bin/mail/send.c Mon Feb 6 05:27:07 2017 (r313322) +++ stable/11/usr.bin/mail/send.c Mon Feb 6 05:29:35 2017 (r313323) @@ -566,8 +566,13 @@ savemail(char name[], FILE *fi) char buf[BUFSIZ]; int i; time_t now; + mode_t saved_umask; - if ((fo = Fopen(name, "a")) == NULL) { + saved_umask = umask(077); + fo = Fopen(name, "a"); + umask(saved_umask); + + if (fo == NULL) { warn("%s", name); return (-1); } From owner-svn-src-all@freebsd.org Mon Feb 6 05:34:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE524CD2198; Mon, 6 Feb 2017 05:34:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD8B5153D; Mon, 6 Feb 2017 05:34:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165YlcR087270; Mon, 6 Feb 2017 05:34:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165YliP087269; Mon, 6 Feb 2017 05:34:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702060534.v165YliP087269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Feb 2017 05:34: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: r313324 - stable/10/usr.bin/mail 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:34:49 -0000 Author: delphij Date: Mon Feb 6 05:34:47 2017 New Revision: 313324 URL: https://svnweb.freebsd.org/changeset/base/313324 Log: MFC r312663: When creating record file, use umask 077 instead of the default. Modified: stable/10/usr.bin/mail/send.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mail/send.c ============================================================================== --- stable/10/usr.bin/mail/send.c Mon Feb 6 05:29:35 2017 (r313323) +++ stable/10/usr.bin/mail/send.c Mon Feb 6 05:34:47 2017 (r313324) @@ -566,8 +566,13 @@ savemail(char name[], FILE *fi) char buf[BUFSIZ]; int i; time_t now; + mode_t saved_umask; - if ((fo = Fopen(name, "a")) == NULL) { + saved_umask = umask(077); + fo = Fopen(name, "a"); + umask(saved_umask); + + if (fo == NULL) { warn("%s", name); return (-1); } From owner-svn-src-all@freebsd.org Mon Feb 6 05:35:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61464CD21FD; Mon, 6 Feb 2017 05:35:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BE341684; Mon, 6 Feb 2017 05:35:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v165ZBC8087343; Mon, 6 Feb 2017 05:35:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v165ZBQt087341; Mon, 6 Feb 2017 05:35:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702060535.v165ZBQt087341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 05:35:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313325 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 05:35:12 -0000 Author: adrian Date: Mon Feb 6 05:35:11 2017 New Revision: 313325 URL: https://svnweb.freebsd.org/changeset/base/313325 Log: [iwm] Use notification wait API to wait for calibration to complete. Tested: * 7260, STA mode (2g, 5g) Obtained from: DragonflyBSD commit 1e0cf8ec6fcd77978f5336297ece61a415790f84 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:34:47 2017 (r313324) +++ head/sys/dev/iwm/if_iwm.c Mon Feb 6 05:35:11 2017 (r313325) @@ -284,6 +284,8 @@ struct iwm_nvm_section { uint8_t *data; }; +#define IWM_MVM_UCODE_CALIB_TIMEOUT (2*hz) + static int iwm_store_cscheme(struct iwm_softc *, const uint8_t *, size_t); static int iwm_firmware_store_section(struct iwm_softc *, enum iwm_ucode_type, @@ -2751,6 +2753,28 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *s } static int +iwm_wait_phy_db_entry(struct iwm_softc *sc, + struct iwm_rx_packet *pkt, void *data) +{ + struct iwm_phy_db *phy_db = data; + + if (pkt->hdr.code != IWM_CALIB_RES_NOTIF_PHY_DB) { + if(pkt->hdr.code != IWM_INIT_COMPLETE_NOTIF) { + device_printf(sc->sc_dev, "%s: Unexpected cmd: %d\n", + __func__, pkt->hdr.code); + } + return TRUE; + } + + if (iwm_phy_db_set_section(phy_db, pkt)) { + device_printf(sc->sc_dev, + "%s: iwm_phy_db_set_section failed\n", __func__); + } + + return FALSE; +} + +static int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) { @@ -2788,7 +2812,12 @@ iwm_mvm_load_ucode_wait_alive(struct iwm static int iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm) { - int error; + struct iwm_notification_wait calib_wait; + static const uint16_t init_complete[] = { + IWM_INIT_COMPLETE_NOTIF, + IWM_CALIB_RES_NOTIF_PHY_DB + }; + int ret; /* do not operate with rfkill switch turned on */ if ((sc->sc_flags & IWM_FLAG_RFKILL) && !justnvm) { @@ -2797,81 +2826,80 @@ iwm_run_init_mvm_ucode(struct iwm_softc return EPERM; } - sc->sc_init_complete = 0; - if ((error = iwm_mvm_load_ucode_wait_alive(sc, - IWM_UCODE_INIT)) != 0) { - device_printf(sc->sc_dev, "failed to load init firmware\n"); - return error; + iwm_init_notification_wait(sc->sc_notif_wait, + &calib_wait, + init_complete, + nitems(init_complete), + iwm_wait_phy_db_entry, + sc->sc_phy_db); + + /* Will also start the device */ + ret = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_INIT); + if (ret) { + device_printf(sc->sc_dev, "Failed to start INIT ucode: %d\n", + ret); + goto error; } if (justnvm) { - if ((error = iwm_nvm_init(sc)) != 0) { + /* Read nvm */ + ret = iwm_nvm_init(sc); + if (ret) { device_printf(sc->sc_dev, "failed to read nvm\n"); - return error; + goto error; } IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->nvm_data->hw_addr); - - return 0; + goto error; } - if ((error = iwm_send_bt_init_conf(sc)) != 0) { + ret = iwm_send_bt_init_conf(sc); + if (ret) { device_printf(sc->sc_dev, - "failed to send bt coex configuration: %d\n", error); - return error; + "failed to send bt coex configuration: %d\n", ret); + goto error; } /* Init Smart FIFO. */ - error = iwm_mvm_sf_config(sc, IWM_SF_INIT_OFF); - if (error != 0) - return error; - -#if 0 - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s: phy_txant=0x%08x, nvm_valid_tx_ant=0x%02x, valid=0x%02x\n", - __func__, - ((sc->sc_fw_phy_config & IWM_FW_PHY_CFG_TX_CHAIN) - >> IWM_FW_PHY_CFG_TX_CHAIN_POS), - sc->nvm_data->valid_tx_ant, - iwm_fw_valid_tx_ant(sc)); -#endif + ret = iwm_mvm_sf_config(sc, IWM_SF_INIT_OFF); + if (ret) + goto error; /* Send TX valid antennas before triggering calibrations */ - error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); - if (error != 0) { + ret = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc)); + if (ret) { device_printf(sc->sc_dev, - "failed to send antennas before calibration: %d\n", error); - return error; + "failed to send antennas before calibration: %d\n", ret); + goto error; } /* * Send phy configurations command to init uCode * to start the 16.0 uCode init image internal calibrations. */ - if ((error = iwm_send_phy_cfg_cmd(sc)) != 0 ) { + ret = iwm_send_phy_cfg_cmd(sc); + if (ret) { device_printf(sc->sc_dev, - "%s: failed to run internal calibration: %d\n", - __func__, error); - return error; + "%s: Failed to run INIT calibrations: %d\n", + __func__, ret); + goto error; } /* * Nothing to do but wait for the init complete notification - * from the firmware + * from the firmware. */ - while (!sc->sc_init_complete) { - error = msleep(&sc->sc_init_complete, &sc->sc_mtx, - 0, "iwminit", 2*hz); - if (error) { - device_printf(sc->sc_dev, "init complete failed: %d\n", - sc->sc_init_complete); - break; - } - } + IWM_UNLOCK(sc); + ret = iwm_wait_notification(sc->sc_notif_wait, &calib_wait, + IWM_MVM_UCODE_CALIB_TIMEOUT); + IWM_LOCK(sc); - IWM_DPRINTF(sc, IWM_DEBUG_RESET, "init %scomplete\n", - sc->sc_init_complete ? "" : "not "); - return error; + goto out; + +error: + iwm_remove_notification(sc->sc_notif_wait, &calib_wait); +out: + return ret; } /* @@ -5387,7 +5415,6 @@ iwm_notif_intr(struct iwm_softc *sc) break; } case IWM_CALIB_RES_NOTIF_PHY_DB: - iwm_phy_db_set_section(sc->sc_phy_db, pkt); break; case IWM_STATISTICS_NOTIFICATION: { @@ -5452,8 +5479,6 @@ iwm_notif_intr(struct iwm_softc *sc) break; case IWM_INIT_COMPLETE_NOTIF: - sc->sc_init_complete = 1; - wakeup(&sc->sc_init_complete); break; case IWM_SCAN_OFFLOAD_COMPLETE: { Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:34:47 2017 (r313324) +++ head/sys/dev/iwm/if_iwmvar.h Mon Feb 6 05:35:11 2017 (r313325) @@ -452,7 +452,6 @@ struct iwm_softc { struct iwm_dma_info fw_dma; int sc_fw_chunk_done; - int sc_init_complete; struct iwm_ucode_status sc_uc; enum iwm_ucode_type sc_uc_current; From owner-svn-src-all@freebsd.org Mon Feb 6 06:15:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 584A3CD35EA; Mon, 6 Feb 2017 06:15:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08548114A; Mon, 6 Feb 2017 06:15:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v166FdkM003714; Mon, 6 Feb 2017 06:15:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v166FdRc003713; Mon, 6 Feb 2017 06:15:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702060615.v166FdRc003713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 6 Feb 2017 06:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313326 - head/tools/tools/nanobsd/embedded 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 06:15:40 -0000 Author: imp Date: Mon Feb 6 06:15:38 2017 New Revision: 313326 URL: https://svnweb.freebsd.org/changeset/base/313326 Log: o Add mkimg to the cross tools, and use the TMPPATH as PATH to pick up mkimg for building on systems like FreeBSD 11.0 that don't have my -a changes. o Set NANO_ROOT and NANO_ALTROOT for std-* since their values don't change when we set NANO_SLICE*. PR: 216829 PR: 216830 Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Feb 6 05:35:11 2017 (r313325) +++ head/tools/tools/nanobsd/embedded/common Mon Feb 6 06:15:38 2017 (r313326) @@ -132,6 +132,7 @@ customize_cmd cust_install_machine_files # NB: leave c++ enabled so devd can be built CONF_BUILD=" +LOCAL_XTOOL_DIRS=usr.bin/mkimg WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true @@ -612,17 +613,23 @@ std-embedded) NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 + NANO_ROOT=${NANO_SLICE_ROOT}a + NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; std-x86) NANO_SLICE_CFG=s1 NANO_SLICE_ROOT=s2 NANO_SLICE_ALTROOT=s3 + NANO_ROOT=${NANO_SLICE_ROOT}a + NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; powerpc64-ibm) NANO_SLICE_PPCBOOT=s1 NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 + NANO_ROOT=${NANO_SLICE_ROOT}a + NANO_ALTROOT=${NANO_SLICE_ALTROOT}a ;; powerpc64-apple) echo Not yet @@ -633,6 +640,8 @@ std-uefi) NANO_SLICE_CFG=s2 NANO_SLICE_ROOT=s3 NANO_SLICE_ALTROOT=s4 + NANO_ROOT=${NANO_SLICE_ROOT} + NANO_ALTROOT=${NANO_SLICE_ALTROOT} ;; std-uefi-bios) NANO_DISK_SCHEME=gpt @@ -641,7 +650,6 @@ std-uefi-bios) NANO_SLICE_CFG=p3 NANO_SLICE_ROOT=p4 NANO_SLICE_ALTROOT=p5 - # override root name NANO_ROOT=${NANO_SLICE_ROOT} NANO_ALTROOT=${NANO_SLICE_ALTROOT} ;; @@ -660,3 +668,8 @@ NANO_SLICE_DATA= # Not included create_diskimage ( ) ( eval create_diskimage_${NANO_DISK_SCHEME} ) + +# Set the path to the same path we use for buldworld to use latest mkimg +NANO_TARGET=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET_ARCH=${NANO_ARCH} -V _TARGET) +NANO_TMPPATH=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET=${NANO_TARGET} TARGET_ARCH=${NANO_ARCH} -f Makefile.inc1 buildenv -V TMPPATH) +export PATH="${NANO_TMPPATH}" From owner-svn-src-all@freebsd.org Mon Feb 6 07:02:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5E88CD3A62; Mon, 6 Feb 2017 07:02:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B594FD58; Mon, 6 Feb 2017 07:02:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1672HWX023510; Mon, 6 Feb 2017 07:02:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1672Hro023509; Mon, 6 Feb 2017 07:02:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702060702.v1672Hro023509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Feb 2017 07:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313327 - head/usr.bin/gzip 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 07:02:19 -0000 Author: delphij Date: Mon Feb 6 07:02:17 2017 New Revision: 313327 URL: https://svnweb.freebsd.org/changeset/base/313327 Log: Reflect actual NetBSD revision we already have. MFC after: 3 days Modified: head/usr.bin/gzip/unxz.c Modified: head/usr.bin/gzip/unxz.c ============================================================================== --- head/usr.bin/gzip/unxz.c Mon Feb 6 06:15:38 2017 (r313326) +++ head/usr.bin/gzip/unxz.c Mon Feb 6 07:02:17 2017 (r313327) @@ -1,4 +1,4 @@ -/* $NetBSD: unxz.c,v 1.5 2011/09/30 01:32:21 christos Exp $ */ +/* $NetBSD: unxz.c,v 1.6 2016/01/29 15:19:01 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. From owner-svn-src-all@freebsd.org Mon Feb 6 07:57:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8063CD108C for ; Mon, 6 Feb 2017 07:57:26 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 641A78E9 for ; Mon, 6 Feb 2017 07:57:26 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x229.google.com with SMTP id l19so44381772ywc.2 for ; Sun, 05 Feb 2017 23:57:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bex5ktrMozIXH/dXQhZd4HxxAriq/DXNav9QRUgctkY=; b=tvQcFs1UPPFySj/2O8b6A5zhEdAV47LgDP7nh7Zk4izwprsR+HdYd5N43Dp42CLKjl KirgU2fyy9dxcq59mD7W2bxDF3ZdSAvrbwdPP/oRSDov22L/2/hFKKxxnNb1/7jq38Ad jFZ9Dwz+pZt4TIbhAn37bhEPtogwL4TAaJKIBGyjVBrcLCiDTHBFGABEqGSI1elqkqpe qloYOXQDU93+BVNKZVXDe6o4wsgx5EtDpg3Czi4/ERu8SuRPJ23fIHG3jJvsBB996k/L qig3pT6kb1vv4wgmdKtnUPn1/yX1hqLsBBqTuD0bgE442+aA3b/rr0+SbnFXeEwhMmuH eRDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bex5ktrMozIXH/dXQhZd4HxxAriq/DXNav9QRUgctkY=; b=l81oLHwrlmAOLe04c2hhIHKK4c0zwibyGtkjvkNyEmP9dk/KsNEJOxlCcOaXuaPnla HroLKEzjXPOuXudaipfpw1i9fwb/cZS/rBPyK8kw5CSASoczH4dULGBVZBFgf7oYyVJS cSKhO9m1HoG1aK3xRXSoV2RFCIdbC0z4OaHtOP8bJN2/b3MciLGaFMuHnbFHdR8wtvzI Yw6BGC5fvdqeySWhbPQhXIzQmSOB6kUM47BO0mEotlxBLnRQp1+ZPN8lMHg8Z+H2QNm7 A48DQxa2mr/JO5kzGwJF0vtUm43SfW74+s8+F90kBJ6fR2zof171l1bUFcNL3lWrNXS2 yrDg== X-Gm-Message-State: AIkVDXL0RAJizf5K9Ix46CiwlAmIR7mPFE6I9Zj/wGYsV2T7lcM9uU/H04FZq/TVP6Y3Y6WUsgxGX+89Mj358Q== X-Received: by 10.129.110.133 with SMTP id j127mr5964516ywc.214.1486367845325; Sun, 05 Feb 2017 23:57:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.76 with HTTP; Sun, 5 Feb 2017 23:56:54 -0800 (PST) In-Reply-To: <201702060527.v165R8bO083196@repo.freebsd.org> References: <201702060527.v165R8bO083196@repo.freebsd.org> From: Ed Schouten Date: Mon, 6 Feb 2017 08:56:54 +0100 Message-ID: Subject: Re: svn commit: r313322 - in head/sys: conf dev/iwm modules/iwm To: Adrian Chadd Cc: src-committers , 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 07:57:26 -0000 Hi Adrian, 2017-02-06 6:27 GMT+01:00 Adrian Chadd : > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Mon Feb 6 05:27:05 2017 (r313321) > +++ head/sys/conf/files Mon Feb 6 05:27:07 2017 (r313322) > @@ -1882,6 +1882,7 @@ dev/iwm/if_iwm.c optional iwm > dev/iwm/if_iwm_binding.c optional iwm > dev/iwm/if_iwm_led.c optional iwm > dev/iwm/if_iwm_mac_ctxt.c optional iwm > +dev/netif/iwm/if_iwm_notif_wait.c optional iwm > dev/iwm/if_iwm_pcie_trans.c optional iwm > dev/iwm/if_iwm_phy_ctxt.c optional iwm > dev/iwm/if_iwm_phy_db.c optional iwm What's with the 'netif' part in the source file's name? The actual source file doesn't use it. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Feb 6 08:26:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BD5ECD1BD0; Mon, 6 Feb 2017 08:26:47 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C99A17FA; Mon, 6 Feb 2017 08:26:47 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168QkT3056017; Mon, 6 Feb 2017 08:26:46 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168QjD0056011; Mon, 6 Feb 2017 08:26:45 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702060826.v168QjD0056011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 08:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313328 - in head/sys/boot: common usb/storage 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 08:26:47 -0000 Author: tsoome Date: Mon Feb 6 08:26:45 2017 New Revision: 313328 URL: https://svnweb.freebsd.org/changeset/base/313328 Log: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE. Need interface to extract information about disk abstraction, to read disk or partition size depending on the provided argument and adjust disk size based on information in partition table. The disk handle from disk_open() has d_offset field to point to partition start. So we can use this fact to return either whole disk size or partition size. For this we only need to record partition size we get from disk_open() anyhow. In addition, this will also make it possible to adjust the disk media size based on information from partition table. The problem with disk size is about some BIOS systems reporting bogus disk size for 2+TB disks, but since such disks are using GPT partitioning, and GPT does have information about disk size (alternate LBA + 1), we can use this fact to record disk size based on partition table. This patch does exactly this: implements DIOCGSECTORSIZE and DIOCGMEDIASIZE ioctl, and DIOCGMEDIASIZE will report either disk media size or partition size. Adds ptable_getsize() call to read partition size in bytes from ptable pointer. Updates disk_open() to use ptable_getsize() to update mediasize value. Implements GPT detection function to update ptable size (used by ptable_getsize()) according to alternate lba (which is location of backup copy of GPT header table). Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8594 Modified: head/sys/boot/common/disk.c head/sys/boot/common/part.c head/sys/boot/common/part.h head/sys/boot/usb/storage/umass_loader.c head/sys/boot/zfs/zfs.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/common/disk.c Mon Feb 6 08:26:45 2017 (r313328) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); struct open_disk { struct ptable *table; uint64_t mediasize; + uint64_t entrysize; u_int sectorsize; u_int flags; int rcnt; @@ -264,13 +265,28 @@ disk_write(struct disk_devdesc *dev, voi } int -disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf) +disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *data) { + struct open_disk *od = dev->d_opendata; - if (dev->d_dev->dv_ioctl) - return ((*dev->d_dev->dv_ioctl)(dev->d_opendata, cmd, buf)); + if (od == NULL) + return (ENOTTY); - return (ENXIO); + switch (cmd) { + case DIOCGSECTORSIZE: + *(u_int *)data = od->sectorsize; + break; + case DIOCGMEDIASIZE: + if (dev->d_offset == 0) + *(uint64_t *)data = od->mediasize; + else + *(uint64_t *)data = od->entrysize * od->sectorsize; + break; + default: + return (ENOTTY); + } + + return (0); } int @@ -315,6 +331,7 @@ disk_open(struct disk_devdesc *dev, uint } dev->d_opendata = od; od->rcnt = 0; + od->entrysize = 0; } od->mediasize = mediasize; od->sectorsize = sectorsize; @@ -330,14 +347,24 @@ disk_open(struct disk_devdesc *dev, uint rc = ENXIO; goto out; } + + if (ptable_getsize(od->table, &mediasize) != 0) { + rc = ENXIO; + goto out; + } + if (mediasize > od->mediasize) { + od->mediasize = mediasize; + } opened: rc = 0; if (ptable_gettype(od->table) == PTABLE_BSD && partition >= 0) { /* It doesn't matter what value has d_slice */ rc = ptable_getpart(od->table, &part, partition); - if (rc == 0) + if (rc == 0) { dev->d_offset = part.start; + od->entrysize = part.end - part.start + 1; + } } else if (slice >= 0) { /* Try to get information about partition */ if (slice == 0) @@ -347,6 +374,7 @@ opened: if (rc != 0) /* Partition doesn't exist */ goto out; dev->d_offset = part.start; + od->entrysize = part.end - part.start + 1; slice = part.index; if (ptable_gettype(od->table) == PTABLE_GPT) { partition = 255; @@ -389,6 +417,7 @@ opened: if (rc != 0) goto out; dev->d_offset += part.start; + od->entrysize = part.end - part.start + 1; } out: if (table != NULL) Modified: head/sys/boot/common/part.c ============================================================================== --- head/sys/boot/common/part.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/common/part.c Mon Feb 6 08:26:45 2017 (r313328) @@ -310,10 +310,30 @@ ptable_gptread(struct ptable *table, voi DEBUG("GPT detected"); size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); + + /* + * If the disk's sector count is smaller than the sector count recorded + * in the disk's GPT table header, set the table->sectors to the value + * recorded in GPT tables. This is done to work around buggy firmware + * that returns truncated disk sizes. + * + * Note, this is still not a foolproof way to get disk's size. For + * example, an image file can be truncated when copied to smaller media. + */ + if (hdr.hdr_lba_alt + 1 > table->sectors) + table->sectors = hdr.hdr_lba_alt + 1; + for (i = 0; i < size / hdr.hdr_entsz; i++) { ent = (struct gpt_ent *)(tbl + i * hdr.hdr_entsz); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; + + /* Simple sanity checks. */ + if (ent->ent_lba_start < hdr.hdr_lba_start || + ent->ent_lba_end > hdr.hdr_lba_end || + ent->ent_lba_start > ent->ent_lba_end) + continue; + entry = malloc(sizeof(*entry)); if (entry == NULL) break; @@ -735,6 +755,19 @@ ptable_gettype(const struct ptable *tabl } int +ptable_getsize(const struct ptable *table, uint64_t *sizep) +{ + uint64_t tmp = table->sectors * table->sectorsize; + + if (tmp < table->sectors) + return (EOVERFLOW); + + if (sizep != NULL) + *sizep = tmp; + return (0); +} + +int ptable_getpart(const struct ptable *table, struct ptable_entry *part, int index) { struct pentry *entry; Modified: head/sys/boot/common/part.h ============================================================================== --- head/sys/boot/common/part.h Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/common/part.h Mon Feb 6 08:26:45 2017 (r313328) @@ -70,6 +70,7 @@ struct ptable *ptable_open(void *dev, ui diskread_t *dread); void ptable_close(struct ptable *table); enum ptable_type ptable_gettype(const struct ptable *table); +int ptable_getsize(const struct ptable *table, uint64_t *sizep); int ptable_getpart(const struct ptable *table, struct ptable_entry *part, int index); Modified: head/sys/boot/usb/storage/umass_loader.c ============================================================================== --- head/sys/boot/usb/storage/umass_loader.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/usb/storage/umass_loader.c Mon Feb 6 08:26:45 2017 (r313328) @@ -137,10 +137,20 @@ umass_disk_open(struct open_file *f,...) } static int -umass_disk_ioctl(struct open_file *f __unused, u_long cmd, void *buf) +umass_disk_ioctl(struct open_file *f, u_long cmd, void *buf) { + struct disk_devdesc *dev; uint32_t nblock; uint32_t blocksize; + int rc; + + dev = (struct disk_devdesc *)(f->f_devdata); + if (dev == NULL) + return (EINVAL); + + rc = disk_ioctl(dev, cmd, buf); + if (rc != ENOTTY) + return (rc); switch (cmd) { case DIOCGSECTORSIZE: Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Mon Feb 6 07:02:17 2017 (r313327) +++ head/sys/boot/zfs/zfs.c Mon Feb 6 08:26:45 2017 (r313328) @@ -483,7 +483,7 @@ zfs_probe_dev(const char *devname, uint6 { struct ptable *table; struct zfs_probe_args pa; - off_t mediasz; + uint64_t mediasz; int ret; pa.fd = open(devname, O_RDONLY); From owner-svn-src-all@freebsd.org Mon Feb 6 08:27:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52EB3CD1C26; Mon, 6 Feb 2017 08:27:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 152271960; Mon, 6 Feb 2017 08:27:21 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168RK45056088; Mon, 6 Feb 2017 08:27:20 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168RJQY056084; Mon, 6 Feb 2017 08:27:19 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702060827.v168RJQY056084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 6 Feb 2017 08:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 08:27:21 -0000 Author: allanjude Date: Mon Feb 6 08:27:19 2017 New Revision: 313329 URL: https://svnweb.freebsd.org/changeset/base/313329 Log: Remove bdes(1) The use of DES for anything is discouraged, especially with a static IV of 0 If you still need bdes(1) to decrypt Kirk's video lectures, see security/bdes in ports. This commit brought to you by the FOSDEM DevSummit and the "remove unneeded dependancies on openssl in base" working group Reviewed by: bapt, brnrd Relnotes: yes Sponsored by: FOSDEM DevSummit Differential Revision: https://reviews.freebsd.org/D9424 Deleted: head/secure/usr.bin/bdes/ Modified: head/bin/ed/ed.1 head/secure/usr.bin/Makefile head/usr.bin/Makefile head/usr.bin/enigma/enigma.1 Modified: head/bin/ed/ed.1 ============================================================================== --- head/bin/ed/ed.1 Mon Feb 6 08:26:45 2017 (r313328) +++ head/bin/ed/ed.1 Mon Feb 6 08:27:19 2017 (r313329) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd October 2, 2016 +.Dd February 5, 2017 .Dt ED 1 .Os .Sh NAME @@ -871,9 +871,6 @@ writes. If a newline alone is entered as the key, then encryption is turned off. Otherwise, echoing is disabled while a key is read. -Encryption/decryption is done using the -.Xr bdes 1 -algorithm. .It Pf (.+1)z n Scroll .Ar n @@ -962,7 +959,6 @@ results in an error. If the command is entered a second time, it succeeds, but any changes to the buffer are lost. .Sh SEE ALSO -.Xr bdes 1 , .Xr sed 1 , .Xr sh 1 , .Xr vi 1 , Modified: head/secure/usr.bin/Makefile ============================================================================== --- head/secure/usr.bin/Makefile Mon Feb 6 08:26:45 2017 (r313328) +++ head/secure/usr.bin/Makefile Mon Feb 6 08:27:19 2017 (r313329) @@ -4,7 +4,7 @@ SUBDIR= .if ${MK_OPENSSL} != "no" -SUBDIR+=bdes openssl +SUBDIR+=openssl .if ${MK_OPENSSH} != "no" SUBDIR+=scp sftp ssh ssh-add ssh-agent ssh-keygen ssh-keyscan .endif Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Feb 6 08:26:45 2017 (r313328) +++ head/usr.bin/Makefile Mon Feb 6 08:27:19 2017 (r313329) @@ -6,7 +6,6 @@ # XXX MISSING: deroff diction graph learn plot # spell spline struct xsend # XXX Use GNU versions: diff ld patch -# Moved to secure: bdes # SUBDIR= alias \ Modified: head/usr.bin/enigma/enigma.1 ============================================================================== --- head/usr.bin/enigma/enigma.1 Mon Feb 6 08:26:45 2017 (r313328) +++ head/usr.bin/enigma/enigma.1 Mon Feb 6 08:27:19 2017 (r313329) @@ -6,7 +6,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd May 14, 2004 +.Dd February 5, 2017 .Dt ENIGMA 1 .Os .Sh NAME @@ -84,7 +84,6 @@ with other operating systems that also p .Xr crypt 1 there). For real encryption, refer to -.Xr bdes 1 , .Xr openssl 1 , .Xr pgp 1 Pq Pa ports/security/pgp , or @@ -115,7 +114,6 @@ enigma XXX < encrypted .Pp This displays the previously created file on the terminal. .Sh SEE ALSO -.Xr bdes 1 , .Xr gpg 1 , .Xr openssl 1 , .Xr pgp 1 , From owner-svn-src-all@freebsd.org Mon Feb 6 08:37:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CBE3CD1E8C; Mon, 6 Feb 2017 08:37:00 +0000 (UTC) (envelope-from delphij@delphij.net) 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 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF5C1ECA; Mon, 6 Feb 2017 08:37:00 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:d1a3:819a:4f6f:ae91]) (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 10C192AD4B; Mon, 6 Feb 2017 00:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1486370220; x=1486384620; bh=hobcOv2l0PUCu+mwzrajORGvaFBHwLz5oeFJy4hICzw=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=s0kXejqQ7qJ98PNaT+IW+NJmzAjM1e/6HqTPAsq2UzmA3rK2WxdxTLXMAjq16BxdP ngmX1yHL2rhuzeBa526rMxJFC7fBta+A9/R7Q1adlNWBPVTHzo9BCfVAFD7mHyXNfo AnbkR/o8ALhgq+PGGQbq7ok+fRMWJi0ey7xGNN7A= Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702060827.v168RJQY056084@repo.freebsd.org> Cc: d@delphij.net From: Xin Li Message-ID: <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Date: Mon, 6 Feb 2017 00:36:56 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <201702060827.v168RJQY056084@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 08:37:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H Content-Type: multipart/mixed; boundary="FtXOlNrCgTW3KS2lUJuOlv4AVCClMs2fK"; protected-headers="v1" From: Xin Li To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: d@delphij.net Message-ID: <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma References: <201702060827.v168RJQY056084@repo.freebsd.org> In-Reply-To: <201702060827.v168RJQY056084@repo.freebsd.org> --FtXOlNrCgTW3KS2lUJuOlv4AVCClMs2fK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/6/17 00:27, Allan Jude wrote: > Author: allanjude > Date: Mon Feb 6 08:27:19 2017 > New Revision: 313329 > URL: https://svnweb.freebsd.org/changeset/base/313329 >=20 > Log: > Remove bdes(1) > =20 > The use of DES for anything is discouraged, especially with a static = IV of 0 > =20 > If you still need bdes(1) to decrypt Kirk's video lectures, see > security/bdes in ports. > =20 > This commit brought to you by the FOSDEM DevSummit and the > "remove unneeded dependancies on openssl in base" working group > =20 > Reviewed by: bapt, brnrd > Relnotes: yes > Sponsored by: FOSDEM DevSummit > Differential Revision: https://reviews.freebsd.org/D9424 >=20 > Deleted: > head/secure/usr.bin/bdes/ > Modified: > head/bin/ed/ed.1 > head/secure/usr.bin/Makefile > head/usr.bin/Makefile > head/usr.bin/enigma/enigma.1 Obsoletefiles.inc? --FtXOlNrCgTW3KS2lUJuOlv4AVCClMs2fK-- --uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYmDWrAAoJEJW2GBstM+nsbq0QAKPkT/Zu74Mj4vUQPXpy9iZ1 CAZJg95C8iGDVldjQw/Z1kXWn3kawnu5LTssxMCKBkK/cy2hZm7D4G+XbmXKAqbG WV8YM0GmBIb8c4gA4WKHG9YGECJpEMcbZu/+eqO5M5OHjYjLWeaX9LYTdPOaeIK8 Dt6bzrgY1k2hmBhkqN3AtKteoaZ6YGp/xudCWq4o2chAU34krXkA0r21EqAjxROb XAaK7aqBfwCGYaTOyUwywsrvMz3PwfKB4VY8nm4eMl3bXIwEeT7E7IABtUdPsg6z F1pXd8sXQxG/b6XXGXNRDg7eXeEqUbGrIP021HEj4oc3Wp/vMClk+bzy9I3S1xVf PXzQNUpw9loyggfaMk+dCLtkADvPjkeKtFR1TneVL6QH0G4rIpIRqXa9Jr1FN7sR vMJTm1oP7J+dyTshGwE9R5y9h1NjKus6Io8/XAakiGtMG5CkkO2yQ27kPgfrahd6 FQCbKfLSwQQpU9QMNB+d6hG+TLR6ZwppeqMDahoXqKEy2Hcn0ZClE83MS+LkBKq8 NnSwFzuSFiGnIgbrJ1FOoLsfA09+4/glXK0jagaJ1p3tu/c3db7qOro4CSSCW2kz qspOQsgdWQ9pKMNZOcyYrp4+ZRsV1fXAF41KgN9GDGdLe6QBKpDGdEbqZhzaQzKN CPSax9CG2CrHxDHpp2Fo =RD89 -----END PGP SIGNATURE----- --uNjwp2PjSOos17teWDOvxXAOSJ47B4u3H-- From owner-svn-src-all@freebsd.org Mon Feb 6 08:50:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F06D0CD22A9; Mon, 6 Feb 2017 08:50:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A145B850; Mon, 6 Feb 2017 08:50:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168o0U0064336; Mon, 6 Feb 2017 08:50:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168nwmf064277; Mon, 6 Feb 2017 08:49:58 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201702060849.v168nwmf064277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 6 Feb 2017 08:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 08:50:02 -0000 Author: ae Date: Mon Feb 6 08:49:57 2017 New Revision: 313330 URL: https://svnweb.freebsd.org/changeset/base/313330 Log: Merge projects/ipsec into head/. Small summary ------------- o Almost all IPsec releated code was moved into sys/netipsec. o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel option IPSEC_SUPPORT added. It enables support for loading and unloading of ipsec.ko and tcpmd5.ko kernel modules. o IPSEC_NAT_T option was removed. Now NAT-T support is enabled by default. The UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type support was removed. Added TCP/UDP checksum handling for inbound packets that were decapsulated by transport mode SAs. setkey(8) modified to show run-time NAT-T configuration of SA. o New network pseudo interface if_ipsec(4) added. For now it is build as part of ipsec.ko module (or with IPSEC kernel). It implements IPsec virtual tunnels to create route-based VPNs. o The network stack now invokes IPsec functions using special methods. The only one header file should be included to declare all the needed things to work with IPsec. o All IPsec protocols handlers (ESP/AH/IPCOMP protosw) were removed. Now these protocols are handled directly via IPsec methods. o TCP_SIGNATURE support was reworked to be more close to RFC. o PF_KEY SADB was reworked: - now all security associations stored in the single SPI namespace, and all SAs MUST have unique SPI. - several hash tables added to speed up lookups in SADB. - SADB now uses rmlock to protect access, and concurrent threads can do SA lookups in the same time. - many PF_KEY message handlers were reworked to reflect changes in SADB. - SADB_UPDATE message was extended to support new PF_KEY headers: SADB_X_EXT_NEW_ADDRESS_SRC and SADB_X_EXT_NEW_ADDRESS_DST. They can be used by IKE daemon to change SA addresses. o ipsecrequest and secpolicy structures were cardinally changed to avoid locking protection for ipsecrequest. Now we support only limited number (4) of bundled SAs, but they are supported for both INET and INET6. o INPCB security policy cache was introduced. Each PCB now caches used security policies to avoid SP lookup for each packet. o For inbound security policies added the mode, when the kernel does check for full history of applied IPsec transforms. o References counting rules for security policies and security associations were changed. The proper SA locking added into xform code. o xform code was also changed. Now it is possible to unregister xforms. tdb_xxx structures were changed and renamed to reflect changes in SADB/SPDB, and changed rules for locking and refcounting. Reviewed by: gnn, wblock Obtained from: Yandex LLC Relnotes: yes Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D9352 Added: head/sbin/ifconfig/ifipsec.c (contents, props changed) head/share/man/man4/if_ipsec.4 (contents, props changed) head/sys/modules/ipsec/ head/sys/modules/ipsec/Makefile (contents, props changed) head/sys/modules/tcp/tcpmd5/ head/sys/modules/tcp/tcpmd5/Makefile (contents, props changed) head/sys/net/if_ipsec.c (contents, props changed) head/sys/net/if_ipsec.h (contents, props changed) head/sys/netipsec/ipsec_mod.c (contents, props changed) head/sys/netipsec/ipsec_pcb.c (contents, props changed) head/sys/netipsec/ipsec_support.h (contents, props changed) head/sys/netipsec/subr_ipsec.c (contents, props changed) head/sys/netipsec/udpencap.c (contents, props changed) Deleted: head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_ipsec.h head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_ipsec.h Modified: head/contrib/netcat/netcat.c head/lib/libipsec/pfkey.c head/lib/libipsec/pfkey_dump.c head/sbin/ifconfig/Makefile head/sbin/setkey/setkey.8 head/share/man/man4/Makefile head/share/man/man4/ipsec.4 head/share/man/man4/tcp.4 head/share/man/man4/udp.4 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.arm head/sys/conf/files.arm64 head/sys/conf/files.i386 head/sys/conf/files.mips head/sys/conf/files.powerpc head/sys/conf/files.riscv head/sys/conf/files.sparc64 head/sys/conf/kern.opts.mk head/sys/conf/options head/sys/modules/Makefile head/sys/net/pfkeyv2.h head/sys/netinet/in_pcb.c head/sys/netinet/in_proto.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_pcb.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_stacks/fastpath.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/netinet/udp.h head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6.h head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec6.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_mbuf.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/key.c head/sys/netipsec/key.h head/sys/netipsec/key_debug.c head/sys/netipsec/key_debug.h head/sys/netipsec/keydb.h head/sys/netipsec/keysock.c head/sys/netipsec/xform.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/netipsec/xform_tcp.c head/usr.bin/netstat/inet.c Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Mon Feb 6 08:27:19 2017 (r313329) +++ head/contrib/netcat/netcat.c Mon Feb 6 08:49:57 2017 (r313330) @@ -131,7 +131,7 @@ ssize_t drainbuf(int, unsigned char *, s ssize_t fillbuf(int, unsigned char *, size_t *); #ifdef IPSEC -void add_ipsec_policy(int, char *); +void add_ipsec_policy(int, int, char *); char *ipsec_policy[2]; #endif @@ -642,12 +642,6 @@ remote_connect(const char *host, const c if ((s = socket(res0->ai_family, res0->ai_socktype, res0->ai_protocol)) < 0) continue; -#ifdef IPSEC - if (ipsec_policy[0] != NULL) - add_ipsec_policy(s, ipsec_policy[0]); - if (ipsec_policy[1] != NULL) - add_ipsec_policy(s, ipsec_policy[1]); -#endif if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, sizeof(rtableid)) == -1)) @@ -765,12 +759,7 @@ local_listen(char *host, char *port, str ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); -#ifdef IPSEC - if (ipsec_policy[0] != NULL) - add_ipsec_policy(s, ipsec_policy[0]); - if (ipsec_policy[1] != NULL) - add_ipsec_policy(s, ipsec_policy[1]); -#endif + if (FreeBSD_Oflag) { if (setsockopt(s, IPPROTO_TCP, TCP_NOOPT, &FreeBSD_Oflag, sizeof(FreeBSD_Oflag)) == -1) @@ -1235,6 +1224,12 @@ set_common_sockopts(int s, int af) &FreeBSD_Oflag, sizeof(FreeBSD_Oflag)) == -1) err(1, "disable TCP options"); } +#ifdef IPSEC + if (ipsec_policy[0] != NULL) + add_ipsec_policy(s, af, ipsec_policy[0]); + if (ipsec_policy[1] != NULL) + add_ipsec_policy(s, af, ipsec_policy[1]); +#endif } int @@ -1360,7 +1355,7 @@ help(void) #ifdef IPSEC void -add_ipsec_policy(int s, char *policy) +add_ipsec_policy(int s, int af, char *policy) { char *raw; int e; @@ -1369,8 +1364,12 @@ add_ipsec_policy(int s, char *policy) if (raw == NULL) errx(1, "ipsec_set_policy `%s': %s", policy, ipsec_strerror()); - e = setsockopt(s, IPPROTO_IP, IP_IPSEC_POLICY, raw, - ipsec_get_policylen(raw)); + if (af == AF_INET) + e = setsockopt(s, IPPROTO_IP, IP_IPSEC_POLICY, raw, + ipsec_get_policylen(raw)); + if (af == AF_INET6) + e = setsockopt(s, IPPROTO_IPV6, IPV6_IPSEC_POLICY, raw, + ipsec_get_policylen(raw)); if (e < 0) err(1, "ipsec policy cannot be configured"); free(raw); Modified: head/lib/libipsec/pfkey.c ============================================================================== --- head/lib/libipsec/pfkey.c Mon Feb 6 08:27:19 2017 (r313329) +++ head/lib/libipsec/pfkey.c Mon Feb 6 08:49:57 2017 (r313330) @@ -1776,21 +1776,17 @@ pfkey_align(msg, mhp) case SADB_EXT_SPIRANGE: case SADB_X_EXT_POLICY: case SADB_X_EXT_SA2: - case SADB_X_EXT_SA_REPLAY: - mhp[ext->sadb_ext_type] = (caddr_t)ext; - break; case SADB_X_EXT_NAT_T_TYPE: case SADB_X_EXT_NAT_T_SPORT: case SADB_X_EXT_NAT_T_DPORT: - /* case SADB_X_EXT_NAT_T_OA: is OAI */ case SADB_X_EXT_NAT_T_OAI: case SADB_X_EXT_NAT_T_OAR: case SADB_X_EXT_NAT_T_FRAG: - if (feature_present("ipsec_natt")) { - mhp[ext->sadb_ext_type] = (caddr_t)ext; - break; - } - /* FALLTHROUGH */ + case SADB_X_EXT_SA_REPLAY: + case SADB_X_EXT_NEW_ADDRESS_SRC: + case SADB_X_EXT_NEW_ADDRESS_DST: + mhp[ext->sadb_ext_type] = (caddr_t)ext; + break; default: __ipsec_errcode = EIPSEC_INVAL_EXTTYPE; return -1; Modified: head/lib/libipsec/pfkey_dump.c ============================================================================== --- head/lib/libipsec/pfkey_dump.c Mon Feb 6 08:27:19 2017 (r313329) +++ head/lib/libipsec/pfkey_dump.c Mon Feb 6 08:49:57 2017 (r313330) @@ -220,6 +220,9 @@ pfkey_sadump(m) struct sadb_ident *m_sid, *m_did; struct sadb_sens *m_sens; struct sadb_x_sa_replay *m_sa_replay; + struct sadb_x_nat_t_type *natt_type; + struct sadb_x_nat_t_port *natt_sport, *natt_dport; + struct sadb_address *natt_oai, *natt_oar; /* check pfkey message. */ if (pfkey_align(m, mhp)) { @@ -245,33 +248,46 @@ pfkey_sadump(m) m_did = (struct sadb_ident *)mhp[SADB_EXT_IDENTITY_DST]; m_sens = (struct sadb_sens *)mhp[SADB_EXT_SENSITIVITY]; m_sa_replay = (struct sadb_x_sa_replay *)mhp[SADB_X_EXT_SA_REPLAY]; + natt_type = (struct sadb_x_nat_t_type *)mhp[SADB_X_EXT_NAT_T_TYPE]; + natt_sport = (struct sadb_x_nat_t_port *)mhp[SADB_X_EXT_NAT_T_SPORT]; + natt_dport = (struct sadb_x_nat_t_port *)mhp[SADB_X_EXT_NAT_T_DPORT]; + natt_oai = (struct sadb_address *)mhp[SADB_X_EXT_NAT_T_OAI]; + natt_oar = (struct sadb_address *)mhp[SADB_X_EXT_NAT_T_OAR]; + /* source address */ if (m_saddr == NULL) { printf("no ADDRESS_SRC extension.\n"); return; } - printf("%s ", str_ipaddr((struct sockaddr *)(m_saddr + 1))); + printf("%s", str_ipaddr((struct sockaddr *)(m_saddr + 1))); + if (natt_type != NULL && natt_sport != NULL) + printf("[%u]", ntohs(natt_sport->sadb_x_nat_t_port_port)); /* destination address */ if (m_daddr == NULL) { - printf("no ADDRESS_DST extension.\n"); + printf("\nno ADDRESS_DST extension.\n"); return; } - printf("%s ", str_ipaddr((struct sockaddr *)(m_daddr + 1))); + printf(" %s", str_ipaddr((struct sockaddr *)(m_daddr + 1))); + if (natt_type != NULL && natt_dport != NULL) + printf("[%u]", ntohs(natt_dport->sadb_x_nat_t_port_port)); /* SA type */ if (m_sa == NULL) { - printf("no SA extension.\n"); + printf("\nno SA extension.\n"); return; } if (m_sa2 == NULL) { - printf("no SA2 extension.\n"); + printf("\nno SA2 extension.\n"); return; } printf("\n\t"); - GETMSGSTR(str_satype, m->sadb_msg_satype); + if (m->sadb_msg_satype == SADB_SATYPE_ESP && natt_type != NULL) + printf("esp-udp "); + else + GETMSGSTR(str_satype, m->sadb_msg_satype); printf("mode="); GETMSGSTR(str_mode, m_sa2->sadb_x_sa2_mode); @@ -282,6 +298,18 @@ pfkey_sadump(m) (u_int32_t)m_sa2->sadb_x_sa2_reqid, (u_int32_t)m_sa2->sadb_x_sa2_reqid); + /* other NAT-T information */ + if (natt_type != NULL && (natt_oai != NULL || natt_oar != NULL)) { + printf("\tNAT:"); + if (natt_oai != NULL) + printf(" OAI=%s", + str_ipaddr((struct sockaddr *)(natt_oai + 1))); + if (natt_oar != NULL) + printf(" OAR=%s", + str_ipaddr((struct sockaddr *)(natt_oar + 1))); + printf("\n"); + } + /* encryption key */ if (m->sadb_msg_satype == SADB_X_SATYPE_IPCOMP) { printf("\tC: "); Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Mon Feb 6 08:27:19 2017 (r313329) +++ head/sbin/ifconfig/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -34,6 +34,7 @@ SRCS+= ifvlan.c # SIOC[GS]ETVLAN suppor SRCS+= ifvxlan.c # VXLAN support SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround +SRCS+= ifipsec.c # IPsec VTI SRCS+= sfp.c # SFP/SFP+ information LIBADD+= m Added: head/sbin/ifconfig/ifipsec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ifconfig/ifipsec.c Mon Feb 6 08:49:57 2017 (r313330) @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 2016 Yandex LLC + * Copyright (c) 2016 Andrey V. Elsukov + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ifconfig.h" + +static void +ipsec_status(int s) +{ + uint32_t reqid; + + ifr.ifr_data = (caddr_t)&reqid; + if (ioctl(s, IPSECGREQID, &ifr) == -1) + return; + printf("\treqid: %u\n", reqid); +} + +static +DECL_CMD_FUNC(setreqid, val, arg) +{ + char *ep; + uint32_t v; + + v = strtoul(val, &ep, 0); + if (*ep != '\0') { + warn("Invalid reqid value %s", val); + return; + } + ifr.ifr_data = (char *)&v; + if (ioctl(s, IPSECSREQID, &ifr) == -1) { + warn("ioctl(IPSECSREQID)"); + return; + } +} + +static struct cmd ipsec_cmds[] = { + DEF_CMD_ARG("reqid", setreqid), +}; + +static struct afswtch af_ipsec = { + .af_name = "af_ipsec", + .af_af = AF_UNSPEC, + .af_other_status = ipsec_status, +}; + +static __constructor void +ipsec_ctor(void) +{ + size_t i; + + for (i = 0; i < nitems(ipsec_cmds); i++) + cmd_register(&ipsec_cmds[i]); + af_register(&af_ipsec); +#undef N +} Modified: head/sbin/setkey/setkey.8 ============================================================================== --- head/sbin/setkey/setkey.8 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sbin/setkey/setkey.8 Mon Feb 6 08:49:57 2017 (r313330) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2016 +.Dd February 6, 2017 .Dt SETKEY 8 .Os .\" @@ -270,8 +270,6 @@ must be a decimal number, or a hexadecim prefix. SPI values between 0 and 255 are reserved for future use by IANA and they cannot be used. -TCP-MD5 associations must use 0x1000 and therefore only have per-host -granularity at this time. .\" .Pp .It Ar extensions Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -201,6 +201,7 @@ MAN= aac.4 \ icmp.4 \ icmp6.4 \ ida.4 \ + if_ipsec.4 \ ifmib.4 \ ig4.4 \ igb.4 \ Added: head/share/man/man4/if_ipsec.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/if_ipsec.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -0,0 +1,141 @@ +.\" Copyright (c) 2017 Andrey V. Elsukov +.\" 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 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 February 6, 2017 +.Dt if_ipsec 4 +.Os +.Sh NAME +.Nm if_ipsec +.Nd IPsec virtual tunneling interface +.Sh SYNOPSIS +The +.Cm if_ipsec +network interface is a part of the +.Fx +IPsec implementation. +To compile it into the kernel, place this line in the kernel +configuration file: +.Bd -ragged -offset indent +.Cd "options IPSEC" +.Ed +.Pp +It can also be loaded as part of the +.Cm ipsec +kernel module if the kernel was compiled with +.Bd -ragged -offset indent +.Cd "options IPSEC_SUPPORT" +.Ed +.Sh DESCRIPTION +The +.Nm +network interface is targeted for creating route-based VPNs. +It can tunnel IPv4 and IPv6 traffic over either IPv4 or IPv6 and secure +it with ESP. +.Pp +.Nm +interfaces are dynamically created and destroyed with the +.Xr ifconfig 8 +.Cm create +and +.Cm destroy +subcommands. +The administrator must configure IPsec +.Cm tunnel +endpoint addresses. +These addresses will be used for the outer IP header of ESP packets. +The administrator can also configure the protocol and addresses for the inner +IP header with +.Xr ifconfig 8 , +and modify the routing table to route the packets through the +.Nm +interface. +.Pp +When the +.Nm +interface is configured, it automatically creates special security policies. +These policies can be used to acquire security associations from the IKE daemon, +which are needed for establishing an IPsec tunnel. +It is also possible to create needed security associations manually with the +.Xr setkey 8 +utility. +.Pp +Each +.Nm +interface has an additional numeric configuration option +.Cm reqid Ar id . +This +.Ar id +is used to distinguish traffic and security policies between several +.Nm +interfaces. +The +.Cm reqid +can be specified on interface creation and changed later. +If not specified, it is automatically assigned. +Note that changing +.Cm reqid +will lead to generation of new security policies, and this +may require creating new security associations. +.Sh EXAMPLES +The example below shows manual configuration of an IPsec tunnel +between two FreeBSD hosts. +Host A has the IP address 192.168.0.3, and host B has the IP address +192.168.0.5. +.Pp +On host A: +.Bd -literal -offset indent +ifconfig ipsec0 create reqid 100 +ifconfig ipsec0 inet tunnel 192.168.0.3 192.168.0.5 +ifconfig ipsec0 inet 172.16.0.3/16 172.16.0.5 +setkey -c +add 192.168.0.3 192.168.0.5 esp 10000 -m tunnel -u 100 -E rijndael-cbc "VerySecureKey!!1"; +add 192.168.0.5 192.168.0.3 esp 10001 -m tunnel -u 100 -E rijndael-cbc "VerySecureKey!!2"; +^D +.Ed +.Pp +On host B: +.Bd -literal -offset indent +ifconfig ipsec0 create reqid 200 +ifconfig ipsec0 inet tunnel 192.168.0.5 192.168.0.3 +ifconfig ipsec0 inet 172.16.0.5/16 172.16.0.3 +setkey -c +add 192.168.0.3 192.168.0.5 esp 10000 -m tunnel -u 200 -E rijndael-cbc "VerySecureKey!!1"; +add 192.168.0.5 192.168.0.3 esp 10001 -m tunnel -u 200 -E rijndael-cbc "VerySecureKey!!2"; +^D +.Ed +.Pp +Note the value 100 on host A and value 200 on host B are used as reqid. +The same value must be used as identifier of the policy entry in the +.Xr setkey 8 +command. +.Sh SEE ALSO +.Xr gif 4 , +.Xr gre 4 , +.Xr ipsec 4 , +.Xr ifconfig 8 , +.Xr setkey 8 +.Sh AUTHORS +.An Andrey V. Elsukov Aq Mt ae@FreeBSD.org Modified: head/share/man/man4/ipsec.4 ============================================================================== --- head/share/man/man4/ipsec.4 Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/ipsec.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2009 +.Dd February 6, 2017 .Dt IPSEC 4 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nd Internet Protocol Security protocol .Sh SYNOPSIS .Cd "options IPSEC" +.Cd "options IPSEC_SUPPORT" .Cd "device crypto" .Pp .In sys/types.h @@ -151,6 +152,16 @@ Refer to .Xr setkey 8 on how to use it. .Pp +Depending on the socket's address family, IPPROTO_IP or IPPROTO_IPV6 +transport level and IP_IPSEC_POLICY or IPV6_IPSEC_POLICY socket options +may be used to configure per-socket security policies. +A properly-formed IPsec policy specification structure can be +created using +.Xr ipsec_set_policy 3 +function and used as socket option value for the +.Xr setsockopt 2 +call. +.Pp When setting policies using the .Xr setkey 8 command, the @@ -228,6 +239,8 @@ for tweaking the kernel's IPsec behavior .It "net.inet.ipsec.dfbit integer yes" .It "net.inet.ipsec.ecn integer yes" .It "net.inet.ipsec.debug integer yes" +.It "net.inet.ipsec.natt_cksum_policy integer yes" +.It "net.inet.ipsec.check_policy_history integer yes" .It "net.inet6.ipsec6.ecn integer yes" .It "net.inet6.ipsec6.debug integer yes" .El @@ -270,6 +283,23 @@ talks more about the behavior. .It Li ipsec.debug If set to non-zero, debug messages will be generated via .Xr syslog 3 . +.It Li ipsec.natt_cksum_policy +Controls how the kernel handles TCP and UDP checksums when ESP in UDP +encapsulation is used for IPsec transport mode. +If set to a non-zero value, the kernel fully recomputes checksums for +inbound TCP segments and UDP datagrams after they are decapsulated and +decrypted. +If set to 0 and original addresses were configured for corresponding SA +by the IKE daemon, the kernel incrementally recomputes checksums for +inbound TCP segments and UDP datagrams. +If addresses were not configured, the checksums are ignored. +.It Li ipsec.check_policy_history +Enables strict policy checking for inbound packets. +By default, inbound security policies check that packets handled by IPsec +have been decrypted and authenticated. +If this variable is set to a non-zero value, each packet handled by IPsec +is checked against the history of IPsec security associations. +The IPsec security protocol, mode, and SA addresses must match. .El .Pp Variables under the @@ -305,6 +335,7 @@ routines from looking into the IP payloa .Xr ipsec_set_policy 3 , .Xr crypto 4 , .Xr enc 4 , +.Xr if_ipsec 4 , .Xr icmp6 4 , .Xr intro 4 , .Xr ip6 4 , Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/tcp.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd Jan 29, 2017 +.Dd February 6, 2017 .Dt TCP 4 .Os .Sh NAME @@ -272,33 +272,27 @@ or the internal send buffer is filled. This option enables the use of MD5 digests (also known as TCP-MD5) on writes to the specified socket. Outgoing traffic is digested; -digests on incoming traffic are verified if the -.Va net.inet.tcp.signature_verify_input -sysctl is nonzero. -The current default behavior for the system is to respond to a system -advertising this option with TCP-MD5; this may change. +digests on incoming traffic are verified. +When this option is enabled on a socket, all inbound and outgoing +TCP segments must be signed with MD5 digests. .Pp One common use for this in a .Fx router deployment is to enable based routers to interwork with Cisco equipment at peering points. Support for this feature conforms to RFC 2385. -Only IPv4 -.Pq Dv AF_INET -sessions are supported. .Pp In order for this option to function correctly, it is necessary for the administrator to add a tcp-md5 key entry to the system's security associations database (SADB) using the .Xr setkey 8 utility. -This entry must have an SPI of 0x1000 and can therefore only be specified -on a per-host basis at this time. +This entry can only be specified on a per-host basis at this time. .Pp -If an SADB entry cannot be found for the destination, the outgoing traffic -will have an invalid digest option prepended, and the following error message -will be visible on the system console: -.Em "tcp_signature_compute: SADB lookup failed for %d.%d.%d.%d" . +If an SADB entry cannot be found for the destination, +the system does not send any outgoing segments and drops any inbound segments. +.Pp +Each dropped segment is taken into account in the TCP protocol statistics. .El .Pp The option level for the Modified: head/share/man/man4/udp.4 ============================================================================== --- head/share/man/man4/udp.4 Mon Feb 6 08:27:19 2017 (r313329) +++ head/share/man/man4/udp.4 Mon Feb 6 08:49:57 2017 (r313330) @@ -28,7 +28,7 @@ .\" @(#)udp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd February 6, 2017 .Dt UDP 4 .Os .Sh NAME @@ -99,6 +99,17 @@ transport level may be used with .Tn UDP ; see .Xr ip 4 . +.Tn UDP_ENCAP +socket option may be used at the +.Tn IPPROTO_UDP +level to encapsulate +.Tn ESP +packets in +.Tn UDP . +Only one value is supported for this option: +.Tn UDP_ENCAP_ESPINUDP +from RFC 3948, defined in +.In netinet/udp.h . .Sh MIB VARIABLES The .Nm @@ -158,7 +169,8 @@ exists. .Xr blackhole 4 , .Xr inet 4 , .Xr intro 4 , -.Xr ip 4 +.Xr ip 4 , +.Xr udplite 4 .Sh HISTORY The .Nm Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/NOTES Mon Feb 6 08:49:57 2017 (r313330) @@ -627,12 +627,12 @@ options TCP_OFFLOAD # TCP offload supp # In order to enable IPSEC you MUST also add device crypto to # your kernel configuration options IPSEC #IP security (requires device crypto) + +# Option IPSEC_SUPPORT does not enable IPsec, but makes it possible to +# load it as a kernel module. You still MUST add device crypto to your kernel +# configuration. +options IPSEC_SUPPORT #options IPSEC_DEBUG #debug for IP security -# -# Set IPSEC_NAT_T to enable NAT-Traversal support. This enables -# optional UDP encapsulation of ESP packets. -# -options IPSEC_NAT_T #NAT-T support, UDP encap of ESP # # SMB/CIFS requester @@ -1027,7 +1027,8 @@ options ACCEPT_FILTER_HTTP # carried in TCP option 19. This option is commonly used to protect # TCP sessions (e.g. BGP) where IPSEC is not available nor desirable. # This is enabled on a per-socket basis using the TCP_MD5SIG socket option. -# This requires the use of 'device crypto' and 'options IPSEC'. +# This requires the use of 'device crypto' and either 'options IPSEC' or +# 'options IPSEC_SUPPORT'. options TCP_SIGNATURE #include support for RFC 2385 # DUMMYNET enables the "dummynet" bandwidth limiter. You need IPFIREWALL Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files Mon Feb 6 08:49:57 2017 (r313330) @@ -587,22 +587,24 @@ contrib/ngatm/netnatm/sig/sig_unimsgcpy. compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" -crypto/blowfish/bf_ecb.c optional ipsec -crypto/blowfish/bf_skey.c optional crypto | ipsec -crypto/camellia/camellia.c optional crypto | ipsec -crypto/camellia/camellia-api.c optional crypto | ipsec -crypto/des/des_ecb.c optional crypto | ipsec | netsmb -crypto/des/des_setkey.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_ecb.c optional ipsec | ipsec_support +crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support +crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support +crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support +crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb +crypto/des/des_setkey.c optional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | geom_bde | \ - ipsec | random !random_loadable | wlan_ccmp + ipsec | ipsec_support | random !random_loadable | wlan_ccmp crypto/rijndael/rijndael-api-fst.c optional ekcd | geom_bde | random !random_loadable -crypto/rijndael/rijndael-api.c optional crypto | ipsec | wlan_ccmp +crypto/rijndael/rijndael-api.c optional crypto | ipsec | ipsec_support | \ + wlan_ccmp crypto/sha1.c optional carp | crypto | ipsec | \ - netgraph_mppc_encryption | sctp -crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | random !random_loadable | \ - sctp | zfs -crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | zfs + ipsec_support | netgraph_mppc_encryption | sctp +crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | \ + ipsec_support | random !random_loadable | sctp | zfs +crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | \ + ipsec_support | zfs crypto/skein/skein.c optional crypto | zfs crypto/skein/skein_block.c optional crypto | zfs crypto/siphash/siphash.c optional inet | inet6 @@ -3879,8 +3881,7 @@ libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard libkern/zlib.c optional crypto | geom_uzip | ipsec | \ - mxge | netgraph_deflate | \ - ddb_ctf | gzio + ipsec_support | mxge | netgraph_deflate | ddb_ctf | gzio net/altq/altq_cbq.c optional altq net/altq/altq_cdnr.c optional altq net/altq/altq_codel.c optional altq @@ -3916,6 +3917,7 @@ net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet | gre inet6 +net/if_ipsec.c optional inet ipsec | inet6 ipsec net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop @@ -4104,7 +4106,6 @@ netinet/ip_encap.c optional inet | inet netinet/ip_fastfwd.c optional inet netinet/ip_icmp.c optional inet | inet6 netinet/ip_input.c optional inet -netinet/ip_ipsec.c optional inet ipsec netinet/ip_mroute.c optional mrouting inet netinet/ip_options.c optional inet netinet/ip_output.c optional inet @@ -4174,7 +4175,6 @@ netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 netinet6/ip6_output.c optional inet6 -netinet6/ip6_ipsec.c optional inet6 ipsec netinet6/mld6.c optional inet6 netinet6/nd6.c optional inet6 netinet6/nd6_nbr.c optional inet6 @@ -4187,15 +4187,25 @@ netinet6/udp6_usrreq.c optional inet6 netipsec/ipsec.c optional ipsec inet | ipsec inet6 netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 +netipsec/ipsec_mod.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 -netipsec/key.c optional ipsec inet | ipsec inet6 -netipsec/key_debug.c optional ipsec inet | ipsec inet6 -netipsec/keysock.c optional ipsec inet | ipsec inet6 +netipsec/ipsec_pcb.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/key.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/key_debug.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/keysock.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/subr_ipsec.c optional ipsec inet | ipsec inet6 | \ + ipsec_support inet | ipsec_support inet6 +netipsec/udpencap.c optional ipsec inet netipsec/xform_ah.c optional ipsec inet | ipsec inet6 netipsec/xform_esp.c optional ipsec inet | ipsec inet6 netipsec/xform_ipcomp.c optional ipsec inet | ipsec inet6 netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ - ipsec inet6 tcp_signature + ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \ + ipsec_support inet6 tcp_signature netnatm/natm.c optional natm netnatm/natm_pcb.c optional natm netnatm/natm_proto.c optional natm @@ -4547,18 +4557,18 @@ ofed/drivers/infiniband/hw/mthca/mthca_u compile-with "${OFED_C}" # crypto support -opencrypto/cast.c optional crypto | ipsec -opencrypto/criov.c optional crypto | ipsec -opencrypto/crypto.c optional crypto | ipsec +opencrypto/cast.c optional crypto | ipsec | ipsec_support +opencrypto/criov.c optional crypto | ipsec | ipsec_support +opencrypto/crypto.c optional crypto | ipsec | ipsec_support opencrypto/cryptodev.c optional cryptodev -opencrypto/cryptodev_if.m optional crypto | ipsec -opencrypto/cryptosoft.c optional crypto | ipsec -opencrypto/cryptodeflate.c optional crypto | ipsec -opencrypto/gmac.c optional crypto | ipsec -opencrypto/gfmult.c optional crypto | ipsec -opencrypto/rmd160.c optional crypto | ipsec -opencrypto/skipjack.c optional crypto | ipsec -opencrypto/xform.c optional crypto | ipsec +opencrypto/cryptodev_if.m optional crypto | ipsec | ipsec_support +opencrypto/cryptosoft.c optional crypto | ipsec | ipsec_support +opencrypto/cryptodeflate.c optional crypto | ipsec | ipsec_support +opencrypto/gmac.c optional crypto | ipsec | ipsec_support +opencrypto/gfmult.c optional crypto | ipsec | ipsec_support +opencrypto/rmd160.c optional crypto | ipsec | ipsec_support +opencrypto/skipjack.c optional crypto | ipsec | ipsec_support +opencrypto/xform.c optional crypto | ipsec | ipsec_support rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.amd64 Mon Feb 6 08:49:57 2017 (r313330) @@ -180,8 +180,9 @@ aesni_wrap.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_wrap.o" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | \ + ipsec_support | netsmb crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.arm Mon Feb 6 08:49:57 2017 (r313330) @@ -112,8 +112,8 @@ cddl/compat/opensolaris/kern/opensolaris cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/dwc/if_dwc.c optional dwc dev/dwc/if_dwc_if.m optional dwc Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.arm64 Mon Feb 6 08:49:57 2017 (r313330) @@ -142,8 +142,8 @@ armv8_crypto_wrap.o optional armv8crypt compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8a+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "armv8_crypto_wrap.o" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/acpica/acpi_if.m optional acpi dev/ahci/ahci_generic.c optional ahci dev/cpufreq/cpufreq_dt.c optional cpufreq fdt Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.i386 Mon Feb 6 08:49:57 2017 (r313330) @@ -143,7 +143,7 @@ compat/svr4/svr4_syscallnames.c optional compat/svr4/svr4_sysent.c optional compat_svr4 compat/svr4/svr4_sysvec.c optional compat_svr4 compat/svr4/svr4_termios.c optional compat_svr4 -bf_enc.o optional crypto | ipsec \ +bf_enc.o optional crypto | ipsec | ipsec_support \ dependency "$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \ compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \ no-implicit-rule @@ -159,7 +159,7 @@ aesni_wrap.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_wrap.o" -crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb +crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.mips Mon Feb 6 08:49:57 2017 (r313330) @@ -83,8 +83,10 @@ mips/mips/sc_machdep.c optional sc dev/uart/uart_cpu_fdt.c optional uart fdt # crypto support -- use generic -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | \ + ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | \ + ipsec_support | netsmb # AP common nvram interface MIPS specific, but maybe should be more generic dev/nvram2env/nvram2env_mips.c optional nvram2env Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.powerpc Mon Feb 6 08:49:57 2017 (r313330) @@ -20,8 +20,8 @@ cddl/contrib/opensolaris/common/atomic/p cddl/dev/dtrace/powerpc/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/bm/if_bm.c optional bm powermac dev/adb/adb_bus.c optional adb dev/adb/adb_kbd.c optional adb Modified: head/sys/conf/files.riscv ============================================================================== --- head/sys/conf/files.riscv Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.riscv Mon Feb 6 08:49:57 2017 (r313330) @@ -3,8 +3,8 @@ cddl/compat/opensolaris/kern/opensolaris cddl/dev/dtrace/riscv/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/riscv/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/riscv/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/ofw/ofw_cpu.c optional fdt dev/uart/uart_cpu_fdt.c optional uart fdt dev/xilinx/axi_quad_spi.c optional xilinx_spi Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/files.sparc64 Mon Feb 6 08:49:57 2017 (r313330) @@ -23,8 +23,8 @@ ukbdmap.h optional ukbd_dflt_keymap \ clean "ukbdmap.h" # cddl/contrib/opensolaris/common/atomic/sparc64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec | netsmb +crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support +crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/atkbdc/atkbd.c optional atkbd atkbdc dev/atkbdc/atkbd_atkbdc.c optional atkbd atkbdc dev/atkbdc/atkbdc.c optional atkbdc Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/kern.opts.mk Mon Feb 6 08:49:57 2017 (r313330) @@ -34,6 +34,7 @@ __DEFAULT_YES_OPTIONS = \ INET \ INET6 \ IPFILTER \ + IPSEC_SUPPORT \ ISCSI \ KERNEL_SYMBOLS \ NETGRAPH \ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/conf/options Mon Feb 6 08:49:57 2017 (r313330) @@ -428,7 +428,7 @@ IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IPSEC_NAT_T opt_ipsec.h +IPSEC_SUPPORT opt_ipsec.h IPSTEALTH KRPC LIBALIAS @@ -451,7 +451,7 @@ TCP_HHOOK opt_inet.h TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_RFC7413 opt_inet.h TCP_RFC7413_MAX_KEYS opt_inet.h -TCP_SIGNATURE opt_inet.h +TCP_SIGNATURE opt_ipsec.h VLAN_ARRAY opt_vlan.h XBONEHACK FLOWTABLE opt_route.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Feb 6 08:27:19 2017 (r313329) +++ head/sys/modules/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -177,6 +177,7 @@ SUBDIR= \ ip6_mroute_mod \ ip_mroute_mod \ ${_ips} \ + ${_ipsec} \ ${_ipw} \ ${_ipwfw} \ ${_isci} \ @@ -357,6 +358,7 @@ SUBDIR= \ sysvipc \ ${_ti} \ ${_tcp_fastpath} \ + ${_tcpmd5} \ tests/framework \ tests/callout_test \ tl \ @@ -447,6 +449,10 @@ _toecore= toecore _if_enc= if_enc _if_gif= if_gif _if_gre= if_gre +.if ${MK_IPSEC_SUPPORT} != "no" +_ipsec= ipsec +_tcpmd5= tcp/tcpmd5 +.endif .endif .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ Added: head/sys/modules/ipsec/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/ipsec/Makefile Mon Feb 6 08:49:57 2017 (r313330) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netipsec + +KMOD= ipsec +SRCS= if_ipsec.c ipsec.c ipsec_input.c ipsec_mbuf.c ipsec_mod.c \ + ipsec_output.c xform_ah.c xform_esp.c xform_ipcomp.c \ + opt_inet.h opt_inet6.h opt_ipsec.h opt_sctp.h +SRCS.INET= udpencap.c + +opt_ipsec.h: + @echo "#define IPSEC_SUPPORT 1" > ${.TARGET} + +.include Added: head/sys/modules/tcp/tcpmd5/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/tcp/tcpmd5/Makefile Mon Feb 6 08:49:57 2017 (r313330) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 6 08:56:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF1CDCD2516; Mon, 6 Feb 2017 08:56:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF05FD54; Mon, 6 Feb 2017 08:56:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168u4i3068296; Mon, 6 Feb 2017 08:56:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168u4Db068295; Mon, 6 Feb 2017 08:56:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201702060856.v168u4Db068295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 6 Feb 2017 08:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313331 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 08:56:06 -0000 Author: ae Date: Mon Feb 6 08:56:04 2017 New Revision: 313331 URL: https://svnweb.freebsd.org/changeset/base/313331 Log: Add removed headers into the ObsoleteFiles.inc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Feb 6 08:49:57 2017 (r313330) +++ head/ObsoleteFiles.inc Mon Feb 6 08:56:04 2017 (r313331) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20170206: merged projects/ipsec +OLD_FILES+=usr/include/netinet/ip_ipsec.h +OLD_FILES+=usr/include/netinet6/ip6_ipsec.h # 20170128: remove pc98 support OLD_FILES+=usr/include/dev/ic/i8251.h OLD_FILES+=usr/include/dev/ic/i8255.h From owner-svn-src-all@freebsd.org Mon Feb 6 08:58:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7615CD2634; Mon, 6 Feb 2017 08:58:41 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81EB7FD5; Mon, 6 Feb 2017 08:58:41 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v168wepX068559; Mon, 6 Feb 2017 08:58:40 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v168weso068556; Mon, 6 Feb 2017 08:58:40 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702060858.v168weso068556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 08:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313332 - head/sys/boot/common 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 08:58:41 -0000 Author: tsoome Date: Mon Feb 6 08:58:40 2017 New Revision: 313332 URL: https://svnweb.freebsd.org/changeset/base/313332 Log: loader: bcache read ahead block count should take account the large sectors The loader bcache is implementing simple read-ahead to boost the cache. The bcache is built based on 512B block sizes, and the read ahead is attempting to read number of cache blocks, based on amount of the free bcache space. However, there are devices using larger sector sizes than 512B, most obviously the CD media is based on 2k sectors. This means the read-ahead can not be just random number of blocks, but we should use value suitable also for use with larger sectors, as for example, with CD devices, we should read multiple of 2KB. Since the sector size from disk interface is not too reliable, i guess we can just use "good enough" value, so the implementation is rounding down the read ahead block count to be multiple of 16. This means we have covered sector sizes to 8k. In addition, the update does implement the end of cache marker, to help to detect the possible memory corruption - I have not seen it happening so far, but it does not hurt to have the detection mechanism in place. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9179 Modified: head/sys/boot/common/bcache.c head/sys/boot/common/bootstrap.h Modified: head/sys/boot/common/bcache.c ============================================================================== --- head/sys/boot/common/bcache.c Mon Feb 6 08:56:04 2017 (r313331) +++ head/sys/boot/common/bcache.c Mon Feb 6 08:58:40 2017 (r313332) @@ -64,7 +64,7 @@ struct bcachectl struct bcache { struct bcachectl *bcache_ctl; caddr_t bcache_data; - u_int bcache_nblks; + size_t bcache_nblks; size_t ra; }; @@ -86,6 +86,7 @@ static u_int bcache_rablks; ((bc)->bcache_ctl[BHASH((bc), (blkno))].bc_blkno != (blkno)) #define BCACHE_READAHEAD 256 #define BCACHE_MINREADAHEAD 32 +#define BCACHE_MARKER 0xdeadbeef static void bcache_invalidate(struct bcache *bc, daddr_t blkno); static void bcache_insert(struct bcache *bc, daddr_t blkno); @@ -95,7 +96,7 @@ static void bcache_free_instance(struct * Initialise the cache for (nblks) of (bsize). */ void -bcache_init(u_int nblks, size_t bsize) +bcache_init(size_t nblks, size_t bsize) { /* set up control data */ bcache_total_nblks = nblks; @@ -122,6 +123,7 @@ bcache_allocate(void) u_int i; struct bcache *bc = malloc(sizeof (struct bcache)); int disks = bcache_numdev; + uint32_t *marker; if (disks == 0) disks = 1; /* safe guard */ @@ -140,11 +142,13 @@ bcache_allocate(void) bc->bcache_nblks = bcache_total_nblks >> i; bcache_unit_nblks = bc->bcache_nblks; - bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize); + bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize + + sizeof(uint32_t)); if (bc->bcache_data == NULL) { /* dont error out yet. fall back to 32 blocks and try again */ bc->bcache_nblks = 32; - bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize); + bc->bcache_data = malloc(bc->bcache_nblks * bcache_blksize + + sizeof(uint32_t)); } bc->bcache_ctl = malloc(bc->bcache_nblks * sizeof(struct bcachectl)); @@ -152,8 +156,11 @@ bcache_allocate(void) if ((bc->bcache_data == NULL) || (bc->bcache_ctl == NULL)) { bcache_free_instance(bc); errno = ENOMEM; - return(NULL); + return (NULL); } + /* Insert cache end marker. */ + marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); + *marker = BCACHE_MARKER; /* Flush the cache */ for (i = 0; i < bc->bcache_nblks; i++) { @@ -215,6 +222,9 @@ read_strategy(void *devdata, int rw, dad int result; daddr_t p_blk; caddr_t p_buf; + uint32_t *marker; + + marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); if (bc == NULL) { errno = ENODEV; @@ -261,9 +271,35 @@ read_strategy(void *devdata, int rw, dad p_size = MIN(r_size, nblk - i); /* read at least those blocks */ + /* + * The read ahead size setup. + * While the read ahead can save us IO, it also can complicate things: + * 1. We do not want to read ahead by wrapping around the + * bcache end - this would complicate the cache management. + * 2. We are using bc->ra as dynamic hint for read ahead size, + * detected cache hits will increase the read-ahead block count, and + * misses will decrease, see the code above. + * 3. The bcache is sized by 512B blocks, however, the underlying device + * may have a larger sector size, and we should perform the IO by + * taking into account these larger sector sizes. We could solve this by + * passing the sector size to bcache_allocate(), or by using ioctl(), but + * in this version we are using the constant, 16 blocks, and are rounding + * read ahead block count down to multiple of 16. + * Using the constant has two reasons, we are not entirely sure if the + * BIOS disk interface is providing the correct value for sector size. + * And secondly, this way we get the most conservative setup for the ra. + * + * The selection of multiple of 16 blocks (8KB) is quite arbitrary, however, + * we want to have the CD (2K) and the 4K disks to be covered. + * Also, as we have 32 blocks to be allocated as the fallback value in the + * bcache_allocate(), the 16 ra blocks will allow the read ahead + * to be used even with bcache this small. + */ + ra = bc->bcache_nblks - BHASH(bc, p_blk + p_size); - if (ra != bc->bcache_nblks) { /* do we have RA space? */ - ra = MIN(bc->ra, ra); + if (ra != 0 && ra != bc->bcache_nblks) { /* do we have RA space? */ + ra = MIN(bc->ra, ra - 1); + ra = rounddown(ra, 16); /* multiple of 16 blocks */ p_size += ra; } @@ -310,6 +346,12 @@ read_strategy(void *devdata, int rw, dad result = 0; } + if (*marker != BCACHE_MARKER) { + printf("BUG: bcache corruption detected: nblks: %zu p_blk: %lu, " + "p_size: %zu, ra: %zu\n", bc->bcache_nblks, + (long unsigned)BHASH(bc, p_blk), p_size, ra); + } + done: if ((result == 0) && (rsize != NULL)) *rsize = size; @@ -338,7 +380,7 @@ bcache_strategy(void *devdata, int rw, d /* bypass large requests, or when the cache is inactive */ if (bc == NULL || ((size * 2 / bcache_blksize) > bcache_nblks)) { - DEBUG("bypass %d from %d", size / bcache_blksize, blk); + DEBUG("bypass %zu from %qu", size / bcache_blksize, blk); bcache_bypasses++; return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); } Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Mon Feb 6 08:56:04 2017 (r313331) +++ head/sys/boot/common/bootstrap.h Mon Feb 6 08:58:40 2017 (r313332) @@ -73,7 +73,7 @@ int kern_pread(int fd, vm_offset_t dest, void *alloc_pread(int fd, off_t off, size_t len); /* bcache.c */ -void bcache_init(u_int nblks, size_t bsize); +void bcache_init(size_t nblks, size_t bsize); void bcache_add_dev(int); void *bcache_allocate(void); void bcache_free(void *); From owner-svn-src-all@freebsd.org Mon Feb 6 09:03:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8141BCD2B6F; Mon, 6 Feb 2017 09:03:24 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63F3015F6; Mon, 6 Feb 2017 09:03:24 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from T530-Allan.ScaleEngine.net (unknown [91.183.237.24]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id BCA0A13993; Mon, 6 Feb 2017 09:03:21 +0000 (UTC) Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Xin Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702060827.v168RJQY056084@repo.freebsd.org> <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Cc: d@delphij.net From: Allan Jude Message-ID: <84844dbb-c9ce-5397-4ae6-3657edf78136@freebsd.org> Date: Mon, 6 Feb 2017 04:03:20 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <89d00010-a1b8-78ac-974e-2846b4ff320b@delphij.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 09:03:24 -0000 On 02/06/17 03:36 AM, Xin Li wrote: > > > On 2/6/17 00:27, Allan Jude wrote: >> Author: allanjude >> Date: Mon Feb 6 08:27:19 2017 >> New Revision: 313329 >> URL: https://svnweb.freebsd.org/changeset/base/313329 >> >> Log: >> Remove bdes(1) >> >> The use of DES for anything is discouraged, especially with a static IV of 0 >> >> If you still need bdes(1) to decrypt Kirk's video lectures, see >> security/bdes in ports. >> >> This commit brought to you by the FOSDEM DevSummit and the >> "remove unneeded dependancies on openssl in base" working group >> >> Reviewed by: bapt, brnrd >> Relnotes: yes >> Sponsored by: FOSDEM DevSummit >> Differential Revision: https://reviews.freebsd.org/D9424 >> >> Deleted: >> head/secure/usr.bin/bdes/ >> Modified: >> head/bin/ed/ed.1 >> head/secure/usr.bin/Makefile >> head/usr.bin/Makefile >> head/usr.bin/enigma/enigma.1 > > Obsoletefiles.inc? > Woops, missed that, even after Bapt reminded me. I have created a review to make sure the entries are correct: https://reviews.freebsd.org/D9457 -- Allan Jude From owner-svn-src-all@freebsd.org Mon Feb 6 09:18:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 961AECD3124; Mon, 6 Feb 2017 09:18:49 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 646357D; Mon, 6 Feb 2017 09:18:49 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v169Im3D077843; Mon, 6 Feb 2017 09:18:48 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v169ImKG077835; Mon, 6 Feb 2017 09:18:48 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702060918.v169ImKG077835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 09:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313333 - in head: lib/libstand sys/boot/efi/include sys/boot/efi/libefi sys/boot/efi/loader sys/boot/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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 09:18:49 -0000 Author: tsoome Date: Mon Feb 6 09:18:47 2017 New Revision: 313333 URL: https://svnweb.freebsd.org/changeset/base/313333 Log: loader: Replace EFI part devices. Rewrite EFI part device interface to present disk devices in more user friendly way. We keep list of three types of devices: floppy, cd and disk, the visible names: fdX: cdX: and diskX: Use common/disk.c and common/part.c interfaces to manage the partitioning. The lsdev -l will additionally list the device path. Reviewed by: imp, allanjude Approved by: imp (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8581 Modified: head/lib/libstand/stand.h head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/devpath.c head/sys/boot/efi/libefi/efipart.c head/sys/boot/efi/loader/conf.c head/sys/boot/efi/loader/devicename.c head/sys/boot/efi/loader/main.c head/sys/boot/zfs/zfs.c Modified: head/lib/libstand/stand.h ============================================================================== --- head/lib/libstand/stand.h Mon Feb 6 08:58:40 2017 (r313332) +++ head/lib/libstand/stand.h Mon Feb 6 09:18:47 2017 (r313333) @@ -168,6 +168,7 @@ struct devdesc #define DEVT_NET 2 #define DEVT_CD 3 #define DEVT_ZFS 4 +#define DEVT_FD 5 int d_unit; void *d_opendata; }; Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/include/efilib.h Mon Feb 6 09:18:47 2017 (r313333) @@ -31,16 +31,37 @@ #define _LOADER_EFILIB_H #include +#include extern EFI_HANDLE IH; extern EFI_SYSTEM_TABLE *ST; extern EFI_BOOT_SERVICES *BS; extern EFI_RUNTIME_SERVICES *RS; -extern struct devsw efipart_dev; +extern struct devsw efipart_fddev; +extern struct devsw efipart_cddev; +extern struct devsw efipart_hddev; extern struct devsw efinet_dev; extern struct netif_driver efinetif; +/* EFI block device data, included here to help efi_zfs_probe() */ +typedef STAILQ_HEAD(pdinfo_list, pdinfo) pdinfo_list_t; + +typedef struct pdinfo +{ + STAILQ_ENTRY(pdinfo) pd_link; /* link in device list */ + pdinfo_list_t pd_part; /* link of partitions */ + EFI_HANDLE pd_handle; + EFI_HANDLE pd_alias; + EFI_DEVICE_PATH *pd_devpath; + EFI_BLOCK_IO *pd_blkio; + int pd_unit; /* unit number */ + int pd_open; /* reference counter */ + void *pd_bcache; /* buffer cache data */ +} pdinfo_t; + +pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); + void *efi_get_table(EFI_GUID *tbl); int efi_register_handles(struct devsw *, EFI_HANDLE *, EFI_HANDLE *, int); @@ -53,6 +74,7 @@ EFI_DEVICE_PATH *efi_lookup_devpath(EFI_ EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *); +int efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); Modified: head/sys/boot/efi/libefi/devpath.c ============================================================================== --- head/sys/boot/efi/libefi/devpath.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/libefi/devpath.c Mon Feb 6 09:18:47 2017 (r313333) @@ -138,3 +138,31 @@ efi_devpath_handle(EFI_DEVICE_PATH *devp return (NULL); return (h); } + +int +efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) +{ + int len; + + if (devpath1 == NULL || devpath2 == NULL) + return (0); + + while (1) { + if (DevicePathType(devpath1) != DevicePathType(devpath2) || + DevicePathSubType(devpath1) != DevicePathSubType(devpath2)) + return (0); + + len = DevicePathNodeLength(devpath1); + if (len != DevicePathNodeLength(devpath2)) + return (0); + + if (memcmp(devpath1, devpath2, (size_t)len) != 0) + return (0); + + if (IsDevicePathEnd(devpath1)) + break; + devpath1 = NextDevicePathNode(devpath1); + devpath2 = NextDevicePathNode(devpath2); + } + return (1); +} Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/libefi/efipart.c Mon Feb 6 09:18:47 2017 (r313333) @@ -27,8 +27,10 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include +#include #include #include @@ -37,57 +39,110 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; -static int efipart_init(void); +static int efipart_initfd(void); +static int efipart_initcd(void); +static int efipart_inithd(void); + static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); static int efipart_realstrategy(void *, int, daddr_t, size_t, char *, size_t *); + static int efipart_open(struct open_file *, ...); static int efipart_close(struct open_file *); -static int efipart_print(int); +static int efipart_ioctl(struct open_file *, u_long, void *); -struct devsw efipart_dev = { - .dv_name = "part", - .dv_type = DEVT_DISK, - .dv_init = efipart_init, +static int efipart_printfd(int); +static int efipart_printcd(int); +static int efipart_printhd(int); + +struct devsw efipart_fddev = { + .dv_name = "fd", + .dv_type = DEVT_FD, + .dv_init = efipart_initfd, .dv_strategy = efipart_strategy, .dv_open = efipart_open, .dv_close = efipart_close, - .dv_ioctl = noioctl, - .dv_print = efipart_print, + .dv_ioctl = efipart_ioctl, + .dv_print = efipart_printfd, .dv_cleanup = NULL }; -/* - * info structure to support bcache - */ -struct pdinfo { - int pd_unit; /* unit number */ - int pd_open; /* reference counter */ - void *pd_bcache; /* buffer cache data */ +struct devsw efipart_cddev = { + .dv_name = "cd", + .dv_type = DEVT_CD, + .dv_init = efipart_initcd, + .dv_strategy = efipart_strategy, + .dv_open = efipart_open, + .dv_close = efipart_close, + .dv_ioctl = efipart_ioctl, + .dv_print = efipart_printcd, + .dv_cleanup = NULL }; -static struct pdinfo *pdinfo; -static int npdinfo = 0; -#define PD(dev) (pdinfo[(dev)->d_unit]) +struct devsw efipart_hddev = { + .dv_name = "disk", + .dv_type = DEVT_DISK, + .dv_init = efipart_inithd, + .dv_strategy = efipart_strategy, + .dv_open = efipart_open, + .dv_close = efipart_close, + .dv_ioctl = efipart_ioctl, + .dv_print = efipart_printhd, + .dv_cleanup = NULL +}; + +static pdinfo_list_t fdinfo; +static pdinfo_list_t cdinfo; +static pdinfo_list_t hdinfo; + +static EFI_HANDLE *efipart_handles = NULL; +static UINTN efipart_nhandles = 0; + +static pdinfo_t * +efiblk_get_pdinfo(pdinfo_list_t *pdi, int unit) +{ + pdinfo_t *pd; + + STAILQ_FOREACH(pd, pdi, pd_link) { + if (pd->pd_unit == unit) + return (pd); + } + return (NULL); +} static int -efipart_init(void) +efiblk_pdinfo_count(pdinfo_list_t *pdi) +{ + pdinfo_t *pd; + int i = 0; + + STAILQ_FOREACH(pd, pdi, pd_link) { + i++; + } + return (i); +} + +static int +efipart_inithandles(void) { - EFI_BLOCK_IO *blkio; - EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; - EFI_HANDLE *hin, *hout, *aliases, handle; - EFI_STATUS status; UINTN sz; - u_int n, nin, nout, nrdisk; - int err; + EFI_HANDLE *hin; + EFI_STATUS status; + + if (efipart_nhandles != 0) { + free(efipart_handles); + efipart_handles = NULL; + efipart_nhandles = 0; + } sz = 0; hin = NULL; - status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); + status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin); if (status == EFI_BUFFER_TOO_SMALL) { - hin = (EFI_HANDLE *)malloc(sz * 3); + hin = malloc(sz); status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin); if (EFI_ERROR(status)) @@ -96,33 +151,150 @@ efipart_init(void) if (EFI_ERROR(status)) return (efi_status_to_errno(status)); - /* Filter handles to only include FreeBSD partitions. */ - nin = sz / sizeof(EFI_HANDLE); - hout = hin + nin; - aliases = hout + nin; - nout = 0; - nrdisk = 0; - - bzero(aliases, nin * sizeof(EFI_HANDLE)); - pdinfo = malloc(nin * sizeof(*pdinfo)); - if (pdinfo == NULL) - return (ENOMEM); + efipart_handles = hin; + efipart_nhandles = sz; + return (0); +} - for (n = 0; n < nin; n++) { - devpath = efi_lookup_devpath(hin[n]); - if (devpath == NULL) { - continue; +static ACPI_HID_DEVICE_PATH * +efipart_floppy(EFI_DEVICE_PATH *node) +{ + ACPI_HID_DEVICE_PATH *acpi = NULL; + + if (DevicePathType(node) == ACPI_DEVICE_PATH && + DevicePathSubType(node) == ACPI_DP) { + acpi = (ACPI_HID_DEVICE_PATH *) node; + if (acpi->HID == EISA_PNP_ID(0x604) || + acpi->HID == EISA_PNP_ID(0x700) || + acpi->HID == EISA_ID(0x41d1, 0x701)) { + return (acpi); } + } + return (acpi); +} - status = BS->HandleProtocol(hin[n], &blkio_guid, - (void**)&blkio); - if (EFI_ERROR(status)) +/* + * Add or update entries with new handle data. + */ +static int +efipart_fdinfo_add(EFI_HANDLE handle, uint32_t uid, EFI_DEVICE_PATH *devpath) +{ + pdinfo_t *fd; + + fd = malloc(sizeof(pdinfo_t)); + if (fd == NULL) { + printf("Failed to register floppy %d, out of memory\n", uid); + return (ENOMEM); + } + memset(fd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&fd->pd_part); + + fd->pd_unit = uid; + fd->pd_handle = handle; + fd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&fdinfo, fd, pd_link); + return (0); +} + +static void +efipart_updatefd(void) +{ + EFI_DEVICE_PATH *devpath, *node; + ACPI_HID_DEVICE_PATH *acpi; + int i, nin; + + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) continue; - if (!blkio->Media->LogicalPartition) { - nrdisk++; + + if ((node = efi_devpath_last_node(devpath)) == NULL) continue; + if ((acpi = efipart_floppy(node)) != NULL) { + efipart_fdinfo_add(efipart_handles[i], acpi->UID, + devpath); + } + } +} + +static int +efipart_initfd(void) +{ + int rv; + + rv = efipart_inithandles(); + if (rv != 0) + return (rv); + STAILQ_INIT(&fdinfo); + + efipart_updatefd(); + + bcache_add_dev(efiblk_pdinfo_count(&fdinfo)); + return (0); +} + +/* + * Add or update entries with new handle data. + */ +static int +efipart_cdinfo_add(EFI_HANDLE handle, EFI_HANDLE alias, + EFI_DEVICE_PATH *devpath) +{ + int unit; + pdinfo_t *cd; + pdinfo_t *pd; + + unit = 0; + STAILQ_FOREACH(pd, &cdinfo, pd_link) { + if (efi_devpath_match(pd->pd_devpath, devpath) != 0) { + pd->pd_handle = handle; + pd->pd_alias = alias; + return (0); } + unit++; + } + + cd = malloc(sizeof(pdinfo_t)); + if (cd == NULL) { + printf("Failed to add cd %d, out of memory\n", unit); + return (ENOMEM); + } + memset(cd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&cd->pd_part); + + cd->pd_handle = handle; + cd->pd_unit = unit; + cd->pd_alias = alias; + cd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&cdinfo, cd, pd_link); + return (0); +} + +static void +efipart_updatecd(void) +{ + int i, nin; + EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; + EFI_HANDLE handle; + EFI_BLOCK_IO *blkio; + EFI_STATUS status; + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) + continue; + + if ((node = efi_devpath_last_node(devpath)) == NULL) + continue; + if (efipart_floppy(node) != NULL) + continue; + + status = BS->HandleProtocol(efipart_handles[i], + &blkio_guid, (void **)&blkio); + if (EFI_ERROR(status)) + continue; /* * If we come across a logical partition of subtype CDROM * it doesn't refer to the CD filesystem itself, but rather @@ -130,8 +302,6 @@ efipart_init(void) * we try to find the parent device and add that instead as * that will be the CD filesystem. */ - if ((node = efi_devpath_last_node(devpath)) == NULL) - continue; if (DevicePathType(node) == MEDIA_DEVICE_PATH && DevicePathSubType(node) == MEDIA_CDROM_DP) { devpathcpy = efi_devpath_trim(devpath); @@ -143,109 +313,400 @@ efipart_init(void) free(devpathcpy); if (EFI_ERROR(status)) continue; - hout[nout] = handle; - aliases[nout] = hin[n]; - } else - hout[nout] = hin[n]; - nout++; - pdinfo[npdinfo].pd_open = 0; - pdinfo[npdinfo].pd_bcache = NULL; - pdinfo[npdinfo].pd_unit = npdinfo; - npdinfo++; + devpath = efi_lookup_devpath(handle); + efipart_cdinfo_add(handle, efipart_handles[i], + devpath); + continue; + } + + if (DevicePathType(node) == MESSAGING_DEVICE_PATH && + DevicePathSubType(node) == MSG_ATAPI_DP) { + efipart_cdinfo_add(efipart_handles[i], NULL, + devpath); + continue; + } + + /* USB or SATA cd without the media. */ + if (blkio->Media->RemovableMedia && + !blkio->Media->MediaPresent) { + efipart_cdinfo_add(efipart_handles[i], NULL, + devpath); + } } +} - bcache_add_dev(npdinfo); - err = efi_register_handles(&efipart_dev, hout, aliases, nout); - free(hin); +static int +efipart_initcd(void) +{ + int rv; + + rv = efipart_inithandles(); + if (rv != 0) + return (rv); + STAILQ_INIT(&cdinfo); - if (nout == 0 && nrdisk > 0) - printf("Found %d disk(s) but no logical partition\n", nrdisk); - return (err); + efipart_updatecd(); + + bcache_add_dev(efiblk_pdinfo_count(&cdinfo)); + return (0); } static int -efipart_print(int verbose) +efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE part_handle) { - char line[80]; + EFI_DEVICE_PATH *disk_devpath, *part_devpath; + HARDDRIVE_DEVICE_PATH *node; + int unit; + pdinfo_t *hd, *pd, *last; + + disk_devpath = efi_lookup_devpath(disk_handle); + part_devpath = efi_lookup_devpath(part_handle); + if (disk_devpath == NULL || part_devpath == NULL) { + return (ENOENT); + } + + pd = malloc(sizeof(pdinfo_t)); + if (pd == NULL) { + printf("Failed to add disk, out of memory\n"); + return (ENOMEM); + } + memset(pd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&pd->pd_part); + node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); + + STAILQ_FOREACH(hd, &hdinfo, pd_link) { + if (efi_devpath_match(hd->pd_devpath, disk_devpath) != 0) { + /* Add the partition. */ + pd->pd_handle = part_handle; + pd->pd_unit = node->PartitionNumber; + pd->pd_devpath = part_devpath; + STAILQ_INSERT_TAIL(&hd->pd_part, pd, pd_link); + return (0); + } + } + + last = STAILQ_LAST(&hdinfo, pdinfo, pd_link); + if (last != NULL) + unit = last->pd_unit + 1; + else + unit = 0; + + /* Add the disk. */ + hd = pd; + hd->pd_handle = disk_handle; + hd->pd_unit = unit; + hd->pd_devpath = disk_devpath; + STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link); + + pd = malloc(sizeof(pdinfo_t)); + if (pd == NULL) { + printf("Failed to add partition, out of memory\n"); + return (ENOMEM); + } + memset(pd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&pd->pd_part); + + /* Add the partition. */ + pd->pd_handle = part_handle; + pd->pd_unit = node->PartitionNumber; + pd->pd_devpath = part_devpath; + STAILQ_INSERT_TAIL(&hd->pd_part, pd, pd_link); + + return (0); +} + +static void +efipart_updatehd(void) +{ + int i, nin; + EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; + EFI_HANDLE handle; EFI_BLOCK_IO *blkio; - EFI_HANDLE h; EFI_STATUS status; - u_int unit; + + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) + continue; + + if ((node = efi_devpath_last_node(devpath)) == NULL) + continue; + if (efipart_floppy(node) != NULL) + continue; + + status = BS->HandleProtocol(efipart_handles[i], + &blkio_guid, (void **)&blkio); + if (EFI_ERROR(status)) + continue; + + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_HARDDRIVE_DP) { + devpathcpy = efi_devpath_trim(devpath); + if (devpathcpy == NULL) + continue; + tmpdevpath = devpathcpy; + status = BS->LocateDevicePath(&blkio_guid, &tmpdevpath, + &handle); + free(devpathcpy); + if (EFI_ERROR(status)) + continue; + /* + * We do not support nested partitions. + */ + devpathcpy = efi_lookup_devpath(handle); + if (devpathcpy == NULL) + continue; + if ((node = efi_devpath_last_node(devpathcpy)) == NULL) + continue; + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_HARDDRIVE_DP) + continue; + efipart_hdinfo_add(handle, efipart_handles[i]); + continue; + } + } +} + +static int +efipart_inithd(void) +{ + int rv; + + rv = efipart_inithandles(); + if (rv != 0) + return (rv); + STAILQ_INIT(&hdinfo); + + efipart_updatehd(); + + bcache_add_dev(efiblk_pdinfo_count(&hdinfo)); + return (0); +} + +static int +efipart_print_common(struct devsw *dev, pdinfo_list_t *pdlist, int verbose) +{ int ret = 0; + EFI_BLOCK_IO *blkio; + EFI_STATUS status; + EFI_HANDLE h; + pdinfo_t *pd; + CHAR16 *text; + struct disk_devdesc pd_dev; + char line[80]; - printf("%s devices:", efipart_dev.dv_name); + if (STAILQ_EMPTY(pdlist)) + return (0); + + printf("%s devices:", dev->dv_name); if ((ret = pager_output("\n")) != 0) return (ret); - for (unit = 0, h = efi_find_handle(&efipart_dev, 0); - h != NULL; h = efi_find_handle(&efipart_dev, ++unit)) { - snprintf(line, sizeof(line), " %s%d:", - efipart_dev.dv_name, unit); - if ((ret = pager_output(line)) != 0) - break; - + STAILQ_FOREACH(pd, pdlist, pd_link) { + h = pd->pd_handle; + if (verbose) { /* Output the device path. */ + text = efi_devpath_name(efi_lookup_devpath(h)); + if (text != NULL) { + printf(" %S", text); + efi_free_devpath_name(text); + if ((ret = pager_output("\n")) != 0) + break; + } + } + snprintf(line, sizeof(line), + " %s%d", dev->dv_name, pd->pd_unit); + printf("%s:", line); status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); if (!EFI_ERROR(status)) { - snprintf(line, sizeof(line), " %llu blocks", - (unsigned long long)(blkio->Media->LastBlock + 1)); - if ((ret = pager_output(line)) != 0) + printf(" %llu", + blkio->Media->LastBlock == 0? 0: + (unsigned long long) (blkio->Media->LastBlock + 1)); + if (blkio->Media->LastBlock != 0) { + printf(" X %u", blkio->Media->BlockSize); + } + printf(" blocks"); + if (blkio->Media->MediaPresent) { + if (blkio->Media->RemovableMedia) + printf(" (removable)"); + } else + printf(" (no media)"); + if ((ret = pager_output("\n")) != 0) + break; + if (!blkio->Media->MediaPresent) + continue; + + pd->pd_blkio = blkio; + pd_dev.d_dev = dev; + pd_dev.d_unit = pd->pd_unit; + pd_dev.d_slice = -1; + pd_dev.d_partition = -1; + pd_dev.d_opendata = blkio; + ret = disk_open(&pd_dev, blkio->Media->BlockSize * + (blkio->Media->LastBlock + 1), + blkio->Media->BlockSize, + blkio->Media->RemovableMedia? DISK_F_NOCACHE: 0); + if (ret == 0) { + ret = disk_print(&pd_dev, line, verbose); + disk_close(&pd_dev); + if (ret != 0) + return (ret); + } else { + /* Do not fail from disk_open() */ + ret = 0; + } + } else { + if ((ret = pager_output("\n")) != 0) break; - if (blkio->Media->RemovableMedia) - if ((ret = pager_output(" (removable)")) != 0) - break; } - if ((ret = pager_output("\n")) != 0) - break; } return (ret); } static int +efipart_printfd(int verbose) +{ + return (efipart_print_common(&efipart_fddev, &fdinfo, verbose)); +} + +static int +efipart_printcd(int verbose) +{ + return (efipart_print_common(&efipart_cddev, &cdinfo, verbose)); +} + +static int +efipart_printhd(int verbose) +{ + return (efipart_print_common(&efipart_hddev, &hdinfo, verbose)); +} + +pdinfo_list_t * +efiblk_get_pdinfo_list(struct devsw *dev) +{ + if (dev->dv_type == DEVT_DISK) + return (&hdinfo); + if (dev->dv_type == DEVT_CD) + return (&cdinfo); + if (dev->dv_type == DEVT_FD) + return (&fdinfo); + return (NULL); +} + +static int efipart_open(struct open_file *f, ...) { va_list args; - struct devdesc *dev; + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; EFI_BLOCK_IO *blkio; - EFI_HANDLE h; EFI_STATUS status; va_start(args, f); - dev = va_arg(args, struct devdesc*); + dev = va_arg(args, struct disk_devdesc*); va_end(args); + if (dev == NULL) + return (EINVAL); - h = efi_find_handle(&efipart_dev, dev->d_unit); - if (h == NULL) + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) return (EINVAL); - status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); - if (EFI_ERROR(status)) - return (efi_status_to_errno(status)); + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EIO); + + if (pd->pd_blkio == NULL) { + status = BS->HandleProtocol(pd->pd_handle, &blkio_guid, + (void **)&pd->pd_blkio); + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + } + blkio = pd->pd_blkio; if (!blkio->Media->MediaPresent) return (EAGAIN); - dev->d_opendata = blkio; - PD(dev).pd_open++; - if (PD(dev).pd_bcache == NULL) - PD(dev).pd_bcache = bcache_allocate(); + pd->pd_open++; + if (pd->pd_bcache == NULL) + pd->pd_bcache = bcache_allocate(); + + if (dev->d_dev->dv_type == DEVT_DISK) { + return (disk_open(dev, + blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), + blkio->Media->BlockSize, + blkio->Media->RemovableMedia? DISK_F_NOCACHE: 0)); + } return (0); } static int efipart_close(struct open_file *f) { - struct devdesc *dev; + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; - dev = (struct devdesc *)(f->f_devdata); - if (dev->d_opendata == NULL) + dev = (struct disk_devdesc *)(f->f_devdata); + if (dev == NULL) + return (EINVAL); + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) return (EINVAL); - dev->d_opendata = NULL; - PD(dev).pd_open--; - if (PD(dev).pd_open == 0) { - bcache_free(PD(dev).pd_bcache); - PD(dev).pd_bcache = NULL; + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); + + pd->pd_open--; + if (pd->pd_open == 0) { + pd->pd_blkio = NULL; + bcache_free(pd->pd_bcache); + pd->pd_bcache = NULL; } + if (dev->d_dev->dv_type == DEVT_DISK) + return (disk_close(dev)); + return (0); +} + +static int +efipart_ioctl(struct open_file *f, u_long cmd, void *data) +{ + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; + int rc; + + dev = (struct disk_devdesc *)(f->f_devdata); + if (dev == NULL) + return (EINVAL); + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (EINVAL); + + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); + + if (dev->d_dev->dv_type == DEVT_DISK) { + rc = disk_ioctl(dev, cmd, data); + if (rc != ENOTTY) + return (rc); + } + + switch (cmd) { + case DIOCGSECTORSIZE: + *(u_int *)data = pd->pd_blkio->Media->BlockSize; + break; + case DIOCGMEDIASIZE: + *(off_t *)data = pd->pd_blkio->Media->BlockSize * + (pd->pd_blkio->Media->LastBlock + 1); + break; + default: + return (ENOTTY); + } + return (0); } @@ -294,12 +755,29 @@ efipart_strategy(void *devdata, int rw, char *buf, size_t *rsize) { struct bcache_devdata bcd; - struct devdesc *dev; + struct disk_devdesc *dev; + pdinfo_list_t *pdi; + pdinfo_t *pd; + + dev = (struct disk_devdesc *)devdata; + if (dev == NULL) + return (EINVAL); + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (EINVAL); + + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); - dev = (struct devdesc *)devdata; bcd.dv_strategy = efipart_realstrategy; bcd.dv_devdata = devdata; - bcd.dv_cache = PD(dev).pd_bcache; + bcd.dv_cache = pd->pd_bcache; + + if (dev->d_dev->dv_type == DEVT_DISK) { + return (bcache_strategy(&bcd, rw, blk + dev->d_offset, + size, buf, rsize)); + } return (bcache_strategy(&bcd, rw, blk, size, buf, rsize)); } @@ -307,7 +785,9 @@ static int efipart_realstrategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, size_t *rsize) { - struct devdesc *dev = (struct devdesc *)devdata; + struct disk_devdesc *dev = (struct disk_devdesc *)devdata; + pdinfo_list_t *pdi; + pdinfo_t *pd; EFI_BLOCK_IO *blkio; off_t off; char *blkbuf; @@ -317,7 +797,15 @@ efipart_realstrategy(void *devdata, int if (dev == NULL || blk < 0) return (EINVAL); - blkio = dev->d_opendata; + pdi = efiblk_get_pdinfo_list(dev->d_dev); + if (pdi == NULL) + return (EINVAL); + + pd = efiblk_get_pdinfo(pdi, dev->d_unit); + if (pd == NULL) + return (EINVAL); + + blkio = pd->pd_blkio; if (blkio == NULL) return (ENXIO); Modified: head/sys/boot/efi/loader/conf.c ============================================================================== --- head/sys/boot/efi/loader/conf.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/loader/conf.c Mon Feb 6 09:18:47 2017 (r313333) @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); #endif struct devsw *devsw[] = { - &efipart_dev, + &efipart_fddev, + &efipart_cddev, + &efipart_hddev, &efinet_dev, #ifdef EFI_ZFS_BOOT &zfs_dev, Modified: head/sys/boot/efi/loader/devicename.c ============================================================================== --- head/sys/boot/efi/loader/devicename.c Mon Feb 6 08:58:40 2017 (r313332) +++ head/sys/boot/efi/loader/devicename.c Mon Feb 6 09:18:47 2017 (r313333) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef EFI_ZFS_BOOT #include #endif @@ -90,7 +91,7 @@ efi_parsedev(struct devdesc **dev, const struct devsw *dv; char *cp; const char *np; - int i; + int i, err; /* minimum length check */ if (strlen(devspec) < 2) @@ -106,11 +107,26 @@ efi_parsedev(struct devdesc **dev, const return (ENOENT); np = devspec + strlen(dv->dv_name); + err = 0; -#ifdef EFI_ZFS_BOOT - if (dv->dv_type == DEVT_ZFS) { - int err; + switch (dv->dv_type) { + case DEVT_NONE: + break; + + case DEVT_DISK: + idev = malloc(sizeof(struct disk_devdesc)); + if (idev == NULL) + return (ENOMEM); + + err = disk_parsedev((struct disk_devdesc *)idev, np, path); + if (err != 0) { + free(idev); + return (err); + } + break; +#ifdef EFI_ZFS_BOOT + case DEVT_ZFS: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 6 09:40:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5306CD38EC; Mon, 6 Feb 2017 09:40:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2E6116F; Mon, 6 Feb 2017 09:40:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v169eEka086127; Mon, 6 Feb 2017 09:40:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v169eEul086124; Mon, 6 Feb 2017 09:40:14 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702060940.v169eEul086124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 6 Feb 2017 09:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313335 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 09:40:15 -0000 Author: mjg Date: Mon Feb 6 09:40:14 2017 New Revision: 313335 URL: https://svnweb.freebsd.org/changeset/base/313335 Log: locks: fix recursion support after recent changes When a relevant lockstat probe is enabled the fallback primitive is called with a constant signifying a free lock. This works fine for typical cases but breaks with recursion, since it checks if the passed value is that of the executing thread. Read the value if necessary. Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Feb 6 09:31:25 2017 (r313334) +++ head/sys/kern/kern_mutex.c Mon Feb 6 09:40:14 2017 (r313335) @@ -495,6 +495,8 @@ __mtx_lock_sleep(volatile uintptr_t *c, lock_delay_arg_init(&lda, NULL); #endif m = mtxlock2mtx(c); + if (__predict_false(v == MTX_UNOWNED)) + v = MTX_READ_VALUE(m); if (__predict_false(lv_mtx_owner(v) == (struct thread *)tid)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Mon Feb 6 09:31:25 2017 (r313334) +++ head/sys/kern/kern_rwlock.c Mon Feb 6 09:40:14 2017 (r313335) @@ -812,6 +812,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u lock_delay_arg_init(&lda, NULL); #endif rw = rwlock2rw(c); + if (__predict_false(v == RW_UNLOCKED)) + v = RW_READ_VALUE(rw); if (__predict_false(lv_rw_wowner(v) == (struct thread *)tid)) { KASSERT(rw->lock_object.lo_flags & LO_RECURSABLE, Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Mon Feb 6 09:31:25 2017 (r313334) +++ head/sys/kern/kern_sx.c Mon Feb 6 09:40:14 2017 (r313335) @@ -531,6 +531,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t lock_delay_arg_init(&lda, NULL); #endif + if (__predict_false(x == SX_LOCK_UNLOCKED)) + x = SX_READ_VALUE(sx); + /* If we already hold an exclusive lock, then recurse. */ if (__predict_false(lv_sx_owner(x) == (struct thread *)tid)) { KASSERT((sx->lock_object.lo_flags & LO_RECURSABLE) != 0, From owner-svn-src-all@freebsd.org Mon Feb 6 09:47:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D65F8CD3B43; Mon, 6 Feb 2017 09:47:49 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99CCC161B; Mon, 6 Feb 2017 09:47:49 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1caftc-0009LH-1j; Mon, 06 Feb 2017 12:47:40 +0300 Date: Mon, 6 Feb 2017 12:47:40 +0300 From: Slawa Olhovchenkov To: Navdeep Parhar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313318 - in head: share/man/man4 sys/dev/cxgbe Message-ID: <20170206094739.GC5366@zxy.spb.ru> References: <201702060519.v165JU1e078891@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702060519.v165JU1e078891@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 09:47:49 -0000 On Mon, Feb 06, 2017 at 05:19:30AM +0000, Navdeep Parhar wrote: > Author: np > Date: Mon Feb 6 05:19:29 2017 > New Revision: 313318 > URL: https://svnweb.freebsd.org/changeset/base/313318 > > Log: > cxgbe(4): Allow tunables that control the number of queues to be set to > '-n' to tell the driver to create _up to_ 'n' queues if enough cores are > available. For example, setting hw.cxgbe.nrxq10g="-32" will result in > 16 queues if the system has 16 cores, 32 if it has 32. > > There is no change in the default number of queues of any type. Just for my info: how many queues supported by different hardware (T4/T5/T6)? From owner-svn-src-all@freebsd.org Mon Feb 6 10:51:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FE58CD3A30; Mon, 6 Feb 2017 10:51:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F87B1931; Mon, 6 Feb 2017 10:51:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16AprKP018100; Mon, 6 Feb 2017 10:51:53 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16AprIp018099; Mon, 6 Feb 2017 10:51:53 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702061051.v16AprIp018099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 6 Feb 2017 10:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313336 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 10:51:54 -0000 Author: allanjude Date: Mon Feb 6 10:51:53 2017 New Revision: 313336 URL: https://svnweb.freebsd.org/changeset/base/313336 Log: Add ObsoleteFiles entries for bdes(1) missed in r313329 Reported by: delphij Reviewed by: bapt, imp Differential Revision: https://reviews.freebsd.org/D9457 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Feb 6 09:40:14 2017 (r313335) +++ head/ObsoleteFiles.inc Mon Feb 6 10:51:53 2017 (r313336) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20170206: remove bdes(1) +OLD_FILES+=usr/bin/bdes +OLD_FILES+=usr/lib/debug/usr/bin/bdes.debug +OLD_FILES+=usr/share/man/man1/bdes.1.gz # 20170206: merged projects/ipsec OLD_FILES+=usr/include/netinet/ip_ipsec.h OLD_FILES+=usr/include/netinet6/ip6_ipsec.h From owner-svn-src-all@freebsd.org Mon Feb 6 10:57:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF09ACD3BC8; Mon, 6 Feb 2017 10:57:55 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E86E1EAA; Mon, 6 Feb 2017 10:57:55 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16Avs0q018609; Mon, 6 Feb 2017 10:57:54 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16Avs9M018608; Mon, 6 Feb 2017 10:57:54 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702061057.v16Avs9M018608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 10:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313337 - head/sys/boot/efi/loader 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 10:57:55 -0000 Author: tsoome Date: Mon Feb 6 10:57:54 2017 New Revision: 313337 URL: https://svnweb.freebsd.org/changeset/base/313337 Log: loader: 313329 missed ZFS guard in loader/main.c Missing guard added. Reviewed by: imp, allanjude Approved by: imp (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9458 Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Mon Feb 6 10:51:53 2017 (r313336) +++ head/sys/boot/efi/loader/main.c Mon Feb 6 10:57:54 2017 (r313337) @@ -185,6 +185,7 @@ find_currdev(EFI_LOADED_IMAGE *img) int unit; uint64_t extra; +#ifdef EFI_ZFS_BOOT /* Did efi_zfs_probe() detect the boot pool? */ if (pool_guid != 0) { struct zfs_devdesc currdev; @@ -203,6 +204,7 @@ find_currdev(EFI_LOADED_IMAGE *img) env_nounset); return (0); } +#endif /* EFI_ZFS_BOOT */ /* We have device lists for hd, cd, fd, walk them all. */ pdi_list = efiblk_get_pdinfo_list(&efipart_hddev); From owner-svn-src-all@freebsd.org Mon Feb 6 11:37:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F6BCCD34C0; Mon, 6 Feb 2017 11:37:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 341841349; Mon, 6 Feb 2017 11:37:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16BbKlI034521; Mon, 6 Feb 2017 11:37:20 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16BbKVM034520; Mon, 6 Feb 2017 11:37:20 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201702061137.v16BbKVM034520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 6 Feb 2017 11:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313338 - head/sys/dev/gxemul/disk 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 11:37:21 -0000 Author: sbruno Date: Mon Feb 6 11:37:20 2017 New Revision: 313338 URL: https://svnweb.freebsd.org/changeset/base/313338 Log: gxemul: Add a format string to call to g_new_providerf() found when compiling mips64 target with clang. Reviewed by: brooks Modified: head/sys/dev/gxemul/disk/gxemul_disk.c Modified: head/sys/dev/gxemul/disk/gxemul_disk.c ============================================================================== --- head/sys/dev/gxemul/disk/gxemul_disk.c Mon Feb 6 10:57:54 2017 (r313337) +++ head/sys/dev/gxemul/disk/gxemul_disk.c Mon Feb 6 11:37:20 2017 (r313338) @@ -171,7 +171,7 @@ gxemul_disk_attach_geom(void *arg, int f sc->sc_geom = g_new_geomf(&g_gxemul_disk_class, "%s", device_get_nameunit(sc->sc_dev)); sc->sc_geom->softc = sc; - sc->sc_provider = g_new_providerf(sc->sc_geom, sc->sc_geom->name); + sc->sc_provider = g_new_providerf(sc->sc_geom, "%s", sc->sc_geom->name); sc->sc_provider->sectorsize = GXEMUL_DISK_DEV_BLOCKSIZE; sc->sc_provider->mediasize = sc->sc_size; g_error_provider(sc->sc_provider, 0); From owner-svn-src-all@freebsd.org Mon Feb 6 13:08:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FC85CD111F; Mon, 6 Feb 2017 13:08:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F6251039; Mon, 6 Feb 2017 13:08:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16D8n0d071179; Mon, 6 Feb 2017 13:08:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16D8nGC071178; Mon, 6 Feb 2017 13:08:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061308.v16D8nGC071178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 13:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313339 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 13:08:50 -0000 Author: andrew Date: Mon Feb 6 13:08:48 2017 New Revision: 313339 URL: https://svnweb.freebsd.org/changeset/base/313339 Log: Only allow the pic type to be either a PIC or MSI type. All interrupt controller drivers handle either MSI/MSI-X interrupts, or regular interrupts, as such enforce this in the interrupt handling framework. If a later driver was to handle both it would need to create one of each. This will allow future changes to allow the xref space to overlap, but refer to different drivers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation X-Differential Revision: https://reviews.freebsd.org/D8616 Modified: head/sys/kern/subr_intr.c Modified: head/sys/kern/subr_intr.c ============================================================================== --- head/sys/kern/subr_intr.c Mon Feb 6 11:37:20 2017 (r313338) +++ head/sys/kern/subr_intr.c Mon Feb 6 13:08:48 2017 (r313339) @@ -105,8 +105,10 @@ struct intr_pic { SLIST_ENTRY(intr_pic) pic_next; intptr_t pic_xref; /* hardware identification */ device_t pic_dev; +/* Only one of FLAG_PIC or FLAG_MSI may be set */ #define FLAG_PIC (1 << 0) #define FLAG_MSI (1 << 1) +#define FLAG_TYPE_MASK (FLAG_PIC | FLAG_MSI) u_int pic_flags; struct mtx pic_child_lock; SLIST_HEAD(, intr_pic_child) pic_children; @@ -115,7 +117,7 @@ struct intr_pic { static struct mtx pic_list_lock; static SLIST_HEAD(, intr_pic) pic_list; -static struct intr_pic *pic_lookup(device_t dev, intptr_t xref); +static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags); /* Interrupt source definition. */ static struct mtx isrc_table_lock; @@ -688,7 +690,7 @@ isrc_add_handler(struct intr_irqsrc *isr * Lookup interrupt controller locked. */ static inline struct intr_pic * -pic_lookup_locked(device_t dev, intptr_t xref) +pic_lookup_locked(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; @@ -699,6 +701,10 @@ pic_lookup_locked(device_t dev, intptr_t /* Note that pic->pic_dev is never NULL on registered PIC. */ SLIST_FOREACH(pic, &pic_list, pic_next) { + if ((pic->pic_flags & FLAG_TYPE_MASK) != + (flags & FLAG_TYPE_MASK)) + continue; + if (dev == NULL) { if (xref == pic->pic_xref) return (pic); @@ -715,12 +721,12 @@ pic_lookup_locked(device_t dev, intptr_t * Lookup interrupt controller. */ static struct intr_pic * -pic_lookup(device_t dev, intptr_t xref) +pic_lookup(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; mtx_lock(&pic_list_lock); - pic = pic_lookup_locked(dev, xref); + pic = pic_lookup_locked(dev, xref, flags); mtx_unlock(&pic_list_lock); return (pic); } @@ -729,12 +735,12 @@ pic_lookup(device_t dev, intptr_t xref) * Create interrupt controller. */ static struct intr_pic * -pic_create(device_t dev, intptr_t xref) +pic_create(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; mtx_lock(&pic_list_lock); - pic = pic_lookup_locked(dev, xref); + pic = pic_lookup_locked(dev, xref, flags); if (pic != NULL) { mtx_unlock(&pic_list_lock); return (pic); @@ -746,6 +752,7 @@ pic_create(device_t dev, intptr_t xref) } pic->pic_xref = xref; pic->pic_dev = dev; + pic->pic_flags = flags; mtx_init(&pic->pic_child_lock, "pic child lock", NULL, MTX_SPIN); SLIST_INSERT_HEAD(&pic_list, pic, pic_next); mtx_unlock(&pic_list_lock); @@ -757,12 +764,12 @@ pic_create(device_t dev, intptr_t xref) * Destroy interrupt controller. */ static void -pic_destroy(device_t dev, intptr_t xref) +pic_destroy(device_t dev, intptr_t xref, int flags) { struct intr_pic *pic; mtx_lock(&pic_list_lock); - pic = pic_lookup_locked(dev, xref); + pic = pic_lookup_locked(dev, xref, flags); if (pic == NULL) { mtx_unlock(&pic_list_lock); return; @@ -783,12 +790,10 @@ intr_pic_register(device_t dev, intptr_t if (dev == NULL) return (NULL); - pic = pic_create(dev, xref); + pic = pic_create(dev, xref, FLAG_PIC); if (pic == NULL) return (NULL); - pic->pic_flags |= FLAG_PIC; - debugf("PIC %p registered for %s \n", pic, device_get_nameunit(dev), dev, xref); return (pic); @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr { struct intr_pic *pic; - pic = pic_lookup(dev, xref); + pic = pic_lookup(dev, xref, FLAG_PIC); if (pic == NULL) { device_printf(dev, "not registered\n"); return (EINVAL); } - KASSERT((pic->pic_flags & FLAG_PIC) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, ("%s: Found a non-PIC controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -870,7 +875,8 @@ intr_pic_add_handler(device_t parent, st struct intr_pic_child *child; #endif - parent_pic = pic_lookup(parent, 0); + /* Find the parent PIC */ + parent_pic = pic_lookup(parent, 0, FLAG_PIC); if (parent_pic == NULL) return (NULL); @@ -904,13 +910,14 @@ intr_resolve_irq(device_t dev, intptr_t if (data == NULL) return (EINVAL); - pic = pic_lookup(dev, xref); + pic = pic_lookup(dev, xref, + (data->type == INTR_MAP_DATA_MSI) ? FLAG_MSI : FLAG_PIC); if (pic == NULL) return (ESRCH); switch (data->type) { case INTR_MAP_DATA_MSI: - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); msi = (struct intr_map_data_msi *)data; @@ -918,7 +925,7 @@ intr_resolve_irq(device_t dev, intptr_t return (0); default: - KASSERT((pic->pic_flags & FLAG_PIC) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, ("%s: Found a non-PIC controller: %s", __func__, device_get_name(pic->pic_dev))); return (PIC_MAP_INTR(pic->pic_dev, data, isrc)); @@ -1255,12 +1262,10 @@ intr_msi_register(device_t dev, intptr_t if (dev == NULL) return (EINVAL); - pic = pic_create(dev, xref); + pic = pic_create(dev, xref, FLAG_MSI); if (pic == NULL) return (ENOMEM); - pic->pic_flags |= FLAG_MSI; - debugf("PIC %p registered for %s \n", pic, device_get_nameunit(dev), dev, (uintmax_t)xref); return (0); @@ -1276,11 +1281,11 @@ intr_alloc_msi(device_t pci, device_t ch struct intr_map_data_msi *msi; int err, i; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1313,11 +1318,11 @@ intr_release_msi(device_t pci, device_t struct intr_map_data_msi *msi; int i, err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1352,11 +1357,11 @@ intr_alloc_msix(device_t pci, device_t c struct intr_map_data_msi *msi; int err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1380,11 +1385,11 @@ intr_release_msix(device_t pci, device_t struct intr_map_data_msi *msi; int err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); @@ -1413,11 +1418,11 @@ intr_map_msi(device_t pci, device_t chil struct intr_pic *pic; int err; - pic = pic_lookup(NULL, xref); + pic = pic_lookup(NULL, xref, FLAG_MSI); if (pic == NULL) return (ESRCH); - KASSERT((pic->pic_flags & FLAG_MSI) != 0, + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); From owner-svn-src-all@freebsd.org Mon Feb 6 13:32:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E02DECD1A59; Mon, 6 Feb 2017 13:32:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC9591F26; Mon, 6 Feb 2017 13:32:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16DWMqo083030; Mon, 6 Feb 2017 13:32:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16DWMEd083029; Mon, 6 Feb 2017 13:32:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702061332.v16DWMEd083029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 6 Feb 2017 13:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313340 - in stable: 10/sys/netinet 11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 13:32:24 -0000 Author: cy Date: Mon Feb 6 13:32:22 2017 New Revision: 313340 URL: https://svnweb.freebsd.org/changeset/base/313340 Log: MFC r312982: Correct comment grammar and make it easier to understand. Modified: stable/11/sys/netinet/tcp_output.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet/tcp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/netinet/tcp_output.c ============================================================================== --- stable/11/sys/netinet/tcp_output.c Mon Feb 6 13:08:48 2017 (r313339) +++ stable/11/sys/netinet/tcp_output.c Mon Feb 6 13:32:22 2017 (r313340) @@ -1262,8 +1262,8 @@ send: #ifdef INET6 if (isipv6) { /* - * ip6_plen is not need to be filled now, and will be filled - * in ip6_output. + * There is no need to fill in ip6_plen right now. + * It will be filled later by ip6_output. */ m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; th->th_sum = in6_cksum_pseudo(ip6, sizeof(struct tcphdr) + From owner-svn-src-all@freebsd.org Mon Feb 6 13:32:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11EB9CD1A5D; Mon, 6 Feb 2017 13:32:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D53461F27; Mon, 6 Feb 2017 13:32:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16DWMMH083036; Mon, 6 Feb 2017 13:32:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16DWMXq083035; Mon, 6 Feb 2017 13:32:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702061332.v16DWMXq083035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 6 Feb 2017 13:32: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: r313340 - in stable: 10/sys/netinet 11/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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 13:32:24 -0000 Author: cy Date: Mon Feb 6 13:32:22 2017 New Revision: 313340 URL: https://svnweb.freebsd.org/changeset/base/313340 Log: MFC r312982: Correct comment grammar and make it easier to understand. Modified: stable/10/sys/netinet/tcp_output.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/netinet/tcp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/netinet/tcp_output.c ============================================================================== --- stable/10/sys/netinet/tcp_output.c Mon Feb 6 13:08:48 2017 (r313339) +++ stable/10/sys/netinet/tcp_output.c Mon Feb 6 13:32:22 2017 (r313340) @@ -1252,8 +1252,8 @@ send: #ifdef INET6 if (isipv6) { /* - * ip6_plen is not need to be filled now, and will be filled - * in ip6_output. + * There is no need to fill in ip6_plen right now. + * It will be filled later by ip6_output. */ m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; th->th_sum = in6_cksum_pseudo(ip6, sizeof(struct tcphdr) + From owner-svn-src-all@freebsd.org Mon Feb 6 13:53:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24DABCD20C3; Mon, 6 Feb 2017 13:53:50 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFA78E7B; Mon, 6 Feb 2017 13:53:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ajjgc9P8MVQuxajjhcOGxW; Mon, 06 Feb 2017 06:53:42 -0700 X-Authority-Analysis: v=2.2 cv=BNTDlBYG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=8Cg8ip8I2pv_peD6t-UA:9 a=CjuIK1q_8ugA:10 a=6cegRdsiIKAA:10 a=PWgaC5gQ5SgA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E39B0AD4; Mon, 6 Feb 2017 05:53:39 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v16Drdfa054163; Mon, 6 Feb 2017 05:53:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702061353.v16Drdfa054163@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Toomas Soome cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313337 - head/sys/boot/efi/loader In-Reply-To: Message from Toomas Soome of "Mon, 06 Feb 2017 10:57:54 +0000." <201702061057.v16Avs9M018608@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 06 Feb 2017 05:53:39 -0800 X-CMAE-Envelope: MS4wfO3iAdpSF1IjM5FtKADqTiqulmDU0VLpCt3h6Nf1OCKsdQOP6ayKrYRLopn0eEPr4qBVmwejdoWsm8V0yrSx4gsXez6a7a4b8sncK8GC20NEn9mR79xd X13i4FPcALEWGXioKoqTrMWkslO2QF3riAmJ/RAJyuugl+xZ7utLRyu69U0QFPOxBUNbuEsEgRQDxnap2pQCOg5SVBj9fkMAi0uxjCjCQfDlnslmR1+yvbrs +6X0VAIeflijh6FajnNEFtIFEKYANYZpEkVQnQBM+MghGWcQOOszSL+ZGchGy9aj X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 13:53:50 -0000 In message <201702061057.v16Avs9M018608@repo.freebsd.org>, Toomas Soome writes: > Author: tsoome > Date: Mon Feb 6 10:57:54 2017 > New Revision: 313337 > URL: https://svnweb.freebsd.org/changeset/base/313337 > > Log: > loader: 313329 missed ZFS guard in loader/main.c Did you mean r313328? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Feb 6 13:58:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EE00CD2230; Mon, 6 Feb 2017 13:58:56 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07C0310A0; Mon, 6 Feb 2017 13:58:56 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OKY00I00HCFNS00@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 13:58:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1486389529; bh=/Bt5K8bgIqubZEEh0DWxSzseTFhj/g8ZtbT9KKuNI6E=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=LGBBu6zoRskb+8E95R6B5sl68lSGCc1uLtF03ZFg6HFJeCRHjS6TK+y/Pd/tLMG/o rCnsdQSmscI8ExOu1OIHB85pXifReE8soP5SPKlWtcqyxxa0qz57hJvAaXphh0q0WH rfwqlgrHuDf5fJPcTjNM8IDgEyWNdFYZ7tfFY4KLYSRKefdB1uAOImECKxohBvZS3C EE5ZRMNQ6QzaWvr3N1SyFGJmqaMZGIPm1W/qgYyKcjspd2bJDYSxQoR/w/EQLyVb43 poNyyQz1ooFJnJTcJR7SNhs4gpCf4PNQBRKoz+B8Gwpbo1knvTMO+AbsNmGyFcd5Qe anT7Eg8P+NySA== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OKY00J5HHHY4M00@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 13:58:49 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702060139 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313337 - head/sys/boot/efi/loader From: Toomas Soome In-reply-to: <201702061353.v16Drdfa054163@slippy.cwsent.com> Date: Mon, 06 Feb 2017 15:58:45 +0200 Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: References: <201702061353.v16Drdfa054163@slippy.cwsent.com> To: Cy Schubert X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 13:58:56 -0000 > On 6. veebr 2017, at 15:53, Cy Schubert = wrote: >=20 > In message <201702061057.v16Avs9M018608@repo.freebsd.org>, Toomas = Soome=20 > writes: >> Author: tsoome >> Date: Mon Feb 6 10:57:54 2017 >> New Revision: 313337 >> URL: https://svnweb.freebsd.org/changeset/base/313337 >>=20 >> Log: >> loader: 313329 missed ZFS guard in loader/main.c >=20 > Did you mean r313328? >=20 Oh indeed:( I have no idea how I did mix that up=E2=80=A6 (I blame lack = of coffee;) Should I do something about it? rgds, toomas= From owner-svn-src-all@freebsd.org Mon Feb 6 14:00:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16888CD22ED; Mon, 6 Feb 2017 14:00:30 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA6E31225; Mon, 6 Feb 2017 14:00:29 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16E0SHl091365; Mon, 6 Feb 2017 14:00:28 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16E0Sb5091364; Mon, 6 Feb 2017 14:00:28 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201702061400.v16E0Sb5091364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Mon, 6 Feb 2017 14:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313341 - head/sys/mips/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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 14:00:30 -0000 Author: kan Date: Mon Feb 6 14:00:28 2017 New Revision: 313341 URL: https://svnweb.freebsd.org/changeset/base/313341 Log: Use 64bit store instruction in atomic_fcmpset_64. Reported by: br Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Mon Feb 6 13:32:22 2017 (r313340) +++ head/sys/mips/include/atomic.h Mon Feb 6 14:00:28 2017 (r313341) @@ -529,7 +529,7 @@ atomic_fcmpset_64(__volatile uint64_t *p "beqz %0, 1b\n\t" /* if it failed, spin */ "j 3f\n\t" "2:\n\t" - "sw %0, %2\n\t" /* save old value */ + "sd %0, %2\n\t" /* save old value */ "li %0, 0\n\t" "3:\n" : "=&r" (ret), "+m" (*p), "=m" (*cmpval) From owner-svn-src-all@freebsd.org Mon Feb 6 14:02:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5076CD24F0; Mon, 6 Feb 2017 14:02:01 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B14716FB; Mon, 6 Feb 2017 14:02:01 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OKY00M00HLMHX00@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 14:02:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1486389720; bh=4j/Z8dxIQbQi4/KZCJmZ1b8bvc5IJ+NeVNRqmXA2TYk=; h=From:Message-id:Content-type:MIME-version:Subject:Date:To; b=gohwhMnKt6bjJFgdEn8omvdDKTqI269fLH3KZODfhtW3ZVLs5uuCqQF9A1h6YDlPJ YZUSX+yPnnkDyoks1QmUuly786pXbJD3vLyDo6sgYjJSuAmz9tEnIjEKhCThac9Utl zExfXvfUqXjiIQAGdu1egU9cVERhTGmAFzs6OH8mCdDkQAkBbDotCbQ8BUs6dCRRG0 lF+1lt9HkcH7z6O1zIpj5wwXH7hB4ftMV9fgMwIBkrvqLDOTwI7neKuju6qLLv8yTa PpTU5tobmmNUrDbXKURSBAPp37xu0hGinsSF9rmLrUSzg3sWg9D4hYxVwIKsOBCfsp zexnJ6owVi+9A== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OKY00GEMHN9ZR50@st13p35im-asmtp002.me.com>; Mon, 06 Feb 2017 14:02:00 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702060139 From: Toomas Soome Message-id: MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313337 - head/sys/boot/efi/loader Date: Mon, 06 Feb 2017 16:01:56 +0200 In-reply-to: Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Cy Schubert References: <201702061353.v16Drdfa054163@slippy.cwsent.com> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 14:02:01 -0000 > On 6. veebr 2017, at 15:58, Toomas Soome wrote: >=20 >=20 >> On 6. veebr 2017, at 15:53, Cy Schubert = wrote: >>=20 >> In message <201702061057.v16Avs9M018608@repo.freebsd.org>, Toomas = Soome=20 >> writes: >>> Author: tsoome >>> Date: Mon Feb 6 10:57:54 2017 >>> New Revision: 313337 >>> URL: https://svnweb.freebsd.org/changeset/base/313337 >>>=20 >>> Log: >>> loader: 313329 missed ZFS guard in loader/main.c >>=20 >> Did you mean r313328? >>=20 >=20 >=20 > Oh indeed:( I have no idea how I did mix that up=E2=80=A6 (I blame = lack of coffee;) Should I do something about it? >=20 Actually=E2=80=A6. well=E2=80=A6 the correct one is r313333, = https://svnweb.freebsd.org/base?view=3Drevision&revision=3D313333 = (I = still blame the coffee). rgds, toomas= From owner-svn-src-all@freebsd.org Mon Feb 6 14:31:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5552BCD2FEA; Mon, 6 Feb 2017 14:31:24 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (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 DCD3E7E8; Mon, 6 Feb 2017 14:31:23 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id v16EVEhR021003; Mon, 6 Feb 2017 17:31:14 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 6 Feb 2017 17:31:14 +0300 (MSK) From: Dmitry Morozovsky To: "Andrey V. Elsukov" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... In-Reply-To: <201702060849.v168nwmf064277@repo.freebsd.org> Message-ID: References: <201702060849.v168nwmf064277@repo.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Mon, 06 Feb 2017 17:31:14 +0300 (MSK) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 14:31:24 -0000 On Mon, 6 Feb 2017, Andrey V. Elsukov wrote: > Author: ae > Date: Mon Feb 6 08:49:57 2017 > New Revision: 313330 > URL: https://svnweb.freebsd.org/changeset/base/313330 > > Log: > Merge projects/ipsec into head/. [snip] Great, thanks! Have you any plans to merge this into stable/11 to reduce diffs in network stack code? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@freebsd.org Mon Feb 6 14:41:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DAA9CD3214; Mon, 6 Feb 2017 14:41:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8C61F57; Mon, 6 Feb 2017 14:41:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16EfYWr010324; Mon, 6 Feb 2017 14:41:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16EfYZx010320; Mon, 6 Feb 2017 14:41:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061441.v16EfYZx010320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 14:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313342 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 14:41:36 -0000 Author: andrew Date: Mon Feb 6 14:41:34 2017 New Revision: 313342 URL: https://svnweb.freebsd.org/changeset/base/313342 Log: Only build the ACPI PCI drivers on x86, they are unlikely to be used on arm64 without dignificant changes. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 14:00:28 2017 (r313341) +++ head/sys/conf/files Mon Feb 6 14:41:34 2017 (r313342) @@ -668,11 +668,6 @@ dev/acpica/acpi_ec.c optional acpi dev/acpica/acpi_isab.c optional acpi isa dev/acpica/acpi_lid.c optional acpi dev/acpica/acpi_package.c optional acpi -dev/acpica/acpi_pci.c optional acpi pci -dev/acpica/acpi_pci_link.c optional acpi pci -dev/acpica/acpi_pcib.c optional acpi pci -dev/acpica/acpi_pcib_acpi.c optional acpi pci -dev/acpica/acpi_pcib_pci.c optional acpi pci dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Feb 6 14:00:28 2017 (r313341) +++ head/sys/conf/files.amd64 Mon Feb 6 14:41:34 2017 (r313342) @@ -188,6 +188,11 @@ crypto/via/padlock_cipher.c optional pad crypto/via/padlock_hash.c optional padlock dev/acpica/acpi_if.m standard dev/acpica/acpi_hpet.c optional acpi +dev/acpica/acpi_pci.c optional acpi pci +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci +dev/acpica/acpi_pcib_acpi.c optional acpi pci +dev/acpica/acpi_pcib_pci.c optional acpi pci dev/acpica/acpi_timer.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Feb 6 14:00:28 2017 (r313341) +++ head/sys/conf/files.i386 Mon Feb 6 14:41:34 2017 (r313342) @@ -163,6 +163,11 @@ crypto/des/arch/i386/des_enc.S optional crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock +dev/acpica/acpi_pci.c optional acpi pci +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci +dev/acpica/acpi_pcib_acpi.c optional acpi pci +dev/acpica/acpi_pcib_pci.c optional acpi pci dev/advansys/adv_isa.c optional adv isa dev/agp/agp_ali.c optional agp dev/agp/agp_amd.c optional agp From owner-svn-src-all@freebsd.org Mon Feb 6 14:58:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C46CD3547; Mon, 6 Feb 2017 14:58:25 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DAC7183D; Mon, 6 Feb 2017 14:58:25 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16EwOs3015634; Mon, 6 Feb 2017 14:58:24 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16EwOjU015633; Mon, 6 Feb 2017 14:58:24 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201702061458.v16EwOjU015633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Mon, 6 Feb 2017 14:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313343 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 14:58:25 -0000 Author: sgalabov Date: Mon Feb 6 14:58:24 2017 New Revision: 313343 URL: https://svnweb.freebsd.org/changeset/base/313343 Log: sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a u_int8_t variable to store the result of cpu_get_control(). It should really use a u_int variable, the same way as done for cpu_ident() in the same function, as both cpuid and control registers are 32-bit.. This issue causes users of identcpu-v4 to incorrectly report things such as icache status (bit 12 in cpu control register) and basically anything defined in bits above bit 7 :-) Reviewed by: manu Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D9460 Modified: head/sys/arm/arm/identcpu-v4.c Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 (r313342) +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 (r313343) @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) void identify_arm_cpu(void) { - u_int cpuid; - u_int8_t ctrl; + u_int cpuid, ctrl; int i; ctrl = cpu_get_control(); From owner-svn-src-all@freebsd.org Mon Feb 6 15:18:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06040CD3BB2 for ; Mon, 6 Feb 2017 15:18:35 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C38EC769 for ; Mon, 6 Feb 2017 15:18:34 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x230.google.com with SMTP id w75so50206045ywg.1 for ; Mon, 06 Feb 2017 07:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yk1AZYP22G5VIP+F33TTLy9j6iaqV4LRMYMJC2baq50=; b=glcY+hxLI6VOWUvLh72eJKnSSORnfP73rMA43lZi/SzFGAHpOF5TKjlGXF5SY613lG mlTLdYXCanIRAV4t3qxiwRiIGQ5SKZ+KfrkNVP8xgG3BN5t0UxrERU9jwTWHI39Qsvax ViXPcD96x/8maiGBS9XP6jSE836pGa4BJfCiGWZAK9f/EebcM7F8PFViV7wpYeQ1xc2a l9UQp4d4rVhTL2bOrjplAjVDXm2tRhSp5RlEiGsL4i7VU6QEAAKjHICBO9K89zrKR/qP Hd0+55ZHPzeNQwSL705nAtIMi5Y3856vtWJnZEkKX4i4ptUGxNl3cS4JL0SxpYfW6nqR 7W9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yk1AZYP22G5VIP+F33TTLy9j6iaqV4LRMYMJC2baq50=; b=aOVbHGwu00KqTeMPHt2cn8fMiMVUmByU6jpLtL7BZp8LiUUuWyLb1YoutwnG+RWrlp /3F21bkm7Eb2+ldoGjp+ldMj8N8M7WqbAk1QXaW4zsUAbzQRN+CMJpceNcgWjjvhxoWy UJPOUNLrffv4fbgob8FDLA0uHaQ1JNTTw8cR3Go+mEqrahnol6U8/iAIvmYWC1AkQk2B vkMmjkD1cO2AqEVr+A++IeZtjccyKYcnKknsdQh53AEXz7eh+WLFBOprGQ3chP7hQjJ7 QF+olzGNCuPWiQlacmTHQS9nigauAe7M01svieP7iu1oBOEKoPu+ImWTq93CUXQi3JHj BGiA== X-Gm-Message-State: AIkVDXI8iWXRjzou5kaNWbFcCsZ9Ik2Jp3yj+wq/IzAdNLB3cBoWiuyY+E2rZrHlmyv9+1+6HUJdTFH91QYrkQ== X-Received: by 10.129.108.77 with SMTP id h74mr7084197ywc.95.1486394313788; Mon, 06 Feb 2017 07:18:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.76 with HTTP; Mon, 6 Feb 2017 07:18:03 -0800 (PST) In-Reply-To: <201702060827.v168RJQY056084@repo.freebsd.org> References: <201702060827.v168RJQY056084@repo.freebsd.org> From: Ed Schouten Date: Mon, 6 Feb 2017 16:18:03 +0100 Message-ID: Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Allan Jude Cc: src-committers , 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 15:18:35 -0000 Hi Allan, 2017-02-06 9:27 GMT+01:00 Allan Jude : > The use of DES for anything is discouraged, especially with a static IV of 0 Not entirely related to this, but still... Do we want to go ahead and also remove DES support from crypt(3)? Compared to the other crypt formats, the DES implementation seems fairly large, uses global state, etc. I can send out a change for code review if people {like,don't object to} this. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Feb 6 15:24:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE43CD3DCC; Mon, 6 Feb 2017 15:24:44 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72903BCA; Mon, 6 Feb 2017 15:24:44 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from T530-Allan.ScaleEngine.net (unknown [91.183.237.24]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 64CC31307C; Mon, 6 Feb 2017 15:24:42 +0000 (UTC) Subject: Re: svn commit: r313329 - in head: bin/ed secure/usr.bin secure/usr.bin/bdes usr.bin usr.bin/enigma To: Ed Schouten References: <201702060827.v168RJQY056084@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: Date: Mon, 6 Feb 2017 10:24:40 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 15:24:44 -0000 On 02/06/17 10:18 AM, Ed Schouten wrote: > Hi Allan, > > 2017-02-06 9:27 GMT+01:00 Allan Jude : >> The use of DES for anything is discouraged, especially with a static IV of 0 > > Not entirely related to this, but still... > > Do we want to go ahead and also remove DES support from crypt(3)? > Compared to the other crypt formats, the DES implementation seems > fairly large, uses global state, etc. > > I can send out a change for code review if people {like,don't object to} this. > I remember in the 4.x days, there was a documented reason why you might need to keep des crypt(3) instead of using md5crypt, but I would hope that went away a long time ago. I am in favour of this, but I don't know what all of the implications might be. We should likely ask someone on secteam@ about this. -- Allan Jude From owner-svn-src-all@freebsd.org Mon Feb 6 15:24:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CFDECD3E0C; Mon, 6 Feb 2017 15:24:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3ECC49; Mon, 6 Feb 2017 15:24:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16FOqJg027258; Mon, 6 Feb 2017 15:24:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16FOqcq027257; Mon, 6 Feb 2017 15:24:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061524.v16FOqcq027257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 15:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313344 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 15:24:53 -0000 Author: andrew Date: Mon Feb 6 15:24:52 2017 New Revision: 313344 URL: https://svnweb.freebsd.org/changeset/base/313344 Log: Temporary disable gicv3_its.c when FDT is missing from the kernel until INTRNG supports ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Feb 6 14:58:24 2017 (r313343) +++ head/sys/conf/files.arm64 Mon Feb 6 15:24:52 2017 (r313344) @@ -88,7 +88,7 @@ arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard -arm64/arm64/gicv3_its.c optional intrng +arm64/arm64/gicv3_its.c optional intrng fdt arm64/arm64/gic_v3.c standard arm64/arm64/gic_v3_fdt.c optional fdt arm64/arm64/identcpu.c standard From owner-svn-src-all@freebsd.org Mon Feb 6 17:20:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0911CD30F8; Mon, 6 Feb 2017 17:20:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B62F1381; Mon, 6 Feb 2017 17:20:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16HKbtM072190; Mon, 6 Feb 2017 17:20:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16HKbD3072188; Mon, 6 Feb 2017 17:20:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702061720.v16HKbD3072188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 6 Feb 2017 17:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313345 - in head/sys: arm/include arm64/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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 17:20:38 -0000 Author: kib Date: Mon Feb 6 17:20:37 2017 New Revision: 313345 URL: https://svnweb.freebsd.org/changeset/base/313345 Log: Update arm and arm64 counters MD bits. On arm64 use atomics. Then, both arm and arm64 do not need a critical section around update. Replace all cpus loop by CPU_FOREACH(). This brings arm and arm64 counter(9) implementation closer to current amd64, but being more RISC-y, arm* version cannot avoid atomics. Reported by: Alexandre Martins Reviewed by: andrew Tested by: Alexandre Martins, andrew Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/arm/include/counter.h head/sys/arm64/include/counter.h Modified: head/sys/arm/include/counter.h ============================================================================== --- head/sys/arm/include/counter.h Mon Feb 6 15:24:52 2017 (r313344) +++ head/sys/arm/include/counter.h Mon Feb 6 17:20:37 2017 (r313345) @@ -31,12 +31,9 @@ #include #include -#ifdef INVARIANTS -#include -#endif -#define counter_enter() critical_enter() -#define counter_exit() critical_exit() +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) #ifdef IN_SUBR_COUNTER_C @@ -55,7 +52,7 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) r += counter_u64_read_one((uint64_t *)p, i); return (r); @@ -78,18 +75,13 @@ counter_u64_zero_inline(counter_u64_t c) } #endif -#define counter_u64_add_protected(c, inc) do { \ - CRITICAL_ASSERT(curthread); \ - atomic_add_64((uint64_t *)zpcpu_get(c), (inc)); \ -} while (0) +#define counter_u64_add_protected(c, inc) counter_u64_add(c, inc) static inline void counter_u64_add(counter_u64_t c, int64_t inc) { - counter_enter(); - counter_u64_add_protected(c, inc); - counter_exit(); + atomic_add_64((uint64_t *)zpcpu_get(c), inc); } #endif /* ! __MACHINE_COUNTER_H__ */ Modified: head/sys/arm64/include/counter.h ============================================================================== --- head/sys/arm64/include/counter.h Mon Feb 6 15:24:52 2017 (r313344) +++ head/sys/arm64/include/counter.h Mon Feb 6 17:20:37 2017 (r313345) @@ -30,12 +30,10 @@ #define _MACHINE_COUNTER_H_ #include -#ifdef INVARIANTS -#include -#endif +#include -#define counter_enter() critical_enter() -#define counter_exit() critical_exit() +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) #ifdef IN_SUBR_COUNTER_C static inline uint64_t @@ -52,13 +50,12 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) + CPU_FOREACH(i) r += counter_u64_read_one((uint64_t *)p, i); return (r); } -/* XXXKIB might interrupt increment */ static void counter_u64_zero_one_cpu(void *arg) { @@ -76,18 +73,13 @@ counter_u64_zero_inline(counter_u64_t c) } #endif -#define counter_u64_add_protected(c, inc) do { \ - CRITICAL_ASSERT(curthread); \ - *(uint64_t *)zpcpu_get(c) += (inc); \ -} while (0) +#define counter_u64_add_protected(c, inc) counter_u64_add(c, inc) static inline void counter_u64_add(counter_u64_t c, int64_t inc) { - counter_enter(); - counter_u64_add_protected(c, inc); - counter_exit(); + atomic_add_64((uint64_t *)zpcpu_get(c), inc); } #endif /* ! _MACHINE_COUNTER_H_ */ From owner-svn-src-all@freebsd.org Mon Feb 6 17:48:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31A76CD36E4; Mon, 6 Feb 2017 17:48:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08EAB3A6; Mon, 6 Feb 2017 17:48:26 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16HmQxb084483; Mon, 6 Feb 2017 17:48:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16HmPIF084479; Mon, 6 Feb 2017 17:48:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702061748.v16HmPIF084479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 6 Feb 2017 17:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313346 - head/sys/dev/cxgbe/tom 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 17:48:27 -0000 Author: np Date: Mon Feb 6 17:48:25 2017 New Revision: 313346 URL: https://svnweb.freebsd.org/changeset/base/313346 Log: cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_connect.c Mon Feb 6 17:48:25 2017 (r313346) @@ -402,7 +402,7 @@ t4_connect(struct toedev *tod, struct so if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr); + toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_listen.c Mon Feb 6 17:48:25 2017 (r313346) @@ -209,7 +209,7 @@ alloc_lctx(struct adapter *sc, struct in !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { struct tom_data *td = sc->tom_softc; - lctx->ce = hold_lip(td, &inp->in6p_laddr); + lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -1584,6 +1584,8 @@ reset: INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; + if (inc.inc_flags & INC_ISIPV6) + toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_tom.c Mon Feb 6 17:48:25 2017 (r313346) @@ -730,12 +730,12 @@ search_lip(struct tom_data *td, struct i } struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip) +hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) { - struct clip_entry *ce; mtx_lock(&td->clip_table_lock); - ce = search_lip(td, lip); + if (ce == NULL) + ce = search_lip(td, lip); if (ce != NULL) ce->refcount++; mtx_unlock(&td->clip_table_lock); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Mon Feb 6 17:20:37 2017 (r313345) +++ head/sys/dev/cxgbe/tom/t4_tom.h Mon Feb 6 17:48:25 2017 (r313346) @@ -321,7 +321,8 @@ uint64_t calc_opt0(struct socket *, stru uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); void set_tcpddp_ulp_mode(struct toepcb *); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, + struct clip_entry *); void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ From owner-svn-src-all@freebsd.org Mon Feb 6 17:50:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDAA0CD3758; Mon, 6 Feb 2017 17:50:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99999791; Mon, 6 Feb 2017 17:50:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16Ho9Vi084611; Mon, 6 Feb 2017 17:50:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16Ho9FU084609; Mon, 6 Feb 2017 17:50:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702061750.v16Ho9FU084609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Feb 2017 17:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313347 - in head/sys/arm64: arm64 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 17:50:10 -0000 Author: andrew Date: Mon Feb 6 17:50:09 2017 New Revision: 313347 URL: https://svnweb.freebsd.org/changeset/base/313347 Log: Remove arm64_tlb_flushID_SE, it's unused and may be wrong. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/cpufunc_asm.S head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Mon Feb 6 17:48:25 2017 (r313346) +++ head/sys/arm64/arm64/cpufunc_asm.S Mon Feb 6 17:50:09 2017 (r313347) @@ -103,19 +103,6 @@ ENTRY(arm64_tlb_flushID) ret END(arm64_tlb_flushID) -ENTRY(arm64_tlb_flushID_SE) - ldr x1, .Lpage_mask - bic x0, x0, x1 -#ifdef SMP - tlbi vae1is, x0 -#else - tlbi vae1, x0 -#endif - dsb ish - isb - ret -END(arm64_tlb_flushID_SE) - /* * void arm64_dcache_wb_range(vm_offset_t, vm_size_t) */ Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Mon Feb 6 17:48:25 2017 (r313346) +++ head/sys/arm64/include/cpufunc.h Mon Feb 6 17:50:09 2017 (r313347) @@ -129,7 +129,6 @@ extern int64_t dczva_line_size; #define cpu_setttb(a) arm64_setttb(a) #define cpu_tlb_flushID() arm64_tlb_flushID() -#define cpu_tlb_flushID_SE(e) arm64_tlb_flushID_SE(e) #define cpu_dcache_wbinv_range(a, s) arm64_dcache_wbinv_range((a), (s)) #define cpu_dcache_inv_range(a, s) arm64_dcache_inv_range((a), (s)) From owner-svn-src-all@freebsd.org Mon Feb 6 18:08:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30407CD3E5E; Mon, 6 Feb 2017 18:08:04 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-yb0-x243.google.com (mail-yb0-x243.google.com [IPv6:2607:f8b0:4002:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3EF01669; Mon, 6 Feb 2017 18:08:03 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-yb0-x243.google.com with SMTP id j82so3844458ybg.2; Mon, 06 Feb 2017 10:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U+/BTIQY/LGghXYRDnuVxv/Sjuh9tBpGxqzp0QHDa9A=; b=RPBfGLjSkmqYREE7t7qTdn5bCc4UIszVwqnKciTTyQkTp4BDI/0HwSoK3TrJrxRcLg XVuret5DlmUB1gXOu+tCcqsbjuQKSMsaK9EPYLKm3OE/MFGxo4tAfOP9UlcxSfQdHBmd WTziXFVakx4tCyFOmn8xiM3qatR73gOpzw43JoIcDVb+7tC35GQ3tapVdk1LHbTHiAXe ZrrjEDnjrGfalTgHszbrL5an6OWtm2ysKl2Nc6UJ6UOL9CeDsTOSrxfby7FKeT4+OJJ+ BOyRD+SZ7/3ayW8WmKnTIw5HATEm6Hj1RQrgAf3HyyCEg0hicFmGVBzErn4aD2N2PwB+ /w8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U+/BTIQY/LGghXYRDnuVxv/Sjuh9tBpGxqzp0QHDa9A=; b=ixCuY1S0i6wb1gHnn68PJO1DoD6Keo/73XgypqjDndG1zRJh1R9RDMyFvZGnwnhmQ1 lciOqnKxOWmf/ZZSkb/N/wi77ku2liD4jVzDQz8A1G6pysv1NwGkmWLVXBR/ud/cxTEf NpfYew1kcuh16kcO9aS5kW7EpXUli6TbvDTVHITIeyYrJ3ctdSyAQjMwzAboWOm3HuHj s6ldZrd9M7eI1Gk0D8GLT0R2E2xft27am8492ElnZHxBfKSnrAzG9ykF54fYYT6Ra8nh 2lPlSj1Aedv7NK6x3fivTaDDlXKY7Z+fiHWIgG+AhhVLcalI6nxEOSe7oL6edz8sMgjB pxwA== X-Gm-Message-State: AMke39kHpiAxxbBSXmMk38wxckQnVTkET5SB7R1NSnoO8qj8WI4lH0FW1j1xPWQeqm09eJI1+9vcCS1HXHES5A== X-Received: by 10.37.101.215 with SMTP id z206mr8033057ybb.5.1486404483115; Mon, 06 Feb 2017 10:08:03 -0800 (PST) MIME-Version: 1.0 Sender: nparhar@gmail.com Received: by 10.13.227.194 with HTTP; Mon, 6 Feb 2017 10:08:02 -0800 (PST) In-Reply-To: <20170206094739.GC5366@zxy.spb.ru> References: <201702060519.v165JU1e078891@repo.freebsd.org> <20170206094739.GC5366@zxy.spb.ru> From: Navdeep Parhar Date: Mon, 6 Feb 2017 10:08:02 -0800 X-Google-Sender-Auth: VSO15czrbICV_dz3flHCBGfbuc4 Message-ID: Subject: Re: svn commit: r313318 - in head: share/man/man4 sys/dev/cxgbe To: Slawa Olhovchenkov Cc: "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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 18:08:04 -0000 On Mon, Feb 6, 2017 at 1:47 AM, Slawa Olhovchenkov wrote: > On Mon, Feb 06, 2017 at 05:19:30AM +0000, Navdeep Parhar wrote: > >> Author: np >> Date: Mon Feb 6 05:19:29 2017 >> New Revision: 313318 >> URL: https://svnweb.freebsd.org/changeset/base/313318 >> >> Log: >> cxgbe(4): Allow tunables that control the number of queues to be set to >> '-n' to tell the driver to create _up to_ 'n' queues if enough cores are >> available. For example, setting hw.cxgbe.nrxq10g="-32" will result in >> 16 queues if the system has 16 cores, 32 if it has 32. >> >> There is no change in the default number of queues of any type. > > Just for my info: how many queues supported by different hardware (T4/T5/T6)? Each of them supports 1K+ interrupt capable rx queues. But the practical limit comes from the number of MSI-X vectors for PCIe PF4 of the card. With 128 interrupts max (most common) you have enough to run a 4 port card with 16 queues each. A 2 port could have 32 queues each. All this assumes that you set number of queues to some power of 2. If not then you could go higher than these values. Regards, Navdeep From owner-svn-src-all@freebsd.org Mon Feb 6 18:29:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 902D0CD337B; Mon, 6 Feb 2017 18:29:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62A9832F; Mon, 6 Feb 2017 18:29:44 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16IThsU001304; Mon, 6 Feb 2017 18:29:43 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16ITh1o001303; Mon, 6 Feb 2017 18:29:43 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702061829.v16ITh1o001303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 18:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313348 - head/sys/boot/i386/libi386 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 18:29:44 -0000 Author: tsoome Date: Mon Feb 6 18:29:43 2017 New Revision: 313348 URL: https://svnweb.freebsd.org/changeset/base/313348 Log: loader: biosdisk fix for 2+TB disks This fix is implementing partition based boundary check for disk IO and updates disk mediasize (if needed), based on information from partition table. As it appeared, the signed int based approach still has corner cases, and the wrapover based behavior is non-standard. The idea for this fix is based on two assumptions: The bug about media size is hitting large (2+TB) disks, lesser disks hopefully, are not affected. Large disks are using GPT (which does include information about disk size). Since our concern is about boot support and boot disks are partitioned, implementing partition boundaries based IO verification should make the media size issues mostly disappear. However, for large disk case, we do have the disk size available from GPT table. If non-GPT cases will appear, we still can make approximate calculation about disk size based on defined partition(s), however, this is not the objective of this patch, and can be added later if there is any need. This patch does implement disk media size adjustment (if needed) in bd_open(), and boundary check in bd_realstrategy(). Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8595 Modified: head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 17:50:09 2017 (r313347) +++ head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 18:29:43 2017 (r313348) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include @@ -302,15 +303,28 @@ bd_int13probe(struct bdinfo *bd) if (!V86_CY(v86.efl)) { uint64_t total; - if (params.sectors != 0) - bd->bd_sectors = params.sectors; + /* + * Sector size must be a multiple of 512 bytes. + * An alternate test would be to check power of 2, + * powerof2(params.sector_size). + */ + if (params.sector_size % BIOSDISK_SECSIZE) + bd->bd_sectorsize = BIOSDISK_SECSIZE; + else + bd->bd_sectorsize = params.sector_size; + + total = bd->bd_sectorsize * params.sectors; + if (params.sectors != 0) { + /* Only update if we did not overflow. */ + if (total > params.sectors) + bd->bd_sectors = params.sectors; + } total = (uint64_t)params.cylinders * params.heads * params.sectors_per_track; if (bd->bd_sectors < total) bd->bd_sectors = total; - bd->bd_sectorsize = params.sector_size; ret = 1; } DEBUG("unit 0x%x flags %x, sectors %llu, sectorsize %u", @@ -377,8 +391,10 @@ static int bd_open(struct open_file *f, ...) { struct disk_devdesc *dev, rdev; + struct disk_devdesc disk; int err, g_err; va_list ap; + uint64_t size; va_start(ap, f); dev = va_arg(ap, struct disk_devdesc *); @@ -389,6 +405,33 @@ bd_open(struct open_file *f, ...) BD(dev).bd_open++; if (BD(dev).bd_bcache == NULL) BD(dev).bd_bcache = bcache_allocate(); + + /* + * Read disk size from partition. + * This is needed to work around buggy BIOS systems returning + * wrong (truncated) disk media size. + * During bd_probe() we tested if the mulitplication of bd_sectors + * would overflow so it should be safe to perform here. + */ + disk.d_dev = dev->d_dev; + disk.d_type = dev->d_type; + disk.d_unit = dev->d_unit; + disk.d_opendata = NULL; + disk.d_slice = -1; + disk.d_partition = -1; + disk.d_offset = 0; + if (disk_open(&disk, BD(dev).bd_sectors * BD(dev).bd_sectorsize, + BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0) == 0) { + + if (disk_ioctl(&disk, DIOCGMEDIASIZE, &size) == 0) { + size /= BD(dev).bd_sectorsize; + if (size > BD(dev).bd_sectors) + BD(dev).bd_sectors = size; + } + disk_close(&disk); + } + err = disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? DISK_F_NOCACHE: 0); @@ -486,8 +529,14 @@ static int bd_ioctl(struct open_file *f, u_long cmd, void *data) { struct disk_devdesc *dev; + int rc; dev = (struct disk_devdesc *)f->f_devdata; + + rc = disk_ioctl(dev, cmd, data); + if (rc != ENOTTY) + return (rc); + switch (cmd) { case DIOCGSECTORSIZE: *(u_int *)data = BD(dev).bd_sectorsize; @@ -521,7 +570,8 @@ bd_realstrategy(void *devdata, int rw, d char *buf, size_t *rsize) { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; - int blks, remaining; + uint64_t disk_blocks; + int blks; #ifdef BD_SUPPORT_FRAGS /* XXX: sector size */ char fragbuf[BIOSDISK_SECSIZE]; size_t fragsize; @@ -533,19 +583,43 @@ bd_realstrategy(void *devdata, int rw, d #endif DEBUG("open_disk %p", dev); + + /* + * Check the value of the size argument. We do have quite small + * heap (64MB), but we do not know good upper limit, so we check against + * INT_MAX here. This will also protect us against possible overflows + * while translating block count to bytes. + */ + if (size > INT_MAX) { + DEBUG("too large read: %zu bytes", size); + return (EIO); + } + blks = size / BD(dev).bd_sectorsize; + if (dblk > dblk + blks) + return (EIO); + if (rsize) *rsize = 0; + /* Get disk blocks, this value is either for whole disk or for partition */ + if (disk_ioctl(dev, DIOCGMEDIASIZE, &disk_blocks)) { + /* DIOCGMEDIASIZE does return bytes. */ + disk_blocks /= BD(dev).bd_sectorsize; + } else { + /* We should not get here. Just try to survive. */ + disk_blocks = BD(dev).bd_sectors - dev->d_offset; + } + + /* Validate source block address. */ + if (dblk < dev->d_offset || dblk >= dev->d_offset + disk_blocks) + return (EIO); + /* - * Perform partial read to prevent read-ahead crossing - * the end of disk - or any 32 bit aliases of the end. - * Signed arithmetic is used to handle wrap-around cases - * like we do for TCP sequence numbers. + * Truncate if we are crossing disk or partition end. */ - remaining = (int)(BD(dev).bd_sectors - dblk); /* truncate */ - if (remaining > 0 && remaining < blks) { - blks = remaining; + if (dblk + blks >= dev->d_offset + disk_blocks) { + blks = dev->d_offset + disk_blocks - dblk; size = blks * BD(dev).bd_sectorsize; DEBUG("short read %d", blks); } From owner-svn-src-all@freebsd.org Mon Feb 6 18:44:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06DCECD36DE; Mon, 6 Feb 2017 18:44:17 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE5DEE20; Mon, 6 Feb 2017 18:44:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16IiFRp009414; Mon, 6 Feb 2017 18:44:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16IiFTO009411; Mon, 6 Feb 2017 18:44:15 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702061844.v16IiFTO009411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 18:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313349 - in head/sys/boot/i386: btx/lib libi386 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 18:44:17 -0000 Author: tsoome Date: Mon Feb 6 18:44:15 2017 New Revision: 313349 URL: https://svnweb.freebsd.org/changeset/base/313349 Log: loader: disk io should not use alloca() The alloca() does give us pointer and we have no practical way to check if the area is actually available, resulting in corruption in corner cases. Unfortunately we do not have too many options right now, but to use one page. Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9455 Modified: head/sys/boot/i386/btx/lib/btxv86.h head/sys/boot/i386/libi386/bioscd.c head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/btx/lib/btxv86.h ============================================================================== --- head/sys/boot/i386/btx/lib/btxv86.h Mon Feb 6 18:29:43 2017 (r313348) +++ head/sys/boot/i386/btx/lib/btxv86.h Mon Feb 6 18:44:15 2017 (r313349) @@ -23,6 +23,14 @@ #include #include +/* + * Memory buffer space for real mode IO. + * Just one page is not much, but the space is rather limited. + * See ../btx/btx.S for details. + */ +#define V86_IO_BUFFER 0x8000 +#define V86_IO_BUFFER_SIZE 0x1000 + #define V86_ADDR 0x10000 /* Segment:offset address */ #define V86_CALLF 0x20000 /* Emulate far call */ #define V86_FLAGS 0x40000 /* Return flags */ Modified: head/sys/boot/i386/libi386/bioscd.c ============================================================================== --- head/sys/boot/i386/libi386/bioscd.c Mon Feb 6 18:29:43 2017 (r313348) +++ head/sys/boot/i386/libi386/bioscd.c Mon Feb 6 18:44:15 2017 (r313349) @@ -309,9 +309,6 @@ bc_realstrategy(void *devdata, int rw, d return (0); } -/* Max number of sectors to bounce-buffer at a time. */ -#define CD_BOUNCEBUF 8 - /* return negative value for an error, otherwise blocks read */ static int bc_read(int unit, daddr_t dblk, int blks, caddr_t dest) @@ -339,8 +336,9 @@ bc_read(int unit, daddr_t dblk, int blks * physical memory so we have to arrange a suitable * bounce buffer. */ - x = min(CD_BOUNCEBUF, (unsigned)blks); - bbuf = alloca(x * BIOSCD_SECSIZE); + x = V86_IO_BUFFER_SIZE / BIOSCD_SECSIZE; + x = min(x, (unsigned)blks); + bbuf = PTOV(V86_IO_BUFFER); maxfer = x; } else { bbuf = NULL; Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 18:29:43 2017 (r313348) +++ head/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 18:44:15 2017 (r313349) @@ -666,9 +666,6 @@ bd_realstrategy(void *devdata, int rw, d return (0); } -/* Max number of sectors to bounce-buffer if the request crosses a 64k boundary */ -#define FLOPPY_BOUNCEBUF 18 - static int bd_edd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int write) @@ -732,7 +729,7 @@ static int bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int write) { u_int x, sec, result, resid, retry, maxfer; - caddr_t p, xp, bbuf, breg; + caddr_t p, xp, bbuf; /* Just in case some idiot actually tries to read/write -1 blocks... */ if (blks < 0) @@ -754,17 +751,12 @@ bd_io(struct disk_devdesc *dev, daddr_t * as we need to. Use the bottom half unless there is a break * there, in which case we use the top half. */ - x = min(FLOPPY_BOUNCEBUF, (unsigned)blks); - bbuf = alloca(x * 2 * BD(dev).bd_sectorsize); - if (((u_int32_t)VTOP(bbuf) & 0xffff0000) == - ((u_int32_t)VTOP(bbuf + x * BD(dev).bd_sectorsize) & 0xffff0000)) { - breg = bbuf; - } else { - breg = bbuf + x * BD(dev).bd_sectorsize; - } + x = V86_IO_BUFFER_SIZE / BD(dev).bd_sectorsize; + x = min(x, (unsigned)blks); + bbuf = PTOV(V86_IO_BUFFER); maxfer = x; /* limit transfers to bounce region size */ } else { - breg = bbuf = NULL; + bbuf = NULL; maxfer = 0; } @@ -779,14 +771,14 @@ bd_io(struct disk_devdesc *dev, daddr_t x = min(x, maxfer); /* fit bounce buffer */ /* where do we transfer to? */ - xp = bbuf == NULL ? p : breg; + xp = bbuf == NULL ? p : bbuf; /* * Put your Data In, Put your Data out, * Put your Data In, and shake it all about */ if (write && bbuf != NULL) - bcopy(p, breg, x * BD(dev).bd_sectorsize); + bcopy(p, bbuf, x * BD(dev).bd_sectorsize); /* * Loop retrying the operation a couple of times. The BIOS @@ -820,7 +812,7 @@ bd_io(struct disk_devdesc *dev, daddr_t return(-1); } if (!write && bbuf != NULL) - bcopy(breg, p, x * BD(dev).bd_sectorsize); + bcopy(bbuf, p, x * BD(dev).bd_sectorsize); p += (x * BD(dev).bd_sectorsize); dblk += x; resid -= x; From owner-svn-src-all@freebsd.org Mon Feb 6 18:38:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57AE3CD3543; Mon, 6 Feb 2017 18:38:29 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 17339A63; Mon, 6 Feb 2017 18:38:29 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:1042:6a31:1deb:9f8a]) (authenticated bits=0) by hydra.pix.net (8.16.0.19/8.15.2) with ESMTPA id v16IcLRR098302; Mon, 6 Feb 2017 13:38:21 -0500 (EST) (envelope-from lidl@pix.net) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening , Svatopluk Kraus References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> Cc: Andreas Tobler , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits From: Kurt Lidl Message-ID: <5fcc9f37-3c0e-2685-2779-75b2a7566599@pix.net> Date: Mon, 6 Feb 2017 13:38:21 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 06 Feb 2017 18:56:30 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 18:38:29 -0000 On 2/5/17 1:59 PM, Jason Harmening wrote: > Actually attaching the patch this time (**** gmail client) > > On Sun, Feb 5, 2017 at 10:58 AM, Jason Harmening > > wrote: > > Hmm, it's a good idea to consider the possibility of a barrier > issue. It wouldn't be the first time we've had such a problem on a > weakly-ordered architecture. That said, I don't see a problem in > this case. smp_rendezvous_cpus() takes a spinlock and then issues > atomic_store_rel_int() to ensure the rendezvous params are visible > to other cpus. The latter corresponds to lwsync on powerpc, which > AFAIK should be sufficient to ensure visibility of prior stores. > > For now I'm going with the simpler explanation that I made a bad > assumption in the powerpc get_pcpu() and there is some context in > which the read of sprg0 doesn't return a consistent pointer value. > Unfortunately I don't see where that might be right now. > > On the mips side, Kurt/Alexander can you test the attached patch? > It contains a simple fix to ensure get_pcpu() returns the consistent > per-cpu pointer. I applied this patch on top of r313347 (which I had verified that a kernel built from that revisions to boot from successfully). The kernel from r313347+(this patch) least gets to multi-user on my ERL. So, that's a big improvement. I'll start a native buildworld/buildkernel on the ERL, and that ought to give it a reasonable workout. -Kurt > > On Sat, Feb 4, 2017 at 1:34 PM, Svatopluk Kraus > wrote: > > Probably not related. But when I took short look to the patch to see > what could go wrong, I walked into the following comment in > _rm_wlock(): "Assumes rm->rm_writecpus update is visible on > other CPUs > before rm_cleanIPI is called." There is no explicit barrier to > ensure > it. However, there might be some barriers inside of > smp_rendezvous_cpus(). I have no idea what could happened if this > assumption is not met. Note that rm_cleanIPI() is affected by the > patch. > > > > On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening > > > wrote: > > Can you post an example of such panic? Only 2 MI pieces were > changed, > > netisr and rmlock. I haven't seen problems on my own > amd64/i386/arm testing > > of this, so a backtrace might help to narrow down the cause. > > > > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler > > > > wrote: > >> > >> On 04.02.17 20:54, Jason Harmening wrote: > >>> > >>> I suspect this broke rmlocks for mips because the rmlock > implementation > >>> takes the address of the per-CPU pc_rm_queue when building > tracker > >>> lists. That address may be later accessed from another CPU > and will > >>> then translate to the wrong physical region if the address > was taken > >>> relative to the globally-constant pcpup VA used on mips. > >>> > >>> Regardless, for mips get_pcpup() should be implemented as > >>> pcpu_find(curcpu) since returning an address that may mean > something > >>> different depending on the CPU seems like a big POLA > violation if > >>> nothing else. > >>> > >>> I'm more concerned about the report of powerpc breakage. > For powerpc we > >>> simply take each pcpu pointer from the pc_allcpu list (which > is the same > >>> value stored in the cpuid_to_pcpu array) and pass it through > the ap_pcpu > >>> global to each AP's startup code, which then stores it in > sprg0. It > >>> should be globally unique and won't have the > variable-translation issues > >>> seen on mips. Andreas, are you certain this change was > responsible the > >>> breakage you saw, and was it the same sort of hang observed > on mips? > >> > >> > >> I'm really sure. 313036 booted fine, allowed me to execute heavy > >> compilation jobs, np. 313037 on the other side gave me > various patterns of > >> panics. During startup, but I also succeeded to get into > multiuser and then > >> the panic happend during port building. > >> > >> I have no deeper inside where pcpu data is used. Justin > mentioned netisr? > >> > >> Andreas > >> > > > > > From owner-svn-src-all@freebsd.org Mon Feb 6 19:13:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E11E2CD3158; Mon, 6 Feb 2017 19:13:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF8871FDF; Mon, 6 Feb 2017 19:13:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 981F210A791; Mon, 6 Feb 2017 14:13:12 -0500 (EST) From: John Baldwin To: TAKAHASHI Yoshihiro Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Date: Mon, 06 Feb 2017 10:54:18 -0800 Message-ID: <1794109.pgrNgNxaIj@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170205.221144.1616842004369178243.nyan@FreeBSD.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <20170205.221144.1616842004369178243.nyan@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 14:13:12 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 19:13:14 -0000 On Sunday, February 05, 2017 10:11:44 PM TAKAHASHI Yoshihiro wrote: > I have decided to remove pc98 support on stable/11 as well > after 2 weeks to reduce conflicts between head and stable/11. That seems like it might be a bit invasive to do on a stable branch? In the past when we've retired architectures we've only done it in HEAD, but not removed it from a stable branch. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Feb 6 19:13:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77880CD3170; Mon, 6 Feb 2017 19:13:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 583831FE1; Mon, 6 Feb 2017 19:13:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 4FC9E10A7DB; Mon, 6 Feb 2017 14:13:15 -0500 (EST) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313342 - head/sys/conf Date: Mon, 06 Feb 2017 10:43:09 -0800 Message-ID: <2448004.hnTc9TClBV@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702061441.v16EfYZx010320@repo.freebsd.org> References: <201702061441.v16EfYZx010320@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 14:13:15 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 19:13:16 -0000 On Monday, February 06, 2017 02:41:34 PM Andrew Turner wrote: > Author: andrew > Date: Mon Feb 6 14:41:34 2017 > New Revision: 313342 > URL: https://svnweb.freebsd.org/changeset/base/313342 > > Log: > Only build the ACPI PCI drivers on x86, they are unlikely to be used on > arm64 without dignificant changes. > > Obtained from: ABT Systems Ltd > Sponsored by: The FreeBSD Foundation I still think this is not really the right approach. Nothing about _BBN, _CRS, or _PRT, etc. is x86-specific. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Feb 6 19:13:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 162E4CD31A2; Mon, 6 Feb 2017 19:13:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4FF7AE; Mon, 6 Feb 2017 19:13:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id F1D4A10A7B9; Mon, 6 Feb 2017 14:13:13 -0500 (EST) From: John Baldwin To: Sevan Janiyan Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r313197 - stable/11/share/misc Date: Mon, 06 Feb 2017 10:50:17 -0800 Message-ID: <1831555.5ZvQ71sPNs@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702041541.v14Ffx77047190@repo.freebsd.org> References: <201702041541.v14Ffx77047190@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 14:13:14 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 19:13:22 -0000 On Saturday, February 04, 2017 03:41:59 PM Sevan Janiyan wrote: > Author: sevan (doc committer) > Date: Sat Feb 4 15:41:59 2017 > New Revision: 313197 > URL: https://svnweb.freebsd.org/changeset/base/313197 > > Log: > Belatedly add FreeBSD 11.0 and 12.0 to the family tree file. > > Submitted by: des (a while back) > Sponsored by: The FreeBSD Foundation Please include "MFC " at the start of the commit (where is the original revision) when doing merges from head. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Feb 6 19:20:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B24CCD3332; Mon, 6 Feb 2017 19:20:51 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from host2.hosts.geeklan.co.uk (host2.hosts.geeklan.co.uk [IPv6:2001:470:1f13:8c2::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "host2.hosts.geeklan.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29D527B5; Mon, 6 Feb 2017 19:20:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from Sevans-11-MacBook-Air.local (cpc76904-dals22-2-0-cust978.20-2.cable.virginm.net [81.106.47.211]) by host2.hosts.geeklan.co.uk (OpenSMTPD) with ESMTPSA id a3874a8b TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Mon, 6 Feb 2017 19:20:42 +0000 (GMT) Subject: Re: svn commit: r313197 - stable/11/share/misc To: John Baldwin References: <201702041541.v14Ffx77047190@repo.freebsd.org> <1831555.5ZvQ71sPNs@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org From: Sevan Janiyan Message-ID: <9cd6c2fa-6b13-b0fe-aae4-084558d6454e@FreeBSD.org> Date: Mon, 6 Feb 2017 19:20:31 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1831555.5ZvQ71sPNs@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 19:20:51 -0000 On 06/02/2017 18:50, John Baldwin wrote: > Please include "MFC " at the start of the commit (where is the > original revision) when doing merges from head. Sure thing. Thanks for the heads up. Sevan From owner-svn-src-all@freebsd.org Mon Feb 6 20:37:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B5FBCD3BCE; Mon, 6 Feb 2017 20:37:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E8441A9B; Mon, 6 Feb 2017 20:37:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KaxF9061349; Mon, 6 Feb 2017 20:36:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16Kaxbc061348; Mon, 6 Feb 2017 20:36:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702062036.v16Kaxbc061348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 6 Feb 2017 20:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313350 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 20:37:00 -0000 Author: trasz Date: Mon Feb 6 20:36:59 2017 New Revision: 313350 URL: https://svnweb.freebsd.org/changeset/base/313350 Log: In r290196 the root mount hold mechanism was changed to make it not wait for mount hold release if the root device already exists. So, unless your rootdev is not on USB - ie in the usual case - the root mount won't wait for USB. However, the old behaviour was sometimes used as "wait until USB is fully enumerated", and r290196 broke that. This commit adds vfs.root_mount_always_wait tunable, to force the kernel to always wait for root mount holds, even if the root is already there. Reviewed by: kib MFC after: 2 weeks Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9387 Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Mon Feb 6 18:44:15 2017 (r313349) +++ head/sys/kern/vfs_mountroot.c Mon Feb 6 20:36:59 2017 (r313350) @@ -132,6 +132,11 @@ static int root_mount_complete; static int root_mount_timeout = 3; TUNABLE_INT("vfs.mountroot.timeout", &root_mount_timeout); +static int root_mount_always_wait = 0; +SYSCTL_INT(_vfs, OID_AUTO, root_mount_always_wait, CTLFLAG_RDTUN, + &root_mount_always_wait, 0, + "Wait for root mount holds even if the root device already exists"); + SYSCTL_PROC(_vfs, OID_AUTO, root_mount_hold, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_vfs_root_mount_hold, "A", @@ -961,10 +966,11 @@ vfs_mountroot_wait_if_neccessary(const c /* * In case of ZFS and NFS we don't have a way to wait for - * specific device. + * specific device. Also do the wait if the user forced that + * behaviour by setting vfs.root_mount_always_wait=1. */ if (strcmp(fs, "zfs") == 0 || strstr(fs, "nfs") != NULL || - dev[0] == '\0') { + dev[0] == '\0' || root_mount_always_wait != 0) { vfs_mountroot_wait(); return (0); } From owner-svn-src-all@freebsd.org Mon Feb 6 20:44:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF79CD3EDB; Mon, 6 Feb 2017 20:44:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17FA085; Mon, 6 Feb 2017 20:44:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KiZTI065164; Mon, 6 Feb 2017 20:44:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16KiZOv065163; Mon, 6 Feb 2017 20:44:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702062044.v16KiZOv065163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 6 Feb 2017 20:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313351 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 20:44:36 -0000 Author: trasz Date: Mon Feb 6 20:44:34 2017 New Revision: 313351 URL: https://svnweb.freebsd.org/changeset/base/313351 Log: Make root_mount_hold() work after boot. This is important for two reasons. First is rerooting into USB-mounted device that happens to be not yet enumerated. The second is when mounting with (non-root) filesystem on USB device on a hub that's enumerated later than the root mount: the rc scripts explicitly mount for the root mount holds to be released, but each USB bus takes the hold asynchronously, and if that happens after root mount, it would just get ignored. Reviewed by: marcel MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9388 Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Mon Feb 6 20:36:59 2017 (r313350) +++ head/sys/kern/vfs_mountroot.c Mon Feb 6 20:44:34 2017 (r313351) @@ -171,9 +171,6 @@ root_mount_hold(const char *identifier) { struct root_hold_token *h; - if (root_mounted()) - return (NULL); - h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; mtx_lock(&root_holds_mtx); @@ -186,8 +183,8 @@ void root_mount_rel(struct root_hold_token *h) { - if (h == NULL) - return; + KASSERT(h != NULL, ("%s: NULL token", __func__)); + mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); wakeup(&root_holds); From owner-svn-src-all@freebsd.org Mon Feb 6 20:57:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0349CCD318B; Mon, 6 Feb 2017 20:57:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF8BA912; Mon, 6 Feb 2017 20:57:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KvC1t069672; Mon, 6 Feb 2017 20:57:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16KvCtI069664; Mon, 6 Feb 2017 20:57:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702062057.v16KvCtI069664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 6 Feb 2017 20:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux 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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 20:57:14 -0000 Author: trasz Date: Mon Feb 6 20:57:12 2017 New Revision: 313352 URL: https://svnweb.freebsd.org/changeset/base/313352 Log: Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats instead of their sys_*() counterparts. Reviewed by: ed, dchagin, kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9378 Modified: head/sys/compat/cloudabi/cloudabi_mem.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_mmap.c head/sys/vm/vm_extern.h head/sys/vm/vm_mmap.c Modified: head/sys/compat/cloudabi/cloudabi_mem.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_mem.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/cloudabi/cloudabi_mem.c Mon Feb 6 20:57:12 2017 (r313352) @@ -28,7 +28,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include + +#include #include @@ -62,137 +64,115 @@ int cloudabi_sys_mem_advise(struct thread *td, struct cloudabi_sys_mem_advise_args *uap) { - struct madvise_args madvise_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; + int behav; switch (uap->advice) { case CLOUDABI_ADVICE_DONTNEED: - madvise_args.behav = MADV_DONTNEED; + behav = MADV_DONTNEED; break; case CLOUDABI_ADVICE_NORMAL: - madvise_args.behav = MADV_NORMAL; + behav = MADV_NORMAL; break; case CLOUDABI_ADVICE_RANDOM: - madvise_args.behav = MADV_RANDOM; + behav = MADV_RANDOM; break; case CLOUDABI_ADVICE_SEQUENTIAL: - madvise_args.behav = MADV_SEQUENTIAL; + behav = MADV_SEQUENTIAL; break; case CLOUDABI_ADVICE_WILLNEED: - madvise_args.behav = MADV_WILLNEED; + behav = MADV_WILLNEED; break; default: return (EINVAL); } - return (sys_madvise(td, &madvise_args)); + return (kern_vm_madvise(td, (vm_offset_t)uap->mapping, + uap->mapping_len, behav)); } int cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap) { - struct mlock_args mlock_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; - return (sys_mlock(td, &mlock_args)); + return (vm_mlock(td->td_proc, td->td_ucred, uap->mapping, + uap->mapping_len)); } int cloudabi_sys_mem_map(struct thread *td, struct cloudabi_sys_mem_map_args *uap) { - struct mmap_args mmap_args = { - .addr = uap->addr, - .len = uap->len, - .fd = uap->fd, - .pos = uap->off - }; - int error; + int error, flags, prot; /* Translate flags. */ + flags = 0; if (uap->flags & CLOUDABI_MAP_ANON) - mmap_args.flags |= MAP_ANON; + flags |= MAP_ANON; if (uap->flags & CLOUDABI_MAP_FIXED) - mmap_args.flags |= MAP_FIXED; + flags |= MAP_FIXED; if (uap->flags & CLOUDABI_MAP_PRIVATE) - mmap_args.flags |= MAP_PRIVATE; + flags |= MAP_PRIVATE; if (uap->flags & CLOUDABI_MAP_SHARED) - mmap_args.flags |= MAP_SHARED; + flags |= MAP_SHARED; /* Translate protection. */ - error = convert_mprot(uap->prot, &mmap_args.prot); + error = convert_mprot(uap->prot, &prot); if (error != 0) return (error); - return (sys_mmap(td, &mmap_args)); + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, prot, + flags, uap->fd, uap->off)); } int cloudabi_sys_mem_protect(struct thread *td, struct cloudabi_sys_mem_protect_args *uap) { - struct mprotect_args mprotect_args = { - .addr = uap->mapping, - .len = uap->mapping_len, - }; - int error; + int error, prot; /* Translate protection. */ - error = convert_mprot(uap->prot, &mprotect_args.prot); + error = convert_mprot(uap->prot, &prot); if (error != 0) return (error); - return (sys_mprotect(td, &mprotect_args)); + return (kern_vm_mprotect(td, (vm_offset_t)uap->mapping, + uap->mapping_len, prot)); } int cloudabi_sys_mem_sync(struct thread *td, struct cloudabi_sys_mem_sync_args *uap) { - struct msync_args msync_args = { - .addr = uap->mapping, - .len = uap->mapping_len, - }; + int flags; /* Convert flags. */ switch (uap->flags & (CLOUDABI_MS_ASYNC | CLOUDABI_MS_SYNC)) { case CLOUDABI_MS_ASYNC: - msync_args.flags |= MS_ASYNC; + flags = MS_ASYNC; break; case CLOUDABI_MS_SYNC: - msync_args.flags |= MS_SYNC; + flags = MS_SYNC; break; default: return (EINVAL); } if ((uap->flags & CLOUDABI_MS_INVALIDATE) != 0) - msync_args.flags |= MS_INVALIDATE; + flags |= MS_INVALIDATE; - return (sys_msync(td, &msync_args)); + return (kern_vm_msync(td, (vm_offset_t)uap->mapping, + uap->mapping_len, flags)); } int cloudabi_sys_mem_unlock(struct thread *td, struct cloudabi_sys_mem_unlock_args *uap) { - struct munlock_args munlock_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; - return (sys_munlock(td, &munlock_args)); + return (kern_vm_munlock(td, (vm_offset_t)uap->mapping, uap->mapping_len)); } int cloudabi_sys_mem_unmap(struct thread *td, struct cloudabi_sys_mem_unmap_args *uap) { - struct munmap_args munmap_args = { - .addr = uap->mapping, - .len = uap->mapping_len - }; - return (sys_munmap(td, &munmap_args)); + return (kern_vm_munmap(td, (vm_offset_t)uap->mapping, uap->mapping_len)); } Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Feb 6 20:57:12 2017 (r313352) @@ -449,42 +449,30 @@ freebsd32_fexecve(struct thread *td, str int freebsd32_mprotect(struct thread *td, struct freebsd32_mprotect_args *uap) { - struct mprotect_args ap; + int prot; - ap.addr = PTRIN(uap->addr); - ap.len = uap->len; - ap.prot = uap->prot; + prot = uap->prot; #if defined(__amd64__) - if (i386_read_exec && (ap.prot & PROT_READ) != 0) - ap.prot |= PROT_EXEC; + if (i386_read_exec && (prot & PROT_READ) != 0) + prot |= PROT_EXEC; #endif - return (sys_mprotect(td, &ap)); + return (kern_vm_mprotect(td, (vm_offset_t)PTRIN(uap->addr), + uap->len, prot)); } int freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap) { - struct mmap_args ap; - vm_offset_t addr = (vm_offset_t) uap->addr; - vm_size_t len = uap->len; - int prot = uap->prot; - int flags = uap->flags; - int fd = uap->fd; - off_t pos = PAIR32TO64(off_t,uap->pos); + int prot; + prot = uap->prot; #if defined(__amd64__) if (i386_read_exec && (prot & PROT_READ)) prot |= PROT_EXEC; #endif - ap.addr = (void *) addr; - ap.len = len; - ap.prot = prot; - ap.flags = flags; - ap.fd = fd; - ap.pos = pos; - - return (sys_mmap(td, &ap)); + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, prot, + uap->flags, uap->fd, PAIR32TO64(off_t, uap->pos))); } #ifdef COMPAT_FREEBSD6 Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/linux/linux_misc.c Mon Feb 6 20:57:12 2017 (r313352) @@ -585,10 +585,8 @@ select_out: int linux_mremap(struct thread *td, struct linux_mremap_args *args) { - struct munmap_args /* { - void *addr; - size_t len; - } */ bsd_args; + uintptr_t addr; + size_t len; int error = 0; #ifdef DEBUG @@ -623,10 +621,9 @@ linux_mremap(struct thread *td, struct l } if (args->new_len < args->old_len) { - bsd_args.addr = - (caddr_t)((uintptr_t)args->addr + args->new_len); - bsd_args.len = args->old_len - args->new_len; - error = sys_munmap(td, &bsd_args); + addr = args->addr + args->new_len; + len = args->old_len - args->new_len; + error = kern_vm_munmap(td, addr, len); } td->td_retval[0] = error ? 0 : (uintptr_t)args->addr; @@ -640,13 +637,9 @@ linux_mremap(struct thread *td, struct l int linux_msync(struct thread *td, struct linux_msync_args *args) { - struct msync_args bsd_args; - bsd_args.addr = (caddr_t)(uintptr_t)args->addr; - bsd_args.len = (uintptr_t)args->len; - bsd_args.flags = args->fl & ~LINUX_MS_SYNC; - - return (sys_msync(td, &bsd_args)); + return (kern_vm_msync(td, args->addr, args->len, + args->fl & ~LINUX_MS_SYNC)); } int Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/compat/linux/linux_mmap.c Mon Feb 6 20:57:12 2017 (r313352) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -67,15 +68,7 @@ linux_mmap_common(struct thread *td, uin { struct proc *p = td->td_proc; struct vmspace *vms = td->td_proc->p_vmspace; - struct mmap_args /* { - caddr_t addr; - size_t len; - int prot; - int flags; - int fd; - off_t pos; - } */ bsd_args; - int error; + int bsd_flags, error; struct file *fp; cap_rights_t rights; @@ -83,7 +76,7 @@ linux_mmap_common(struct thread *td, uin addr, len, prot, flags, fd, pos); error = 0; - bsd_args.flags = 0; + bsd_flags = 0; fp = NULL; /* @@ -94,21 +87,21 @@ linux_mmap_common(struct thread *td, uin return (EINVAL); if (flags & LINUX_MAP_SHARED) - bsd_args.flags |= MAP_SHARED; + bsd_flags |= MAP_SHARED; if (flags & LINUX_MAP_PRIVATE) - bsd_args.flags |= MAP_PRIVATE; + bsd_flags |= MAP_PRIVATE; if (flags & LINUX_MAP_FIXED) - bsd_args.flags |= MAP_FIXED; + bsd_flags |= MAP_FIXED; if (flags & LINUX_MAP_ANON) { /* Enforce pos to be on page boundary, then ignore. */ if ((pos & PAGE_MASK) != 0) return (EINVAL); pos = 0; - bsd_args.flags |= MAP_ANON; + bsd_flags |= MAP_ANON; } else - bsd_args.flags |= MAP_NOSYNC; + bsd_flags |= MAP_NOSYNC; if (flags & LINUX_MAP_GROWSDOWN) - bsd_args.flags |= MAP_STACK; + bsd_flags |= MAP_STACK; /* * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC @@ -118,14 +111,13 @@ linux_mmap_common(struct thread *td, uin * * XXX. Linux checks that the file system is not mounted with noexec. */ - bsd_args.prot = prot; #if defined(__amd64__) - linux_fixup_prot(td, &bsd_args.prot); + linux_fixup_prot(td, &prot); #endif /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */ - bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd; - if (bsd_args.fd != -1) { + fd = (bsd_flags & MAP_ANON) ? -1 : fd; + if (fd != -1) { /* * Linux follows Solaris mmap(2) description: * The file descriptor fildes is opened with @@ -133,8 +125,7 @@ linux_mmap_common(struct thread *td, uin * protection options specified. */ - error = fget(td, bsd_args.fd, - cap_rights_init(&rights, CAP_MMAP), &fp); + error = fget(td, fd, cap_rights_init(&rights, CAP_MMAP), &fp); if (error != 0) return (error); if (fp->f_type != DTYPE_VNODE) { @@ -205,21 +196,13 @@ linux_mmap_common(struct thread *td, uin * we map the full stack, since we don't have a way * to autogrow it. */ - if (len > STACK_SIZE - GUARD_SIZE) { - bsd_args.addr = (caddr_t)addr; - bsd_args.len = len; - } else { - bsd_args.addr = (caddr_t)addr - - (STACK_SIZE - GUARD_SIZE - len); - bsd_args.len = STACK_SIZE - GUARD_SIZE; + if (len <= STACK_SIZE - GUARD_SIZE) { + addr = addr - (STACK_SIZE - GUARD_SIZE - len); + len = STACK_SIZE - GUARD_SIZE; } - } else { - bsd_args.addr = (caddr_t)addr; - bsd_args.len = len; } - bsd_args.pos = pos; - error = sys_mmap(td, &bsd_args); + error = kern_vm_mmap(td, addr, len, prot, bsd_flags, fd, pos); LINUX_CTR2(mmap2, "return: %d (%p)", error, td->td_retval[0]); @@ -229,16 +212,11 @@ linux_mmap_common(struct thread *td, uin int linux_mprotect_common(struct thread *td, uintptr_t addr, size_t len, int prot) { - struct mprotect_args bsd_args; - - bsd_args.addr = (void *)addr; - bsd_args.len = len; - bsd_args.prot = prot; #if defined(__amd64__) - linux_fixup_prot(td, &bsd_args.prot); + linux_fixup_prot(td, &prot); #endif - return (sys_mprotect(td, &bsd_args)); + return (kern_vm_mprotect(td, addr, len, prot)); } #if defined(__amd64__) Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/vm/vm_extern.h Mon Feb 6 20:57:12 2017 (r313352) @@ -71,6 +71,16 @@ void kmem_init(vm_offset_t, vm_offset_t) void kmem_init_zero_region(void); void kmeminit(void); +int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot, int flags, int fd, off_t pos); +int kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot); +int kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size, + int flags); +int kern_vm_munlock(struct thread *td, vm_offset_t addr, vm_size_t size); +int kern_vm_munmap(struct thread *td, vm_offset_t addr, vm_size_t size); +int kern_vm_madvise(struct thread *td, vm_offset_t addr, vm_size_t len, + int behav); void swapout_procs(int); int kernacc(void *, int, int); int useracc(void *, int, int); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Mon Feb 6 20:44:34 2017 (r313351) +++ head/sys/vm/vm_mmap.c Mon Feb 6 20:57:12 2017 (r313352) @@ -187,27 +187,26 @@ struct mmap_args { * MPSAFE */ int -sys_mmap(td, uap) - struct thread *td; - struct mmap_args *uap; +sys_mmap(struct thread *td, struct mmap_args *uap) +{ + + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, + uap->prot, uap->flags, uap->fd, uap->pos)); +} + +int +kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot, int flags, int fd, off_t pos) { struct file *fp; - vm_offset_t addr; - vm_size_t size, pageoff; + vm_size_t pageoff; vm_prot_t cap_maxprot; - int align, error, flags, prot; - off_t pos; + int align, error; struct vmspace *vms = td->td_proc->p_vmspace; cap_rights_t rights; - addr = (vm_offset_t) uap->addr; - size = uap->len; - prot = uap->prot; - flags = uap->flags; - pos = uap->pos; - fp = NULL; - AUDIT_ARG_FD(uap->fd); + AUDIT_ARG_FD(fd); /* * Ignore old flags that used to be defined but did not do anything. @@ -224,8 +223,8 @@ sys_mmap(td, uap) * pos. */ if (!SV_CURPROC_FLAG(SV_AOUT)) { - if ((uap->len == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || - ((flags & MAP_ANON) != 0 && (uap->fd != -1 || pos != 0))) + if ((size == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || + ((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0))) return (EINVAL); } else { if ((flags & MAP_ANON) != 0) @@ -233,7 +232,7 @@ sys_mmap(td, uap) } if (flags & MAP_STACK) { - if ((uap->fd != -1) || + if ((fd != -1) || ((prot & (PROT_READ | PROT_WRITE)) != (PROT_READ | PROT_WRITE))) return (EINVAL); flags |= MAP_ANON; @@ -353,7 +352,7 @@ sys_mmap(td, uap) } if (prot & PROT_EXEC) cap_rights_set(&rights, CAP_MMAP_X); - error = fget_mmap(td, uap->fd, &rights, &cap_maxprot, &fp); + error = fget_mmap(td, fd, &rights, &cap_maxprot, &fp); if (error != 0) goto done; if ((flags & (MAP_SHARED | MAP_PRIVATE)) == 0 && @@ -380,15 +379,9 @@ done: int freebsd6_mmap(struct thread *td, struct freebsd6_mmap_args *uap) { - struct mmap_args oargs; - oargs.addr = uap->addr; - oargs.len = uap->len; - oargs.prot = uap->prot; - oargs.flags = uap->flags; - oargs.fd = uap->fd; - oargs.pos = uap->pos; - return (sys_mmap(td, &oargs)); + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, + uap->prot, uap->flags, uap->fd, uap->pos)); } #endif @@ -404,11 +397,8 @@ struct ommap_args { }; #endif int -ommap(td, uap) - struct thread *td; - struct ommap_args *uap; +ommap(struct thread *td, struct ommap_args *uap) { - struct mmap_args nargs; static const char cvtbsdprot[8] = { 0, PROT_EXEC, @@ -419,36 +409,34 @@ ommap(td, uap) PROT_WRITE | PROT_READ, PROT_EXEC | PROT_WRITE | PROT_READ, }; + int flags, prot; #define OMAP_ANON 0x0002 #define OMAP_COPY 0x0020 #define OMAP_SHARED 0x0010 #define OMAP_FIXED 0x0100 - nargs.addr = uap->addr; - nargs.len = uap->len; - nargs.prot = cvtbsdprot[uap->prot & 0x7]; + prot = cvtbsdprot[uap->prot & 0x7]; #ifdef COMPAT_FREEBSD32 #if defined(__amd64__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32) && - nargs.prot != 0) - nargs.prot |= PROT_EXEC; + prot != 0) + prot |= PROT_EXEC; #endif #endif - nargs.flags = 0; + flags = 0; if (uap->flags & OMAP_ANON) - nargs.flags |= MAP_ANON; + flags |= MAP_ANON; if (uap->flags & OMAP_COPY) - nargs.flags |= MAP_COPY; + flags |= MAP_COPY; if (uap->flags & OMAP_SHARED) - nargs.flags |= MAP_SHARED; + flags |= MAP_SHARED; else - nargs.flags |= MAP_PRIVATE; + flags |= MAP_PRIVATE; if (uap->flags & OMAP_FIXED) - nargs.flags |= MAP_FIXED; - nargs.fd = uap->fd; - nargs.pos = uap->pos; - return (sys_mmap(td, &nargs)); + flags |= MAP_FIXED; + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, + prot, flags, uap->fd, uap->pos)); } #endif /* COMPAT_43 */ @@ -464,20 +452,20 @@ struct msync_args { * MPSAFE */ int -sys_msync(td, uap) - struct thread *td; - struct msync_args *uap; +sys_msync(struct thread *td, struct msync_args *uap) { - vm_offset_t addr; - vm_size_t size, pageoff; - int flags; + + return (kern_vm_msync(td, (vm_offset_t)uap->addr, uap->len, + uap->flags)); +} + +int +kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size, int flags) +{ + vm_size_t pageoff; vm_map_t map; int rv; - addr = (vm_offset_t) uap->addr; - size = uap->len; - flags = uap->flags; - pageoff = (addr & PAGE_MASK); addr -= pageoff; size += pageoff; @@ -519,21 +507,23 @@ struct munmap_args { * MPSAFE */ int -sys_munmap(td, uap) - struct thread *td; - struct munmap_args *uap; +sys_munmap(struct thread *td, struct munmap_args *uap) +{ + + return (kern_vm_munmap(td, (vm_offset_t)uap->addr, uap->len)); +} + +int +kern_vm_munmap(struct thread *td, vm_offset_t addr, vm_size_t size) { #ifdef HWPMC_HOOKS struct pmckern_map_out pkm; vm_map_entry_t entry; bool pmc_handled; #endif - vm_offset_t addr; - vm_size_t size, pageoff; + vm_size_t pageoff; vm_map_t map; - addr = (vm_offset_t) uap->addr; - size = uap->len; if (size == 0) return (EINVAL); @@ -602,18 +592,20 @@ struct mprotect_args { * MPSAFE */ int -sys_mprotect(td, uap) - struct thread *td; - struct mprotect_args *uap; +sys_mprotect(struct thread *td, struct mprotect_args *uap) { - vm_offset_t addr; - vm_size_t size, pageoff; - vm_prot_t prot; - addr = (vm_offset_t) uap->addr; - size = uap->len; - prot = uap->prot & VM_PROT_ALL; + return (kern_vm_mprotect(td, (vm_offset_t)uap->addr, uap->len, + uap->prot)); +} +int +kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size, + vm_prot_t prot) +{ + vm_size_t pageoff; + + prot = (prot & VM_PROT_ALL); pageoff = (addr & PAGE_MASK); addr -= pageoff; size += pageoff; @@ -689,6 +681,14 @@ sys_madvise(td, uap) struct thread *td; struct madvise_args *uap; { + + return (kern_vm_madvise(td, (vm_offset_t)uap->addr, uap->len, + uap->behav)); +} + +int +kern_vm_madvise(struct thread *td, vm_offset_t addr, vm_size_t len, int behav) +{ vm_offset_t start, end; vm_map_t map; int flags; @@ -697,7 +697,7 @@ sys_madvise(td, uap) * Check for our special case, advising the swap pager we are * "immortal." */ - if (uap->behav == MADV_PROTECT) { + if (behav == MADV_PROTECT) { flags = PPROT_SET; return (kern_procctl(td, P_PID, td->td_proc->p_pid, PROC_SPROTECT, &flags)); @@ -706,27 +706,26 @@ sys_madvise(td, uap) /* * Check for illegal behavior */ - if (uap->behav < 0 || uap->behav > MADV_CORE) + if (behav < 0 || behav > MADV_CORE) return (EINVAL); /* * Check for illegal addresses. Watch out for address wrap... Note * that VM_*_ADDRESS are not constants due to casts (argh). */ map = &td->td_proc->p_vmspace->vm_map; - if ((vm_offset_t)uap->addr < vm_map_min(map) || - (vm_offset_t)uap->addr + uap->len > vm_map_max(map)) + if (addr < vm_map_min(map) || addr + len > vm_map_max(map)) return (EINVAL); - if (((vm_offset_t) uap->addr + uap->len) < (vm_offset_t) uap->addr) + if ((addr + len) < addr) return (EINVAL); /* * Since this routine is only advisory, we default to conservative * behavior. */ - start = trunc_page((vm_offset_t) uap->addr); - end = round_page((vm_offset_t) uap->addr + uap->len); + start = trunc_page(addr); + end = round_page(addr + len); - if (vm_map_madvise(map, start, end, uap->behav)) + if (vm_map_madvise(map, start, end, behav)) return (EINVAL); return (0); } @@ -1189,12 +1188,16 @@ struct munlock_args { * MPSAFE */ int -sys_munlock(td, uap) - struct thread *td; - struct munlock_args *uap; +sys_munlock(struct thread *td, struct munlock_args *uap) { - vm_offset_t addr, end, last, start; - vm_size_t size; + + return (kern_vm_munlock(td, (vm_offset_t)uap->addr, uap->len)); +} + +int +kern_vm_munlock(struct thread *td, vm_offset_t addr, vm_size_t size) +{ + vm_offset_t end, last, start; #ifdef RACCT vm_map_t map; #endif @@ -1203,8 +1206,6 @@ sys_munlock(td, uap) error = priv_check(td, PRIV_VM_MUNLOCK); if (error) return (error); - addr = (vm_offset_t)uap->addr; - size = uap->len; last = addr + size; start = trunc_page(addr); end = round_page(last); From owner-svn-src-all@freebsd.org Mon Feb 6 20:57:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11E63CD31A6; Mon, 6 Feb 2017 20:57:19 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA1F0927; Mon, 6 Feb 2017 20:57:18 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16KvHPw069719; Mon, 6 Feb 2017 20:57:17 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16KvHDN069718; Mon, 6 Feb 2017 20:57:17 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702062057.v16KvHDN069718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 20:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313353 - stable/11/sys/boot/i386/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 20:57:19 -0000 Author: tsoome Date: Mon Feb 6 20:57:17 2017 New Revision: 313353 URL: https://svnweb.freebsd.org/changeset/base/313353 Log: MFC r310845: boot2 will deadlock if extended keys are used on text input Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D8608 Modified: stable/11/sys/boot/i386/common/cons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/i386/common/cons.c ============================================================================== --- stable/11/sys/boot/i386/common/cons.c Mon Feb 6 20:57:12 2017 (r313352) +++ stable/11/sys/boot/i386/common/cons.c Mon Feb 6 20:57:17 2017 (r313353) @@ -65,18 +65,17 @@ int getc(int fn) { - /* - * The extra comparison against zero is an attempt to work around - * what appears to be a bug in QEMU and Bochs. Both emulators - * sometimes report a key-press with scancode one and ascii zero - * when no such key is pressed in reality. As far as I can tell, - * this only happens shortly after a reboot. - */ v86.ctl = V86_FLAGS; v86.addr = 0x16; v86.eax = fn << 8; v86int(); - return fn == 0 ? v86.eax & 0xff : (!V86_ZR(v86.efl) && (v86.eax & 0xff)); + + if (fn == 0) + return (v86.eax); + + if (V86_ZR(v86.efl)) + return (0); + return (v86.eax); } int @@ -106,14 +105,22 @@ getchar(void) int keyhit(unsigned int secs) { - uint32_t t0, t1; + uint32_t t0, t1, c; if (OPT_CHECK(RBX_NOINTR)) return (0); secs *= SECOND; t0 = 0; for (;;) { - if (xgetc(1)) + /* + * The extra comparison is an attempt to work around + * what appears to be a bug in QEMU and Bochs. Both emulators + * sometimes report a key-press with scancode one and ascii zero + * when no such key is pressed in reality. As far as I can tell, + * this only happens shortly after a reboot. + */ + c = xgetc(1); + if (c != 0 && c != 0x0100) return (1); if (secs > 0) { t1 = *(uint32_t *)PTOV(0x46c); @@ -134,9 +141,19 @@ getstr(char *cmdstr, size_t cmdstrsize) s = cmdstr; for (;;) { - switch (c = xgetc(0)) { - case 0: + c = xgetc(0); + + /* Translate some extended codes. */ + switch (c) { + case 0x5300: /* delete */ + c = '\177'; break; + default: + c &= 0xff; + break; + } + + switch (c) { case '\177': case '\b': if (s > cmdstr) { @@ -149,9 +166,11 @@ getstr(char *cmdstr, size_t cmdstrsize) *s = 0; return; default: - if (s - cmdstr < cmdstrsize - 1) - *s++ = c; - putchar(c); + if (c >= 0x20 && c <= 0x7e) { + if (s - cmdstr < cmdstrsize - 1) + *s++ = c; + putchar(c); + } break; } } From owner-svn-src-all@freebsd.org Mon Feb 6 21:02:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCB4DCD345A; Mon, 6 Feb 2017 21:02:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9AF3F36; Mon, 6 Feb 2017 21:02:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16L2Qc1073559; Mon, 6 Feb 2017 21:02:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16L2QRb073558; Mon, 6 Feb 2017 21:02:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702062102.v16L2QRb073558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Feb 2017 21:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313354 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 21:02:28 -0000 Author: adrian Date: Mon Feb 6 21:02:26 2017 New Revision: 313354 URL: https://svnweb.freebsd.org/changeset/base/313354 Log: [iwm] fix path. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 6 20:57:17 2017 (r313353) +++ head/sys/conf/files Mon Feb 6 21:02:26 2017 (r313354) @@ -1879,7 +1879,7 @@ dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm -dev/netif/iwm/if_iwm_notif_wait.c optional iwm +dev/iwm/if_iwm_notif_wait.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm From owner-svn-src-all@freebsd.org Mon Feb 6 21:02:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B381CD34B8; Mon, 6 Feb 2017 21:02:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D09B2103A; Mon, 6 Feb 2017 21:02:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id r18so24370782wmd.3; Mon, 06 Feb 2017 13:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=brbp2QEO0G6A3/rNsf31l7/QWANKHP04GnqjKgFi67g=; b=QCmxqFfHgtTQLG3jUVf7SMkihI0IAzVjfHrsxGIAsbPpkwCrCpVzjMq/337oCc+vKq RIsZ4rOn5k+qU6EhH5UwBBxfPKqJ6+jMGB7Ljao2cqzAraitYIqbaXuEGMCYL6EoYLub zodAbs8AKdjZBI6+UEMhRknwE4/Bttr96Du2HQss0V9hGLEI6FFIUuDB+UvyVANp76n+ iOTyi5JFAgxkxkHq4OTyZZJlTVjNjdB6BW2ZIjA/5nMZb8quHtnMNl+pEaluF4qgWdfu b4KnA3f2g11UshEADcPujPCVKMxjvyjDNqSbwxM+/iC6qCEYwpuDX8uPljcnRgoAsQdD 2srg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=brbp2QEO0G6A3/rNsf31l7/QWANKHP04GnqjKgFi67g=; b=fvREQC9FkHMvsPQfssNEfJHOmBi8T9I+trKkj/6jWConOgUhjhhme040XZXLofCJ02 rOr5osRGZomIBSD5OFhFmykG19q9EeqRMXH2Jh1yAdRxCZLpErsEuXbrif/yJrGuhF/O kYPy6yzf8A1qC8UaM4Ijf6JNcWl0P9bPRxgzrIODQb1T0W9LAw58lJCiDTR6TX2MkdDh OHJERgzZ8srlDnKeNiYVDyWKD2rnDYHoyjRVnqyhrHS4r9Gfhbh7GlLoZ9tYPlhZg3Uq rjFD+JuTQEXnXApqt3zz8420gX9rUim5IzYSq/n26YFf1ILMriRTTA0CucduZ7RDn8i0 su6A== X-Gm-Message-State: AIkVDXLjIqobvtV0gkwvbx5REn0QgK1pOgZKsBcoH/v3pd1xp630V4Ujp/D9To1W75gKF5Ik8lVw3Q1ZcdWHKQ== X-Received: by 10.223.169.112 with SMTP id u103mr10699813wrc.166.1486414960316; Mon, 06 Feb 2017 13:02:40 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.82.162 with HTTP; Mon, 6 Feb 2017 13:02:39 -0800 (PST) In-Reply-To: References: <201702060527.v165R8bO083196@repo.freebsd.org> From: Adrian Chadd Date: Mon, 6 Feb 2017 13:02:39 -0800 X-Google-Sender-Auth: TRsWGxMz2UZ55Azcm50DGvK1MSg Message-ID: Subject: Re: svn commit: r313322 - in head/sys: conf dev/iwm modules/iwm To: Ed Schouten Cc: src-committers , "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.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 21:02:42 -0000 Fixed, thanks. -adrian On 5 February 2017 at 23:56, Ed Schouten wrote: > Hi Adrian, > > 2017-02-06 6:27 GMT+01:00 Adrian Chadd : >> Modified: head/sys/conf/files >> ============================================================================== >> --- head/sys/conf/files Mon Feb 6 05:27:05 2017 (r313321) >> +++ head/sys/conf/files Mon Feb 6 05:27:07 2017 (r313322) >> @@ -1882,6 +1882,7 @@ dev/iwm/if_iwm.c optional iwm >> dev/iwm/if_iwm_binding.c optional iwm >> dev/iwm/if_iwm_led.c optional iwm >> dev/iwm/if_iwm_mac_ctxt.c optional iwm >> +dev/netif/iwm/if_iwm_notif_wait.c optional iwm >> dev/iwm/if_iwm_pcie_trans.c optional iwm >> dev/iwm/if_iwm_phy_ctxt.c optional iwm >> dev/iwm/if_iwm_phy_db.c optional iwm > > What's with the 'netif' part in the source file's name? The actual > source file doesn't use it. > > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Feb 6 22:03:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBF9FCD3A19; Mon, 6 Feb 2017 22:03:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 854F0183C; Mon, 6 Feb 2017 22:03:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v16M396l098582; Mon, 6 Feb 2017 22:03:09 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v16M37hK098561; Mon, 6 Feb 2017 22:03:07 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702062203.v16M37hK098561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 6 Feb 2017 22:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313355 - in stable/11: lib/libstand sys/boot/common sys/boot/efi/libefi sys/boot/i386/libfirewire sys/boot/i386/libi386 sys/boot/mips/beri/loader sys/boot/ofw/libofw sys/boot/pc98/libp... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 22:03:11 -0000 Author: tsoome Date: Mon Feb 6 22:03:07 2017 New Revision: 313355 URL: https://svnweb.freebsd.org/changeset/base/313355 Log: MFC r309369,310850,310853: libstand: dosfs cstyle cleanup for return keyword. dosfs support in libstand is broken since r298230 PR: 214423 Submitted by: Mikhail Kupchik Reported by: Mikhail Kupchik Approved by: imp (mentor) Modified: stable/11/lib/libstand/cd9660.c stable/11/lib/libstand/dosfs.c stable/11/lib/libstand/ext2fs.c stable/11/lib/libstand/nandfs.c stable/11/lib/libstand/read.c stable/11/lib/libstand/stand.h stable/11/lib/libstand/ufs.c stable/11/lib/libstand/write.c stable/11/sys/boot/common/bcache.c stable/11/sys/boot/common/bootstrap.h stable/11/sys/boot/common/disk.c stable/11/sys/boot/common/md.c stable/11/sys/boot/efi/libefi/efipart.c stable/11/sys/boot/i386/libfirewire/firewire.c stable/11/sys/boot/i386/libi386/bioscd.c stable/11/sys/boot/i386/libi386/biosdisk.c stable/11/sys/boot/i386/libi386/pxe.c stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c stable/11/sys/boot/mips/beri/loader/beri_disk_sdcard.c stable/11/sys/boot/ofw/libofw/ofw_disk.c stable/11/sys/boot/pc98/libpc98/bioscd.c stable/11/sys/boot/pc98/libpc98/biosdisk.c stable/11/sys/boot/powerpc/kboot/hostdisk.c stable/11/sys/boot/powerpc/ps3/ps3cdrom.c stable/11/sys/boot/powerpc/ps3/ps3disk.c stable/11/sys/boot/uboot/lib/disk.c stable/11/sys/boot/usb/storage/umass_loader.c stable/11/sys/boot/userboot/userboot/host.c stable/11/sys/boot/userboot/userboot/userboot_disk.c stable/11/sys/boot/zfs/zfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libstand/cd9660.c ============================================================================== --- stable/11/lib/libstand/cd9660.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/cd9660.c Mon Feb 6 22:03:07 2017 (r313355) @@ -143,7 +143,7 @@ susp_lookup_record(struct open_file *f, if (bcmp(sh->type, SUSP_CONTINUATION, 2) == 0) { shc = (ISO_RRIP_CONT *)sh; error = f->f_dev->dv_strategy(f->f_devdata, F_READ, - cdb2devb(isonum_733(shc->location)), 0, + cdb2devb(isonum_733(shc->location)), ISO_DEFAULT_BLOCK_SIZE, susp_buffer, &read); /* Bail if it fails. */ @@ -288,7 +288,7 @@ cd9660_open(const char *path, struct ope for (bno = 16;; bno++) { twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), - 0, ISO_DEFAULT_BLOCK_SIZE, buf, &read); + ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) goto out; if (read != ISO_DEFAULT_BLOCK_SIZE) { @@ -322,7 +322,7 @@ cd9660_open(const char *path, struct ope twiddle(1); rc = f->f_dev->dv_strategy (f->f_devdata, F_READ, - cdb2devb(bno + boff), 0, + cdb2devb(bno + boff), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -381,7 +381,7 @@ cd9660_open(const char *path, struct ope bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), - 0, ISO_DEFAULT_BLOCK_SIZE, buf, &read); + ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) goto out; if (read != ISO_DEFAULT_BLOCK_SIZE) { @@ -438,7 +438,7 @@ buf_read_file(struct open_file *f, char twiddle(16); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, - cdb2devb(blkno), 0, ISO_DEFAULT_BLOCK_SIZE, + cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read); if (rc) return (rc); Modified: stable/11/lib/libstand/dosfs.c ============================================================================== --- stable/11/lib/libstand/dosfs.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/dosfs.c Mon Feb 6 22:03:07 2017 (r313355) @@ -154,7 +154,7 @@ static int fatcnt(DOS_FS *, u_int); static int fatget(DOS_FS *, u_int *); static int fatend(u_int, u_int); static int ioread(DOS_FS *, u_int, void *, u_int); -static int ioget(struct open_file *, daddr_t, size_t, void *, u_int); +static int ioget(struct open_file *, daddr_t, void *, u_int); static void dos_read_fat(DOS_FS *fs, struct open_file *fd) @@ -172,7 +172,7 @@ dos_read_fat(DOS_FS *fs, struct open_fil fat.buf = malloc(secbyt(fs->spf)); if (fat.buf != NULL) { - if (ioget(fd, fs->lsnfat, 0, fat.buf, secbyt(fs->spf)) == 0) { + if (ioget(fd, fs->lsnfat, fat.buf, secbyt(fs->spf)) == 0) { fat.size = fs->spf; fat.unit = dd->d_unit; return; @@ -199,12 +199,12 @@ dos_mount(DOS_FS *fs, struct open_file * fs->fd = fd; if ((err = !(buf = malloc(secbyt(1))) ? errno : 0) || - (err = ioget(fs->fd, 0, 0, buf, secbyt(1))) || + (err = ioget(fs->fd, 0, buf, secbyt(1))) || (err = parsebs(fs, (DOS_BS *)buf))) { if (buf != NULL) free(buf); (void)dosunmount(fs); - return(err); + return (err); } free(buf); @@ -219,7 +219,7 @@ dos_mount(DOS_FS *fs, struct open_file * fs->root.dex.h_clus[0] = (fs->rdcl >> 16) & 0xff; fs->root.dex.h_clus[1] = (fs->rdcl >> 24) & 0xff; } - return 0; + return (0); } /* @@ -231,10 +231,10 @@ dos_unmount(DOS_FS *fs) int err; if (fs->links) - return(EBUSY); + return (EBUSY); if ((err = dosunmount(fs))) - return(err); - return 0; + return (err); + return (0); } /* @@ -244,7 +244,7 @@ static int dosunmount(DOS_FS *fs) { free(fs); - return(0); + return (0); } /* @@ -285,7 +285,7 @@ dos_open(const char *path, struct open_f fd->f_fsdata = (void *)f; out: - return(err); + return (err); } /* @@ -307,7 +307,7 @@ dos_read(struct open_file *fd, void *buf twiddle(4); nb = (u_int)nbyte; if ((size = fsize(f->fs, &f->de)) == -1) - return EINVAL; + return (EINVAL); if (nb > (n = size - f->offset)) nb = n; off = f->offset; @@ -344,7 +344,7 @@ dos_read(struct open_file *fd, void *buf out: if (resid) *resid = nbyte - nb + cnt; - return(err); + return (err); } /* @@ -370,16 +370,16 @@ dos_seek(struct open_file *fd, off_t off break; default: errno = EINVAL; - return(-1); + return (-1); } off += offset; if (off < 0 || off > size) { errno = EINVAL; - return(-1); + return (-1); } f->offset = (u_int)off; f->c = 0; - return(off); + return (off); } /* @@ -394,7 +394,7 @@ dos_close(struct open_file *fd) f->fs->links--; free(f); dos_unmount(fs); - return 0; + return (0); } /* @@ -411,7 +411,7 @@ dos_stat(struct open_file *fd, struct st sb->st_uid = 0; sb->st_gid = 0; if ((sb->st_size = fsize(f->fs, &f->de)) == -1) - return EINVAL; + return (EINVAL); return (0); } @@ -501,7 +501,7 @@ dos_readdir(struct open_file *fd, struct d->d_reclen = sizeof(*d); d->d_type = (dd.de.attr & FA_DIR) ? DT_DIR : DT_REG; memcpy(d->d_name, fn, sizeof(d->d_name)); - return(0); + return (0); } /* @@ -516,41 +516,41 @@ parsebs(DOS_FS *fs, DOS_BS *bs) bs->jmp[0] != 0xe9 && (bs->jmp[0] != 0xeb || bs->jmp[2] != 0x90)) || bs->bpb.media < 0xf0) - return EINVAL; + return (EINVAL); if (cv2(bs->bpb.secsiz) != SECSIZ) - return EINVAL; + return (EINVAL); if (!(fs->spc = bs->bpb.spc) || fs->spc & (fs->spc - 1)) - return EINVAL; + return (EINVAL); fs->bsize = secbyt(fs->spc); fs->bshift = ffs(fs->bsize) - 1; if ((fs->spf = cv2(bs->bpb.spf))) { if (bs->bpb.fats != 2) - return EINVAL; + return (EINVAL); if (!(fs->dirents = cv2(bs->bpb.dirents))) - return EINVAL; + return (EINVAL); } else { if (!(fs->spf = cv4(bs->bpb.lspf))) - return EINVAL; + return (EINVAL); if (!bs->bpb.fats || bs->bpb.fats > 16) - return EINVAL; + return (EINVAL); if ((fs->rdcl = cv4(bs->bpb.rdcl)) < LOCLUS) - return EINVAL; + return (EINVAL); } if (!(fs->lsnfat = cv2(bs->bpb.ressec))) - return EINVAL; + return (EINVAL); fs->lsndir = fs->lsnfat + fs->spf * bs->bpb.fats; fs->lsndta = fs->lsndir + entsec(fs->dirents); if (!(sc = cv2(bs->bpb.secs)) && !(sc = cv4(bs->bpb.lsecs))) - return EINVAL; + return (EINVAL); if (fs->lsndta > sc) - return EINVAL; + return (EINVAL); if ((fs->xclus = secblk(fs, sc - fs->lsndta) + 1) < LOCLUS) - return EINVAL; + return (EINVAL); fs->fatsz = fs->dirents ? fs->xclus < 0xff6 ? 12 : 16 : 32; sc = (secbyt(fs->spf) << 1) / (fs->fatsz >> 2) - 1; if (fs->xclus > sc) fs->xclus = sc; - return 0; + return (0); } /* @@ -575,17 +575,17 @@ namede(DOS_FS *fs, const char *path, DOS if (!(s = strchr(path, '/'))) s = strchr(path, 0); if ((n = s - path) > 255) - return ENAMETOOLONG; + return (ENAMETOOLONG); memcpy(name, path, n); name[n] = 0; path = s; if (!(de->attr & FA_DIR)) - return ENOTDIR; + return (ENOTDIR); if ((err = lookup(fs, stclus(fs->fatsz, de), name, &de))) - return err; + return (err); } *dep = de; - return 0; + return (0); } /* @@ -604,7 +604,7 @@ lookup(DOS_FS *fs, u_int clus, const cha for (ent = 0; ent < 2; ent++) if (!strcasecmp(name, dotstr[ent])) { *dep = dot + ent; - return 0; + return (0); } if (!clus && fs->fatsz == 32) clus = fs->rdcl; @@ -617,13 +617,13 @@ lookup(DOS_FS *fs, u_int clus, const cha else if (okclus(fs, clus)) lsec = blklsn(fs, clus); else - return EINVAL; + return (EINVAL); for (sec = 0; sec < nsec; sec++) { - if ((err = ioget(fs->fd, lsec + sec, 0, dir, secbyt(1)))) - return err; + if ((err = ioget(fs->fd, lsec + sec, dir, secbyt(1)))) + return (err); for (ent = 0; ent < DEPSEC; ent++) { if (!*dir[ent].de.name) - return ENOENT; + return (ENOENT); if (*dir[ent].de.name != 0xe5) { if ((dir[ent].de.attr & FA_MASK) == FA_XDE) { x = dir[ent].xde.seq; @@ -651,7 +651,7 @@ lookup(DOS_FS *fs, u_int clus, const cha } if (ok) { *dep = &dir[ent].de; - return 0; + return (0); } } } @@ -661,11 +661,11 @@ lookup(DOS_FS *fs, u_int clus, const cha if (!clus) break; if ((err = fatget(fs, &clus))) - return err; + return (err); if (fatend(fs->fatsz, clus)) break; } - return ENOENT; + return (ENOENT); } /* @@ -739,11 +739,11 @@ fsize(DOS_FS *fs, DOS_DE *de) size = fs->dirents * sizeof(DOS_DE); else { if ((n = fatcnt(fs, c)) == -1) - return n; + return (n); size = blkbyt(fs, n); } } - return size; + return (size); } /* @@ -756,8 +756,8 @@ fatcnt(DOS_FS *fs, u_int c) for (n = 0; okclus(fs, c); n++) if (fatget(fs, &c)) - return -1; - return fatend(fs->fatsz, c) ? n : -1; + return (-1); + return (fatend(fs->fatsz, c) ? n : -1); } /* @@ -768,8 +768,7 @@ static int fatget(DOS_FS *fs, u_int *c) { u_char buf[4]; - u_char *s; - u_int x, offset, off, n, nbyte, lsec; + u_int x, offset, n, nbyte; struct devdesc *dd = fs->fd->f_devdata; int err = 0; @@ -783,25 +782,9 @@ fatget(DOS_FS *fs, u_int *c) offset = fatoff(fs->fatsz, *c); nbyte = fs->fatsz != 32 ? 2 : 4; - s = buf; - if ((off = offset & (SECSIZ - 1))) { - offset -= off; - lsec = bytsec(offset); - offset += SECSIZ; - if ((n = SECSIZ - off) > nbyte) - n = nbyte; - memcpy(s, fat.buf + secbyt(lsec) + off, n); - s += n; - nbyte -= n; - } - n = nbyte & (SECSIZ - 1); - if (nbyte -= n) { - memcpy(s, fat.buf + secbyt(bytsec(offset)), nbyte); - offset += nbyte; - s += nbyte; - } - if (n) - memcpy(s, fat.buf + secbyt(bytsec(offset)), n); + if (offset + nbyte > secbyt(fat.size)) + return (EINVAL); + memcpy(buf, fat.buf + offset, nbyte); } x = fs->fatsz != 32 ? cv2(buf) : cv4(buf); @@ -815,7 +798,7 @@ fatget(DOS_FS *fs, u_int *c) static int fatend(u_int sz, u_int c) { - return c > (sz == 12 ? 0xff7U : sz == 16 ? 0xfff7U : 0xffffff7); + return (c > (sz == 12 ? 0xff7U : sz == 16 ? 0xfff7U : 0xffffff7)); } /* @@ -827,38 +810,41 @@ ioread(DOS_FS *fs, u_int offset, void *b char *s; u_int off, n; int err; + u_char local_buf[SECSIZ]; s = buf; if ((off = offset & (SECSIZ - 1))) { offset -= off; if ((n = SECSIZ - off) > nbyte) n = nbyte; - if ((err = ioget(fs->fd, bytsec(offset), off, s, n))) - return err; + if ((err = ioget(fs->fd, bytsec(offset), local_buf, sizeof(local_buf)))) + return (err); + memcpy(s, local_buf + off, n); offset += SECSIZ; s += n; nbyte -= n; } n = nbyte & (SECSIZ - 1); if (nbyte -= n) { - if ((err = ioget(fs->fd, bytsec(offset), 0, s, nbyte))) - return err; + if ((err = ioget(fs->fd, bytsec(offset), s, nbyte))) + return (err); offset += nbyte; s += nbyte; } if (n) { - if ((err = ioget(fs->fd, bytsec(offset), 0, s, n))) - return err; + if ((err = ioget(fs->fd, bytsec(offset), local_buf, sizeof(local_buf)))) + return (err); + memcpy(s, local_buf, n); } - return 0; + return (0); } /* * Sector-based I/O primitive */ static int -ioget(struct open_file *fd, daddr_t lsec, size_t offset, void *buf, u_int size) +ioget(struct open_file *fd, daddr_t lsec, void *buf, u_int size) { - return ((fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, offset, + return ((fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, size, buf, NULL)); } Modified: stable/11/lib/libstand/ext2fs.c ============================================================================== --- stable/11/lib/libstand/ext2fs.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/ext2fs.c Mon Feb 6 22:03:07 2017 (r313355) @@ -355,7 +355,7 @@ ext2fs_open(const char *upath, struct op fp->f_fs = fs; twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - EXT2_SBLOCK, 0, EXT2_SBSIZE, (char *)fs, &buf_size); + EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, &buf_size); if (error) goto out; @@ -397,7 +397,7 @@ ext2fs_open(const char *upath, struct op fp->f_bg = malloc(len); twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, 0, len, + EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, (char *)fp->f_bg, &buf_size); if (error) goto out; @@ -509,7 +509,7 @@ ext2fs_open(const char *upath, struct op twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, - F_READ, fsb_to_db(fs, disk_block), 0, + F_READ, fsb_to_db(fs, disk_block), fs->fs_bsize, buf, &buf_size); if (error) goto out; @@ -570,7 +570,7 @@ read_inode(ino_t inumber, struct open_fi buf = malloc(fs->fs_bsize); twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - ino_to_db(fs, fp->f_bg, inumber), 0, fs->fs_bsize, buf, &rsize); + ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize); if (error) goto out; if (rsize != fs->fs_bsize) { @@ -667,7 +667,7 @@ block_map(struct open_file *f, daddr_t f malloc(fs->fs_bsize); twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsb_to_db(fp->f_fs, ind_block_num), 0, fs->fs_bsize, + fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize, fp->f_blk[level], &fp->f_blksize[level]); if (error) return (error); @@ -725,7 +725,7 @@ buf_read_file(struct open_file *f, char } else { twiddle(4); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsb_to_db(fs, disk_block), 0, block_size, + fsb_to_db(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); if (error) goto done; Modified: stable/11/lib/libstand/nandfs.c ============================================================================== --- stable/11/lib/libstand/nandfs.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/nandfs.c Mon Feb 6 22:03:07 2017 (r313355) @@ -1024,7 +1024,7 @@ ioread(struct open_file *f, off_t pos, v buffer = malloc(nsec * bsize); - err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, pos, 0, + err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, pos, nsec * bsize, buffer, NULL); memcpy(buf, (void *)((uintptr_t)buffer + off), length); @@ -1045,7 +1045,7 @@ nandfs_probe_sectorsize(struct open_file for (i = 512; i < (16 * 1024); i <<= 1) { NANDFS_DEBUG("%d ", i); - err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, 0, 0, i, + err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, 0, i, buffer, NULL); if (err == 0) { Modified: stable/11/lib/libstand/read.c ============================================================================== --- stable/11/lib/libstand/read.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/read.c Mon Feb 6 22:03:07 2017 (r313355) @@ -79,7 +79,7 @@ read(int fd, void *dest, size_t bcount) if (f->f_flags & F_RAW) { twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - btodb(f->f_offset), 0, bcount, dest, &resid); + btodb(f->f_offset), bcount, dest, &resid); if (errno) return (-1); f->f_offset += resid; Modified: stable/11/lib/libstand/stand.h ============================================================================== --- stable/11/lib/libstand/stand.h Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/stand.h Mon Feb 6 22:03:07 2017 (r313355) @@ -139,7 +139,7 @@ struct devsw { int dv_type; /* opaque type constant, arch-dependant */ int (*dv_init)(void); /* early probe call */ int (*dv_strategy)(void *devdata, int rw, daddr_t blk, - size_t offset, size_t size, char *buf, size_t *rsize); + size_t size, char *buf, size_t *rsize); int (*dv_open)(struct open_file *f, ...); int (*dv_close)(struct open_file *f); int (*dv_ioctl)(struct open_file *f, u_long cmd, void *data); Modified: stable/11/lib/libstand/ufs.c ============================================================================== --- stable/11/lib/libstand/ufs.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/ufs.c Mon Feb 6 22:03:07 2017 (r313355) @@ -157,7 +157,7 @@ read_inode(inumber, f) buf = malloc(fs->fs_bsize); twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsbtodb(fs, ino_to_fsba(fs, inumber)), 0, fs->fs_bsize, + fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize); if (rc) goto out; @@ -267,7 +267,7 @@ block_map(f, file_block, disk_block_p) malloc(fs->fs_bsize); twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsbtodb(fp->f_fs, ind_block_num), 0, + fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize, fp->f_blk[level], &fp->f_blksize[level]); @@ -348,7 +348,7 @@ buf_write_file(f, buf_p, size_p) twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsbtodb(fs, disk_block), 0, + fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); if (rc) return (rc); @@ -367,7 +367,7 @@ buf_write_file(f, buf_p, size_p) twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, - fsbtodb(fs, disk_block), 0, + fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); return (rc); } @@ -408,7 +408,7 @@ buf_read_file(f, buf_p, size_p) } else { twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - fsbtodb(fs, disk_block), 0, + fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); if (rc) return (rc); @@ -521,7 +521,7 @@ ufs_open(upath, f) */ for (i = 0; sblock_try[i] != -1; i++) { rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, - sblock_try[i] / DEV_BSIZE, 0, SBLOCKSIZE, + sblock_try[i] / DEV_BSIZE, SBLOCKSIZE, (char *)fs, &buf_size); if (rc) goto out; @@ -651,7 +651,7 @@ ufs_open(upath, f) twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, - F_READ, fsbtodb(fs, disk_block), 0, + F_READ, fsbtodb(fs, disk_block), fs->fs_bsize, buf, &buf_size); if (rc) goto out; Modified: stable/11/lib/libstand/write.c ============================================================================== --- stable/11/lib/libstand/write.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/lib/libstand/write.c Mon Feb 6 22:03:07 2017 (r313355) @@ -82,7 +82,7 @@ write(fd, dest, bcount) if (f->f_flags & F_RAW) { twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, - btodb(f->f_offset), 0, bcount, dest, &resid); + btodb(f->f_offset), bcount, dest, &resid); if (errno) return (-1); f->f_offset += resid; Modified: stable/11/sys/boot/common/bcache.c ============================================================================== --- stable/11/sys/boot/common/bcache.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/common/bcache.c Mon Feb 6 22:03:07 2017 (r313355) @@ -182,8 +182,8 @@ bcache_free(void *cache) * cache with the new values. */ static int -write_strategy(void *devdata, int rw, daddr_t blk, size_t offset, - size_t size, char *buf, size_t *rsize) +write_strategy(void *devdata, int rw, daddr_t blk, size_t size, + char *buf, size_t *rsize) { struct bcache_devdata *dd = (struct bcache_devdata *)devdata; struct bcache *bc = dd->dv_cache; @@ -197,7 +197,7 @@ write_strategy(void *devdata, int rw, da } /* Write the blocks */ - return (dd->dv_strategy(dd->dv_devdata, rw, blk, offset, size, buf, rsize)); + return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); } /* @@ -206,8 +206,8 @@ write_strategy(void *devdata, int rw, da * device I/O and then use the I/O results to populate the cache. */ static int -read_strategy(void *devdata, int rw, daddr_t blk, size_t offset, - size_t size, char *buf, size_t *rsize) +read_strategy(void *devdata, int rw, daddr_t blk, size_t size, + char *buf, size_t *rsize) { struct bcache_devdata *dd = (struct bcache_devdata *)devdata; struct bcache *bc = dd->dv_cache; @@ -225,7 +225,7 @@ read_strategy(void *devdata, int rw, dad *rsize = 0; nblk = size / bcache_blksize; - if ((nblk == 0 && size != 0) || offset != 0) + if (nblk == 0 && size != 0) nblk++; result = 0; complete = 1; @@ -246,8 +246,7 @@ read_strategy(void *devdata, int rw, dad if (complete) { /* whole set was in cache, return it */ if (bc->ra < BCACHE_READAHEAD) bc->ra <<= 1; /* increase read ahead */ - bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, - buf, size); + bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)), buf, size); goto done; } @@ -282,7 +281,7 @@ read_strategy(void *devdata, int rw, dad * in either case we should return the data in bcache and only * return error if there is no data. */ - result = dd->dv_strategy(dd->dv_devdata, rw, p_blk, 0, + result = dd->dv_strategy(dd->dv_devdata, rw, p_blk, p_size * bcache_blksize, p_buf, &r_size); r_size /= bcache_blksize; @@ -305,8 +304,7 @@ read_strategy(void *devdata, int rw, dad size = i * bcache_blksize; if (size != 0) { - bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, - buf, size); + bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)), buf, size); result = 0; } @@ -321,8 +319,8 @@ read_strategy(void *devdata, int rw, dad * directly to the disk. XXX tune this. */ int -bcache_strategy(void *devdata, int rw, daddr_t blk, size_t offset, - size_t size, char *buf, size_t *rsize) +bcache_strategy(void *devdata, int rw, daddr_t blk, size_t size, + char *buf, size_t *rsize) { struct bcache_devdata *dd = (struct bcache_devdata *)devdata; struct bcache *bc = dd->dv_cache; @@ -337,23 +335,16 @@ bcache_strategy(void *devdata, int rw, d /* bypass large requests, or when the cache is inactive */ if (bc == NULL || - (offset == 0 && ((size * 2 / bcache_blksize) > bcache_nblks))) { + ((size * 2 / bcache_blksize) > bcache_nblks)) { DEBUG("bypass %d from %d", size / bcache_blksize, blk); bcache_bypasses++; - return (dd->dv_strategy(dd->dv_devdata, rw, blk, offset, size, buf, - rsize)); - } - - /* normalize offset */ - while (offset >= bcache_blksize) { - blk++; - offset -= bcache_blksize; + return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); } switch (rw) { case F_READ: nblk = size / bcache_blksize; - if (offset || (size != 0 && nblk == 0)) + if (size != 0 && nblk == 0) nblk++; /* read at least one block */ ret = 0; @@ -364,14 +355,10 @@ bcache_strategy(void *devdata, int rw, d if (size <= bcache_blksize) csize = size; - else { + else csize = cblk * bcache_blksize; - if (offset) - csize -= (bcache_blksize - offset); - } - ret = read_strategy(devdata, rw, blk, offset, - csize, buf+total, &isize); + ret = read_strategy(devdata, rw, blk, csize, buf+total, &isize); /* * we may have error from read ahead, if we have read some data @@ -382,8 +369,7 @@ bcache_strategy(void *devdata, int rw, d ret = 0; break; } - blk += (offset+isize) / bcache_blksize; - offset = 0; + blk += isize / bcache_blksize; total += isize; size -= isize; nblk = size / bcache_blksize; @@ -394,7 +380,7 @@ bcache_strategy(void *devdata, int rw, d return (ret); case F_WRITE: - return write_strategy(devdata, rw, blk, offset, size, buf, rsize); + return write_strategy(devdata, rw, blk, size, buf, rsize); } return -1; } Modified: stable/11/sys/boot/common/bootstrap.h ============================================================================== --- stable/11/sys/boot/common/bootstrap.h Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/common/bootstrap.h Mon Feb 6 22:03:07 2017 (r313355) @@ -76,8 +76,8 @@ void bcache_init(u_int nblks, size_t bsi void bcache_add_dev(int); void *bcache_allocate(void); void bcache_free(void *); -int bcache_strategy(void *devdata, int rw, daddr_t blk, size_t offset, - size_t size, char *buf, size_t *rsize); +int bcache_strategy(void *devdata, int rw, daddr_t blk, size_t size, + char *buf, size_t *rsize); /* * Disk block cache @@ -85,7 +85,7 @@ int bcache_strategy(void *devdata, int r struct bcache_devdata { int (*dv_strategy)(void *devdata, int rw, daddr_t blk, - size_t offset, size_t size, char *buf, size_t *rsize); + size_t size, char *buf, size_t *rsize); void *dv_devdata; void *dv_cache; }; Modified: stable/11/sys/boot/common/disk.c ============================================================================== --- stable/11/sys/boot/common/disk.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/common/disk.c Mon Feb 6 22:03:07 2017 (r313355) @@ -178,7 +178,7 @@ ptblread(void *d, void *buf, size_t bloc dev = (struct disk_devdesc *)d; od = (struct open_disk *)dev->d_opendata; - return (dev->d_dev->dv_strategy(dev, F_READ, offset, 0, + return (dev->d_dev->dv_strategy(dev, F_READ, offset, blocks * od->sectorsize, (char *)buf, NULL)); } @@ -244,7 +244,7 @@ disk_read(struct disk_devdesc *dev, void int ret; od = (struct open_disk *)dev->d_opendata; - ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, 0, + ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, blocks * od->sectorsize, buf, NULL); return (ret); @@ -257,7 +257,7 @@ disk_write(struct disk_devdesc *dev, voi int ret; od = (struct open_disk *)dev->d_opendata; - ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, 0, + ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, blocks * od->sectorsize, buf, NULL); return (ret); Modified: stable/11/sys/boot/common/md.c ============================================================================== --- stable/11/sys/boot/common/md.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/common/md.c Mon Feb 6 22:03:07 2017 (r313355) @@ -60,7 +60,7 @@ static struct { /* devsw I/F */ static int md_init(void); -static int md_strategy(void *, int, daddr_t, size_t, size_t, char *, size_t *); +static int md_strategy(void *, int, daddr_t, size_t, char *, size_t *); static int md_open(struct open_file *, ...); static int md_close(struct open_file *); static void md_print(int); @@ -84,7 +84,7 @@ md_init(void) } static int -md_strategy(void *devdata, int rw, daddr_t blk, size_t offset, size_t size, +md_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, size_t *rsize) { struct devdesc *dev = (struct devdesc *)devdata; Modified: stable/11/sys/boot/efi/libefi/efipart.c ============================================================================== --- stable/11/sys/boot/efi/libefi/efipart.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/efi/libefi/efipart.c Mon Feb 6 22:03:07 2017 (r313355) @@ -41,10 +41,8 @@ __FBSDID("$FreeBSD$"); static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; static int efipart_init(void); -static int efipart_strategy(void *, int, daddr_t, size_t, size_t, char *, - size_t *); -static int efipart_realstrategy(void *, int, daddr_t, size_t, size_t, char *, - size_t *); +static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); +static int efipart_realstrategy(void *, int, daddr_t, size_t, char *, size_t *); static int efipart_open(struct open_file *, ...); static int efipart_close(struct open_file *); static void efipart_print(int); @@ -284,8 +282,8 @@ efipart_readwrite(EFI_BLOCK_IO *blkio, i } static int -efipart_strategy(void *devdata, int rw, daddr_t blk, size_t offset, - size_t size, char *buf, size_t *rsize) +efipart_strategy(void *devdata, int rw, daddr_t blk, size_t size, + char *buf, size_t *rsize) { struct bcache_devdata bcd; struct devdesc *dev; @@ -294,13 +292,12 @@ efipart_strategy(void *devdata, int rw, bcd.dv_strategy = efipart_realstrategy; bcd.dv_devdata = devdata; bcd.dv_cache = PD(dev).pd_bcache; - return (bcache_strategy(&bcd, rw, blk, offset, size, - buf, rsize)); + return (bcache_strategy(&bcd, rw, blk, size, buf, rsize)); } static int -efipart_realstrategy(void *devdata, int rw, daddr_t blk, size_t offset, - size_t size, char *buf, size_t *rsize) +efipart_realstrategy(void *devdata, int rw, daddr_t blk, size_t size, + char *buf, size_t *rsize) { struct devdesc *dev = (struct devdesc *)devdata; EFI_BLOCK_IO *blkio; Modified: stable/11/sys/boot/i386/libfirewire/firewire.c ============================================================================== --- stable/11/sys/boot/i386/libfirewire/firewire.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/i386/libfirewire/firewire.c Mon Feb 6 22:03:07 2017 (r313355) @@ -66,7 +66,7 @@ struct crom_src_buf { static int fw_init(void); static int fw_strategy(void *devdata, int flag, daddr_t dblk, - size_t offset, size_t size, char *buf, size_t *rsize); + size_t size, char *buf, size_t *rsize); static int fw_open(struct open_file *f, ...); static int fw_close(struct open_file *f); static void fw_print(int verbose); @@ -201,7 +201,7 @@ fw_cleanup() } static int -fw_strategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, +fw_strategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { return (EIO); Modified: stable/11/sys/boot/i386/libi386/bioscd.c ============================================================================== --- stable/11/sys/boot/i386/libi386/bioscd.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/i386/libi386/bioscd.c Mon Feb 6 22:03:07 2017 (r313355) @@ -95,9 +95,9 @@ static int nbcinfo = 0; static int bc_read(int unit, daddr_t dblk, int blks, caddr_t dest); static int bc_init(void); static int bc_strategy(void *devdata, int flag, daddr_t dblk, - size_t offset, size_t size, char *buf, size_t *rsize); + size_t size, char *buf, size_t *rsize); static int bc_realstrategy(void *devdata, int flag, daddr_t dblk, - size_t offset, size_t size, char *buf, size_t *rsize); + size_t size, char *buf, size_t *rsize); static int bc_open(struct open_file *f, ...); static int bc_close(struct open_file *f); static void bc_print(int verbose); @@ -231,7 +231,7 @@ bc_close(struct open_file *f) } static int -bc_strategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, +bc_strategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { struct bcache_devdata bcd; @@ -242,11 +242,11 @@ bc_strategy(void *devdata, int rw, daddr bcd.dv_devdata = devdata; bcd.dv_cache = BC(dev).bc_bcache; - return (bcache_strategy(&bcd, rw, dblk, offset, size, buf, rsize)); + return (bcache_strategy(&bcd, rw, dblk, size, buf, rsize)); } static int -bc_realstrategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, +bc_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { struct i386_devdesc *dev; Modified: stable/11/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- stable/11/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 22:03:07 2017 (r313355) @@ -128,10 +128,10 @@ static int bd_write(struct disk_devdesc static int bd_int13probe(struct bdinfo *bd); static int bd_init(void); -static int bd_strategy(void *devdata, int flag, daddr_t dblk, size_t offset, - size_t size, char *buf, size_t *rsize); -static int bd_realstrategy(void *devdata, int flag, daddr_t dblk, size_t offset, - size_t size, char *buf, size_t *rsize); +static int bd_strategy(void *devdata, int flag, daddr_t dblk, size_t size, + char *buf, size_t *rsize); +static int bd_realstrategy(void *devdata, int flag, daddr_t dblk, size_t size, + char *buf, size_t *rsize); static int bd_open(struct open_file *f, ...); static int bd_close(struct open_file *f); static int bd_ioctl(struct open_file *f, u_long cmd, void *data); @@ -478,7 +478,7 @@ bd_ioctl(struct open_file *f, u_long cmd } static int -bd_strategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, +bd_strategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { struct bcache_devdata bcd; @@ -488,12 +488,12 @@ bd_strategy(void *devdata, int rw, daddr bcd.dv_strategy = bd_realstrategy; bcd.dv_devdata = devdata; bcd.dv_cache = BD(dev).bd_bcache; - return (bcache_strategy(&bcd, rw, dblk + dev->d_offset, offset, + return (bcache_strategy(&bcd, rw, dblk + dev->d_offset, size, buf, rsize)); } static int -bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, +bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; Modified: stable/11/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/11/sys/boot/i386/libi386/pxe.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/i386/libi386/pxe.c Mon Feb 6 22:03:07 2017 (r313355) @@ -72,7 +72,7 @@ static void bangpxe_call(int func); static int pxe_init(void); static int pxe_strategy(void *devdata, int flag, daddr_t dblk, - size_t offset, size_t size, char *buf, size_t *rsize); + size_t size, char *buf, size_t *rsize); static int pxe_open(struct open_file *f, ...); static int pxe_close(struct open_file *f); static void pxe_print(int verbose); @@ -247,8 +247,8 @@ pxe_init(void) static int -pxe_strategy(void *devdata, int flag, daddr_t dblk, size_t offset, size_t size, - char *buf, size_t *rsize) +pxe_strategy(void *devdata, int flag, daddr_t dblk, size_t size, + char *buf, size_t *rsize) { return (EIO); } Modified: stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c ============================================================================== --- stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c Mon Feb 6 21:02:26 2017 (r313354) +++ stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c Mon Feb 6 22:03:07 2017 (r313355) @@ -45,7 +45,7 @@ static int beri_cfi_disk_init(void); static int beri_cfi_disk_open(struct open_file *, ...); static int beri_cfi_disk_close(struct open_file *); static void beri_cfi_disk_cleanup(void); -static int beri_cfi_disk_strategy(void *, int, daddr_t, size_t, size_t, +static int beri_cfi_disk_strategy(void *, int, daddr_t, size_t, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 6 23:03:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6011CD3CBB; Mon, 6 Feb 2017 23:03:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3CA51953; Mon, 6 Feb 2017 23:03:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E914110A791; Mon, 6 Feb 2017 18:03:26 -0500 (EST) From: John Baldwin To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Date: Mon, 06 Feb 2017 15:03:11 -0800 Message-ID: <2958370.34Dmljdf7f@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702062057.v16KvCtI069664@repo.freebsd.org> References: <201702062057.v16KvCtI069664@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 06 Feb 2017 18:03:27 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 06 Feb 2017 23:03:28 -0000 On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Feb 6 20:57:12 2017 > New Revision: 313352 > URL: https://svnweb.freebsd.org/changeset/base/313352 > > Log: > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > instead of their sys_*() counterparts. > > Reviewed by: ed, dchagin, kib > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D9378 I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, but just kern_ would be more consistent. That is what we have done with every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, etc., but just kern_bind() and kern_listen()). -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 7 00:09:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA32CD2080; Tue, 7 Feb 2017 00:09:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B0831835; Tue, 7 Feb 2017 00:09:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1709npN055114; Tue, 7 Feb 2017 00:09:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1709nOj055112; Tue, 7 Feb 2017 00:09:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070009.v1709nOj055112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 00:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313356 - in head: sys/netpfil/ipfw usr.sbin/syslogd 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 00:09:50 -0000 Author: ngie Date: Tue Feb 7 00:09:48 2017 New Revision: 313356 URL: https://svnweb.freebsd.org/changeset/base/313356 Log: Fix typos in comments (returing -> returning) MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/netpfil/ipfw/dn_heap.h head/usr.sbin/syslogd/syslogd.c Modified: head/sys/netpfil/ipfw/dn_heap.h ============================================================================== --- head/sys/netpfil/ipfw/dn_heap.h Mon Feb 6 22:03:07 2017 (r313355) +++ head/sys/netpfil/ipfw/dn_heap.h Tue Feb 7 00:09:48 2017 (r313356) @@ -85,7 +85,7 @@ enum { * HEAP_TOP() returns a pointer to the top element of the heap, * but makes no checks on its existence (XXX should we change ?) * - * heap_extract() removes the entry at the top, returing the pointer. + * heap_extract() removes the entry at the top, returning the pointer. * (the key should have been read before). * * heap_scan() invokes a callback on each entry of the heap. Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Mon Feb 6 22:03:07 2017 (r313355) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:09:48 2017 (r313356) @@ -2348,7 +2348,7 @@ markit(void) /* * fork off and become a daemon, but wait for the child to come online - * before returing to the parent, or we get disk thrashing at boot etc. + * before returning to the parent, or we get disk thrashing at boot etc. * Set a timer so we don't hang forever if it wedges. */ static int From owner-svn-src-all@freebsd.org Tue Feb 7 00:42:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B430CD2A44; Tue, 7 Feb 2017 00:42:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B0B8B16; Tue, 7 Feb 2017 00:42:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v170gtFx070724; Tue, 7 Feb 2017 00:42:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v170gtF6070723; Tue, 7 Feb 2017 00:42:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070042.v170gtF6070723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 00:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313357 - head/usr.sbin/syslogd 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 00:42:56 -0000 Author: ngie Date: Tue Feb 7 00:42:55 2017 New Revision: 313357 URL: https://svnweb.freebsd.org/changeset/base/313357 Log: Use a flexible array for TypeNames instead of hardcoding the array length MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:09:48 2017 (r313356) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:42:55 2017 (r313357) @@ -287,7 +287,7 @@ static int repeatinterval[] = { 30, 120, #define F_WALL 6 /* everyone logged on */ #define F_PIPE 7 /* pipe to program */ -static const char *TypeNames[8] = { +static const char *TypeNames[] = { "UNUSED", "FILE", "TTY", "CONSOLE", "FORW", "USERS", "WALL", "PIPE" }; From owner-svn-src-all@freebsd.org Tue Feb 7 00:47:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BCE8CD2E66; Tue, 7 Feb 2017 00:47:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2721DE87; Tue, 7 Feb 2017 00:47:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v170lXWA070965; Tue, 7 Feb 2017 00:47:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v170lXoX070964; Tue, 7 Feb 2017 00:47:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070047.v170lXoX070964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 00:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313358 - head/usr.sbin/syslogd 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 00:47:34 -0000 Author: ngie Date: Tue Feb 7 00:47:33 2017 New Revision: 313358 URL: https://svnweb.freebsd.org/changeset/base/313358 Log: Sort sys/ #includes and zap an unnecessary trailing space nearby MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:42:55 2017 (r313357) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 00:47:33 2017 (r313358) @@ -79,17 +79,17 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include -#include -#include -#include #include +#include +#include #include +#include +#include +#include +#include -#if defined(INET) || defined(INET6) +#if defined(INET) || defined(INET6) #include #include #endif From owner-svn-src-all@freebsd.org Tue Feb 7 00:54:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 907FDCD214C; Tue, 7 Feb 2017 00:54:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 63FD412E0; Tue, 7 Feb 2017 00:54:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... To: Dmitry Morozovsky References: <201702060849.v168nwmf064277@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: "Andrey V. Elsukov" Message-ID: <1e8b55ba-11d2-9563-be44-0e20f7f2f33d@FreeBSD.org> Date: Tue, 7 Feb 2017 03:53:05 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 00:54:22 -0000 On 06.02.2017 17:31, Dmitry Morozovsky wrote: >> Date: Mon Feb 6 08:49:57 2017 >> New Revision: 313330 >> URL: https://svnweb.freebsd.org/changeset/base/313330 >> >> Log: >> Merge projects/ipsec into head/. > > [snip] > > Great, thanks! > > Have you any plans to merge this into stable/11 to reduce diffs in network > stack code? It depends from the further users feedback. I wanted to do MFC after one or two months. But there are two things that are questionable. The date of stable/11 feature freeze is not known. And there is also some changes that can be considered as POLA violations. E.g. now SPIs are unique, and if user had manually configured SAs with the same SPI, the MFC will break this. -- WBR, Andrey V. Elsukov From owner-svn-src-all@freebsd.org Tue Feb 7 01:13:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F133ACD25EB for ; Tue, 7 Feb 2017 01:13:52 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43D131C89 for ; Tue, 7 Feb 2017 01:13:52 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x22d.google.com with SMTP id b65so142808189wmf.0 for ; Mon, 06 Feb 2017 17:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=kfJfkANs5/W/18Fu/6ZX5/18d5Sjgee9Xm0E8N3MCyA=; b=V6Al7KOMYq0zWywyf4XuqmU6ZU7wjfVcMuLaJEOxHMwqy9KTXO5k7AlzMan1mbQIXK yAeOrKG7dkxLRp8xlVeWzUDLWuHsWXNnwPRb/oh9QdtZP+8KZXUMuDTv0ZlodMlZ0rpJ HN+3aFThm7Ak164eqEaV1Aem1jLrrQ5+GlVrO2O/uaK/v6P18eimbNxHprffmJYWJ4GO /rnNrQV0VJyKDcyAC+7DqjdU5hBviSstwodHQjwUAvpamhsVEhi9azNQuo0MPc3EKVm0 3xi5LT9lMeLFHm9OdIxEw8pUfOdKL21QbfoA9Lfj7XH+aIH7pu9mjf5f1ZqK6QZ0B3k0 dFIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=kfJfkANs5/W/18Fu/6ZX5/18d5Sjgee9Xm0E8N3MCyA=; b=FnA2EdheyRnvyp1oxmXBrgfwOW1vss4qj9NLkfWaM1dQV8ZCbzaepsvhdzmlvI06mM dPtWweeClhgBnFplwH8aquNbIayv+EmvV2f+QGwCfUWBe3F8Esnmox6ri9YMrVUzV5Ki 9dRUZmKJ6bZnLlToKJj/d95mZrET4sjvWIIQdoTu3DCKTyqVYpzW852hKbcgkTv/cPcv 0yf0+3cK7wn7ysTj5OFf4dACdsRzNPcNxRxizXWz0fCzFovfjM8mQ9M3N50Q4pfMhBFg YC5QoDrJJPEQ5kKCnHuEE+u+VcFNPUpj0t8dbMNtM5rOyLCUwzmmROsBN9YsEceomUPY omlg== X-Gm-Message-State: AMke39mjCrXkX1XnaNuQ53ZgtNHx1MO/NnUvdoEyuLq8q4pvn8vnJy6LIwdBVJTeDDZJpBoC X-Received: by 10.28.178.16 with SMTP id b16mr11863522wmf.83.1486430030152; Mon, 06 Feb 2017 17:13:50 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id b15sm4524173wra.4.2017.02.06.17.13.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 17:13:49 -0800 (PST) Subject: Re: svn commit: r313355 - in stable/11: lib/libstand sys/boot/common sys/boot/efi/libefi sys/boot/i386/libfirewire sys/boot/i386/libi386 sys/boot/mips/beri/loader sys/boot/ofw/libofw sys/boot/pc98/libp... To: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201702062203.v16M37hK098561@repo.freebsd.org> From: Steven Hartland Message-ID: <7039cd35-17ea-e811-4eb4-cc51ca24e120@multiplay.co.uk> Date: Tue, 7 Feb 2017 01:13:50 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702062203.v16M37hK098561@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:13:53 -0000 IMO combining fixes from different areas (yes mainly libstand but dosfs and nandfs) and with style cleanups is not ideal as it makes it much harder to find and identify problems. I appreciate these have been in head for a while but its not unheard of to only identify issues once they are MFC'ed, so keeping the separation is better. You also missed the description from the 3rd commit e.g. loader: nandfs calls strategy with one extra argument. Finally keep the "r" prefix when mentioning the revisions being MFC'ed as that ensure they linked in svnweb properly e.g. MFC r309369, r310850, r310853: On 06/02/2017 22:03, Toomas Soome wrote: > Author: tsoome > Date: Mon Feb 6 22:03:07 2017 > New Revision: 313355 > URL: https://svnweb.freebsd.org/changeset/base/313355 > > Log: > MFC r309369,310850,310853: > > libstand: dosfs cstyle cleanup for return keyword. > dosfs support in libstand is broken since r298230 > > PR: 214423 > Submitted by: Mikhail Kupchik > Reported by: Mikhail Kupchik > Approved by: imp (mentor) > > Modified: > stable/11/lib/libstand/cd9660.c > stable/11/lib/libstand/dosfs.c > stable/11/lib/libstand/ext2fs.c > stable/11/lib/libstand/nandfs.c > stable/11/lib/libstand/read.c > stable/11/lib/libstand/stand.h > stable/11/lib/libstand/ufs.c > stable/11/lib/libstand/write.c > stable/11/sys/boot/common/bcache.c > stable/11/sys/boot/common/bootstrap.h > stable/11/sys/boot/common/disk.c > stable/11/sys/boot/common/md.c > stable/11/sys/boot/efi/libefi/efipart.c > stable/11/sys/boot/i386/libfirewire/firewire.c > stable/11/sys/boot/i386/libi386/bioscd.c > stable/11/sys/boot/i386/libi386/biosdisk.c > stable/11/sys/boot/i386/libi386/pxe.c > stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c > stable/11/sys/boot/mips/beri/loader/beri_disk_sdcard.c > stable/11/sys/boot/ofw/libofw/ofw_disk.c > stable/11/sys/boot/pc98/libpc98/bioscd.c > stable/11/sys/boot/pc98/libpc98/biosdisk.c > stable/11/sys/boot/powerpc/kboot/hostdisk.c > stable/11/sys/boot/powerpc/ps3/ps3cdrom.c > stable/11/sys/boot/powerpc/ps3/ps3disk.c > stable/11/sys/boot/uboot/lib/disk.c > stable/11/sys/boot/usb/storage/umass_loader.c > stable/11/sys/boot/userboot/userboot/host.c > stable/11/sys/boot/userboot/userboot/userboot_disk.c > stable/11/sys/boot/zfs/zfs.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/lib/libstand/cd9660.c > ============================================================================== > --- stable/11/lib/libstand/cd9660.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/cd9660.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -143,7 +143,7 @@ susp_lookup_record(struct open_file *f, > if (bcmp(sh->type, SUSP_CONTINUATION, 2) == 0) { > shc = (ISO_RRIP_CONT *)sh; > error = f->f_dev->dv_strategy(f->f_devdata, F_READ, > - cdb2devb(isonum_733(shc->location)), 0, > + cdb2devb(isonum_733(shc->location)), > ISO_DEFAULT_BLOCK_SIZE, susp_buffer, &read); > > /* Bail if it fails. */ > @@ -288,7 +288,7 @@ cd9660_open(const char *path, struct ope > for (bno = 16;; bno++) { > twiddle(1); > rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), > - 0, ISO_DEFAULT_BLOCK_SIZE, buf, &read); > + ISO_DEFAULT_BLOCK_SIZE, buf, &read); > if (rc) > goto out; > if (read != ISO_DEFAULT_BLOCK_SIZE) { > @@ -322,7 +322,7 @@ cd9660_open(const char *path, struct ope > twiddle(1); > rc = f->f_dev->dv_strategy > (f->f_devdata, F_READ, > - cdb2devb(bno + boff), 0, > + cdb2devb(bno + boff), > ISO_DEFAULT_BLOCK_SIZE, > buf, &read); > if (rc) > @@ -381,7 +381,7 @@ cd9660_open(const char *path, struct ope > bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); > twiddle(1); > rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), > - 0, ISO_DEFAULT_BLOCK_SIZE, buf, &read); > + ISO_DEFAULT_BLOCK_SIZE, buf, &read); > if (rc) > goto out; > if (read != ISO_DEFAULT_BLOCK_SIZE) { > @@ -438,7 +438,7 @@ buf_read_file(struct open_file *f, char > > twiddle(16); > rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, > - cdb2devb(blkno), 0, ISO_DEFAULT_BLOCK_SIZE, > + cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, > fp->f_buf, &read); > if (rc) > return (rc); > > Modified: stable/11/lib/libstand/dosfs.c > ============================================================================== > --- stable/11/lib/libstand/dosfs.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/dosfs.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -154,7 +154,7 @@ static int fatcnt(DOS_FS *, u_int); > static int fatget(DOS_FS *, u_int *); > static int fatend(u_int, u_int); > static int ioread(DOS_FS *, u_int, void *, u_int); > -static int ioget(struct open_file *, daddr_t, size_t, void *, u_int); > +static int ioget(struct open_file *, daddr_t, void *, u_int); > > static void > dos_read_fat(DOS_FS *fs, struct open_file *fd) > @@ -172,7 +172,7 @@ dos_read_fat(DOS_FS *fs, struct open_fil > fat.buf = malloc(secbyt(fs->spf)); > > if (fat.buf != NULL) { > - if (ioget(fd, fs->lsnfat, 0, fat.buf, secbyt(fs->spf)) == 0) { > + if (ioget(fd, fs->lsnfat, fat.buf, secbyt(fs->spf)) == 0) { > fat.size = fs->spf; > fat.unit = dd->d_unit; > return; > @@ -199,12 +199,12 @@ dos_mount(DOS_FS *fs, struct open_file * > fs->fd = fd; > > if ((err = !(buf = malloc(secbyt(1))) ? errno : 0) || > - (err = ioget(fs->fd, 0, 0, buf, secbyt(1))) || > + (err = ioget(fs->fd, 0, buf, secbyt(1))) || > (err = parsebs(fs, (DOS_BS *)buf))) { > if (buf != NULL) > free(buf); > (void)dosunmount(fs); > - return(err); > + return (err); > } > free(buf); > > @@ -219,7 +219,7 @@ dos_mount(DOS_FS *fs, struct open_file * > fs->root.dex.h_clus[0] = (fs->rdcl >> 16) & 0xff; > fs->root.dex.h_clus[1] = (fs->rdcl >> 24) & 0xff; > } > - return 0; > + return (0); > } > > /* > @@ -231,10 +231,10 @@ dos_unmount(DOS_FS *fs) > int err; > > if (fs->links) > - return(EBUSY); > + return (EBUSY); > if ((err = dosunmount(fs))) > - return(err); > - return 0; > + return (err); > + return (0); > } > > /* > @@ -244,7 +244,7 @@ static int > dosunmount(DOS_FS *fs) > { > free(fs); > - return(0); > + return (0); > } > > /* > @@ -285,7 +285,7 @@ dos_open(const char *path, struct open_f > fd->f_fsdata = (void *)f; > > out: > - return(err); > + return (err); > } > > /* > @@ -307,7 +307,7 @@ dos_read(struct open_file *fd, void *buf > twiddle(4); > nb = (u_int)nbyte; > if ((size = fsize(f->fs, &f->de)) == -1) > - return EINVAL; > + return (EINVAL); > if (nb > (n = size - f->offset)) > nb = n; > off = f->offset; > @@ -344,7 +344,7 @@ dos_read(struct open_file *fd, void *buf > out: > if (resid) > *resid = nbyte - nb + cnt; > - return(err); > + return (err); > } > > /* > @@ -370,16 +370,16 @@ dos_seek(struct open_file *fd, off_t off > break; > default: > errno = EINVAL; > - return(-1); > + return (-1); > } > off += offset; > if (off < 0 || off > size) { > errno = EINVAL; > - return(-1); > + return (-1); > } > f->offset = (u_int)off; > f->c = 0; > - return(off); > + return (off); > } > > /* > @@ -394,7 +394,7 @@ dos_close(struct open_file *fd) > f->fs->links--; > free(f); > dos_unmount(fs); > - return 0; > + return (0); > } > > /* > @@ -411,7 +411,7 @@ dos_stat(struct open_file *fd, struct st > sb->st_uid = 0; > sb->st_gid = 0; > if ((sb->st_size = fsize(f->fs, &f->de)) == -1) > - return EINVAL; > + return (EINVAL); > return (0); > } > > @@ -501,7 +501,7 @@ dos_readdir(struct open_file *fd, struct > d->d_reclen = sizeof(*d); > d->d_type = (dd.de.attr & FA_DIR) ? DT_DIR : DT_REG; > memcpy(d->d_name, fn, sizeof(d->d_name)); > - return(0); > + return (0); > } > > /* > @@ -516,41 +516,41 @@ parsebs(DOS_FS *fs, DOS_BS *bs) > bs->jmp[0] != 0xe9 && > (bs->jmp[0] != 0xeb || bs->jmp[2] != 0x90)) || > bs->bpb.media < 0xf0) > - return EINVAL; > + return (EINVAL); > if (cv2(bs->bpb.secsiz) != SECSIZ) > - return EINVAL; > + return (EINVAL); > if (!(fs->spc = bs->bpb.spc) || fs->spc & (fs->spc - 1)) > - return EINVAL; > + return (EINVAL); > fs->bsize = secbyt(fs->spc); > fs->bshift = ffs(fs->bsize) - 1; > if ((fs->spf = cv2(bs->bpb.spf))) { > if (bs->bpb.fats != 2) > - return EINVAL; > + return (EINVAL); > if (!(fs->dirents = cv2(bs->bpb.dirents))) > - return EINVAL; > + return (EINVAL); > } else { > if (!(fs->spf = cv4(bs->bpb.lspf))) > - return EINVAL; > + return (EINVAL); > if (!bs->bpb.fats || bs->bpb.fats > 16) > - return EINVAL; > + return (EINVAL); > if ((fs->rdcl = cv4(bs->bpb.rdcl)) < LOCLUS) > - return EINVAL; > + return (EINVAL); > } > if (!(fs->lsnfat = cv2(bs->bpb.ressec))) > - return EINVAL; > + return (EINVAL); > fs->lsndir = fs->lsnfat + fs->spf * bs->bpb.fats; > fs->lsndta = fs->lsndir + entsec(fs->dirents); > if (!(sc = cv2(bs->bpb.secs)) && !(sc = cv4(bs->bpb.lsecs))) > - return EINVAL; > + return (EINVAL); > if (fs->lsndta > sc) > - return EINVAL; > + return (EINVAL); > if ((fs->xclus = secblk(fs, sc - fs->lsndta) + 1) < LOCLUS) > - return EINVAL; > + return (EINVAL); > fs->fatsz = fs->dirents ? fs->xclus < 0xff6 ? 12 : 16 : 32; > sc = (secbyt(fs->spf) << 1) / (fs->fatsz >> 2) - 1; > if (fs->xclus > sc) > fs->xclus = sc; > - return 0; > + return (0); > } > > /* > @@ -575,17 +575,17 @@ namede(DOS_FS *fs, const char *path, DOS > if (!(s = strchr(path, '/'))) > s = strchr(path, 0); > if ((n = s - path) > 255) > - return ENAMETOOLONG; > + return (ENAMETOOLONG); > memcpy(name, path, n); > name[n] = 0; > path = s; > if (!(de->attr & FA_DIR)) > - return ENOTDIR; > + return (ENOTDIR); > if ((err = lookup(fs, stclus(fs->fatsz, de), name, &de))) > - return err; > + return (err); > } > *dep = de; > - return 0; > + return (0); > } > > /* > @@ -604,7 +604,7 @@ lookup(DOS_FS *fs, u_int clus, const cha > for (ent = 0; ent < 2; ent++) > if (!strcasecmp(name, dotstr[ent])) { > *dep = dot + ent; > - return 0; > + return (0); > } > if (!clus && fs->fatsz == 32) > clus = fs->rdcl; > @@ -617,13 +617,13 @@ lookup(DOS_FS *fs, u_int clus, const cha > else if (okclus(fs, clus)) > lsec = blklsn(fs, clus); > else > - return EINVAL; > + return (EINVAL); > for (sec = 0; sec < nsec; sec++) { > - if ((err = ioget(fs->fd, lsec + sec, 0, dir, secbyt(1)))) > - return err; > + if ((err = ioget(fs->fd, lsec + sec, dir, secbyt(1)))) > + return (err); > for (ent = 0; ent < DEPSEC; ent++) { > if (!*dir[ent].de.name) > - return ENOENT; > + return (ENOENT); > if (*dir[ent].de.name != 0xe5) { > if ((dir[ent].de.attr & FA_MASK) == FA_XDE) { > x = dir[ent].xde.seq; > @@ -651,7 +651,7 @@ lookup(DOS_FS *fs, u_int clus, const cha > } > if (ok) { > *dep = &dir[ent].de; > - return 0; > + return (0); > } > } > } > @@ -661,11 +661,11 @@ lookup(DOS_FS *fs, u_int clus, const cha > if (!clus) > break; > if ((err = fatget(fs, &clus))) > - return err; > + return (err); > if (fatend(fs->fatsz, clus)) > break; > } > - return ENOENT; > + return (ENOENT); > } > > /* > @@ -739,11 +739,11 @@ fsize(DOS_FS *fs, DOS_DE *de) > size = fs->dirents * sizeof(DOS_DE); > else { > if ((n = fatcnt(fs, c)) == -1) > - return n; > + return (n); > size = blkbyt(fs, n); > } > } > - return size; > + return (size); > } > > /* > @@ -756,8 +756,8 @@ fatcnt(DOS_FS *fs, u_int c) > > for (n = 0; okclus(fs, c); n++) > if (fatget(fs, &c)) > - return -1; > - return fatend(fs->fatsz, c) ? n : -1; > + return (-1); > + return (fatend(fs->fatsz, c) ? n : -1); > } > > /* > @@ -768,8 +768,7 @@ static int > fatget(DOS_FS *fs, u_int *c) > { > u_char buf[4]; > - u_char *s; > - u_int x, offset, off, n, nbyte, lsec; > + u_int x, offset, n, nbyte; > struct devdesc *dd = fs->fd->f_devdata; > int err = 0; > > @@ -783,25 +782,9 @@ fatget(DOS_FS *fs, u_int *c) > offset = fatoff(fs->fatsz, *c); > nbyte = fs->fatsz != 32 ? 2 : 4; > > - s = buf; > - if ((off = offset & (SECSIZ - 1))) { > - offset -= off; > - lsec = bytsec(offset); > - offset += SECSIZ; > - if ((n = SECSIZ - off) > nbyte) > - n = nbyte; > - memcpy(s, fat.buf + secbyt(lsec) + off, n); > - s += n; > - nbyte -= n; > - } > - n = nbyte & (SECSIZ - 1); > - if (nbyte -= n) { > - memcpy(s, fat.buf + secbyt(bytsec(offset)), nbyte); > - offset += nbyte; > - s += nbyte; > - } > - if (n) > - memcpy(s, fat.buf + secbyt(bytsec(offset)), n); > + if (offset + nbyte > secbyt(fat.size)) > + return (EINVAL); > + memcpy(buf, fat.buf + offset, nbyte); > } > > x = fs->fatsz != 32 ? cv2(buf) : cv4(buf); > @@ -815,7 +798,7 @@ fatget(DOS_FS *fs, u_int *c) > static int > fatend(u_int sz, u_int c) > { > - return c > (sz == 12 ? 0xff7U : sz == 16 ? 0xfff7U : 0xffffff7); > + return (c > (sz == 12 ? 0xff7U : sz == 16 ? 0xfff7U : 0xffffff7)); > } > > /* > @@ -827,38 +810,41 @@ ioread(DOS_FS *fs, u_int offset, void *b > char *s; > u_int off, n; > int err; > + u_char local_buf[SECSIZ]; > > s = buf; > if ((off = offset & (SECSIZ - 1))) { > offset -= off; > if ((n = SECSIZ - off) > nbyte) > n = nbyte; > - if ((err = ioget(fs->fd, bytsec(offset), off, s, n))) > - return err; > + if ((err = ioget(fs->fd, bytsec(offset), local_buf, sizeof(local_buf)))) > + return (err); > + memcpy(s, local_buf + off, n); > offset += SECSIZ; > s += n; > nbyte -= n; > } > n = nbyte & (SECSIZ - 1); > if (nbyte -= n) { > - if ((err = ioget(fs->fd, bytsec(offset), 0, s, nbyte))) > - return err; > + if ((err = ioget(fs->fd, bytsec(offset), s, nbyte))) > + return (err); > offset += nbyte; > s += nbyte; > } > if (n) { > - if ((err = ioget(fs->fd, bytsec(offset), 0, s, n))) > - return err; > + if ((err = ioget(fs->fd, bytsec(offset), local_buf, sizeof(local_buf)))) > + return (err); > + memcpy(s, local_buf, n); > } > - return 0; > + return (0); > } > > /* > * Sector-based I/O primitive > */ > static int > -ioget(struct open_file *fd, daddr_t lsec, size_t offset, void *buf, u_int size) > +ioget(struct open_file *fd, daddr_t lsec, void *buf, u_int size) > { > - return ((fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, offset, > + return ((fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, > size, buf, NULL)); > } > > Modified: stable/11/lib/libstand/ext2fs.c > ============================================================================== > --- stable/11/lib/libstand/ext2fs.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/ext2fs.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -355,7 +355,7 @@ ext2fs_open(const char *upath, struct op > fp->f_fs = fs; > twiddle(1); > error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - EXT2_SBLOCK, 0, EXT2_SBSIZE, (char *)fs, &buf_size); > + EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, &buf_size); > if (error) > goto out; > > @@ -397,7 +397,7 @@ ext2fs_open(const char *upath, struct op > fp->f_bg = malloc(len); > twiddle(1); > error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, 0, len, > + EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, > (char *)fp->f_bg, &buf_size); > if (error) > goto out; > @@ -509,7 +509,7 @@ ext2fs_open(const char *upath, struct op > > twiddle(1); > error = (f->f_dev->dv_strategy)(f->f_devdata, > - F_READ, fsb_to_db(fs, disk_block), 0, > + F_READ, fsb_to_db(fs, disk_block), > fs->fs_bsize, buf, &buf_size); > if (error) > goto out; > @@ -570,7 +570,7 @@ read_inode(ino_t inumber, struct open_fi > buf = malloc(fs->fs_bsize); > twiddle(1); > error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - ino_to_db(fs, fp->f_bg, inumber), 0, fs->fs_bsize, buf, &rsize); > + ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize); > if (error) > goto out; > if (rsize != fs->fs_bsize) { > @@ -667,7 +667,7 @@ block_map(struct open_file *f, daddr_t f > malloc(fs->fs_bsize); > twiddle(1); > error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - fsb_to_db(fp->f_fs, ind_block_num), 0, fs->fs_bsize, > + fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize, > fp->f_blk[level], &fp->f_blksize[level]); > if (error) > return (error); > @@ -725,7 +725,7 @@ buf_read_file(struct open_file *f, char > } else { > twiddle(4); > error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - fsb_to_db(fs, disk_block), 0, block_size, > + fsb_to_db(fs, disk_block), block_size, > fp->f_buf, &fp->f_buf_size); > if (error) > goto done; > > Modified: stable/11/lib/libstand/nandfs.c > ============================================================================== > --- stable/11/lib/libstand/nandfs.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/nandfs.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -1024,7 +1024,7 @@ ioread(struct open_file *f, off_t pos, v > > buffer = malloc(nsec * bsize); > > - err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, pos, 0, > + err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, pos, > nsec * bsize, buffer, NULL); > > memcpy(buf, (void *)((uintptr_t)buffer + off), length); > @@ -1045,7 +1045,7 @@ nandfs_probe_sectorsize(struct open_file > > for (i = 512; i < (16 * 1024); i <<= 1) { > NANDFS_DEBUG("%d ", i); > - err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, 0, 0, i, > + err = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, 0, i, > buffer, NULL); > > if (err == 0) { > > Modified: stable/11/lib/libstand/read.c > ============================================================================== > --- stable/11/lib/libstand/read.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/read.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -79,7 +79,7 @@ read(int fd, void *dest, size_t bcount) > if (f->f_flags & F_RAW) { > twiddle(4); > errno = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - btodb(f->f_offset), 0, bcount, dest, &resid); > + btodb(f->f_offset), bcount, dest, &resid); > if (errno) > return (-1); > f->f_offset += resid; > > Modified: stable/11/lib/libstand/stand.h > ============================================================================== > --- stable/11/lib/libstand/stand.h Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/stand.h Mon Feb 6 22:03:07 2017 (r313355) > @@ -139,7 +139,7 @@ struct devsw { > int dv_type; /* opaque type constant, arch-dependant */ > int (*dv_init)(void); /* early probe call */ > int (*dv_strategy)(void *devdata, int rw, daddr_t blk, > - size_t offset, size_t size, char *buf, size_t *rsize); > + size_t size, char *buf, size_t *rsize); > int (*dv_open)(struct open_file *f, ...); > int (*dv_close)(struct open_file *f); > int (*dv_ioctl)(struct open_file *f, u_long cmd, void *data); > > Modified: stable/11/lib/libstand/ufs.c > ============================================================================== > --- stable/11/lib/libstand/ufs.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/ufs.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -157,7 +157,7 @@ read_inode(inumber, f) > buf = malloc(fs->fs_bsize); > twiddle(1); > rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - fsbtodb(fs, ino_to_fsba(fs, inumber)), 0, fs->fs_bsize, > + fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, > buf, &rsize); > if (rc) > goto out; > @@ -267,7 +267,7 @@ block_map(f, file_block, disk_block_p) > malloc(fs->fs_bsize); > twiddle(1); > rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - fsbtodb(fp->f_fs, ind_block_num), 0, > + fsbtodb(fp->f_fs, ind_block_num), > fs->fs_bsize, > fp->f_blk[level], > &fp->f_blksize[level]); > @@ -348,7 +348,7 @@ buf_write_file(f, buf_p, size_p) > > twiddle(4); > rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - fsbtodb(fs, disk_block), 0, > + fsbtodb(fs, disk_block), > block_size, fp->f_buf, &fp->f_buf_size); > if (rc) > return (rc); > @@ -367,7 +367,7 @@ buf_write_file(f, buf_p, size_p) > > twiddle(4); > rc = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, > - fsbtodb(fs, disk_block), 0, > + fsbtodb(fs, disk_block), > block_size, fp->f_buf, &fp->f_buf_size); > return (rc); > } > @@ -408,7 +408,7 @@ buf_read_file(f, buf_p, size_p) > } else { > twiddle(4); > rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - fsbtodb(fs, disk_block), 0, > + fsbtodb(fs, disk_block), > block_size, fp->f_buf, &fp->f_buf_size); > if (rc) > return (rc); > @@ -521,7 +521,7 @@ ufs_open(upath, f) > */ > for (i = 0; sblock_try[i] != -1; i++) { > rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, > - sblock_try[i] / DEV_BSIZE, 0, SBLOCKSIZE, > + sblock_try[i] / DEV_BSIZE, SBLOCKSIZE, > (char *)fs, &buf_size); > if (rc) > goto out; > @@ -651,7 +651,7 @@ ufs_open(upath, f) > > twiddle(1); > rc = (f->f_dev->dv_strategy)(f->f_devdata, > - F_READ, fsbtodb(fs, disk_block), 0, > + F_READ, fsbtodb(fs, disk_block), > fs->fs_bsize, buf, &buf_size); > if (rc) > goto out; > > Modified: stable/11/lib/libstand/write.c > ============================================================================== > --- stable/11/lib/libstand/write.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/lib/libstand/write.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -82,7 +82,7 @@ write(fd, dest, bcount) > if (f->f_flags & F_RAW) { > twiddle(4); > errno = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, > - btodb(f->f_offset), 0, bcount, dest, &resid); > + btodb(f->f_offset), bcount, dest, &resid); > if (errno) > return (-1); > f->f_offset += resid; > > Modified: stable/11/sys/boot/common/bcache.c > ============================================================================== > --- stable/11/sys/boot/common/bcache.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/common/bcache.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -182,8 +182,8 @@ bcache_free(void *cache) > * cache with the new values. > */ > static int > -write_strategy(void *devdata, int rw, daddr_t blk, size_t offset, > - size_t size, char *buf, size_t *rsize) > +write_strategy(void *devdata, int rw, daddr_t blk, size_t size, > + char *buf, size_t *rsize) > { > struct bcache_devdata *dd = (struct bcache_devdata *)devdata; > struct bcache *bc = dd->dv_cache; > @@ -197,7 +197,7 @@ write_strategy(void *devdata, int rw, da > } > > /* Write the blocks */ > - return (dd->dv_strategy(dd->dv_devdata, rw, blk, offset, size, buf, rsize)); > + return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); > } > > /* > @@ -206,8 +206,8 @@ write_strategy(void *devdata, int rw, da > * device I/O and then use the I/O results to populate the cache. > */ > static int > -read_strategy(void *devdata, int rw, daddr_t blk, size_t offset, > - size_t size, char *buf, size_t *rsize) > +read_strategy(void *devdata, int rw, daddr_t blk, size_t size, > + char *buf, size_t *rsize) > { > struct bcache_devdata *dd = (struct bcache_devdata *)devdata; > struct bcache *bc = dd->dv_cache; > @@ -225,7 +225,7 @@ read_strategy(void *devdata, int rw, dad > *rsize = 0; > > nblk = size / bcache_blksize; > - if ((nblk == 0 && size != 0) || offset != 0) > + if (nblk == 0 && size != 0) > nblk++; > result = 0; > complete = 1; > @@ -246,8 +246,7 @@ read_strategy(void *devdata, int rw, dad > if (complete) { /* whole set was in cache, return it */ > if (bc->ra < BCACHE_READAHEAD) > bc->ra <<= 1; /* increase read ahead */ > - bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, > - buf, size); > + bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)), buf, size); > goto done; > } > > @@ -282,7 +281,7 @@ read_strategy(void *devdata, int rw, dad > * in either case we should return the data in bcache and only > * return error if there is no data. > */ > - result = dd->dv_strategy(dd->dv_devdata, rw, p_blk, 0, > + result = dd->dv_strategy(dd->dv_devdata, rw, p_blk, > p_size * bcache_blksize, p_buf, &r_size); > > r_size /= bcache_blksize; > @@ -305,8 +304,7 @@ read_strategy(void *devdata, int rw, dad > > size = i * bcache_blksize; > if (size != 0) { > - bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, > - buf, size); > + bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)), buf, size); > result = 0; > } > > @@ -321,8 +319,8 @@ read_strategy(void *devdata, int rw, dad > * directly to the disk. XXX tune this. > */ > int > -bcache_strategy(void *devdata, int rw, daddr_t blk, size_t offset, > - size_t size, char *buf, size_t *rsize) > +bcache_strategy(void *devdata, int rw, daddr_t blk, size_t size, > + char *buf, size_t *rsize) > { > struct bcache_devdata *dd = (struct bcache_devdata *)devdata; > struct bcache *bc = dd->dv_cache; > @@ -337,23 +335,16 @@ bcache_strategy(void *devdata, int rw, d > > /* bypass large requests, or when the cache is inactive */ > if (bc == NULL || > - (offset == 0 && ((size * 2 / bcache_blksize) > bcache_nblks))) { > + ((size * 2 / bcache_blksize) > bcache_nblks)) { > DEBUG("bypass %d from %d", size / bcache_blksize, blk); > bcache_bypasses++; > - return (dd->dv_strategy(dd->dv_devdata, rw, blk, offset, size, buf, > - rsize)); > - } > - > - /* normalize offset */ > - while (offset >= bcache_blksize) { > - blk++; > - offset -= bcache_blksize; > + return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); > } > > switch (rw) { > case F_READ: > nblk = size / bcache_blksize; > - if (offset || (size != 0 && nblk == 0)) > + if (size != 0 && nblk == 0) > nblk++; /* read at least one block */ > > ret = 0; > @@ -364,14 +355,10 @@ bcache_strategy(void *devdata, int rw, d > > if (size <= bcache_blksize) > csize = size; > - else { > + else > csize = cblk * bcache_blksize; > - if (offset) > - csize -= (bcache_blksize - offset); > - } > > - ret = read_strategy(devdata, rw, blk, offset, > - csize, buf+total, &isize); > + ret = read_strategy(devdata, rw, blk, csize, buf+total, &isize); > > /* > * we may have error from read ahead, if we have read some data > @@ -382,8 +369,7 @@ bcache_strategy(void *devdata, int rw, d > ret = 0; > break; > } > - blk += (offset+isize) / bcache_blksize; > - offset = 0; > + blk += isize / bcache_blksize; > total += isize; > size -= isize; > nblk = size / bcache_blksize; > @@ -394,7 +380,7 @@ bcache_strategy(void *devdata, int rw, d > > return (ret); > case F_WRITE: > - return write_strategy(devdata, rw, blk, offset, size, buf, rsize); > + return write_strategy(devdata, rw, blk, size, buf, rsize); > } > return -1; > } > > Modified: stable/11/sys/boot/common/bootstrap.h > ============================================================================== > --- stable/11/sys/boot/common/bootstrap.h Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/common/bootstrap.h Mon Feb 6 22:03:07 2017 (r313355) > @@ -76,8 +76,8 @@ void bcache_init(u_int nblks, size_t bsi > void bcache_add_dev(int); > void *bcache_allocate(void); > void bcache_free(void *); > -int bcache_strategy(void *devdata, int rw, daddr_t blk, size_t offset, > - size_t size, char *buf, size_t *rsize); > +int bcache_strategy(void *devdata, int rw, daddr_t blk, size_t size, > + char *buf, size_t *rsize); > > /* > * Disk block cache > @@ -85,7 +85,7 @@ int bcache_strategy(void *devdata, int r > struct bcache_devdata > { > int (*dv_strategy)(void *devdata, int rw, daddr_t blk, > - size_t offset, size_t size, char *buf, size_t *rsize); > + size_t size, char *buf, size_t *rsize); > void *dv_devdata; > void *dv_cache; > }; > > Modified: stable/11/sys/boot/common/disk.c > ============================================================================== > --- stable/11/sys/boot/common/disk.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/common/disk.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -178,7 +178,7 @@ ptblread(void *d, void *buf, size_t bloc > > dev = (struct disk_devdesc *)d; > od = (struct open_disk *)dev->d_opendata; > - return (dev->d_dev->dv_strategy(dev, F_READ, offset, 0, > + return (dev->d_dev->dv_strategy(dev, F_READ, offset, > blocks * od->sectorsize, (char *)buf, NULL)); > } > > @@ -244,7 +244,7 @@ disk_read(struct disk_devdesc *dev, void > int ret; > > od = (struct open_disk *)dev->d_opendata; > - ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, 0, > + ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, > blocks * od->sectorsize, buf, NULL); > > return (ret); > @@ -257,7 +257,7 @@ disk_write(struct disk_devdesc *dev, voi > int ret; > > od = (struct open_disk *)dev->d_opendata; > - ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, 0, > + ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, > blocks * od->sectorsize, buf, NULL); > > return (ret); > > Modified: stable/11/sys/boot/common/md.c > ============================================================================== > --- stable/11/sys/boot/common/md.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/common/md.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -60,7 +60,7 @@ static struct { > > /* devsw I/F */ > static int md_init(void); > -static int md_strategy(void *, int, daddr_t, size_t, size_t, char *, size_t *); > +static int md_strategy(void *, int, daddr_t, size_t, char *, size_t *); > static int md_open(struct open_file *, ...); > static int md_close(struct open_file *); > static void md_print(int); > @@ -84,7 +84,7 @@ md_init(void) > } > > static int > -md_strategy(void *devdata, int rw, daddr_t blk, size_t offset, size_t size, > +md_strategy(void *devdata, int rw, daddr_t blk, size_t size, > char *buf, size_t *rsize) > { > struct devdesc *dev = (struct devdesc *)devdata; > > Modified: stable/11/sys/boot/efi/libefi/efipart.c > ============================================================================== > --- stable/11/sys/boot/efi/libefi/efipart.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/efi/libefi/efipart.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -41,10 +41,8 @@ __FBSDID("$FreeBSD$"); > static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; > > static int efipart_init(void); > -static int efipart_strategy(void *, int, daddr_t, size_t, size_t, char *, > - size_t *); > -static int efipart_realstrategy(void *, int, daddr_t, size_t, size_t, char *, > - size_t *); > +static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); > +static int efipart_realstrategy(void *, int, daddr_t, size_t, char *, size_t *); > static int efipart_open(struct open_file *, ...); > static int efipart_close(struct open_file *); > static void efipart_print(int); > @@ -284,8 +282,8 @@ efipart_readwrite(EFI_BLOCK_IO *blkio, i > } > > static int > -efipart_strategy(void *devdata, int rw, daddr_t blk, size_t offset, > - size_t size, char *buf, size_t *rsize) > +efipart_strategy(void *devdata, int rw, daddr_t blk, size_t size, > + char *buf, size_t *rsize) > { > struct bcache_devdata bcd; > struct devdesc *dev; > @@ -294,13 +292,12 @@ efipart_strategy(void *devdata, int rw, > bcd.dv_strategy = efipart_realstrategy; > bcd.dv_devdata = devdata; > bcd.dv_cache = PD(dev).pd_bcache; > - return (bcache_strategy(&bcd, rw, blk, offset, size, > - buf, rsize)); > + return (bcache_strategy(&bcd, rw, blk, size, buf, rsize)); > } > > static int > -efipart_realstrategy(void *devdata, int rw, daddr_t blk, size_t offset, > - size_t size, char *buf, size_t *rsize) > +efipart_realstrategy(void *devdata, int rw, daddr_t blk, size_t size, > + char *buf, size_t *rsize) > { > struct devdesc *dev = (struct devdesc *)devdata; > EFI_BLOCK_IO *blkio; > > Modified: stable/11/sys/boot/i386/libfirewire/firewire.c > ============================================================================== > --- stable/11/sys/boot/i386/libfirewire/firewire.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/i386/libfirewire/firewire.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -66,7 +66,7 @@ struct crom_src_buf { > > static int fw_init(void); > static int fw_strategy(void *devdata, int flag, daddr_t dblk, > - size_t offset, size_t size, char *buf, size_t *rsize); > + size_t size, char *buf, size_t *rsize); > static int fw_open(struct open_file *f, ...); > static int fw_close(struct open_file *f); > static void fw_print(int verbose); > @@ -201,7 +201,7 @@ fw_cleanup() > } > > static int > -fw_strategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, > +fw_strategy(void *devdata, int rw, daddr_t dblk, size_t size, > char *buf, size_t *rsize) > { > return (EIO); > > Modified: stable/11/sys/boot/i386/libi386/bioscd.c > ============================================================================== > --- stable/11/sys/boot/i386/libi386/bioscd.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/i386/libi386/bioscd.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -95,9 +95,9 @@ static int nbcinfo = 0; > static int bc_read(int unit, daddr_t dblk, int blks, caddr_t dest); > static int bc_init(void); > static int bc_strategy(void *devdata, int flag, daddr_t dblk, > - size_t offset, size_t size, char *buf, size_t *rsize); > + size_t size, char *buf, size_t *rsize); > static int bc_realstrategy(void *devdata, int flag, daddr_t dblk, > - size_t offset, size_t size, char *buf, size_t *rsize); > + size_t size, char *buf, size_t *rsize); > static int bc_open(struct open_file *f, ...); > static int bc_close(struct open_file *f); > static void bc_print(int verbose); > @@ -231,7 +231,7 @@ bc_close(struct open_file *f) > } > > static int > -bc_strategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, > +bc_strategy(void *devdata, int rw, daddr_t dblk, size_t size, > char *buf, size_t *rsize) > { > struct bcache_devdata bcd; > @@ -242,11 +242,11 @@ bc_strategy(void *devdata, int rw, daddr > bcd.dv_devdata = devdata; > bcd.dv_cache = BC(dev).bc_bcache; > > - return (bcache_strategy(&bcd, rw, dblk, offset, size, buf, rsize)); > + return (bcache_strategy(&bcd, rw, dblk, size, buf, rsize)); > } > > static int > -bc_realstrategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, > +bc_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size, > char *buf, size_t *rsize) > { > struct i386_devdesc *dev; > > Modified: stable/11/sys/boot/i386/libi386/biosdisk.c > ============================================================================== > --- stable/11/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/i386/libi386/biosdisk.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -128,10 +128,10 @@ static int bd_write(struct disk_devdesc > static int bd_int13probe(struct bdinfo *bd); > > static int bd_init(void); > -static int bd_strategy(void *devdata, int flag, daddr_t dblk, size_t offset, > - size_t size, char *buf, size_t *rsize); > -static int bd_realstrategy(void *devdata, int flag, daddr_t dblk, size_t offset, > - size_t size, char *buf, size_t *rsize); > +static int bd_strategy(void *devdata, int flag, daddr_t dblk, size_t size, > + char *buf, size_t *rsize); > +static int bd_realstrategy(void *devdata, int flag, daddr_t dblk, size_t size, > + char *buf, size_t *rsize); > static int bd_open(struct open_file *f, ...); > static int bd_close(struct open_file *f); > static int bd_ioctl(struct open_file *f, u_long cmd, void *data); > @@ -478,7 +478,7 @@ bd_ioctl(struct open_file *f, u_long cmd > } > > static int > -bd_strategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, > +bd_strategy(void *devdata, int rw, daddr_t dblk, size_t size, > char *buf, size_t *rsize) > { > struct bcache_devdata bcd; > @@ -488,12 +488,12 @@ bd_strategy(void *devdata, int rw, daddr > bcd.dv_strategy = bd_realstrategy; > bcd.dv_devdata = devdata; > bcd.dv_cache = BD(dev).bd_bcache; > - return (bcache_strategy(&bcd, rw, dblk + dev->d_offset, offset, > + return (bcache_strategy(&bcd, rw, dblk + dev->d_offset, > size, buf, rsize)); > } > > static int > -bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t offset, size_t size, > +bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size, > char *buf, size_t *rsize) > { > struct disk_devdesc *dev = (struct disk_devdesc *)devdata; > > Modified: stable/11/sys/boot/i386/libi386/pxe.c > ============================================================================== > --- stable/11/sys/boot/i386/libi386/pxe.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/i386/libi386/pxe.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -72,7 +72,7 @@ static void bangpxe_call(int func); > > static int pxe_init(void); > static int pxe_strategy(void *devdata, int flag, daddr_t dblk, > - size_t offset, size_t size, char *buf, size_t *rsize); > + size_t size, char *buf, size_t *rsize); > static int pxe_open(struct open_file *f, ...); > static int pxe_close(struct open_file *f); > static void pxe_print(int verbose); > @@ -247,8 +247,8 @@ pxe_init(void) > > > static int > -pxe_strategy(void *devdata, int flag, daddr_t dblk, size_t offset, size_t size, > - char *buf, size_t *rsize) > +pxe_strategy(void *devdata, int flag, daddr_t dblk, size_t size, > + char *buf, size_t *rsize) > { > return (EIO); > } > > Modified: stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c > ============================================================================== > --- stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c Mon Feb 6 21:02:26 2017 (r313354) > +++ stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c Mon Feb 6 22:03:07 2017 (r313355) > @@ -45,7 +45,7 @@ static int beri_cfi_disk_init(void); > static int beri_cfi_disk_open(struct open_file *, ...); > static int beri_cfi_disk_close(struct open_file *); > static void beri_cfi_disk_cleanup(void); > -static int beri_cfi_disk_strategy(void *, int, daddr_t, size_t, size_t, > +static int beri_cfi_disk_strategy(void *, int, daddr_t, size_t, > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Tue Feb 7 01:21:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74586CD2B24; Tue, 7 Feb 2017 01:21:19 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43B3FB0; Tue, 7 Feb 2017 01:21:19 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171LID2083005; Tue, 7 Feb 2017 01:21:18 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171LInM083004; Tue, 7 Feb 2017 01:21:18 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201702070121.v171LInM083004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 7 Feb 2017 01:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313359 - head/sys/cddl/contrib/opensolaris/uts/common/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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:21:19 -0000 Author: gnn Date: Tue Feb 7 01:21:18 2017 New Revision: 313359 URL: https://svnweb.freebsd.org/changeset/base/313359 Log: Fix the ifdef protection and remove superfluous extern statements Reported by: Konstantin Belousov MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Tue Feb 7 00:47:33 2017 (r313358) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Tue Feb 7 01:21:18 2017 (r313359) @@ -32,9 +32,10 @@ #ifndef _DTRACE_XOROSHIRO128_PLUS_H #define _DTRACE_XOROSHIRO128_PLUS_H -#endif #include -extern void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * const); -extern uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const); +void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * const); +uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const); + +#endif From owner-svn-src-all@freebsd.org Tue Feb 7 01:28:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E411CCD30C8; Tue, 7 Feb 2017 01:28:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA6B98A4; Tue, 7 Feb 2017 01:28:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171StBU086911; Tue, 7 Feb 2017 01:28:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171StXn086910; Tue, 7 Feb 2017 01:28:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070128.v171StXn086910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 01:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313360 - head/usr.sbin/syslogd 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:28:57 -0000 Author: ngie Date: Tue Feb 7 01:28:55 2017 New Revision: 313360 URL: https://svnweb.freebsd.org/changeset/base/313360 Log: Sort sys/ #includes some more MFC after: 1 week X-MFC with: r313358 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Feb 7 01:21:18 2017 (r313359) +++ head/usr.sbin/syslogd/syslogd.c Tue Feb 7 01:28:55 2017 (r313360) @@ -84,10 +84,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include +#include #include +#include #if defined(INET) || defined(INET6) #include From owner-svn-src-all@freebsd.org Tue Feb 7 01:38:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB6CFCD39BC; Tue, 7 Feb 2017 01:38:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7835311E3; Tue, 7 Feb 2017 01:38:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171cm7r091399; Tue, 7 Feb 2017 01:38:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171cmj7091398; Tue, 7 Feb 2017 01:38:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070138.v171cmj7091398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313362 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:38:49 -0000 Author: mav Date: Tue Feb 7 01:38:48 2017 New Revision: 313362 URL: https://svnweb.freebsd.org/changeset/base/313362 Log: MFC r312343: Improve error message on duplicate iSCSI port. Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:33:39 2017 (r313361) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:38:48 2017 (r313362) @@ -2073,7 +2073,8 @@ cfiscsi_ioctl_port_create(struct ctl_req if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "target \"%s\" already exists", target); + "target \"%s\" for portal group tag %u already exists", + target, tag); cfiscsi_target_release(ct); ctl_free_opts(&opts); return; From owner-svn-src-all@freebsd.org Tue Feb 7 01:39:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E47DCD3A63; Tue, 7 Feb 2017 01:39:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D8B31336; Tue, 7 Feb 2017 01:39:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171dP04091476; Tue, 7 Feb 2017 01:39:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171dPtL091475; Tue, 7 Feb 2017 01:39:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070139.v171dPtL091475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:39: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: r313363 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:39:26 -0000 Author: mav Date: Tue Feb 7 01:39:25 2017 New Revision: 313363 URL: https://svnweb.freebsd.org/changeset/base/313363 Log: MFC r312343: Improve error message on duplicate iSCSI port. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:38:48 2017 (r313362) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:39:25 2017 (r313363) @@ -1998,7 +1998,8 @@ cfiscsi_ioctl_port_create(struct ctl_req if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), - "target \"%s\" already exists", target); + "target \"%s\" for portal group tag %u already exists", + target, tag); cfiscsi_target_release(ct); ctl_free_opts(&opts); return; From owner-svn-src-all@freebsd.org Tue Feb 7 01:42:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49FDBCD3D49; Tue, 7 Feb 2017 01:42:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122F1179F; Tue, 7 Feb 2017 01:42:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171gFpZ095136; Tue, 7 Feb 2017 01:42:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171gEOK095123; Tue, 7 Feb 2017 01:42:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070142.v171gEOK095123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313364 - in stable/11/sys/cam: ctl scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:42:16 -0000 Author: mav Date: Tue Feb 7 01:42:13 2017 New Revision: 313364 URL: https://svnweb.freebsd.org/changeset/base/313364 Log: MFC r312291, r312669: Make CTL frontends report kern_data_resid for under-/overruns. It seems like kern_data_resid was never really implemented. This change finally does it. Now frontends update this field while transferring data, while CTL/backends getting it can more flexibly handle the result. At this point behavior should not change significantly, still reporting errors on write overrun, but that may be changed later, if we decide so. CAM target frontend still does not properly handle overruns due to CAM API limitations. We may need to add some fields to struct ccb_accept_tio to pass information about initiator requested transfer size(s). Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/ctl/ctl_backend_block.c stable/11/sys/cam/ctl/ctl_backend_ramdisk.c stable/11/sys/cam/ctl/ctl_error.c stable/11/sys/cam/ctl/ctl_error.h stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c stable/11/sys/cam/ctl/ctl_frontend_ioctl.c stable/11/sys/cam/ctl/ctl_frontend_iscsi.c stable/11/sys/cam/ctl/ctl_tpc.c stable/11/sys/cam/ctl/ctl_tpc_local.c stable/11/sys/cam/ctl/scsi_ctl.c stable/11/sys/cam/scsi/scsi_all.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl.c Tue Feb 7 01:42:13 2017 (r313364) @@ -5053,18 +5053,13 @@ ctl_config_move_done(union ctl_io *io) if ((io->io_hdr.port_status != 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } if (ctl_debug & CTL_DEBUG_CDB_DATA) @@ -5462,7 +5457,6 @@ ctl_format(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK); ctsio->kern_data_len = length; ctsio->kern_total_len = length; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -5588,7 +5582,6 @@ ctl_read_buffer(struct ctl_scsiio *ctsio } 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; ctl_set_success(ctsio); @@ -5634,7 +5627,6 @@ ctl_write_buffer(struct ctl_scsiio *ctsi ctsio->kern_data_ptr = lun->write_buffer + buffer_offset; 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; @@ -5742,7 +5734,6 @@ ctl_write_same(struct ctl_scsiio *ctsio) 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; @@ -5788,7 +5779,6 @@ ctl_unmap(struct ctl_scsiio *ctsio) 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; @@ -6278,7 +6268,6 @@ ctl_mode_select(struct ctl_scsiio *ctsio ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK); ctsio->kern_data_len = param_len; ctsio->kern_total_len = param_len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -6508,7 +6497,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (total_len < alloc_len) { ctsio->residual = alloc_len - total_len; @@ -6861,7 +6849,6 @@ ctl_log_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (total_len < alloc_len) { ctsio->residual = alloc_len - total_len; @@ -6929,7 +6916,6 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->residual = 0; ctsio->kern_data_len = sizeof(*data); ctsio->kern_total_len = sizeof(*data); - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -6995,7 +6981,6 @@ ctl_read_capacity_16(struct ctl_scsiio * 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; @@ -7050,7 +7035,6 @@ ctl_get_lba_status(struct ctl_scsiio *ct 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; @@ -7112,7 +7096,6 @@ ctl_read_defect(struct ctl_scsiio *ctsio 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; @@ -7211,7 +7194,6 @@ ctl_report_tagret_port_groups(struct ctl ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (ext) { @@ -7412,7 +7394,6 @@ ctl_report_supported_opcodes(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; switch (cdb->options & RSO_OPTIONS_MASK) { @@ -7526,7 +7507,6 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_ext_data *)ctsio->kern_data_ptr; @@ -7574,7 +7554,6 @@ ctl_report_timestamp(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; @@ -7647,7 +7626,6 @@ retry: ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -8225,7 +8203,6 @@ ctl_persistent_reserve_out(struct ctl_sc ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK); ctsio->kern_data_len = param_len; ctsio->kern_total_len = param_len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -9207,7 +9184,6 @@ ctl_report_luns(struct ctl_scsiio *ctsio 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; @@ -9270,7 +9246,6 @@ ctl_request_sense(struct ctl_scsiio *cts ctsio->kern_data_len = cdb->length; ctsio->kern_total_len = cdb->length; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9409,7 +9384,6 @@ ctl_inquiry_evpd_supported(struct ctl_sc 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; @@ -9478,7 +9452,6 @@ ctl_inquiry_evpd_serial(struct ctl_scsii 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; @@ -9537,7 +9510,6 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * 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; @@ -9613,7 +9585,6 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * 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; @@ -9678,7 +9649,6 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio 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; @@ -9807,7 +9777,6 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s 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; @@ -9883,7 +9852,6 @@ ctl_inquiry_evpd_block_limits(struct ctl 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; @@ -9959,7 +9927,6 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * 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; @@ -10016,7 +9983,6 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * 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; @@ -10151,7 +10117,6 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10379,7 +10344,6 @@ ctl_get_config(struct ctl_scsiio *ctsio) sizeof(struct scsi_get_config_feature) + 4; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; hdr = (struct scsi_get_config_header *)ctsio->kern_data_ptr; @@ -10585,7 +10549,6 @@ ctl_get_event_status(struct ctl_scsiio * data_len = sizeof(struct scsi_get_event_status_header); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10623,7 +10586,6 @@ ctl_mechanism_status(struct ctl_scsiio * data_len = sizeof(struct scsi_mechanism_status_header); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10683,7 +10645,6 @@ ctl_read_toc(struct ctl_scsiio *ctsio) data_len += sizeof(struct scsi_read_toc_type01_descr); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -12585,6 +12546,9 @@ ctl_datamove(union ctl_io *io) CTL_DEBUG_PRINT(("ctl_datamove\n")); + /* No data transferred yet. Frontend must update this when done. */ + io->scsiio.kern_data_resid = io->scsiio.kern_data_len; + #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { char str[256]; Modified: stable/11/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:42:13 2017 (r313364) @@ -419,6 +419,16 @@ ctl_be_block_move_done(union ctl_io *io) */ if (io->io_hdr.flags & CTL_FLAG_ABORT) { ; + } else if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { lbalen = ARGS(beio->io); @@ -428,21 +438,6 @@ ctl_be_block_move_done(union ctl_io *io) /* We have two data blocks ready for comparison. */ ctl_be_block_compare(io); } - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); } /* @@ -1634,7 +1629,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc else io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; io->scsiio.kern_data_len = beio->io_len; - io->scsiio.kern_data_resid = 0; io->scsiio.kern_sg_entries = beio->num_segs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:42:13 2017 (r313364) @@ -231,6 +231,16 @@ ctl_backend_ramdisk_move_done(union ctl_ io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; if (io->io_hdr.flags & CTL_FLAG_ABORT) { ; + } else if (io->io_hdr.port_status != 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { @@ -243,21 +253,6 @@ ctl_backend_ramdisk_move_done(union ctl_ return (0); } ctl_set_success(&io->scsiio); - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); } ctl_data_submit_done(io); return(0); @@ -318,7 +313,6 @@ ctl_backend_ramdisk_continue(union ctl_i #endif /* CTL_RAMDISK_PAGES */ io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_data_resid = 0; io->scsiio.kern_data_len = len_filled; io->scsiio.kern_sg_entries = sg_filled; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; Modified: stable/11/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_error.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_error.c Tue Feb 7 01:42:13 2017 (r313364) @@ -641,6 +641,18 @@ ctl_set_invalid_field(struct ctl_scsiio /*data*/ sks, SSD_ELEM_NONE); } +void +ctl_set_invalid_field_ciu(struct ctl_scsiio *ctsio) +{ + + /* "Invalid field in command information unit" */ + ctl_set_sense(ctsio, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_ABORTED_COMMAND, + /*ascq*/ 0x0E, + /*ascq*/ 0x03, + SSD_ELEM_NONE); +} void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio) Modified: stable/11/sys/cam/ctl/ctl_error.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_error.h Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_error.h Tue Feb 7 01:42:13 2017 (r313364) @@ -66,6 +66,7 @@ void ctl_set_overlapped_cmd(struct ctl_s void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag); void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command, int field, int bit_valid, int bit); +void ctl_set_invalid_field_ciu(struct ctl_scsiio *ctsio); void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio); void ctl_set_param_len_error(struct ctl_scsiio *ctsio); void ctl_set_already_locked(struct ctl_scsiio *ctsio); Modified: stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:42:13 2017 (r313364) @@ -300,7 +300,7 @@ cfcs_datamove(union ctl_io *io) struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; int cam_sg_count, ctl_sg_count, cam_sg_start; int cam_sg_offset; - int len_to_copy, len_copied; + int len_to_copy; int ctl_watermark, cam_watermark; int i, j; @@ -365,7 +365,6 @@ cfcs_datamove(union ctl_io *io) ctl_watermark = 0; cam_watermark = cam_sg_offset; - len_copied = 0; for (i = cam_sg_start, j = 0; i < cam_sg_count && j < ctl_sg_count;) { uint8_t *cam_ptr, *ctl_ptr; @@ -387,9 +386,6 @@ cfcs_datamove(union ctl_io *io) ctl_ptr = (uint8_t *)ctl_sglist[j].addr; ctl_ptr = ctl_ptr + ctl_watermark; - ctl_watermark += len_to_copy; - cam_watermark += len_to_copy; - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("%s: copying %d bytes to CAM\n", @@ -405,30 +401,22 @@ cfcs_datamove(union ctl_io *io) bcopy(cam_ptr, ctl_ptr, len_to_copy); } - len_copied += len_to_copy; + io->scsiio.ext_data_filled += len_to_copy; + io->scsiio.kern_data_resid -= len_to_copy; + cam_watermark += len_to_copy; if (cam_sglist[i].ds_len == cam_watermark) { i++; cam_watermark = 0; } + ctl_watermark += len_to_copy; if (ctl_sglist[j].len == ctl_watermark) { j++; ctl_watermark = 0; } } - io->scsiio.ext_data_filled += len_copied; - - /* - * Report write underflow as error, since CTL and backends don't - * really support it. - */ - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - j < ctl_sg_count) { - io->io_hdr.port_status = 43; - } else - if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; Modified: stable/11/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:42:13 2017 (r313364) @@ -138,7 +138,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio struct ctl_sg_entry ext_entry, kern_entry; int ext_sglen, ext_sg_entries, kern_sg_entries; int ext_sg_start, ext_offset; - int len_to_copy, len_copied; + int len_to_copy; int kern_watermark, ext_watermark; int ext_sglist_malloced; int i, j; @@ -150,7 +150,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio */ if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { ext_sglist_malloced = 0; - ctsio->ext_data_filled = ctsio->ext_data_len; + ctsio->ext_data_filled += ctsio->kern_data_len; + ctsio->kern_data_resid = 0; goto bailout; } @@ -204,7 +205,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_watermark = 0; ext_watermark = ext_offset; - len_copied = 0; for (i = ext_sg_start, j = 0; i < ext_sg_entries && j < kern_sg_entries;) { uint8_t *ext_ptr, *kern_ptr; @@ -226,9 +226,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_ptr = (uint8_t *)kern_sglist[j].addr; kern_ptr = kern_ptr + kern_watermark; - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " @@ -250,21 +247,22 @@ ctl_ioctl_do_datamove(struct ctl_scsiio } } - len_copied += len_to_copy; + ctsio->ext_data_filled += len_to_copy; + ctsio->kern_data_resid -= len_to_copy; + ext_watermark += len_to_copy; if (ext_sglist[i].len == ext_watermark) { i++; ext_watermark = 0; } + kern_watermark += len_to_copy; if (kern_sglist[j].len == kern_watermark) { j++; kern_watermark = 0; } } - ctsio->ext_data_filled += len_copied; - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_sg_entries: %d, " "kern_sg_entries: %d\n", ext_sg_entries, kern_sg_entries)); @@ -272,15 +270,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio "kern_data_len = %d\n", ctsio->ext_data_len, ctsio->kern_data_len)); - /* - * Report write underflow as error, since CTL and backends don't - * really support it. - */ - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - j < kern_sg_entries) { - ctsio->io_hdr.port_status = 43; - } - bailout: if (ext_sglist_malloced != 0) free(ext_sglist, M_CTL); Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:42:13 2017 (r313364) @@ -769,6 +769,7 @@ cfiscsi_handle_data_segment(struct icl_p cdw->cdw_sg_len -= copy_len; off += copy_len; io->scsiio.ext_data_filled += copy_len; + io->scsiio.kern_data_resid -= copy_len; if (cdw->cdw_sg_len == 0) { /* @@ -2505,6 +2506,7 @@ cfiscsi_datamove_in(union ctl_io *io) } sg_addr += len; sg_len -= len; + io->scsiio.kern_data_resid -= len; KASSERT(buffer_offset + response->ip_data_len <= expected_len, ("buffer_offset %zd + ip_data_len %zd > expected_len %zd", @@ -2590,7 +2592,7 @@ cfiscsi_datamove_out(union ctl_io *io) struct iscsi_bhs_r2t *bhsr2t; struct cfiscsi_data_wait *cdw; struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; - uint32_t expected_len, r2t_off, r2t_len; + uint32_t expected_len, datamove_len, r2t_off, r2t_len; uint32_t target_transfer_tag; bool done; @@ -2609,16 +2611,15 @@ cfiscsi_datamove_out(union ctl_io *io) PDU_TOTAL_TRANSFER_LEN(request) = io->scsiio.kern_total_len; /* - * Report write underflow as error since CTL and backends don't - * really support it, and SCSI does not tell how to do it right. + * Complete write underflow. Not a single byte to read. Return. */ expected_len = ntohl(bhssc->bhssc_expected_data_transfer_length); - if (io->scsiio.kern_rel_offset + io->scsiio.kern_data_len > - expected_len) { - io->scsiio.io_hdr.port_status = 43; + if (io->scsiio.kern_rel_offset >= expected_len) { io->scsiio.be_move_done(io); return; } + datamove_len = MIN(io->scsiio.kern_data_len, + expected_len - io->scsiio.kern_rel_offset); target_transfer_tag = atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); @@ -2641,7 +2642,7 @@ cfiscsi_datamove_out(union ctl_io *io) cdw->cdw_ctl_io = io; cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; - cdw->cdw_r2t_end = io->scsiio.kern_data_len; + cdw->cdw_r2t_end = datamove_len; cdw->cdw_datasn = 0; /* Set initial data pointer for the CDW respecting ext_data_filled. */ @@ -2650,7 +2651,7 @@ cfiscsi_datamove_out(union ctl_io *io) } else { ctl_sglist = &ctl_sg_entry; ctl_sglist->addr = io->scsiio.kern_data_ptr; - ctl_sglist->len = io->scsiio.kern_data_len; + ctl_sglist->len = datamove_len; } cdw->cdw_sg_index = 0; cdw->cdw_sg_addr = ctl_sglist[cdw->cdw_sg_index].addr; @@ -2681,7 +2682,7 @@ cfiscsi_datamove_out(union ctl_io *io) } r2t_off = io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled; - r2t_len = MIN(io->scsiio.kern_data_len - io->scsiio.ext_data_filled, + r2t_len = MIN(datamove_len - io->scsiio.ext_data_filled, cs->cs_max_burst_length); cdw->cdw_r2t_end = io->scsiio.ext_data_filled + r2t_len; Modified: stable/11/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:42:13 2017 (r313364) @@ -293,7 +293,6 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * 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; @@ -470,7 +469,6 @@ ctl_receive_copy_operating_parameters(st ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_operating_parameters_data *)ctsio->kern_data_ptr; @@ -568,7 +566,6 @@ ctl_receive_copy_status_lid1(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid1_data *)ctsio->kern_data_ptr; @@ -646,7 +643,6 @@ ctl_receive_copy_failure_details(struct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; @@ -718,7 +714,6 @@ ctl_receive_copy_status_lid4(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; @@ -1730,7 +1725,6 @@ ctl_extended_copy_lid1(struct ctl_scsiio 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; @@ -1885,7 +1879,6 @@ ctl_extended_copy_lid4(struct ctl_scsiio 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; @@ -2083,7 +2076,6 @@ ctl_populate_token(struct ctl_scsiio *ct 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; @@ -2247,7 +2239,6 @@ ctl_write_using_token(struct ctl_scsiio 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; @@ -2423,7 +2414,6 @@ ctl_receive_rod_token_information(struct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; @@ -2504,7 +2494,6 @@ ctl_report_all_rod_tokens(struct ctl_scs ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_all_rod_tokens_data *)ctsio->kern_data_ptr; Modified: stable/11/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:42:13 2017 (r313364) @@ -137,7 +137,7 @@ tpcl_datamove(union ctl_io *io) struct ctl_sg_entry ext_entry, kern_entry; int ext_sg_entries, kern_sg_entries; int ext_sg_start, ext_offset; - int len_to_copy, len_copied; + int len_to_copy; int kern_watermark, ext_watermark; struct ctl_scsiio *ctsio; int i, j; @@ -196,7 +196,6 @@ tpcl_datamove(union ctl_io *io) kern_watermark = 0; ext_watermark = ext_offset; - len_copied = 0; for (i = ext_sg_start, j = 0; i < ext_sg_entries && j < kern_sg_entries;) { uint8_t *ext_ptr, *kern_ptr; @@ -218,9 +217,6 @@ tpcl_datamove(union ctl_io *io) kern_ptr = (uint8_t *)kern_sglist[j].addr; kern_ptr = kern_ptr + kern_watermark; - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("%s: copying %d bytes to user\n", @@ -236,27 +232,27 @@ tpcl_datamove(union ctl_io *io) memcpy(kern_ptr, ext_ptr, len_to_copy); } - len_copied += len_to_copy; + ctsio->ext_data_filled += len_to_copy; + ctsio->kern_data_resid -= len_to_copy; + ext_watermark += len_to_copy; if (ext_sglist[i].len == ext_watermark) { i++; ext_watermark = 0; } + kern_watermark += len_to_copy; if (kern_sglist[j].len == kern_watermark) { j++; kern_watermark = 0; } } - ctsio->ext_data_filled += len_copied; - CTL_DEBUG_PRINT(("%s: ext_sg_entries: %d, kern_sg_entries: %d\n", __func__, ext_sg_entries, kern_sg_entries)); CTL_DEBUG_PRINT(("%s: ext_data_len = %d, kern_data_len = %d\n", __func__, ctsio->ext_data_len, ctsio->kern_data_len)); - /* XXX KDM set residual?? */ bailout: io->scsiio.be_move_done(io); } Modified: stable/11/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/11/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:39:25 2017 (r313363) +++ stable/11/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:42:13 2017 (r313364) @@ -721,15 +721,18 @@ ctlfedata(struct ctlfe_lun_softc *softc, idx = cmd_info->cur_transfer_index; off = cmd_info->cur_transfer_off; cmd_info->flags &= ~CTLFE_CMD_PIECEWISE; - if (io->scsiio.kern_sg_entries == 0) { - /* No S/G list. */ + if (io->scsiio.kern_sg_entries == 0) { /* No S/G list. */ + + /* One time shift for SRR offset. */ + off += io->scsiio.ext_data_filled; + io->scsiio.ext_data_filled = 0; + *data_ptr = io->scsiio.kern_data_ptr + off; if (io->scsiio.kern_data_len - off <= bus_softc->maxio) { *dxfer_len = io->scsiio.kern_data_len - off; } else { *dxfer_len = bus_softc->maxio; - cmd_info->cur_transfer_index = -1; - cmd_info->cur_transfer_off = bus_softc->maxio; + cmd_info->cur_transfer_off += bus_softc->maxio; cmd_info->flags |= CTLFE_CMD_PIECEWISE; } *sglist_cnt = 0; @@ -738,9 +741,18 @@ ctlfedata(struct ctlfe_lun_softc *softc, *flags |= CAM_DATA_PADDR; else *flags |= CAM_DATA_VADDR; - } else { - /* S/G list with physical or virtual pointers. */ + } else { /* S/G list with physical or virtual pointers. */ ctl_sglist = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; + + /* One time shift for SRR offset. */ + while (io->scsiio.ext_data_filled >= ctl_sglist[idx].len - off) { + io->scsiio.ext_data_filled -= ctl_sglist[idx].len - off; + idx++; + off = 0; + } + off += io->scsiio.ext_data_filled; + io->scsiio.ext_data_filled = 0; + cam_sglist = cmd_info->cam_sglist; *dxfer_len = 0; for (i = 0; i < io->scsiio.kern_sg_entries - idx; i++) { @@ -818,18 +830,8 @@ ctlfestart(struct cam_periph *periph, un /* * Datamove call, we need to setup the S/G list. */ - scsi_status = 0; - csio->cdb_len = atio->cdb_len; ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, &csio->sglist_cnt); - io->scsiio.ext_data_filled += dxfer_len; - if (io->scsiio.ext_data_filled > io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "fill len %u > total %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_filled, - io->scsiio.kern_total_len); - } } else { /* * We're done, send status back. @@ -891,8 +893,8 @@ ctlfestart(struct cam_periph *periph, un data_ptr = NULL; dxfer_len = 0; csio->sglist_cnt = 0; - scsi_status = 0; } + scsi_status = 0; if ((io->io_hdr.flags & CTL_FLAG_STATUS_QUEUED) && (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || @@ -1246,13 +1248,36 @@ ctlfedone(struct cam_periph *periph, uni | (done_ccb->csio.msg_ptr[6]); } + /* + * If we have an SRR and we're still sending data, we + * should be able to adjust offsets and cycle again. + * It is possible only if offset is from this datamove. + */ + if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) && + srr_off >= io->scsiio.kern_rel_offset && + srr_off < io->scsiio.kern_rel_offset + + io->scsiio.kern_data_len) { + io->scsiio.kern_data_resid = + io->scsiio.kern_rel_offset + + io->scsiio.kern_data_len - srr_off; + io->scsiio.ext_data_filled = srr_off; + io->scsiio.io_hdr.status = CTL_STATUS_NONE; + io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED; + softc->ccbs_freed++; + xpt_release_ccb(done_ccb); + TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, + periph_links.tqe); + xpt_schedule(periph, /*priority*/ 1); + break; + } + + /* + * If status was being sent, the back end data is now history. + * Hack it up and resubmit a new command with the CDB adjusted. + * If the SIM does the right thing, all of the resid math + * should work. + */ if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { - /* - * If status was being sent, the back end data is now - * history. Hack it up and resubmit a new command with - * the CDB adjusted. If the SIM does the right thing, - * all of the resid math should work. - */ softc->ccbs_freed++; xpt_release_ccb(done_ccb); if (ctlfe_adjust_cdb(atio, srr_off) == 0) { @@ -1262,22 +1287,6 @@ ctlfedone(struct cam_periph *periph, uni /* * Fall through to doom.... */ - } else if (srr) { - /* - * If we have an srr and we're still sending data, we - * should be able to adjust offsets and cycle again. - */ - io->scsiio.kern_rel_offset = - io->scsiio.ext_data_filled = srr_off; - io->scsiio.ext_data_len = io->scsiio.kern_total_len - - io->scsiio.kern_rel_offset; - softc->ccbs_freed++; - io->scsiio.io_hdr.status = CTL_STATUS_NONE; - xpt_release_ccb(done_ccb); - TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, - periph_links.tqe); - xpt_schedule(periph, /*priority*/ 1); - break; } if ((done_ccb->ccb_h.flags & CAM_SEND_STATUS) && @@ -1320,16 +1329,6 @@ ctlfedone(struct cam_periph *periph, uni io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; - io->scsiio.ext_data_len += csio->dxfer_len; - if (io->scsiio.ext_data_len > - io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "done len %u > total %u sent %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_len, - io->scsiio.kern_total_len, - io->scsiio.ext_data_filled); - } /* * Translate CAM status to CTL status. Success * does not change the overall, ctl_io status. In @@ -1339,6 +1338,7 @@ ctlfedone(struct cam_periph *periph, uni */ switch (done_ccb->ccb_h.status & CAM_STATUS_MASK) { case CAM_REQ_CMP: + io->scsiio.kern_data_resid -= csio->dxfer_len; io->io_hdr.port_status = 0; break; default: @@ -1368,7 +1368,6 @@ ctlfedone(struct cam_periph *periph, uni if ((cmd_info->flags & CTLFE_CMD_PIECEWISE) && (io->io_hdr.port_status == 0)) { ccb_flags flags; - uint8_t scsi_status; uint8_t *data_ptr; uint32_t dxfer_len; @@ -1379,8 +1378,6 @@ ctlfedone(struct cam_periph *periph, uni ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, &csio->sglist_cnt); - scsi_status = 0; - if (((flags & CAM_SEND_STATUS) == 0) && (dxfer_len == 0)) { printf("%s: tag %04x no status or " @@ -1400,7 +1397,7 @@ ctlfedone(struct cam_periph *periph, uni MSG_SIMPLE_Q_TAG : 0, atio->tag_id, atio->init_id, - scsi_status, + 0, /*data_ptr*/ data_ptr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 7 01:42:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CE72CD3DF3; Tue, 7 Feb 2017 01:42:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 114F1192C; Tue, 7 Feb 2017 01:42:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171gted095226; Tue, 7 Feb 2017 01:42:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171gsa0095213; Tue, 7 Feb 2017 01:42:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070142.v171gsa0095213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:42: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: r313365 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:42:56 -0000 Author: mav Date: Tue Feb 7 01:42:53 2017 New Revision: 313365 URL: https://svnweb.freebsd.org/changeset/base/313365 Log: MFC r312291, r312669: Make CTL frontends report kern_data_resid for under-/overruns. It seems like kern_data_resid was never really implemented. This change finally does it. Now frontends update this field while transferring data, while CTL/backends getting it can more flexibly handle the result. At this point behavior should not change significantly, still reporting errors on write overrun, but that may be changed later, if we decide so. CAM target frontend still does not properly handle overruns due to CAM API limitations. We may need to add some fields to struct ccb_accept_tio to pass information about initiator requested transfer size(s). Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_tpc.c stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/cam/ctl/scsi_ctl.c stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl.c Tue Feb 7 01:42:53 2017 (r313365) @@ -5044,18 +5044,13 @@ ctl_config_move_done(union ctl_io *io) if ((io->io_hdr.port_status != 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } if (ctl_debug & CTL_DEBUG_CDB_DATA) @@ -5453,7 +5448,6 @@ ctl_format(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK); ctsio->kern_data_len = length; ctsio->kern_total_len = length; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -5579,7 +5573,6 @@ ctl_read_buffer(struct ctl_scsiio *ctsio } 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; ctl_set_success(ctsio); @@ -5625,7 +5618,6 @@ ctl_write_buffer(struct ctl_scsiio *ctsi ctsio->kern_data_ptr = lun->write_buffer + buffer_offset; 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; @@ -5733,7 +5725,6 @@ ctl_write_same(struct ctl_scsiio *ctsio) 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; @@ -5779,7 +5770,6 @@ ctl_unmap(struct ctl_scsiio *ctsio) 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; @@ -6269,7 +6259,6 @@ ctl_mode_select(struct ctl_scsiio *ctsio ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK); ctsio->kern_data_len = param_len; ctsio->kern_total_len = param_len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -6499,7 +6488,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (total_len < alloc_len) { ctsio->residual = alloc_len - total_len; @@ -6852,7 +6840,6 @@ ctl_log_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (total_len < alloc_len) { ctsio->residual = alloc_len - total_len; @@ -6920,7 +6907,6 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->residual = 0; ctsio->kern_data_len = sizeof(*data); ctsio->kern_total_len = sizeof(*data); - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -6986,7 +6972,6 @@ ctl_read_capacity_16(struct ctl_scsiio * 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; @@ -7041,7 +7026,6 @@ ctl_get_lba_status(struct ctl_scsiio *ct 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; @@ -7103,7 +7087,6 @@ ctl_read_defect(struct ctl_scsiio *ctsio 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; @@ -7202,7 +7185,6 @@ ctl_report_tagret_port_groups(struct ctl ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (ext) { @@ -7403,7 +7385,6 @@ ctl_report_supported_opcodes(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; switch (cdb->options & RSO_OPTIONS_MASK) { @@ -7517,7 +7498,6 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_ext_data *)ctsio->kern_data_ptr; @@ -7565,7 +7545,6 @@ ctl_report_timestamp(struct ctl_scsiio * ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; @@ -7638,7 +7617,6 @@ retry: ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -8216,7 +8194,6 @@ ctl_persistent_reserve_out(struct ctl_sc ctsio->kern_data_ptr = malloc(param_len, M_CTL, M_WAITOK); ctsio->kern_data_len = param_len; ctsio->kern_total_len = param_len; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -9198,7 +9175,6 @@ ctl_report_luns(struct ctl_scsiio *ctsio 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; @@ -9261,7 +9237,6 @@ ctl_request_sense(struct ctl_scsiio *cts ctsio->kern_data_len = cdb->length; ctsio->kern_total_len = cdb->length; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; @@ -9400,7 +9375,6 @@ ctl_inquiry_evpd_supported(struct ctl_sc 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; @@ -9469,7 +9443,6 @@ ctl_inquiry_evpd_serial(struct ctl_scsii 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; @@ -9528,7 +9501,6 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * 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; @@ -9604,7 +9576,6 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * 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; @@ -9669,7 +9640,6 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio 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; @@ -9798,7 +9768,6 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s 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; @@ -9874,7 +9843,6 @@ ctl_inquiry_evpd_block_limits(struct ctl 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; @@ -9950,7 +9918,6 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * 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; @@ -10007,7 +9974,6 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * 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; @@ -10142,7 +10108,6 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10370,7 +10335,6 @@ ctl_get_config(struct ctl_scsiio *ctsio) sizeof(struct scsi_get_config_feature) + 4; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; hdr = (struct scsi_get_config_header *)ctsio->kern_data_ptr; @@ -10576,7 +10540,6 @@ ctl_get_event_status(struct ctl_scsiio * data_len = sizeof(struct scsi_get_event_status_header); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10614,7 +10577,6 @@ ctl_mechanism_status(struct ctl_scsiio * data_len = sizeof(struct scsi_mechanism_status_header); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -10674,7 +10636,6 @@ ctl_read_toc(struct ctl_scsiio *ctsio) data_len += sizeof(struct scsi_read_toc_type01_descr); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; if (data_len < alloc_len) { @@ -12576,6 +12537,9 @@ ctl_datamove(union ctl_io *io) CTL_DEBUG_PRINT(("ctl_datamove\n")); + /* No data transferred yet. Frontend must update this when done. */ + io->scsiio.kern_data_resid = io->scsiio.kern_data_len; + #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { char str[256]; Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:42:53 2017 (r313365) @@ -422,6 +422,16 @@ ctl_be_block_move_done(union ctl_io *io) */ if (io->io_hdr.flags & CTL_FLAG_ABORT) { ; + } else if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { lbalen = ARGS(beio->io); @@ -431,21 +441,6 @@ ctl_be_block_move_done(union ctl_io *io) /* We have two data blocks ready for comparison. */ ctl_be_block_compare(io); } - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); } /* @@ -1637,7 +1632,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc else io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs; io->scsiio.kern_data_len = beio->io_len; - io->scsiio.kern_data_resid = 0; io->scsiio.kern_sg_entries = beio->num_segs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:42:53 2017 (r313365) @@ -231,6 +231,16 @@ ctl_backend_ramdisk_move_done(union ctl_ io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; if (io->io_hdr.flags & CTL_FLAG_ABORT) { ; + } else if (io->io_hdr.port_status != 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { @@ -243,21 +253,6 @@ ctl_backend_ramdisk_move_done(union ctl_ return (0); } ctl_set_success(&io->scsiio); - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - /* - * For hardware error sense keys, the sense key - * specific value is defined to be a retry count, - * but we use it to pass back an internal FETD - * error code. XXX KDM Hopefully the FETD is only - * using 16 bits for an error code, since that's - * all the space we have in the sks field. - */ - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ - io->io_hdr.port_status); } ctl_data_submit_done(io); return(0); @@ -318,7 +313,6 @@ ctl_backend_ramdisk_continue(union ctl_i #endif /* CTL_RAMDISK_PAGES */ io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_data_resid = 0; io->scsiio.kern_data_len = len_filled; io->scsiio.kern_sg_entries = sg_filled; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_error.c Tue Feb 7 01:42:53 2017 (r313365) @@ -641,6 +641,18 @@ ctl_set_invalid_field(struct ctl_scsiio /*data*/ sks, SSD_ELEM_NONE); } +void +ctl_set_invalid_field_ciu(struct ctl_scsiio *ctsio) +{ + + /* "Invalid field in command information unit" */ + ctl_set_sense(ctsio, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_ABORTED_COMMAND, + /*ascq*/ 0x0E, + /*ascq*/ 0x03, + SSD_ELEM_NONE); +} void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio) Modified: stable/10/sys/cam/ctl/ctl_error.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.h Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_error.h Tue Feb 7 01:42:53 2017 (r313365) @@ -66,6 +66,7 @@ void ctl_set_overlapped_cmd(struct ctl_s void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag); void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command, int field, int bit_valid, int bit); +void ctl_set_invalid_field_ciu(struct ctl_scsiio *ctsio); void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio); void ctl_set_param_len_error(struct ctl_scsiio *ctsio); void ctl_set_already_locked(struct ctl_scsiio *ctsio); Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:42:53 2017 (r313365) @@ -300,7 +300,7 @@ cfcs_datamove(union ctl_io *io) struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; int cam_sg_count, ctl_sg_count, cam_sg_start; int cam_sg_offset; - int len_to_copy, len_copied; + int len_to_copy; int ctl_watermark, cam_watermark; int i, j; @@ -365,7 +365,6 @@ cfcs_datamove(union ctl_io *io) ctl_watermark = 0; cam_watermark = cam_sg_offset; - len_copied = 0; for (i = cam_sg_start, j = 0; i < cam_sg_count && j < ctl_sg_count;) { uint8_t *cam_ptr, *ctl_ptr; @@ -387,9 +386,6 @@ cfcs_datamove(union ctl_io *io) ctl_ptr = (uint8_t *)ctl_sglist[j].addr; ctl_ptr = ctl_ptr + ctl_watermark; - ctl_watermark += len_to_copy; - cam_watermark += len_to_copy; - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("%s: copying %d bytes to CAM\n", @@ -405,30 +401,22 @@ cfcs_datamove(union ctl_io *io) bcopy(cam_ptr, ctl_ptr, len_to_copy); } - len_copied += len_to_copy; + io->scsiio.ext_data_filled += len_to_copy; + io->scsiio.kern_data_resid -= len_to_copy; + cam_watermark += len_to_copy; if (cam_sglist[i].ds_len == cam_watermark) { i++; cam_watermark = 0; } + ctl_watermark += len_to_copy; if (ctl_sglist[j].len == ctl_watermark) { j++; ctl_watermark = 0; } } - io->scsiio.ext_data_filled += len_copied; - - /* - * Report write underflow as error, since CTL and backends don't - * really support it. - */ - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - j < ctl_sg_count) { - io->io_hdr.port_status = 43; - } else - if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:42:53 2017 (r313365) @@ -138,7 +138,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio struct ctl_sg_entry ext_entry, kern_entry; int ext_sglen, ext_sg_entries, kern_sg_entries; int ext_sg_start, ext_offset; - int len_to_copy, len_copied; + int len_to_copy; int kern_watermark, ext_watermark; int ext_sglist_malloced; int i, j; @@ -150,7 +150,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio */ if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { ext_sglist_malloced = 0; - ctsio->ext_data_filled = ctsio->ext_data_len; + ctsio->ext_data_filled += ctsio->kern_data_len; + ctsio->kern_data_resid = 0; goto bailout; } @@ -204,7 +205,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_watermark = 0; ext_watermark = ext_offset; - len_copied = 0; for (i = ext_sg_start, j = 0; i < ext_sg_entries && j < kern_sg_entries;) { uint8_t *ext_ptr, *kern_ptr; @@ -226,9 +226,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio kern_ptr = (uint8_t *)kern_sglist[j].addr; kern_ptr = kern_ptr + kern_watermark; - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " @@ -250,21 +247,22 @@ ctl_ioctl_do_datamove(struct ctl_scsiio } } - len_copied += len_to_copy; + ctsio->ext_data_filled += len_to_copy; + ctsio->kern_data_resid -= len_to_copy; + ext_watermark += len_to_copy; if (ext_sglist[i].len == ext_watermark) { i++; ext_watermark = 0; } + kern_watermark += len_to_copy; if (kern_sglist[j].len == kern_watermark) { j++; kern_watermark = 0; } } - ctsio->ext_data_filled += len_copied; - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_sg_entries: %d, " "kern_sg_entries: %d\n", ext_sg_entries, kern_sg_entries)); @@ -272,15 +270,6 @@ ctl_ioctl_do_datamove(struct ctl_scsiio "kern_data_len = %d\n", ctsio->ext_data_len, ctsio->kern_data_len)); - /* - * Report write underflow as error, since CTL and backends don't - * really support it. - */ - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - j < kern_sg_entries) { - ctsio->io_hdr.port_status = 43; - } - bailout: if (ext_sglist_malloced != 0) free(ext_sglist, M_CTL); Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:42:53 2017 (r313365) @@ -765,6 +765,7 @@ cfiscsi_handle_data_segment(struct icl_p cdw->cdw_sg_len -= copy_len; off += copy_len; io->scsiio.ext_data_filled += copy_len; + io->scsiio.kern_data_resid -= copy_len; if (cdw->cdw_sg_len == 0) { /* @@ -2426,6 +2427,7 @@ cfiscsi_datamove_in(union ctl_io *io) } sg_addr += len; sg_len -= len; + io->scsiio.kern_data_resid -= len; KASSERT(buffer_offset + response->ip_data_len <= expected_len, ("buffer_offset %zd + ip_data_len %zd > expected_len %zd", @@ -2511,7 +2513,7 @@ cfiscsi_datamove_out(union ctl_io *io) struct iscsi_bhs_r2t *bhsr2t; struct cfiscsi_data_wait *cdw; struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; - uint32_t expected_len, r2t_off, r2t_len; + uint32_t expected_len, datamove_len, r2t_off, r2t_len; uint32_t target_transfer_tag; bool done; @@ -2530,16 +2532,15 @@ cfiscsi_datamove_out(union ctl_io *io) PDU_TOTAL_TRANSFER_LEN(request) = io->scsiio.kern_total_len; /* - * Report write underflow as error since CTL and backends don't - * really support it, and SCSI does not tell how to do it right. + * Complete write underflow. Not a single byte to read. Return. */ expected_len = ntohl(bhssc->bhssc_expected_data_transfer_length); - if (io->scsiio.kern_rel_offset + io->scsiio.kern_data_len > - expected_len) { - io->scsiio.io_hdr.port_status = 43; + if (io->scsiio.kern_rel_offset >= expected_len) { io->scsiio.be_move_done(io); return; } + datamove_len = MIN(io->scsiio.kern_data_len, + expected_len - io->scsiio.kern_rel_offset); target_transfer_tag = atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); @@ -2561,7 +2562,7 @@ cfiscsi_datamove_out(union ctl_io *io) cdw->cdw_ctl_io = io; cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; - cdw->cdw_r2t_end = io->scsiio.kern_data_len; + cdw->cdw_r2t_end = datamove_len; cdw->cdw_datasn = 0; /* Set initial data pointer for the CDW respecting ext_data_filled. */ @@ -2570,7 +2571,7 @@ cfiscsi_datamove_out(union ctl_io *io) } else { ctl_sglist = &ctl_sg_entry; ctl_sglist->addr = io->scsiio.kern_data_ptr; - ctl_sglist->len = io->scsiio.kern_data_len; + ctl_sglist->len = datamove_len; } cdw->cdw_sg_index = 0; cdw->cdw_sg_addr = ctl_sglist[cdw->cdw_sg_index].addr; @@ -2601,7 +2602,7 @@ cfiscsi_datamove_out(union ctl_io *io) } r2t_off = io->scsiio.kern_rel_offset + io->scsiio.ext_data_filled; - r2t_len = MIN(io->scsiio.kern_data_len - io->scsiio.ext_data_filled, + r2t_len = MIN(datamove_len - io->scsiio.ext_data_filled, cs->cs_max_burst_length); cdw->cdw_r2t_end = io->scsiio.ext_data_filled + r2t_len; Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:42:53 2017 (r313365) @@ -293,7 +293,6 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * 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; @@ -470,7 +469,6 @@ ctl_receive_copy_operating_parameters(st ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_operating_parameters_data *)ctsio->kern_data_ptr; @@ -568,7 +566,6 @@ ctl_receive_copy_status_lid1(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid1_data *)ctsio->kern_data_ptr; @@ -646,7 +643,6 @@ ctl_receive_copy_failure_details(struct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; @@ -718,7 +714,6 @@ ctl_receive_copy_status_lid4(struct ctl_ ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; @@ -1730,7 +1725,6 @@ ctl_extended_copy_lid1(struct ctl_scsiio 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; @@ -1885,7 +1879,6 @@ ctl_extended_copy_lid4(struct ctl_scsiio 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; @@ -2083,7 +2076,6 @@ ctl_populate_token(struct ctl_scsiio *ct 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; @@ -2247,7 +2239,6 @@ ctl_write_using_token(struct ctl_scsiio 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; @@ -2423,7 +2414,6 @@ ctl_receive_rod_token_information(struct ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; @@ -2504,7 +2494,6 @@ ctl_report_all_rod_tokens(struct ctl_scs ctsio->kern_data_len = alloc_len; ctsio->kern_total_len = alloc_len; } - ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; data = (struct scsi_report_all_rod_tokens_data *)ctsio->kern_data_ptr; Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:42:53 2017 (r313365) @@ -137,7 +137,7 @@ tpcl_datamove(union ctl_io *io) struct ctl_sg_entry ext_entry, kern_entry; int ext_sg_entries, kern_sg_entries; int ext_sg_start, ext_offset; - int len_to_copy, len_copied; + int len_to_copy; int kern_watermark, ext_watermark; struct ctl_scsiio *ctsio; int i, j; @@ -196,7 +196,6 @@ tpcl_datamove(union ctl_io *io) kern_watermark = 0; ext_watermark = ext_offset; - len_copied = 0; for (i = ext_sg_start, j = 0; i < ext_sg_entries && j < kern_sg_entries;) { uint8_t *ext_ptr, *kern_ptr; @@ -218,9 +217,6 @@ tpcl_datamove(union ctl_io *io) kern_ptr = (uint8_t *)kern_sglist[j].addr; kern_ptr = kern_ptr + kern_watermark; - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { CTL_DEBUG_PRINT(("%s: copying %d bytes to user\n", @@ -236,27 +232,27 @@ tpcl_datamove(union ctl_io *io) memcpy(kern_ptr, ext_ptr, len_to_copy); } - len_copied += len_to_copy; + ctsio->ext_data_filled += len_to_copy; + ctsio->kern_data_resid -= len_to_copy; + ext_watermark += len_to_copy; if (ext_sglist[i].len == ext_watermark) { i++; ext_watermark = 0; } + kern_watermark += len_to_copy; if (kern_sglist[j].len == kern_watermark) { j++; kern_watermark = 0; } } - ctsio->ext_data_filled += len_copied; - CTL_DEBUG_PRINT(("%s: ext_sg_entries: %d, kern_sg_entries: %d\n", __func__, ext_sg_entries, kern_sg_entries)); CTL_DEBUG_PRINT(("%s: ext_data_len = %d, kern_data_len = %d\n", __func__, ctsio->ext_data_len, ctsio->kern_data_len)); - /* XXX KDM set residual?? */ bailout: io->scsiio.be_move_done(io); } Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:42:13 2017 (r313364) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:42:53 2017 (r313365) @@ -721,15 +721,18 @@ ctlfedata(struct ctlfe_lun_softc *softc, idx = cmd_info->cur_transfer_index; off = cmd_info->cur_transfer_off; cmd_info->flags &= ~CTLFE_CMD_PIECEWISE; - if (io->scsiio.kern_sg_entries == 0) { - /* No S/G list. */ + if (io->scsiio.kern_sg_entries == 0) { /* No S/G list. */ + + /* One time shift for SRR offset. */ + off += io->scsiio.ext_data_filled; + io->scsiio.ext_data_filled = 0; + *data_ptr = io->scsiio.kern_data_ptr + off; if (io->scsiio.kern_data_len - off <= bus_softc->maxio) { *dxfer_len = io->scsiio.kern_data_len - off; } else { *dxfer_len = bus_softc->maxio; - cmd_info->cur_transfer_index = -1; - cmd_info->cur_transfer_off = bus_softc->maxio; + cmd_info->cur_transfer_off += bus_softc->maxio; cmd_info->flags |= CTLFE_CMD_PIECEWISE; } *sglist_cnt = 0; @@ -738,9 +741,18 @@ ctlfedata(struct ctlfe_lun_softc *softc, *flags |= CAM_DATA_PADDR; else *flags |= CAM_DATA_VADDR; - } else { - /* S/G list with physical or virtual pointers. */ + } else { /* S/G list with physical or virtual pointers. */ ctl_sglist = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; + + /* One time shift for SRR offset. */ + while (io->scsiio.ext_data_filled >= ctl_sglist[idx].len - off) { + io->scsiio.ext_data_filled -= ctl_sglist[idx].len - off; + idx++; + off = 0; + } + off += io->scsiio.ext_data_filled; + io->scsiio.ext_data_filled = 0; + cam_sglist = cmd_info->cam_sglist; *dxfer_len = 0; for (i = 0; i < io->scsiio.kern_sg_entries - idx; i++) { @@ -818,18 +830,8 @@ ctlfestart(struct cam_periph *periph, un /* * Datamove call, we need to setup the S/G list. */ - scsi_status = 0; - csio->cdb_len = atio->cdb_len; ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, &csio->sglist_cnt); - io->scsiio.ext_data_filled += dxfer_len; - if (io->scsiio.ext_data_filled > io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "fill len %u > total %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_filled, - io->scsiio.kern_total_len); - } } else { /* * We're done, send status back. @@ -891,8 +893,8 @@ ctlfestart(struct cam_periph *periph, un data_ptr = NULL; dxfer_len = 0; csio->sglist_cnt = 0; - scsi_status = 0; } + scsi_status = 0; if ((io->io_hdr.flags & CTL_FLAG_STATUS_QUEUED) && (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || @@ -1246,13 +1248,36 @@ ctlfedone(struct cam_periph *periph, uni | (done_ccb->csio.msg_ptr[6]); } + /* + * If we have an SRR and we're still sending data, we + * should be able to adjust offsets and cycle again. + * It is possible only if offset is from this datamove. + */ + if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) && + srr_off >= io->scsiio.kern_rel_offset && + srr_off < io->scsiio.kern_rel_offset + + io->scsiio.kern_data_len) { + io->scsiio.kern_data_resid = + io->scsiio.kern_rel_offset + + io->scsiio.kern_data_len - srr_off; + io->scsiio.ext_data_filled = srr_off; + io->scsiio.io_hdr.status = CTL_STATUS_NONE; + io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED; + softc->ccbs_freed++; + xpt_release_ccb(done_ccb); + TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, + periph_links.tqe); + xpt_schedule(periph, /*priority*/ 1); + break; + } + + /* + * If status was being sent, the back end data is now history. + * Hack it up and resubmit a new command with the CDB adjusted. + * If the SIM does the right thing, all of the resid math + * should work. + */ if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { - /* - * If status was being sent, the back end data is now - * history. Hack it up and resubmit a new command with - * the CDB adjusted. If the SIM does the right thing, - * all of the resid math should work. - */ softc->ccbs_freed++; xpt_release_ccb(done_ccb); if (ctlfe_adjust_cdb(atio, srr_off) == 0) { @@ -1262,22 +1287,6 @@ ctlfedone(struct cam_periph *periph, uni /* * Fall through to doom.... */ - } else if (srr) { - /* - * If we have an srr and we're still sending data, we - * should be able to adjust offsets and cycle again. - */ - io->scsiio.kern_rel_offset = - io->scsiio.ext_data_filled = srr_off; - io->scsiio.ext_data_len = io->scsiio.kern_total_len - - io->scsiio.kern_rel_offset; - softc->ccbs_freed++; - io->scsiio.io_hdr.status = CTL_STATUS_NONE; - xpt_release_ccb(done_ccb); - TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, - periph_links.tqe); - xpt_schedule(periph, /*priority*/ 1); - break; } if ((done_ccb->ccb_h.flags & CAM_SEND_STATUS) && @@ -1320,16 +1329,6 @@ ctlfedone(struct cam_periph *periph, uni io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; - io->scsiio.ext_data_len += csio->dxfer_len; - if (io->scsiio.ext_data_len > - io->scsiio.kern_total_len) { - xpt_print(periph->path, "%s: tag 0x%04x " - "done len %u > total %u sent %u\n", - __func__, io->scsiio.tag_num, - io->scsiio.ext_data_len, - io->scsiio.kern_total_len, - io->scsiio.ext_data_filled); - } /* * Translate CAM status to CTL status. Success * does not change the overall, ctl_io status. In @@ -1339,6 +1338,7 @@ ctlfedone(struct cam_periph *periph, uni */ switch (done_ccb->ccb_h.status & CAM_STATUS_MASK) { case CAM_REQ_CMP: + io->scsiio.kern_data_resid -= csio->dxfer_len; io->io_hdr.port_status = 0; break; default: @@ -1368,7 +1368,6 @@ ctlfedone(struct cam_periph *periph, uni if ((cmd_info->flags & CTLFE_CMD_PIECEWISE) && (io->io_hdr.port_status == 0)) { ccb_flags flags; - uint8_t scsi_status; uint8_t *data_ptr; uint32_t dxfer_len; @@ -1379,8 +1378,6 @@ ctlfedone(struct cam_periph *periph, uni ctlfedata(softc, io, &flags, &data_ptr, &dxfer_len, &csio->sglist_cnt); - scsi_status = 0; - if (((flags & CAM_SEND_STATUS) == 0) && (dxfer_len == 0)) { printf("%s: tag %04x no status or " @@ -1400,7 +1397,7 @@ ctlfedone(struct cam_periph *periph, uni MSG_SIMPLE_Q_TAG : 0, atio->tag_id, atio->init_id, - scsi_status, + 0, /*data_ptr*/ data_ptr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 7 01:43:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0882CD3EEF; Tue, 7 Feb 2017 01:43:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EF451AB5; Tue, 7 Feb 2017 01:43:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171hj5T095315; Tue, 7 Feb 2017 01:43:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171hjRd095312; Tue, 7 Feb 2017 01:43:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070143.v171hjRd095312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313366 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:43:46 -0000 Author: mav Date: Tue Feb 7 01:43:45 2017 New Revision: 313366 URL: https://svnweb.freebsd.org/changeset/base/313366 Log: MFC r312348: Remove writing 'residual' field of struct ctl_scsiio. This field has no practical use and never readed. Initiators already receive respective residual size from frontends. Removed field had different semantics, which looks useless, and was never passed through by any frontend. While there, fix kern_data_resid field support in case of HA, missed in r312291. Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/ctl/ctl_io.h stable/11/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Tue Feb 7 01:42:53 2017 (r313365) +++ stable/11/sys/cam/ctl/ctl.c Tue Feb 7 01:43:45 2017 (r313366) @@ -696,8 +696,6 @@ ctl_ha_done(union ctl_io *io) msg.scsi.tag_num = io->scsiio.tag_num; msg.scsi.tag_type = io->scsiio.tag_type; msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.residual = io->scsiio.residual; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, @@ -725,8 +723,6 @@ ctl_isc_handler_finish_xfer(struct ctl_s ctsio->io_hdr.status = msg_info->hdr.status; ctsio->scsi_status = msg_info->scsi.scsi_status; ctsio->sense_len = msg_info->scsi.sense_len; - ctsio->sense_residual = msg_info->scsi.sense_residual; - ctsio->residual = msg_info->scsi.residual; memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, msg_info->scsi.sense_len); ctl_enqueue_isc((union ctl_io *)ctsio); @@ -1495,13 +1491,12 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE; io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; - io->io_hdr.port_status = msg->scsi.fetd_status; - io->scsiio.residual = msg->scsi.residual; + io->io_hdr.port_status = msg->scsi.port_status; + io->scsiio.kern_data_resid = msg->scsi.kern_data_resid; if (msg->hdr.status != CTL_STATUS_NONE) { io->io_hdr.status = msg->hdr.status; io->scsiio.scsi_status = msg->scsi.scsi_status; io->scsiio.sense_len = msg->scsi.sense_len; - io->scsiio.sense_residual =msg->scsi.sense_residual; memcpy(&io->scsiio.sense_data, &msg->scsi.sense_data, msg->scsi.sense_len); @@ -6498,15 +6493,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; switch (ctsio->cdb[0]) { case MODE_SENSE_6: { @@ -6850,15 +6838,8 @@ ctl_log_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; header = (struct scsi_log_header *)ctsio->kern_data_ptr; header->page = page_index->page_code; @@ -6913,7 +6894,6 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_read_capacity_data *)ctsio->kern_data_ptr; - ctsio->residual = 0; ctsio->kern_data_len = sizeof(*data); ctsio->kern_total_len = sizeof(*data); ctsio->kern_rel_offset = 0; @@ -6971,18 +6951,10 @@ ctl_read_capacity_16(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_read_capacity_data_long *)ctsio->kern_data_ptr; - - if (sizeof(*data) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*data); - ctsio->kern_data_len = sizeof(*data); - ctsio->kern_total_len = sizeof(*data); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*data), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ @@ -7025,18 +6997,10 @@ ctl_get_lba_status(struct ctl_scsiio *ct total_len = sizeof(*data) + sizeof(data->descr[0]); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_get_lba_status_data *)ctsio->kern_data_ptr; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* Fill dummy data in case backend can't tell anything. */ scsi_ulto4b(4 + sizeof(data->descr[0]), data->length); @@ -7087,17 +7051,10 @@ ctl_read_defect(struct ctl_scsiio *ctsio } ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { data10 = (struct scsi_read_defect_data_hdr_10 *) @@ -7182,19 +7139,10 @@ ctl_report_tagret_port_groups(struct ctl alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (ext) { rtg_ext_ptr = (struct scsi_target_group_data_extended *) @@ -7382,19 +7330,10 @@ ctl_report_supported_opcodes(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; switch (cdb->options & RSO_OPTIONS_MASK) { case RSO_OPTIONS_ALL: @@ -7495,19 +7434,10 @@ ctl_report_supported_tmf(struct ctl_scsi alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_supported_tmf_ext_data *)ctsio->kern_data_ptr; data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_QTS | @@ -7542,19 +7472,10 @@ ctl_report_timestamp(struct ctl_scsiio * alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; scsi_ulto2b(sizeof(*data) - 2, data->length); @@ -7615,19 +7536,10 @@ retry: mtx_unlock(&lun->lun_lock); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } - ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; mtx_lock(&lun->lun_lock); switch (cdb->action) { @@ -9174,18 +9086,10 @@ ctl_report_luns(struct ctl_scsiio *ctsio */ lun_datalen = sizeof(*lun_data) + (num_filled * sizeof(struct scsi_report_luns_lundata)); - - if (lun_datalen < alloc_len) { - ctsio->residual = alloc_len - lun_datalen; - ctsio->kern_data_len = lun_datalen; - ctsio->kern_total_len = lun_datalen; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(lun_datalen, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * We set this to the actual data length, regardless of how much @@ -9236,19 +9140,16 @@ ctl_request_sense(struct ctl_scsiio *cts ctsio->kern_data_ptr = malloc(sizeof(*sense_ptr), M_CTL, M_WAITOK); sense_ptr = (struct scsi_sense_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; + ctsio->kern_rel_offset = 0; /* * struct scsi_sense_data, which is currently set to 256 bytes, is * larger than the largest allowed value for the length field in the * REQUEST SENSE CDB, which is 252 bytes as of SPC-4. */ - ctsio->residual = 0; ctsio->kern_data_len = cdb->length; ctsio->kern_total_len = cdb->length; - ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; - /* * If we don't have a LUN, we don't have any pending sense. */ @@ -9373,19 +9274,10 @@ ctl_inquiry_evpd_supported(struct ctl_sc SCSI_EVPD_NUM_SUPPORTED_PAGES; ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK | M_ZERO); pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (sup_page_size < alloc_len) { - ctsio->residual = alloc_len - sup_page_size; - ctsio->kern_data_len = sup_page_size; - ctsio->kern_total_len = sup_page_size; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sup_page_size, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9443,17 +9335,10 @@ ctl_inquiry_evpd_serial(struct ctl_scsii data_len = 4 + CTL_SN_LEN; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr; - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9500,18 +9385,9 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); eid_ptr = (struct scsi_vpd_extended_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9574,19 +9450,10 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); mpp_ptr = (struct scsi_vpd_mode_page_policy *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9639,18 +9506,10 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9767,18 +9626,10 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sp = (struct scsi_vpd_scsi_ports *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9842,18 +9693,10 @@ ctl_inquiry_evpd_block_limits(struct ctl ctsio->kern_data_ptr = malloc(sizeof(*bl_ptr), M_CTL, M_WAITOK | M_ZERO); bl_ptr = (struct scsi_vpd_block_limits *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*bl_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*bl_ptr); - ctsio->kern_data_len = sizeof(*bl_ptr); - ctsio->kern_total_len = sizeof(*bl_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*bl_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9917,18 +9760,9 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * 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_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*bdc_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9973,18 +9807,9 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*lbp_ptr), M_CTL, M_WAITOK | M_ZERO); lbp_ptr = (struct scsi_vpd_logical_block_prov *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*lbp_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*lbp_ptr); - ctsio->kern_data_len = sizeof(*lbp_ptr); - ctsio->kern_total_len = sizeof(*lbp_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*lbp_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -10118,16 +9943,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (lun != NULL) { if ((lun->flags & CTL_LUN_PRIMARY_SC) || @@ -10511,15 +10328,8 @@ done: data_len = (uint8_t *)feature - (uint8_t *)hdr; } scsi_ulto4b(data_len - 4, hdr->data_length); - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -10550,16 +10360,8 @@ ctl_get_event_status(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_get_event_status_header *)ctsio->kern_data_ptr; scsi_ulto2b(0, hdr->descr_length); @@ -10587,16 +10389,8 @@ ctl_mechanism_status(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_mechanism_status_header *)ctsio->kern_data_ptr; hdr->state1 = 0x00; @@ -10646,16 +10440,8 @@ ctl_read_toc(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_read_toc_hdr *)ctsio->kern_data_ptr; if (format == 0) { @@ -12647,15 +12433,14 @@ ctl_send_datamove_done(union ctl_io *io, msg.hdr.serializing_sc = io->io_hdr.serializing_sc; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; + msg.scsi.kern_data_resid = io->scsiio.kern_data_resid; msg.scsi.tag_num = io->scsiio.tag_num; msg.scsi.tag_type = io->scsiio.tag_type; msg.scsi.scsi_status = io->scsiio.scsi_status; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.fetd_status = io->io_hdr.port_status; - msg.scsi.residual = io->scsiio.residual; + msg.scsi.port_status = io->io_hdr.port_status; io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { ctl_failover_io(io, /*have_lock*/ have_lock); Modified: stable/11/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_io.h Tue Feb 7 01:42:53 2017 (r313365) +++ stable/11/sys/cam/ctl/ctl_io.h Tue Feb 7 01:43:45 2017 (r313366) @@ -320,7 +320,7 @@ struct ctl_scsiio { uint8_t sense_len; /* Returned sense length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_residual; /* Unused. */ - uint32_t residual; /* data residual length */ + uint32_t residual; /* Unused */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ uint8_t cdb_len; /* CDB length */ @@ -373,7 +373,7 @@ struct ctl_taskio { /* * HA link messages. */ -#define CTL_HA_VERSION 2 +#define CTL_HA_VERSION 3 /* * Used for CTL_MSG_LOGIN. @@ -469,7 +469,8 @@ struct ctl_ha_msg_dt { }; /* - * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU. + * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU, + * and CTL_MSG_DATAMOVE_DONE. */ struct ctl_ha_msg_scsi { struct ctl_ha_msg_hdr hdr; @@ -479,10 +480,9 @@ struct ctl_ha_msg_scsi { uint8_t cdb_len; /* CDB length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_len; /* Returned sense length */ - uint8_t sense_residual; /* sense residual length */ - uint32_t residual; /* data residual length */ - uint32_t fetd_status; /* trans status, set by FETD, + uint32_t port_status; /* trans status, set by FETD, 0 = good*/ + uint32_t kern_data_resid; /* for DATAMOVE_DONE */ struct scsi_sense_data sense_data; /* sense data */ }; Modified: stable/11/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:42:53 2017 (r313365) +++ stable/11/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:43:45 2017 (r313366) @@ -282,19 +282,10 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); tpc_ptr = (struct scsi_vpd_tpc *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -457,19 +448,10 @@ ctl_receive_copy_operating_parameters(st alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_operating_parameters_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + 4, data->length); @@ -554,19 +536,10 @@ ctl_receive_copy_status_lid1(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid1_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4, data->available_data); @@ -631,19 +604,10 @@ ctl_receive_copy_failure_details(struct alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; if (list_copy.completed && (list_copy.error || list_copy.abort)) { @@ -702,19 +666,10 @@ ctl_receive_copy_status_lid4(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, @@ -2402,19 +2357,10 @@ ctl_receive_rod_token_information(struct alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len + @@ -2482,19 +2428,10 @@ ctl_report_all_rod_tokens(struct ctl_scs alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_all_rod_tokens_data *)ctsio->kern_data_ptr; i = 0; From owner-svn-src-all@freebsd.org Tue Feb 7 01:44:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD699CD3F63; Tue, 7 Feb 2017 01:44:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6F81C16; Tue, 7 Feb 2017 01:44:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171iIoR095415; Tue, 7 Feb 2017 01:44:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171iILb095412; Tue, 7 Feb 2017 01:44:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070144.v171iILb095412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:44:18 +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: r313367 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:44:19 -0000 Author: mav Date: Tue Feb 7 01:44:18 2017 New Revision: 313367 URL: https://svnweb.freebsd.org/changeset/base/313367 Log: MFC r312348: Remove writing 'residual' field of struct ctl_scsiio. This field has no practical use and never readed. Initiators already receive respective residual size from frontends. Removed field had different semantics, which looks useless, and was never passed through by any frontend. While there, fix kern_data_resid field support in case of HA, missed in r312291. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Feb 7 01:43:45 2017 (r313366) +++ stable/10/sys/cam/ctl/ctl.c Tue Feb 7 01:44:18 2017 (r313367) @@ -698,8 +698,6 @@ ctl_ha_done(union ctl_io *io) msg.scsi.tag_num = io->scsiio.tag_num; msg.scsi.tag_type = io->scsiio.tag_type; msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.residual = io->scsiio.residual; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, @@ -727,8 +725,6 @@ ctl_isc_handler_finish_xfer(struct ctl_s ctsio->io_hdr.status = msg_info->hdr.status; ctsio->scsi_status = msg_info->scsi.scsi_status; ctsio->sense_len = msg_info->scsi.sense_len; - ctsio->sense_residual = msg_info->scsi.sense_residual; - ctsio->residual = msg_info->scsi.residual; memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, msg_info->scsi.sense_len); ctl_enqueue_isc((union ctl_io *)ctsio); @@ -1497,13 +1493,12 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE; io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; - io->io_hdr.port_status = msg->scsi.fetd_status; - io->scsiio.residual = msg->scsi.residual; + io->io_hdr.port_status = msg->scsi.port_status; + io->scsiio.kern_data_resid = msg->scsi.kern_data_resid; if (msg->hdr.status != CTL_STATUS_NONE) { io->io_hdr.status = msg->hdr.status; io->scsiio.scsi_status = msg->scsi.scsi_status; io->scsiio.sense_len = msg->scsi.sense_len; - io->scsiio.sense_residual =msg->scsi.sense_residual; memcpy(&io->scsiio.sense_data, &msg->scsi.sense_data, msg->scsi.sense_len); @@ -6489,15 +6484,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; switch (ctsio->cdb[0]) { case MODE_SENSE_6: { @@ -6841,15 +6829,8 @@ ctl_log_sense(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; header = (struct scsi_log_header *)ctsio->kern_data_ptr; header->page = page_index->page_code; @@ -6904,7 +6885,6 @@ ctl_read_capacity(struct ctl_scsiio *cts ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_read_capacity_data *)ctsio->kern_data_ptr; - ctsio->residual = 0; ctsio->kern_data_len = sizeof(*data); ctsio->kern_total_len = sizeof(*data); ctsio->kern_rel_offset = 0; @@ -6962,18 +6942,10 @@ ctl_read_capacity_16(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*data), M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_read_capacity_data_long *)ctsio->kern_data_ptr; - - if (sizeof(*data) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*data); - ctsio->kern_data_len = sizeof(*data); - ctsio->kern_total_len = sizeof(*data); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*data), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; scsi_u64to8b(lun->be_lun->maxlba, data->addr); /* XXX KDM this may not be 512 bytes... */ @@ -7016,18 +6988,10 @@ ctl_get_lba_status(struct ctl_scsiio *ct total_len = sizeof(*data) + sizeof(data->descr[0]); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); data = (struct scsi_get_lba_status_data *)ctsio->kern_data_ptr; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* Fill dummy data in case backend can't tell anything. */ scsi_ulto4b(4 + sizeof(data->descr[0]), data->length); @@ -7078,17 +7042,10 @@ ctl_read_defect(struct ctl_scsiio *ctsio } ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { data10 = (struct scsi_read_defect_data_hdr_10 *) @@ -7173,19 +7130,10 @@ ctl_report_tagret_port_groups(struct ctl alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (ext) { rtg_ext_ptr = (struct scsi_target_group_data_extended *) @@ -7373,19 +7321,10 @@ ctl_report_supported_opcodes(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; switch (cdb->options & RSO_OPTIONS_MASK) { case RSO_OPTIONS_ALL: @@ -7486,19 +7425,10 @@ ctl_report_supported_tmf(struct ctl_scsi alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_supported_tmf_ext_data *)ctsio->kern_data_ptr; data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_QTS | @@ -7533,19 +7463,10 @@ ctl_report_timestamp(struct ctl_scsiio * alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_timestamp_data *)ctsio->kern_data_ptr; scsi_ulto2b(sizeof(*data) - 2, data->length); @@ -7606,19 +7527,10 @@ retry: mtx_unlock(&lun->lun_lock); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } - ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; mtx_lock(&lun->lun_lock); switch (cdb->action) { @@ -9165,18 +9077,10 @@ ctl_report_luns(struct ctl_scsiio *ctsio */ lun_datalen = sizeof(*lun_data) + (num_filled * sizeof(struct scsi_report_luns_lundata)); - - if (lun_datalen < alloc_len) { - ctsio->residual = alloc_len - lun_datalen; - ctsio->kern_data_len = lun_datalen; - ctsio->kern_total_len = lun_datalen; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(lun_datalen, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * We set this to the actual data length, regardless of how much @@ -9227,19 +9131,16 @@ ctl_request_sense(struct ctl_scsiio *cts ctsio->kern_data_ptr = malloc(sizeof(*sense_ptr), M_CTL, M_WAITOK); sense_ptr = (struct scsi_sense_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; + ctsio->kern_rel_offset = 0; /* * struct scsi_sense_data, which is currently set to 256 bytes, is * larger than the largest allowed value for the length field in the * REQUEST SENSE CDB, which is 252 bytes as of SPC-4. */ - ctsio->residual = 0; ctsio->kern_data_len = cdb->length; ctsio->kern_total_len = cdb->length; - ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; - /* * If we don't have a LUN, we don't have any pending sense. */ @@ -9364,19 +9265,10 @@ ctl_inquiry_evpd_supported(struct ctl_sc SCSI_EVPD_NUM_SUPPORTED_PAGES; ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK | M_ZERO); pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (sup_page_size < alloc_len) { - ctsio->residual = alloc_len - sup_page_size; - ctsio->kern_data_len = sup_page_size; - ctsio->kern_total_len = sup_page_size; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sup_page_size, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9434,17 +9326,10 @@ ctl_inquiry_evpd_serial(struct ctl_scsii data_len = 4 + CTL_SN_LEN; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr; - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9491,18 +9376,9 @@ ctl_inquiry_evpd_eid(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); eid_ptr = (struct scsi_vpd_extended_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9565,19 +9441,10 @@ ctl_inquiry_evpd_mpp(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); mpp_ptr = (struct scsi_vpd_mode_page_policy *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9630,18 +9497,10 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9758,18 +9617,10 @@ ctl_inquiry_evpd_scsi_ports(struct ctl_s ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); sp = (struct scsi_vpd_scsi_ports *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9833,18 +9684,10 @@ ctl_inquiry_evpd_block_limits(struct ctl ctsio->kern_data_ptr = malloc(sizeof(*bl_ptr), M_CTL, M_WAITOK | M_ZERO); bl_ptr = (struct scsi_vpd_block_limits *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*bl_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*bl_ptr); - ctsio->kern_data_len = sizeof(*bl_ptr); - ctsio->kern_total_len = sizeof(*bl_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*bl_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9908,18 +9751,9 @@ ctl_inquiry_evpd_bdc(struct ctl_scsiio * 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_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*bdc_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -9964,18 +9798,9 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(sizeof(*lbp_ptr), M_CTL, M_WAITOK | M_ZERO); lbp_ptr = (struct scsi_vpd_logical_block_prov *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; - - if (sizeof(*lbp_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*lbp_ptr); - ctsio->kern_data_len = sizeof(*lbp_ptr); - ctsio->kern_total_len = sizeof(*lbp_ptr); - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(sizeof(*lbp_ptr), alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -10109,16 +9934,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; if (lun != NULL) { if ((lun->flags & CTL_LUN_PRIMARY_SC) || @@ -10502,15 +10319,8 @@ done: data_len = (uint8_t *)feature - (uint8_t *)hdr; } scsi_ulto4b(data_len - 4, hdr->data_length); - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -10541,16 +10351,8 @@ ctl_get_event_status(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_get_event_status_header *)ctsio->kern_data_ptr; scsi_ulto2b(0, hdr->descr_length); @@ -10578,16 +10380,8 @@ ctl_mechanism_status(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_mechanism_status_header *)ctsio->kern_data_ptr; hdr->state1 = 0x00; @@ -10637,16 +10431,8 @@ ctl_read_toc(struct ctl_scsiio *ctsio) ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; ctsio->kern_rel_offset = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; hdr = (struct scsi_read_toc_hdr *)ctsio->kern_data_ptr; if (format == 0) { @@ -12638,15 +12424,14 @@ ctl_send_datamove_done(union ctl_io *io, msg.hdr.serializing_sc = io->io_hdr.serializing_sc; msg.hdr.nexus = io->io_hdr.nexus; msg.hdr.status = io->io_hdr.status; + msg.scsi.kern_data_resid = io->scsiio.kern_data_resid; msg.scsi.tag_num = io->scsiio.tag_num; msg.scsi.tag_type = io->scsiio.tag_type; msg.scsi.scsi_status = io->scsiio.scsi_status; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.fetd_status = io->io_hdr.port_status; - msg.scsi.residual = io->scsiio.residual; + msg.scsi.port_status = io->io_hdr.port_status; io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { ctl_failover_io(io, /*have_lock*/ have_lock); Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Tue Feb 7 01:43:45 2017 (r313366) +++ stable/10/sys/cam/ctl/ctl_io.h Tue Feb 7 01:44:18 2017 (r313367) @@ -320,7 +320,7 @@ struct ctl_scsiio { uint8_t sense_len; /* Returned sense length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_residual; /* Unused. */ - uint32_t residual; /* data residual length */ + uint32_t residual; /* Unused */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ uint8_t cdb_len; /* CDB length */ @@ -373,7 +373,7 @@ struct ctl_taskio { /* * HA link messages. */ -#define CTL_HA_VERSION 2 +#define CTL_HA_VERSION 3 /* * Used for CTL_MSG_LOGIN. @@ -469,7 +469,8 @@ struct ctl_ha_msg_dt { }; /* - * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU. + * Used for CTL_MSG_SERIALIZE, CTL_MSG_FINISH_IO, CTL_MSG_BAD_JUJU, + * and CTL_MSG_DATAMOVE_DONE. */ struct ctl_ha_msg_scsi { struct ctl_ha_msg_hdr hdr; @@ -479,10 +480,9 @@ struct ctl_ha_msg_scsi { uint8_t cdb_len; /* CDB length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_len; /* Returned sense length */ - uint8_t sense_residual; /* sense residual length */ - uint32_t residual; /* data residual length */ - uint32_t fetd_status; /* trans status, set by FETD, + uint32_t port_status; /* trans status, set by FETD, 0 = good*/ + uint32_t kern_data_resid; /* for DATAMOVE_DONE */ struct scsi_sense_data sense_data; /* sense data */ }; Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:43:45 2017 (r313366) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Feb 7 01:44:18 2017 (r313367) @@ -282,19 +282,10 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); tpc_ptr = (struct scsi_vpd_tpc *)ctsio->kern_data_ptr; - ctsio->kern_sg_entries = 0; - - if (data_len < alloc_len) { - ctsio->residual = alloc_len - data_len; - ctsio->kern_data_len = data_len; - ctsio->kern_total_len = data_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; ctsio->kern_sg_entries = 0; + ctsio->kern_data_len = min(data_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; /* * The control device is always connected. The disk device, on the @@ -457,19 +448,10 @@ ctl_receive_copy_operating_parameters(st alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_operating_parameters_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + 4, data->length); @@ -554,19 +536,10 @@ ctl_receive_copy_status_lid1(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid1_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4, data->available_data); @@ -631,19 +604,10 @@ ctl_receive_copy_failure_details(struct alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; if (list_copy.completed && (list_copy.error || list_copy.abort)) { @@ -702,19 +666,10 @@ ctl_receive_copy_status_lid4(struct ctl_ alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, @@ -2402,19 +2357,10 @@ ctl_receive_rod_token_information(struct alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len + @@ -2482,19 +2428,10 @@ ctl_report_all_rod_tokens(struct ctl_scs alloc_len = scsi_4btoul(cdb->length); ctsio->kern_data_ptr = malloc(total_len, M_CTL, M_WAITOK | M_ZERO); - ctsio->kern_sg_entries = 0; - - if (total_len < alloc_len) { - ctsio->residual = alloc_len - total_len; - ctsio->kern_data_len = total_len; - ctsio->kern_total_len = total_len; - } else { - ctsio->residual = 0; - ctsio->kern_data_len = alloc_len; - ctsio->kern_total_len = alloc_len; - } ctsio->kern_rel_offset = 0; + ctsio->kern_data_len = min(total_len, alloc_len); + ctsio->kern_total_len = ctsio->kern_data_len; data = (struct scsi_report_all_rod_tokens_data *)ctsio->kern_data_ptr; i = 0; From owner-svn-src-all@freebsd.org Tue Feb 7 01:55:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B1CBCD37FA; Tue, 7 Feb 2017 01:55:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FC5B398; Tue, 7 Feb 2017 01:55:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171toQF099611; Tue, 7 Feb 2017 01:55:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171tmBM099598; Tue, 7 Feb 2017 01:55:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070155.v171tmBM099598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313368 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:55:51 -0000 Author: mav Date: Tue Feb 7 01:55:48 2017 New Revision: 313368 URL: https://svnweb.freebsd.org/changeset/base/313368 Log: MFC r312603: Add initial support for CTL module unloading. It is only a first step and not perfect, but better then nothing. The main blocker is CAM target frontend, that can not be unloaded, since CAM does not have mechanism to unregister periph driver now. Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/ctl/ctl_backend.c stable/11/sys/cam/ctl/ctl_backend.h stable/11/sys/cam/ctl/ctl_backend_block.c stable/11/sys/cam/ctl/ctl_backend_ramdisk.c stable/11/sys/cam/ctl/ctl_frontend.c stable/11/sys/cam/ctl/ctl_frontend.h stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c stable/11/sys/cam/ctl/ctl_frontend_ioctl.c stable/11/sys/cam/ctl/ctl_frontend_iscsi.c stable/11/sys/cam/ctl/ctl_private.h stable/11/sys/cam/ctl/ctl_tpc_local.c stable/11/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl.c Tue Feb 7 01:55:48 2017 (r313368) @@ -424,7 +424,7 @@ static void ctl_isc_event_handler(ctl_ha static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest); static void ctl_copy_sense_data_back(union ctl_io *src, union ctl_ha_msg *dest); static int ctl_init(void); -void ctl_shutdown(void); +static int ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); static void ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); @@ -520,6 +520,8 @@ static const struct ctl_cmd_entry * ctl_validate_command(struct ctl_scsiio *ctsio); static int ctl_cmd_applicable(uint8_t lun_type, const struct ctl_cmd_entry *entry); +static int ctl_ha_init(void); +static int ctl_ha_shutdown(void); static uint64_t ctl_get_prkey(struct ctl_lun *lun, uint32_t residx); static void ctl_clr_prkey(struct ctl_lun *lun, uint32_t residx); @@ -561,6 +563,49 @@ MODULE_VERSION(ctl, 1); static struct ctl_frontend ha_frontend = { .name = "ha", + .init = ctl_ha_init, + .shutdown = ctl_ha_shutdown, +}; + +static int +ctl_ha_init(void) +{ + struct ctl_softc *softc = control_softc; + + if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, + &softc->othersc_pool) != 0) + return (ENOMEM); + if (ctl_ha_msg_init(softc) != CTL_HA_STATUS_SUCCESS) { + ctl_pool_free(softc->othersc_pool); + return (EIO); + } + if (ctl_ha_msg_register(CTL_HA_CHAN_CTL, ctl_isc_event_handler) + != CTL_HA_STATUS_SUCCESS) { + ctl_ha_msg_destroy(softc); + ctl_pool_free(softc->othersc_pool); + return (EIO); + } + return (0); +}; + +static int +ctl_ha_shutdown(void) +{ + struct ctl_softc *softc = control_softc; + struct ctl_port *port; + + ctl_ha_msg_shutdown(softc); + if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) != CTL_HA_STATUS_SUCCESS) + return (EIO); + if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) + return (EIO); + ctl_pool_free(softc->othersc_pool); + while ((port = STAILQ_FIRST(&ha_frontend.port_list)) != NULL) { + ctl_port_deregister(port); + free(port->port_name, M_CTL); + free(port, M_CTL); + } + return (0); }; static void @@ -1782,7 +1827,6 @@ ctl_init(void) { struct make_dev_args args; struct ctl_softc *softc; - void *other_pool; int i, error; softc = control_softc = malloc(sizeof(*control_softc), M_DEVBUF, @@ -1855,15 +1899,6 @@ ctl_init(void) STAILQ_INIT(&softc->be_list); ctl_tpc_init(softc); - if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, - &other_pool) != 0) - { - printf("ctl: can't allocate %d entry other SC pool, " - "exiting\n", CTL_POOL_ENTRIES_OTHER_SC); - return (ENOMEM); - } - softc->othersc_pool = other_pool; - if (worker_threads <= 0) worker_threads = max(1, mp_ncpus / 4); if (worker_threads > CTL_MAX_THREADS) @@ -1883,22 +1918,19 @@ ctl_init(void) &softc->ctl_proc, &thr->thread, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); - ctl_pool_free(other_pool); return (error); } } error = kproc_kthread_add(ctl_lun_thread, softc, - &softc->ctl_proc, NULL, 0, 0, "ctl", "lun"); + &softc->ctl_proc, &softc->lun_thread, 0, 0, "ctl", "lun"); if (error != 0) { printf("error creating CTL lun thread!\n"); - ctl_pool_free(other_pool); return (error); } error = kproc_kthread_add(ctl_thresh_thread, softc, - &softc->ctl_proc, NULL, 0, 0, "ctl", "thresh"); + &softc->ctl_proc, &softc->thresh_thread, 0, 0, "ctl", "thresh"); if (error != 0) { printf("error creating CTL threshold thread!\n"); - ctl_pool_free(other_pool); return (error); } @@ -1907,58 +1939,54 @@ ctl_init(void) softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head"); if (softc->is_single == 0) { - ctl_frontend_register(&ha_frontend); - if (ctl_ha_msg_init(softc) != CTL_HA_STATUS_SUCCESS) { - printf("ctl_init: ctl_ha_msg_init failed.\n"); + if (ctl_frontend_register(&ha_frontend) != 0) softc->is_single = 1; - } else - if (ctl_ha_msg_register(CTL_HA_CHAN_CTL, ctl_isc_event_handler) - != CTL_HA_STATUS_SUCCESS) { - printf("ctl_init: ctl_ha_msg_register failed.\n"); - softc->is_single = 1; - } } return (0); } -void +static int ctl_shutdown(void) { struct ctl_softc *softc = control_softc; - struct ctl_lun *lun, *next_lun; + int i; - if (softc->is_single == 0) { - ctl_ha_msg_shutdown(softc); - if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) - != CTL_HA_STATUS_SUCCESS) - printf("%s: ctl_ha_msg_deregister failed.\n", __func__); - if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) - printf("%s: ctl_ha_msg_destroy failed.\n", __func__); + if (softc->is_single == 0) ctl_frontend_deregister(&ha_frontend); - } - - mtx_lock(&softc->ctl_lock); - - STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) - ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); + destroy_dev(softc->dev); -#if 0 - ctl_shutdown_thread(softc->work_thread); - mtx_destroy(&softc->queue_lock); -#endif + /* Shutdown CTL threads. */ + softc->shutdown = 1; + for (i = 0; i < worker_threads; i++) { + struct ctl_thread *thr = &softc->threads[i]; + while (thr->thread != NULL) { + wakeup(thr); + if (thr->thread != NULL) + pause("CTL thr shutdown", 1); + } + mtx_destroy(&thr->queue_lock); + } + while (softc->lun_thread != NULL) { + wakeup(&softc->pending_lun_queue); + if (softc->lun_thread != NULL) + pause("CTL thr shutdown", 1); + } + while (softc->thresh_thread != NULL) { + wakeup(softc->thresh_thread); + if (softc->thresh_thread != NULL) + pause("CTL thr shutdown", 1); + } ctl_tpc_shutdown(softc); uma_zdestroy(softc->io_zone); mtx_destroy(&softc->ctl_lock); - destroy_dev(softc->dev); - sysctl_ctx_free(&softc->sysctl_ctx); free(softc, M_DEVBUF); control_softc = NULL; + return (0); } static int @@ -1969,7 +1997,7 @@ ctl_module_event_handler(module_t mod, i case MOD_LOAD: return (ctl_init()); case MOD_UNLOAD: - return (EBUSY); + return (ctl_shutdown()); default: return (EOPNOTSUPP); } @@ -13268,7 +13296,7 @@ ctl_work_thread(void *arg) CTL_DEBUG_PRINT(("ctl_work_thread starting\n")); - for (;;) { + while (!softc->shutdown) { /* * We handle the queues in this order: * - ISC @@ -13318,6 +13346,8 @@ ctl_work_thread(void *arg) /* Sleep until we have something to do. */ mtx_sleep(thr, &thr->queue_lock, PDROP | PRIBIO, "-", 0); } + thr->thread = NULL; + kthread_exit(); } static void @@ -13328,7 +13358,7 @@ ctl_lun_thread(void *arg) CTL_DEBUG_PRINT(("ctl_lun_thread starting\n")); - for (;;) { + while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); be_lun = STAILQ_FIRST(&softc->pending_lun_queue); if (be_lun != NULL) { @@ -13342,6 +13372,8 @@ ctl_lun_thread(void *arg) mtx_sleep(&softc->pending_lun_queue, &softc->ctl_lock, PDROP | PRIBIO, "-", 0); } + softc->lun_thread = NULL; + kthread_exit(); } static void @@ -13357,7 +13389,7 @@ ctl_thresh_thread(void *arg) CTL_DEBUG_PRINT(("ctl_thresh_thread starting\n")); - for (;;) { + while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { if ((lun->flags & CTL_LUN_DISABLED) || @@ -13442,9 +13474,11 @@ ctl_thresh_thread(void *arg) mtx_lock(&softc->ctl_lock); } } - mtx_unlock(&softc->ctl_lock); - pause("-", CTL_LBP_PERIOD * hz); + mtx_sleep(&softc->thresh_thread, &softc->ctl_lock, + PDROP | PRIBIO, "-", CTL_LBP_PERIOD * hz); } + softc->thresh_thread = NULL; + kthread_exit(); } static void Modified: stable/11/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_backend.c Tue Feb 7 01:55:48 2017 (r313368) @@ -67,11 +67,10 @@ ctl_backend_register(struct ctl_backend_ { struct ctl_softc *softc = control_softc; struct ctl_backend_driver *be_tmp; + int error; + /* Sanity check, make sure this isn't a duplicate registration. */ mtx_lock(&softc->ctl_lock); - /* - * Sanity check, make sure this isn't a duplicate registration. - */ STAILQ_FOREACH(be_tmp, &softc->be_list, links) { if (strcmp(be_tmp->name, be->name) == 0) { mtx_unlock(&softc->ctl_lock); @@ -79,39 +78,24 @@ ctl_backend_register(struct ctl_backend_ } } mtx_unlock(&softc->ctl_lock); - - /* - * Call the backend's initialization routine. - */ - be->init(); - - mtx_lock(&softc->ctl_lock); - - STAILQ_INSERT_TAIL(&softc->be_list, be, links); - - softc->num_backends++; - - /* - * Don't want to increment the usage count for internal consumers, - * we won't be able to unload otherwise. - */ - /* XXX KDM find a substitute for this? */ -#if 0 - if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0) - MOD_INC_USE_COUNT; -#endif - #ifdef CS_BE_CONFIG_MOVE_DONE_IS_NOT_USED be->config_move_done = ctl_config_move_done; #endif - /* XXX KDM fix this! */ be->num_luns = 0; -#if 0 - atomic_set(&be->num_luns, 0); -#endif - mtx_unlock(&softc->ctl_lock); + /* Call the backend's initialization routine. */ + if (be->init != NULL) { + if ((error = be->init()) != 0) { + printf("%s backend init error: %d\n", + be->name, error); + return (error); + } + } + mtx_lock(&softc->ctl_lock); + STAILQ_INSERT_TAIL(&softc->be_list, be, links); + softc->num_backends++; + mtx_unlock(&softc->ctl_lock); return (0); } @@ -119,30 +103,21 @@ int ctl_backend_deregister(struct ctl_backend_driver *be) { struct ctl_softc *softc = control_softc; + int error; - mtx_lock(&softc->ctl_lock); - -#if 0 - if (atomic_read(&be->num_luns) != 0) { -#endif - /* XXX KDM fix this! */ - if (be->num_luns != 0) { - mtx_unlock(&softc->ctl_lock); - return (-1); + /* Call the backend's shutdown routine. */ + if (be->shutdown != NULL) { + if ((error = be->shutdown()) != 0) { + printf("%s backend shutdown error: %d\n", + be->name, error); + return (error); + } } + mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->be_list, be, ctl_backend_driver, links); - softc->num_backends--; - - /* XXX KDM find a substitute for this? */ -#if 0 - if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0) - MOD_DEC_USE_COUNT; -#endif - mtx_unlock(&softc->ctl_lock); - return (0); } Modified: stable/11/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend.h Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_backend.h Tue Feb 7 01:55:48 2017 (r313368) @@ -55,12 +55,13 @@ typedef enum { { \ switch (type) { \ case MOD_LOAD: \ - ctl_backend_register( \ - (struct ctl_backend_driver *)data); \ + return (ctl_backend_register( \ + (struct ctl_backend_driver *)data)); \ break; \ case MOD_UNLOAD: \ - printf(#name " module unload - not possible for this module type\n"); \ - return EINVAL; \ + return (ctl_backend_deregister( \ + (struct ctl_backend_driver *)data)); \ + break; \ default: \ return EOPNOTSUPP; \ } \ @@ -179,10 +180,10 @@ struct ctl_be_lun { typedef enum { CTL_BE_FLAG_NONE = 0x00, /* no flags */ CTL_BE_FLAG_HAS_CONFIG = 0x01, /* can do config reads, writes */ - CTL_BE_FLAG_INTERNAL = 0x02 /* don't inc mod refcount */ } ctl_backend_flags; typedef int (*be_init_t)(void); +typedef int (*be_shutdown_t)(void); typedef int (*be_func_t)(union ctl_io *io); typedef void (*be_vfunc_t)(union ctl_io *io); typedef int (*be_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, @@ -194,6 +195,7 @@ struct ctl_backend_driver { char name[CTL_BE_NAME_LEN]; /* passed to CTL */ ctl_backend_flags flags; /* passed to CTL */ be_init_t init; /* passed to CTL */ + be_shutdown_t shutdown; /* passed to CTL */ be_func_t data_submit; /* passed to CTL */ be_func_t data_move_done; /* passed to CTL */ be_func_t config_read; /* passed to CTL */ Modified: stable/11/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:55:48 2017 (r313368) @@ -183,6 +183,7 @@ struct ctl_be_block_lun { */ struct ctl_be_block_softc { struct mtx lock; + uma_zone_t beio_zone; int num_luns; STAILQ_HEAD(, ctl_be_block_lun) lun_list; }; @@ -273,13 +274,15 @@ static int ctl_be_block_config_write(uni static int ctl_be_block_config_read(union ctl_io *io); static int ctl_be_block_lun_info(void *be_lun, struct sbuf *sb); static uint64_t ctl_be_block_lun_attr(void *be_lun, const char *attrname); -int ctl_be_block_init(void); +static int ctl_be_block_init(void); +static int ctl_be_block_shutdown(void); static struct ctl_backend_driver ctl_be_block_driver = { .name = "block", .flags = CTL_BE_FLAG_HAS_CONFIG, .init = ctl_be_block_init, + .shutdown = ctl_be_block_shutdown, .data_submit = ctl_be_block_submit, .data_move_done = ctl_be_block_move_done, .config_read = ctl_be_block_config_read, @@ -292,14 +295,12 @@ static struct ctl_backend_driver ctl_be_ MALLOC_DEFINE(M_CTLBLK, "ctlblk", "Memory used for CTL block backend"); CTL_BACKEND_DECLARE(cbb, ctl_be_block_driver); -static uma_zone_t beio_zone; - static struct ctl_be_block_io * ctl_alloc_beio(struct ctl_be_block_softc *softc) { struct ctl_be_block_io *beio; - beio = uma_zalloc(beio_zone, M_WAITOK | M_ZERO); + beio = uma_zalloc(softc->beio_zone, M_WAITOK | M_ZERO); beio->softc = softc; return (beio); } @@ -332,7 +333,7 @@ ctl_free_beio(struct ctl_be_block_io *be duplicate_free, beio->num_segs); } - uma_zfree(beio_zone, beio); + uma_zfree(beio->softc->beio_zone, beio); } static void @@ -2859,19 +2860,40 @@ ctl_be_block_lun_attr(void *be_lun, cons return (lun->getattr(lun, attrname)); } -int +static int ctl_be_block_init(void) { - struct ctl_be_block_softc *softc; - int retval; - - softc = &backend_block_softc; - retval = 0; + struct ctl_be_block_softc *softc = &backend_block_softc; mtx_init(&softc->lock, "ctlblock", NULL, MTX_DEF); - beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), + softc->beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); STAILQ_INIT(&softc->lun_list); + return (0); +} - return (retval); + +static int +ctl_be_block_shutdown(void) +{ + struct ctl_be_block_softc *softc = &backend_block_softc; + struct ctl_be_block_lun *lun, *next_lun; + + mtx_lock(&softc->lock); + STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) { + /* + * Drop our lock here. Since ctl_invalidate_lun() can call + * back into us, this could potentially lead to a recursive + * lock of the same mutex, which would cause a hang. + */ + mtx_unlock(&softc->lock); + ctl_disable_lun(&lun->cbe_lun); + ctl_invalidate_lun(&lun->cbe_lun); + mtx_lock(&softc->lock); + } + mtx_unlock(&softc->lock); + + uma_zdestroy(softc->beio_zone); + mtx_destroy(&softc->lock); + return (0); } Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:55:48 2017 (r313368) @@ -108,8 +108,8 @@ struct ctl_be_ramdisk_softc { static struct ctl_be_ramdisk_softc rd_softc; extern struct ctl_softc *control_softc; -int ctl_backend_ramdisk_init(void); -void ctl_backend_ramdisk_shutdown(void); +static int ctl_backend_ramdisk_init(void); +static int ctl_backend_ramdisk_shutdown(void); static int ctl_backend_ramdisk_move_done(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); static void ctl_backend_ramdisk_continue(union ctl_io *io); @@ -133,6 +133,7 @@ static struct ctl_backend_driver ctl_be_ .name = "ramdisk", .flags = CTL_BE_FLAG_HAS_CONFIG, .init = ctl_backend_ramdisk_init, + .shutdown = ctl_backend_ramdisk_shutdown, .data_submit = ctl_backend_ramdisk_submit, .data_move_done = ctl_backend_ramdisk_move_done, .config_read = ctl_backend_ramdisk_config_read, @@ -170,7 +171,7 @@ ctl_backend_ramdisk_init(void) return (0); } -void +static int ctl_backend_ramdisk_shutdown(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; @@ -192,20 +193,16 @@ ctl_backend_ramdisk_shutdown(void) mtx_lock(&softc->lock); } mtx_unlock(&softc->lock); - + #ifdef CTL_RAMDISK_PAGES for (i = 0; i < softc->num_pages; i++) free(softc->ramdisk_pages[i], M_RAMDISK); - free(softc->ramdisk_pages, M_RAMDISK); #else free(softc->ramdisk_buffer, M_RAMDISK); #endif - - if (ctl_backend_deregister(&ctl_be_ramdisk_driver) != 0) { - printf("ctl_backend_ramdisk_shutdown: " - "ctl_backend_deregister() failed!\n"); - } + mtx_destroy(&softc->lock); + return (0); } static int Modified: stable/11/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_frontend.c Tue Feb 7 01:55:48 2017 (r313368) @@ -70,12 +70,11 @@ ctl_frontend_register(struct ctl_fronten { struct ctl_softc *softc = control_softc; struct ctl_frontend *fe_tmp; + int error; KASSERT(softc != NULL, ("CTL is not initialized")); - /* - * Sanity check, make sure this isn't a duplicate registration. - */ + /* Sanity check, make sure this isn't a duplicate registration. */ mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(fe_tmp, &softc->fe_list, links) { if (strcmp(fe_tmp->name, fe->name) == 0) { @@ -86,11 +85,14 @@ ctl_frontend_register(struct ctl_fronten mtx_unlock(&softc->ctl_lock); STAILQ_INIT(&fe->port_list); - /* - * Call the frontend's initialization routine. - */ - if (fe->init != NULL) - fe->init(); + /* Call the frontend's initialization routine. */ + if (fe->init != NULL) { + if ((error = fe->init()) != 0) { + printf("%s frontend init error: %d\n", + fe->name, error); + return (error); + } + } mtx_lock(&softc->ctl_lock); softc->num_frontends++; @@ -103,20 +105,21 @@ int ctl_frontend_deregister(struct ctl_frontend *fe) { struct ctl_softc *softc = control_softc; + int error; - if (!STAILQ_EMPTY(&fe->port_list)) - return (-1); + /* Call the frontend's shutdown routine.*/ + if (fe->shutdown != NULL) { + if ((error = fe->shutdown()) != 0) { + printf("%s frontend shutdown error: %d\n", + fe->name, error); + return (error); + } + } mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->fe_list, fe, ctl_frontend, links); softc->num_frontends--; mtx_unlock(&softc->ctl_lock); - - /* - * Call the frontend's shutdown routine. - */ - if (fe->shutdown != NULL) - fe->shutdown(); return (0); } Modified: stable/11/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend.h Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_frontend.h Tue Feb 7 01:55:48 2017 (r313368) @@ -49,7 +49,7 @@ typedef enum { } ctl_port_status; typedef int (*fe_init_t)(void); -typedef void (*fe_shutdown_t)(void); +typedef int (*fe_shutdown_t)(void); typedef void (*port_func_t)(void *onoff_arg); typedef int (*port_info_func_t)(void *onoff_arg, struct sbuf *sb); typedef int (*lun_func_t)(void *arg, int lun_id); @@ -61,12 +61,13 @@ typedef int (*fe_ioctl_t)(struct cdev *d { \ switch (type) { \ case MOD_LOAD: \ - ctl_frontend_register( \ - (struct ctl_frontend *)data); \ + return (ctl_frontend_register( \ + (struct ctl_frontend *)data)); \ break; \ case MOD_UNLOAD: \ - printf(#name " module unload - not possible for this module type\n"); \ - return EINVAL; \ + return (ctl_frontend_deregister( \ + (struct ctl_frontend *)data)); \ + break; \ default: \ return EOPNOTSUPP; \ } \ Modified: stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:55:48 2017 (r313368) @@ -94,15 +94,14 @@ struct cfcs_softc { CAM_SNS_BUF_PHYS | CAM_CDB_PHYS | CAM_SENSE_PTR | \ CAM_SENSE_PHYS) -int cfcs_init(void); +static int cfcs_init(void); +static int cfcs_shutdown(void); static void cfcs_poll(struct cam_sim *sim); static void cfcs_online(void *arg); static void cfcs_offline(void *arg); static void cfcs_datamove(union ctl_io *io); static void cfcs_done(union ctl_io *io); void cfcs_action(struct cam_sim *sim, union ccb *ccb); -static void cfcs_async(void *callback_arg, uint32_t code, - struct cam_path *path, void *arg); struct cfcs_softc cfcs_softc; /* @@ -121,14 +120,14 @@ static struct ctl_frontend cfcs_frontend { .name = "camsim", .init = cfcs_init, + .shutdown = cfcs_shutdown, }; CTL_FRONTEND_DECLARE(ctlcfcs, cfcs_frontend); -int +static int cfcs_init(void) { struct cfcs_softc *softc; - struct ccb_setasync csa; struct ctl_port *port; int retval; @@ -214,13 +213,6 @@ cfcs_init(void) goto bailout; } - xpt_setup_ccb(&csa.ccb_h, softc->path, CAM_PRIORITY_NONE); - csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_LOST_DEVICE; - csa.callback = cfcs_async; - csa.callback_arg = softc->sim; - xpt_action((union ccb *)&csa); - mtx_unlock(&softc->lock); return (retval); @@ -236,6 +228,27 @@ bailout: return (retval); } +static int +cfcs_shutdown(void) +{ + struct cfcs_softc *softc = &cfcs_softc; + struct ctl_port *port = &softc->port; + int error; + + ctl_port_offline(port); + + mtx_lock(&softc->lock); + xpt_free_path(softc->path); + xpt_bus_deregister(cam_sim_path(softc->sim)); + cam_sim_free(softc->sim, /*free_devq*/ TRUE); + mtx_unlock(&softc->lock); + mtx_destroy(&softc->lock); + + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: cam_sim port deregistration failed\n", __func__); + return (error); +} + static void cfcs_poll(struct cam_sim *sim) { @@ -801,9 +814,3 @@ cfcs_action(struct cam_sim *sim, union c break; } } - -static void -cfcs_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) -{ - -} Modified: stable/11/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:55:48 2017 (r313368) @@ -76,7 +76,7 @@ struct cfi_softc { static struct cfi_softc cfi_softc; static int cfi_init(void); -static void cfi_shutdown(void); +static int cfi_shutdown(void); static void cfi_datamove(union ctl_io *io); static void cfi_done(union ctl_io *io); @@ -93,6 +93,7 @@ cfi_init(void) { struct cfi_softc *isoftc = &cfi_softc; struct ctl_port *port; + int error = 0; memset(isoftc, 0, sizeof(*isoftc)); @@ -108,24 +109,25 @@ cfi_init(void) port->targ_port = -1; port->max_initiators = 1; - if (ctl_port_register(port) != 0) { + if ((error = ctl_port_register(port)) != 0) { printf("%s: ioctl port registration failed\n", __func__); - return (0); + return (error); } ctl_port_online(port); return (0); } -void +static int cfi_shutdown(void) { struct cfi_softc *isoftc = &cfi_softc; - struct ctl_port *port; + struct ctl_port *port = &isoftc->port; + int error = 0; - port = &isoftc->port; ctl_port_offline(port); - if (ctl_port_deregister(&isoftc->port) != 0) - printf("%s: ctl_frontend_deregister() failed\n", __func__); + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: ioctl port deregistration failed\n", __func__); + return (error); } /* Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:55:48 2017 (r313368) @@ -144,7 +144,8 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO #define PDU_TOTAL_TRANSFER_LEN(X) (X)->ip_prv1 #define PDU_R2TSN(X) (X)->ip_prv2 -int cfiscsi_init(void); +static int cfiscsi_init(void); +static int cfiscsi_shutdown(void); static void cfiscsi_online(void *arg); static void cfiscsi_offline(void *arg); static int cfiscsi_info(void *arg, struct sbuf *sb); @@ -182,6 +183,7 @@ static struct ctl_frontend cfiscsi_front .name = "iscsi", .init = cfiscsi_init, .ioctl = cfiscsi_ioctl, + .shutdown = cfiscsi_shutdown, }; CTL_FRONTEND_DECLARE(ctlcfiscsi, cfiscsi_frontend); MODULE_DEPEND(ctlcfiscsi, icl, 1, 1, 1); @@ -1321,7 +1323,7 @@ cfiscsi_session_delete(struct cfiscsi_se free(cs, M_CFISCSI); } -int +static int cfiscsi_init(void) { struct cfiscsi_softc *softc; @@ -1344,6 +1346,23 @@ cfiscsi_init(void) return (0); } +static int +cfiscsi_shutdown(void) +{ + struct cfiscsi_softc *softc = &cfiscsi_softc; + + if (!TAILQ_EMPTY(&softc->sessions) || !TAILQ_EMPTY(&softc->targets)) + return (EBUSY); + + uma_zdestroy(cfiscsi_data_wait_zone); +#ifdef ICL_KERNEL_PROXY + cv_destroy(&softc->accept_cv); +#endif + cv_destroy(&softc->sessions_cv); + mtx_destroy(&softc->lock); + return (0); +} + #ifdef ICL_KERNEL_PROXY static void cfiscsi_accept(struct socket *so, struct sockaddr *sa, int portal_id) Modified: stable/11/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/11/sys/cam/ctl/ctl_private.h Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_private.h Tue Feb 7 01:55:48 2017 (r313368) @@ -470,7 +470,10 @@ struct ctl_softc { STAILQ_HEAD(, ctl_backend_driver) be_list; struct uma_zone *io_zone; uint32_t cur_pool_id; + int shutdown; struct ctl_thread threads[CTL_MAX_THREADS]; + struct thread *lun_thread; + struct thread *thresh_thread; TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; struct callout tpc_timeout; struct mtx tpc_lock; Modified: stable/11/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:55:48 2017 (r313368) @@ -65,7 +65,7 @@ struct tpcl_softc { static struct tpcl_softc tpcl_softc; static int tpcl_init(void); -static void tpcl_shutdown(void); +static int tpcl_shutdown(void); static void tpcl_datamove(union ctl_io *io); static void tpcl_done(union ctl_io *io); @@ -84,7 +84,7 @@ tpcl_init(void) struct tpcl_softc *tsoftc = &tpcl_softc; struct ctl_port *port; struct scsi_transportid_spi *tid; - int len; + int error, len; memset(tsoftc, 0, sizeof(*tsoftc)); @@ -100,9 +100,9 @@ tpcl_init(void) port->targ_port = -1; port->max_initiators = 1; - if (ctl_port_register(port) != 0) { - printf("%s: ctl_port_register() failed with error\n", __func__); - return (0); + if ((error = ctl_port_register(port)) != 0) { + printf("%s: tpc port registration failed\n", __func__); + return (error); } len = sizeof(struct scsi_transportid_spi); @@ -118,16 +118,17 @@ tpcl_init(void) return (0); } -void +static int tpcl_shutdown(void) { struct tpcl_softc *tsoftc = &tpcl_softc; - struct ctl_port *port; + struct ctl_port *port = &tsoftc->port; + int error; - port = &tsoftc->port; ctl_port_offline(port); - if (ctl_port_deregister(&tsoftc->port) != 0) - printf("%s: ctl_frontend_deregister() failed\n", __func__); + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: tpc port deregistration failed\n", __func__); + return (error); } static void Modified: stable/11/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/11/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:44:18 2017 (r313367) +++ stable/11/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:55:48 2017 (r313368) @@ -188,8 +188,8 @@ MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CA #define PRIV_CCB(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[0]) #define PRIV_INFO(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[1]) -int ctlfeinitialize(void); -void ctlfeshutdown(void); +static int ctlfeinitialize(void); +static int ctlfeshutdown(void); static periph_init_t ctlfeperiphinit; static void ctlfeasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); @@ -227,13 +227,15 @@ static struct ctl_frontend ctlfe_fronten }; CTL_FRONTEND_DECLARE(ctlfe, ctlfe_frontend); -void +static int ctlfeshutdown(void) { - return; + + /* CAM does not support periph driver unregister now. */ + return (EBUSY); } -int +static int ctlfeinitialize(void) { @@ -243,7 +245,7 @@ ctlfeinitialize(void) return (0); } -void +static void ctlfeperiphinit(void) { cam_status status; From owner-svn-src-all@freebsd.org Tue Feb 7 01:56:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E75C8CD3970; Tue, 7 Feb 2017 01:56:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABDB7791; Tue, 7 Feb 2017 01:56:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171uRrO099703; Tue, 7 Feb 2017 01:56:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171uQL8099690; Tue, 7 Feb 2017 01:56:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070156.v171uQL8099690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:56: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: r313369 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:56:29 -0000 Author: mav Date: Tue Feb 7 01:56:26 2017 New Revision: 313369 URL: https://svnweb.freebsd.org/changeset/base/313369 Log: MFC r312603: Add initial support for CTL module unloading. It is only a first step and not perfect, but better then nothing. The main blocker is CAM target frontend, that can not be unloaded, since CAM does not have mechanism to unregister periph driver now. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl.c Tue Feb 7 01:56:26 2017 (r313369) @@ -426,7 +426,7 @@ static void ctl_isc_event_handler(ctl_ha static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest); static void ctl_copy_sense_data_back(union ctl_io *src, union ctl_ha_msg *dest); static int ctl_init(void); -void ctl_shutdown(void); +static int ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); static void ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); @@ -522,6 +522,8 @@ static const struct ctl_cmd_entry * ctl_validate_command(struct ctl_scsiio *ctsio); static int ctl_cmd_applicable(uint8_t lun_type, const struct ctl_cmd_entry *entry); +static int ctl_ha_init(void); +static int ctl_ha_shutdown(void); static uint64_t ctl_get_prkey(struct ctl_lun *lun, uint32_t residx); static void ctl_clr_prkey(struct ctl_lun *lun, uint32_t residx); @@ -563,6 +565,49 @@ MODULE_VERSION(ctl, 1); static struct ctl_frontend ha_frontend = { .name = "ha", + .init = ctl_ha_init, + .shutdown = ctl_ha_shutdown, +}; + +static int +ctl_ha_init(void) +{ + struct ctl_softc *softc = control_softc; + + if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, + &softc->othersc_pool) != 0) + return (ENOMEM); + if (ctl_ha_msg_init(softc) != CTL_HA_STATUS_SUCCESS) { + ctl_pool_free(softc->othersc_pool); + return (EIO); + } + if (ctl_ha_msg_register(CTL_HA_CHAN_CTL, ctl_isc_event_handler) + != CTL_HA_STATUS_SUCCESS) { + ctl_ha_msg_destroy(softc); + ctl_pool_free(softc->othersc_pool); + return (EIO); + } + return (0); +}; + +static int +ctl_ha_shutdown(void) +{ + struct ctl_softc *softc = control_softc; + struct ctl_port *port; + + ctl_ha_msg_shutdown(softc); + if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) != CTL_HA_STATUS_SUCCESS) + return (EIO); + if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) + return (EIO); + ctl_pool_free(softc->othersc_pool); + while ((port = STAILQ_FIRST(&ha_frontend.port_list)) != NULL) { + ctl_port_deregister(port); + free(port->port_name, M_CTL); + free(port, M_CTL); + } + return (0); }; static void @@ -1784,7 +1829,6 @@ ctl_init(void) { struct make_dev_args args; struct ctl_softc *softc; - void *other_pool; int i, error; softc = control_softc = malloc(sizeof(*control_softc), M_DEVBUF, @@ -1859,15 +1903,6 @@ ctl_init(void) STAILQ_INIT(&softc->be_list); ctl_tpc_init(softc); - if (ctl_pool_create(softc, "othersc", CTL_POOL_ENTRIES_OTHER_SC, - &other_pool) != 0) - { - printf("ctl: can't allocate %d entry other SC pool, " - "exiting\n", CTL_POOL_ENTRIES_OTHER_SC); - return (ENOMEM); - } - softc->othersc_pool = other_pool; - if (worker_threads <= 0) worker_threads = max(1, mp_ncpus / 4); if (worker_threads > CTL_MAX_THREADS) @@ -1887,22 +1922,19 @@ ctl_init(void) &softc->ctl_proc, &thr->thread, 0, 0, "ctl", "work%d", i); if (error != 0) { printf("error creating CTL work thread!\n"); - ctl_pool_free(other_pool); return (error); } } error = kproc_kthread_add(ctl_lun_thread, softc, - &softc->ctl_proc, NULL, 0, 0, "ctl", "lun"); + &softc->ctl_proc, &softc->lun_thread, 0, 0, "ctl", "lun"); if (error != 0) { printf("error creating CTL lun thread!\n"); - ctl_pool_free(other_pool); return (error); } error = kproc_kthread_add(ctl_thresh_thread, softc, - &softc->ctl_proc, NULL, 0, 0, "ctl", "thresh"); + &softc->ctl_proc, &softc->thresh_thread, 0, 0, "ctl", "thresh"); if (error != 0) { printf("error creating CTL threshold thread!\n"); - ctl_pool_free(other_pool); return (error); } @@ -1911,58 +1943,54 @@ ctl_init(void) softc, 0, ctl_ha_role_sysctl, "I", "HA role for this head"); if (softc->is_single == 0) { - ctl_frontend_register(&ha_frontend); - if (ctl_ha_msg_init(softc) != CTL_HA_STATUS_SUCCESS) { - printf("ctl_init: ctl_ha_msg_init failed.\n"); + if (ctl_frontend_register(&ha_frontend) != 0) softc->is_single = 1; - } else - if (ctl_ha_msg_register(CTL_HA_CHAN_CTL, ctl_isc_event_handler) - != CTL_HA_STATUS_SUCCESS) { - printf("ctl_init: ctl_ha_msg_register failed.\n"); - softc->is_single = 1; - } } return (0); } -void +static int ctl_shutdown(void) { struct ctl_softc *softc = control_softc; - struct ctl_lun *lun, *next_lun; + int i; - if (softc->is_single == 0) { - ctl_ha_msg_shutdown(softc); - if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) - != CTL_HA_STATUS_SUCCESS) - printf("%s: ctl_ha_msg_deregister failed.\n", __func__); - if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) - printf("%s: ctl_ha_msg_destroy failed.\n", __func__); + if (softc->is_single == 0) ctl_frontend_deregister(&ha_frontend); - } - - mtx_lock(&softc->ctl_lock); - - STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) - ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); + destroy_dev(softc->dev); -#if 0 - ctl_shutdown_thread(softc->work_thread); - mtx_destroy(&softc->queue_lock); -#endif + /* Shutdown CTL threads. */ + softc->shutdown = 1; + for (i = 0; i < worker_threads; i++) { + struct ctl_thread *thr = &softc->threads[i]; + while (thr->thread != NULL) { + wakeup(thr); + if (thr->thread != NULL) + pause("CTL thr shutdown", 1); + } + mtx_destroy(&thr->queue_lock); + } + while (softc->lun_thread != NULL) { + wakeup(&softc->pending_lun_queue); + if (softc->lun_thread != NULL) + pause("CTL thr shutdown", 1); + } + while (softc->thresh_thread != NULL) { + wakeup(softc->thresh_thread); + if (softc->thresh_thread != NULL) + pause("CTL thr shutdown", 1); + } ctl_tpc_shutdown(softc); uma_zdestroy(softc->io_zone); mtx_destroy(&softc->ctl_lock); - destroy_dev(softc->dev); - sysctl_ctx_free(&softc->sysctl_ctx); free(softc, M_DEVBUF); control_softc = NULL; + return (0); } static int @@ -1973,7 +2001,7 @@ ctl_module_event_handler(module_t mod, i case MOD_LOAD: return (ctl_init()); case MOD_UNLOAD: - return (EBUSY); + return (ctl_shutdown()); default: return (EOPNOTSUPP); } @@ -13259,7 +13287,7 @@ ctl_work_thread(void *arg) CTL_DEBUG_PRINT(("ctl_work_thread starting\n")); - for (;;) { + while (!softc->shutdown) { /* * We handle the queues in this order: * - ISC @@ -13309,6 +13337,8 @@ ctl_work_thread(void *arg) /* Sleep until we have something to do. */ mtx_sleep(thr, &thr->queue_lock, PDROP | PRIBIO, "-", 0); } + thr->thread = NULL; + kthread_exit(); } static void @@ -13319,7 +13349,7 @@ ctl_lun_thread(void *arg) CTL_DEBUG_PRINT(("ctl_lun_thread starting\n")); - for (;;) { + while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); be_lun = STAILQ_FIRST(&softc->pending_lun_queue); if (be_lun != NULL) { @@ -13333,6 +13363,8 @@ ctl_lun_thread(void *arg) mtx_sleep(&softc->pending_lun_queue, &softc->ctl_lock, PDROP | PRIBIO, "-", 0); } + softc->lun_thread = NULL; + kthread_exit(); } static void @@ -13348,7 +13380,7 @@ ctl_thresh_thread(void *arg) CTL_DEBUG_PRINT(("ctl_thresh_thread starting\n")); - for (;;) { + while (!softc->shutdown) { mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { if ((lun->flags & CTL_LUN_DISABLED) || @@ -13433,9 +13465,11 @@ ctl_thresh_thread(void *arg) mtx_lock(&softc->ctl_lock); } } - mtx_unlock(&softc->ctl_lock); - pause("-", CTL_LBP_PERIOD * hz); + mtx_sleep(&softc->thresh_thread, &softc->ctl_lock, + PDROP | PRIBIO, "-", CTL_LBP_PERIOD * hz); } + softc->thresh_thread = NULL; + kthread_exit(); } static void Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_backend.c Tue Feb 7 01:56:26 2017 (r313369) @@ -67,11 +67,10 @@ ctl_backend_register(struct ctl_backend_ { struct ctl_softc *softc = control_softc; struct ctl_backend_driver *be_tmp; + int error; + /* Sanity check, make sure this isn't a duplicate registration. */ mtx_lock(&softc->ctl_lock); - /* - * Sanity check, make sure this isn't a duplicate registration. - */ STAILQ_FOREACH(be_tmp, &softc->be_list, links) { if (strcmp(be_tmp->name, be->name) == 0) { mtx_unlock(&softc->ctl_lock); @@ -79,39 +78,24 @@ ctl_backend_register(struct ctl_backend_ } } mtx_unlock(&softc->ctl_lock); - - /* - * Call the backend's initialization routine. - */ - be->init(); - - mtx_lock(&softc->ctl_lock); - - STAILQ_INSERT_TAIL(&softc->be_list, be, links); - - softc->num_backends++; - - /* - * Don't want to increment the usage count for internal consumers, - * we won't be able to unload otherwise. - */ - /* XXX KDM find a substitute for this? */ -#if 0 - if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0) - MOD_INC_USE_COUNT; -#endif - #ifdef CS_BE_CONFIG_MOVE_DONE_IS_NOT_USED be->config_move_done = ctl_config_move_done; #endif - /* XXX KDM fix this! */ be->num_luns = 0; -#if 0 - atomic_set(&be->num_luns, 0); -#endif - mtx_unlock(&softc->ctl_lock); + /* Call the backend's initialization routine. */ + if (be->init != NULL) { + if ((error = be->init()) != 0) { + printf("%s backend init error: %d\n", + be->name, error); + return (error); + } + } + mtx_lock(&softc->ctl_lock); + STAILQ_INSERT_TAIL(&softc->be_list, be, links); + softc->num_backends++; + mtx_unlock(&softc->ctl_lock); return (0); } @@ -119,30 +103,21 @@ int ctl_backend_deregister(struct ctl_backend_driver *be) { struct ctl_softc *softc = control_softc; + int error; - mtx_lock(&softc->ctl_lock); - -#if 0 - if (atomic_read(&be->num_luns) != 0) { -#endif - /* XXX KDM fix this! */ - if (be->num_luns != 0) { - mtx_unlock(&softc->ctl_lock); - return (-1); + /* Call the backend's shutdown routine. */ + if (be->shutdown != NULL) { + if ((error = be->shutdown()) != 0) { + printf("%s backend shutdown error: %d\n", + be->name, error); + return (error); + } } + mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->be_list, be, ctl_backend_driver, links); - softc->num_backends--; - - /* XXX KDM find a substitute for this? */ -#if 0 - if ((be->flags & CTL_BE_FLAG_INTERNAL) == 0) - MOD_DEC_USE_COUNT; -#endif - mtx_unlock(&softc->ctl_lock); - return (0); } Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_backend.h Tue Feb 7 01:56:26 2017 (r313369) @@ -55,12 +55,13 @@ typedef enum { { \ switch (type) { \ case MOD_LOAD: \ - ctl_backend_register( \ - (struct ctl_backend_driver *)data); \ + return (ctl_backend_register( \ + (struct ctl_backend_driver *)data)); \ break; \ case MOD_UNLOAD: \ - printf(#name " module unload - not possible for this module type\n"); \ - return EINVAL; \ + return (ctl_backend_deregister( \ + (struct ctl_backend_driver *)data)); \ + break; \ default: \ return EOPNOTSUPP; \ } \ @@ -179,10 +180,10 @@ struct ctl_be_lun { typedef enum { CTL_BE_FLAG_NONE = 0x00, /* no flags */ CTL_BE_FLAG_HAS_CONFIG = 0x01, /* can do config reads, writes */ - CTL_BE_FLAG_INTERNAL = 0x02 /* don't inc mod refcount */ } ctl_backend_flags; typedef int (*be_init_t)(void); +typedef int (*be_shutdown_t)(void); typedef int (*be_func_t)(union ctl_io *io); typedef void (*be_vfunc_t)(union ctl_io *io); typedef int (*be_ioctl_t)(struct cdev *dev, u_long cmd, caddr_t addr, int flag, @@ -194,6 +195,7 @@ struct ctl_backend_driver { char name[CTL_BE_NAME_LEN]; /* passed to CTL */ ctl_backend_flags flags; /* passed to CTL */ be_init_t init; /* passed to CTL */ + be_shutdown_t shutdown; /* passed to CTL */ be_func_t data_submit; /* passed to CTL */ be_func_t data_move_done; /* passed to CTL */ be_func_t config_read; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Tue Feb 7 01:56:26 2017 (r313369) @@ -185,6 +185,7 @@ struct ctl_be_block_lun { */ struct ctl_be_block_softc { struct mtx lock; + uma_zone_t beio_zone; int num_luns; STAILQ_HEAD(, ctl_be_block_lun) lun_list; }; @@ -276,13 +277,15 @@ static int ctl_be_block_config_write(uni static int ctl_be_block_config_read(union ctl_io *io); static int ctl_be_block_lun_info(void *be_lun, struct sbuf *sb); static uint64_t ctl_be_block_lun_attr(void *be_lun, const char *attrname); -int ctl_be_block_init(void); +static int ctl_be_block_init(void); +static int ctl_be_block_shutdown(void); static struct ctl_backend_driver ctl_be_block_driver = { .name = "block", .flags = CTL_BE_FLAG_HAS_CONFIG, .init = ctl_be_block_init, + .shutdown = ctl_be_block_shutdown, .data_submit = ctl_be_block_submit, .data_move_done = ctl_be_block_move_done, .config_read = ctl_be_block_config_read, @@ -295,14 +298,12 @@ static struct ctl_backend_driver ctl_be_ MALLOC_DEFINE(M_CTLBLK, "ctlblk", "Memory used for CTL block backend"); CTL_BACKEND_DECLARE(cbb, ctl_be_block_driver); -static uma_zone_t beio_zone; - static struct ctl_be_block_io * ctl_alloc_beio(struct ctl_be_block_softc *softc) { struct ctl_be_block_io *beio; - beio = uma_zalloc(beio_zone, M_WAITOK | M_ZERO); + beio = uma_zalloc(softc->beio_zone, M_WAITOK | M_ZERO); beio->softc = softc; return (beio); } @@ -335,7 +336,7 @@ ctl_free_beio(struct ctl_be_block_io *be duplicate_free, beio->num_segs); } - uma_zfree(beio_zone, beio); + uma_zfree(beio->softc->beio_zone, beio); } static void @@ -2873,19 +2874,40 @@ ctl_be_block_lun_attr(void *be_lun, cons return (lun->getattr(lun, attrname)); } -int +static int ctl_be_block_init(void) { - struct ctl_be_block_softc *softc; - int retval; - - softc = &backend_block_softc; - retval = 0; + struct ctl_be_block_softc *softc = &backend_block_softc; mtx_init(&softc->lock, "ctlblock", NULL, MTX_DEF); - beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), + softc->beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); STAILQ_INIT(&softc->lun_list); + return (0); +} - return (retval); + +static int +ctl_be_block_shutdown(void) +{ + struct ctl_be_block_softc *softc = &backend_block_softc; + struct ctl_be_block_lun *lun, *next_lun; + + mtx_lock(&softc->lock); + STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) { + /* + * Drop our lock here. Since ctl_invalidate_lun() can call + * back into us, this could potentially lead to a recursive + * lock of the same mutex, which would cause a hang. + */ + mtx_unlock(&softc->lock); + ctl_disable_lun(&lun->cbe_lun); + ctl_invalidate_lun(&lun->cbe_lun); + mtx_lock(&softc->lock); + } + mtx_unlock(&softc->lock); + + uma_zdestroy(softc->beio_zone); + mtx_destroy(&softc->lock); + return (0); } Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:56:26 2017 (r313369) @@ -108,8 +108,8 @@ struct ctl_be_ramdisk_softc { static struct ctl_be_ramdisk_softc rd_softc; extern struct ctl_softc *control_softc; -int ctl_backend_ramdisk_init(void); -void ctl_backend_ramdisk_shutdown(void); +static int ctl_backend_ramdisk_init(void); +static int ctl_backend_ramdisk_shutdown(void); static int ctl_backend_ramdisk_move_done(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); static void ctl_backend_ramdisk_continue(union ctl_io *io); @@ -133,6 +133,7 @@ static struct ctl_backend_driver ctl_be_ .name = "ramdisk", .flags = CTL_BE_FLAG_HAS_CONFIG, .init = ctl_backend_ramdisk_init, + .shutdown = ctl_backend_ramdisk_shutdown, .data_submit = ctl_backend_ramdisk_submit, .data_move_done = ctl_backend_ramdisk_move_done, .config_read = ctl_backend_ramdisk_config_read, @@ -170,7 +171,7 @@ ctl_backend_ramdisk_init(void) return (0); } -void +static int ctl_backend_ramdisk_shutdown(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; @@ -192,20 +193,16 @@ ctl_backend_ramdisk_shutdown(void) mtx_lock(&softc->lock); } mtx_unlock(&softc->lock); - + #ifdef CTL_RAMDISK_PAGES for (i = 0; i < softc->num_pages; i++) free(softc->ramdisk_pages[i], M_RAMDISK); - free(softc->ramdisk_pages, M_RAMDISK); #else free(softc->ramdisk_buffer, M_RAMDISK); #endif - - if (ctl_backend_deregister(&ctl_be_ramdisk_driver) != 0) { - printf("ctl_backend_ramdisk_shutdown: " - "ctl_backend_deregister() failed!\n"); - } + mtx_destroy(&softc->lock); + return (0); } static int Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_frontend.c Tue Feb 7 01:56:26 2017 (r313369) @@ -70,12 +70,11 @@ ctl_frontend_register(struct ctl_fronten { struct ctl_softc *softc = control_softc; struct ctl_frontend *fe_tmp; + int error; KASSERT(softc != NULL, ("CTL is not initialized")); - /* - * Sanity check, make sure this isn't a duplicate registration. - */ + /* Sanity check, make sure this isn't a duplicate registration. */ mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(fe_tmp, &softc->fe_list, links) { if (strcmp(fe_tmp->name, fe->name) == 0) { @@ -86,11 +85,14 @@ ctl_frontend_register(struct ctl_fronten mtx_unlock(&softc->ctl_lock); STAILQ_INIT(&fe->port_list); - /* - * Call the frontend's initialization routine. - */ - if (fe->init != NULL) - fe->init(); + /* Call the frontend's initialization routine. */ + if (fe->init != NULL) { + if ((error = fe->init()) != 0) { + printf("%s frontend init error: %d\n", + fe->name, error); + return (error); + } + } mtx_lock(&softc->ctl_lock); softc->num_frontends++; @@ -103,20 +105,21 @@ int ctl_frontend_deregister(struct ctl_frontend *fe) { struct ctl_softc *softc = control_softc; + int error; - if (!STAILQ_EMPTY(&fe->port_list)) - return (-1); + /* Call the frontend's shutdown routine.*/ + if (fe->shutdown != NULL) { + if ((error = fe->shutdown()) != 0) { + printf("%s frontend shutdown error: %d\n", + fe->name, error); + return (error); + } + } mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->fe_list, fe, ctl_frontend, links); softc->num_frontends--; mtx_unlock(&softc->ctl_lock); - - /* - * Call the frontend's shutdown routine. - */ - if (fe->shutdown != NULL) - fe->shutdown(); return (0); } Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_frontend.h Tue Feb 7 01:56:26 2017 (r313369) @@ -49,7 +49,7 @@ typedef enum { } ctl_port_status; typedef int (*fe_init_t)(void); -typedef void (*fe_shutdown_t)(void); +typedef int (*fe_shutdown_t)(void); typedef void (*port_func_t)(void *onoff_arg); typedef int (*port_info_func_t)(void *onoff_arg, struct sbuf *sb); typedef int (*lun_func_t)(void *arg, int lun_id); @@ -61,12 +61,13 @@ typedef int (*fe_ioctl_t)(struct cdev *d { \ switch (type) { \ case MOD_LOAD: \ - ctl_frontend_register( \ - (struct ctl_frontend *)data); \ + return (ctl_frontend_register( \ + (struct ctl_frontend *)data)); \ break; \ case MOD_UNLOAD: \ - printf(#name " module unload - not possible for this module type\n"); \ - return EINVAL; \ + return (ctl_frontend_deregister( \ + (struct ctl_frontend *)data)); \ + break; \ default: \ return EOPNOTSUPP; \ } \ Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Feb 7 01:56:26 2017 (r313369) @@ -94,15 +94,14 @@ struct cfcs_softc { CAM_SNS_BUF_PHYS | CAM_CDB_PHYS | CAM_SENSE_PTR | \ CAM_SENSE_PHYS) -int cfcs_init(void); +static int cfcs_init(void); +static int cfcs_shutdown(void); static void cfcs_poll(struct cam_sim *sim); static void cfcs_online(void *arg); static void cfcs_offline(void *arg); static void cfcs_datamove(union ctl_io *io); static void cfcs_done(union ctl_io *io); void cfcs_action(struct cam_sim *sim, union ccb *ccb); -static void cfcs_async(void *callback_arg, uint32_t code, - struct cam_path *path, void *arg); struct cfcs_softc cfcs_softc; /* @@ -121,14 +120,14 @@ static struct ctl_frontend cfcs_frontend { .name = "camsim", .init = cfcs_init, + .shutdown = cfcs_shutdown, }; CTL_FRONTEND_DECLARE(ctlcfcs, cfcs_frontend); -int +static int cfcs_init(void) { struct cfcs_softc *softc; - struct ccb_setasync csa; struct ctl_port *port; int retval; @@ -214,13 +213,6 @@ cfcs_init(void) goto bailout; } - xpt_setup_ccb(&csa.ccb_h, softc->path, CAM_PRIORITY_NONE); - csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_LOST_DEVICE; - csa.callback = cfcs_async; - csa.callback_arg = softc->sim; - xpt_action((union ccb *)&csa); - mtx_unlock(&softc->lock); return (retval); @@ -236,6 +228,27 @@ bailout: return (retval); } +static int +cfcs_shutdown(void) +{ + struct cfcs_softc *softc = &cfcs_softc; + struct ctl_port *port = &softc->port; + int error; + + ctl_port_offline(port); + + mtx_lock(&softc->lock); + xpt_free_path(softc->path); + xpt_bus_deregister(cam_sim_path(softc->sim)); + cam_sim_free(softc->sim, /*free_devq*/ TRUE); + mtx_unlock(&softc->lock); + mtx_destroy(&softc->lock); + + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: cam_sim port deregistration failed\n", __func__); + return (error); +} + static void cfcs_poll(struct cam_sim *sim) { @@ -801,9 +814,3 @@ cfcs_action(struct cam_sim *sim, union c break; } } - -static void -cfcs_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) -{ - -} Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Tue Feb 7 01:56:26 2017 (r313369) @@ -76,7 +76,7 @@ struct cfi_softc { static struct cfi_softc cfi_softc; static int cfi_init(void); -static void cfi_shutdown(void); +static int cfi_shutdown(void); static void cfi_datamove(union ctl_io *io); static void cfi_done(union ctl_io *io); @@ -93,6 +93,7 @@ cfi_init(void) { struct cfi_softc *isoftc = &cfi_softc; struct ctl_port *port; + int error = 0; memset(isoftc, 0, sizeof(*isoftc)); @@ -108,24 +109,25 @@ cfi_init(void) port->targ_port = -1; port->max_initiators = 1; - if (ctl_port_register(port) != 0) { + if ((error = ctl_port_register(port)) != 0) { printf("%s: ioctl port registration failed\n", __func__); - return (0); + return (error); } ctl_port_online(port); return (0); } -void +static int cfi_shutdown(void) { struct cfi_softc *isoftc = &cfi_softc; - struct ctl_port *port; + struct ctl_port *port = &isoftc->port; + int error = 0; - port = &isoftc->port; ctl_port_offline(port); - if (ctl_port_deregister(&isoftc->port) != 0) - printf("%s: ctl_frontend_deregister() failed\n", __func__); + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: ioctl port deregistration failed\n", __func__); + return (error); } /* Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Tue Feb 7 01:56:26 2017 (r313369) @@ -146,7 +146,8 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO #define PDU_TOTAL_TRANSFER_LEN(X) (X)->ip_prv1 #define PDU_R2TSN(X) (X)->ip_prv2 -int cfiscsi_init(void); +static int cfiscsi_init(void); +static int cfiscsi_shutdown(void); static void cfiscsi_online(void *arg); static void cfiscsi_offline(void *arg); static int cfiscsi_info(void *arg, struct sbuf *sb); @@ -178,6 +179,7 @@ static struct ctl_frontend cfiscsi_front .name = "iscsi", .init = cfiscsi_init, .ioctl = cfiscsi_ioctl, + .shutdown = cfiscsi_shutdown, }; CTL_FRONTEND_DECLARE(ctlcfiscsi, cfiscsi_frontend); MODULE_DEPEND(ctlcfiscsi, icl, 1, 1, 1); @@ -1274,7 +1276,7 @@ cfiscsi_session_delete(struct cfiscsi_se free(cs, M_CFISCSI); } -int +static int cfiscsi_init(void) { struct cfiscsi_softc *softc; @@ -1297,6 +1299,23 @@ cfiscsi_init(void) return (0); } +static int +cfiscsi_shutdown(void) +{ + struct cfiscsi_softc *softc = &cfiscsi_softc; + + if (!TAILQ_EMPTY(&softc->sessions) || !TAILQ_EMPTY(&softc->targets)) + return (EBUSY); + + uma_zdestroy(cfiscsi_data_wait_zone); +#ifdef ICL_KERNEL_PROXY + cv_destroy(&softc->accept_cv); +#endif + cv_destroy(&softc->sessions_cv); + mtx_destroy(&softc->lock); + return (0); +} + #ifdef ICL_KERNEL_PROXY static void cfiscsi_accept(struct socket *so, struct sockaddr *sa, int portal_id) Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_private.h Tue Feb 7 01:56:26 2017 (r313369) @@ -470,7 +470,10 @@ struct ctl_softc { STAILQ_HEAD(, ctl_backend_driver) be_list; struct uma_zone *io_zone; uint32_t cur_pool_id; + int shutdown; struct ctl_thread threads[CTL_MAX_THREADS]; + struct thread *lun_thread; + struct thread *thresh_thread; TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; struct callout tpc_timeout; struct mtx tpc_lock; Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Tue Feb 7 01:56:26 2017 (r313369) @@ -65,7 +65,7 @@ struct tpcl_softc { static struct tpcl_softc tpcl_softc; static int tpcl_init(void); -static void tpcl_shutdown(void); +static int tpcl_shutdown(void); static void tpcl_datamove(union ctl_io *io); static void tpcl_done(union ctl_io *io); @@ -84,7 +84,7 @@ tpcl_init(void) struct tpcl_softc *tsoftc = &tpcl_softc; struct ctl_port *port; struct scsi_transportid_spi *tid; - int len; + int error, len; memset(tsoftc, 0, sizeof(*tsoftc)); @@ -100,9 +100,9 @@ tpcl_init(void) port->targ_port = -1; port->max_initiators = 1; - if (ctl_port_register(port) != 0) { - printf("%s: ctl_port_register() failed with error\n", __func__); - return (0); + if ((error = ctl_port_register(port)) != 0) { + printf("%s: tpc port registration failed\n", __func__); + return (error); } len = sizeof(struct scsi_transportid_spi); @@ -118,16 +118,17 @@ tpcl_init(void) return (0); } -void +static int tpcl_shutdown(void) { struct tpcl_softc *tsoftc = &tpcl_softc; - struct ctl_port *port; + struct ctl_port *port = &tsoftc->port; + int error; - port = &tsoftc->port; ctl_port_offline(port); - if (ctl_port_deregister(&tsoftc->port) != 0) - printf("%s: ctl_frontend_deregister() failed\n", __func__); + if ((error = ctl_port_deregister(port)) != 0) + printf("%s: tpc port deregistration failed\n", __func__); + return (error); } static void Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:55:48 2017 (r313368) +++ stable/10/sys/cam/ctl/scsi_ctl.c Tue Feb 7 01:56:26 2017 (r313369) @@ -188,8 +188,8 @@ MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CA #define PRIV_CCB(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[0]) #define PRIV_INFO(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[1]) -int ctlfeinitialize(void); -void ctlfeshutdown(void); +static int ctlfeinitialize(void); +static int ctlfeshutdown(void); static periph_init_t ctlfeperiphinit; static void ctlfeasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); @@ -227,13 +227,15 @@ static struct ctl_frontend ctlfe_fronten }; CTL_FRONTEND_DECLARE(ctlfe, ctlfe_frontend); -void +static int ctlfeshutdown(void) { - return; + + /* CAM does not support periph driver unregister now. */ + return (EBUSY); } -int +static int ctlfeinitialize(void) { @@ -243,7 +245,7 @@ ctlfeinitialize(void) return (0); } -void +static void ctlfeperiphinit(void) { cam_status status; From owner-svn-src-all@freebsd.org Tue Feb 7 01:57:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94386CD3A33; Tue, 7 Feb 2017 01:57:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30CEC8DE; Tue, 7 Feb 2017 01:57:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171vTkh099793; Tue, 7 Feb 2017 01:57:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171vTtb099791; Tue, 7 Feb 2017 01:57:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070157.v171vTtb099791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313370 - in stable/11: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:57:30 -0000 Author: mav Date: Tue Feb 7 01:57:29 2017 New Revision: 313370 URL: https://svnweb.freebsd.org/changeset/base/313370 Log: MFC r312694: Make CTL ramdisk backend a real RAM disk. If "capacity" LU option is set, ramdisk backend now implements featured thin provisioned disk, storing data in malloc(9) allocated memory blocks of pblocksize bytes (default PAGE_SIZE or 4KB). Additionally ~0.2% of LU size is used for indirection tree (bigger pblocksize reduce the overhead). Backend supports all unmap and anchor operations. If configured capacity is overflowed, proper error conditions are reported. If "capacity" LU option is not set, the backend operates mostly the same as before without allocating real storage: writes go to nowhere, reads return zeroes, reporting that all LBAs are unmapped. This backend is still mostly oriented on testing and benchmarking (it is still a volatile RAM disk), but now it should allow to run real FS tests, not only simple dumb dd. Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c stable/11/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:56:26 2017 (r313369) +++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:57:29 2017 (r313370) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2003, 2008 Silicon Graphics International Corp. * Copyright (c) 2012 The FreeBSD Foundation - * Copyright (c) 2014-2015 Alexander Motin + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Portions of this software were developed by Edward Tomasz Napierala @@ -35,7 +35,7 @@ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_ramdisk.c#3 $ */ /* - * CAM Target Layer backend for a "fake" ramdisk. + * CAM Target Layer black hole and RAM disk backend. * * Author: Ken Merry */ @@ -48,9 +48,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -71,6 +73,29 @@ __FBSDID("$FreeBSD$"); #include #include +#define PRIV(io) \ + ((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND]) +#define ARGS(io) \ + ((struct ctl_lba_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]) + +#define PPP (PAGE_SIZE / sizeof(uint8_t **)) +#ifdef __LP64__ +#define PPPS (PAGE_SHIFT - 3) +#else +#define PPPS (PAGE_SHIFT - 2) +#endif +#define SGPP (PAGE_SIZE / sizeof(struct ctl_sg_entry)) + +#define P_UNMAPPED NULL /* Page is unmapped. */ +#define P_ANCHORED ((void *)(uintptr_t)1) /* Page is anchored. */ + +typedef enum { + GP_READ, /* Return data page or zero page. */ + GP_WRITE, /* Return data page, try allocate if none. */ + GP_ANCHOR, /* Return data page, try anchor if none. */ + GP_OTHER, /* Return what present, do not allocate/anchor. */ +} getpage_op_t; + typedef enum { CTL_BE_RAMDISK_LUN_UNCONFIGURED = 0x01, CTL_BE_RAMDISK_LUN_CONFIG_ERR = 0x02, @@ -79,28 +104,29 @@ typedef enum { struct ctl_be_ramdisk_lun { struct ctl_lun_create_params params; - char lunname[32]; - uint64_t size_bytes; - uint64_t size_blocks; + char lunname[32]; + int indir; + uint8_t **pages; + uint8_t *zero_page; + struct sx page_lock; + u_int pblocksize; + u_int pblockmul; + uint64_t size_bytes; + uint64_t size_blocks; + uint64_t cap_bytes; + uint64_t cap_used; struct ctl_be_ramdisk_softc *softc; ctl_be_ramdisk_lun_flags flags; STAILQ_ENTRY(ctl_be_ramdisk_lun) links; - struct ctl_be_lun cbe_lun; - struct taskqueue *io_taskqueue; - struct task io_task; + struct ctl_be_lun cbe_lun; + struct taskqueue *io_taskqueue; + struct task io_task; STAILQ_HEAD(, ctl_io_hdr) cont_queue; - struct mtx_padalign queue_lock; + struct mtx_padalign queue_lock; }; struct ctl_be_ramdisk_softc { struct mtx lock; - int rd_size; -#ifdef CTL_RAMDISK_PAGES - uint8_t **ramdisk_pages; - int num_pages; -#else - uint8_t *ramdisk_buffer; -#endif int num_luns; STAILQ_HEAD(, ctl_be_ramdisk_lun) lun_list; }; @@ -111,8 +137,13 @@ extern struct ctl_softc *control_softc; static int ctl_backend_ramdisk_init(void); static int ctl_backend_ramdisk_shutdown(void); static int ctl_backend_ramdisk_move_done(union ctl_io *io); +static void ctl_backend_ramdisk_compare(union ctl_io *io); +static void ctl_backend_ramdisk_rw(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); -static void ctl_backend_ramdisk_continue(union ctl_io *io); +static void ctl_backend_ramdisk_worker(void *context, int pending); +static int ctl_backend_ramdisk_config_read(union ctl_io *io); +static int ctl_backend_ramdisk_config_write(union ctl_io *io); +static uint64_t ctl_backend_ramdisk_lun_attr(void *be_lun, const char *attrname); static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); static int ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc, @@ -121,12 +152,9 @@ static int ctl_backend_ramdisk_create(st struct ctl_lun_req *req); static int ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, struct ctl_lun_req *req); -static void ctl_backend_ramdisk_worker(void *context, int pending); static void ctl_backend_ramdisk_lun_shutdown(void *be_lun); static void ctl_backend_ramdisk_lun_config_status(void *be_lun, ctl_lun_config_status status); -static int ctl_backend_ramdisk_config_write(union ctl_io *io); -static int ctl_backend_ramdisk_config_read(union ctl_io *io); static struct ctl_backend_driver ctl_be_ramdisk_driver = { @@ -138,36 +166,21 @@ static struct ctl_backend_driver ctl_be_ .data_move_done = ctl_backend_ramdisk_move_done, .config_read = ctl_backend_ramdisk_config_read, .config_write = ctl_backend_ramdisk_config_write, - .ioctl = ctl_backend_ramdisk_ioctl + .ioctl = ctl_backend_ramdisk_ioctl, + .lun_attr = ctl_backend_ramdisk_lun_attr, }; MALLOC_DEFINE(M_RAMDISK, "ramdisk", "Memory used for CTL RAMdisk"); CTL_BACKEND_DECLARE(cbr, ctl_be_ramdisk_driver); -int +static int ctl_backend_ramdisk_init(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; -#ifdef CTL_RAMDISK_PAGES - int i; -#endif memset(softc, 0, sizeof(*softc)); mtx_init(&softc->lock, "ctlramdisk", NULL, MTX_DEF); STAILQ_INIT(&softc->lun_list); - softc->rd_size = 1024 * 1024; -#ifdef CTL_RAMDISK_PAGES - softc->num_pages = softc->rd_size / PAGE_SIZE; - softc->ramdisk_pages = (uint8_t **)malloc(sizeof(uint8_t *) * - softc->num_pages, M_RAMDISK, - M_WAITOK); - for (i = 0; i < softc->num_pages; i++) - softc->ramdisk_pages[i] = malloc(PAGE_SIZE, M_RAMDISK,M_WAITOK); -#else - softc->ramdisk_buffer = (uint8_t *)malloc(softc->rd_size, M_RAMDISK, - M_WAITOK); -#endif - return (0); } @@ -176,9 +189,6 @@ ctl_backend_ramdisk_shutdown(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; struct ctl_be_ramdisk_lun *lun, *next_lun; -#ifdef CTL_RAMDISK_PAGES - int i; -#endif mtx_lock(&softc->lock); STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) { @@ -193,30 +203,210 @@ ctl_backend_ramdisk_shutdown(void) mtx_lock(&softc->lock); } mtx_unlock(&softc->lock); - -#ifdef CTL_RAMDISK_PAGES - for (i = 0; i < softc->num_pages; i++) - free(softc->ramdisk_pages[i], M_RAMDISK); - free(softc->ramdisk_pages, M_RAMDISK); -#else - free(softc->ramdisk_buffer, M_RAMDISK); -#endif mtx_destroy(&softc->lock); return (0); } +static uint8_t * +ctl_backend_ramdisk_getpage(struct ctl_be_ramdisk_lun *be_lun, off_t pn, + getpage_op_t op) +{ + uint8_t **p, ***pp; + off_t i; + int s; + + if (be_lun->cap_bytes == 0) { + switch (op) { + case GP_READ: + return (be_lun->zero_page); + case GP_WRITE: + return ((uint8_t *)be_lun->pages); + case GP_ANCHOR: + return (P_ANCHORED); + default: + return (P_UNMAPPED); + } + } + if (op == GP_WRITE || op == GP_ANCHOR) { + sx_xlock(&be_lun->page_lock); + pp = &be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (*pp == NULL) { + *pp = malloc(PAGE_SIZE, M_RAMDISK, + M_WAITOK|M_ZERO); + } + i = pn >> s; + pp = (uint8_t ***)&(*pp)[i]; + pn -= i << s; + } + if (*pp == P_UNMAPPED && be_lun->cap_used < be_lun->cap_bytes) { + if (op == GP_WRITE) { + *pp = malloc(be_lun->pblocksize, M_RAMDISK, + M_WAITOK|M_ZERO); + } else + *pp = P_ANCHORED; + be_lun->cap_used += be_lun->pblocksize; + } else if (*pp == P_ANCHORED && op == GP_WRITE) { + *pp = malloc(be_lun->pblocksize, M_RAMDISK, + M_WAITOK|M_ZERO); + } + sx_xunlock(&be_lun->page_lock); + return ((uint8_t *)*pp); + } else { + sx_slock(&be_lun->page_lock); + p = be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (p == NULL) + break; + i = pn >> s; + p = (uint8_t **)p[i]; + pn -= i << s; + } + sx_sunlock(&be_lun->page_lock); + if ((p == P_UNMAPPED || p == P_ANCHORED) && op == GP_READ) + return (be_lun->zero_page); + return ((uint8_t *)p); + } +}; + +static void +ctl_backend_ramdisk_unmappage(struct ctl_be_ramdisk_lun *be_lun, off_t pn) +{ + uint8_t ***pp; + off_t i; + int s; + + if (be_lun->cap_bytes == 0) + return; + sx_xlock(&be_lun->page_lock); + pp = &be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (*pp == NULL) + goto noindir; + i = pn >> s; + pp = (uint8_t ***)&(*pp)[i]; + pn -= i << s; + } + if (*pp == P_ANCHORED) { + be_lun->cap_used -= be_lun->pblocksize; + *pp = P_UNMAPPED; + } else if (*pp != P_UNMAPPED) { + free(*pp, M_RAMDISK); + be_lun->cap_used -= be_lun->pblocksize; + *pp = P_UNMAPPED; + } +noindir: + sx_xunlock(&be_lun->page_lock); +}; + +static void +ctl_backend_ramdisk_anchorpage(struct ctl_be_ramdisk_lun *be_lun, off_t pn) +{ + uint8_t ***pp; + off_t i; + int s; + + if (be_lun->cap_bytes == 0) + return; + sx_xlock(&be_lun->page_lock); + pp = &be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (*pp == NULL) + goto noindir; + i = pn >> s; + pp = (uint8_t ***)&(*pp)[i]; + pn -= i << s; + } + if (*pp == P_UNMAPPED && be_lun->cap_used < be_lun->cap_bytes) { + be_lun->cap_used += be_lun->pblocksize; + *pp = P_ANCHORED; + } else if (*pp != P_ANCHORED) { + free(*pp, M_RAMDISK); + *pp = P_ANCHORED; + } +noindir: + sx_xunlock(&be_lun->page_lock); +}; + +static void +ctl_backend_ramdisk_freeallpages(uint8_t **p, int indir) +{ + int i; + + if (p == NULL) + return; + if (indir == 0) { + free(p, M_RAMDISK); + return; + } + for (i = 0; i < PPP; i++) { + if (p[i] == NULL) + continue; + ctl_backend_ramdisk_freeallpages((uint8_t **)p[i], indir - 1); + } + free(p, M_RAMDISK); +}; + +static size_t +cmp(uint8_t *a, uint8_t *b, size_t size) +{ + size_t i; + + for (i = 0; i < size; i++) { + if (a[i] != b[i]) + break; + } + return (i); +} + +static int +ctl_backend_ramdisk_cmp(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + uint8_t *page; + uint8_t info[8]; + uint64_t lba; + u_int lbaoff, lbas, res, off; + + lbas = io->scsiio.kern_data_len / cbe_lun->blocksize; + lba = ARGS(io)->lba + PRIV(io)->len - lbas; + off = 0; + for (; lbas > 0; lbas--, lba++) { + page = ctl_backend_ramdisk_getpage(be_lun, + lba >> cbe_lun->pblockexp, GP_READ); + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + page += lbaoff * cbe_lun->blocksize; + res = cmp(io->scsiio.kern_data_ptr + off, page, + cbe_lun->blocksize); + off += res; + if (res < cbe_lun->blocksize) + break; + } + if (lbas > 0) { + off += io->scsiio.kern_rel_offset - io->scsiio.kern_data_len; + scsi_u64to8b(off, info); + ctl_set_sense(&io->scsiio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_MISCOMPARE, + /*asc*/ 0x1D, /*ascq*/ 0x00, + /*type*/ SSD_ELEM_INFO, + /*size*/ sizeof(info), /*data*/ &info, + /*type*/ SSD_ELEM_NONE); + return (1); + } + return (0); +} + static int ctl_backend_ramdisk_move_done(union ctl_io *io) { - struct ctl_be_lun *cbe_lun; - struct ctl_be_ramdisk_lun *be_lun; + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; #ifdef CTL_TIME_IO struct bintime cur_bt; #endif CTL_DEBUG_PRINT(("ctl_backend_ramdisk_move_done\n")); - cbe_lun = CTL_BACKEND_LUN(io); - be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun->be_lun; #ifdef CTL_TIME_IO getbinuptime(&cur_bt); bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); @@ -240,7 +430,12 @@ ctl_backend_ramdisk_move_done(union ctl_ ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { - if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { + if (ARGS(io)->flags & CTL_LLF_COMPARE) { + /* We have data block ready for comparison. */ + if (ctl_backend_ramdisk_cmp(io)) + goto done; + } + if (ARGS(io)->len > PRIV(io)->len) { mtx_lock(&be_lun->queue_lock); STAILQ_INSERT_TAIL(&be_lun->cont_queue, &io->io_hdr, links); @@ -251,75 +446,109 @@ ctl_backend_ramdisk_move_done(union ctl_ } ctl_set_success(&io->scsiio); } +done: ctl_data_submit_done(io); return(0); } -static int -ctl_backend_ramdisk_submit(union ctl_io *io) +static void +ctl_backend_ramdisk_compare(union ctl_io *io) { - struct ctl_be_lun *cbe_lun; - struct ctl_lba_len_flags *lbalen; + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + u_int lbas, len; - cbe_lun = CTL_BACKEND_LUN(io); - lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - if (lbalen->flags & CTL_LLF_VERIFY) { - ctl_set_success(&io->scsiio); - ctl_data_submit_done(io); - return (CTL_RETVAL_COMPLETE); - } - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer = - lbalen->len * cbe_lun->blocksize; - ctl_backend_ramdisk_continue(io); - return (CTL_RETVAL_COMPLETE); + lbas = ARGS(io)->len - PRIV(io)->len; + lbas = MIN(lbas, 131072 / cbe_lun->blocksize); + len = lbas * cbe_lun->blocksize; + + io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; + io->scsiio.kern_data_ptr = malloc(len, M_RAMDISK, M_WAITOK); + io->scsiio.kern_data_len = len; + io->scsiio.kern_sg_entries = 0; + io->io_hdr.flags |= CTL_FLAG_ALLOCATED; + PRIV(io)->len += lbas; +#ifdef CTL_TIME_IO + getbinuptime(&io->io_hdr.dma_start_bt); +#endif + ctl_datamove(io); } static void -ctl_backend_ramdisk_continue(union ctl_io *io) +ctl_backend_ramdisk_rw(union ctl_io *io) { - struct ctl_be_ramdisk_softc *softc; - int len, len_filled, sg_filled; -#ifdef CTL_RAMDISK_PAGES + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; struct ctl_sg_entry *sg_entries; - int i; -#endif - - softc = &rd_softc; - len = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer; -#ifdef CTL_RAMDISK_PAGES - sg_filled = min(btoc(len), softc->num_pages); - if (sg_filled > 1) { + uint8_t *page; + uint64_t lba; + u_int i, len, lbaoff, lbas, sgs, off; + getpage_op_t op; + + lba = ARGS(io)->lba + PRIV(io)->len; + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + lbas = ARGS(io)->len - PRIV(io)->len; + lbas = MIN(lbas, (SGPP << cbe_lun->pblockexp) - lbaoff); + sgs = (lbas + lbaoff + be_lun->pblockmul - 1) >> cbe_lun->pblockexp; + off = lbaoff * cbe_lun->blocksize; + op = (ARGS(io)->flags & CTL_LLF_WRITE) ? GP_WRITE : GP_READ; + if (sgs > 1) { io->scsiio.kern_data_ptr = malloc(sizeof(struct ctl_sg_entry) * - sg_filled, M_RAMDISK, - M_WAITOK); + sgs, M_RAMDISK, M_WAITOK); sg_entries = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; - for (i = 0, len_filled = 0; i < sg_filled; i++) { - sg_entries[i].addr = softc->ramdisk_pages[i]; - sg_entries[i].len = MIN(PAGE_SIZE, len - len_filled); - len_filled += sg_entries[i].len; + len = lbas * cbe_lun->blocksize; + for (i = 0; i < sgs; i++) { + page = ctl_backend_ramdisk_getpage(be_lun, + (lba >> cbe_lun->pblockexp) + i, op); + if (page == P_UNMAPPED || page == P_ANCHORED) { + free(io->scsiio.kern_data_ptr, M_RAMDISK); +nospc: + ctl_set_space_alloc_fail(&io->scsiio); + ctl_data_submit_done(io); + return; + } + sg_entries[i].addr = page + off; + sg_entries[i].len = MIN(len, be_lun->pblocksize - off); + len -= sg_entries[i].len; + off = 0; } } else { - sg_filled = 0; - len_filled = len; - io->scsiio.kern_data_ptr = softc->ramdisk_pages[0]; + page = ctl_backend_ramdisk_getpage(be_lun, + lba >> cbe_lun->pblockexp, op); + if (page == P_UNMAPPED || page == P_ANCHORED) + goto nospc; + sgs = 0; + io->scsiio.kern_data_ptr = page + off; } -#else - sg_filled = 0; - len_filled = min(len, softc->rd_size); - io->scsiio.kern_data_ptr = softc->ramdisk_buffer; -#endif /* CTL_RAMDISK_PAGES */ io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_data_len = len_filled; - io->scsiio.kern_sg_entries = sg_filled; + io->scsiio.kern_data_len = lbas * cbe_lun->blocksize; + io->scsiio.kern_sg_entries = sgs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer -= len_filled; + PRIV(io)->len += lbas; #ifdef CTL_TIME_IO getbinuptime(&io->io_hdr.dma_start_bt); #endif ctl_datamove(io); } +static int +ctl_backend_ramdisk_submit(union ctl_io *io) +{ + struct ctl_lba_len_flags *lbalen = ARGS(io); + + if (lbalen->flags & CTL_LLF_VERIFY) { + ctl_set_success(&io->scsiio); + ctl_data_submit_done(io); + return (CTL_RETVAL_COMPLETE); + } + PRIV(io)->len = 0; + if (lbalen->flags & CTL_LLF_COMPARE) + ctl_backend_ramdisk_compare(io); + else + ctl_backend_ramdisk_rw(io); + return (CTL_RETVAL_COMPLETE); +} + static void ctl_backend_ramdisk_worker(void *context, int pending) { @@ -327,7 +556,6 @@ ctl_backend_ramdisk_worker(void *context union ctl_io *io; be_lun = (struct ctl_be_ramdisk_lun *)context; - mtx_lock(&be_lun->queue_lock); for (;;) { io = (union ctl_io *)STAILQ_FIRST(&be_lun->cont_queue); @@ -335,7 +563,10 @@ ctl_backend_ramdisk_worker(void *context STAILQ_REMOVE(&be_lun->cont_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); - ctl_backend_ramdisk_continue(io); + if (ARGS(io)->flags & CTL_LLF_COMPARE) + ctl_backend_ramdisk_compare(io); + else + ctl_backend_ramdisk_rw(io); mtx_lock(&be_lun->queue_lock); continue; } @@ -350,6 +581,259 @@ ctl_backend_ramdisk_worker(void *context } static int +ctl_backend_ramdisk_gls(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct scsi_get_lba_status_data *data; + uint8_t *page; + u_int lbaoff; + + data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; + scsi_u64to8b(ARGS(io)->lba, data->descr[0].addr); + lbaoff = ARGS(io)->lba & ~(UINT_MAX << cbe_lun->pblockexp); + scsi_ulto4b(be_lun->pblockmul - lbaoff, data->descr[0].length); + page = ctl_backend_ramdisk_getpage(be_lun, + ARGS(io)->lba >> cbe_lun->pblockexp, GP_OTHER); + if (page == P_UNMAPPED) + data->descr[0].status = 1; + else if (page == P_ANCHORED) + data->descr[0].status = 2; + else + data->descr[0].status = 0; + ctl_config_read_done(io); + return (CTL_RETVAL_COMPLETE); +} + +static int +ctl_backend_ramdisk_config_read(union ctl_io *io) +{ + int retval = 0; + + switch (io->scsiio.cdb[0]) { + case SERVICE_ACTION_IN: + if (io->scsiio.cdb[1] == SGLS_SERVICE_ACTION) { + retval = ctl_backend_ramdisk_gls(io); + break; + } + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 1, + /*bit*/ 4); + ctl_config_read_done(io); + retval = CTL_RETVAL_COMPLETE; + break; + default: + ctl_set_invalid_opcode(&io->scsiio); + ctl_config_read_done(io); + retval = CTL_RETVAL_COMPLETE; + break; + } + return (retval); +} + +static void +ctl_backend_ramdisk_delete(struct ctl_be_lun *cbe_lun, off_t lba, off_t len, + int anchor) +{ + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + uint8_t *page; + uint64_t p, lp; + u_int lbaoff; + getpage_op_t op = anchor ? GP_ANCHOR : GP_OTHER; + + /* Partially zero first partial page. */ + p = lba >> cbe_lun->pblockexp; + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + if (lbaoff != 0) { + page = ctl_backend_ramdisk_getpage(be_lun, p, op); + if (page != P_UNMAPPED && page != P_ANCHORED) { + memset(page + lbaoff * cbe_lun->blocksize, 0, + min(len, be_lun->pblockmul - lbaoff) * + cbe_lun->blocksize); + } + p++; + } + + /* Partially zero last partial page. */ + lp = (lba + len) >> cbe_lun->pblockexp; + lbaoff = (lba + len) & ~(UINT_MAX << cbe_lun->pblockexp); + if (p <= lp && lbaoff != 0) { + page = ctl_backend_ramdisk_getpage(be_lun, lp, op); + if (page != P_UNMAPPED && page != P_ANCHORED) + memset(page, 0, lbaoff * cbe_lun->blocksize); + } + + /* Delete remaining full pages. */ + if (anchor) { + for (; p < lp; p++) + ctl_backend_ramdisk_anchorpage(be_lun, p); + } else { + for (; p < lp; p++) + ctl_backend_ramdisk_unmappage(be_lun, p); + } +} + +static void +ctl_backend_ramdisk_ws(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_lba_len_flags *lbalen = ARGS(io); + uint8_t *page; + uint64_t lba; + u_int lbaoff, lbas; + + if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR | SWS_NDOB)) { + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_config_write_done(io); + return; + } + if (lbalen->flags & SWS_UNMAP) { + ctl_backend_ramdisk_delete(cbe_lun, lbalen->lba, lbalen->len, + (lbalen->flags & SWS_ANCHOR) != 0); + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + return; + } + + for (lba = lbalen->lba, lbas = lbalen->len; lbas > 0; lba++, lbas--) { + page = ctl_backend_ramdisk_getpage(be_lun, + lba >> cbe_lun->pblockexp, GP_WRITE); + if (page == P_UNMAPPED || page == P_ANCHORED) { + ctl_set_space_alloc_fail(&io->scsiio); + ctl_data_submit_done(io); + return; + } + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + page += lbaoff * cbe_lun->blocksize; + if (lbalen->flags & SWS_NDOB) { + memset(page, 0, cbe_lun->blocksize); + } else { + memcpy(page, io->scsiio.kern_data_ptr, + cbe_lun->blocksize); + } + if (lbalen->flags & SWS_LBDATA) + scsi_ulto4b(lba, page); + } + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); +} + +static void +ctl_backend_ramdisk_unmap(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_ptr_len_flags *ptrlen = (struct ctl_ptr_len_flags *)ARGS(io); + struct scsi_unmap_desc *buf, *end; + + if ((ptrlen->flags & ~SU_ANCHOR) != 0) { + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 0, + /*command*/ 0, + /*field*/ 0, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_config_write_done(io); + return; + } + + buf = (struct scsi_unmap_desc *)ptrlen->ptr; + end = buf + ptrlen->len / sizeof(*buf); + for (; buf < end; buf++) { + ctl_backend_ramdisk_delete(cbe_lun, + scsi_8btou64(buf->lba), scsi_4btoul(buf->length), + (ptrlen->flags & SU_ANCHOR) != 0); + } + + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); +} + +static int +ctl_backend_ramdisk_config_write(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + int retval = 0; + + switch (io->scsiio.cdb[0]) { + case SYNCHRONIZE_CACHE: + case SYNCHRONIZE_CACHE_16: + /* We have no cache to flush. */ + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + case START_STOP_UNIT: { + struct scsi_start_stop_unit *cdb; + + cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; + if ((cdb->how & SSS_PC_MASK) != 0) { + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + } + if (cdb->how & SSS_START) { + if (cdb->how & SSS_LOEJ) + ctl_lun_has_media(cbe_lun); + ctl_start_lun(cbe_lun); + } else { + ctl_stop_lun(cbe_lun); + if (cdb->how & SSS_LOEJ) + ctl_lun_ejected(cbe_lun); + } + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + } + case PREVENT_ALLOW: + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + case WRITE_SAME_10: + case WRITE_SAME_16: + ctl_backend_ramdisk_ws(io); + break; + case UNMAP: + ctl_backend_ramdisk_unmap(io); + break; + default: + ctl_set_invalid_opcode(&io->scsiio); + ctl_config_write_done(io); + retval = CTL_RETVAL_COMPLETE; + break; + } + + return (retval); +} + +static uint64_t +ctl_backend_ramdisk_lun_attr(void *arg, const char *attrname) +{ + struct ctl_be_ramdisk_lun *be_lun = arg; + uint64_t val; + + val = UINT64_MAX; + if (be_lun->cap_bytes == 0) + return (val); + sx_slock(&be_lun->page_lock); + if (strcmp(attrname, "blocksused") == 0) { + val = be_lun->cap_used / be_lun->cbe_lun.blocksize; + } else if (strcmp(attrname, "blocksavail") == 0) { + val = (be_lun->cap_bytes - be_lun->cap_used) / + be_lun->cbe_lun.blocksize; + } + sx_sunlock(&be_lun->page_lock); + return (val); +} + +static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { @@ -466,6 +950,9 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram taskqueue_drain_all(be_lun->io_taskqueue); taskqueue_free(be_lun->io_taskqueue); ctl_free_opts(&be_lun->cbe_lun.options); + free(be_lun->zero_page, M_RAMDISK); + ctl_backend_ramdisk_freeallpages(be_lun->pages, be_lun->indir); + sx_destroy(&be_lun->page_lock); mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } @@ -487,6 +974,7 @@ ctl_backend_ramdisk_create(struct ctl_be struct ctl_lun_create_params *params; char *value; char tmpstr[32]; + uint64_t t; int retval; retval = 0; @@ -513,6 +1001,19 @@ ctl_backend_ramdisk_create(struct ctl_be } else if (control_softc->flags & CTL_FLAG_ACTIVE_SHELF) cbe_lun->flags |= CTL_LUN_FLAG_PRIMARY; + be_lun->pblocksize = PAGE_SIZE; + value = ctl_get_opt(&cbe_lun->options, "pblocksize"); + if (value != NULL) { + ctl_expand_number(value, &t); + be_lun->pblocksize = t; + } + if (be_lun->pblocksize < 512 || be_lun->pblocksize > 131072) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: unsupported pblocksize %u", __func__, + be_lun->pblocksize); + goto bailout_error; + } + if (cbe_lun->lun_type == T_DIRECT || cbe_lun->lun_type == T_CDROM) { if (params->blocksize_bytes != 0) @@ -521,6 +1022,14 @@ ctl_backend_ramdisk_create(struct ctl_be cbe_lun->blocksize = 2048; else cbe_lun->blocksize = 512; + be_lun->pblockmul = be_lun->pblocksize / cbe_lun->blocksize; + if (be_lun->pblockmul < 1 || !powerof2(be_lun->pblockmul)) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: pblocksize %u not exp2 of blocksize %u", + __func__, + be_lun->pblocksize, cbe_lun->blocksize); + goto bailout_error; + } if (params->lun_size_bytes < cbe_lun->blocksize) { snprintf(req->error_str, sizeof(req->error_str), "%s: LUN size %ju < blocksize %u", __func__, @@ -529,9 +1038,25 @@ ctl_backend_ramdisk_create(struct ctl_be } be_lun->size_blocks = params->lun_size_bytes / cbe_lun->blocksize; be_lun->size_bytes = be_lun->size_blocks * cbe_lun->blocksize; + be_lun->indir = 0; + t = be_lun->size_bytes / be_lun->pblocksize; + while (t > 1) { + t /= PPP; + be_lun->indir++; + } cbe_lun->maxlba = be_lun->size_blocks - 1; - cbe_lun->atomicblock = UINT32_MAX; - cbe_lun->opttxferlen = softc->rd_size / cbe_lun->blocksize; + cbe_lun->pblockexp = fls(be_lun->pblockmul) - 1; + cbe_lun->pblockoff = 0; + cbe_lun->ublockexp = cbe_lun->pblockexp; + cbe_lun->ublockoff = 0; + cbe_lun->atomicblock = be_lun->pblocksize; + cbe_lun->opttxferlen = SGPP * be_lun->pblocksize; + value = ctl_get_opt(&cbe_lun->options, "capacity"); + if (value != NULL) + ctl_expand_number(value, &be_lun->cap_bytes); + } else { + be_lun->pblockmul = 1; + cbe_lun->pblockexp = 0; } /* Tell the user the blocksize we ended up using */ @@ -539,7 +1064,7 @@ ctl_backend_ramdisk_create(struct ctl_be params->lun_size_bytes = be_lun->size_bytes; value = ctl_get_opt(&cbe_lun->options, "unmap"); - if (value != NULL && strcmp(value, "on") == 0) + if (value == NULL || strcmp(value, "off") != 0) cbe_lun->flags |= CTL_LUN_FLAG_UNMAP; value = ctl_get_opt(&cbe_lun->options, "readonly"); if (value != NULL) { @@ -594,6 +1119,11 @@ ctl_backend_ramdisk_create(struct ctl_be } STAILQ_INIT(&be_lun->cont_queue); + sx_init(&be_lun->page_lock, "cram page lock"); + if (be_lun->cap_bytes == 0) + be_lun->pages = malloc(be_lun->pblocksize, M_RAMDISK, M_WAITOK); + be_lun->zero_page = malloc(be_lun->pblocksize, M_RAMDISK, + M_WAITOK|M_ZERO); mtx_init(&be_lun->queue_lock, "cram queue lock", NULL, MTX_DEF); TASK_INIT(&be_lun->io_task, /*priority*/0, ctl_backend_ramdisk_worker, be_lun); @@ -668,10 +1198,12 @@ ctl_backend_ramdisk_create(struct ctl_be bailout_error: req->status = CTL_LUN_ERROR; if (be_lun != NULL) { - if (be_lun->io_taskqueue != NULL) { + if (be_lun->io_taskqueue != NULL) taskqueue_free(be_lun->io_taskqueue); - } ctl_free_opts(&cbe_lun->options); + free(be_lun->zero_page, M_RAMDISK); + ctl_backend_ramdisk_freeallpages(be_lun->pages, be_lun->indir); + sx_destroy(&be_lun->page_lock); mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } @@ -827,103 +1359,3 @@ ctl_backend_ramdisk_lun_config_status(vo } mtx_unlock(&softc->lock); } - -static int -ctl_backend_ramdisk_config_write(union ctl_io *io) -{ - struct ctl_be_lun *cbe_lun; - int retval; - - cbe_lun = CTL_BACKEND_LUN(io); - retval = 0; - switch (io->scsiio.cdb[0]) { - case SYNCHRONIZE_CACHE: - case SYNCHRONIZE_CACHE_16: - /* - * The upper level CTL code will filter out any CDBs with - * the immediate bit set and return the proper error. It - * will also not allow a sync cache command to go to a LUN - * that is powered down. - * - * We don't really need to worry about what LBA range the - * user asked to be synced out. When they issue a sync - * cache command, we'll sync out the whole thing. - * - * This is obviously just a stubbed out implementation. - * The real implementation will be in the RAIDCore/CTL *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 7 01:58:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EDFDCD3A9E; Tue, 7 Feb 2017 01:58:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF6D2A0B; Tue, 7 Feb 2017 01:58:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v171w2Cx099869; Tue, 7 Feb 2017 01:58:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v171w2kL099867; Tue, 7 Feb 2017 01:58:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702070158.v171w2kL099867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Feb 2017 01:58: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: r313371 - in stable/10: sys/cam/ctl usr.sbin/ctladm 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 01:58:04 -0000 Author: mav Date: Tue Feb 7 01:58:02 2017 New Revision: 313371 URL: https://svnweb.freebsd.org/changeset/base/313371 Log: MFC r312694: Make CTL ramdisk backend a real RAM disk. If "capacity" LU option is set, ramdisk backend now implements featured thin provisioned disk, storing data in malloc(9) allocated memory blocks of pblocksize bytes (default PAGE_SIZE or 4KB). Additionally ~0.2% of LU size is used for indirection tree (bigger pblocksize reduce the overhead). Backend supports all unmap and anchor operations. If configured capacity is overflowed, proper error conditions are reported. If "capacity" LU option is not set, the backend operates mostly the same as before without allocating real storage: writes go to nowhere, reads return zeroes, reporting that all LBAs are unmapped. This backend is still mostly oriented on testing and benchmarking (it is still a volatile RAM disk), but now it should allow to run real FS tests, not only simple dumb dd. Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:57:29 2017 (r313370) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 7 01:58:02 2017 (r313371) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2003, 2008 Silicon Graphics International Corp. * Copyright (c) 2012 The FreeBSD Foundation - * Copyright (c) 2014-2015 Alexander Motin + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Portions of this software were developed by Edward Tomasz Napierala @@ -35,7 +35,7 @@ * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_ramdisk.c#3 $ */ /* - * CAM Target Layer backend for a "fake" ramdisk. + * CAM Target Layer black hole and RAM disk backend. * * Author: Ken Merry */ @@ -48,9 +48,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -71,6 +73,29 @@ __FBSDID("$FreeBSD$"); #include #include +#define PRIV(io) \ + ((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND]) +#define ARGS(io) \ + ((struct ctl_lba_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]) + +#define PPP (PAGE_SIZE / sizeof(uint8_t **)) +#ifdef __LP64__ +#define PPPS (PAGE_SHIFT - 3) +#else +#define PPPS (PAGE_SHIFT - 2) +#endif +#define SGPP (PAGE_SIZE / sizeof(struct ctl_sg_entry)) + +#define P_UNMAPPED NULL /* Page is unmapped. */ +#define P_ANCHORED ((void *)(uintptr_t)1) /* Page is anchored. */ + +typedef enum { + GP_READ, /* Return data page or zero page. */ + GP_WRITE, /* Return data page, try allocate if none. */ + GP_ANCHOR, /* Return data page, try anchor if none. */ + GP_OTHER, /* Return what present, do not allocate/anchor. */ +} getpage_op_t; + typedef enum { CTL_BE_RAMDISK_LUN_UNCONFIGURED = 0x01, CTL_BE_RAMDISK_LUN_CONFIG_ERR = 0x02, @@ -79,28 +104,29 @@ typedef enum { struct ctl_be_ramdisk_lun { struct ctl_lun_create_params params; - char lunname[32]; - uint64_t size_bytes; - uint64_t size_blocks; + char lunname[32]; + int indir; + uint8_t **pages; + uint8_t *zero_page; + struct sx page_lock; + u_int pblocksize; + u_int pblockmul; + uint64_t size_bytes; + uint64_t size_blocks; + uint64_t cap_bytes; + uint64_t cap_used; struct ctl_be_ramdisk_softc *softc; ctl_be_ramdisk_lun_flags flags; STAILQ_ENTRY(ctl_be_ramdisk_lun) links; - struct ctl_be_lun cbe_lun; - struct taskqueue *io_taskqueue; - struct task io_task; + struct ctl_be_lun cbe_lun; + struct taskqueue *io_taskqueue; + struct task io_task; STAILQ_HEAD(, ctl_io_hdr) cont_queue; - struct mtx_padalign queue_lock; + struct mtx_padalign queue_lock; }; struct ctl_be_ramdisk_softc { struct mtx lock; - int rd_size; -#ifdef CTL_RAMDISK_PAGES - uint8_t **ramdisk_pages; - int num_pages; -#else - uint8_t *ramdisk_buffer; -#endif int num_luns; STAILQ_HEAD(, ctl_be_ramdisk_lun) lun_list; }; @@ -111,8 +137,13 @@ extern struct ctl_softc *control_softc; static int ctl_backend_ramdisk_init(void); static int ctl_backend_ramdisk_shutdown(void); static int ctl_backend_ramdisk_move_done(union ctl_io *io); +static void ctl_backend_ramdisk_compare(union ctl_io *io); +static void ctl_backend_ramdisk_rw(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); -static void ctl_backend_ramdisk_continue(union ctl_io *io); +static void ctl_backend_ramdisk_worker(void *context, int pending); +static int ctl_backend_ramdisk_config_read(union ctl_io *io); +static int ctl_backend_ramdisk_config_write(union ctl_io *io); +static uint64_t ctl_backend_ramdisk_lun_attr(void *be_lun, const char *attrname); static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); static int ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc, @@ -121,12 +152,9 @@ static int ctl_backend_ramdisk_create(st struct ctl_lun_req *req); static int ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, struct ctl_lun_req *req); -static void ctl_backend_ramdisk_worker(void *context, int pending); static void ctl_backend_ramdisk_lun_shutdown(void *be_lun); static void ctl_backend_ramdisk_lun_config_status(void *be_lun, ctl_lun_config_status status); -static int ctl_backend_ramdisk_config_write(union ctl_io *io); -static int ctl_backend_ramdisk_config_read(union ctl_io *io); static struct ctl_backend_driver ctl_be_ramdisk_driver = { @@ -138,36 +166,21 @@ static struct ctl_backend_driver ctl_be_ .data_move_done = ctl_backend_ramdisk_move_done, .config_read = ctl_backend_ramdisk_config_read, .config_write = ctl_backend_ramdisk_config_write, - .ioctl = ctl_backend_ramdisk_ioctl + .ioctl = ctl_backend_ramdisk_ioctl, + .lun_attr = ctl_backend_ramdisk_lun_attr, }; MALLOC_DEFINE(M_RAMDISK, "ramdisk", "Memory used for CTL RAMdisk"); CTL_BACKEND_DECLARE(cbr, ctl_be_ramdisk_driver); -int +static int ctl_backend_ramdisk_init(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; -#ifdef CTL_RAMDISK_PAGES - int i; -#endif memset(softc, 0, sizeof(*softc)); mtx_init(&softc->lock, "ctlramdisk", NULL, MTX_DEF); STAILQ_INIT(&softc->lun_list); - softc->rd_size = 1024 * 1024; -#ifdef CTL_RAMDISK_PAGES - softc->num_pages = softc->rd_size / PAGE_SIZE; - softc->ramdisk_pages = (uint8_t **)malloc(sizeof(uint8_t *) * - softc->num_pages, M_RAMDISK, - M_WAITOK); - for (i = 0; i < softc->num_pages; i++) - softc->ramdisk_pages[i] = malloc(PAGE_SIZE, M_RAMDISK,M_WAITOK); -#else - softc->ramdisk_buffer = (uint8_t *)malloc(softc->rd_size, M_RAMDISK, - M_WAITOK); -#endif - return (0); } @@ -176,9 +189,6 @@ ctl_backend_ramdisk_shutdown(void) { struct ctl_be_ramdisk_softc *softc = &rd_softc; struct ctl_be_ramdisk_lun *lun, *next_lun; -#ifdef CTL_RAMDISK_PAGES - int i; -#endif mtx_lock(&softc->lock); STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) { @@ -193,30 +203,210 @@ ctl_backend_ramdisk_shutdown(void) mtx_lock(&softc->lock); } mtx_unlock(&softc->lock); - -#ifdef CTL_RAMDISK_PAGES - for (i = 0; i < softc->num_pages; i++) - free(softc->ramdisk_pages[i], M_RAMDISK); - free(softc->ramdisk_pages, M_RAMDISK); -#else - free(softc->ramdisk_buffer, M_RAMDISK); -#endif mtx_destroy(&softc->lock); return (0); } +static uint8_t * +ctl_backend_ramdisk_getpage(struct ctl_be_ramdisk_lun *be_lun, off_t pn, + getpage_op_t op) +{ + uint8_t **p, ***pp; + off_t i; + int s; + + if (be_lun->cap_bytes == 0) { + switch (op) { + case GP_READ: + return (be_lun->zero_page); + case GP_WRITE: + return ((uint8_t *)be_lun->pages); + case GP_ANCHOR: + return (P_ANCHORED); + default: + return (P_UNMAPPED); + } + } + if (op == GP_WRITE || op == GP_ANCHOR) { + sx_xlock(&be_lun->page_lock); + pp = &be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (*pp == NULL) { + *pp = malloc(PAGE_SIZE, M_RAMDISK, + M_WAITOK|M_ZERO); + } + i = pn >> s; + pp = (uint8_t ***)&(*pp)[i]; + pn -= i << s; + } + if (*pp == P_UNMAPPED && be_lun->cap_used < be_lun->cap_bytes) { + if (op == GP_WRITE) { + *pp = malloc(be_lun->pblocksize, M_RAMDISK, + M_WAITOK|M_ZERO); + } else + *pp = P_ANCHORED; + be_lun->cap_used += be_lun->pblocksize; + } else if (*pp == P_ANCHORED && op == GP_WRITE) { + *pp = malloc(be_lun->pblocksize, M_RAMDISK, + M_WAITOK|M_ZERO); + } + sx_xunlock(&be_lun->page_lock); + return ((uint8_t *)*pp); + } else { + sx_slock(&be_lun->page_lock); + p = be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (p == NULL) + break; + i = pn >> s; + p = (uint8_t **)p[i]; + pn -= i << s; + } + sx_sunlock(&be_lun->page_lock); + if ((p == P_UNMAPPED || p == P_ANCHORED) && op == GP_READ) + return (be_lun->zero_page); + return ((uint8_t *)p); + } +}; + +static void +ctl_backend_ramdisk_unmappage(struct ctl_be_ramdisk_lun *be_lun, off_t pn) +{ + uint8_t ***pp; + off_t i; + int s; + + if (be_lun->cap_bytes == 0) + return; + sx_xlock(&be_lun->page_lock); + pp = &be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (*pp == NULL) + goto noindir; + i = pn >> s; + pp = (uint8_t ***)&(*pp)[i]; + pn -= i << s; + } + if (*pp == P_ANCHORED) { + be_lun->cap_used -= be_lun->pblocksize; + *pp = P_UNMAPPED; + } else if (*pp != P_UNMAPPED) { + free(*pp, M_RAMDISK); + be_lun->cap_used -= be_lun->pblocksize; + *pp = P_UNMAPPED; + } +noindir: + sx_xunlock(&be_lun->page_lock); +}; + +static void +ctl_backend_ramdisk_anchorpage(struct ctl_be_ramdisk_lun *be_lun, off_t pn) +{ + uint8_t ***pp; + off_t i; + int s; + + if (be_lun->cap_bytes == 0) + return; + sx_xlock(&be_lun->page_lock); + pp = &be_lun->pages; + for (s = (be_lun->indir - 1) * PPPS; s >= 0; s -= PPPS) { + if (*pp == NULL) + goto noindir; + i = pn >> s; + pp = (uint8_t ***)&(*pp)[i]; + pn -= i << s; + } + if (*pp == P_UNMAPPED && be_lun->cap_used < be_lun->cap_bytes) { + be_lun->cap_used += be_lun->pblocksize; + *pp = P_ANCHORED; + } else if (*pp != P_ANCHORED) { + free(*pp, M_RAMDISK); + *pp = P_ANCHORED; + } +noindir: + sx_xunlock(&be_lun->page_lock); +}; + +static void +ctl_backend_ramdisk_freeallpages(uint8_t **p, int indir) +{ + int i; + + if (p == NULL) + return; + if (indir == 0) { + free(p, M_RAMDISK); + return; + } + for (i = 0; i < PPP; i++) { + if (p[i] == NULL) + continue; + ctl_backend_ramdisk_freeallpages((uint8_t **)p[i], indir - 1); + } + free(p, M_RAMDISK); +}; + +static size_t +cmp(uint8_t *a, uint8_t *b, size_t size) +{ + size_t i; + + for (i = 0; i < size; i++) { + if (a[i] != b[i]) + break; + } + return (i); +} + +static int +ctl_backend_ramdisk_cmp(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + uint8_t *page; + uint8_t info[8]; + uint64_t lba; + u_int lbaoff, lbas, res, off; + + lbas = io->scsiio.kern_data_len / cbe_lun->blocksize; + lba = ARGS(io)->lba + PRIV(io)->len - lbas; + off = 0; + for (; lbas > 0; lbas--, lba++) { + page = ctl_backend_ramdisk_getpage(be_lun, + lba >> cbe_lun->pblockexp, GP_READ); + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + page += lbaoff * cbe_lun->blocksize; + res = cmp(io->scsiio.kern_data_ptr + off, page, + cbe_lun->blocksize); + off += res; + if (res < cbe_lun->blocksize) + break; + } + if (lbas > 0) { + off += io->scsiio.kern_rel_offset - io->scsiio.kern_data_len; + scsi_u64to8b(off, info); + ctl_set_sense(&io->scsiio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_MISCOMPARE, + /*asc*/ 0x1D, /*ascq*/ 0x00, + /*type*/ SSD_ELEM_INFO, + /*size*/ sizeof(info), /*data*/ &info, + /*type*/ SSD_ELEM_NONE); + return (1); + } + return (0); +} + static int ctl_backend_ramdisk_move_done(union ctl_io *io) { - struct ctl_be_lun *cbe_lun; - struct ctl_be_ramdisk_lun *be_lun; + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; #ifdef CTL_TIME_IO struct bintime cur_bt; #endif CTL_DEBUG_PRINT(("ctl_backend_ramdisk_move_done\n")); - cbe_lun = CTL_BACKEND_LUN(io); - be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun->be_lun; #ifdef CTL_TIME_IO getbinuptime(&cur_bt); bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); @@ -240,7 +430,12 @@ ctl_backend_ramdisk_move_done(union ctl_ ctl_set_invalid_field_ciu(&io->scsiio); } else if ((io->io_hdr.port_status == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { - if (io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer > 0) { + if (ARGS(io)->flags & CTL_LLF_COMPARE) { + /* We have data block ready for comparison. */ + if (ctl_backend_ramdisk_cmp(io)) + goto done; + } + if (ARGS(io)->len > PRIV(io)->len) { mtx_lock(&be_lun->queue_lock); STAILQ_INSERT_TAIL(&be_lun->cont_queue, &io->io_hdr, links); @@ -251,75 +446,109 @@ ctl_backend_ramdisk_move_done(union ctl_ } ctl_set_success(&io->scsiio); } +done: ctl_data_submit_done(io); return(0); } -static int -ctl_backend_ramdisk_submit(union ctl_io *io) +static void +ctl_backend_ramdisk_compare(union ctl_io *io) { - struct ctl_be_lun *cbe_lun; - struct ctl_lba_len_flags *lbalen; + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + u_int lbas, len; - cbe_lun = CTL_BACKEND_LUN(io); - lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - if (lbalen->flags & CTL_LLF_VERIFY) { - ctl_set_success(&io->scsiio); - ctl_data_submit_done(io); - return (CTL_RETVAL_COMPLETE); - } - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer = - lbalen->len * cbe_lun->blocksize; - ctl_backend_ramdisk_continue(io); - return (CTL_RETVAL_COMPLETE); + lbas = ARGS(io)->len - PRIV(io)->len; + lbas = MIN(lbas, 131072 / cbe_lun->blocksize); + len = lbas * cbe_lun->blocksize; + + io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; + io->scsiio.kern_data_ptr = malloc(len, M_RAMDISK, M_WAITOK); + io->scsiio.kern_data_len = len; + io->scsiio.kern_sg_entries = 0; + io->io_hdr.flags |= CTL_FLAG_ALLOCATED; + PRIV(io)->len += lbas; +#ifdef CTL_TIME_IO + getbinuptime(&io->io_hdr.dma_start_bt); +#endif + ctl_datamove(io); } static void -ctl_backend_ramdisk_continue(union ctl_io *io) +ctl_backend_ramdisk_rw(union ctl_io *io) { - struct ctl_be_ramdisk_softc *softc; - int len, len_filled, sg_filled; -#ifdef CTL_RAMDISK_PAGES + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; struct ctl_sg_entry *sg_entries; - int i; -#endif - - softc = &rd_softc; - len = io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer; -#ifdef CTL_RAMDISK_PAGES - sg_filled = min(btoc(len), softc->num_pages); - if (sg_filled > 1) { + uint8_t *page; + uint64_t lba; + u_int i, len, lbaoff, lbas, sgs, off; + getpage_op_t op; + + lba = ARGS(io)->lba + PRIV(io)->len; + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + lbas = ARGS(io)->len - PRIV(io)->len; + lbas = MIN(lbas, (SGPP << cbe_lun->pblockexp) - lbaoff); + sgs = (lbas + lbaoff + be_lun->pblockmul - 1) >> cbe_lun->pblockexp; + off = lbaoff * cbe_lun->blocksize; + op = (ARGS(io)->flags & CTL_LLF_WRITE) ? GP_WRITE : GP_READ; + if (sgs > 1) { io->scsiio.kern_data_ptr = malloc(sizeof(struct ctl_sg_entry) * - sg_filled, M_RAMDISK, - M_WAITOK); + sgs, M_RAMDISK, M_WAITOK); sg_entries = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; - for (i = 0, len_filled = 0; i < sg_filled; i++) { - sg_entries[i].addr = softc->ramdisk_pages[i]; - sg_entries[i].len = MIN(PAGE_SIZE, len - len_filled); - len_filled += sg_entries[i].len; + len = lbas * cbe_lun->blocksize; + for (i = 0; i < sgs; i++) { + page = ctl_backend_ramdisk_getpage(be_lun, + (lba >> cbe_lun->pblockexp) + i, op); + if (page == P_UNMAPPED || page == P_ANCHORED) { + free(io->scsiio.kern_data_ptr, M_RAMDISK); +nospc: + ctl_set_space_alloc_fail(&io->scsiio); + ctl_data_submit_done(io); + return; + } + sg_entries[i].addr = page + off; + sg_entries[i].len = MIN(len, be_lun->pblocksize - off); + len -= sg_entries[i].len; + off = 0; } } else { - sg_filled = 0; - len_filled = len; - io->scsiio.kern_data_ptr = softc->ramdisk_pages[0]; + page = ctl_backend_ramdisk_getpage(be_lun, + lba >> cbe_lun->pblockexp, op); + if (page == P_UNMAPPED || page == P_ANCHORED) + goto nospc; + sgs = 0; + io->scsiio.kern_data_ptr = page + off; } -#else - sg_filled = 0; - len_filled = min(len, softc->rd_size); - io->scsiio.kern_data_ptr = softc->ramdisk_buffer; -#endif /* CTL_RAMDISK_PAGES */ io->scsiio.be_move_done = ctl_backend_ramdisk_move_done; - io->scsiio.kern_data_len = len_filled; - io->scsiio.kern_sg_entries = sg_filled; + io->scsiio.kern_data_len = lbas * cbe_lun->blocksize; + io->scsiio.kern_sg_entries = sgs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; - io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer -= len_filled; + PRIV(io)->len += lbas; #ifdef CTL_TIME_IO getbinuptime(&io->io_hdr.dma_start_bt); #endif ctl_datamove(io); } +static int +ctl_backend_ramdisk_submit(union ctl_io *io) +{ + struct ctl_lba_len_flags *lbalen = ARGS(io); + + if (lbalen->flags & CTL_LLF_VERIFY) { + ctl_set_success(&io->scsiio); + ctl_data_submit_done(io); + return (CTL_RETVAL_COMPLETE); + } + PRIV(io)->len = 0; + if (lbalen->flags & CTL_LLF_COMPARE) + ctl_backend_ramdisk_compare(io); + else + ctl_backend_ramdisk_rw(io); + return (CTL_RETVAL_COMPLETE); +} + static void ctl_backend_ramdisk_worker(void *context, int pending) { @@ -327,7 +556,6 @@ ctl_backend_ramdisk_worker(void *context union ctl_io *io; be_lun = (struct ctl_be_ramdisk_lun *)context; - mtx_lock(&be_lun->queue_lock); for (;;) { io = (union ctl_io *)STAILQ_FIRST(&be_lun->cont_queue); @@ -335,7 +563,10 @@ ctl_backend_ramdisk_worker(void *context STAILQ_REMOVE(&be_lun->cont_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); - ctl_backend_ramdisk_continue(io); + if (ARGS(io)->flags & CTL_LLF_COMPARE) + ctl_backend_ramdisk_compare(io); + else + ctl_backend_ramdisk_rw(io); mtx_lock(&be_lun->queue_lock); continue; } @@ -350,6 +581,259 @@ ctl_backend_ramdisk_worker(void *context } static int +ctl_backend_ramdisk_gls(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct scsi_get_lba_status_data *data; + uint8_t *page; + u_int lbaoff; + + data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; + scsi_u64to8b(ARGS(io)->lba, data->descr[0].addr); + lbaoff = ARGS(io)->lba & ~(UINT_MAX << cbe_lun->pblockexp); + scsi_ulto4b(be_lun->pblockmul - lbaoff, data->descr[0].length); + page = ctl_backend_ramdisk_getpage(be_lun, + ARGS(io)->lba >> cbe_lun->pblockexp, GP_OTHER); + if (page == P_UNMAPPED) + data->descr[0].status = 1; + else if (page == P_ANCHORED) + data->descr[0].status = 2; + else + data->descr[0].status = 0; + ctl_config_read_done(io); + return (CTL_RETVAL_COMPLETE); +} + +static int +ctl_backend_ramdisk_config_read(union ctl_io *io) +{ + int retval = 0; + + switch (io->scsiio.cdb[0]) { + case SERVICE_ACTION_IN: + if (io->scsiio.cdb[1] == SGLS_SERVICE_ACTION) { + retval = ctl_backend_ramdisk_gls(io); + break; + } + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 1, + /*bit*/ 4); + ctl_config_read_done(io); + retval = CTL_RETVAL_COMPLETE; + break; + default: + ctl_set_invalid_opcode(&io->scsiio); + ctl_config_read_done(io); + retval = CTL_RETVAL_COMPLETE; + break; + } + return (retval); +} + +static void +ctl_backend_ramdisk_delete(struct ctl_be_lun *cbe_lun, off_t lba, off_t len, + int anchor) +{ + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + uint8_t *page; + uint64_t p, lp; + u_int lbaoff; + getpage_op_t op = anchor ? GP_ANCHOR : GP_OTHER; + + /* Partially zero first partial page. */ + p = lba >> cbe_lun->pblockexp; + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + if (lbaoff != 0) { + page = ctl_backend_ramdisk_getpage(be_lun, p, op); + if (page != P_UNMAPPED && page != P_ANCHORED) { + memset(page + lbaoff * cbe_lun->blocksize, 0, + min(len, be_lun->pblockmul - lbaoff) * + cbe_lun->blocksize); + } + p++; + } + + /* Partially zero last partial page. */ + lp = (lba + len) >> cbe_lun->pblockexp; + lbaoff = (lba + len) & ~(UINT_MAX << cbe_lun->pblockexp); + if (p <= lp && lbaoff != 0) { + page = ctl_backend_ramdisk_getpage(be_lun, lp, op); + if (page != P_UNMAPPED && page != P_ANCHORED) + memset(page, 0, lbaoff * cbe_lun->blocksize); + } + + /* Delete remaining full pages. */ + if (anchor) { + for (; p < lp; p++) + ctl_backend_ramdisk_anchorpage(be_lun, p); + } else { + for (; p < lp; p++) + ctl_backend_ramdisk_unmappage(be_lun, p); + } +} + +static void +ctl_backend_ramdisk_ws(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_be_ramdisk_lun *be_lun = cbe_lun->be_lun; + struct ctl_lba_len_flags *lbalen = ARGS(io); + uint8_t *page; + uint64_t lba; + u_int lbaoff, lbas; + + if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR | SWS_NDOB)) { + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_config_write_done(io); + return; + } + if (lbalen->flags & SWS_UNMAP) { + ctl_backend_ramdisk_delete(cbe_lun, lbalen->lba, lbalen->len, + (lbalen->flags & SWS_ANCHOR) != 0); + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + return; + } + + for (lba = lbalen->lba, lbas = lbalen->len; lbas > 0; lba++, lbas--) { + page = ctl_backend_ramdisk_getpage(be_lun, + lba >> cbe_lun->pblockexp, GP_WRITE); + if (page == P_UNMAPPED || page == P_ANCHORED) { + ctl_set_space_alloc_fail(&io->scsiio); + ctl_data_submit_done(io); + return; + } + lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp); + page += lbaoff * cbe_lun->blocksize; + if (lbalen->flags & SWS_NDOB) { + memset(page, 0, cbe_lun->blocksize); + } else { + memcpy(page, io->scsiio.kern_data_ptr, + cbe_lun->blocksize); + } + if (lbalen->flags & SWS_LBDATA) + scsi_ulto4b(lba, page); + } + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); +} + +static void +ctl_backend_ramdisk_unmap(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + struct ctl_ptr_len_flags *ptrlen = (struct ctl_ptr_len_flags *)ARGS(io); + struct scsi_unmap_desc *buf, *end; + + if ((ptrlen->flags & ~SU_ANCHOR) != 0) { + ctl_set_invalid_field(&io->scsiio, + /*sks_valid*/ 0, + /*command*/ 0, + /*field*/ 0, + /*bit_valid*/ 0, + /*bit*/ 0); + ctl_config_write_done(io); + return; + } + + buf = (struct scsi_unmap_desc *)ptrlen->ptr; + end = buf + ptrlen->len / sizeof(*buf); + for (; buf < end; buf++) { + ctl_backend_ramdisk_delete(cbe_lun, + scsi_8btou64(buf->lba), scsi_4btoul(buf->length), + (ptrlen->flags & SU_ANCHOR) != 0); + } + + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); +} + +static int +ctl_backend_ramdisk_config_write(union ctl_io *io) +{ + struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io); + int retval = 0; + + switch (io->scsiio.cdb[0]) { + case SYNCHRONIZE_CACHE: + case SYNCHRONIZE_CACHE_16: + /* We have no cache to flush. */ + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + case START_STOP_UNIT: { + struct scsi_start_stop_unit *cdb; + + cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; + if ((cdb->how & SSS_PC_MASK) != 0) { + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + } + if (cdb->how & SSS_START) { + if (cdb->how & SSS_LOEJ) + ctl_lun_has_media(cbe_lun); + ctl_start_lun(cbe_lun); + } else { + ctl_stop_lun(cbe_lun); + if (cdb->how & SSS_LOEJ) + ctl_lun_ejected(cbe_lun); + } + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + } + case PREVENT_ALLOW: + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + case WRITE_SAME_10: + case WRITE_SAME_16: + ctl_backend_ramdisk_ws(io); + break; + case UNMAP: + ctl_backend_ramdisk_unmap(io); + break; + default: + ctl_set_invalid_opcode(&io->scsiio); + ctl_config_write_done(io); + retval = CTL_RETVAL_COMPLETE; + break; + } + + return (retval); +} + +static uint64_t +ctl_backend_ramdisk_lun_attr(void *arg, const char *attrname) +{ + struct ctl_be_ramdisk_lun *be_lun = arg; + uint64_t val; + + val = UINT64_MAX; + if (be_lun->cap_bytes == 0) + return (val); + sx_slock(&be_lun->page_lock); + if (strcmp(attrname, "blocksused") == 0) { + val = be_lun->cap_used / be_lun->cbe_lun.blocksize; + } else if (strcmp(attrname, "blocksavail") == 0) { + val = (be_lun->cap_bytes - be_lun->cap_used) / + be_lun->cbe_lun.blocksize; + } + sx_sunlock(&be_lun->page_lock); + return (val); +} + +static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { @@ -466,6 +950,9 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram taskqueue_drain_all(be_lun->io_taskqueue); taskqueue_free(be_lun->io_taskqueue); ctl_free_opts(&be_lun->cbe_lun.options); + free(be_lun->zero_page, M_RAMDISK); + ctl_backend_ramdisk_freeallpages(be_lun->pages, be_lun->indir); + sx_destroy(&be_lun->page_lock); mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } @@ -487,6 +974,7 @@ ctl_backend_ramdisk_create(struct ctl_be struct ctl_lun_create_params *params; char *value; char tmpstr[32]; + uint64_t t; int retval; retval = 0; @@ -513,6 +1001,19 @@ ctl_backend_ramdisk_create(struct ctl_be } else if (control_softc->flags & CTL_FLAG_ACTIVE_SHELF) cbe_lun->flags |= CTL_LUN_FLAG_PRIMARY; + be_lun->pblocksize = PAGE_SIZE; + value = ctl_get_opt(&cbe_lun->options, "pblocksize"); + if (value != NULL) { + ctl_expand_number(value, &t); + be_lun->pblocksize = t; + } + if (be_lun->pblocksize < 512 || be_lun->pblocksize > 131072) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: unsupported pblocksize %u", __func__, + be_lun->pblocksize); + goto bailout_error; + } + if (cbe_lun->lun_type == T_DIRECT || cbe_lun->lun_type == T_CDROM) { if (params->blocksize_bytes != 0) @@ -521,6 +1022,14 @@ ctl_backend_ramdisk_create(struct ctl_be cbe_lun->blocksize = 2048; else cbe_lun->blocksize = 512; + be_lun->pblockmul = be_lun->pblocksize / cbe_lun->blocksize; + if (be_lun->pblockmul < 1 || !powerof2(be_lun->pblockmul)) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: pblocksize %u not exp2 of blocksize %u", + __func__, + be_lun->pblocksize, cbe_lun->blocksize); + goto bailout_error; + } if (params->lun_size_bytes < cbe_lun->blocksize) { snprintf(req->error_str, sizeof(req->error_str), "%s: LUN size %ju < blocksize %u", __func__, @@ -529,9 +1038,25 @@ ctl_backend_ramdisk_create(struct ctl_be } be_lun->size_blocks = params->lun_size_bytes / cbe_lun->blocksize; be_lun->size_bytes = be_lun->size_blocks * cbe_lun->blocksize; + be_lun->indir = 0; + t = be_lun->size_bytes / be_lun->pblocksize; + while (t > 1) { + t /= PPP; + be_lun->indir++; + } cbe_lun->maxlba = be_lun->size_blocks - 1; - cbe_lun->atomicblock = UINT32_MAX; - cbe_lun->opttxferlen = softc->rd_size / cbe_lun->blocksize; + cbe_lun->pblockexp = fls(be_lun->pblockmul) - 1; + cbe_lun->pblockoff = 0; + cbe_lun->ublockexp = cbe_lun->pblockexp; + cbe_lun->ublockoff = 0; + cbe_lun->atomicblock = be_lun->pblocksize; + cbe_lun->opttxferlen = SGPP * be_lun->pblocksize; + value = ctl_get_opt(&cbe_lun->options, "capacity"); + if (value != NULL) + ctl_expand_number(value, &be_lun->cap_bytes); + } else { + be_lun->pblockmul = 1; + cbe_lun->pblockexp = 0; } /* Tell the user the blocksize we ended up using */ @@ -539,7 +1064,7 @@ ctl_backend_ramdisk_create(struct ctl_be params->lun_size_bytes = be_lun->size_bytes; value = ctl_get_opt(&cbe_lun->options, "unmap"); - if (value != NULL && strcmp(value, "on") == 0) + if (value == NULL || strcmp(value, "off") != 0) cbe_lun->flags |= CTL_LUN_FLAG_UNMAP; value = ctl_get_opt(&cbe_lun->options, "readonly"); if (value != NULL) { @@ -594,6 +1119,11 @@ ctl_backend_ramdisk_create(struct ctl_be } STAILQ_INIT(&be_lun->cont_queue); + sx_init(&be_lun->page_lock, "cram page lock"); + if (be_lun->cap_bytes == 0) + be_lun->pages = malloc(be_lun->pblocksize, M_RAMDISK, M_WAITOK); + be_lun->zero_page = malloc(be_lun->pblocksize, M_RAMDISK, + M_WAITOK|M_ZERO); mtx_init(&be_lun->queue_lock, "cram queue lock", NULL, MTX_DEF); TASK_INIT(&be_lun->io_task, /*priority*/0, ctl_backend_ramdisk_worker, be_lun); @@ -668,10 +1198,12 @@ ctl_backend_ramdisk_create(struct ctl_be bailout_error: req->status = CTL_LUN_ERROR; if (be_lun != NULL) { - if (be_lun->io_taskqueue != NULL) { + if (be_lun->io_taskqueue != NULL) taskqueue_free(be_lun->io_taskqueue); - } ctl_free_opts(&cbe_lun->options); + free(be_lun->zero_page, M_RAMDISK); + ctl_backend_ramdisk_freeallpages(be_lun->pages, be_lun->indir); + sx_destroy(&be_lun->page_lock); mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } @@ -827,103 +1359,3 @@ ctl_backend_ramdisk_lun_config_status(vo } mtx_unlock(&softc->lock); } - -static int -ctl_backend_ramdisk_config_write(union ctl_io *io) -{ - struct ctl_be_lun *cbe_lun; - int retval; - - cbe_lun = CTL_BACKEND_LUN(io); - retval = 0; - switch (io->scsiio.cdb[0]) { - case SYNCHRONIZE_CACHE: - case SYNCHRONIZE_CACHE_16: - /* - * The upper level CTL code will filter out any CDBs with - * the immediate bit set and return the proper error. It - * will also not allow a sync cache command to go to a LUN - * that is powered down. - * - * We don't really need to worry about what LBA range the - * user asked to be synced out. When they issue a sync - * cache command, we'll sync out the whole thing. - * - * This is obviously just a stubbed out implementation. - * The real implementation will be in the RAIDCore/CTL *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 7 02:21:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE59CD44FB; Tue, 7 Feb 2017 02:21:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9831792; Tue, 7 Feb 2017 02:21:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v172LYa0010384; Tue, 7 Feb 2017 02:21:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v172LYV1010383; Tue, 7 Feb 2017 02:21:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702070221.v172LYV1010383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 7 Feb 2017 02:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313373 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 02:21:35 -0000 Author: adrian Date: Tue Feb 7 02:21:34 2017 New Revision: 313373 URL: https://svnweb.freebsd.org/changeset/base/313373 Log: [ath] prepare for station side quiet time support. * Track the current quiet time configuration in the ath_vap struct. * Add an accessor method for calling the quiet time HAL method. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Feb 7 02:00:14 2017 (r313372) +++ head/sys/dev/ath/if_athvar.h Tue Feb 7 02:21:34 2017 (r313373) @@ -490,6 +490,7 @@ struct ath_vap { int (*av_set_tim)(struct ieee80211_node *, int); void (*av_recv_pspoll)(struct ieee80211_node *, struct mbuf *); + struct ieee80211_quiet_ie quiet_ie; }; #define ATH_VAP(vap) ((struct ath_vap *)(vap)) @@ -1484,6 +1485,8 @@ void ath_intr(void *); ((*(_ah)->ah_get11nExtBusy)((_ah))) #define ath_hal_setchainmasks(_ah, _txchainmask, _rxchainmask) \ ((*(_ah)->ah_setChainMasks)((_ah), (_txchainmask), (_rxchainmask))) +#define ath_hal_set_quiet(_ah, _p, _d, _o, _f) \ + ((*(_ah)->ah_setQuiet)((_ah), (_p), (_d), (_o), (_f))) #define ath_hal_spectral_supported(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_SPECTRAL_SCAN, 0, NULL) == HAL_OK) From owner-svn-src-all@freebsd.org Tue Feb 7 02:32:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F096CD4A6D; Tue, 7 Feb 2017 02:32:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C0A71E9C; Tue, 7 Feb 2017 02:32:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v172Wn6w015793; Tue, 7 Feb 2017 02:32:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v172WnRg015792; Tue, 7 Feb 2017 02:32:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070232.v172WnRg015792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 02:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313374 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 02:32:50 -0000 Author: ngie Date: Tue Feb 7 02:32:49 2017 New Revision: 313374 URL: https://svnweb.freebsd.org/changeset/base/313374 Log: hcreate(3): fix the ERRORS section and bump .Dd - Add missing comma between functions that trigger ENOMEM error. - Fix the description for ESRCH. The action that triggers this error is FIND, not SEARCH (SEARCH does not exist). MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/stdlib/hcreate.3 Modified: head/lib/libc/stdlib/hcreate.3 ============================================================================== --- head/lib/libc/stdlib/hcreate.3 Tue Feb 7 02:21:34 2017 (r313373) +++ head/lib/libc/stdlib/hcreate.3 Tue Feb 7 02:32:49 2017 (r313374) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2015 +.Dd February 6, 2017 .Dt HCREATE 3 .Os .Sh NAME @@ -265,9 +265,9 @@ main(void) .Ed .Sh ERRORS The -.Fn hcreate +.Fn hcreate , .Fn hcreate_r , -.Fn hsearch +.Fn hsearch , and .Fn hsearch_r functions will fail if: @@ -281,7 +281,7 @@ The and .Fn hsearch_r functions will also fail if the action is -.Dv SEARCH +.Dv FIND and the element is not found: .Bl -tag -width Er .It Bq Er ESRCH From owner-svn-src-all@freebsd.org Tue Feb 7 03:46:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B92A6CD36DA; Tue, 7 Feb 2017 03:46:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6A0D49; Tue, 7 Feb 2017 03:46:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v173km9l044780; Tue, 7 Feb 2017 03:46:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v173km5F044779; Tue, 7 Feb 2017 03:46:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070346.v173km5F044779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 03:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313376 - head/lib/libc/tests/stdio 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 03:46:49 -0000 Author: ngie Date: Tue Feb 7 03:46:48 2017 New Revision: 313376 URL: https://svnweb.freebsd.org/changeset/base/313376 Log: Fix :hexadecimal_floating_point on i386 Don't exclude i386 from LDBL_MANT_DIG == 64; it works properly in that case. While here, replace strcmp + atf_tc_fail with ATF_CHECK_MSG for 2 reasons: - Gather as many results as possible instead of failing early and not testing the rest of the cases. - Simplify logic when checking test inputs vs outputs and printing test result. Tested on: amd64, i386 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printfloat_test.c Modified: head/lib/libc/tests/stdio/printfloat_test.c ============================================================================== --- head/lib/libc/tests/stdio/printfloat_test.c Tue Feb 7 02:57:11 2017 (r313375) +++ head/lib/libc/tests/stdio/printfloat_test.c Tue Feb 7 03:46:48 2017 (r313376) @@ -70,22 +70,19 @@ _testfmt(const char *result, const char va_copy(ap2, ap); smash_stack(); vsnprintf(s, sizeof(s), fmt, ap); - if (strcmp(result, s) != 0) { - atf_tc_fail( - "printf(\"%s\", %s) ==> [%s], expected [%s]", - fmt, argstr, s, result); - } + ATF_CHECK_MSG(strcmp(result, s) == 0, + "printf(\"%s\", %s) ==> [%s], expected [%s]", + fmt, argstr, s, result); smash_stack(); mbstowcs(ws, s, BUF - 1); mbstowcs(wfmt, fmt, BUF - 1); mbstowcs(wresult, result, BUF - 1); vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); - if (wcscmp(wresult, ws) != 0) { - atf_tc_fail( - "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", - wfmt, argstr, ws, wresult); - } + ATF_CHECK_MSG(wcscmp(wresult, ws) == 0, + "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", + wfmt, argstr, ws, wresult); + va_end(ap); va_end(ap2); } @@ -318,7 +315,7 @@ ATF_TC_BODY(hexadecimal_floating_point, testfmt("0x1p-1074", "%a", 0x1p-1074); testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); -#if (LDBL_MANT_DIG == 64) && !defined(__i386__) +#if (LDBL_MANT_DIG == 64) testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); testfmt("0x1p-16445", "%La", 0x1p-16445L); testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); From owner-svn-src-all@freebsd.org Tue Feb 7 04:15:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68183CD450E; Tue, 7 Feb 2017 04:15:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37BDF1C0F; Tue, 7 Feb 2017 04:15:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v174FfU1056761; Tue, 7 Feb 2017 04:15:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v174FfLu056760; Tue, 7 Feb 2017 04:15:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070415.v174FfLu056760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 04:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313377 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 04:15:42 -0000 Author: ngie Date: Tue Feb 7 04:15:41 2017 New Revision: 313377 URL: https://svnweb.freebsd.org/changeset/base/313377 Log: Expect :floatunditf to fail on FreeBSD/i386 The precision error on FreeBSD/i386 doesn't match the expected output in long double form. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c Tue Feb 7 03:46:48 2017 (r313376) +++ head/contrib/netbsd-tests/lib/libc/gen/t_floatunditf.c Tue Feb 7 04:15:41 2017 (r313377) @@ -119,6 +119,11 @@ ATF_TC_BODY(floatunditf, tc) #else size_t i; +#if defined(__FreeBSD__) && defined(__i386__) + atf_tc_expect_fail("the floating point error on FreeBSD/i386 doesn't " + "match the expected floating point error on NetBSD"); +#endif + for (i = 0; i < __arraycount(testcases); ++i) ATF_CHECK_MSG( testcases[i].ld == (long double)testcases[i].u64, From owner-svn-src-all@freebsd.org Tue Feb 7 04:25:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70AA5CD48FB; Tue, 7 Feb 2017 04:25:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DBC41B1; Tue, 7 Feb 2017 04:25:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v174PLAN060825; Tue, 7 Feb 2017 04:25:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v174PLIf060824; Tue, 7 Feb 2017 04:25:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070425.v174PLIf060824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 04:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313378 - head/lib/libc/tests/stdio 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 04:25:22 -0000 Author: ngie Date: Tue Feb 7 04:25:21 2017 New Revision: 313378 URL: https://svnweb.freebsd.org/changeset/base/313378 Log: Wrap strcmp/wcscmp calls with ATF_CHECK_MSG and drop atf_tc_fail use The reasoning here was the same as what was done in r313376: - Gather as many results as possible instead of failing early and not testing the rest of the cases. - Simplify logic when checking test inputs vs outputs and printing test result. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printbasic_test.c Modified: head/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:15:41 2017 (r313377) +++ head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:25:21 2017 (r313378) @@ -78,22 +78,19 @@ _testfmt(const char *result, const char va_copy(ap2, ap); smash_stack(); vsnprintf(s, sizeof(s), fmt, ap); - if (strcmp(result, s) != 0) { - atf_tc_fail( - "printf(\"%s\", %s) ==> [%s], expected [%s]", - fmt, argstr, s, result); - } + ATF_CHECK_MSG(strcmp(result, s) == 0, + "printf(\"%s\", %s) ==> [%s], expected [%s]", + fmt, argstr, s, result); smash_stack(); mbstowcs(ws, s, BUF - 1); mbstowcs(wfmt, fmt, BUF - 1); mbstowcs(wresult, result, BUF - 1); vswprintf(ws, sizeof(ws) / sizeof(ws[0]), wfmt, ap2); - if (wcscmp(wresult, ws) != 0) { - atf_tc_fail( - "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", - wfmt, argstr, ws, wresult); - } + ATF_CHECK_MSG(wcscmp(wresult, ws) == 0, + "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]", + wfmt, argstr, ws, wresult); + va_end(ap); va_end(ap2); } From owner-svn-src-all@freebsd.org Tue Feb 7 05:39:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A387CD2037; Tue, 7 Feb 2017 05:39:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB36D671; Tue, 7 Feb 2017 05:39:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v175d0q4088936; Tue, 7 Feb 2017 05:39:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v175d0eL088935; Tue, 7 Feb 2017 05:39:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070539.v175d0eL088935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 05:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313379 - head/lib/libc/tests/stdio 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 05:39:02 -0000 Author: ngie Date: Tue Feb 7 05:39:00 2017 New Revision: 313379 URL: https://svnweb.freebsd.org/changeset/base/313379 Log: Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base type The %t{d,u} (ptrdiff_t) tests fail for the following reasons: - ptrdiff_t is by definition int32_t on !LP64 architectures and int64_t on LP64 architectures. - intmax_t is by definition fixed to int64_t on all architectures. - Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to *intmax_t when parsing/representing the value. PR: 191674 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printbasic_test.c Modified: head/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:25:21 2017 (r313378) +++ head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 05:39:00 2017 (r313379) @@ -111,6 +111,11 @@ ATF_TC_BODY(int_within_limits, tc) testfmt("-1", "%jd", (intmax_t)-1); testfmt(S_UINT64MAX, "%ju", UINT64_MAX); + if (sizeof(ptrdiff_t) != sizeof(uintmax_t)) + atf_tc_expect_fail("the %%t qualifier is broken on 32-bit " + "platforms where there's a mismatch between ptrdiff_t and " + "uintmax_t's type width; bug # 191674"); + testfmt("-1", "%td", (ptrdiff_t)-1); testfmt(S_SIZEMAX, "%tu", (size_t)-1); From owner-svn-src-all@freebsd.org Tue Feb 7 05:42:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3B53CD22CB; Tue, 7 Feb 2017 05:42:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC464B36; Tue, 7 Feb 2017 05:42:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 75so11099816pgf.3; Mon, 06 Feb 2017 21:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=1e5dJOn5OR6/nA8P4y2Vwm1qAuGAdwI97zCBo8GKPEk=; b=WMtBJ6b5MOUINFm2faa0xZmR7flhNQrjoVTLyZfrJYpSbjGns+RSom+MA0CUW/eVYa ARv6pnZBdq89XF6oKxPoUC3DahhpD0nbK5b9IwImsgvqSFWLmmshHqb9+glEj0KK2HLW XAQEijSrXki2av6te7sG6JrpDhUInHcKa6wajrNqy6Erehu3O9NSyFUXrQV7Dhcty9kl 5XfzJs8pw4eyxEX5VdzrEynjIOMI9GI6tISp/wZHLIEBoZ480j3EuZnAEexKLBrLDO0D Oj2m44BXZkSp6/ixD87eN7U8guNwqPUvNkhI/gMtZyiGgBQqj1jSvwy9gQyxyGjLolCA Cz2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=1e5dJOn5OR6/nA8P4y2Vwm1qAuGAdwI97zCBo8GKPEk=; b=uSXXFqBvVG3RwUapsOlzvX2lNSEzhAr0PhoMvwlvrCuejToX8qvBp5ZRiaI12e+I26 5eHe+hururtZsOkLkZIQon/hwDKihZpXYhyTBJ0Vf+UTh+MfpIRPzWo5EhncykkaN9WO CYZoPKpEX+ldY+AgBurgr3E6pzdnn6yaZ67I4/ZVJoh8JMCRra28UXciOK2HAAH8QdXo IyZUXhadOdITAq67ghWhFGQ08XOYu5ATuVPf1QqaRQIwlQALuZVHalMv1pckH9kMEx11 3WT12J5in03If0t7bxLZvlVrJ46dWyDIE5QfSX01uSyWIasSn7awGgKIuwDEqylDY0GA VyaQ== X-Gm-Message-State: AIkVDXI5CFXn7NlVisJRqgnxjsHKim9QktuErU4rMdK5l6/3HXhi4F8xlOFNOblbv59zJQ== X-Received: by 10.98.205.3 with SMTP id o3mr17394312pfg.148.1486446148115; Mon, 06 Feb 2017 21:42:28 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id j185sm6991809pgd.35.2017.02.06.21.42.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 21:42:27 -0800 (PST) Subject: Re: svn commit: r313379 - head/lib/libc/tests/stdio Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702070539.v175d0eL088935@repo.freebsd.org> Date: Mon, 6 Feb 2017 21:42:24 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <729410CF-7046-4F57-8EEC-8E5DC3CBE1C5@gmail.com> References: <201702070539.v175d0eL088935@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 05:42:29 -0000 --Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 6, 2017, at 21:39, Ngie Cooper wrote: >=20 > Author: ngie > Date: Tue Feb 7 05:39:00 2017 > New Revision: 313379 > URL: https://svnweb.freebsd.org/changeset/base/313379 >=20 > Log: > Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in = base type >=20 > The %t{d,u} (ptrdiff_t) tests fail for the following reasons: > - ptrdiff_t is by definition int32_t on !LP64 architectures and = int64_t on > LP64 architectures. > - intmax_t is by definition fixed to int64_t on all architectures. > - Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to = *intmax_t > when parsing/representing the value. For the sake of brevity, this fixes the test on arm/i386/mips. Cheers, -Ngie --Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636 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 iQIcBAEBCgAGBQJYmV5CAAoJEPWDqSZpMIYVLoIP/jn66wHKTqi/SO20OJlmUwwK vxjV93lvfGTXxpOBcUnRX+sWD4gTv5rjrNjgsf5l6FcB8+YsqV/2WcTjq1y0h94O /Y8KLzJn/BaCZOgbcjTZ6DqHt9bS50mv2kCLi48n0qjekj9nhXdewfaOux99LCP8 6w7KhY78ZLT1sML0Z4rk5T5Uam0Yei3v/lmse4TRzCFb5vhKIwZ50TVhBlgYi/59 22Uqm1lM1PCW+wGQrw4HWHHzp2xKRy9PZpPP4qWH8S8F7aSqLZLpPLYY9+hww6fP 4ilf9Pgh/ueHM3eof/vJ0FrJScCKfdRtUpx41QdALjlCAXIx/r/1Da2RzJHiDcqw CU4/m3saqKEktvnTHKTzY/AbbkjWNvvrQcIZIWRICqyfF21ZfTp7r7EdOxFaWWR7 h+GfDRZvUhziLQJYZIi1T5z/rii5HseuYWVQKiPaQjIfzY6Rba5Pa3fJctepii9L 0RWWMAGwHHhm+XBnVP6v6cdHtPIZVQ0bb5mi9899RvSQeyrSZz3x61tCNo+jrDu5 9QIHZx5cAEfFgbtAZijfpd2lSN9Muh9T8ygY6wpPtAE0MLxHAVPqjJhDHVpQWVh9 W3mAkVegJs15hUIKVMLPbYbiMYm8oQBXGOqsl7JnLyjF8XmxfTRMjSGX21773ait bK7WMz4s51bdKYy7Fsah =UWwj -----END PGP SIGNATURE----- --Apple-Mail=_0B3F955B-5023-4955-98AF-3EE15B1A4636-- From owner-svn-src-all@freebsd.org Tue Feb 7 05:44:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3B82CD238B; Tue, 7 Feb 2017 05:44:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A09C3CA7; Tue, 7 Feb 2017 05:44:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v175iDb9092897; Tue, 7 Feb 2017 05:44:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v175iDuU092896; Tue, 7 Feb 2017 05:44:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702070544.v175iDuU092896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 05:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313380 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 05:44:14 -0000 Author: ngie Date: Tue Feb 7 05:44:13 2017 New Revision: 313380 URL: https://svnweb.freebsd.org/changeset/base/313380 Log: MFC r313182: Fix typo in variable name (_REDUNDENT_LIB_DIRS -> _REDUNDANT_LIB_DIRS) Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Tue Feb 7 05:39:00 2017 (r313379) +++ stable/11/Makefile.inc1 Tue Feb 7 05:44:13 2017 (r313380) @@ -240,10 +240,10 @@ SUBDIR+= ${_DIR} # of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and # LOCAL_LIB_DIRS=foo/lib to behave as expected. .for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} -_REDUNDENT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} .endfor .for _DIR in ${LOCAL_LIB_DIRS} -.if empty(_REDUNDENT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) +.if empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) SUBDIR+= ${_DIR} .else .warning ${_DIR} not added to SUBDIR list. See UPDATING 20141121. From owner-svn-src-all@freebsd.org Tue Feb 7 08:31:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D1EBCC679B; Tue, 7 Feb 2017 08:31:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C6EE1AC5; Tue, 7 Feb 2017 08:31:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v178V7eD057444; Tue, 7 Feb 2017 08:31:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v178V7BS057443; Tue, 7 Feb 2017 08:31:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702070831.v178V7BS057443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 7 Feb 2017 08:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313383 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 08:31:08 -0000 Author: kib Date: Tue Feb 7 08:31:07 2017 New Revision: 313383 URL: https://svnweb.freebsd.org/changeset/base/313383 Log: MFC r313249: Style, use tab after #define. Modified: stable/11/sys/vm/vm_object.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Tue Feb 7 06:34:02 2017 (r313382) +++ stable/11/sys/vm/vm_object.h Tue Feb 7 08:31:07 2017 (r313383) @@ -195,8 +195,8 @@ struct vm_object { #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ #define OBJ_TMPFS 0x8000 /* has tmpfs vnode allocated */ -#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) -#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) +#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) +#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) #ifdef _KERNEL From owner-svn-src-all@freebsd.org Tue Feb 7 08:33:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 716EACC68BB; Tue, 7 Feb 2017 08:33:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40D3B1F2D; Tue, 7 Feb 2017 08:33:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v178XkI9061467; Tue, 7 Feb 2017 08:33:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v178XkG7061466; Tue, 7 Feb 2017 08:33:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702070833.v178XkG7061466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 7 Feb 2017 08:33: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: r313384 - stable/10/sys/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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 08:33:47 -0000 Author: kib Date: Tue Feb 7 08:33:46 2017 New Revision: 313384 URL: https://svnweb.freebsd.org/changeset/base/313384 Log: MFC r313249: Style, use tab after #define. Modified: stable/10/sys/vm/vm_object.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_object.h ============================================================================== --- stable/10/sys/vm/vm_object.h Tue Feb 7 08:31:07 2017 (r313383) +++ stable/10/sys/vm/vm_object.h Tue Feb 7 08:33:46 2017 (r313384) @@ -192,8 +192,8 @@ struct vm_object { #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ #define OBJ_TMPFS 0x8000 /* has tmpfs vnode allocated */ -#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) -#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) +#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) +#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) #ifdef _KERNEL From owner-svn-src-all@freebsd.org Tue Feb 7 08:39:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD36CC6A09; Tue, 7 Feb 2017 08:39:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A95F3B9; Tue, 7 Feb 2017 08:39:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v178d9Y3056286 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Feb 2017 10:39:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v178d9Y3056286 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v178d9ZV056285; Tue, 7 Feb 2017 10:39:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Feb 2017 10:39:09 +0200 From: Konstantin Belousov To: John Baldwin Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207083909.GX2092@kib.kiev.ua> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <2958370.34Dmljdf7f@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2958370.34Dmljdf7f@ralph.baldwin.cx> User-Agent: Mutt/1.7.2 (2016-11-26) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 08:39:14 -0000 On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Mon Feb 6 20:57:12 2017 > > New Revision: 313352 > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > Log: > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > instead of their sys_*() counterparts. > > > > Reviewed by: ed, dchagin, kib > > MFC after: 2 weeks > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D9378 > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > but just kern_ would be more consistent. That is what we have done with > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > etc., but just kern_bind() and kern_listen()). Note that the kern_vm_* functions are not quite regular syscall helpers. The big issue with them, which caused my suggestion, is that the functions cannot be declared in sys/syscallsubr.h, because their declarations depend on the vm/*.h namespace. From owner-svn-src-all@freebsd.org Tue Feb 7 10:35:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E875CD4E4F; Tue, 7 Feb 2017 10:35:49 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A73F1C80; Tue, 7 Feb 2017 10:35:49 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-it0-x243.google.com with SMTP id f200so11956319itf.3; Tue, 07 Feb 2017 02:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JRYvN2xMbvtDWPp7sxYp156YqPkm4tkvaYYoYAFmNa8=; b=XQI5x8kWnmnIgej6Fe6Ed4ajKfbiAaQvnwj+9nwerSDSZL2eyci2sUkc21lYrKB6LH t87PaSD8OkQgVcyWfW6Hreto/09m95Ut1+q3rv5KD1vhdqKWXUwi8bpNg0qCDeqdfu5L QxBjFTUOQOIa98ouVtitpBbjpHAvkdCKBpukIROm4shSRYXDu7qcfxdv/VIedmf/OGEx WWX+f1M9U1oy4CSLyZDI/Q0isnRzWMdeTUw4JhkEIDViCKbwmtD0EdSAwaLwINQ217QA 2zsU3zLFDmYBioqGDaK6lCxKbMyRJagsGKOwmPvJtFVRAf5Fz2URXIkQcNvAcu6s/rMe jYSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JRYvN2xMbvtDWPp7sxYp156YqPkm4tkvaYYoYAFmNa8=; b=FQNv4Uf9MDvkvGUfuIyPpfN+23njhp+aC/jXV0x3MGH9hs5ZrnrgCmCxU1pYKDvhdl FYfBAInoIHWoLXLFt82jzQ2A79O1H2G3D9UlXW0NDEGUwjUUEYwWwWU6Q8qZvK870FPy BwQAb8t4ODgd8MWspa1lhP7myG93KN96Bw0S+d9ZZduikI7Bx+CFB/T4FmagasTmb3qe /LM8xT98H9Om1L9zSrMC9oLcJ++RK3TvdJljPPdX10MzdqsAz8n21DYUjJUCkwwLu8yY s5xxAkm71LK0feZ5tIbzlA7w0DM0qD9YiwV3sAcrErZZf/+31nKK2dY71aTx3fb8a6T1 Ylgw== X-Gm-Message-State: AIkVDXJdyPPSUIsiwlxcco6778flnchhPO4QjnhPjdoiIZr/4QjhywT4QDg86zxgcvZpamN94/01FqpQ3aRZcg== X-Received: by 10.36.131.65 with SMTP id d62mr11433780ite.111.1486463748435; Tue, 07 Feb 2017 02:35:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Tue, 7 Feb 2017 02:35:48 -0800 (PST) In-Reply-To: <201702061308.v16D8nGC071178@repo.freebsd.org> References: <201702061308.v16D8nGC071178@repo.freebsd.org> From: Svatopluk Kraus Date: Tue, 7 Feb 2017 11:35:48 +0100 Message-ID: Subject: Re: svn commit: r313339 - head/sys/kern To: Andrew Turner Cc: 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 10:35:49 -0000 So, you did it again. No discussion, you have just committed what you wanted even if I requested a change. It means that I wanted to review it! Or you think that I forget about that when you wait for three months? Your change is not explained at all !! So, explain it better or revert! Does an xref refer only to one hardware? Or two hardwares may have same xrefs? Why one hardware cannot be represented by one PIC in INTRNG even if two drivers exist for it? Except for the flag, intr_pic_register() is same as intr_msi_register() now. On Mon, Feb 6, 2017 at 2:08 PM, Andrew Turner wrote: > Author: andrew > Date: Mon Feb 6 13:08:48 2017 > New Revision: 313339 > URL: https://svnweb.freebsd.org/changeset/base/313339 > > Log: > Only allow the pic type to be either a PIC or MSI type. All interrupt > controller drivers handle either MSI/MSI-X interrupts, or regular > interrupts, as such enforce this in the interrupt handling framework. > If a later driver was to handle both it would need to create one of each. > > This will allow future changes to allow the xref space to overlap, but > refer to different drivers. > > Obtained from: ABT Systems Ltd > Sponsored by: The FreeBSD Foundation > X-Differential Revision: https://reviews.freebsd.org/D8616 > > Modified: > head/sys/kern/subr_intr.c > > Modified: head/sys/kern/subr_intr.c > ============================================================================== > --- head/sys/kern/subr_intr.c Mon Feb 6 11:37:20 2017 (r313338) > +++ head/sys/kern/subr_intr.c Mon Feb 6 13:08:48 2017 (r313339) > @@ -105,8 +105,10 @@ struct intr_pic { > SLIST_ENTRY(intr_pic) pic_next; > intptr_t pic_xref; /* hardware identification */ > device_t pic_dev; > +/* Only one of FLAG_PIC or FLAG_MSI may be set */ > #define FLAG_PIC (1 << 0) > #define FLAG_MSI (1 << 1) > +#define FLAG_TYPE_MASK (FLAG_PIC | FLAG_MSI) > u_int pic_flags; > struct mtx pic_child_lock; > SLIST_HEAD(, intr_pic_child) pic_children; > @@ -115,7 +117,7 @@ struct intr_pic { > static struct mtx pic_list_lock; > static SLIST_HEAD(, intr_pic) pic_list; > > -static struct intr_pic *pic_lookup(device_t dev, intptr_t xref); > +static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags); > > /* Interrupt source definition. */ > static struct mtx isrc_table_lock; > @@ -688,7 +690,7 @@ isrc_add_handler(struct intr_irqsrc *isr > * Lookup interrupt controller locked. > */ > static inline struct intr_pic * > -pic_lookup_locked(device_t dev, intptr_t xref) > +pic_lookup_locked(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > @@ -699,6 +701,10 @@ pic_lookup_locked(device_t dev, intptr_t > > /* Note that pic->pic_dev is never NULL on registered PIC. */ > SLIST_FOREACH(pic, &pic_list, pic_next) { > + if ((pic->pic_flags & FLAG_TYPE_MASK) != > + (flags & FLAG_TYPE_MASK)) > + continue; > + > if (dev == NULL) { > if (xref == pic->pic_xref) > return (pic); > @@ -715,12 +721,12 @@ pic_lookup_locked(device_t dev, intptr_t > * Lookup interrupt controller. > */ > static struct intr_pic * > -pic_lookup(device_t dev, intptr_t xref) > +pic_lookup(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > mtx_lock(&pic_list_lock); > - pic = pic_lookup_locked(dev, xref); > + pic = pic_lookup_locked(dev, xref, flags); > mtx_unlock(&pic_list_lock); > return (pic); > } > @@ -729,12 +735,12 @@ pic_lookup(device_t dev, intptr_t xref) > * Create interrupt controller. > */ > static struct intr_pic * > -pic_create(device_t dev, intptr_t xref) > +pic_create(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > mtx_lock(&pic_list_lock); > - pic = pic_lookup_locked(dev, xref); > + pic = pic_lookup_locked(dev, xref, flags); > if (pic != NULL) { > mtx_unlock(&pic_list_lock); > return (pic); > @@ -746,6 +752,7 @@ pic_create(device_t dev, intptr_t xref) > } > pic->pic_xref = xref; > pic->pic_dev = dev; > + pic->pic_flags = flags; > mtx_init(&pic->pic_child_lock, "pic child lock", NULL, MTX_SPIN); > SLIST_INSERT_HEAD(&pic_list, pic, pic_next); > mtx_unlock(&pic_list_lock); > @@ -757,12 +764,12 @@ pic_create(device_t dev, intptr_t xref) > * Destroy interrupt controller. > */ > static void > -pic_destroy(device_t dev, intptr_t xref) > +pic_destroy(device_t dev, intptr_t xref, int flags) > { > struct intr_pic *pic; > > mtx_lock(&pic_list_lock); > - pic = pic_lookup_locked(dev, xref); > + pic = pic_lookup_locked(dev, xref, flags); > if (pic == NULL) { > mtx_unlock(&pic_list_lock); > return; > @@ -783,12 +790,10 @@ intr_pic_register(device_t dev, intptr_t > > if (dev == NULL) > return (NULL); > - pic = pic_create(dev, xref); > + pic = pic_create(dev, xref, FLAG_PIC); > if (pic == NULL) > return (NULL); > > - pic->pic_flags |= FLAG_PIC; > - > debugf("PIC %p registered for %s \n", pic, > device_get_nameunit(dev), dev, xref); > return (pic); > @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr > { > struct intr_pic *pic; > > - pic = pic_lookup(dev, xref); > + pic = pic_lookup(dev, xref, FLAG_PIC); > if (pic == NULL) { > device_printf(dev, "not registered\n"); > return (EINVAL); > } > > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, > ("%s: Found a non-PIC controller: %s", __func__, > device_get_name(pic->pic_dev))); > So, you would check that pic_lookup(dev, xref, FLAG_PIC) returns PIC with FLAG_PIC set? Really? This nonsense is in other places too. If you would like to be this way, check it only in pic_lookup() then! > @@ -870,7 +875,8 @@ intr_pic_add_handler(device_t parent, st > struct intr_pic_child *child; > #endif > > - parent_pic = pic_lookup(parent, 0); > + /* Find the parent PIC */ > + parent_pic = pic_lookup(parent, 0, FLAG_PIC); > if (parent_pic == NULL) > return (NULL); > > @@ -904,13 +910,14 @@ intr_resolve_irq(device_t dev, intptr_t > if (data == NULL) > return (EINVAL); > > - pic = pic_lookup(dev, xref); > + pic = pic_lookup(dev, xref, > + (data->type == INTR_MAP_DATA_MSI) ? FLAG_MSI : FLAG_PIC); > if (pic == NULL) > return (ESRCH); > > switch (data->type) { > case INTR_MAP_DATA_MSI: > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > msi = (struct intr_map_data_msi *)data; > @@ -918,7 +925,7 @@ intr_resolve_irq(device_t dev, intptr_t > return (0); > > default: > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, > ("%s: Found a non-PIC controller: %s", __func__, > device_get_name(pic->pic_dev))); > return (PIC_MAP_INTR(pic->pic_dev, data, isrc)); > @@ -1255,12 +1262,10 @@ intr_msi_register(device_t dev, intptr_t > > if (dev == NULL) > return (EINVAL); > - pic = pic_create(dev, xref); > + pic = pic_create(dev, xref, FLAG_MSI); > if (pic == NULL) > return (ENOMEM); > > - pic->pic_flags |= FLAG_MSI; > - > debugf("PIC %p registered for %s \n", pic, > device_get_nameunit(dev), dev, (uintmax_t)xref); > return (0); > @@ -1276,11 +1281,11 @@ intr_alloc_msi(device_t pci, device_t ch > struct intr_map_data_msi *msi; > int err, i; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1313,11 +1318,11 @@ intr_release_msi(device_t pci, device_t > struct intr_map_data_msi *msi; > int i, err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1352,11 +1357,11 @@ intr_alloc_msix(device_t pci, device_t c > struct intr_map_data_msi *msi; > int err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1380,11 +1385,11 @@ intr_release_msix(device_t pci, device_t > struct intr_map_data_msi *msi; > int err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > @@ -1413,11 +1418,11 @@ intr_map_msi(device_t pci, device_t chil > struct intr_pic *pic; > int err; > > - pic = pic_lookup(NULL, xref); > + pic = pic_lookup(NULL, xref, FLAG_MSI); > if (pic == NULL) > return (ESRCH); > > - KASSERT((pic->pic_flags & FLAG_MSI) != 0, > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, > ("%s: Found a non-MSI controller: %s", __func__, > device_get_name(pic->pic_dev))); > > From owner-svn-src-all@freebsd.org Tue Feb 7 11:48:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82DECD427A; Tue, 7 Feb 2017 11:48:21 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7E5CA3D1; Tue, 7 Feb 2017 11:48:21 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-144.nat-2.net.cam.ac.uk [131.111.5.144]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 61C5BD8561; Tue, 7 Feb 2017 11:33:14 +0000 (UTC) Date: Tue, 7 Feb 2017 11:38:44 +0000 From: Andrew Turner To: Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313339 - head/sys/kern Message-ID: <20170207113844.2cd08852@zapp> In-Reply-To: References: <201702061308.v16D8nGC071178@repo.freebsd.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 11:48:21 -0000 On Tue, 7 Feb 2017 11:35:48 +0100 Svatopluk Kraus wrote: > Does an xref refer only to one hardware? Or two hardwares may have > same xrefs? Why one hardware cannot be represented by one PIC in > INTRNG even if two drivers exist for it? The xref is an FDT thing, in INTRNG we use it as a handle to hardware. This changes it so each of these handles refers to hardware within one of two spaces, the PIC space and MSI space. It may be that for FDT these spaces are non overlapping, however with ACPI it will simplify the code to allow us to have the same handle refer to different controllers in different spaces. > On Mon, Feb 6, 2017 at 2:08 PM, Andrew Turner > wrote: > > Author: andrew > > Date: Mon Feb 6 13:08:48 2017 > > New Revision: 313339 > > URL: https://svnweb.freebsd.org/changeset/base/313339 > > > > Log: > > Only allow the pic type to be either a PIC or MSI type. All > > interrupt controller drivers handle either MSI/MSI-X interrupts, or > > regular interrupts, as such enforce this in the interrupt handling > > framework. If a later driver was to handle both it would need to > > create one of each. > > > > This will allow future changes to allow the xref space to > > overlap, but refer to different drivers. > > > > Obtained from: ABT Systems Ltd > > Sponsored by: The FreeBSD Foundation > > X-Differential Revision: https://reviews.freebsd.org/D8616 ... > > @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr > > { > > struct intr_pic *pic; > > > > - pic = pic_lookup(dev, xref); > > + pic = pic_lookup(dev, xref, FLAG_PIC); > > if (pic == NULL) { > > device_printf(dev, "not registered\n"); > > return (EINVAL); > > } > > > > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, > > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, > > ("%s: Found a non-PIC controller: %s", __func__, > > device_get_name(pic->pic_dev))); > > > > So, you would check that pic_lookup(dev, xref, FLAG_PIC) returns PIC > with FLAG_PIC set? > Really? This nonsense is in other places too. If you would like to be > this way, check it only in pic_lookup() then! It's there so if someone makes a change to pic_lookup that breaks this assumption they will be told about it. Andrew From owner-svn-src-all@freebsd.org Tue Feb 7 12:04:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3995CD10C3; Tue, 7 Feb 2017 12:04:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC8B121C; Tue, 7 Feb 2017 12:04:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17C440V046030; Tue, 7 Feb 2017 12:04:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17C448G046024; Tue, 7 Feb 2017 12:04:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702071204.v17C448G046024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Feb 2017 12:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313385 - in head/sys/arm: altera/socfpga 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 12:04:06 -0000 Author: andrew Date: Tue Feb 7 12:04:04 2017 New Revision: 313385 URL: https://svnweb.freebsd.org/changeset/base/313385 Log: Add support for PLATFORM and PLATFORM_SMP to the Altera SOCFPGA SoC. This will help with moving it to GENERIC. Reviewed by: br Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9461 Added: head/sys/arm/altera/socfpga/socfpga_mp.h (contents, props changed) Modified: head/sys/arm/altera/socfpga/socfpga_common.c head/sys/arm/altera/socfpga/socfpga_machdep.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/conf/SOCKIT.common Modified: head/sys/arm/altera/socfpga/socfpga_common.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_common.c Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/altera/socfpga/socfpga_common.c Tue Feb 7 12:04:04 2017 (r313385) @@ -43,27 +43,3 @@ __FBSDID("$FreeBSD$"); #include -void -cpu_reset(void) -{ - uint32_t paddr; - bus_addr_t vaddr; - phandle_t node; - - if (rstmgr_warmreset() == 0) - goto end; - - node = OF_finddevice("rstmgr"); - if (node == -1) - goto end; - - if ((OF_getencprop(node, "reg", &paddr, sizeof(paddr))) > 0) { - if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, &vaddr) == 0) { - bus_space_write_4(fdtbus_bs_tag, vaddr, - RSTMGR_CTRL, CTRL_SWWARMRSTREQ); - } - } - -end: - while (1); -} Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Tue Feb 7 12:04:04 2017 (r313385) @@ -28,7 +28,6 @@ * SUCH DAMAGE. */ -#include "opt_ddb.h" #include "opt_platform.h" #include @@ -41,38 +40,22 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include +#include #include #include +#include -vm_offset_t -platform_lastaddr(void) -{ - - return (devmap_lastaddr()); -} - -void -platform_probe_and_attach(void) -{ - -} - -void -platform_gpio_init(void) -{ - -} - -void -platform_late_init(void) -{ +#include +#include -} +#include "platform_if.h" -int -platform_devmap_init(void) +static int +socfpga_devmap_init(platform_t plat) { /* UART */ @@ -99,3 +82,42 @@ platform_devmap_init(void) return (0); } + +static void +socfpga_cpu_reset(platform_t plat) +{ + uint32_t paddr; + bus_addr_t vaddr; + phandle_t node; + + if (rstmgr_warmreset() == 0) + goto end; + + node = OF_finddevice("rstmgr"); + if (node == -1) + goto end; + + if ((OF_getencprop(node, "reg", &paddr, sizeof(paddr))) > 0) { + if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, &vaddr) == 0) { + bus_space_write_4(fdtbus_bs_tag, vaddr, + RSTMGR_CTRL, CTRL_SWWARMRSTREQ); + } + } + +end: + while (1); +} + +static platform_method_t socfpga_methods[] = { + PLATFORMMETHOD(platform_devmap_init, socfpga_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, socfpga_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_setmaxid, socfpga_mp_setmaxid), + PLATFORMMETHOD(platform_mp_start_ap, socfpga_mp_start_ap), +#endif + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(socfpga, "socfpga", 0, "altr,socfpga", 0); Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Tue Feb 7 12:04:04 2017 (r313385) @@ -28,6 +28,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); #include @@ -45,6 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #define SCU_PHYSBASE 0xFFFEC000 #define SCU_SIZE 0x100 @@ -85,7 +90,7 @@ socfpga_trampoline(void) } void -platform_mp_setmaxid(void) +socfpga_mp_setmaxid(platform_t plat) { int hwcpu, ncpu; @@ -105,7 +110,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +socfpga_mp_start_ap(platform_t plat) { bus_space_handle_t scu, rst, ram; int reg; Added: head/sys/arm/altera/socfpga/socfpga_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_mp.h Tue Feb 7 12:04:04 2017 (r313385) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * 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 _SOCFPGA_MP_H_ +#define _SOCFPGA_MP_H_ + +void socfpga_mp_setmaxid(platform_t); +void socfpga_mp_start_ap(platform_t); + +#endif /* _SOCFPGA_MP_H_ */ Modified: head/sys/arm/conf/SOCKIT.common ============================================================================== --- head/sys/arm/conf/SOCKIT.common Tue Feb 7 08:33:46 2017 (r313384) +++ head/sys/arm/conf/SOCKIT.common Tue Feb 7 12:04:04 2017 (r313385) @@ -26,6 +26,8 @@ makeoptions MODULES_OVERRIDE="" makeoptions WERROR="-Werror" options SCHED_ULE # ULE scheduler +options PLATFORM # Platform based SoC +options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp From owner-svn-src-all@freebsd.org Tue Feb 7 12:55:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FCA3CD4393; Tue, 7 Feb 2017 12:55:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 317DB1137; Tue, 7 Feb 2017 12:55:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id v77so28068086wmv.0; Tue, 07 Feb 2017 04:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=L+7gt/Vs/Z+2cYv4QhuUOxd0RjxIz3QYyvYYMEkHYAE=; b=Rx7gKHSDRfZ0/1VPWaB0PmYkpORYwdrHyv9u6QLIaB/SYREdvCG3la5x3fwc0bAj4z OHLBW5Ap0FCo1pQFtD4Q6m3LO3V9zFT5/T4nnhD3/zRtN8OgtbdmL5AwINriMlop+RXG nWx1K4TvA/eprhuh1qEH7bkQHxQGV3vXrieOIQbygkN5IO+hGtc/uHJs8CERT/xzu9VX lefTkZgG5emCHIR+gxiy81jw9PmD14cj2YaJ+im1oL/httemqdHr8wL/cS+rMbDtxZaO z3Qg8aIt/J1OAtbfMrFVK3didBRISuZXrGIf8iplY/pGlDkRB9tEmsRN3pohiCz2QYSk DX1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=L+7gt/Vs/Z+2cYv4QhuUOxd0RjxIz3QYyvYYMEkHYAE=; b=E9UfUV6zP48HZThusITZ5UEswoMzcSH2jA3oNcfWK+kiaJzaLZiFkFZ9MW0+8TnGCi jp7pCM8l9NcyyaD8wIxuBhBOCourm+RRWr6L6NNR98yGDKBUs589SrS/hrXN45JuuvKp R7xrPSkOC24Wk5Du/yJglXvcvOHKupsZpNODzgWb0f3+ZoJKnClHAH09lzkGUDyyLv1+ MC17CYk+NRJwAmTU3F2oZAeoG/c6u2k1urUGjsHxi6S0Bahluz24JK4XwTvWqrDbjO2t SmKcWHfMubAZJEHdYYnV8jQbxO7joyjST0MEKUQVYg0JaNtvl+ViSMijKIqcSX8VdRpl 2RVg== X-Gm-Message-State: AMke39nlOvmzz5W3Jx2C1RfZVYYMyFcUD3u5Yas1BQaOdlLmsObQ8bfwQZ+6ewbvn3gsXw== X-Received: by 10.28.148.76 with SMTP id w73mr13279908wmd.74.1486472110449; Tue, 07 Feb 2017 04:55:10 -0800 (PST) Received: from brick (global-5-142.nat-2.net.cam.ac.uk. [131.111.5.142]) by smtp.gmail.com with ESMTPSA id 8sm2843670wmg.1.2017.02.07.04.55.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 04:55:09 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 7 Feb 2017 12:55:08 +0000 From: Edward Tomasz Napierala To: Konstantin Belousov Cc: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207125508.GA62670@brick> Mail-Followup-To: Konstantin Belousov , John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702062057.v16KvCtI069664@repo.freebsd.org> <2958370.34Dmljdf7f@ralph.baldwin.cx> <20170207083909.GX2092@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207083909.GX2092@kib.kiev.ua> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 12:55:12 -0000 On 0207T1039, Konstantin Belousov wrote: > On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > > Author: trasz > > > Date: Mon Feb 6 20:57:12 2017 > > > New Revision: 313352 > > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > > > Log: > > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > > instead of their sys_*() counterparts. > > > > > > Reviewed by: ed, dchagin, kib > > > MFC after: 2 weeks > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D9378 > > > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > > but just kern_ would be more consistent. That is what we have done with > > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > > etc., but just kern_bind() and kern_listen()). > > Note that the kern_vm_* functions are not quite regular syscall helpers. > The big issue with them, which caused my suggestion, is that the > functions cannot be declared in sys/syscallsubr.h, because their > declarations depend on the vm/*.h namespace. Exactly; they use vm-specific types (vm_offset_t, for example). And I wanted to avoid changing the types all over the place, at least for now. From owner-svn-src-all@freebsd.org Tue Feb 7 13:50:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20428CD5321; Tue, 7 Feb 2017 13:50:20 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD1051158; Tue, 7 Feb 2017 13:50:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id u63so28411320wmu.2; Tue, 07 Feb 2017 05:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PpQzmTLItw5sximOQjW5g84QVpQ0sdMLTjQs1vLY6mA=; b=UGANyXDMGhUDcXvNOGJokj1wNAiu/UHvdqiRZDnoHaw/OBAHBZQIdP6WcxC5exRI9Z 3zyslcGnnzRybRgDT7damASSQqDKUaPBk0SjyZU0h7BXKMwilPnncK7vxGNfnccaDla1 WwVlm1J0VOStuH2etSq23scpQGeobF0bPIyByVJXLMrH+8uNpmLYXxw/xcH3NxSdAIu0 wD25Ble9iEfyN4vWtJZzNjhPdrRgNGZpzI5GJKiEwQ9WSAOTRChAjJvOucexO+14ujlO eaxVGWqKFOLvarX7ISiH3Se141Lj0ChwflG5jn9cVAj+u4Oy60GxGRA00EKAvJjnWVNx uPqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PpQzmTLItw5sximOQjW5g84QVpQ0sdMLTjQs1vLY6mA=; b=XO5d2/s1incB/qR9DgqD/QJqf7Yx/diiQbvJNGqdk2E88qYKtuCnhnx2aiPBOPrSf8 IjJVR5RjK673WahgHHB0XhULpXgag+wQEok2FAHXIYbMY6wa9jzJCpy7cXzaZFDz93no 1Ujsw/udKMS604wvhiW9v3i9GEukafV6LT+Nw8pY/JPxqsbipQOgbj9SHaNg/mexVWXB Za1azeFD0VpDHD2Mj8dWvqyhnaqxYK6xeW8yekleT5qLM2lY3aRdRNN6sIoJExF4utTY I9mzg79d6uOnUqQkZzAty9wnBmBPC7K8ov5dn1lwdWBxr8lxTXUjGSZctMPci5kRVvGy T8vA== X-Gm-Message-State: AMke39mQrjb2PV+qdizLPfe92MI2ceB4f5eKaObdA7SZN+fSMwX1TKdOQ4fTiN0Hf+MUYA== X-Received: by 10.28.178.16 with SMTP id b16mr14513611wmf.83.1486475417917; Tue, 07 Feb 2017 05:50:17 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id p49sm7482787wrb.10.2017.02.07.05.50.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 07 Feb 2017 05:50:17 -0800 (PST) Date: Tue, 7 Feb 2017 14:50:15 +0100 From: Mateusz Guzik To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207135014.GC4772@dft-labs.eu> References: <201702062057.v16KvCtI069664@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702062057.v16KvCtI069664@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 13:50:20 -0000 On Mon, Feb 06, 2017 at 08:57:12PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Feb 6 20:57:12 2017 > New Revision: 313352 > URL: https://svnweb.freebsd.org/changeset/base/313352 > > Log: > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > instead of their sys_*() counterparts. > > -sys_mmap(td, uap) > - struct thread *td; > - struct mmap_args *uap; > +sys_mmap(struct thread *td, struct mmap_args *uap) > +{ > + > + return (kern_vm_mmap(td, (vm_offset_t)uap->addr, uap->len, > + uap->prot, uap->flags, uap->fd, uap->pos)); > +} > + > +int > +kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, > + vm_prot_t prot, int flags, int fd, off_t pos) > { Can we start dropping the td argument? It always is curthread and almost always has to be anyway as something down below accesses data in a manner only safe for curthread (classic: credential checks). With this example the function takes 7 args. So the commit added an indirection which cannot be tail called on amd64 due to the 7th argument passed through the stack. Removing the td argument deals with the problem. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Feb 7 13:56:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAB5ACD557F; Tue, 7 Feb 2017 13:56:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99B5016F6; Tue, 7 Feb 2017 13:56:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cb6FS-0007Ks-N9; Tue, 07 Feb 2017 16:55:58 +0300 Date: Tue, 7 Feb 2017 16:55:58 +0300 From: Slawa Olhovchenkov To: "Andrey V. Elsukov" Cc: Dmitry Morozovsky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r313330 - in head: contrib/netcat lib/libipsec sbin/ifconfig sbin/setkey share/man/man4 sys/conf sys/modules sys/modules/ipsec sys/modules/tcp/tcpmd5 sys/net sys/netinet sys/netinet/tcp... Message-ID: <20170207135558.GF5366@zxy.spb.ru> References: <201702060849.v168nwmf064277@repo.freebsd.org> <1e8b55ba-11d2-9563-be44-0e20f7f2f33d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e8b55ba-11d2-9563-be44-0e20f7f2f33d@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 13:56:08 -0000 On Tue, Feb 07, 2017 at 03:53:05AM +0300, Andrey V. Elsukov wrote: > On 06.02.2017 17:31, Dmitry Morozovsky wrote: > >> Date: Mon Feb 6 08:49:57 2017 > >> New Revision: 313330 > >> URL: https://svnweb.freebsd.org/changeset/base/313330 > >> > >> Log: > >> Merge projects/ipsec into head/. > > > > [snip] > > > > Great, thanks! > > > > Have you any plans to merge this into stable/11 to reduce diffs in network > > stack code? > > It depends from the further users feedback. > I wanted to do MFC after one or two months. But there are two things > that are questionable. The date of stable/11 feature freeze is not > known. And there is also some changes that can be considered as POLA > violations. E.g. now SPIs are unique, and if user had manually > configured SAs with the same SPI, the MFC will break this. What about IKE? I am don't know, do IKE SPI number negotiation? Or remote side just assign implicit SPI? In last case posible race on local system. From owner-svn-src-all@freebsd.org Tue Feb 7 14:49:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 005D4CD44C5; Tue, 7 Feb 2017 14:49:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6181A66; Tue, 7 Feb 2017 14:49:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Enaiv014306; Tue, 7 Feb 2017 14:49:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17EnaUa014301; Tue, 7 Feb 2017 14:49:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071449.v17EnaUa014301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 14:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313386 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 14:49:38 -0000 Author: mjg Date: Tue Feb 7 14:49:36 2017 New Revision: 313386 URL: https://svnweb.freebsd.org/changeset/base/313386 Log: locks: change backoff to exponential Previous implementation would use a random factor to spread readers and reduce chances of starvation. This visibly reduces effectiveness of the mechanism. Switch to the more traditional exponential variant. Try to limit starvation by imposing an upper limit of spins after which spinning is half of what other threads get. Note the mechanism is turned off by default. Reviewed by: kib (previous version) Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c head/sys/kern/subr_lock.c head/sys/sys/lock.h Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/kern_mutex.c Tue Feb 7 14:49:36 2017 (r313386) @@ -140,63 +140,27 @@ struct lock_class lock_class_mtx_spin = #ifdef ADAPTIVE_MUTEXES static SYSCTL_NODE(_debug, OID_AUTO, mtx, CTLFLAG_RD, NULL, "mtx debugging"); -static struct lock_delay_config __read_mostly mtx_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; +static struct lock_delay_config __read_mostly mtx_delay; -SYSCTL_INT(_debug_mtx, OID_AUTO, delay_initial, CTLFLAG_RW, &mtx_delay.initial, - 0, ""); -SYSCTL_INT(_debug_mtx, OID_AUTO, delay_step, CTLFLAG_RW, &mtx_delay.step, - 0, ""); -SYSCTL_INT(_debug_mtx, OID_AUTO, delay_min, CTLFLAG_RW, &mtx_delay.min, +SYSCTL_INT(_debug_mtx, OID_AUTO, delay_base, CTLFLAG_RW, &mtx_delay.base, 0, ""); SYSCTL_INT(_debug_mtx, OID_AUTO, delay_max, CTLFLAG_RW, &mtx_delay.max, 0, ""); -static void -mtx_delay_sysinit(void *dummy) -{ - - mtx_delay.initial = mp_ncpus * 25; - mtx_delay.step = (mp_ncpus * 25) / 2; - mtx_delay.min = mp_ncpus * 5; - mtx_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(mtx_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(mtx_delay); #endif static SYSCTL_NODE(_debug, OID_AUTO, mtx_spin, CTLFLAG_RD, NULL, "mtx spin debugging"); -static struct lock_delay_config __read_mostly mtx_spin_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; - -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_initial, CTLFLAG_RW, - &mtx_spin_delay.initial, 0, ""); -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_step, CTLFLAG_RW, &mtx_spin_delay.step, - 0, ""); -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_min, CTLFLAG_RW, &mtx_spin_delay.min, - 0, ""); -SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_max, CTLFLAG_RW, &mtx_spin_delay.max, - 0, ""); +static struct lock_delay_config __read_mostly mtx_spin_delay; -static void -mtx_spin_delay_sysinit(void *dummy) -{ +SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_base, CTLFLAG_RW, + &mtx_spin_delay.base, 0, ""); +SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_max, CTLFLAG_RW, + &mtx_spin_delay.max, 0, ""); - mtx_spin_delay.initial = mp_ncpus * 25; - mtx_spin_delay.step = (mp_ncpus * 25) / 2; - mtx_spin_delay.min = mp_ncpus * 5; - mtx_spin_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(mtx_spin_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(mtx_spin_delay); /* * System-wide mutexes Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/kern_rwlock.c Tue Feb 7 14:49:36 2017 (r313386) @@ -100,32 +100,14 @@ static SYSCTL_NODE(_debug, OID_AUTO, rwl SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, ""); SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, ""); -static struct lock_delay_config __read_mostly rw_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; +static struct lock_delay_config __read_mostly rw_delay; -SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_initial, CTLFLAG_RW, &rw_delay.initial, - 0, ""); -SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_step, CTLFLAG_RW, &rw_delay.step, - 0, ""); -SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_min, CTLFLAG_RW, &rw_delay.min, +SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_base, CTLFLAG_RW, &rw_delay.base, 0, ""); SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_max, CTLFLAG_RW, &rw_delay.max, 0, ""); -static void -rw_delay_sysinit(void *dummy) -{ - - rw_delay.initial = mp_ncpus * 25; - rw_delay.step = (mp_ncpus * 25) / 2; - rw_delay.min = mp_ncpus * 5; - rw_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(rw_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(rw_delay); #endif /* Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/kern_sx.c Tue Feb 7 14:49:36 2017 (r313386) @@ -148,32 +148,14 @@ static SYSCTL_NODE(_debug, OID_AUTO, sx, SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); -static struct lock_delay_config __read_mostly sx_delay = { - .initial = 1000, - .step = 500, - .min = 100, - .max = 5000, -}; +static struct lock_delay_config __read_mostly sx_delay; -SYSCTL_INT(_debug_sx, OID_AUTO, delay_initial, CTLFLAG_RW, &sx_delay.initial, - 0, ""); -SYSCTL_INT(_debug_sx, OID_AUTO, delay_step, CTLFLAG_RW, &sx_delay.step, - 0, ""); -SYSCTL_INT(_debug_sx, OID_AUTO, delay_min, CTLFLAG_RW, &sx_delay.min, +SYSCTL_INT(_debug_sx, OID_AUTO, delay_base, CTLFLAG_RW, &sx_delay.base, 0, ""); SYSCTL_INT(_debug_sx, OID_AUTO, delay_max, CTLFLAG_RW, &sx_delay.max, 0, ""); -static void -sx_delay_sysinit(void *dummy) -{ - - sx_delay.initial = mp_ncpus * 25; - sx_delay.step = (mp_ncpus * 25) / 2; - sx_delay.min = mp_ncpus * 5; - sx_delay.max = mp_ncpus * 25 * 10; -} -LOCK_DELAY_SYSINIT(sx_delay_sysinit); +LOCK_DELAY_SYSINIT_DEFAULT(sx_delay); #endif void Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/kern/subr_lock.c Tue Feb 7 14:49:36 2017 (r313386) @@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$"); #include +SDT_PROVIDER_DEFINE(lock); +SDT_PROBE_DEFINE1(lock, , , starvation, "u_int"); + CTASSERT(LOCK_CLASS_MAX == 15); struct lock_class *lock_classes[LOCK_CLASS_MAX + 1] = { @@ -103,32 +106,56 @@ lock_destroy(struct lock_object *lock) lock->lo_flags &= ~LO_INITIALIZED; } +static SYSCTL_NODE(_debug, OID_AUTO, lock, CTLFLAG_RD, NULL, "lock debugging"); +static SYSCTL_NODE(_debug_lock, OID_AUTO, delay, CTLFLAG_RD, NULL, + "lock delay"); + +static u_int __read_mostly starvation_limit = 131072; +SYSCTL_INT(_debug_lock_delay, OID_AUTO, starvation_limit, CTLFLAG_RW, + &starvation_limit, 0, ""); + +static u_int __read_mostly restrict_starvation = 0; +SYSCTL_INT(_debug_lock_delay, OID_AUTO, restrict_starvation, CTLFLAG_RW, + &restrict_starvation, 0, ""); + void lock_delay(struct lock_delay_arg *la) { - u_int i, delay, backoff, min, max; struct lock_delay_config *lc = la->config; + u_int i; - delay = la->delay; + la->delay <<= 1; + if (__predict_false(la->delay > lc->max)) + la->delay = lc->max; - if (delay == 0) - delay = lc->initial; - else { - delay += lc->step; - max = lc->max; - if (delay > max) - delay = max; - } - - backoff = cpu_ticks() % delay; - min = lc->min; - if (backoff < min) - backoff = min; - for (i = 0; i < backoff; i++) + for (i = la->delay; i > 0; i++) cpu_spinwait(); - la->delay = delay; - la->spin_cnt += backoff; + la->spin_cnt += la->delay; + if (__predict_false(la->spin_cnt > starvation_limit)) { + SDT_PROBE1(lock, , , starvation, la->delay); + if (restrict_starvation) + la->delay = lc->base; + } +} + +static u_int +lock_roundup_2(u_int val) +{ + u_int res; + + for (res = 1; res <= val; res <<= 1) + continue; + + return (res); +} + +void +lock_delay_default_init(struct lock_delay_config *lc) +{ + + lc->base = lock_roundup_2(mp_ncpus) / 4; + lc->max = lc->base * 1024; } #ifdef DDB @@ -655,7 +682,6 @@ out: critical_exit(); } -static SYSCTL_NODE(_debug, OID_AUTO, lock, CTLFLAG_RD, NULL, "lock debugging"); static SYSCTL_NODE(_debug_lock, OID_AUTO, prof, CTLFLAG_RD, NULL, "lock profiling"); SYSCTL_INT(_debug_lock_prof, OID_AUTO, skipspin, CTLFLAG_RW, Modified: head/sys/sys/lock.h ============================================================================== --- head/sys/sys/lock.h Tue Feb 7 12:04:04 2017 (r313385) +++ head/sys/sys/lock.h Tue Feb 7 14:49:36 2017 (r313386) @@ -202,9 +202,7 @@ extern struct lock_class lock_class_lock extern struct lock_class *lock_classes[]; struct lock_delay_config { - u_int initial; - u_int step; - u_int min; + u_int base; u_int max; }; @@ -215,19 +213,25 @@ struct lock_delay_arg { }; static inline void -lock_delay_arg_init(struct lock_delay_arg *la, struct lock_delay_config *lc) { +lock_delay_arg_init(struct lock_delay_arg *la, struct lock_delay_config *lc) +{ la->config = lc; - la->delay = 0; + la->delay = lc->base; la->spin_cnt = 0; } #define LOCK_DELAY_SYSINIT(func) \ SYSINIT(func##_ld, SI_SUB_LOCK, SI_ORDER_ANY, func, NULL) +#define LOCK_DELAY_SYSINIT_DEFAULT(lc) \ + SYSINIT(lock_delay_##lc##_ld, SI_SUB_LOCK, SI_ORDER_ANY, \ + lock_delay_default_init, &lc) + void lock_init(struct lock_object *, struct lock_class *, const char *, const char *, int); void lock_destroy(struct lock_object *); void lock_delay(struct lock_delay_arg *); +void lock_delay_default_init(struct lock_delay_config *); void spinlock_enter(void); void spinlock_exit(void); void witness_init(struct lock_object *, const char *); From owner-svn-src-all@freebsd.org Tue Feb 7 14:57:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D12CBCD48C0; Tue, 7 Feb 2017 14:57:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B87E1F8F; Tue, 7 Feb 2017 14:57:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id c85so28778673wmi.1; Tue, 07 Feb 2017 06:57:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Oiyb5Dsp6PWIbbIreyhlFLh+joIJaJOb+9wekeAhX3A=; b=CNZnB2b17szKjrjE2Q7RC+539xvIWGbtnbPTxVxs7QKCY8iCo7MHByu8rd5kSrpmOc epC3mZrD4Jtlrscd2Zv7mcnPg6z82KI+9FKbYt0a5ErL0w3xrgZMBJR2anX0p48of4bH 1xPMPgIIVRs54GO9ajd8Fopt9b6SrZO2AwZ11H/5xf6lIAh84J7Rni2iczaHDQ36WuJs li0GYe7aL/49lDSsIs1FQMUOr++5yLgyARYv65O/VumezKpxYMGJ8f4roomTDTVL4iN5 XJ3438m4fxo1HzLqiYRAOcSwMzfK+DgCNOjb7v7k6A8coR49RFuY0kEDwtohFsMUgVEF nbhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Oiyb5Dsp6PWIbbIreyhlFLh+joIJaJOb+9wekeAhX3A=; b=OEHyZt1ny2RI4bLwjkWIrHUtdmrQ2tyf8l83Ok2DPtTALcb+3GQb0vD/fQNgU+Qu6O sdxx2p260GhLVA66pnNfAuKd2YAnFTK+steHutK0yT9U8J7nBukT9+8bLUKxsDNhuhnW UNgRDjWCqnrqbleD8W4ix/NYOHZCB8rhm86FwHcy8eFw7bg+Qgnrzr7+LWe+THMxpi1N fbRxTEBDRq0lDNYDbiThw+FSE2aka0DBQN1+PUh3MUCj96Z/slBr+4h3nI/O0hMpbdIv UzVNmaCruxPqsSEzo0IoxKXe78qQVj9ev8eiBZbEPZvdMhoV3nhkqF/uIcCyVCleldmN AUNQ== X-Gm-Message-State: AMke39m9VD2o9R4knGUeVFaTLlG5gEnyMH6fqyb1eURFA3yQXh91bzaxXmCIvxTCrvUNsQ== X-Received: by 10.28.47.15 with SMTP id v15mr12929996wmv.67.1486479473685; Tue, 07 Feb 2017 06:57:53 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id x135sm19233327wme.23.2017.02.07.06.57.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 07 Feb 2017 06:57:53 -0800 (PST) Date: Tue, 7 Feb 2017 15:57:50 +0100 From: Mateusz Guzik To: Alexey Dokuchaev Cc: Steven Hartland , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r313260 - head/sys/kern Message-ID: <20170207145750.GD4772@dft-labs.eu> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170205151746.GA6841@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 14:57:55 -0000 On Sun, Feb 05, 2017 at 03:17:46PM +0000, Alexey Dokuchaev wrote: > On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: > > For instance, plugging an unused variable, a memory leak, doing a > > lockless check first etc. are all pretty standard and unless there is > > something unusual going on (e.g. complicated circumstances leading to a > > leak) there is not much to explain. In particular, I don't see why > > anyone would explain why leaks are bad on each commit plugging one. > > Right; these (unused variable, resource leaks) usually do not warrant > elaborate explanation. > > [ Some linefeeds below were trimmed for brevity ] > > The gist is as follows: there are plenty of cases where the kernel wants > > to atomically replace the value of a particular variable. Sometimes, > > like in this commit, we want to bump the counter by 1, but only if the > > current value is not 0. For that we need to read the value, see if it is > > 0 and if not, try to replace what we read with what we read + 1. We > > cannot just increment as the value could have changed to 0 in the > > meantime. > > But this also means that multiple cpus doing the same operation on the > > same variable will trip on each other - one will succeed while the rest > > will have to retry. > > Prior to this commit, each retry attempt would explicitly re-read the > > value. This induces cache coherency traffic slowing everyone down. > > amd64 has the nice property of giving us the value it found eleminating > > the need to explicitly re-read it. There is similar story on i386 and > > sparc. > > Other architectures may also benefit from this, but that I did not > > benchmark. > > > > In short[,] under contention atomic_fcmpset is going to be faster than > > atomic_cmpset. > > I did not benchmark this particular change, but a switch of the sort > > easily gives 10%+ in microbenchmarks on amd64. > > That said, while one can argue this optimizes the code, it really > > depessimizes it as something of the sort should have been already > > employed. > > Given the above, IMHO it's quite far from an obvious or of manpage-lookup > thing, and thus requires proper explanation in the commit log. > If the aformenteiond explanation is necessary, the place for it is in the man page. There are already several commits with fcmpset and there will be more to come. I don't see why any of them would convey the information. > > > While on this subject are there any official guidelines to writing > > > commit messages, if no should we create some? > > > > I'm unaware of any. > > We might not have official guidelines, but 30%-what/70%-why rule would > apply perfectly here. ;-) > > ./danfe -- Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Feb 7 15:12:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47E07CD502A; Tue, 7 Feb 2017 15:12:29 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1B79E9C; Tue, 7 Feb 2017 15:12:28 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17FCSYF026094; Tue, 7 Feb 2017 15:12:28 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17FCRT7026092; Tue, 7 Feb 2017 15:12:27 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201702071512.v17FCRT7026092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Tue, 7 Feb 2017 15:12: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: r313387 - in stable/10/sys: dev/ixgbe 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 15:12:29 -0000 Author: rstone Date: Tue Feb 7 15:12:27 2017 New Revision: 313387 URL: https://svnweb.freebsd.org/changeset/base/313387 Log: MFC r312544 Fix reference to free memory in ixgbe/if_media.c When ixgbe receives an interrupt indicating that a new optical module may have been inserted, it discards all of its current media types by calling ifmedia_removeall() and then creates a new set of media types for the supported media on the new module. However, ifmedia_removeall() was maintaining a pointer to whatever the current media type was before the call to ifmedia_removealL(). The result of this was that any attempt to read the current media type of the interface (e.g. via ifconfig) would return potentially garbage data from free memory (or if one were particularly unlucky on an architecture that does not malloc() from a direct map, page fault the kernel). Fix this by NULL'ing out the current media field in if_media.c, and have ixgbe update the current media type after recreating them. Submitted by: Matt Joras Reviewed by: sbruno, erj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9164 Modified: stable/10/sys/dev/ixgbe/if_ix.c stable/10/sys/net/if_media.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ix.c Tue Feb 7 14:49:36 2017 (r313386) +++ stable/10/sys/dev/ixgbe/if_ix.c Tue Feb 7 15:12:27 2017 (r313387) @@ -3885,6 +3885,7 @@ ixgbe_handle_msf(void *context, int pend /* Adjust media types shown in ifconfig */ ifmedia_removeall(&adapter->media); ixgbe_add_media_types(adapter); + ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); IXGBE_CORE_UNLOCK(adapter); return; } Modified: stable/10/sys/net/if_media.c ============================================================================== --- stable/10/sys/net/if_media.c Tue Feb 7 14:49:36 2017 (r313386) +++ stable/10/sys/net/if_media.c Tue Feb 7 15:12:27 2017 (r313387) @@ -105,6 +105,7 @@ ifmedia_removeall(ifm) LIST_REMOVE(entry, ifm_list); free(entry, M_IFADDR); } + ifm->ifm_cur = NULL; } /* From owner-svn-src-all@freebsd.org Tue Feb 7 15:13:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C47CD50B6; Tue, 7 Feb 2017 15:13:20 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E131FE1; Tue, 7 Feb 2017 15:13:20 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17FDJFD026175; Tue, 7 Feb 2017 15:13:19 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17FDJA6026173; Tue, 7 Feb 2017 15:13:19 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201702071513.v17FDJA6026173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Tue, 7 Feb 2017 15:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313388 - in stable/11/sys: dev/ixgbe net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 15:13:21 -0000 Author: rstone Date: Tue Feb 7 15:13:19 2017 New Revision: 313388 URL: https://svnweb.freebsd.org/changeset/base/313388 Log: MFC r312544 Fix reference to free memory in ixgbe/if_media.c When ixgbe receives an interrupt indicating that a new optical module may have been inserted, it discards all of its current media types by calling ifmedia_removeall() and then creates a new set of media types for the supported media on the new module. However, ifmedia_removeall() was maintaining a pointer to whatever the current media type was before the call to ifmedia_removealL(). The result of this was that any attempt to read the current media type of the interface (e.g. via ifconfig) would return potentially garbage data from free memory (or if one were particularly unlucky on an architecture that does not malloc() from a direct map, page fault the kernel). Fix this by NULL'ing out the current media field in if_media.c, and have ixgbe update the current media type after recreating them. Submitted by: Matt Joras Reviewed by: sbruno, erj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9164 Modified: stable/11/sys/dev/ixgbe/if_ix.c stable/11/sys/net/if_media.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/11/sys/dev/ixgbe/if_ix.c Tue Feb 7 15:12:27 2017 (r313387) +++ stable/11/sys/dev/ixgbe/if_ix.c Tue Feb 7 15:13:19 2017 (r313388) @@ -3878,6 +3878,7 @@ ixgbe_handle_msf(void *context, int pend /* Adjust media types shown in ifconfig */ ifmedia_removeall(&adapter->media); ixgbe_add_media_types(adapter); + ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO); IXGBE_CORE_UNLOCK(adapter); return; } Modified: stable/11/sys/net/if_media.c ============================================================================== --- stable/11/sys/net/if_media.c Tue Feb 7 15:12:27 2017 (r313387) +++ stable/11/sys/net/if_media.c Tue Feb 7 15:13:19 2017 (r313388) @@ -107,6 +107,7 @@ ifmedia_removeall(ifm) LIST_REMOVE(entry, ifm_list); free(entry, M_IFADDR); } + ifm->ifm_cur = NULL; } /* From owner-svn-src-all@freebsd.org Tue Feb 7 15:16:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90980CD5156; Tue, 7 Feb 2017 15:16:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60113118A; Tue, 7 Feb 2017 15:16:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17FG1wY026309; Tue, 7 Feb 2017 15:16:01 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17FG1sX026308; Tue, 7 Feb 2017 15:16:01 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071516.v17FG1sX026308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 15:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313389 - head/sys/boot/efi/libefi 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 15:16:02 -0000 Author: manu Date: Tue Feb 7 15:16:01 2017 New Revision: 313389 URL: https://svnweb.freebsd.org/changeset/base/313389 Log: efipart is also using the '%S' printf format, add -Wno-format for it. This fix building for armv6. Modified: head/sys/boot/efi/libefi/Makefile Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Tue Feb 7 15:13:19 2017 (r313388) +++ head/sys/boot/efi/libefi/Makefile Tue Feb 7 15:16:01 2017 (r313389) @@ -26,6 +26,7 @@ SRCS+= time_event.c # of a short. There's no good cast to use here so just ignore the # warnings for now. CWARNFLAGS.efinet.c+= -Wno-format +CWARNFLAGS.efipart.c+= -Wno-format CWARNFLAGS.env.c+= -Wno-format .if ${MACHINE_CPUARCH} == "aarch64" From owner-svn-src-all@freebsd.org Tue Feb 7 15:28:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FC50CD5459; Tue, 7 Feb 2017 15:28:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A3B191F; Tue, 7 Feb 2017 15:28:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v17FSmDl074832 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Feb 2017 17:28:48 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v17FSmDl074832 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v17FSmdK074831; Tue, 7 Feb 2017 17:28:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Feb 2017 17:28:48 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207152848.GC2092@kib.kiev.ua> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207135014.GC4772@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207135014.GC4772@dft-labs.eu> User-Agent: Mutt/1.7.2 (2016-11-26) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 15:28:53 -0000 On Tue, Feb 07, 2017 at 02:50:15PM +0100, Mateusz Guzik wrote: > Can we start dropping the td argument? It always is curthread and > almost always has to be anyway as something down below accesses > data in a manner only safe for curthread (classic: credential checks). > > With this example the function takes 7 args. So the commit added an > indirection which cannot be tail called on amd64 due to the 7th argument > passed through the stack. Removing the td argument deals with the > problem. OTOH accessing current thread as curthread adds some number of instructions with %gs prefixes. On older machines, this caused bubbles in the frontend decoding of the instructions, which made using plain pointer instead of the magical curthread reasonable. Modern big processors should not have the problem anymore, but smaller designs like Atom still do. I suspect it is quite hard to notice a difference there, either with %gs decoding overhead, or with the missed tail call optimization, for the vm syscalls which are quite slow on its own. The effects of both micro- optimizations should be noise. From owner-svn-src-all@freebsd.org Tue Feb 7 15:31:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4115CD55AB for ; Tue, 7 Feb 2017 15:31:02 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wr0-x232.google.com (mail-wr0-x232.google.com [IPv6:2a00:1450:400c:c0c::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BF251C94 for ; Tue, 7 Feb 2017 15:31:02 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wr0-x232.google.com with SMTP id i10so41014211wrb.0 for ; Tue, 07 Feb 2017 07:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=14icftTA0jvXa4Tee8+dRHyqAezOrcis2S0LKdxY/6o=; b=XoU42eWrLPr62gU3IAalyBRfkqlnEUhs/3A4jO0H3LB+xfbcpaUMh/y3tIOcscSpf3 wlcUvJi0mFbxhy9bmO+8IfnasoDMXAPN2oXsTzB6dbtJSuXV+5dvzT7LUxzZQw/iuP1b iw2Ep8hQj7w8RFoUrEYPIfAGxsa2w7yVJkf2E8yb/mEAVwQk1/H3iTlsiY0bCplafg8t ckIHal6MC2nuthdrwtqfvVPZA/I77J5oqK+qhJUwz1JEZScIiS4MLjjl3wUP56f0f3ew Vv1EW/lbUqjKPhtyhjhPaf1g6ww7U/98YxvT17ajFLqT/A0ffyqrH4osjnRFe6ItfFV6 Qafg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=14icftTA0jvXa4Tee8+dRHyqAezOrcis2S0LKdxY/6o=; b=OvVsYzdk6y53tZRqxay4nDuOzH2u8xX7/6WwJS0jYtXd4IRFt1HVdKmeAP9LyWCCC8 E5yM3Uzd1Zb0jGiGe8XeOTfKGW52YU4/aJPvx7S0ljWoF8191atFlNUn+GbPwSDm1PqN hOvzqSC0e+fAAGKocaR9EP0JVkkqLR+icmpQqmwu3TacT7ZvKO2RB3bKcDS4JN+MFoj9 3NxYlrAwCqEwtZUk3pIk7Z6hGyABuzFcRTr7ofxR/Fpx8wizic0BY0KyxmpKGtZeVvJB QiUoo+btUd/v3Ia2BadGVYFNr3PCjecuEHdvSlzFzdDYMc2Ud7DfNuShLy2syHDw13Ns D7AQ== X-Gm-Message-State: AIkVDXKVTIFTtF/WxbZtrQjiNo56PgWW5xKDH0bTwmcXvjpV+m96/KdIDJ8iFJV1dhFMNBnz X-Received: by 10.223.136.109 with SMTP id e42mr14838414wre.14.1486481459804; Tue, 07 Feb 2017 07:30:59 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id q12sm19388238wmd.8.2017.02.07.07.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 07:30:59 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Mateusz Guzik , Alexey Dokuchaev References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik From: Steven Hartland Message-ID: <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> Date: Tue, 7 Feb 2017 15:30:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170207145750.GD4772@dft-labs.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 15:31:02 -0000 On 07/02/2017 14:57, Mateusz Guzik wrote: > On Sun, Feb 05, 2017 at 03:17:46PM +0000, Alexey Dokuchaev wrote: >> On Sun, Feb 05, 2017 at 04:00:06AM +0100, Mateusz Guzik wrote: >>> For instance, plugging an unused variable, a memory leak, doing a >>> lockless check first etc. are all pretty standard and unless there is >>> something unusual going on (e.g. complicated circumstances leading to a >>> leak) there is not much to explain. In particular, I don't see why >>> anyone would explain why leaks are bad on each commit plugging one. >> Right; these (unused variable, resource leaks) usually do not warrant >> elaborate explanation. >> >> [ Some linefeeds below were trimmed for brevity ] >>> The gist is as follows: there are plenty of cases where the kernel wants >>> to atomically replace the value of a particular variable. Sometimes, >>> like in this commit, we want to bump the counter by 1, but only if the >>> current value is not 0. For that we need to read the value, see if it is >>> 0 and if not, try to replace what we read with what we read + 1. We >>> cannot just increment as the value could have changed to 0 in the >>> meantime. >>> But this also means that multiple cpus doing the same operation on the >>> same variable will trip on each other - one will succeed while the rest >>> will have to retry. >>> Prior to this commit, each retry attempt would explicitly re-read the >>> value. This induces cache coherency traffic slowing everyone down. >>> amd64 has the nice property of giving us the value it found eleminating >>> the need to explicitly re-read it. There is similar story on i386 and >>> sparc. >>> Other architectures may also benefit from this, but that I did not >>> benchmark. >>> >>> In short[,] under contention atomic_fcmpset is going to be faster than >>> atomic_cmpset. >>> I did not benchmark this particular change, but a switch of the sort >>> easily gives 10%+ in microbenchmarks on amd64. >>> That said, while one can argue this optimizes the code, it really >>> depessimizes it as something of the sort should have been already >>> employed. >> Given the above, IMHO it's quite far from an obvious or of manpage-lookup >> thing, and thus requires proper explanation in the commit log. >> > If the aformenteiond explanation is necessary, the place for it is in > the man page. There are already several commits with fcmpset and there > will be more to come. I don't see why any of them would convey the > information. > The details of why performance under contention of atomic_fcmpset is better than atomic_cmpset, a manpage would be nice. All I'm suggesting is, while one could guess this may be a performance or possibly a compatibility thing, the reason is not obvious, so a small piece of detail on why the change was done should always be included. For this one something like the following would be nice: Switch fget_unlocked to atomic_fcmpset Improve performance under contention by switching fget_unlocked to use atomic_fcmpset. With small piece of additional information, its clear the reason for the change (why) was to improve performance and anyone who wants more detail on why this would be the case can research it via a manpage or other resources, wouldn't you agree? Regards Steve From owner-svn-src-all@freebsd.org Tue Feb 7 16:01:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C72B0CD5FC1; Tue, 7 Feb 2017 16:01:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 966851351; Tue, 7 Feb 2017 16:01:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17G17tH046734; Tue, 7 Feb 2017 16:01:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17G17Cd046733; Tue, 7 Feb 2017 16:01:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071601.v17G17Cd046733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 16:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313390 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 16:01:08 -0000 Author: mjg Date: Tue Feb 7 16:01:07 2017 New Revision: 313390 URL: https://svnweb.freebsd.org/changeset/base/313390 Log: locks: follow up r313386 Unfinished diff was committed by accident. The loop in lock_delay was changed to decrement, but the loop iterator was still incrementing. Modified: head/sys/kern/subr_lock.c Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Tue Feb 7 15:16:01 2017 (r313389) +++ head/sys/kern/subr_lock.c Tue Feb 7 16:01:07 2017 (r313390) @@ -128,7 +128,7 @@ lock_delay(struct lock_delay_arg *la) if (__predict_false(la->delay > lc->max)) la->delay = lc->max; - for (i = la->delay; i > 0; i++) + for (i = la->delay; i > 0; i--) cpu_spinwait(); la->spin_cnt += la->delay; From owner-svn-src-all@freebsd.org Tue Feb 7 17:03:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5332DCD50DF; Tue, 7 Feb 2017 17:03:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 203051F16; Tue, 7 Feb 2017 17:03:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17H3NnT071986; Tue, 7 Feb 2017 17:03:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17H3NBh071984; Tue, 7 Feb 2017 17:03:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071703.v17H3NBh071984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 17:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313391 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 17:03:24 -0000 Author: mjg Date: Tue Feb 7 17:03:22 2017 New Revision: 313391 URL: https://svnweb.freebsd.org/changeset/base/313391 Log: Bump struct thread alignment to 32. This gives additional bits to use in locking primitives which store the lock thread pointer in the lock value. Discussed with: kib Modified: head/sys/kern/init_main.c head/sys/kern/kern_thread.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Tue Feb 7 16:01:07 2017 (r313390) +++ head/sys/kern/init_main.c Tue Feb 7 17:03:22 2017 (r313391) @@ -99,7 +99,7 @@ void mi_startup(void); /* Should be e static struct session session0; static struct pgrp pgrp0; struct proc proc0; -struct thread0_storage thread0_st __aligned(16); +struct thread0_storage thread0_st __aligned(32); struct vmspace vmspace0; struct proc *initproc; Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Feb 7 16:01:07 2017 (r313390) +++ head/sys/kern/kern_thread.c Tue Feb 7 17:03:22 2017 (r313391) @@ -281,7 +281,7 @@ threadinit(void) thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 16 - 1, UMA_ZONE_NOFREE); + 32 - 1, UMA_ZONE_NOFREE); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); rw_init(&tidhash_lock, "tidhash"); } From owner-svn-src-all@freebsd.org Tue Feb 7 17:04:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6228BCD513C; Tue, 7 Feb 2017 17:04:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CDA6CA; Tue, 7 Feb 2017 17:04:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17H4VUx072064; Tue, 7 Feb 2017 17:04:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17H4VMH072062; Tue, 7 Feb 2017 17:04:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702071704.v17H4VMH072062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 7 Feb 2017 17:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313392 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 17:04:32 -0000 Author: mjg Date: Tue Feb 7 17:04:31 2017 New Revision: 313392 URL: https://svnweb.freebsd.org/changeset/base/313392 Log: rwlock: implement RW_LOCK_WRITER_RECURSED bit This moves recursion handling out of the inlined wunlock path and in particular saves a read and a branch. Discussed with: Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Tue Feb 7 17:03:22 2017 (r313391) +++ head/sys/kern/kern_rwlock.c Tue Feb 7 17:04:31 2017 (r313392) @@ -312,6 +312,7 @@ __rw_try_wlock(volatile uintptr_t *c, co if (rw_wlocked(rw) && (rw->lock_object.lo_flags & LO_RECURSABLE) != 0) { rw->rw_recurse++; + atomic_set_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); rval = 1; } else rval = atomic_cmpset_acq_ptr(&rw->rw_lock, RW_UNLOCKED, @@ -345,10 +346,8 @@ _rw_wunlock_cookie(volatile uintptr_t *c WITNESS_UNLOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); - if (rw->rw_recurse) - rw->rw_recurse--; - else - _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line); + + _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line); TD_LOCKS_DEC(curthread); } @@ -802,6 +801,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u ("%s: recursing but non-recursive rw %s @ %s:%d\n", __func__, rw->lock_object.lo_name, file, line)); rw->rw_recurse++; + atomic_set_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p recursing", __func__, rw); return; @@ -994,12 +994,17 @@ __rw_wunlock_hard(volatile uintptr_t *c, return; rw = rwlock2rw(c); - MPASS(!rw_recursed(rw)); - LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, - LOCKSTAT_WRITER); - if (_rw_write_unlock(rw, tid)) + if (!rw_recursed(rw)) { + LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, + LOCKSTAT_WRITER); + if (_rw_write_unlock(rw, tid)) + return; + } else { + if (--(rw->rw_recurse) == 0) + atomic_clear_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); return; + } KASSERT(rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS), ("%s: neither of the waiter flags are set", __func__)); Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Tue Feb 7 17:03:22 2017 (r313391) +++ head/sys/sys/rwlock.h Tue Feb 7 17:04:31 2017 (r313392) @@ -58,9 +58,10 @@ #define RW_LOCK_READ_WAITERS 0x02 #define RW_LOCK_WRITE_WAITERS 0x04 #define RW_LOCK_WRITE_SPINNER 0x08 +#define RW_LOCK_WRITER_RECURSED 0x10 #define RW_LOCK_FLAGMASK \ (RW_LOCK_READ | RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS | \ - RW_LOCK_WRITE_SPINNER) + RW_LOCK_WRITE_SPINNER | RW_LOCK_WRITER_RECURSED) #define RW_LOCK_WAITERS (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS) #define RW_OWNER(x) ((x) & ~RW_LOCK_FLAGMASK) @@ -111,13 +112,9 @@ #define __rw_wunlock(rw, tid, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ \ - if ((rw)->rw_recurse) \ - (rw)->rw_recurse--; \ - else { \ - if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) ||\ - !_rw_write_unlock((rw), _tid))) \ - _rw_wunlock_hard((rw), _tid, (file), (line)); \ - } \ + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) || \ + !_rw_write_unlock((rw), _tid))) \ + _rw_wunlock_hard((rw), _tid, (file), (line)); \ } while (0) /* From owner-svn-src-all@freebsd.org Tue Feb 7 17:15:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BF4CCD54C3; Tue, 7 Feb 2017 17:15:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58BA4D1A; Tue, 7 Feb 2017 17:15:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17HFDoY076336; Tue, 7 Feb 2017 17:15:13 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17HFDKB076335; Tue, 7 Feb 2017 17:15:13 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071715.v17HFDKB076335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 17:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313393 - head/sys/modules/dtb/allwinner 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 17:15:14 -0000 Author: manu Date: Tue Feb 7 17:15:13 2017 New Revision: 313393 URL: https://svnweb.freebsd.org/changeset/base/313393 Log: Switch to the Linux device tree upstream names for Allwinner boards. Newer u-boot that uses the u-boot-master port uses these names. Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Feb 7 17:04:31 2017 (r313392) +++ head/sys/modules/dtb/allwinner/Makefile Tue Feb 7 17:15:13 2017 (r313393) @@ -1,17 +1,26 @@ # $FreeBSD$ # All the dts files for allwinner systems we support. DTS= \ - bananapi.dts \ - bananapim2.dts \ - cubieboard.dts \ - cubieboard2.dts \ nanopi-neo.dts \ - olimex-a20-som-evb.dts \ - olinuxino-lime.dts \ orangepi-plus-2e.dts \ - pcduino3.dts \ sinovoip-bpi-m3.dts \ + sun4i-a10-cubieboard.dts \ + sun4i-a10-olinuxino-lime.dts \ + sun6i-a31s-sinovoip-bpi-m2.dts \ sun5i-a13-olinuxino.dts \ - sun5i-r8-chip.dts + sun5i-r8-chip.dts \ + sun7i-a20-bananapi.dts \ + sun7i-a20-cubieboard2.dts \ + sun7i-a20-olimex-som-evb.dts \ + sun7i-a20-pcduino3.dts + +LINKS= \ + ${DTBDIR}/sun4i-a10-cubieboard.dtb ${DTBDIR}/cubieboard.dtb \ + ${DTBDIR}/sun4i-a10-olinuxino-lime.dtb ${DTBDIR}/olinuxino-lime.dtb \ + ${DTBDIR}/sun6i-a31s-sinovoip-bpi-m2.dtb ${DTBDIR}/bananapim2.dtb \ + ${DTBDIR}/sun7i-a20-bananapi.dtb ${DTBDIR}/bananapi.dtb \ + ${DTBDIR}/sun7i-a20-cubieboard2.dtb ${DTBDIR}/cubieboard2.dtb \ + ${DTBDIR}/sun7i-a20-olimex-som-evb.dtb ${DTBDIR}/olimex-a20-som-evb.dtb \ + ${DTBDIR}/sun7i-a20-pcduino3.dtb ${DTBDIR}/pcduino3.dtb .include From owner-svn-src-all@freebsd.org Tue Feb 7 17:31:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65DB9CD586A; Tue, 7 Feb 2017 17:31:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3570E16C8; Tue, 7 Feb 2017 17:31:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17HVOgu081968; Tue, 7 Feb 2017 17:31:24 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17HVOtQ081967; Tue, 7 Feb 2017 17:31:24 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071731.v17HVOtQ081967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 17:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313394 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 17:31:25 -0000 Author: manu Date: Tue Feb 7 17:31:24 2017 New Revision: 313394 URL: https://svnweb.freebsd.org/changeset/base/313394 Log: subr_sfbus.c need sys/proc.h for struct thread definition. This fixes kernel build for armv6. Discussed with: kib Modified: head/sys/kern/subr_sfbuf.c Modified: head/sys/kern/subr_sfbuf.c ============================================================================== --- head/sys/kern/subr_sfbuf.c Tue Feb 7 17:15:13 2017 (r313393) +++ head/sys/kern/subr_sfbuf.c Tue Feb 7 17:31:24 2017 (r313394) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Tue Feb 7 17:41:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAA33CD5C9B; Tue, 7 Feb 2017 17:41:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A8871D9D; Tue, 7 Feb 2017 17:41:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17HexeV084683; Tue, 7 Feb 2017 17:40:59 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17HexVp084681; Tue, 7 Feb 2017 17:40:59 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702071740.v17HexVp084681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 7 Feb 2017 17:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313395 - head/tests/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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 17:41:00 -0000 Author: asomers Date: Tue Feb 7 17:40:59 2017 New Revision: 313395 URL: https://svnweb.freebsd.org/changeset/base/313395 Log: Add fibs_test:udp_dontroute6, another IPv6 multi-FIB test PR: 196361 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/tests/sys/netinet/fibs_test.sh head/tests/sys/netinet/udp_dontroute.c Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Tue Feb 7 17:31:24 2017 (r313394) +++ head/tests/sys/netinet/fibs_test.sh Tue Feb 7 17:40:59 2017 (r313395) @@ -595,6 +595,61 @@ udp_dontroute_cleanup() cleanup_tap } +atf_test_case udp_dontroute6 cleanup +udp_dontroute6_head() +{ + atf_set "descr" "Source address selection for UDP IPv6 packets with SO_DONTROUTE on non-default FIBs works" + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} + +udp_dontroute6_body() +{ + # Configure the TAP interface to use an RFC3849 nonrouteable address + # and a non-default fib + ADDR0="2001:db8::2" + ADDR1="2001:db8::3" + SUBNET="2001:db8::" + MASK="64" + # Use a different IP on the same subnet as the target + TARGET="2001:db8::100" + SRCDIR=`atf_get_srcdir` + + atf_expect_fail "PR196361 IPv6 network routes don't respect net.add_addr_allfibs=0" + + # Check system configuration + if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then + atf_skip "This test requires net.add_addr_allfibs=0" + fi + get_fibs 2 + + # Configure the TAP interfaces. Use no_dad so the addresses will be + # ready right away and won't be marked as tentative until DAD + # completes. + setup_tap ${FIB0} inet6 ${ADDR0} ${MASK} no_dad + TARGET_TAP=${TAP} + setup_tap ${FIB1} inet6 ${ADDR1} ${MASK} no_dad + + # Send a UDP packet with SO_DONTROUTE. In the failure case, it will + # return ENETUNREACH, or send the packet to the wrong tap + atf_check -o ignore setfib ${FIB0} \ + ${SRCDIR}/udp_dontroute -6 ${TARGET} /dev/${TARGET_TAP} + cleanup_tap + + # Repeat, but this time target the other tap + setup_tap ${FIB0} inet6 ${ADDR0} ${MASK} no_dad + setup_tap ${FIB1} inet6 ${ADDR1} ${MASK} no_dad + TARGET_TAP=${TAP} + + atf_check -o ignore setfib ${FIB1} \ + ${SRCDIR}/udp_dontroute -6 ${TARGET} /dev/${TARGET_TAP} +} + +udp_dontroute6_cleanup() +{ + cleanup_tap +} + atf_init_test_cases() { @@ -609,6 +664,7 @@ atf_init_test_cases() atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6 atf_add_test_case udp_dontroute + atf_add_test_case udp_dontroute6 } # Looks up one or more fibs from the configuration data and validates them. @@ -656,6 +712,7 @@ get_tap() # Protocol (inet or inet6) # IP address # Netmask in number of bits (eg 24 or 8) +# Extra flags # Return: the tap interface name as the env variable TAP setup_tap() { @@ -663,9 +720,10 @@ setup_tap() local PROTO=$2 local ADDR=$3 local MASK=$4 + local FLAGS=$5 get_tap - echo setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB - setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB + echo setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS + setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS } cleanup_tap() Modified: head/tests/sys/netinet/udp_dontroute.c ============================================================================== --- head/tests/sys/netinet/udp_dontroute.c Tue Feb 7 17:31:24 2017 (r313394) +++ head/tests/sys/netinet/udp_dontroute.c Tue Feb 7 17:40:59 2017 (r313395) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,7 @@ int main(int argc, char **argv) { - struct sockaddr_in dst; + struct sockaddr_storage dst; int s, t; int opt; int ret; @@ -60,17 +61,33 @@ main(int argc, char **argv) const char* sendbuf = "Hello, World!"; const size_t buflen = 80; char recvbuf[buflen]; - - if (argc != 3) { - fprintf(stderr, "Usage: %s ip_address tapdev\n", argv[0]); + bool v6 = false; + const char *addr, *tapdev; + const uint16_t port = 46120; + + bzero(&dst, sizeof(dst)); + if (argc < 3 || argc > 4) { + fprintf(stderr, "Usage: %s [-6] ip_address tapdev\n", argv[0]); exit(2); } - t = open(argv[2], O_RDWR | O_NONBLOCK); + if (strcmp("-6", argv[1]) == 0) { + v6 = true; + addr = argv[2]; + tapdev = argv[3]; + } else { + addr = argv[1]; + tapdev = argv[2]; + } + + t = open(tapdev, O_RDWR | O_NONBLOCK); if (t < 0) err(EXIT_FAILURE, "open"); - s = socket(PF_INET, SOCK_DGRAM, 0); + if (v6) + s = socket(PF_INET6, SOCK_DGRAM, 0); + else + s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) err(EXIT_FAILURE, "socket"); opt = 1; @@ -79,16 +96,26 @@ main(int argc, char **argv) if (ret == -1) err(EXIT_FAILURE, "setsockopt(SO_DONTROUTE)"); - dst.sin_len = sizeof(dst); - dst.sin_family = AF_INET; - dst.sin_port = htons(46120); - dst.sin_addr.s_addr = inet_addr(argv[1]); - if (dst.sin_addr.s_addr == htonl(INADDR_NONE)) { - fprintf(stderr, "Invalid address: %s\n", argv[1]); - exit(2); + if (v6) { + struct sockaddr_in6 *dst6 = ((struct sockaddr_in6*)&dst); + + dst.ss_len = sizeof(struct sockaddr_in6); + dst.ss_family = AF_INET6; + dst6->sin6_port = htons(port); + ret = inet_pton(AF_INET6, addr, &dst6->sin6_addr); + } else { + struct sockaddr_in *dst4 = ((struct sockaddr_in*)&dst); + + dst.ss_len = sizeof(struct sockaddr_in); + dst.ss_family = AF_INET; + dst4->sin_port = htons(port); + ret = inet_pton(AF_INET, addr, &dst4->sin_addr); } + if (ret != 1) + err(EXIT_FAILURE, "inet_pton returned %d", ret); + ret = sendto(s, sendbuf, strlen(sendbuf), 0, (struct sockaddr*)&dst, - dst.sin_len); + dst.ss_len); if (ret == -1) err(EXIT_FAILURE, "sendto"); From owner-svn-src-all@freebsd.org Tue Feb 7 17:58:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11117CD5FDE; Tue, 7 Feb 2017 17:58:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6D69BD8; Tue, 7 Feb 2017 17:58:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 02EBA10A791; Tue, 7 Feb 2017 12:58:37 -0500 (EST) From: John Baldwin To: Edward Tomasz Napierala Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Date: Tue, 07 Feb 2017 09:55:25 -0800 Message-ID: <3460210.7qRYCLqZx1@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170207125508.GA62670@brick> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 12:58:37 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 17:58:38 -0000 On Tuesday, February 07, 2017 12:55:08 PM Edward Tomasz Napierala wrote: > On 0207T1039, Konstantin Belousov wrote: > > On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > > > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > > > Author: trasz > > > > Date: Mon Feb 6 20:57:12 2017 > > > > New Revision: 313352 > > > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > > > > > Log: > > > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > > > instead of their sys_*() counterparts. > > > > > > > > Reviewed by: ed, dchagin, kib > > > > MFC after: 2 weeks > > > > Sponsored by: DARPA, AFRL > > > > Differential Revision: https://reviews.freebsd.org/D9378 > > > > > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > > > but just kern_ would be more consistent. That is what we have done with > > > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > > > etc., but just kern_bind() and kern_listen()). > > > > Note that the kern_vm_* functions are not quite regular syscall helpers. > > The big issue with them, which caused my suggestion, is that the > > functions cannot be declared in sys/syscallsubr.h, because their > > declarations depend on the vm/*.h namespace. > > Exactly; they use vm-specific types (vm_offset_t, for example). And I > wanted to avoid changing the types all over the place, at least for now. You would only need though right? None of the actual objects are used, just things like vm_prot_t? OTOH, kern_* is currently only used for things that are syscall implementations and generally take syscall arguments directly (or close approximations of syscall arguments). It is annoying to lose the consistency in meaning. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 7 18:19:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1537CCD56BA; Tue, 7 Feb 2017 18:19:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B0B1878; Tue, 7 Feb 2017 18:19:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17IJBYr001386; Tue, 7 Feb 2017 18:19:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17IJBMc001382; Tue, 7 Feb 2017 18:19:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702071819.v17IJBMc001382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Feb 2017 18:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313396 - in head/sys/arm64: arm64 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:19:13 -0000 Author: andrew Date: Tue Feb 7 18:19:11 2017 New Revision: 313396 URL: https://svnweb.freebsd.org/changeset/base/313396 Log: Push reading of ESR_EL1 to assembly. Among other uses this will allow us to expose this to signal handlers, e.g. for the clang sanitizers. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/exception.S head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/trap.c head/sys/arm64/include/frame.h Modified: head/sys/arm64/arm64/exception.S ============================================================================== --- head/sys/arm64/arm64/exception.S Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/arm64/exception.S Tue Feb 7 18:19:11 2017 (r313396) @@ -56,10 +56,12 @@ __FBSDID("$FreeBSD$"); stp x0, x1, [sp, #(TF_X + 0 * 8)] mrs x10, elr_el1 mrs x11, spsr_el1 + mrs x12, esr_el1 .if \el == 0 mrs x18, sp_el0 .endif - stp x10, x11, [sp, #(TF_ELR)] + str x10, [sp, #(TF_ELR)] + stp w11, w12, [sp, #(TF_SPSR)] stp x18, lr, [sp, #(TF_SP)] mrs x18, tpidr_el1 add x29, sp, #(TF_SIZE) Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/arm64/genassym.c Tue Feb 7 18:19:11 2017 (r313396) @@ -62,4 +62,5 @@ ASSYM(TD_LOCK, offsetof(struct thread, t ASSYM(TF_SIZE, sizeof(struct trapframe)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); ASSYM(TF_ELR, offsetof(struct trapframe, tf_elr)); +ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr)); ASSYM(TF_X, offsetof(struct trapframe, tf_x)); Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/arm64/trap.c Tue Feb 7 18:19:11 2017 (r313396) @@ -257,7 +257,7 @@ print_registers(struct trapframe *frame) printf(" sp: %16lx\n", frame->tf_sp); printf(" lr: %16lx\n", frame->tf_lr); printf(" elr: %16lx\n", frame->tf_elr); - printf("spsr: %16lx\n", frame->tf_spsr); + printf("spsr: %8x\n", frame->tf_spsr); } void @@ -267,7 +267,7 @@ do_el1h_sync(struct trapframe *frame) uint64_t esr, far; /* Read the esr register to get the exception details */ - esr = READ_SPECIALREG(esr_el1); + esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); #ifdef KDTRACE_HOOKS @@ -352,7 +352,7 @@ do_el0_sync(struct trapframe *frame) td = curthread; td->td_frame = frame; - esr = READ_SPECIALREG(esr_el1); + esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); switch (exception) { case EXCP_UNKNOWN: Modified: head/sys/arm64/include/frame.h ============================================================================== --- head/sys/arm64/include/frame.h Tue Feb 7 17:40:59 2017 (r313395) +++ head/sys/arm64/include/frame.h Tue Feb 7 18:19:11 2017 (r313396) @@ -45,7 +45,8 @@ struct trapframe { uint64_t tf_sp; uint64_t tf_lr; uint64_t tf_elr; - uint64_t tf_spsr; + uint32_t tf_spsr; + uint32_t tf_esr; uint64_t tf_x[30]; }; From owner-svn-src-all@freebsd.org Tue Feb 7 18:23:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC66ECD58F0; Tue, 7 Feb 2017 18:23:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9A3A1E28; Tue, 7 Feb 2017 18:23:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17INil7005237; Tue, 7 Feb 2017 18:23:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17INiut005236; Tue, 7 Feb 2017 18:23:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702071823.v17INiut005236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 18:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313397 - head/usr.bin/sed/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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:23:46 -0000 Author: ngie Date: Tue Feb 7 18:23:44 2017 New Revision: 313397 URL: https://svnweb.freebsd.org/changeset/base/313397 Log: Don't expect :inplace_symlink_src to fail anymore (post-r313277) The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks MFC after: 12 days X-MFC with: r313277 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/sed/tests/sed2_test.sh Modified: head/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- head/usr.bin/sed/tests/sed2_test.sh Tue Feb 7 18:19:11 2017 (r313396) +++ head/usr.bin/sed/tests/sed2_test.sh Tue Feb 7 18:23:44 2017 (r313397) @@ -47,8 +47,6 @@ inplace_symlink_src_head() } inplace_symlink_src_body() { - atf_expect_fail "Check for S_IFREG reverted in r312404" - echo foo > a atf_check ln -s a b atf_check -e not-empty -s not-exit:0 sed -i '' -e 's,foo,bar,g' b From owner-svn-src-all@freebsd.org Tue Feb 7 18:29:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4807CD59D6; Tue, 7 Feb 2017 18:29:38 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1E5188; Tue, 7 Feb 2017 18:29:37 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.16.0.17/8.16.0.17) with SMTP id v17ID4K2011489; Tue, 7 Feb 2017 12:29:36 -0600 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp1.rice.edu with ESMTP id 28fkarr0ep-1; Tue, 07 Feb 2017 12:29:36 -0600 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id C0157460E80; Tue, 7 Feb 2017 12:29:35 -0600 (CST) Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm To: John Baldwin , Edward Tomasz Napierala References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> <3460210.7qRYCLqZx1@ralph.baldwin.cx> Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Alan Cox Message-ID: <98dce77f-b581-93fe-d2d6-ca1e27cd6a95@rice.edu> Date: Tue, 7 Feb 2017 12:29:35 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <3460210.7qRYCLqZx1@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611190142 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:29:39 -0000 On 02/07/2017 11:55, John Baldwin wrote: > On Tuesday, February 07, 2017 12:55:08 PM Edward Tomasz Napierala wrote: >> On 0207T1039, Konstantin Belousov wrote: >>> On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: >>>> On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: >>>>> Author: trasz >>>>> Date: Mon Feb 6 20:57:12 2017 >>>>> New Revision: 313352 >>>>> URL: https://svnweb.freebsd.org/changeset/base/313352 >>>>> >>>>> Log: >>>>> Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), >>>>> kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats >>>>> instead of their sys_*() counterparts. >>>>> >>>>> Reviewed by: ed, dchagin, kib >>>>> MFC after: 2 weeks >>>>> Sponsored by: DARPA, AFRL >>>>> Differential Revision: https://reviews.freebsd.org/D9378 >>>> I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, >>>> but just kern_ would be more consistent. That is what we have done with >>>> every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, >>>> etc., but just kern_bind() and kern_listen()). >>> Note that the kern_vm_* functions are not quite regular syscall helpers. >>> The big issue with them, which caused my suggestion, is that the >>> functions cannot be declared in sys/syscallsubr.h, because their >>> declarations depend on the vm/*.h namespace. >> Exactly; they use vm-specific types (vm_offset_t, for example). And I >> wanted to avoid changing the types all over the place, at least for now. > You would only need though right? None of the actual objects > are used, just things like vm_prot_t? > > OTOH, kern_* is currently only used for things that are syscall implementations > and generally take syscall arguments directly (or close approximations of > syscall arguments). It is annoying to lose the consistency in meaning. > I tend to agree with John. Why not use the same types for the kern_* parameters as are used in the corresponding args structure? Let the conversion to the Mach VM types happen inside of the function's implementation. From owner-svn-src-all@freebsd.org Tue Feb 7 18:37:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F24FCCD5CE3; Tue, 7 Feb 2017 18:37:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF6FBAED; Tue, 7 Feb 2017 18:37:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Ibk6a009906; Tue, 7 Feb 2017 18:37:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Ibkhn009905; Tue, 7 Feb 2017 18:37:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702071837.v17Ibkhn009905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 18:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313398 - head/contrib/byacc/test/yacc 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:37:48 -0000 Author: ngie Date: Tue Feb 7 18:37:46 2017 New Revision: 313398 URL: https://svnweb.freebsd.org/changeset/base/313398 Log: Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD YYINT on FreeBSD is int, not short I'll work with the upstream maintainer or come up with a build method of modifying their definitions on install instead of having to modify tests to match our forked YYINT definition. PR: 216891 Sponsored by: Dell EMC Isilon Modified: head/contrib/byacc/test/yacc/expr.oxout.tab.c Modified: head/contrib/byacc/test/yacc/expr.oxout.tab.c ============================================================================== --- head/contrib/byacc/test/yacc/expr.oxout.tab.c Tue Feb 7 18:23:44 2017 (r313397) +++ head/contrib/byacc/test/yacc/expr.oxout.tab.c Tue Feb 7 18:37:46 2017 (r313398) @@ -178,7 +178,7 @@ extern int YYPARSE_DECL(); #define ID 257 #define CONST 258 #define YYERRCODE 256 -typedef short YYINT; +typedef int YYINT; static const YYINT expr.oxout_lhs[] = { -1, 2, 0, 1, 3, 3, 3, 3, 3, 3, 3, }; From owner-svn-src-all@freebsd.org Tue Feb 7 18:40:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD5CCD5E46; Tue, 7 Feb 2017 18:40:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79EC4E6F; Tue, 7 Feb 2017 18:40:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id f144so9820994pfa.2; Tue, 07 Feb 2017 10:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=mX28dMMaEXBGZ0hwVPu6g59mryGWJjsN6pdTY5dbuts=; b=PvAc07XR34Do8q2rfUi3XRnByxhCMDcEryEzr6X5LNq/zleJexGDyC0PI0l9mx0RmB CQSAULCdKJbhUrupso2PXDAWUOHgKN+xMqz5hZBvRVkMD8V8jSVcDAmi5zESVNEM6u5q L8SIxH+re+V1L70SwDvwV3G2uR4fMdeuWMQ1xyLp2Hq+WThdlgzg/DsluyN33cllfLMf 16Z1eHGIswDzciw3a0YH+42N7IP/aBB2L2G0gpfhZC6jsU7VZdDtTJ/Pw8p5As2lDjad 2cOeuXh6cWywDKXtMzULUAfe92aOBYfjhXb6XJTRWZylxd78ibbRRYT2X3XfOps6SdFz AmyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=mX28dMMaEXBGZ0hwVPu6g59mryGWJjsN6pdTY5dbuts=; b=JrAITqQl/UnN/hcPi9SatMlR+8BvUb9GwRz3TZwO2H94jbYxGzl4/9SCz0Agmt8kBo gptPe2RdM2fkpRo55Q4/Yv9eCT8fPOYpE3cUmMoEn0cspiIKwPEiM4dYMK61Fyj0C6mN gGpTyHGc6mDpGDVPis9k1B6uiJXCk0QU/ZNMkgIkoEUoRmVQRSs8GucDZppjMHPrWf4C pBRDv4T3qI8RmdRXTLTAT1VpRBv2Kz2r0NKwCRideQ2lDTT8Ukngx+ttu8uk5spBnvK+ oK+6TLrI4V6HDEyZpKU51TEGt03FV40n7VlJx3c5oonh/QfrYziwfuo9+x0P6yW1M8tI /yzA== X-Gm-Message-State: AIkVDXKnetWpCmMAciOlxYirGiSw2/Ies/OMXPPWYvO8C4o1gCsOtqBMmIODEMvsH3Hyng== X-Received: by 10.98.37.132 with SMTP id l126mr21631806pfl.45.1486492821845; Tue, 07 Feb 2017 10:40:21 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 21sm13389146pfy.4.2017.02.07.10.40.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Feb 2017 10:40:21 -0800 (PST) Subject: Re: svn commit: r313398 - head/contrib/byacc/test/yacc Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702071837.v17Ibkhn009905@repo.freebsd.org> Date: Tue, 7 Feb 2017 10:40:19 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jung-uk Kim Message-Id: <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> References: <201702071837.v17Ibkhn009905@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:40:22 -0000 --Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 7, 2017, at 10:37, Ngie Cooper wrote: >=20 > Author: ngie > Date: Tue Feb 7 18:37:46 2017 > New Revision: 313398 > URL: https://svnweb.freebsd.org/changeset/base/313398 >=20 > Log: > Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD >=20 > YYINT on FreeBSD is int, not short >=20 > I'll work with the upstream maintainer or come up with a build > method of modifying their definitions on install instead of > having to modify tests to match our forked YYINT definition. >=20 > PR: 216891 > Sponsored by: Dell EMC Isilon I forgot to mention=E2=80=A6 "X-MFC with: r313105, = r313106=E2=80=9D. An MFC timer was never set for those changes, so I didn=E2=80=99t = set a timer in my change either, but if those changes are backported, I = can backport this one as well. Thanks, -Ngie --Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C 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 iQIcBAEBCgAGBQJYmhSTAAoJEPWDqSZpMIYVvGQQAKGqeopJT/W5Z7OAvgLIGd1d 1kMbVfopBsqiER1lIgi3efmRA1skNL+0IlDTTGAVRzHu1f8UXKYAS6Q3xmtWTqXm 2hZQ0M9o5yDtc4ZBsPk0efUUi6cDjmRqkoc57lF6PasS90Zt6PP1I8kmK4nANxBo 5J3bE8DG04K9DPGfnLHwHTA2FI5ke2hlJbAzaTGRxxeVtg0QYaeOJqWQvpu7fLGn fRWlO2XG7IkC4+J1/pJmT2grFYJxvO3O9wbuS4qUCaMi32gLLfza+UUhkcSo4FYr da0z/st67cHXZKaDqY2875XUtuTYl1xWa3fsZHa2yBPzkufYjvxfX/0LTFeTe+8/ RZqcHPiRvTrxjsNAfFYmRQjiF14n64n1bvYIYhCt8AAul0k0YePOTLi/w+CH79+z V0dODXLcjbpOLzumKKsEIw/gRVlK48U1AKYp6G8NB/J0BTApjBH/lOG+vQEMAfs/ k02tLYjI6NFESRXf0qoLaVyo6JJpxV+7lgsh6QOGNfrdqDBzjvl2QEG1H6TUzFFO Ku+shFpq4yOrTS9wNZeyrLRcN1BoL8EG50CArK6HLPnIS4f5BqnzPr3GcKINSBE4 0OYKfRmRtVL6ZlFEPjuRxJ8qr3IQj8JPDhxIF8BiHkN2xk8W9eAv1yUC8ha9iFAa 2QqUTusLws7WrOcPlDO2 =jZmN -----END PGP SIGNATURE----- --Apple-Mail=_E3CD9BA6-33E9-4871-A610-698427ED723C-- From owner-svn-src-all@freebsd.org Tue Feb 7 18:46:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AF8ECD415B; Tue, 7 Feb 2017 18:46:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id A30A4146A; Tue, 7 Feb 2017 18:46:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r313398 - head/contrib/byacc/test/yacc To: "Ngie Cooper (yaneurabeya)" , Ngie Cooper References: <201702071837.v17Ibkhn009905@repo.freebsd.org> <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Jung-uk Kim Message-ID: Date: Tue, 7 Feb 2017 13:46:15 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:46:16 -0000 On 02/07/2017 13:40, Ngie Cooper (yaneurabeya) wrote: > >> On Feb 7, 2017, at 10:37, Ngie Cooper wrote: >> >> Author: ngie >> Date: Tue Feb 7 18:37:46 2017 >> New Revision: 313398 >> URL: https://svnweb.freebsd.org/changeset/base/313398 >> >> Log: >> Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD >> >> YYINT on FreeBSD is int, not short >> >> I'll work with the upstream maintainer or come up with a build >> method of modifying their definitions on install instead of >> having to modify tests to match our forked YYINT definition. >> >> PR: 216891 >> Sponsored by: Dell EMC Isilon > > I forgot to mention… "X-MFC with: r313105, r313106â€. > An MFC timer was never set for those changes, so I didn’t set a timer in my change either, but if those changes are backported, I can backport this one as well. Thanks and sorry for the break. Jung-uk Kim From owner-svn-src-all@freebsd.org Tue Feb 7 18:57:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5324CD449E; Tue, 7 Feb 2017 18:57:58 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B9A1CA0; Tue, 7 Feb 2017 18:57:58 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Ivvsd018292; Tue, 7 Feb 2017 18:57:57 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Ivvn1018291; Tue, 7 Feb 2017 18:57:57 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702071857.v17Ivvn1018291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 7 Feb 2017 18:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313401 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 18:57:58 -0000 Author: vangyzen Date: Tue Feb 7 18:57:57 2017 New Revision: 313401 URL: https://svnweb.freebsd.org/changeset/base/313401 Log: Fix garbage IP addresses in UDP log_in_vain messages If multiple threads emit a UDP log_in_vain message concurrently, the IP addresses could be garbage due to concurrent usage of a single string buffer inside inet_ntoa(). Use inet_ntoa_r() with two stack buffers instead. Reported by: Mark Martinec MFC after: 3 days Relnotes: yes Sponsored by: Dell EMC Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Feb 7 18:57:52 2017 (r313400) +++ head/sys/netinet/udp_usrreq.c Tue Feb 7 18:57:57 2017 (r313401) @@ -667,13 +667,13 @@ udp_input(struct mbuf **mp, int *offp, i INPLOOKUP_RLOCKPCB, ifp, m); if (inp == NULL) { if (udp_log_in_vain) { - char buf[4*sizeof "123"]; + char src[INET_ADDRSTRLEN]; + char dst[INET_ADDRSTRLEN]; - strcpy(buf, inet_ntoa(ip->ip_dst)); log(LOG_INFO, "Connection attempt to UDP %s:%d from %s:%d\n", - buf, ntohs(uh->uh_dport), inet_ntoa(ip->ip_src), - ntohs(uh->uh_sport)); + inet_ntoa_r(ip->ip_dst, dst), ntohs(uh->uh_dport), + inet_ntoa_r(ip->ip_src, src), ntohs(uh->uh_sport)); } UDPSTAT_INC(udps_noport); if (m->m_flags & (M_BCAST | M_MCAST)) { From owner-svn-src-all@freebsd.org Tue Feb 7 19:11:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE0CACD4969; Tue, 7 Feb 2017 19:11:00 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 8D274A57; Tue, 7 Feb 2017 19:11:00 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-144.nat-2.net.cam.ac.uk [131.111.5.144]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 51FB9D8561; Tue, 7 Feb 2017 19:05:27 +0000 (UTC) Date: Tue, 7 Feb 2017 19:10:58 +0000 From: Andrew Turner To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313342 - head/sys/conf Message-ID: <20170207191058.65d72285@zapp> In-Reply-To: <2448004.hnTc9TClBV@ralph.baldwin.cx> References: <201702061441.v16EfYZx010320@repo.freebsd.org> <2448004.hnTc9TClBV@ralph.baldwin.cx> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 19:11:00 -0000 On Mon, 06 Feb 2017 10:43:09 -0800 John Baldwin wrote: > On Monday, February 06, 2017 02:41:34 PM Andrew Turner wrote: > > Author: andrew > > Date: Mon Feb 6 14:41:34 2017 > > New Revision: 313342 > > URL: https://svnweb.freebsd.org/changeset/base/313342 > > > > Log: > > Only build the ACPI PCI drivers on x86, they are unlikely to be > > used on arm64 without dignificant changes. > > > > Obtained from: ABT Systems Ltd > > Sponsored by: The FreeBSD Foundation > > I still think this is not really the right approach. Nothing about > _BBN, _CRS, or _PRT, etc. is x86-specific. > the main issue is the code assumes a single PCIe root controller, e.g. the pci_cfg* KPI won't work on ThunderX with 6 independent PCIe root controllers. I expect much of the code could be re-enabled on arm64, however for now it's easier to disable it. Andrew From owner-svn-src-all@freebsd.org Tue Feb 7 19:13:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 330DDCD4C6D; Tue, 7 Feb 2017 19:13:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F38AADF5; Tue, 7 Feb 2017 19:13:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id f144so9867619pfa.2; Tue, 07 Feb 2017 11:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=oH2r635airVb7X3Kk0uBo6ozptNmIwXBaYiBX0ZUhi4=; b=D9o5hnzGyJiYxQ2sYfw4M0DuZYJSVEvIZZDi09d72aykTI2/l30+eiEkdnkmHojvtj W3ElZ5euCjeGmXwJ6oSqpGRuDCoSNtRGaCtSW3zxhPbNq6qFG3zTAa3h55XhReIqbtjm TfG4SKAUlPjicr+CEXjBMTH1V24cm6J0Ij4WKP8KeF4CHisMUi9BTvqch4N3sH4U4UJY o7Ld1mdMnFvgg8eKQs8cokkp8odFRd1cxYdKWTbRMwiOow/nPEG5q2wqSctA+Mw0Rxz4 r5QfOn2Sv5k1IMKp5uX+MSqGZeULZKm5Nw2g5YEE2A6jAj4AAhd0YHxGMHapxBYYDyD+ +pLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=oH2r635airVb7X3Kk0uBo6ozptNmIwXBaYiBX0ZUhi4=; b=ZnYC9sU2pU2ydjtyDrcnCnQXQH33EYYnu7Q6UkBkX9S/gvL1xFoMbirn6n+qfO9Md+ 4Ub5GZxtPPF/2/c6cn8Fi8OU/n5wS2j5wHKbneHgVqOIqMtoIkdup7G1fzQcYo4J+8Kl rv+SYshjR25GWdxila24AWpmD4mQiRjh77p4b9rAkagr3ylI4bsKVQc1OXjvOuGwK2t0 5yhym2n00NxcwEbAtABfPgIRO3Ma57Q+OCxyjpgzLEcHVANNTmMFiuCNQhxuG4z4ncDT UYZMBNT8JVK+wntRbIxY6dqT3WkrN9gug3YWgk0PyS6JMhvsEmZmxfs7VvtzcVAt7ws0 Ktpg== X-Gm-Message-State: AIkVDXJ4Sj8NaXZULXcYfMYPY4LpWEXJR+5vBjEti+Zu7Nk5uq33l17htA06iDvz9vZt6g== X-Received: by 10.84.128.33 with SMTP id 30mr28305839pla.128.1486494818135; Tue, 07 Feb 2017 11:13:38 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 75sm13389737pfp.80.2017.02.07.11.13.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Feb 2017 11:13:37 -0800 (PST) Subject: Re: svn commit: r313398 - head/contrib/byacc/test/yacc Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 7 Feb 2017 11:13:15 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702071837.v17Ibkhn009905@repo.freebsd.org> <25E886E6-970E-43C7-9654-CB380E2C84F6@gmail.com> To: Jung-uk Kim X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 19:13:39 -0000 --Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 7, 2017, at 10:46, Jung-uk Kim wrote: >=20 > On 02/07/2017 13:40, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Feb 7, 2017, at 10:37, Ngie Cooper wrote: >>>=20 >>> Author: ngie >>> Date: Tue Feb 7 18:37:46 2017 >>> New Revision: 313398 >>> URL: https://svnweb.freebsd.org/changeset/base/313398 >>>=20 >>> Log: >>> Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD >>>=20 >>> YYINT on FreeBSD is int, not short >>>=20 >>> I'll work with the upstream maintainer or come up with a build >>> method of modifying their definitions on install instead of >>> having to modify tests to match our forked YYINT definition. >>>=20 >>> PR: 216891 >>> Sponsored by: Dell EMC Isilon >>=20 >> I forgot to mention=E2=80=A6 "X-MFC with: r313105, = r313106=E2=80=9D. >> An MFC timer was never set for those changes, so I didn=E2=80=99t = set a timer in my change either, but if those changes are backported, I = can backport this one as well. >=20 > Thanks and sorry for the break. No worries :)=E2=80=A6 I have an idea for how to do this more reliably = in the future without having to hack up the tests. I=E2=80=99ll send = that out for CR sometime this coming week. -Ngie --Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E 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 iQIcBAEBCgAGBQJYmhxSAAoJEPWDqSZpMIYVvl8P/iNK1i7IQZtrvujRBotRCUvg o+LLDAmPq6StuPfuF/L8xoiOvJjUI1EwGREmYPlg3365grlVRWEA4ZCfFJ8LsbJn 0mDaBPyqtwob4A6eL+FykDBNdFTRcMyeTMOYFB+vy0OSrqhtBIegcF2At5N4AXMk VldC4ifTgVHggRm+ohYinDj/zzr3xCqgDp+gsvFoX3IkDKj+DtS46Bd01yNZ9zDB ySYIrurQao/+v4thVqPATrYmXxAPwTielFxRsR1jLrXc+tBt9vyIPB9+s+ScL29n yhwwBYd35+ODIzhpRHpb20TgLqmiqfQnA70Lugs/BncNU+Vi90VKAHSbsmmIgdSM TadjPMHVJ61XqcB30oK069bSqjzKUl7tr2bFHHXyFkJdVCQ68lZp2lTr5QYcikDE dEatzVwXcrileadUXyuEm2pWaG9UpCq+TF+Urs424bkJofGaT9hgwrK4wcqCN7O1 8dWE3G7ucn7uAAIs35uSrxSt8EIHT7LaTcME2K9saxQHtRshUILGfUUM2fcbElQS U2EnNUeAV4AVYTV+RzM1Vk7o+54jFOUZ1wVW7VFRuyRGIv8LaPa3fLiEZ0degsyc GxgDMyCDQCUi0XZlFnBIZXFRRUWJ8EETJ7BlQcij9N6dmK5jOofJJqd+yNjuOzCc bhM0HzL3/Ns8lrfgcxl8 =dE08 -----END PGP SIGNATURE----- --Apple-Mail=_4B01CC8E-883A-43F2-A7C5-4A95E5A07B4E-- From owner-svn-src-all@freebsd.org Tue Feb 7 19:28:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0C7CCD512F; Tue, 7 Feb 2017 19:28:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF8C11534; Tue, 7 Feb 2017 19:28:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17JSW9n030741; Tue, 7 Feb 2017 19:28:32 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17JSWCi030739; Tue, 7 Feb 2017 19:28:32 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702071928.v17JSWCi030739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 7 Feb 2017 19:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313403 - head/sys/arm/allwinner 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 19:28:34 -0000 Author: manu Date: Tue Feb 7 19:28:32 2017 New Revision: 313403 URL: https://svnweb.freebsd.org/changeset/base/313403 Log: Rename timer.c to a10_timer.c Requested by: andrew Added: head/sys/arm/allwinner/a10_timer.c - copied unchanged from r313402, head/sys/arm/allwinner/timer.c Deleted: head/sys/arm/allwinner/timer.c Modified: head/sys/arm/allwinner/files.allwinner_up Copied: head/sys/arm/allwinner/a10_timer.c (from r313402, head/sys/arm/allwinner/timer.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a10_timer.c Tue Feb 7 19:28:32 2017 (r313403, copy of r313402, head/sys/arm/allwinner/timer.c) @@ -0,0 +1,367 @@ +/*- + * Copyright (c) 2012 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include + +/** + * Timer registers addr + * + */ +#define SW_TIMER_IRQ_EN_REG 0x00 +#define SW_TIMER_IRQ_STA_REG 0x04 +#define SW_TIMER0_CTRL_REG 0x10 +#define SW_TIMER0_INT_VALUE_REG 0x14 +#define SW_TIMER0_CUR_VALUE_REG 0x18 + +#define SW_COUNTER64LO_REG 0xa4 +#define SW_COUNTER64HI_REG 0xa8 +#define CNT64_CTRL_REG 0xa0 + +#define CNT64_RL_EN 0x02 /* read latch enable */ + +#define TIMER_ENABLE (1<<0) +#define TIMER_AUTORELOAD (1<<1) +#define TIMER_OSC24M (1<<2) /* oscillator = 24mhz */ +#define TIMER_PRESCALAR (0<<4) /* prescalar = 1 */ + +#define SYS_TIMER_CLKSRC 24000000 /* clock source */ + +struct a10_timer_softc { + device_t sc_dev; + struct resource *res[2]; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + void *sc_ih; /* interrupt handler */ + uint32_t sc_period; + uint32_t timer0_freq; + struct eventtimer et; +}; + +int a10_timer_get_timerfreq(struct a10_timer_softc *); + +#define timer_read_4(sc, reg) \ + bus_space_read_4(sc->sc_bst, sc->sc_bsh, reg) +#define timer_write_4(sc, reg, val) \ + bus_space_write_4(sc->sc_bst, sc->sc_bsh, reg, val) + +static u_int a10_timer_get_timecount(struct timecounter *); +static int a10_timer_timer_start(struct eventtimer *, + sbintime_t first, sbintime_t period); +static int a10_timer_timer_stop(struct eventtimer *); + +static uint64_t timer_read_counter64(void); + +static int a10_timer_hardclock(void *); +static int a10_timer_probe(device_t); +static int a10_timer_attach(device_t); + +static delay_func a10_timer_delay; + +static struct timecounter a10_timer_timecounter = { + .tc_name = "a10_timer timer0", + .tc_get_timecount = a10_timer_get_timecount, + .tc_counter_mask = ~0u, + .tc_frequency = 0, + .tc_quality = 1000, +}; + +struct a10_timer_softc *a10_timer_sc = NULL; + +static struct resource_spec a10_timer_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static uint64_t +timer_read_counter64(void) +{ + uint32_t lo, hi; + + /* Latch counter, wait for it to be ready to read. */ + timer_write_4(a10_timer_sc, CNT64_CTRL_REG, CNT64_RL_EN); + while (timer_read_4(a10_timer_sc, CNT64_CTRL_REG) & CNT64_RL_EN) + continue; + + hi = timer_read_4(a10_timer_sc, SW_COUNTER64HI_REG); + lo = timer_read_4(a10_timer_sc, SW_COUNTER64LO_REG); + + return (((uint64_t)hi << 32) | lo); +} + +static int +a10_timer_probe(device_t dev) +{ + struct a10_timer_softc *sc; + u_int soc_family; + + sc = device_get_softc(dev); + + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-timer")) + return (ENXIO); + + soc_family = allwinner_soc_family(); + if (soc_family != ALLWINNERSOC_SUN4I && + soc_family != ALLWINNERSOC_SUN5I) + return (ENXIO); + + device_set_desc(dev, "Allwinner A10/A20 timer"); + return (BUS_PROBE_DEFAULT); +} + +static int +a10_timer_attach(device_t dev) +{ + struct a10_timer_softc *sc; + int err; + uint32_t val; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, a10_timer_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + sc->sc_dev = dev; + sc->sc_bst = rman_get_bustag(sc->res[0]); + sc->sc_bsh = rman_get_bushandle(sc->res[0]); + + /* Setup and enable the timer interrupt */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_CLK, a10_timer_hardclock, + NULL, sc, &sc->sc_ih); + if (err != 0) { + bus_release_resources(dev, a10_timer_spec, sc->res); + device_printf(dev, "Unable to setup the clock irq handler, " + "err = %d\n", err); + return (ENXIO); + } + + /* Set clock source to OSC24M, 16 pre-division */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val |= TIMER_PRESCALAR | TIMER_OSC24M; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + /* Enable timer0 */ + val = timer_read_4(sc, SW_TIMER_IRQ_EN_REG); + val |= TIMER_ENABLE; + timer_write_4(sc, SW_TIMER_IRQ_EN_REG, val); + + sc->timer0_freq = SYS_TIMER_CLKSRC; + + /* Set desired frequency in event timer and timecounter */ + sc->et.et_frequency = sc->timer0_freq; + sc->et.et_name = "a10_timer Eventtimer"; + sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERIODIC; + sc->et.et_quality = 1000; + sc->et.et_min_period = (0x00000005LLU << 32) / sc->et.et_frequency; + sc->et.et_max_period = (0xfffffffeLLU << 32) / sc->et.et_frequency; + sc->et.et_start = a10_timer_timer_start; + sc->et.et_stop = a10_timer_timer_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + + if (device_get_unit(dev) == 0) { + arm_set_delay(a10_timer_delay, sc); + a10_timer_sc = sc; + } + + a10_timer_timecounter.tc_frequency = sc->timer0_freq; + tc_init(&a10_timer_timecounter); + + if (bootverbose) { + device_printf(sc->sc_dev, "clock: hz=%d stathz = %d\n", hz, stathz); + + device_printf(sc->sc_dev, "event timer clock frequency %u\n", + sc->timer0_freq); + device_printf(sc->sc_dev, "timecounter clock frequency %lld\n", + a10_timer_timecounter.tc_frequency); + } + + return (0); +} + +static int +a10_timer_timer_start(struct eventtimer *et, sbintime_t first, + sbintime_t period) +{ + struct a10_timer_softc *sc; + uint32_t count; + uint32_t val; + + sc = (struct a10_timer_softc *)et->et_priv; + + if (period != 0) + sc->sc_period = ((uint32_t)et->et_frequency * period) >> 32; + else + sc->sc_period = 0; + if (first != 0) + count = ((uint32_t)et->et_frequency * first) >> 32; + else + count = sc->sc_period; + + /* Update timer values */ + timer_write_4(sc, SW_TIMER0_INT_VALUE_REG, sc->sc_period); + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, count); + + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + if (period != 0) { + /* periodic */ + val |= TIMER_AUTORELOAD; + } else { + /* oneshot */ + val &= ~TIMER_AUTORELOAD; + } + /* Enable timer0 */ + val |= TIMER_ENABLE; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + return (0); +} + +static int +a10_timer_timer_stop(struct eventtimer *et) +{ + struct a10_timer_softc *sc; + uint32_t val; + + sc = (struct a10_timer_softc *)et->et_priv; + + /* Disable timer0 */ + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + val &= ~TIMER_ENABLE; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + + sc->sc_period = 0; + + return (0); +} + +int +a10_timer_get_timerfreq(struct a10_timer_softc *sc) +{ + return (sc->timer0_freq); +} + +static int +a10_timer_hardclock(void *arg) +{ + struct a10_timer_softc *sc; + uint32_t val; + + sc = (struct a10_timer_softc *)arg; + + /* Clear interrupt pending bit. */ + timer_write_4(sc, SW_TIMER_IRQ_STA_REG, 0x1); + + val = timer_read_4(sc, SW_TIMER0_CTRL_REG); + /* + * Disabled autoreload and sc_period > 0 means + * timer_start was called with non NULL first value. + * Now we will set periodic timer with the given period + * value. + */ + if ((val & (1<<1)) == 0 && sc->sc_period > 0) { + /* Update timer */ + timer_write_4(sc, SW_TIMER0_CUR_VALUE_REG, sc->sc_period); + + /* Make periodic and enable */ + val |= TIMER_AUTORELOAD | TIMER_ENABLE; + timer_write_4(sc, SW_TIMER0_CTRL_REG, val); + } + + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + + return (FILTER_HANDLED); +} + +u_int +a10_timer_get_timecount(struct timecounter *tc) +{ + + if (a10_timer_sc == NULL) + return (0); + + return ((u_int)timer_read_counter64()); +} + +static device_method_t a10_timer_methods[] = { + DEVMETHOD(device_probe, a10_timer_probe), + DEVMETHOD(device_attach, a10_timer_attach), + + DEVMETHOD_END +}; + +static driver_t a10_timer_driver = { + "a10_timer", + a10_timer_methods, + sizeof(struct a10_timer_softc), +}; + +static devclass_t a10_timer_devclass; + +EARLY_DRIVER_MODULE(a10_timer, simplebus, a10_timer_driver, a10_timer_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); + +static void +a10_timer_delay(int usec, void *arg) +{ + struct a10_timer_softc *sc = arg; + uint64_t end, now; + + now = timer_read_counter64(); + end = now + (sc->timer0_freq / 1000000) * (usec + 1); + + while (now < end) + now = timer_read_counter64(); +} Modified: head/sys/arm/allwinner/files.allwinner_up ============================================================================== --- head/sys/arm/allwinner/files.allwinner_up Tue Feb 7 19:02:59 2017 (r313402) +++ head/sys/arm/allwinner/files.allwinner_up Tue Feb 7 19:28:32 2017 (r313403) @@ -1,3 +1,3 @@ # $FreeBSD$ -arm/allwinner/timer.c standard +arm/allwinner/a10_timer.c standard From owner-svn-src-all@freebsd.org Tue Feb 7 19:42:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D65A5CD549D; Tue, 7 Feb 2017 19:42:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A51771EE8; Tue, 7 Feb 2017 19:42:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17JggdY038701; Tue, 7 Feb 2017 19:42:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17JggnI038693; Tue, 7 Feb 2017 19:42:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702071942.v17JggnI038693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 7 Feb 2017 19:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313404 - in head/lib/libnetbsd: . 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 19:42:43 -0000 Author: ngie Date: Tue Feb 7 19:42:41 2017 New Revision: 313404 URL: https://svnweb.freebsd.org/changeset/base/313404 Log: Improve libnetbsd compatibility with NetBSD This change is being made to diff reduce/reduce duplication in contrib/netbsd-tests and to facilitate further porting of software from NetBSD Add the following headers: - sys/event.h: -- sys/types.h is required for kqueue on FreeBSD, but not NetBSD. - sys/types.h: -- NBBY is defined in sys/param.h on FreeBSD, not sys/types.h like on NetBSD. Pull in sys/param.h to have parity with NetBSD. - sys/wait.h: -- Define wrusage as __wrusage for parity with NetBSD typedef. - glob.h -- Define __gl_stat_t as "struct stat" for parity with NetBSD typedef. - pthread.h: -- Pull in pthread_np.h for _np functions defined separately on FreeBSD. Improve compatibility with NetBSD in the following headers: - sha1.h: -- define SHA1_CTX as SHA_CTX -- define SHA1Final as SHA1_Final - sha2.h: -- #include sha384 to pick up all of the SHA 384 bit macros and definitions. - util.h: -- Add sys/types.h to util.h to pollute the header for types used in flags_to_string and string_to_flags (u_long) as NetBSD doesn't require them for the functions. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Added: head/lib/libnetbsd/glob.h - copied, changed from r312222, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/glob.h head/lib/libnetbsd/pthread.h - copied, changed from r312303, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/pthread.h head/lib/libnetbsd/sys/event.h - copied unchanged from r312242, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/event.h head/lib/libnetbsd/sys/types.h - copied unchanged from r312241, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/types.h head/lib/libnetbsd/sys/wait.h - copied unchanged from r312240, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/wait.h Modified: head/lib/libnetbsd/sha1.h head/lib/libnetbsd/sha2.h head/lib/libnetbsd/util.h Copied and modified: head/lib/libnetbsd/glob.h (from r312222, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/glob.h) ============================================================================== --- projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/glob.h Sun Jan 15 10:16:20 2017 (r312222, copy source) +++ head/lib/libnetbsd/glob.h Tue Feb 7 19:42:41 2017 (r313404) @@ -1,33 +1,30 @@ -/* $FreeBSD$ */ - /*- - * Copyright (c) 2012 SRI International + * Copyright (c) 2017 Dell, Inc. * All rights reserved. * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) - * ("CTSRD"), as part of the DARPA CRASH research programme. - * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 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. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE 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. + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LIBNETBSD_GLOB_H_ @@ -39,4 +36,4 @@ #define __gl_stat_t struct stat #endif -#endif /* _SHA1_H_ */ +#endif Copied and modified: head/lib/libnetbsd/pthread.h (from r312303, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/pthread.h) ============================================================================== --- projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/pthread.h Mon Jan 16 18:51:27 2017 (r312303, copy source) +++ head/lib/libnetbsd/pthread.h Tue Feb 7 19:42:41 2017 (r313404) @@ -33,4 +33,4 @@ #include_next #include -#endif /* _SHA1_H_ */ +#endif Modified: head/lib/libnetbsd/sha1.h ============================================================================== --- head/lib/libnetbsd/sha1.h Tue Feb 7 19:28:32 2017 (r313403) +++ head/lib/libnetbsd/sha1.h Tue Feb 7 19:42:41 2017 (r313404) @@ -35,8 +35,11 @@ #include +#define SHA1_CTX SHA_CTX + #define SHA1End SHA1_End #define SHA1File SHA1_File +#define SHA1Final SHA1_Final #define SHA1Init SHA1_Init #define SHA1Update SHA1_Update Modified: head/lib/libnetbsd/sha2.h ============================================================================== --- head/lib/libnetbsd/sha2.h Tue Feb 7 19:28:32 2017 (r313403) +++ head/lib/libnetbsd/sha2.h Tue Feb 7 19:42:41 2017 (r313404) @@ -34,6 +34,7 @@ #define _SHA2_H_ #include +#include #include #endif /* _SHA2_H_ */ Copied: head/lib/libnetbsd/sys/event.h (from r312242, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/event.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetbsd/sys/event.h Tue Feb 7 19:42:41 2017 (r313404, copy of r312242, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/event.h) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2017 Dell, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ * + */ + +#ifndef _LIBNETBSD_SYS_EVENT_H_ +#define _LIBNETBSD_SYS_EVENT_H_ + +/* + * kqueue on FreeBSD requires sys/event.h, which in turn uses uintptr_t + * (defined in sys/types.h), so in order to accomodate their requirements, + * pull in sys/types.h as part of event.h. + */ +#include + +#include_next + +#endif Copied: head/lib/libnetbsd/sys/types.h (from r312241, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/types.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetbsd/sys/types.h Tue Feb 7 19:42:41 2017 (r313404, copy of r312241, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/types.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2017 Dell, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ * + */ + +#ifndef _LIBNETBSD_SYS_TYPES_H_ +#define _LIBNETBSD_SYS_TYPES_H_ + +#include_next + +#include /* For NBBY */ + +#endif Copied: head/lib/libnetbsd/sys/wait.h (from r312240, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/wait.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetbsd/sys/wait.h Tue Feb 7 19:42:41 2017 (r313404, copy of r312240, projects/netbsd-tests-upstream-01-2017/lib/libnetbsd/sys/wait.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2017 Dell, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ * + */ + +#ifndef _LIBNETBSD_SYS_WAIT_H_ +#define _LIBNETBSD_SYS_WAIT_H_ + +#include_next + +#define wrusage __wrusage + +#endif Modified: head/lib/libnetbsd/util.h ============================================================================== --- head/lib/libnetbsd/util.h Tue Feb 7 19:28:32 2017 (r313403) +++ head/lib/libnetbsd/util.h Tue Feb 7 19:42:41 2017 (r313404) @@ -30,12 +30,13 @@ * SUCH DAMAGE. */ -#ifndef _UTIL_H_ -#define _UTIL_H_ +#ifndef _LIBNETBSD_UTIL_H_ +#define _LIBNETBSD_UTIL_H_ +#include #include char *flags_to_string(u_long flags, const char *def); int string_to_flags(char **stringp, u_long *setp, u_long *clrp); -#endif /* _UTIL_H_ */ +#endif From owner-svn-src-all@freebsd.org Tue Feb 7 20:22:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AD73CD5FA8; Tue, 7 Feb 2017 20:22:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5CB417A5; Tue, 7 Feb 2017 20:22:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v17KMNXQ083198 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Feb 2017 22:22:23 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v17KMNXQ083198 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v17KMMeR083197; Tue, 7 Feb 2017 22:22:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Feb 2017 22:22:22 +0200 From: Konstantin Belousov To: Alan Cox Cc: John Baldwin , Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Message-ID: <20170207202222.GE2092@kib.kiev.ua> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> <3460210.7qRYCLqZx1@ralph.baldwin.cx> <98dce77f-b581-93fe-d2d6-ca1e27cd6a95@rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98dce77f-b581-93fe-d2d6-ca1e27cd6a95@rice.edu> User-Agent: Mutt/1.7.2 (2016-11-26) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 20:22:33 -0000 On Tue, Feb 07, 2017 at 12:29:35PM -0600, Alan Cox wrote: > I tend to agree with John. Why not use the same types for the kern_* > parameters as are used in the corresponding args structure? Let the > conversion to the Mach VM types happen inside of the function's > implementation. I do not object, but still I want to point out that such arrangement really depends on all Unix-like systems using the same type model (ILP32 or LP64 or both). If we would try to use current kern_* functions from syscallsubr.h for something more involved, like x32, then the assumption breaks and the type puns are spread. In fact, even in the compat32 layer (host native ILP32->LP64), the somewhat incorrect type manipulations are performed, e.g. we represent a binary-native pointer as host' uint32_t type, which is converted to void * for the purpose of kern_ calls. This conversion assumes much more about the platform than only type sizes, e.g. the flat address space with individually addressable bytes and normal arithmetic for pointers. Mach types are somewhat better in this respect, with purposedly used arithmetic types like vm_size_t, vm_offset_t, vm_ooffset_t for address space operations. Again, I do not object but want to note this mismatch. From owner-svn-src-all@freebsd.org Tue Feb 7 20:34:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E2C8CD599F; Tue, 7 Feb 2017 20:34:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F043FF68; Tue, 7 Feb 2017 20:34:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17KY459062947; Tue, 7 Feb 2017 20:34:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17KY3is062944; Tue, 7 Feb 2017 20:34:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702072034.v17KY3is062944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 7 Feb 2017 20:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313407 - in head: sys/kern sys/sys usr.bin/gcore 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 20:34:05 -0000 Author: jhb Date: Tue Feb 7 20:34:03 2017 New Revision: 313407 URL: https://svnweb.freebsd.org/changeset/base/313407 Log: Copy the e_machine and e_flags fields from the binary into an ELF core dump. In the kernel, cache the machine and flags fields from ELF header to use in the ELF header of a core dump. For gcore, the copy these fields over from the ELF header in the binary. This matters for platforms which encode ABI information in the flags field (such as o32 vs n32 on MIPS). Reviewed by: kib Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D9392 Modified: head/sys/kern/imgact_elf.c head/sys/sys/proc.h head/usr.bin/gcore/elfcore.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Feb 7 19:47:30 2017 (r313406) +++ head/sys/kern/imgact_elf.c Tue Feb 7 20:34:03 2017 (r313407) @@ -1055,6 +1055,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->interpreted = 0; imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; + imgp->proc->p_elf_machine = hdr->e_machine; + imgp->proc->p_elf_flags = hdr->e_flags; ret: free(interp_buf, M_TEMP); @@ -1655,15 +1657,11 @@ __elfN(puthdr)(struct thread *td, void * ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; -#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 - ehdr->e_machine = ELF_ARCH32; -#else - ehdr->e_machine = ELF_ARCH; -#endif + ehdr->e_machine = td->td_proc->p_elf_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = td->td_proc->p_elf_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_shentsize = sizeof(Elf_Shdr); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Feb 7 19:47:30 2017 (r313406) +++ head/sys/sys/proc.h Tue Feb 7 20:34:03 2017 (r313407) @@ -617,8 +617,11 @@ struct proc { our subtree. */ u_int p_xexit; /* (c) Exit code. */ u_int p_xsig; /* (c) Stop/kill sig. */ + uint16_t p_elf_machine; /* (x) ELF machine type */ + uint64_t p_elf_flags; /* (x) ELF flags */ + /* End area that is copied on creation. */ -#define p_endcopy p_xsig +#define p_endcopy p_elf_flags struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */ Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Tue Feb 7 19:47:30 2017 (r313406) +++ head/usr.bin/gcore/elfcore.c Tue Feb 7 20:34:03 2017 (r313407) @@ -117,8 +117,8 @@ static void *elf_note_procstat_psstrings static void *elf_note_procstat_rlimit(void *, size_t *); static void *elf_note_procstat_umask(void *, size_t *); static void *elf_note_procstat_vmmap(void *, size_t *); -static void elf_puthdr(pid_t, vm_map_entry_t, void *, size_t, size_t, size_t, - int); +static void elf_puthdr(int, pid_t, vm_map_entry_t, void *, size_t, size_t, + size_t, int); static void elf_putnote(int, notefunc_t, void *, struct sbuf *); static void elf_putnotes(pid_t, struct sbuf *, size_t *); static void freemap(vm_map_entry_t); @@ -178,7 +178,7 @@ elf_detach(void) * Write an ELF coredump for the given pid to the given fd. */ static void -elf_coredump(int efd __unused, int fd, pid_t pid) +elf_coredump(int efd, int fd, pid_t pid) { vm_map_entry_t map; struct sseg_closure seginfo; @@ -230,7 +230,7 @@ elf_coredump(int efd __unused, int fd, p hdr = sbuf_data(sb); segoff = sbuf_len(sb); /* Fill in the header. */ - elf_puthdr(pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); + elf_puthdr(efd, pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); n = write(fd, hdr, segoff); if (n == -1) @@ -420,14 +420,21 @@ elf_putnote(int type, notefunc_t notefun * Generate the ELF coredump header. */ static void -elf_puthdr(pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, +elf_puthdr(int efd, pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, size_t notesz, size_t segoff, int numsegs) { - Elf_Ehdr *ehdr; + Elf_Ehdr *ehdr, binhdr; Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; + ssize_t cnt; + cnt = read(efd, &binhdr, sizeof(binhdr)); + if (cnt < 0) + err(1, "Failed to re-read ELF header"); + else if (cnt != sizeof(binhdr)) + errx(1, "Failed to re-read ELF header"); + ehdr = (Elf_Ehdr *)hdr; ehdr->e_ident[EI_MAG0] = ELFMAG0; @@ -441,11 +448,11 @@ elf_puthdr(pid_t pid, vm_map_entry_t map ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = ELF_ARCH; + ehdr->e_machine = binhdr.e_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = binhdr.e_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_shentsize = sizeof(Elf_Shdr); From owner-svn-src-all@freebsd.org Tue Feb 7 20:35:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E0FECD5A26; Tue, 7 Feb 2017 20:35:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9D7B147B; Tue, 7 Feb 2017 20:35:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x244.google.com with SMTP id f200so13577509itf.3; Tue, 07 Feb 2017 12:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MDLX4XnWJ75iAfmDoYte7wOXqnNZJ+gsXRDy12UhHVY=; b=Xzx2Ea6ACMfhRAu89iEiVlWIlEWAmehP2080isdM5pKJC4J/ZTReKg/9H6qebDxIMX ChO+GbL+qmbprSztZlWDMFyjf34zcW8FEJTT606XaOBs7uTMN04IpedkfuT/y53XWhuA nsG0cgV06CTruqkNhbJYMX3XCiKMGiz7je07+KwslkTaZWHETqzIkMfw3G75Vr+MU8Gk nilViDK9rhcBm53gmG+psCZLR2wBm5A3jMAPHcKkHhqhpzztczacgta0y27tlEtj9Mh8 Rjk5ntA/+7FJxgmQ6FfMhBPV4GcCBcCfAmhxnjh/ZjRnUxadibGet4ccjQN65UAyrr6t bohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MDLX4XnWJ75iAfmDoYte7wOXqnNZJ+gsXRDy12UhHVY=; b=WIJ6roNE9rxLQo/wwNoq358JKr3G+KPxa8mp5GvJnAwF2TrgZhAAgazZzjSiOUnvF/ xefT0K7kB+Vvd7/2ZQd/i8LiU21KdaAXDrllrIvnfrhNeFrTzbXn0+os03rS2clhbPnb LpxSXwdnfcH3BfYpi7CSu3Q+fh82F+P3CAND3/W119JSWhulbm8yTzTFDwNg5LBzYISw RBNCiOjgsSKKZANeJckbOHdXj/r6571JzluWuEE4h/TyuIk6ehHGL8IcAxr0zMMjPq4c PnEmo7/j3shS2lCXdqNZfvAhRbbWM9InUHI3zbzDkGdZniBdW/qb4orgzXRSrR9dWOmK nB4A== X-Gm-Message-State: AIkVDXJ/lxhk/kohtjq8ty7XQULiJvkKK4/1Y6yVAXvzhaJqCwl7F5fgg4T1POAfe37uprfyKiovfOOVlb0dwQ== X-Received: by 10.36.10.3 with SMTP id 3mr13167850itw.108.1486499700266; Tue, 07 Feb 2017 12:35:00 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Tue, 7 Feb 2017 12:34:39 -0800 (PST) In-Reply-To: <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> From: Ed Maste Date: Tue, 7 Feb 2017 15:34:39 -0500 X-Google-Sender-Auth: 10M2DALlQA02Qf7sWbArlbJXsPw Message-ID: Subject: Re: svn commit: r313260 - head/sys/kern To: Steven Hartland Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mateusz Guzik Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 20:35:01 -0000 On 7 February 2017 at 10:30, Steven Hartland wrote: > All I'm suggesting is, while one could guess this may be a performance or > possibly a compatibility thing, the reason is not obvious, so a small piece > of detail on why the change was done should always be included. > > For this one something like the following would be nice: > > Switch fget_unlocked to atomic_fcmpset > > Improve performance under contention by switching fget_unlocked to > use atomic_fcmpset. I agree, and one of the key reasons to do this is so that there's this tiny bit of context if someone later runs "git blame" or "svn annotate" and discovers this change for the line containing atomic_fcmpset. Comments containing "eliminate memory leak" or "remove unused variable" have a self-evident reason, but I don't believe that's true for "switch to atomic_fcmpset." Repeating the "switch fget_unlocked to..." in the proposed commit message above feels redundant to me though, and I would suggest: | Switch fget_unlocked to atomic_fcmpset | | Improves performance under contention. or just: | Use atmoic_fcmpset to improve performance under contention From owner-svn-src-all@freebsd.org Tue Feb 7 22:40:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C836CD5660; Tue, 7 Feb 2017 22:40:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BC9E120D; Tue, 7 Feb 2017 22:40:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Meci6012486; Tue, 7 Feb 2017 22:40:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Mec0L012485; Tue, 7 Feb 2017 22:40:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702072240.v17Mec0L012485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 7 Feb 2017 22:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313408 - stable/11/sys/dev/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 22:40:39 -0000 Author: jhb Date: Tue Feb 7 22:40:38 2017 New Revision: 313408 URL: https://svnweb.freebsd.org/changeset/base/313408 Log: MFC 313097: Require Data Layer Active reporting for native PCI-e HotPlug. Some PCI-e bridges report that they support HotPlug in the slot capabilities but do not report support for Data Layer Active events in the link capabilities register. These bridges do not work correctly when HotPlug is used. Further, while the description of HotPlug in the spec does not mention that DL active events are required, the description of the link capabilities register says that DL active is required for HotPlug. Thanks to Dave Baukus for finding that language in the spec. PR: 211699 Modified: stable/11/sys/dev/pci/pci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pci_pci.c ============================================================================== --- stable/11/sys/dev/pci/pci_pci.c Tue Feb 7 20:34:03 2017 (r313407) +++ stable/11/sys/dev/pci/pci_pci.c Tue Feb 7 22:40:38 2017 (r313408) @@ -935,6 +935,8 @@ pcib_probe_hotplug(struct pcib_softc *sc if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_HPC) == 0) return; + if ((sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0) + return; /* * Some devices report that they have an MRL when they actually From owner-svn-src-all@freebsd.org Tue Feb 7 22:46:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35B2BCD587F; Tue, 7 Feb 2017 22:46:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 106C91761; Tue, 7 Feb 2017 22:46:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v17Mk08j015660; Tue, 7 Feb 2017 22:46:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v17Mk0Ac015659; Tue, 7 Feb 2017 22:46:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702072246.v17Mk0Ac015659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 7 Feb 2017 22:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313409 - head/sys/geom/journal 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.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 22:46:01 -0000 Author: jhb Date: Tue Feb 7 22:45:59 2017 New Revision: 313409 URL: https://svnweb.freebsd.org/changeset/base/313409 Log: Defer startup of gjournal switcher kproc. Don't start switcher kproc until the first GEOM is created. Reviewed by: pjd MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8576 Modified: head/sys/geom/journal/g_journal.c Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Tue Feb 7 22:40:38 2017 (r313408) +++ head/sys/geom/journal/g_journal.c Tue Feb 7 22:45:59 2017 (r313409) @@ -227,11 +227,14 @@ struct g_class g_journal_class = { static int g_journal_destroy(struct g_journal_softc *sc); static void g_journal_metadata_update(struct g_journal_softc *sc); +static void g_journal_start_switcher(struct g_class *mp); +static void g_journal_stop_switcher(void); static void g_journal_switch_wait(struct g_journal_softc *sc); #define GJ_SWITCHER_WORKING 0 #define GJ_SWITCHER_DIE 1 #define GJ_SWITCHER_DIED 2 +static struct proc *g_journal_switcher_proc = NULL; static int g_journal_switcher_state = GJ_SWITCHER_WORKING; static int g_journal_switcher_wokenup = 0; static int g_journal_sync_requested = 0; @@ -2383,6 +2386,10 @@ g_journal_create(struct g_class *mp, str sc->sc_jconsumer = cp; } + /* Start switcher kproc if needed. */ + if (g_journal_switcher_proc == NULL) + g_journal_start_switcher(mp); + if ((sc->sc_type & GJ_TYPE_COMPLETE) != GJ_TYPE_COMPLETE) { /* Journal is not complete yet. */ return (gp); @@ -2759,7 +2766,6 @@ static void g_journal_switcher(void *arg static void g_journal_init(struct g_class *mp) { - int error; /* Pick a conservative value if provided value sucks. */ if (g_journal_cache_divisor <= 0 || @@ -2779,9 +2785,6 @@ g_journal_init(struct g_class *mp) g_journal_lowmem, mp, EVENTHANDLER_PRI_FIRST); if (g_journal_event_lowmem == NULL) GJ_DEBUG(0, "Warning! Cannot register lowmem event."); - error = kproc_create(g_journal_switcher, mp, NULL, 0, 0, - "g_journal switcher"); - KASSERT(error == 0, ("Cannot create switcher thread.")); } static void @@ -2794,11 +2797,7 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_switcher_state = GJ_SWITCHER_DIE; - wakeup(&g_journal_switcher_state); - while (g_journal_switcher_state != GJ_SWITCHER_DIED) - tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); - GJ_DEBUG(1, "Switcher died."); + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal); @@ -2998,9 +2997,34 @@ next: } } +static void +g_journal_start_switcher(struct g_class *mp) +{ + int error; + + g_topology_assert(); + MPASS(g_journal_switcher_proc == NULL); + g_journal_switcher_state = GJ_SWITCHER_WORKING; + error = kproc_create(g_journal_switcher, mp, &g_journal_switcher_proc, + 0, 0, "g_journal switcher"); + KASSERT(error == 0, ("Cannot create switcher thread.")); +} + +static void +g_journal_stop_switcher(void) +{ + g_topology_assert(); + MPASS(g_journal_switcher_proc != NULL); + g_journal_switcher_state = GJ_SWITCHER_DIE; + wakeup(&g_journal_switcher_state); + while (g_journal_switcher_state != GJ_SWITCHER_DIED) + tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); + GJ_DEBUG(1, "Switcher died."); + g_journal_switcher_proc = NULL; +} + /* - * TODO: Switcher thread should be started on first geom creation and killed on - * last geom destruction. + * TODO: Kill switcher thread on last geom destruction? */ static void g_journal_switcher(void *arg) From owner-svn-src-all@freebsd.org Tue Feb 7 22:48:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65B77CD5928; Tue, 7 Feb 2017 22:48:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45DBB1930; Tue, 7 Feb 2017 22:48:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3CCA410A7FA; Tue, 7 Feb 2017 17:48:17 -0500 (EST) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313342 - head/sys/conf Date: Tue, 07 Feb 2017 14:37:15 -0800 Message-ID: <6070632.jUjQOVzxbI@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170207191058.65d72285@zapp> References: <201702061441.v16EfYZx010320@repo.freebsd.org> <2448004.hnTc9TClBV@ralph.baldwin.cx> <20170207191058.65d72285@zapp> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 17:48:17 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 22:48:18 -0000 On Tuesday, February 07, 2017 07:10:58 PM Andrew Turner wrote: > On Mon, 06 Feb 2017 10:43:09 -0800 > John Baldwin wrote: > > > On Monday, February 06, 2017 02:41:34 PM Andrew Turner wrote: > > > Author: andrew > > > Date: Mon Feb 6 14:41:34 2017 > > > New Revision: 313342 > > > URL: https://svnweb.freebsd.org/changeset/base/313342 > > > > > > Log: > > > Only build the ACPI PCI drivers on x86, they are unlikely to be > > > used on arm64 without dignificant changes. > > > > > > Obtained from: ABT Systems Ltd > > > Sponsored by: The FreeBSD Foundation > > > > I still think this is not really the right approach. Nothing about > > _BBN, _CRS, or _PRT, etc. is x86-specific. > > > > the main issue is the code assumes a single PCIe root controller, e.g. > the pci_cfg* KPI won't work on ThunderX with 6 independent PCIe root > controllers. I expect much of the code could be re-enabled on arm64, > however for now it's easier to disable it. It would be fairly trivial to add a domain argument to the pci_cfg* API. Right now x86 only supports a single domain partly due to this (the MCFG handler doesn't yet handle multiple domains because it can't be handed a request for a domain other than zero, but that is only an implementation choice in part due to this API limitation). I'd be more inclined to pass PCI config requests up to the parent nexus driver and not use pci_cfg* in the ACPI code at all though if that model works better. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 7 22:57:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A11CD5CD8; Tue, 7 Feb 2017 22:57:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8556B0; Tue, 7 Feb 2017 22:57:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1D75D10A7B9; Tue, 7 Feb 2017 17:57:09 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313409 - head/sys/geom/journal Date: Tue, 07 Feb 2017 14:57:06 -0800 Message-ID: <74328668.ma5t6WLkG7@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702072246.v17Mk0Ac015659@repo.freebsd.org> References: <201702072246.v17Mk0Ac015659@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 17:57:09 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 22:57:17 -0000 On Tuesday, February 07, 2017 10:46:00 PM John Baldwin wrote: > Author: jhb > Date: Tue Feb 7 22:45:59 2017 > New Revision: 313409 > URL: https://svnweb.freebsd.org/changeset/base/313409 > > Log: > Defer startup of gjournal switcher kproc. > > Don't start switcher kproc until the first GEOM is created. > > Reviewed by: pjd > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D8576 Originally this triggered a panic with EARLY_AP_STARTUP, but that was later resolved by permitting callouts during early boot for !thread0. However, this is still useful to avoid creating an unused kthread on a system that doesn't use gjournal, so I committed it for that reason. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 7 23:40:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA539CD55EA for ; Tue, 7 Feb 2017 23:40:56 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3875F137D for ; Tue, 7 Feb 2017 23:40:55 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x230.google.com with SMTP id c85so181571686wmi.1 for ; Tue, 07 Feb 2017 15:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=W1GHPbX8CduBoDLkc6uCyrqF/x9FPHBb1xkVQj1Bmgc=; b=jiuQz41pPGL24KRHjryzVqX8czN0nmPOOaKYAEVWCI3WoNh3fXl5p808kTOuNjwIIq FIzs04s+bjYvusNJiNscjx90D94amSTbRelbP/g7lCVNHjnzz8bFdbL7IiFw8qziBbZX 8/VjlOIMz7+4Bvqd3MXtSOccAByOqdgR5ReHP7mgR3uoYz6+MI3Eczyw1//FIcoa7a19 +m4BC//7ZXg6JHTaSZfPB+4aoLsEN/ODe+rjNxpjoN7nfU3/7gIzbcKuXZoPgXgeGxUH GIYvDWvnEghAjJtlI1e6sM4BY+W2e2NfvqsWqGdb1fxg6YIxi8xq2GyEzL7mBzc7zSZ/ UsrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=W1GHPbX8CduBoDLkc6uCyrqF/x9FPHBb1xkVQj1Bmgc=; b=P5zc5B3/zW3XdsLLWn06Sx5e5MeC/A7jWy19MssqbHDtcOC9xRJVXYqFITMAC3ibuf lbjn/+0HLdRlChmO6k4nx9kGLBOa4WeOJpJCK1fX9K6jCiUy7aQwpyZ3M+HIoW6dCOPZ ncgS/mjsWUVUM9WwGJPBVyO2ccciXFtGoK9+W08mFdnzadmUtTgkiPNM01/ESHh0D20p rG/o2FznTrucHS8PUDsqSpJCAmspgFxpArVw1QjEEv4dewilx2Jlh03alexs06XGQKo0 9wUkcq58+23LrGzaJ1wFpaxhsQ0Cwd4aPnEZ7FqlUDA3hpb0oOrAqmjGuLN/la0W9BU5 hjhA== X-Gm-Message-State: AMke39lCZmOAJ36r5vfMzlVlPxoGd/HntODPWyDNBcRIuxRwp+/1yssNxplzSOTRCfDsQ12D X-Received: by 10.28.18.130 with SMTP id 124mr16099656wms.8.1486510854307; Tue, 07 Feb 2017 15:40:54 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id a13sm190495wma.13.2017.02.07.15.40.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 15:40:53 -0800 (PST) Subject: Re: svn commit: r313260 - head/sys/kern To: Ed Maste References: <201702050140.v151eRXX090326@repo.freebsd.org> <42c790bb-df12-2a50-6181-24bac5c72d34@multiplay.co.uk> <20170205030006.GB4375@dft-labs.eu> <20170205151746.GA6841@FreeBSD.org> <20170207145750.GD4772@dft-labs.eu> <8e0f5a4c-16ec-842d-f4f7-32c830f43553@multiplay.co.uk> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Mateusz Guzik From: Steven Hartland Message-ID: <1a7c31e9-561c-9391-47f1-f25e5381b03f@multiplay.co.uk> Date: Tue, 7 Feb 2017 23:40:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 07 Feb 2017 23:40:56 -0000 On 07/02/2017 20:34, Ed Maste wrote: > On 7 February 2017 at 10:30, Steven Hartland > wrote: >> All I'm suggesting is, while one could guess this may be a performance or >> possibly a compatibility thing, the reason is not obvious, so a small piece >> of detail on why the change was done should always be included. >> >> For this one something like the following would be nice: >> >> Switch fget_unlocked to atomic_fcmpset >> >> Improve performance under contention by switching fget_unlocked to >> use atomic_fcmpset. > I agree, and one of the key reasons to do this is so that there's this > tiny bit of context if someone later runs "git blame" or "svn > annotate" and discovers this change for the line containing > atomic_fcmpset. Comments containing "eliminate memory leak" or "remove > unused variable" have a self-evident reason, but I don't believe > that's true for "switch to atomic_fcmpset." > > Repeating the "switch fget_unlocked to..." in the proposed commit > message above feels redundant to me though, and I would suggest: > > | Switch fget_unlocked to atomic_fcmpset > | > | Improves performance under contention. > > or just: > > | Use atmoic_fcmpset to improve performance under contention All those work for me as they clearly state why the change was made, so I hope this is something we can try to improve moving forward :) From owner-svn-src-all@freebsd.org Wed Feb 8 00:02:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C00F2CD5F5B; Wed, 8 Feb 2017 00:02:55 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF3C286; Wed, 8 Feb 2017 00:02:55 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1802sGJ048013; Wed, 8 Feb 2017 00:02:54 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1802sjb048012; Wed, 8 Feb 2017 00:02:54 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702080002.v1802sjb048012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 8 Feb 2017 00:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 00:02:55 -0000 Author: rpokala Date: Wed Feb 8 00:02:54 2017 New Revision: 313410 URL: https://svnweb.freebsd.org/changeset/base/313410 Log: Fix indentation (only line in file w/ 8-space indent rather than hard-tab). MFH: 1 week Modified: head/usr.sbin/bsdinstall/partedit/scripted.c Modified: head/usr.sbin/bsdinstall/partedit/scripted.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/scripted.c Tue Feb 7 22:45:59 2017 (r313409) +++ head/usr.sbin/bsdinstall/partedit/scripted.c Wed Feb 8 00:02:54 2017 (r313410) @@ -85,7 +85,7 @@ part_config(char *disk, const char *sche LIST_FOREACH(classp, &mesh.lg_class, lg_class) if (strcmp(classp->lg_name, "PART") == 0) break; - if (classp != NULL) { + if (classp != NULL) { LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) if (strcmp(gpart->lg_name, disk) == 0) break; From owner-svn-src-all@freebsd.org Wed Feb 8 00:23:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2DEACD356C; Wed, 8 Feb 2017 00:23:39 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88C56EFB; Wed, 8 Feb 2017 00:23:39 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OL1006004WUGX00@mr11p00im-asmtp001.me.com>; Wed, 08 Feb 2017 00:23:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1486513402; bh=Sz4U1Y/aHw02Phh78l+BHMDkQ2e5ayFLQiXwXq6q03I=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=vAfMxIvkIGx+dboTB67r/H9oC5THW37KeUJfva89HtZeVxdjO47jZChRhrv/QmMxb QK8L+NoLqdtwxxc9XhGp/OkEWJgYy8TnKmHqUEtSTG53WrpNBD+r3C3cRQyP/gcZcU vbMJI+LhgejqoJ/JhWF8IX0vV3gq5sAbv9RrCJTfjwYvWeKDxz6QtmoV2EerpOlwDN GlGJ0FrbHlxWRAZmHy8nrdNBL+0YQH8cl4XzckcWDf4woEMhNJWUBWBvJTDhOhSodn AQjUSY2jhbAH3l9znTCUINMlZ4U3LFMgFa7gCvfG4D5ZGLgqmjogpJBqDbILKSIoQ2 2ldzKQmY2yy4Q== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OL100LP452WXE10@mr11p00im-asmtp001.me.com>; Wed, 08 Feb 2017 00:23:21 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-07_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702080003 User-Agent: Microsoft-MacOutlook/f.1e.0.170107 Date: Tue, 07 Feb 2017 16:23:20 -0800 Subject: Re: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit From: Ravi Pokala Sender: "Pokala, Ravi" To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <7CE41C48-8A21-4888-BF98-210DA2ADFE84@panasas.com> Thread-topic: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit References: <201702080002.v1802sjb048012@repo.freebsd.org> In-reply-to: <201702080002.v1802sjb048012@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 00:23:39 -0000 Err, that should have been s/MFH/MFC/ (obviously) -Ravi (rpokala@) -----Original Message----- From: on behalf of Ravi Pokala Date: 2017-02-07, Tuesday at 16:02 To: , , Subject: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit Author: rpokala Date: Wed Feb 8 00:02:54 2017 New Revision: 313410 URL: https://svnweb.freebsd.org/changeset/base/313410 Log: Fix indentation (only line in file w/ 8-space indent rather than hard-tab). MFH: 1 week Modified: head/usr.sbin/bsdinstall/partedit/scripted.c Modified: head/usr.sbin/bsdinstall/partedit/scripted.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/scripted.c Tue Feb 7 22:45:59 2017 (r313409) +++ head/usr.sbin/bsdinstall/partedit/scripted.c Wed Feb 8 00:02:54 2017 (r313410) @@ -85,7 +85,7 @@ part_config(char *disk, const char *sche LIST_FOREACH(classp, &mesh.lg_class, lg_class) if (strcmp(classp->lg_name, "PART") == 0) break; - if (classp != NULL) { + if (classp != NULL) { LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) if (strcmp(gpart->lg_name, disk) == 0) break; From owner-svn-src-all@freebsd.org Wed Feb 8 00:50:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C0CBCD3982; Wed, 8 Feb 2017 00:50:30 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [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 0E62D1784; Wed, 8 Feb 2017 00:50:30 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=65188 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1cbFMe-000OPA-G8; Tue, 07 Feb 2017 23:40:00 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r313410 - head/usr.sbin/bsdinstall/partedit From: Devin Teske In-Reply-To: <201702080002.v1802sjb048012@repo.freebsd.org> Date: Tue, 7 Feb 2017 16:50:28 -0800 Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201702080002.v1802sjb048012@repo.freebsd.org> To: Ravi Pokala X-Mailer: Apple Mail (2.3124) Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 00:50:30 -0000 Thank you very much, Ravi! =E2=80=94=20 Devin > On Feb 7, 2017, at 4:02 PM, Ravi Pokala wrote: >=20 > Author: rpokala > Date: Wed Feb 8 00:02:54 2017 > New Revision: 313410 > URL: https://svnweb.freebsd.org/changeset/base/313410 >=20 > Log: > Fix indentation (only line in file w/ 8-space indent rather than = hard-tab). >=20 > MFH: 1 week >=20 > Modified: > head/usr.sbin/bsdinstall/partedit/scripted.c >=20 > Modified: head/usr.sbin/bsdinstall/partedit/scripted.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/bsdinstall/partedit/scripted.c Tue Feb 7 = 22:45:59 2017 (r313409) > +++ head/usr.sbin/bsdinstall/partedit/scripted.c Wed Feb 8 = 00:02:54 2017 (r313410) > @@ -85,7 +85,7 @@ part_config(char *disk, const char *sche > LIST_FOREACH(classp, &mesh.lg_class, lg_class) > if (strcmp(classp->lg_name, "PART") =3D=3D 0) > break; > - if (classp !=3D NULL) { > + if (classp !=3D NULL) { > LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) > if (strcmp(gpart->lg_name, disk) =3D=3D 0) > break; >=20 From owner-svn-src-all@freebsd.org Wed Feb 8 01:31:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0867ECD46D5; Wed, 8 Feb 2017 01:31:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id C60A5DD9; Wed, 8 Feb 2017 01:31:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id E3310D66656; Wed, 8 Feb 2017 12:31:47 +1100 (AEDT) Date: Wed, 8 Feb 2017 12:31:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Emmanuel Vadot cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313394 - head/sys/kern In-Reply-To: <201702071731.v17HVOtQ081967@repo.freebsd.org> Message-ID: <20170208120650.T1171@besplex.bde.org> References: <201702071731.v17HVOtQ081967@repo.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.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=QZfLhJmqEQRP8M4zX-cA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 01:31:57 -0000 On Tue, 7 Feb 2017, Emmanuel Vadot wrote: > Log: > subr_sfbus.c need sys/proc.h for struct thread definition. > This fixes kernel build for armv6. > > Discussed with: kib sys/proc.h was accidentally (?) provided by gross namespace pollution on some arches (perhaps on all the arches that use subr_sfbuf.c) in . This pollution is only supplied under INVARIANTS, so it is not completely accidental. However, at least on i386, sys/proc.h and its nested pollution isn't even used for anything except to pollute. has lots of other undocumented pollution which is actually partially used (mainly sys/pcpu.h and its pollution). Bruce From owner-svn-src-all@freebsd.org Wed Feb 8 03:21:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18EABCD41A4; Wed, 8 Feb 2017 03:21:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D537C1DD5; Wed, 8 Feb 2017 03:21:30 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v183LTls028879; Wed, 8 Feb 2017 03:21:29 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v183LTDV028878; Wed, 8 Feb 2017 03:21:29 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201702080321.v183LTDV028878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 8 Feb 2017 03:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313411 - head/contrib/elftoolchain/libelftc 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 03:21:31 -0000 Author: jhibbits Date: Wed Feb 8 03:21:29 2017 New Revision: 313411 URL: https://svnweb.freebsd.org/changeset/base/313411 Log: Add elf*-powerpc-freebsd targets to the elftoolchain target list FreeBSD uses the full target triple when generating embedded rootfs images (MFS_IMAGE= make option). Without this change objcopy errors out with: objcopy: elf64-poewrpc-freebsd: invalid target name MFC after: 2 weeks Modified: head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Modified: head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Wed Feb 8 00:02:54 2017 (r313410) +++ head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Wed Feb 8 03:21:29 2017 (r313411) @@ -127,6 +127,15 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf32-powerpc-freebsd", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS32, + .bt_machine = EM_PPC, + .bt_osabi = ELFOSABI_FREEBSD, + }, + + { .bt_name = "elf32-powerpcle", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, @@ -290,6 +299,15 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf64-powerpc-freebsd", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_PPC64, + .bt_osabi = ELFOSABI_FREEBSD, + }, + + { .bt_name = "elf64-powerpcle", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, From owner-svn-src-all@freebsd.org Wed Feb 8 06:43:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7207DCC7D50; Wed, 8 Feb 2017 06:43:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44290D92; Wed, 8 Feb 2017 06:43:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186h2Hm009230; Wed, 8 Feb 2017 06:43:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186h2Ic009228; Wed, 8 Feb 2017 06:43:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080643.v186h2Ic009228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313412 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:43:03 -0000 Author: adrian Date: Wed Feb 8 06:43:02 2017 New Revision: 313412 URL: https://svnweb.freebsd.org/changeset/base/313412 Log: [iwm] Get rid of iwm_disable_rx_dma, just use iwm_pcie_rx_stop directly. * This also fixes one of many small nic lock handling bugs, and matches iwlwifi's code. Obtained from: DragonflyBSD git 50787d03cd0a0366c9cc4a055bb6977e5f65c85d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 03:21:29 2017 (r313411) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:43:02 2017 (r313412) @@ -302,7 +302,6 @@ static int iwm_alloc_sched(struct iwm_so static int iwm_alloc_kw(struct iwm_softc *); static int iwm_alloc_ict(struct iwm_softc *); static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); -static void iwm_disable_rx_dma(struct iwm_softc *); static void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static void iwm_free_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static int iwm_alloc_tx_ring(struct iwm_softc *, struct iwm_tx_ring *, @@ -1104,18 +1103,6 @@ fail: iwm_free_rx_ring(sc, ring); } static void -iwm_disable_rx_dma(struct iwm_softc *sc) -{ - /* XXX conditional nic locks are stupid */ - /* XXX print out if we can't lock the NIC? */ - if (iwm_nic_lock(sc)) { - /* XXX handle if RX stop doesn't finish? */ - (void) iwm_pcie_rx_stop(sc); - iwm_nic_unlock(sc); - } -} - -static void iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) { /* Reset the ring state */ @@ -1401,7 +1388,7 @@ iwm_stop_device(struct iwm_softc *sc) } iwm_nic_unlock(sc); } - iwm_disable_rx_dma(sc); + iwm_pcie_rx_stop(sc); /* Stop RX ring. */ iwm_reset_rx_ring(sc, &sc->rxq); @@ -1485,16 +1472,18 @@ iwm_mvm_nic_config(struct iwm_softc *sc) static int iwm_nic_rx_init(struct iwm_softc *sc) { - if (!iwm_nic_lock(sc)) - return EBUSY; - /* * Initialize RX ring. This is from the iwn driver. */ memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); - /* stop DMA */ - iwm_disable_rx_dma(sc); + /* Stop Rx DMA */ + iwm_pcie_rx_stop(sc); + + if (!iwm_nic_lock(sc)) + return EBUSY; + + /* reset and flush pointers */ IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_RBDCB_WPTR, 0); IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_FLUSH_RB_REQ, 0); IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_RDPTR, 0); Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 03:21:29 2017 (r313411) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 06:43:02 2017 (r313412) @@ -572,10 +572,14 @@ iwm_set_pwr(struct iwm_softc *sc) int iwm_pcie_rx_stop(struct iwm_softc *sc) { - - IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); - return (iwm_poll_bit(sc, IWM_FH_MEM_RSSR_RX_STATUS_REG, - IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, - IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, - 1000)); + int ret = 0; + if (iwm_nic_lock(sc)) { + IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); + ret = iwm_poll_bit(sc, IWM_FH_MEM_RSSR_RX_STATUS_REG, + IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, + IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, + 1000); + iwm_nic_unlock(sc); + } + return ret; } From owner-svn-src-all@freebsd.org Wed Feb 8 06:44:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3635CC7DDB; Wed, 8 Feb 2017 06:44:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB8B7EE3; Wed, 8 Feb 2017 06:44:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186iotN009349; Wed, 8 Feb 2017 06:44:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186io5X009346; Wed, 8 Feb 2017 06:44:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080644.v186io5X009346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313413 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:44:51 -0000 Author: adrian Date: Wed Feb 8 06:44:50 2017 New Revision: 313413 URL: https://svnweb.freebsd.org/changeset/base/313413 Log: [iwm] Add scan abort functions, to properly cancel a running scan. * Uses the notification wait api to wait for the corresponding scan complete notification after sending the abort command. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit b484d09d54301740f036ddf02008117f563960c2 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_scan.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:43:02 2017 (r313412) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:44:50 2017 (r313413) @@ -5447,7 +5447,9 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_TIME_EVENT_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): + case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: + case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: case IWM_MAC_PM_POWER_TABLE: case IWM_TIME_QUOTA_CMD: Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Wed Feb 8 06:43:02 2017 (r313412) +++ head/sys/dev/iwm/if_iwm_scan.c Wed Feb 8 06:44:50 2017 (r313413) @@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -737,3 +738,86 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc) free(req, M_DEVBUF); return ret; } + +static int +iwm_mvm_lmac_scan_abort(struct iwm_softc *sc) +{ + int ret; + struct iwm_host_cmd hcmd = { + .id = IWM_SCAN_OFFLOAD_ABORT_CMD, + .len = { 0, }, + .data = { NULL, }, + .flags = IWM_CMD_SYNC, + }; + uint32_t status; + + ret = iwm_mvm_send_cmd_status(sc, &hcmd, &status); + if (ret) + return ret; + + if (status != IWM_CAN_ABORT_STATUS) { + /* + * The scan abort will return 1 for success or + * 2 for "failure". A failure condition can be + * due to simply not being in an active scan which + * can occur if we send the scan abort before the + * microcode has notified us that a scan is completed. + */ + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, + "SCAN OFFLOAD ABORT ret %d.\n", status); + ret = ENOENT; + } + + return ret; +} + +static int +iwm_mvm_umac_scan_abort(struct iwm_softc *sc) +{ + struct iwm_umac_scan_abort cmd = {}; + int uid, ret; + + uid = 0; + cmd.uid = htole32(uid); + + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Sending scan abort, uid %u\n", uid); + + ret = iwm_mvm_send_cmd_pdu(sc, + iwm_cmd_id(IWM_SCAN_ABORT_UMAC, + IWM_ALWAYS_LONG_GROUP, 0), + 0, sizeof(cmd), &cmd); + + return ret; +} + +int +iwm_mvm_scan_stop_wait(struct iwm_softc *sc) +{ + struct iwm_notification_wait wait_scan_done; + static const uint16_t scan_done_notif[] = { IWM_SCAN_COMPLETE_UMAC, + IWM_SCAN_OFFLOAD_COMPLETE, }; + int ret; + + iwm_init_notification_wait(sc->sc_notif_wait, &wait_scan_done, + scan_done_notif, nitems(scan_done_notif), + NULL, NULL); + + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Preparing to stop scan\n"); + + if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) + ret = iwm_mvm_umac_scan_abort(sc); + else + ret = iwm_mvm_lmac_scan_abort(sc); + + if (ret) { + IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "couldn't stop scan\n"); + iwm_remove_notification(sc->sc_notif_wait, &wait_scan_done); + return ret; + } + + IWM_UNLOCK(sc); + ret = iwm_wait_notification(sc->sc_notif_wait, &wait_scan_done, hz); + IWM_LOCK(sc); + + return ret; +} Modified: head/sys/dev/iwm/if_iwm_scan.h ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.h Wed Feb 8 06:43:02 2017 (r313412) +++ head/sys/dev/iwm/if_iwm_scan.h Wed Feb 8 06:44:50 2017 (r313413) @@ -109,5 +109,6 @@ extern int iwm_mvm_lmac_scan(struct iwm_softc *sc); extern int iwm_mvm_config_umac_scan(struct iwm_softc *); extern int iwm_mvm_umac_scan(struct iwm_softc *); +extern int iwm_mvm_scan_stop_wait(struct iwm_softc *sc); #endif /* __IF_IWN_SCAN_H__ */ From owner-svn-src-all@freebsd.org Wed Feb 8 06:51:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B03BDCC7E89; Wed, 8 Feb 2017 06:51:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B07010FF; Wed, 8 Feb 2017 06:51:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186oxI8010354; Wed, 8 Feb 2017 06:50:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186oxI5010352; Wed, 8 Feb 2017 06:50:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080650.v186oxI5010352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313414 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:51:00 -0000 Author: adrian Date: Wed Feb 8 06:50:59 2017 New Revision: 313414 URL: https://svnweb.freebsd.org/changeset/base/313414 Log: [iwm] Use iwm_mvm_scan_stop_wait to properly abort scans. * Add IWM_FLAG_SCAN_RUNNING to sc->sc_flags to track whether the firmware is currently running a scan, in order to decide wheter iwm_scan_end needs to abort a running scan. * In iwm_scan_end, if the scan is still running, we now abort it, in order to keep the firmware scanning state in sync. * Try to make things a bit simpler, by reacting on the IWM_SCAN_OFFLOAD_COMPLETE and IWM_SCAN_COMPLETE_UMAC notifications, instead of IWM_SCAN_ITERATION_COMPLETE and IWM_SCAN_ITERATION_COMPLETE_UMAC. This should be fine since we always only tell the firmware to do a single scan iteration anyway. Obtained from: DragonflyBSD commit 1f249c981c4e89e7cde1836a75b61cac36dc7ac5 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:44:50 2017 (r313413) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:50:59 2017 (r313414) @@ -4951,6 +4951,7 @@ iwm_stop(struct iwm_softc *sc) iwm_led_blink_stop(sc); sc->sc_tx_timer = 0; iwm_stop_device(sc); + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; } static void @@ -5475,6 +5476,10 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_SCAN_OFFLOAD_COMPLETE: { struct iwm_periodic_scan_complete *notif; notif = (void *)pkt->data; + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; + ieee80211_runtask(ic, &sc->sc_es_task); + } break; } @@ -5492,9 +5497,10 @@ iwm_notif_intr(struct iwm_softc *sc) IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "UMAC scan complete, status=0x%x\n", notif->status); -#if 0 /* XXX This would be a duplicate scan end call */ - taskqueue_enqueue(sc->sc_tq, &sc->sc_es_task); -#endif + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; + ieee80211_runtask(ic, &sc->sc_es_task); + } break; } @@ -6254,15 +6260,21 @@ iwm_scan_start(struct ieee80211com *ic) int error; IWM_LOCK(sc); + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + /* This should not be possible */ + device_printf(sc->sc_dev, + "%s: Previous scan not completed yet\n", __func__); + } if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) error = iwm_mvm_umac_scan(sc); else error = iwm_mvm_lmac_scan(sc); if (error != 0) { - device_printf(sc->sc_dev, "could not initiate 2 GHz scan\n"); + device_printf(sc->sc_dev, "could not initiate scan\n"); IWM_UNLOCK(sc); ieee80211_cancel_scan(vap); } else { + sc->sc_flags |= IWM_FLAG_SCAN_RUNNING; iwm_led_blink_start(sc); IWM_UNLOCK(sc); } @@ -6278,7 +6290,23 @@ iwm_scan_end(struct ieee80211com *ic) iwm_led_blink_stop(sc); if (vap->iv_state == IEEE80211_S_RUN) iwm_mvm_led_enable(sc); + if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) { + /* + * Removing IWM_FLAG_SCAN_RUNNING now, is fine because + * both iwm_scan_end and iwm_scan_start run in the ic->ic_tq + * taskqueue. + */ + sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING; + iwm_mvm_scan_stop_wait(sc); + } IWM_UNLOCK(sc); + + /* + * Make sure we don't race, if sc_es_task is still enqueued here. + * This is to make sure that it won't call ieee80211_scan_done + * when we have already started the next scan. + */ + taskqueue_cancel(ic->ic_tq, &sc->sc_es_task, NULL); } static void Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:44:50 2017 (r313413) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:50:59 2017 (r313414) @@ -415,6 +415,7 @@ struct iwm_softc { #define IWM_FLAG_RFKILL (1 << 3) #define IWM_FLAG_BUSY (1 << 4) #define IWM_FLAG_SCANNING (1 << 5) +#define IWM_FLAG_SCAN_RUNNING (1 << 6) struct intr_config_hook sc_preinit_hook; struct callout sc_watchdog_to; From owner-svn-src-all@freebsd.org Wed Feb 8 06:53:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A659CD3050; Wed, 8 Feb 2017 06:53:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE3414ED; Wed, 8 Feb 2017 06:53:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186rOZP013231; Wed, 8 Feb 2017 06:53:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186rNVx013225; Wed, 8 Feb 2017 06:53:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080653.v186rNVx013225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313415 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:53:25 -0000 Author: adrian Date: Wed Feb 8 06:53:23 2017 New Revision: 313415 URL: https://svnweb.freebsd.org/changeset/base/313415 Log: [iwm] Implement apmg_wake_up_wa workaround properly for 7000 family. * Add iwm_pcie_set_cmd_in_flight() and iwm_pcie_clear_cmd_in_flight() helper methods. * Use ring->queued tracking in the command queue to set/clear the cmd_hold_nic_awake bit at the right points. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit ce43f57f5308b579ea21e8a5a29969114ba2247d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwm_pcie_trans.h head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:53:23 2017 (r313415) @@ -182,7 +182,8 @@ __FBSDID("$FreeBSD$"); #define IWM_DEVICE_7000_COMMON \ .device_family = IWM_DEVICE_FAMILY_7000, \ .eeprom_size = IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000, \ - .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000 + .nvm_hw_section_num = IWM_NVM_HW_SECTION_NUM_FAMILY_7000, \ + .apmg_wake_up_wa = 1 const struct iwm_cfg iwm7260_cfg = { .fw_name = IWM7260_FW, @@ -1251,6 +1252,9 @@ iwm_reset_tx_ring(struct iwm_softc *sc, sc->qfullmsk &= ~(1 << ring->qid); ring->queued = 0; ring->cur = 0; + + if (ring->qid == IWM_MVM_CMD_QUEUE && sc->cmd_hold_nic_awake) + iwm_pcie_clear_cmd_in_flight(sc); } static void @@ -3338,6 +3342,18 @@ iwm_cmd_done(struct iwm_softc *sc, struc data->m = NULL; } wakeup(&ring->desc[pkt->hdr.idx]); + + if (((pkt->hdr.idx + ring->queued) % IWM_TX_RING_COUNT) != ring->cur) { + device_printf(sc->sc_dev, + "%s: Some HCMDs skipped?: idx=%d queued=%d cur=%d\n", + __func__, pkt->hdr.idx, ring->queued, ring->cur); + /* XXX call iwm_force_nmi() */ + } + + KASSERT(ring->queued > 0, ("ring->queued is empty?")); + ring->queued--; + if (ring->queued == 0) + iwm_pcie_clear_cmd_in_flight(sc); } #if 0 @@ -5580,9 +5596,6 @@ iwm_notif_intr(struct iwm_softc *sc) ADVANCE_RXQ(sc); } - IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, - IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - /* * Tell the firmware what we have processed. * Seems like the hardware gets upset unless we align Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 8 06:53:23 2017 (r313415) @@ -253,6 +253,9 @@ iwm_nic_lock(struct iwm_softc *sc) { int rv = 0; + if (sc->cmd_hold_nic_awake) + return 1; + IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); @@ -277,6 +280,9 @@ iwm_nic_lock(struct iwm_softc *sc) void iwm_nic_unlock(struct iwm_softc *sc) { + if (sc->cmd_hold_nic_awake) + return; + IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); } @@ -583,3 +589,55 @@ iwm_pcie_rx_stop(struct iwm_softc *sc) } return ret; } + +void +iwm_pcie_clear_cmd_in_flight(struct iwm_softc *sc) +{ + if (!sc->cfg->apmg_wake_up_wa) + return; + + if (!sc->cmd_hold_nic_awake) { + device_printf(sc->sc_dev, + "%s: cmd_hold_nic_awake not set\n", __func__); + return; + } + + sc->cmd_hold_nic_awake = 0; + IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); +} + +int +iwm_pcie_set_cmd_in_flight(struct iwm_softc *sc) +{ + int ret; + + /* + * wake up the NIC to make sure that the firmware will see the host + * command - we will let the NIC sleep once all the host commands + * returned. This needs to be done only on NICs that have + * apmg_wake_up_wa set. + */ + if (sc->cfg->apmg_wake_up_wa && + !sc->cmd_hold_nic_awake) { + + IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); + + ret = iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, + (IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | + IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), + 15000); + if (ret == 0) { + IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, + IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); + device_printf(sc->sc_dev, + "%s: Failed to wake NIC for hcmd\n", __func__); + return EIO; + } + sc->cmd_hold_nic_awake = 1; + } + + return 0; +} Modified: head/sys/dev/iwm/if_iwm_pcie_trans.h ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.h Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm_pcie_trans.h Wed Feb 8 06:53:23 2017 (r313415) @@ -129,4 +129,7 @@ extern int iwm_start_hw(struct iwm_softc extern void iwm_set_pwr(struct iwm_softc *sc); extern int iwm_pcie_rx_stop(struct iwm_softc *sc); +extern int iwm_pcie_set_cmd_in_flight(struct iwm_softc *sc); +extern void iwm_pcie_clear_cmd_in_flight(struct iwm_softc *sc); + #endif Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwm_util.c Wed Feb 8 06:53:23 2017 (r313415) @@ -305,17 +305,10 @@ iwm_send_cmd(struct iwm_softc *sc, struc bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map, BUS_DMASYNC_PREWRITE); - IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, - IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - if (!iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, - IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, - (IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | - IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000)) { - device_printf(sc->sc_dev, - "%s: acquiring device failed\n", __func__); - error = EBUSY; + error = iwm_pcie_set_cmd_in_flight(sc); + if (error) goto out; - } + ring->queued++; #if 0 iwm_update_sched(sc, ring->qid, ring->cur, 0, 0); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:50:59 2017 (r313414) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 8 06:53:23 2017 (r313415) @@ -389,6 +389,8 @@ enum iwm_device_family { * @host_interrupt_operation_mode: device needs host interrupt operation * mode set * @nvm_hw_section_num: the ID of the HW NVM section + * @apmg_wake_up_wa: should the MAC access REQ be asserted when a command + * is in flight. This is due to a HW bug in 7260, 3160 and 7265. */ struct iwm_cfg { const char *fw_name; @@ -396,6 +398,7 @@ struct iwm_cfg { enum iwm_device_family device_family; int host_interrupt_operation_mode; uint8_t nvm_hw_section_num; + int apmg_wake_up_wa; }; struct iwm_softc { @@ -521,6 +524,8 @@ struct iwm_softc { int sc_max_rssi; struct iwm_notif_wait_data *sc_notif_wait; + + int cmd_hold_nic_awake; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-all@freebsd.org Wed Feb 8 06:54:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 584A4CD30E4; Wed, 8 Feb 2017 06:54:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 257A51681; Wed, 8 Feb 2017 06:54:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186s9ie013302; Wed, 8 Feb 2017 06:54:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186s9lg013301; Wed, 8 Feb 2017 06:54:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080654.v186s9lg013301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313416 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:54:10 -0000 Author: adrian Date: Wed Feb 8 06:54:08 2017 New Revision: 313416 URL: https://svnweb.freebsd.org/changeset/base/313416 Log: [iwm] Only for family 7000 power-down busmaster DMA clocks when stopping. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit 4c45994fcc77373ae2fb0901db15368c9731f641 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:53:23 2017 (r313415) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:54:08 2017 (r313416) @@ -1401,11 +1401,12 @@ iwm_stop_device(struct iwm_softc *sc) for (qid = 0; qid < nitems(sc->txq); qid++) iwm_reset_tx_ring(sc, &sc->txq[qid]); - /* - * Power-down device's busmaster DMA clocks - */ - iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); - DELAY(5); + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { + /* Power-down device's busmaster DMA clocks */ + iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, + IWM_APMG_CLK_VAL_DMA_CLK_RQT); + DELAY(5); + } /* Make sure (redundant) we've released our request to stay awake */ IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, From owner-svn-src-all@freebsd.org Wed Feb 8 06:56:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 241EECD317C; Wed, 8 Feb 2017 06:56:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F06B21814; Wed, 8 Feb 2017 06:56:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186uTCl013449; Wed, 8 Feb 2017 06:56:29 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186uS5i013445; Wed, 8 Feb 2017 06:56:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080656.v186uS5i013445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313417 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:56:30 -0000 Author: adrian Date: Wed Feb 8 06:56:28 2017 New Revision: 313417 URL: https://svnweb.freebsd.org/changeset/base/313417 Log: [iwm] Very basic DTS thermal sensor support (prints temp as debug msg). * Adds IWM_DEBUG_TEMP debug message type, for printing messages related to temperature sensors and thermal/TDP infos. * The firmware regularly sends us DTS measurement notifications, so just print the temperature value as a debugging message. (Adrian's addition): * Eventually this can be used by the driver to limit transmit rate / power to try and do some thermal throttling. Obtained from: DragonflyBSD commit efb7d4eb5c3140889a8880e12fd83c7bbfd0059d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_debug.h head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:54:08 2017 (r313416) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:56:28 2017 (r313417) @@ -5451,8 +5451,20 @@ iwm_notif_intr(struct iwm_softc *sc) notif->source_id, sc->sc_fw_mcc); break; } - case IWM_DTS_MEASUREMENT_NOTIFICATION: + case IWM_DTS_MEASUREMENT_NOTIFICATION: { + struct iwm_dts_measurement_notif_v1 *notif; + + if (iwm_rx_packet_payload_len(pkt) < sizeof(*notif)) { + device_printf(sc->sc_dev, + "Invalid DTS_MEASUREMENT_NOTIFICATION\n"); + break; + } + notif = (void *)pkt->data; + IWM_DPRINTF(sc, IWM_DEBUG_TEMP, + "IWM_DTS_MEASUREMENT_NOTIFICATION - %d\n", + notif->temp); break; + } case IWM_PHY_CONFIGURATION_CMD: case IWM_TX_ANT_CONFIGURATION_CMD: Modified: head/sys/dev/iwm/if_iwm_debug.h ============================================================================== --- head/sys/dev/iwm/if_iwm_debug.h Wed Feb 8 06:54:08 2017 (r313416) +++ head/sys/dev/iwm/if_iwm_debug.h Wed Feb 8 06:56:28 2017 (r313417) @@ -41,6 +41,7 @@ enum { IWM_DEBUG_FIRMWARE_TLV = 0x00020000, /* Firmware TLV parsing */ IWM_DEBUG_TRANS = 0x00040000, /* Transport layer (eg PCIe) */ IWM_DEBUG_EEPROM = 0x00080000, /* EEPROM/channel information */ + IWM_DEBUG_TEMP = 0x00100000, /* Thermal Sensor handling */ IWM_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWM_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ IWM_DEBUG_FATAL = 0x80000000, /* fatal errors */ Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:54:08 2017 (r313416) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:56:28 2017 (r313417) @@ -5978,6 +5978,30 @@ enum iwm_mcc_source { IWM_MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11, }; +/** + * struct iwm_dts_measurement_notif_v1 - measurements notification + * + * @temp: the measured temperature + * @voltage: the measured voltage + */ +struct iwm_dts_measurement_notif_v1 { + int32_t temp; + int32_t voltage; +} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/ + +/** + * struct iwm_dts_measurement_notif_v2 - measurements notification + * + * @temp: the measured temperature + * @voltage: the measured voltage + * @threshold_idx: the trip index that was crossed + */ +struct iwm_dts_measurement_notif_v2 { + int32_t temp; + int32_t voltage; + int32_t threshold_idx; +} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_2 */ + /* * Some cherry-picked definitions */ From owner-svn-src-all@freebsd.org Wed Feb 8 06:57:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B415FCD3231; Wed, 8 Feb 2017 06:57:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69FC519A2; Wed, 8 Feb 2017 06:57:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v186vLrR013522; Wed, 8 Feb 2017 06:57:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v186vLTw013520; Wed, 8 Feb 2017 06:57:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080657.v186vLTw013520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 06:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313418 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 06:57:22 -0000 Author: adrian Date: Wed Feb 8 06:57:21 2017 New Revision: 313418 URL: https://svnweb.freebsd.org/changeset/base/313418 Log: [iwm] Recognize IWM_DTS_MEASUREMENT_NOTIF_WIDE notification. * Add the command groups enum, and the iwm_phy_ops_subcmd_ids enum to if_iwmreg.h definitions. * The IWM_DTS_MEASUREMENT_NOTIF_WIDE notification will be generated by version 17 firmware. Taken-From: Linux iwlwifi Obtained from: DragonflyBSD commit 4d8d6f9def2ffb60aaf2d88f72f069a96c0b4e3f Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:56:28 2017 (r313417) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 06:57:21 2017 (r313418) @@ -5451,7 +5451,9 @@ iwm_notif_intr(struct iwm_softc *sc) notif->source_id, sc->sc_fw_mcc); break; } - case IWM_DTS_MEASUREMENT_NOTIFICATION: { + case IWM_DTS_MEASUREMENT_NOTIFICATION: + case IWM_WIDE_ID(IWM_PHY_OPS_GROUP, + IWM_DTS_MEASUREMENT_NOTIF_WIDE): { struct iwm_dts_measurement_notif_v1 *notif; if (iwm_rx_packet_payload_len(pkt) < sizeof(*notif)) { Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:56:28 2017 (r313417) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 06:57:21 2017 (r313418) @@ -1949,6 +1949,25 @@ enum { IWM_REPLY_MAX = 0xff, }; +enum iwm_phy_ops_subcmd_ids { + IWM_CMD_DTS_MEASUREMENT_TRIGGER_WIDE = 0x0, + IWM_CTDP_CONFIG_CMD = 0x03, + IWM_TEMP_REPORTING_THRESHOLDS_CMD = 0x04, + IWM_CT_KILL_NOTIFICATION = 0xFE, + IWM_DTS_MEASUREMENT_NOTIF_WIDE = 0xFF, +}; + +/* command groups */ +enum { + IWM_LEGACY_GROUP = 0x0, + IWM_LONG_GROUP = 0x1, + IWM_SYSTEM_GROUP = 0x2, + IWM_MAC_CONF_GROUP = 0x3, + IWM_PHY_OPS_GROUP = 0x4, + IWM_DATA_PATH_GROUP = 0x5, + IWM_PROT_OFFLOAD_GROUP = 0xb, +}; + /** * struct iwm_cmd_response - generic response struct for most commands * @status: status of the command asked, changes for each one From owner-svn-src-all@freebsd.org Wed Feb 8 07:01:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B72FCD339C; Wed, 8 Feb 2017 07:01:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA0A1D65; Wed, 8 Feb 2017 07:01:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1871VdC014618; Wed, 8 Feb 2017 07:01:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1871V14014617; Wed, 8 Feb 2017 07:01:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080701.v1871V14014617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313419 - head/sys/contrib/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:01:33 -0000 Author: adrian Date: Wed Feb 8 07:01:31 2017 New Revision: 313419 URL: https://svnweb.freebsd.org/changeset/base/313419 Log: [iwm] add version 17 firmware. Added: head/sys/contrib/dev/iwm/iwm-3160-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-3160-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-3160-17.fw.uu Wed Feb 8 07:01:31 2017 (r313419) @@ -0,0 +1,20409 @@ +begin 644 iwm-3160-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````0``0```(```````!$```#B +M804```$```````"$?(``,"B``(RF@`#,F8``Z!.``(";@``````````````` +M``````````````````!L(,`0#QL)(MP=P!`*`!M`(``;;@0``&$0`!MN`0`` +M810``&$/``!A```;)"``&R7D'<`1W`3`$@$`&W`(``!A#QP=(@0`'2;H'<`0 +M`0`;,.@=P!&"!!LD"``;)00HP!'I#P!A```;)0`!&R1<',`1````8=P=P!`` +M`!TD````(0$`6#$/10`B`%P`.?0EP!`!`1,R`0$3,P$`$V+O_P`R!```8@-@ +M`&(``%@X`@!8,6,``&'D!,`2Z!W`$0$`4B2T'\`0`@`3<`,``&$(`%@P"`!D +M,0<``&$/$U(B@@03)`@`$R4!`%)N`0``80$``&$```!A"`!8;NL/`&$``!,E +M```3)"00P!$`@!,D```3)3@!,B!`#* +M$0```20```$E"0``84``$R4&`1,D!"C`$0]V$R(L2,<1#W@3(@``QA$#``$D +M```!)0]%`"(`7``Y[_\`,AD``&0`@!,D`0`3)3@P'P!($*,`1\`?`$LA)QQ$/@=P!`/$P'AX>'AL7 +M%!(*'AX>'AX>'AL7%!(*'AX>'AX>'AL7%!(*'AX````````````````8M@$` +M!0```@0```!#AY.(@< +MB1R*'(L)P```L```!TH@$`#````/3_`0`- +M````6%("``X```"@"6`+X`4````"!.```````````````` +M```$`````0`````````!`````0```!X```````````````$!#@X````````R +M"`(/`P`!``````````$!#@X````````C!`(*`````````````/0!```````` +M````````````````.%"````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````0`````)`!```` +MH``0)P``Z`,``.@#```0(X``$".``/R$@`#XA(``^(2``/"$@`#\A(``^(2` +M`/B$@`#PA(``\(2``/R$@`#\A(``\(2``/R$@`#TA(```````/__```!`0`` +M``````````$`````L!T!`+`=`0"P'0$`!/\``+`=`0"P'0$`.`$!`+`=`0`` +M]```P/T``+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`= +M`0"P'0$`L!T!`+`=`0!D&`$`7!4!`+P8`0"P'0$`L!T!`+`=`0#`#@$`/!T! +M`%`1`0`$$@$`"!$!`+@%`0`(!0$`;`H!`)@4`0#0'0$`L!T!``3R``"<]``` +ML!T!`)CX``#@]@``>`8!`!`"`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P +M'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!``#_ +M``#\_@``^/X``+`=`0"P'0$`L!T!`+`=`0"P'0$`\`$!`+`=`0"P'0$`L!T! +M`+`=`0"P'0$`P!H!`+`=`0"P'0$`-`X!`,`-`0"P'0$`L!T!`+`=`0``#@$` +ML!T!`+`=`0"P'0$`L!T!`+`=`0#(_```W/L``+`=`0"P'0$`L!T!`'0(`0#L +M'P$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`$@4`0"P'0$`%`D!`+`= +M`0#H#0$`L!T!``C_``"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0!L_@``L!T! +M`+`=`0"P'0$`L!T!`+`=`0"P'0$`'!H!`/0,`0"P'0$`L!T!`+`=`0"8_0`` +ML!T!`/C\``!T!@$`L!T!`-@&`0"P'0$`L!T!`+`=`0!X_0``L!T!`+`=`0`T +M_P``L!T!`(P:`0!P`@$`L!T!`+`=`0#<``$`Z!\!`+`=`0`\&@$`L!T!``@, +M`0`H_```G!D!`+`=`0"P'0$`@`P!`+`=`0"P'0$`L!T!`%P&`0"P'0$`L!T! +M`+`=`0"P'0$`L!T!`#P#`0"P'0$`L!T!`+`=`0"P'0$`L!T!`/@3`0"P'0$` +ML!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P +M'0$`L!T!`#0(`0#P'P$`L!T!`+`=`0"P'0$`L!T!`+`=`0"P'0$`//8``+`= +M`0"P'0$`L!T!`*0?`0"``P$`L!T!`+`=`0"P'0$`L!T!`,P#`0`$%0$`2/8` +M`+`=`0"P'0$`L!T!`+`=`0"P'0$`Y!\!`+`=`0#```````````````````````````````````````#T*@$`!0```@0` +M``!`8```#_!P!8 +M!P```/\@``P0$``$`1`.$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0#Q`)$!`% +M"A`+$!`0$`(0$`T0$!`0$!`0$!`0$`8#$!`0$!`0$!`0$!`0$!`($!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0!Q`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!``````!(6` +M```````````````````````````````````````````````````````````` +M`````/\```#__________________________P`````````````````````` +M`````````````````````````````````````````````````````````"BP +M`0`@-@$`"+8!`"`V`0#0;@(`(#8!`#PC`0!,3@(`D%8!`"`V`0`@-@$`7%(" +M`%Q2`@!<4@(`7%("`%Q2`@!<4@(`7%("`"`V`0`@-@$`(#8!`"`V`0`HD@`` +M(#8!`"`V`0`@-@$`(#8!`"`V`0!@5@$`2%8!`"`V`0`@-@$````````````` +M`````````````````````````````````````0````$````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````$````"`````P````````#_````_P```/\```#_```` +M````````````````````````````````_P```(@3```````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````#_____```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````"``````````````````````````/____\````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````(``````````````````````````_____P`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````@`````````````````````````#_____```````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````"``````````````````````````/____\` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````(`````````````````````````` +M``````````````````````````#_```````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````_____P````#_____`````/____\`````_____P``````````#P`_ +M``$````/`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\` +M`0````\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````\`/P`! +M````#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$` +M```/`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\``0`` +M``\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````````"K```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``#J"J(*7@H="N`)I0EM"3<)!`G3"*0(=PA+""((^@?3!ZX'B@<````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````!42````@````0```!#C($&QY?#C(%(!Y@ +M#C(&)1YB#C('*AYC#C((+QYD#C()-!YE#C(*.1YG#C(+/AYH#C(,0QYI#C(- +M2!YJ#C(.31YL#C(B4$`-(``D8$`/(#$F<$`2(#0H`$$4(#$J$$$7(#$L($$9 +M(#$N,$$<(#,P0$$>(#$R4$$A(#$T8$$C(#$V<$$F(#,X`$(H(#$Z$$(K(#$\ +M($(M(#$^,$(P(#-`0$(R(#%D8$1?(C!F<$1B(C)H`$5D(B]J$$5G(B]L($5I +M(B]N,$5L(C)P0$5N(B]R4$5Q(B]T8$5S(B]V<$5V(C)X`$9X(B]Z$$9[(B]\ +M($9](B]^,$:`(C&`0$:"(B^"4$:%(@"$8$:'(BZ&<$:*(C&(`$>,(BZ*$$>/ +M(BZ,($>1(BZ.,$>4(C"00$>6(BV12$>8(@"5:$>=(BV7>$>?(C"9"$BB)"V; +M&$BD)"V=*$BG)"V?.$BI)#"A2$BL)"VE:$BQ)"T````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````/``\`#P`/ +M``\`#P`/``\````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````0`!``````#``)``T``````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````#QB```*````!````%Q^@``````````````````````````````` +M````````````````````````_____Z#%@````````````$!"#P!`0@\`0$(/ +M`$!"#P!`0@\`0$(/`$!"#P!`0@\`0$(/`$!"#P#@!P``0`$``.`'``!``0`` +M("<``.`'``#@!P``0`$``.`'``!``0```@`````````"```````````````` +M`````````````````````````````````````````-1M@`!\XX``&``````` +M``````````````````#_____```````````````````````````````````` +M`````````````````````````````````````````````````.`3`@`$%`(` +M%!0"`.P3`@#<$P(`&!0"`,03`@```````%`````P```````````````````` +M``````````!```"`,0``@`X``````````````````````````````"X````R +M````(``````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````"0'@(`[!H"`(`>`@!T'0(`8!X"`."H`0`8'@(`'!L" +M`*`<`@#0&@(`U!H"```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`(````````````````````"`````@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("` +M@("`@("`@("`@("`@(```@```````````````````````````````(`````` +M`/\```````````(```````````````````````````````"```````#_```` +M```````"````````````````````````````````@```````_P`````````` +M`@```````````````````````````````(```````/\```````````(````` +M``````````````````````````"```````#_```````````"```````````` +M````````````````````@```````_P```````````@`````````````````` +M`````````````(```````/\```````````(````````````````````````` +M``````"```````#_```````````"```````````````````````````````` +M@```````_P```````````@```````````````````````````````(`````` +M`/\```````````(```````````````````````````````"```````#_```` +M```````"````````````````````````````````@```````_P`````````` +M`@```````````````````````````````(```````/\```````````(````` +M``````````````````````````"```````#_```````````"```````````` +M````````````````````@```````_P```````````@`````````````````` +M`````````````(```````/\``````````````````($`````````@@`````` +M``"#`````````(0`````````A0````````"&`````````(<`````````B``` +M``````")`````````(H`````````BP````````",`````````(T````````` +MC@````````"/`````````,`!```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`,!G``"09P``%&@``*AG```8:```B&<``,1G``#_````_P```/\```#_```` +M_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_ +M````_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\` +M``#_````_P```/\```#_```````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````&""@`!P@H``H(*``+""@`#@@H``@ +M(*``)""@`#`@H``T(*``/""@`$`AH`!$(:``:"&@`&PAH`!X(:``2"&@`$PA +MH`!P(:``="&@`'PAH```````_P`````````````````````````````````` +M```````````````````````T+0(`!0```@0```!6]Y:7E]=W9W;W=I=WUU=G5O=6EU?7-VR5T +M)8HC@B-[(W0CBB&"(7LA="&/!8<%?P5X!8\#AP-_`W@#?7EV>6]Y:7E]=W9W +M;W=I=WUU=G5O=6EU?7-V4%R06Q!9D%Z)7,E;25G)7HCB%S +M(6TA9R%]!78%;P5I!7T#=@-O`VD#?7EV>6]Y:7E]=W9W;W=I=WUU=G5O=6EU +M?7-V7)Y;'F`=WEW75R=6QU@'-Y6]R;VQO@&UY;7)M;&V`:WEK6ER:6QI@&=Y9W)G;&>` +M97EE6-R8VQC@&%Y87)A;&%_17A%<45K17]#>$-Q0VM#?T%X07%! +M:T&$)7TE=B5O)80C?2-V(V\CA"%](78A;R&'!7\%>`5R!8<#?P-X`W(#```` +M``````#^````T-"ZN;>WN+>X`````````````````````````.^^K=[OOJW> +M[[ZMWN^^K=X``````````````````````````%1Q```*````!````%Q^@``` +M````S/X``+`=`0"\!`$``````/\````$````````````````````__\``(0U +M``"8-0``K#4``#@U```P-0``0#4``*PT``"D-```<.(``'S>``"$WP``X-\` +M``3?``!DWP``O-\``+CB``#,Z```%.D``,3I```.D``+#I```4Z@`` +M3-\``##?``!PW@`````````````"`@7_`@,```(!`0$#`P#_`P$!`0,``@(# +M`@4&```"_P````,```$#``$$!``#`P4``@4&`0$!_P$``@(!`P`%`0(%!@`` +M```````````````````8+0(`!@````0```!W]\$W@```P4'"0L5 +M#0\1$P```P`&!@8&!@8```````````,-+XF)-T.)B8F)B7.)66$`58)K38F) +MB8F)0TT"T`````!A04%`04%!0"%!04``````0&``8$!@8& +M!@8&!@8&!@8&!@(&!``````+!P,`.S____'____R#___\A____ +M_R+___\C____)/___R7___\F`````````````````````````````,`L```` +M````P"P``````````````@````(````L@0$`Z((````````````````````` +M```````````````````/`#\``@````\`/P`"````#P`_``(````/`#\``@`` +M``\`/P`"(`````````$```"JJJJJJJJJJJJJJNZJJJJJ*/\`S*JJ``"JJ@#, +MJJH```!``,``0`#``%``\`!0`/`````````````````````````````````` +M``````````````````````````````"JJJJJJJJJJJJJJJJJJJJJJJJJJJJJ +MJJJJJJJJJJJJJ@``````````````````````;&UN;W!Q0GMH +M+Z$]FA\6*;27T!XXCN,X',=Q'+V$]A*.XS@.',=Q'([C.`Y>0GL)QW$8!'`*(`M`"=0#J`%\!U`&^`J@#'022!'P%&`;J`-0! +MO@*H`WP%4`=BM>9-FNQ%CYT?0(F'^A7O +MZ[+)C@O[[$%GL_U?ZD6_(_=3EN1;F\)U'.&N/6I,6FQ!?@+U3X-<:/11--$( +M^9/B5/%NW%AM>:56:4$<^*$.D&!('^\*!$>+HE +MXTOSHOY=P("*!:T_O"%(<`3QWV/!=W6O8T(P(!KE#OUMOTR!%!@U)B_#X;ZB +M-JS(Y[HK,I7FH,"8&=&>?Z-F1'Y4JSN#"\J,*:?BO!T6=JT[VU9D3G0>%-N2"@QL2.2X79]NO>]#IL2H.:0Q-].+\C+50XM9 +M;K?:C`%DL=*RWO\J-9M.BP``0($!`8&"`@````1```````````````` +M````9````!````#_``P@"````!(````````````````````L`0``$````/\` +M#"`"````$P```````````````````"P!```0````_P`,(`<````4```````` +M`$`&`````````0```!`````!``Q`!````!4`````````0`8````````!```` +M$`````$`#$`#````%@````````!`!@````````$````0`````0`,0`,````7 +M`````````````````````0```!````#_``0`!````!@`````````0`8````` +M```R````,@````$!S$`#````&0````````````````````$````!`````0$` +M@`$````:`````````````````````0````$```#__P"@!0```!L````````` +M$``````````!````$`````$"!``&````'``````````$``````````$````! +M`````0`,``$````=``````````0``````````0````$````!``P``0```!X` +M````````!``````````!`````0````$``(`!````'P`````````````````` +M``$````(````_P`,(`8````@`````````````````````0````@```#_``P@ +M`@```"$````````````````````!`````0```/\`#*`#````(@`````````` +M``````````$````!`````0(,@`$````C`````````````````````0````$` +M``#_``"@!@```"0````````````````````!`````0````$"1``"````)0`` +M``````````````````$````0````_P`,(`,````F`````````-@````````` +M`0```&0````!``@``@```"<`````````+`$````````!`````0````$`#$`$ +M````*``````````L`0````````$````!````_P`,0`0````I`````````"P! +M`````````0````$````!``Q`!````"H`````````+`$````````!`````0`` +M``$`#$`#````*P`````````L`0````````$````!`````0`,0`4````L```` +M``````(``````````0````$````!``0`!0```"T`````````!``````````! +M`````0````$`#$`!````+@`````````L`0````````$```!I`````0`,0`,` +M```O``````````````````````(``!(```#_``Q@`@```#``````````,@`` +M``````!D````$````/\`#&`&````,0`````````L`0````````$```!N```` +M`0`,0`0````$#`P(%!0$!$````"```````$````"````!````$```$````!` +M````_T%5514`````@(B("`````$``!S_____`!````0!`!C^__]_``@```0" +M`1C_____`!````$!`1C_____`!````,``!S\_U+550T```(``!S\_Z?JJPX` +M``4"`1C\_U+550T```(!`1C\_Z?JJPX```,!`1C\_U+550T```4!`!C\_ZEJ +MJP8```!````7````>*X``!0``````````0```(1\`0``````>-,```,```!` +MLP``!`````C.```(````N,L```P```"LO@``$0`````````3````!*\``!8` +M```\<`(``````##3```$````4&X"``4```"LN0``"````+S+```,````8,$` +M``T`````````$0```````````````````-#2``` Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDBCCD33F9; Wed, 8 Feb 2017 07:01:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504961EE7; Wed, 8 Feb 2017 07:01:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1871wUO014675; Wed, 8 Feb 2017 07:01:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1871wAX014674; Wed, 8 Feb 2017 07:01:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080701.v1871wAX014674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313420 - head/sys/contrib/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:01:59 -0000 Author: adrian Date: Wed Feb 8 07:01:58 2017 New Revision: 313420 URL: https://svnweb.freebsd.org/changeset/base/313420 Log: [iwm] add version 17 firmware. Added: head/sys/contrib/dev/iwm/iwm-7260-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-7260-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-7260-17.fw.uu Wed Feb 8 07:01:58 2017 (r313420) @@ -0,0 +1,23322 @@ +begin 644 iwm-7260-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````1``0```(```````!$```#B +M804```$```````#@DX``E"J``*R_@`#(L8``*!6``("S@``````````````` +M``````````````````!L(,`0#QL)(MP=P!`*`!M`(``;;@0``&$0`!MN`0`` +M810``&$/``!A```;)"``&R7D'<`1``7`$@$`&W`(``!A#QP=(@0`'2;H'<`0 +M`0`;,.@=P!&"!!LD"``;)00HP!'I#P!A```;)0`!&R1<',`1````8=P=P!`` +M`!TD````(0$`6#$/10`B`%P`.?0EP!`!`1,R`0$3,P$`$V+O_P`R!```8@-@ +M`&(``%@X`@!8,68``&$(!<`2Z!W`$0$`4B2T'\`0`@`3<`,``&$(`%@P"`!D +M,0T``&$/$U(B@@03)`@`$R4!`%)N!```88($$R0(`!,E!"C`$00``&&"!!,D +M&``3)00HP!$```!A"`!8;N4/`&$``!,E```3)"00P!$`@!,D```3)3@!,B!`#*$0```20```$E!@``80]V$R(L2,<1 +M#W@3(@``QA$#``$D```!)0]%`"(`7``Y[_\`,AD``&0`@!,D`0`3)3@@=P!`/$P`L````````````` +M```````````````````````````````````````````>````'H@>B%H```!6 +M````5HA6B`(!``"J````JHBJB/X!``","@``5(Q4C*0?```````````````` +M_@```0#_``(!_P$`_P$!`/X"`0,"_P$!`/\!`0'_`@#_`P(`_@0"`P+_`@(` +M_P("`?\#`/\%`P#^!@,``_\#`P#_`P,!_P```````````````+1(```*```` +M!````+B5@``````````````````420``!0````0```"XE8`````````````` +M`````````````````````0```-0``0#L`@$`7`(!`,0"`0!4_0``3/T``!@V +M```$,P``5#,````````````````````!"_\```4#```$`@``!O\```#_```, +M_P``!_\```C_```)_P``"O\```+_`0#_``$"`!$!`0(!`0$#_P$!!`(!`04# +M`0$&!`$!!P4!`0@&`0$)#P$!"A`!``S_`0#^_P(`_P<"`0'_`@(""`("`PD" +M`@0*`@(%"P("!@P"`@<-`@((#@(""0X"`@H-`@`,_P(`_O\````````````` +M``````````#_!P```/\```?_``$)"```"O\!`@```0,!_P$#`O\!`P/_`0$$ +M_P$"!0`!`0O_`0(,_P$$!@8!`0?_`0`(_P$`"O\"`@#_`@,!_P(#`O\"`P/_ +M`@$$`0("!0`"`0L!`@(,`0($!@8"`@<``@`(`0(`"@$#`/\"`P,`_P,#`?\# +M`P+_`P,#!`,!!`4#`@4``P$+!0,"#`4#!`8&`P,'_P,`"`4#``H%`P#^`P0$ +M`/\$!`'_!`0"_P0$`_\$!`3_!`0%_P0$"_\$!`S_!`0&!@0$!P8$``C_!``* +M_P````````````#_`````0,``@("``,``@``!?\```;_```$_P``!P0```C_ +M`0#_`0$!``,!`@$"`0("`@$`!/\!`0<$`0`(_P(#``8"`@(&`@`%_P(`!O\" +M``3_`@`'!P(`"`<#`P`&`P`!!0,"`@8#`07_`P`&_P,`!`<#``<'`P`(!P`` +M`````0#_`0#_``$``?\!`@+_`@#_`0(``?\"`0/_`@,$_P(""O\"`@G_`@(( +M_P,``?\#`0,*`P4%"@,$!O\#!@H(`P,)_P0`_P,$``'_!`$#"P0"!PL$`@@$ +M!`,$_P0""@D$!`G_!`0&_P4`_P(%!`;_!0$#!@4``?\%!0K_!04)!08`__\& +M!`;_!@$#!@8``?\&`P3_!@8)!P8&"O\````````````````````````````` +M``!PCX```0`#;(^```$``R@5@``!``%4DH```0`#6)*```$``XA(`0`"``0` +M```(!`P""@8.`0D%#0,+!P\!D0```3\```*1```^/0```Y$``#T]```$D0`` +M/P,```61```)$```!I$``!8<```'D0``'Q\```B1```<%@``"9$``!`)```* +MD0```S\```N1```]/0``#)$``#T^```-D0``/P$``!$0/DA(2.`0!`````T@ +M!````"!#.0````#@A`$``.$0`0````(0E\L%`#!@"P````_2!````!C2^/__ +M'P%S,`$```G@B8:$A`K@A(0```O@IE77(`S@(HLL,@W@JHF'(@[@'GOL,1?@ +MDHR+BAC@BHH``!G@?DGG(!K@(HLL,AO@DTVW(1S@'GOL,21@``````)S```` +M`!$@%(4!``)@_A0```-@$10```9@$10``!D0!````&$0(````!(@E`,```D0 +M;E\``!H0`````#$0A@$``#(0D`$``#,0R````#004````#40@````#H0:0`` +M`#L0P````,$0`````"K@^>7G)BO@(HLL,BS@<\YI*RW@'GOL,2C@BXN)B2G@ +MB8D``#;@7%Q<7#?@7%P``#'@_^=Q`#+@[C0G`#/@H/#\`#3@L0\``#7@```` +M``)'`0```%)*"0!2R@@`$4((`!!""`#OO0<`[[T'`.\Y!P#..0<`SCD'`*ZU +M!@"M-0<`#T8)`'/."0!32@D`4DH)`%)*"0`RQ@@`,<8(`#'&"``QQ@@`$$(( +M`!!""``00@@`$$((`!!""``00@@`$$((`.^]!P#OO0<`[[T'`.^]!P#OO0<` +M[[T'`.^]!P#OO0<`[[T'`.^]!P`/0@@`$$((`!!""``00@@`$$((`!!""``0 +M0@@`,,8(`#'&"``QQ@@`,<8(`%)*"0!22@D`4DH)`'/."0!31@@`S[4&`*VU +M!@#..0<`SCD'`,ZY!P#OO0<`[[T'``]""``00@@`,4H)`%)*"0#OO0<`[ST' +M`,ZU!@"M-08`C#$&`,T]"``QQ@@`,<8(`%%*"0!22@D`4DH)`#+&"``QQ@@` +M,48(`!!""``00@@`$$((`!!""``0Q@@`,<8(`#'&"`!22@D`4DH)`%)*"0`Q +MQ@@`,<8(`/"Y!@",,08`C+4&`*TU!P#.O0<`[[T'`#'&"``Q0@@`$,('`.^] +M!P#O00@`$$((`!!""``QQ@@`,<8(`!%""``00@@`$,('`.^]!P#O00@`$,(( +M`#'&"``>'AX>'AL7%!(*'AX>'AX;%Q02"AX>'AX>'AX;%Q02"AX>'AX>&Q<4 +M$@H>'AX>'AX>&Q<4$@H>'AX>'AL7%!(*'AX``````````````````+C:`0`% +M```"!````+B5@``````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````T#*``0`R@`%0,H`!0#*``3`R@`!P"2@`'PDH`"`)*``A"2@`%`0H`!()J``8!"@`$PFH`!D$*``:!"@`%@0 +MH``P$*``/!"@`#00H``L#*```(&D``&!I``#@:0`B"2@`(PDH`"0)*``E"2@ +M`)@DH`"<)*``H"2@`*0DH```````````````````````<1L-`."!`0`6GP(` +M````````````````<0$),@()WP``Z```X@``-@$`'P(`7P$`8`$`*0(`*@(` +MW@#XSP`(TP`(T``(U``(T0`(U0`(T@`8U@``,0`D,@`F!`!,.```Y0%SY@$$ +MI@)SIP($CP'_5@+_@P'_1`+_C@$/50(/D`$`3@(`D0%]D@%]DP%]3P)]4`)] +M40)]6@!56P!5_0`!Z@$$_@`3_P`&90"3;@`)?`$-@`$-/0(-00(-S@$"CP(" +MSP$/D`(/D0(`O0$)?@()QP$6B`(6I`$/I0$/90(/9@(/WP$!UP$`H`(!F`(` +M>@$!.P(!```````#`>P!!0`0``0`$0`2``,`"@`+`#0!'0(U`1X"-@$?`B4` +M```*``L`!``/``,![`$0`#@`Y`&E`D@`$@`C````#1$B`#03@``0$X``9!.` +M``P3@``#`>P!`@'K`04`!``0``H`"P`&``@`?`&``3T"00)S`7@``F'H` +M`(!Z``"<&```?!D``/@8``!\&```>!D``'08``!H&```;!@``'`8``!$;@`` +MG&X``'1N``!L;@``_____________________P0```#_______________\# +M````_____P``````````_____P``````````_____P```````````P```!`` +M```#`````````````````````````/\``````````````/\````````````` +M`&0```!D```````````````````````````!``````'_```"_P```P$```7_ +M```&_P``"/\```?_```)_P``"O\```O_```,_P$`_P,!`0```0$""@$"!00! +M`0;_`0$'_P$#"@@"6`+X`4````"!.```````` +M```````````$`````@`````````!`````0```!X```````````````$!#@X` +M```````R"`(/`P`!``````````$!#@X````````C!`(*`````````````/0! +M````````````````````````O%F````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````0```` +M`)`!````H``0)P``Z`,``.@#``#8)(``V"2``&B<@`!DG(``9)R``%R<@`!H +MG(``9)R``&2<@`!`0`(-0$`"#4!``@U`0"D$@$`"#4! +M``@U`0#,%0$`"#4!`.0Q`0"T&0$`"#4!``@U`0"P%P$`0#@(`7',!`"A1`0`H +M40$`X'X"`.!^`@#@?@(`X'X"`.!^`@#@?@(`X'X"`"A1`0`H40$`*%$!`"A1 +M`0`\G@``*%$!`"A1`0`H40$`*%$!`"A1`0`LN!XH'```````````````````````````````` +M```````````````````````````````````````````````````````````` +M````7$L```(````$````N)6``````````````````+A+```%````!````+B5 +M@``````````````%```#"0,)!0D,$0`````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````!,"*``2`B@`/`%@``````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````/L5C``S$0``````````,P`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``$"`P0%!@<("0H+#`T.#Q`J*RPM+B]*2TQ-3D]0:FML;6YO<(J+C(V.CY"J +MJZRMKJ_*R\S-SL_0T=+3U-76U]?7U]?7U]?7U]?7U]?7U]?7`$```0$"`P0% +M!@<("0H+#`T.#Q`J*RPM+B]*2TQ-3D]0:FML;6YO<(J+C(V.CY"JJZRMKJ_* +MR\S-SL_0T=+3U-34U-34U-34U-34U-34U-34U-34`#T!`0(#!`4&!P@)"@L, +M#0X/*BLL+2\P2DM,34Y/4&IK;&UN;W",C8Z/D)&KK*VNK["QS,W.S]#1TM/3 +MU-76U]C9VMO +M@````````````````````````````````````````````````````````0P> +M6PXR`A$>70XR`Q8>7@XR!!L>7PXR!2`>8`XR!B4>8@XR!RH>8PXR""\>9`XR +M"30>90XR"CD>9PXR"SX>:`XR#$,>:0XR#4@>:@XR#DT>;`XR(E!`#2``)&!` +M#R`R)G!`$B`Q*`!!%"`R*A!!%R`O+"!!&2`R+C!!'"`Q,$!!'B`R,E!!(2`R +M-&!!(R`R-G!!)B`Q.`!"*"`R.A!"*R`O/"!"+2`R/C!","`Q0$!",B`R9&!$ +M7R(R9G!$8B(P:`!%9"(Q:A!%9R(M;"!%:2(Q;C!%;"(P<$!%;B(Q`!&>"(Q>A!&>R(M?"!&?2(Q?C!&@"(P@$!&@B(P@E!& +MA2(QA&!&AR(PAG!&BB(OB`!'C"(PBA!'CR(LC"!'D2(PCC!'E"(OD$!'EB(P +MD4A'F"(`E6A'G2(PEWA'GR(MF0A(HB0PFQA(I"0KG2A(IR0PGSA(J20MH4A( +MK"0PI6A(L20P```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````#P`/``\`#P`/``\`#P`/```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````$``0``````P`"0 +M`-`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````89P``"@````0```"X +ME8```````````````````````````````````````````````````````/__ +M__\XWX````````````!`0@\`0$(/`$!"#P!`0@\`0$(/`$!"#P!`0@\`0$(/ +M`$!"#P!`0@\`X`<``$`!``#@!P``0`$``"`G``#@!P``X`<``$`!``#@!P`` +M0`$```(``````````@`````````````````````````````````````````` +M``````````````",@X``%/V``!@`````````````````````````_____P`` +M```````````````````````````````````````````````````````````` +M``````````````````````#X/`(`'#T"`"P]`@`$/0(`]#P"`#`]`@#"&@`$@AH`!,(:``<"&@ +M`'0AH`!\(:```````/\````````````````````````````````````````` +M````````````````U%@"``4```($````N)6``````````````````*1O```& +M````!````+B5@`````````````````!T/P$`"@````0```"XE8`````````` +M````````!&<```4```($````N)6``````````````````*29`0`%```"!``` +M`+B5@`````````````````!PF@$`!0```@0```"XE8`````````````````` +MP%@"``8`````````N)6`````````````N)6``+B5@`"T(*``;""@```P``#_ +MC___``````````#8E8``V)6``*0@H``X(*```0```/C___\``````````/B5 +M@`#XE8``J""@`#P@H``0````Q____P``````````&):``!B6@`"L(*``>"&@ +M`$`!```__O__```````````XEH``.):``+`@H`!\(:````P``/_Q__\````` +M`````/\```#_```````````````````````````````````````````````` +M```````!`/\```````````````````````````````````!0+H``F.Z``!@` +M`````````0``````````````7"V``&#N@``8``````````$````````````` +M`.2"@`"8_(``&``````````!```````````````````````````````````` +M`````````````````````%Q#@`!@](``&``````````!```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````#__P``__\````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````#P`_``$````/`#\` +M`0````\`/P`!````#P`_``$````/`#\``0````\`/P`!````#P`_``$````/ +M`#\``@`````@`#``,``@`"``"@`&``(`$``0`!``$``(``H`!@`"``L`"P`+ +M``L`"P`*``8``@```````````````$A(/#P````````````````````````` +M``````!(2#P\`````````````````````/]_````````_W\```````#_?P`` +M`````/]_````````_W\```````#_?P``_W\``````````````````'QY=GEO +M>6EY?'=V=V]W:7=\=79U;W5I=7QS=G-O`57E55-R4VQ3@%%Y47)1;%&`3WE/4UR36Q-@$MY2W)+;$N`27E)4=R1VQ'@$5Y17)%;$6`0WE#4%R06Q!A"5])74E;R6$(WTC +M=2-O(X0A?2%U(6\AB`6!!7@%<@6(`X$#>`-R`XAY@'EY>7)Y;'F`=WEW75R=6QU@'-Y`57E55-R4VQ3@%%Y47)1 +M;%&`3WE/4UR36Q-@$MY2W)+;$N`27E)4=R1VQ'@$5Y +M17)%;$6`0WE#4%R06Q!@"5Y)7(E;"6`(WDC2%R(6PA +M@`5Y!7(%;`6``WD#<@-L`XAY@'EY>7)Y;'F`=WEW75R=6QU@'-Y +M`57E55-R4VQ3@%%Y47)1;%&`3WE/4UR36Q-@$MY2W)+;$N`27E)4=R1VQ'@$5Y17)%;$6`0WE#4%R06Q!@"5Y)7(E;"6`(WDC2%R(6PA@`5Y!7(%;`6``WD# +M<@-L`X!Y>7ER>6QY@'=Y=W)W;'>`=7EU7-R6UR;6QM@&MY:W)K;&N`:7EI6=R9VQG@&5Y97)E +M;&6`8WEC6%R86QA@$5Y17)%;$6`0WE#4%R06Q!@"5Y +M)7(E;"6`(WDC2%R(6PA@`5Y!7(%;`6``WD#<@-L`P`````````` +M``````@(``#.S,_-P,#`O\'!PL'"PL+!P\(````````````````````````` +M````[[ZMWN^^K=[OOJW>[[ZMW@``````````````````````````"'H```H` +M```$````N)6```````!D%0$`"#4!`"`<`0``````_P````$````````````` +M``0```````````````````````````````````#__P``]#<```@X```<.``` +MJ#<``*`W``"P-P``'#<``!0W``",\0``F.T``*#N``#\[@``(.X``(#N``#8 +M[@``X/$``!CX``!@^```$/D``(SY``#$^```_/@``&CY``!H[@``3.X``(#M +M``````````````("!?\"`P```@$!`0,#`/\#`0$!`P`"`@,"!08```+_```` +M`P```0,``00$``,#!0`"!08!`0'_`0`"`@$#``4!`@4&``````4````````` +M````````````````X`R``.`,@``,#8``X`R``.`,@``````````````````` +M````N%@"``8````$````N)6``````````````````-A8`@`&````!````+B5 +M@`````````````````!`;```!0````0```"XE8``````````````````P&T` +M``4````$````N)6``````````````````/A8`@`&````!````+B5@``````` +M`````#$T.C,T.C4W`````,D`````````!0(-``@$.A0Z```Z)#H`$`P0.CH< +M&#H@``H@.9="8'<\.#0P+"@D(!P8%!`,"`0`!`4%!`("```=!1D`$P````!$ +M0$<4`````P,#`P,#```$WM_?!-X```,%!PD+%0T/$1,```,`!@8&!@8&```` +M```````##2^)B3=#B8F)B8ESB5EA`%6":TV)B8F)B4--'(EY>6@```!K&WPP +M``````84%!0$%!04`A04%```````"P<#`#LW,R\K)R,?&Q<3#PL'`P`[-S,O +M*R +M0GMH+Z$]FA\6*;27T!XXCN,X',=Q'+V$]A*.XS@.',=Q'([C.`Y>0GL)QW$< +M!P$!`0$!`0$!0<$!`0$!`0$!`4'!`0$!`0$!`0%!00$!`0$!`0$!0<$!`0$! +M`0$!`4%!`0$!`0$!`0%!00$!`0$!`0$!04$!`0$!`0$!`4)"04%!04%!04%! +M04%!04%!04%"0D)!04%!04+"0D)#04%!04)"0D-#0T%!04%!04%"0D)!04%! +M0D)"0T-#04%!0D)#0T1$Q$%!0D)#1$3$1D8!`@,$F9D#`)W8B9U.[,1.-$B# +M-"=V8B<:I$$:$SNQ$Q$8@1$/_,`/#=(@#0N]T`L:`#0`3@!H`)P`T`#J``0! +M.`%;`38`;`"B`-@`1`&P`>8!'`*(`M`"=0#J`%\!U`&^`J@#'022!'P%&`;J +M`-0!O@*H`WP%4`5)%08`,"J'718+C0M-K+<[K3[6_:D379AM\Y]>U(^W7%>EQ/UIFBY```LP6!` +M'^/(>>VVOM1&C=EG2W+>E-28Z+!*A6N[*L7E3Q;MQ8;7FE5FE!'/BA#I!@2! +M_O"@1'BZ)>-+\Z+^7<"`B@6M/[PA2'`$\=]CP7=UKV-","`:Y0[];;],@108 +M-28OP^&^HC7,B#DN5Y/R58+\1WJLR.>Z*S*5YJ#`F!G1GG^C9D1^5*L[@PO* +MC"G'TVL\*'FGXKP=%G:M.]M69$YT'A3;D@H,;$CDN%V?;KWO0Z;$J#FD,3?3 +MB_(RU4.+66ZWVHP!9+'2G.!)M-CZK`?S)<^ORH[TZ4<8$-5OB/!O2G)<)#CQ +M5\=S49%!ZI8\#^%F` +M"1<:VF4QU\:$N-##@K`I=UH1'LM[_*C6;3HL``$"!`0&!@@(````E9F=H:4` +M```1````````````````````9````!````#_``P@"````!(````````````` +M```````L`0``$````/\`#"`"````$P```````````````````"P!```0```` +M_P`,(`<````4`````````$`&`````````0```!`````!``Q`!````!4````` +M````0`8````````!````$`````$`#$`#````%@````````!`!@````````$` +M```0`````0`,0`,````7`````````````````````0```!````#_``0`!``` +M`!@`````````0`8````````R````,@````$!S$`#````&0`````````````` +M``````$````!`````0$`@`$````:`````````````````````0````$```#_ +M_P"@!0```!L`````````$``````````!````$`````$"!``&````'``````` +M```$``````````$````!`````0`,``$````=``````````0``````````0`` +M``$````!``P``0```!X`````````!``````````!`````0````$``(`!```` +M'P````````````````````$````(````_P`,(`8````@```````````````` +M`````0````@```#_``P@`@```"$````````````````````!`````0```/\` +M#*`#````(@````````````````````$````!`````0(,@`$````C```````` +M`````````````0````$```#_``"@!@```"0````````````````````!```` +M`0````$"1``"````)0````````````````````$````0````_P`,(`,````F +M`````````-@``````````0```&0````!``@``@```"<`````````+`$````` +M```!`````0````$`#$`$````*``````````L`0````````$````!````_P`, +M0`0````I`````````"P!`````````0````$````!``Q`!````"H````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 8 07:02:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06FB0CD3432; Wed, 8 Feb 2017 07:02:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98F46EC; Wed, 8 Feb 2017 07:02:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18729s4014729; Wed, 8 Feb 2017 07:02:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18729Op014728; Wed, 8 Feb 2017 07:02:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080702.v18729Op014728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313421 - head/sys/contrib/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:02:11 -0000 Author: adrian Date: Wed Feb 8 07:02:09 2017 New Revision: 313421 URL: https://svnweb.freebsd.org/changeset/base/313421 Log: [iwm] add version 17 firmware. Added: head/sys/contrib/dev/iwm/iwm-7265-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-7265-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-7265-17.fw.uu Wed Feb 8 07:02:09 2017 (r313421) @@ -0,0 +1,26235 @@ +begin 644 iwm-7265-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````2``0```(```````!$```#B +M804```$```````"HMH```#.``*SK@`"8W8``O!R``(#?@``````````````` +M``````````````````!L(,`0#QL)(MP=P!`*`!M`(``;;@H``&&``!MN/``` +M80`!&VX]``!A``(;;CX``&$0`!MN`0``84P``&%'``!A```;)"``&R7D'<`1 +MB`;A&!\`"&(``!LE`0`;)```!24!``4D``@%.0$`!6*((,`1`@`%)``(!3D! +M``5BC"#`$00`!20`"`4Y`0`%8I`@P!$(``4D``@%.0$`!6*4(,`1$``%)``( +M!3D!``5BF"#`$2``!20`"`4Y`0`%8IP@P!%```4D``@%.0$`!6*@(,`1```( +M)0``""2(!N$9A`;A&4`&P!(!`!MP"```80\<'2($`!TFZ!W`$`$`&S#H'<`1 +M@@0;)`@`&R4$*,`1O@\`80``&R2``!LEY!W`$0``&R0``1LEY!W`$0``&R0` +M`ALEY!W`$0@`7W`$``!AV!W`$/_^&S+8'<`1KP\`8=@=P!```1LPV!W`$:L/ +M`&$``!LE``$;)%P!,B``#&$0,` +M`20```$E#T4`(@!<`#GO_P`R'```9`"`$R0!`!,E.!S`$0]W$R+@',`1`@`! +M8@\!$R($",`1!P`3)0<.$R0$*,`1C`G`$@0HP!&0"<`2R$G'$0]P$R(!`!,P +M!"C`$9@)P!(8*,`1#Q,#(@@`6#$#`!,D```3)00(P!$``!,D.$7`$04``&$` +M`%@X!`!8,0``$R0!`!,E.!S`$0``%20````AZ!W`$`\3!R(/9`$B"@`!0`@` +M`7`>``!A"`!8;@D``&$(``=P!0``80`"7#$!``@D```()80&X1D"``!A`"!8 +M,````&$!0A,D```3)00HP!&"!!,D&``3)00HP!'H'<`0YO\3,O__$S/H'<`1 +M```!)`@``24/`6,B`0!2)`@`!VX"``!A```5)````"$4``!A0`;`$N@=P!$! +M`%(DM!_`$`(`$W`"``!A"`!D,>,/`&$/$U(B#Q-2(@$`4FX$``!A@@03)`@` +M$R4$*,`1!```88($$R08`!,E!"C`$0```&'8-("!``#`%@(!$V1"`1,D!"C` +M$1"\@($``,`6!@$38@0(P!`$`!-D#UP`(@H``$``!@!P&@``80``$R0``!,E +M``#`%R``6#'((,`0<$7`$!`(P!```!,E`P`3)!P(P!$<",`1```3)`0(P!$/ +M%!4B!``5)@\P("+[_S`R`P`3)!@(P!$/%!4B`@`5)@\@,"(``!,D$$7`$1@( +MP!$0`%@Q#P`3(@$`$S`$*,`1#WP3(@@`S!$``!,E```3)#1(QQ$/>Q,B`0`3 +M,`0HP!$/%!4B`@`5)@]-$R($$,41`@`3)/``#(!@L`>`!`!P\`%`#\#!$`&``L"A(` +MI`$``!,`#``@#10``P`L#14`!``P#0`````````````````````````````` +M`````````````````````````!X````>B!Z(6@```%8```!6B%:(`@$``*H` +M``"JB*J(_@$``(P*``!4C%2,I!\```````````````#^```!`/\``@'_`0#_ +M`0$`_@(!`P+_`0$`_P$!`?\"`/\#`@#^!`(#`O\"`@#_`@(!_P,`_P4#`/X& +M`P`#_P,#`/\#`P'_````````````````<%<```H````$````G+B````````` +M`````````-!7```%````!````)RX@``````````````````````````````` +M```!````""0!`"`F`0"0)0$`^"4!`(@@`0"`(`$`<#T``%PZ``"L.@`````` +M``````````````$+_P``!0,```0"```&_P```/\```S_```'_P``"/\```G_ +M```*_P```O\!`/\``0(`$0$!`@$!`0/_`0$$`@$!!0,!`08$`0$'!0$!"`8! +M`0D/`0$*$`$`#/\!`/[_`@#_!P(!`?\"`@((`@(#"0("!`H"`@4+`@(&#`(" +M!PT"`@@.`@()#@(""@T"``S_`@#^_P```````````````````````/\'```` +M_P``!_\``0D(```*_P$"```!`P'_`0,"_P$#`_\!`03_`0(%``$!"_\!`@S_ +M`00&!@$!!_\!``C_`0`*_P("`/\"`P'_`@,"_P(#`_\"`00!`@(%``(!"P$" +M`@P!`@0&!@("!P`"``@!`@`*`0,`_P(#`P#_`P,!_P,#`O\#`P,$`P$$!0," +M!0`#`0L%`P(,!0,$!@8#`P?_`P`(!0,`"@4#`/X#!`0`_P0$`?\$!`+_!`0# +M_P0$!/\$!`7_!`0+_P0$#/\$!`8&!`0'!@0`"/\$``K_`````````````/\` +M```!`P`"`@(``P`"```%_P``!O\```3_```'!```"/\!`/\!`0$``P$"`0(! +M`@("`0`$_P$!!P0!``C_`@,`!@("`@8"``7_`@`&_P(`!/\"``<'`@`(!P,# +M``8#``$%`P("!@,!!?\#``;_`P`$!P,`!P<#``@'```````!`/\!`/\``0`! +M_P$"`O\"`/\!`@`!_P(!`_\"`P3_`@(*_P(""?\"`@C_`P`!_P,!`PH#!04* +M`P0&_P,&"@@#`PG_!`#_`P0``?\$`0,+!`('"P0""`0$`P3_!`(*"00$"?\$ +M!`;_!0#_`@4$!O\%`0,&!0`!_P4%"O\%!0D%!@#__P8$!O\&`0,&!@`!_P8# +M!/\&!@D'!@8*_P```````````````````````````````#BR@``!``,TLH`` +M`0`#O!R```$``1RU@``!``,@M8```0`#N'$!``(`!`````@$#`(*!@X!"04- +M`PL'#P&1```!/P```I$``#X]```#D0``/3T```21```_`P``!9$```D0```& +MD0``%AP```>1```?'P``")$``!P6```)D0``$`D```J1```#/P``"Y$``#T] +M```,D0``/3X```V1```_`0``$1`^2$@`X!`$````#2`$````81`B````($,Y +M`````."$`0``X1`!`````A"7RP4`,&`+````#]($````&-+\__\?`7,0```` +M">")AH2$"N"$A```"^"F5=<@#.`BBRPR#>"JB8>^PQ%^"2C(N*&."* +MB@``&>!^2><@&N`BBRPR&^"33;>^PQ)&`"`````G,`````$2`4A0$` +M&1`&````$=(#````,>#_MW8`,N#D)3\`,^`B4@X`-.`N````->``````-N`V +M-C8V-^`V-@``"1!N7P``&A``````,1"&`0``,A"0`0``,Q#(````-!!0```` +M-1"`````.A!I````.Q#`````P1``````)(``/```*N#YY>`>>^PQ*."+BXF)*>")B0``#&"#)0``.!!2````.1"6````08`!```` +M`DFTD0C"8!`(0.#O![Y>CP<\WFX'.YTN +M!SD<#@>WV\T&-INM!C4:[0:[W_`(S.5R"4IE,@E()/((Q^/Q"$:CL0A%(I$( +M1")Q",/A4`A"83`(P6`P",%@$`A`X.\'O]_O![_?[P<_G\\'/I_/!SZ?SP<^ +MGZ\'O5ZO![V>SP<^GZ\'O5ZO![V>SP<^G\\'/I_/!SZ?SP>_W^\'O]_O![_? +M#PA`8#`(P6`P",%@4`A"X7`(PR&1"$0BD0C%HM$(QN/Q",[&XT&M9K-!C;;[08W'`X'N9Q.![O=C@<\7J\'OM\/"$!@,`A"HC$- +MZ70Z#_'Q`(0&`P",%@,`C! +M8!`(0"#P!S^?SP>]'H\'O-UN![N=3@KP<]G\\'OQ\0"$!@ +M,`C!8#`(P6`0"$`@\`>_W^\'/Y_O![_?#PC`8%`(0Z+Q",EELPG-9K,)1"*1 +M"$1A$`B_G\\'/I_/!SZ?[P>_'Q`(P:!0",+A<`C#X7`(0J$P"$$@\`>_G\\' +M/I_/!SZ?[P<_8%`(1"*1"+O=;@>[W4X'N)NM!K293`:Q6`P&-!P/"$0BL0C% +M8M$(1J/Q",?C\0C'X]$(1F.Q"$4B<0C#H5`(P6`P"$`@$`A`(!`(P&`P"$&A +M<`C#(9$(Q6+1"$;C\0C'X_$(QZ/1"$9CL0C%(I$(0!Z.!C!8+`8QF6P&M)KM +M!CC=;@>[W6X'M5JM!C7:;`8R62P&,1J.!\"BT0C&XQ$)R&12"4KE<@G+Y5() +M2F4R"4CD\0A&H[$(0!Z.!K%83`:RV8P&M5JM!@$````B(B`?'AT;&AH:(B(@ +M'QX=&QH:&B(B(B(@'QX=&QH:&B(B(!\>'1L:&AHB(B(B(!\>'1L:&AHB(B`? +M'AT;&AH:(B(B(B$?'AT;&A<7(B(A'QX=&QH7%R(B("`A'QX=&QH7%"(B(1\> +M'1L:%Q0B(AX>'AX>'!H8%1(>'AX>'AP:&!42(B(B(B$?'AT<&A@8(B(A'QX= +M'!H8&"(B(B(A'QX='!H8%"(B(1\>'1P:&!8B(B`@(!\>'!L8%A(>'AX>'AP; +M&!84(B(B(B$?'AT<&1<7(B(A'QX='!D7%R(B("`A'QX='!D7%"`@(1\>'1P9 +M%Q0B(B`@(!\>'!L7%1(>'AX>'AP;%Q42(B(B(B(@'QT;&AH:(B(B(!\=&QH: +M&B(B(B(B(!\=&QH:&B(B(B`?'1L:&AHB(B(B(B`?'1L:&AHB(B(@'QT;&AH: +M(B(B(B(A(!X<&1<7(B(B(1\=&QH8&"(B(B(B(1X>'!D5$B(B(B$>'1L:%Q4B +M(B`@("`?'1H8%1(@("`@'QT:&!42(B(B(B(A(!X<&A@8(B(B(2`>'!H8&"(B +M(B(B("`?'1L9$R(B(B`@'QL;&18B(B`@("`@'AP9%A(@("`@(!X<&184(B(A +M(2$A'AT<&1<7(2$A(2`>'!D7%R(B(2$A(1\>'!D7%"$A(2$?'1P:%Q0B(A\? +M'Q\?'!L8%1$?'Q\?'QP9&!41(B(```````````````"X$@(`!0```@0```"< +MN(`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M-`R@`$`,H`!4#*``4`R@`$P,H``<'*``0""@`"@DH`!L$*``&"2@`'@DH`!\ +M)*``@"2@`(0DH`!0$*``2":@`&`0H`!,)J``9!"@`&@0H`!8$*``,!"@`#P0 +MH``T$*``+`R@``"!I``!@:0``X&D`(@DH`",)*``D"2@`)0DH`"8)*``G"2@ +M`*`DH`"D)*```````````````````````'(;#0#A@0$`%Y\"```````````` +M`````#0!`#8!`#X!5S\!9D`!=T$!F$(!!U\!JF`!JG$!>1\"`"D"_RH"_S(" +M>:$`6Z(`&Z,`,*0`$J4`(*8`!Z<`&Z@`$JD`!ZH``*P`":T`!JX`#*\`";`` +M!K$`#+(`![,`!+0`"K4`!K@`7KX`&<@`!LD`!LH``H!!/X`$_\`!FX`"GD`#74``7\`#X<`#ID` +MQ9D`S7P!#8`!#3T"#4$"#7T!_SX"_W\!_T`"_R<`'"@`&"D`'"H`'+D!![H! +M$'H"!WL"$,X!`X\"`Y$"`+T!"7X""<O@`9R``&R0`&R@`!S``%S0`%RP`$S@`#SP`*T``*T0`"T@`" +MTP`*U``*U0`"U@`"UP`*V``*VP"(W`"(W0"JW@#=WP``XP`(Y``(Y0`*Y@`* +MZ```ZP`([``([0`*[@`,,0`D,@`F=P$P.`(P!`!,.```Y0%SY@$*I@)SIP(* +M^P#_CP$@5@(@@P$`1`(`C@$/50(/D`$`3@(`D0%]D@%]DP%]3P)]4`)]40)] +M6@!56P!5_0`!Z@$$_@`3_P`&;@`*>0`-=0`!?P`/AP`.F0#%F0#-?`$-@`$- +M/0(-00(-?0'_/@+_?P'_0`+_)P`<*``8*0`<*@`@('>P(0S@$# +MCP(#D0(`O0$)?@()QP$,B`(,O@$)?P()R`$&B0(&I`$0J@$2I0$0JP$290(0 +M:P(29@(0;`(2WP$!UP$`H`(!F`(`>@$!.P(!8@'/9`'/9@'/+`+/+@+/,`+/ +M$``$``L````#`>P!!0`0``0`$0`2``,`"@`+`#0!'0(U`1X"-@$?`B4````* +M``L`!``/``,![`$0`#@`Y`&E`D@`$@`C````#1$B`\`:@`"<&H``\!J``)0: +M@``#`>P!`@'K`04`!``0``H`"P`&``@`?`&``3T"00)S`73B('(D"@!`!@```#(^0$`&0```/Q,```:```````````````````````` +M```!`_\```#_`@#_``(!`_\"`P3_`@(*`0(""_\"!04"`@(`_P(`_@,!`/\$ +M`0$"!0$"`?\!`@#_`0#^!@,`_P<#`PH(`P,+"`,"`?\#!04"`P,"_P,#"?\# +M`@#_`P#^"00`_PH$!`H+!`0+"P0$"`P$`@'_!`,$_P0%!0T$!`+_!`(`#@4% +M"@\%!0L/!08&$`4%`A$%`@`2!@#_$P8&"A0&!@L4!@0'_P8$`A4&!@G_!@(` +M_P8`_A8```````````````!@CP``"@````0```"%T!`#0[ +M`0!X70$`>%T!`-@]`0!X70$`R"L!`(0X`0!X70$`>%T!`'A=`0!X70$`>%T! +M`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`1%8!`!Q3`0"<5@$` +M>%T!`'A=`0!X70$`^$L!``1=`0#`3@$`F$\!`&Q.`0#(0@$`&$(!`(A'`0!8 +M4@$`J%T!`'A=`0"T*0$`9"P!`'A=`0`D,0$`8"\!`(A#`0#T/@$`>%T!`'A= +M`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T! +M`'A=`0!X70$`>%T!`'A=`0#@.@$`U#H!`,@Z`0!X70$`>%T!`'A=`0!X70$` +M>%T!`-0^`0!X70$`>%T!`'A=`0!X70$`>%T!`,!8`0!X70$`>%T!`&Q+`0#X +M2@$`X#T!`'A=`0!X70$`.$L!`'A=`0!X70$`>%T!`'A=`0!X70$`\#4!`/PT +M`0`H.`$`^#%T!`'A=`0!X70$`>%T! +M`'A=`0``4@$`>%T!`%Q&`0!X70$`($L!`'A=`0`X.P$`>%T!`'A=`0!X70$` +M>%T!`'A=`0!X70$`,#D!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`!A8`0`@ +M2@$`>%T!`'A=`0!X70$`7#@!`'A=`0!<-P$`A$,!`'A=`0#T0P$`>%T!`'A= +M`0!X70$`W#%T!`*Q)`0`@-@$` +M>%T!`'A=`0!L0P$`>%T!`'A=`0!X70$`>%T!`'A=`0!$0`$`>%T!`'A=`0!X +M70$`>%T!`'A=`0"P40$`>%T!`'A=`0!X70$`>%T!`'A=`0!X70$`>%T!`'A= +M`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0!\10$`R%\!`'A=`0!X70$`>%T! +M`'A=`0!X70$`>%T!`%0N`0`<+@$`>%T!`'A=`0!\7P$`B$`!`'A=`0!X70$` +M>%T!`'A=`0#80`$`Q%(!`,@N`0!X70$`>%T!`'A=`0!X70$`>%T!`+Q?`0!X +M70$`^$,!`'@\`0#,00$`>%T!`'A=`0`X4@$`>%T!`'A=`0!X70$`>%T!`'A= +M`0!X70$`>%T!`'A=`0!X70$`>%T!`'A=`0`P40$`>%T!`'A=`0"P/P$`P%%T!`"0^`0!X70$`7#\!`'A=`0`P6`$` +M>%T!`'A=`0!X70$`>%T!`'A=`0`,60``H%@``)Q8``#X6```/,D!`.S(`0!T +MR0$`(,D!`&3(`0"*8!`%R!`0!<@0$````````````````````````````````````````````` +M`````0````$````````````````````````````````````````````````` +M``````````````````````````````````````````````$````"`````P`` +M``````#_````_P```/\```#_```````````````````````````````````` +M_P````````````````````,````?````````````````````$$(`@$M+2TM+ +M```````````````````````````````````````````````````````````` +M``````````````````````````````````"($P`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````_____P`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````@`````````````````````````#_____```````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````"``````````````````````````/____\````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````(``````````````````````````_____P`````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````@`````````````````````````#_____```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````"````````````````````````````` +M````````````````````````_P`````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````/____\`````_____P````#_____`````/____\```````````\`/P`! +M````#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$` +M```/`#\``0````\`/P`!````#P`_``$````/`#\``0`````````/`#\``0`` +M``\`/P`!````#P`_``$````/`#\``0````\`/P`!``````````\`/P`!```` +M#P`_``$````/`#\``0````\`/P`!````#P`_``$`````````#P`_``$````/ +M`#\``0````\`/P`!````#P`_``$````/`#\``0``````````````JP`````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````$``!`````@````4````!````Z@JB"EX*'0K@":4);0DW"00)TPBD +M"'<(2P@B"/H'TP>N!XH'```````````````````````````````````````` +M````````````````````````````````````````````````````````9%L` +M``(````$````G+B``````````````````,!;```%````!````)RX@``````` +M```````%``!R`0``J`(```,)`PD%"0P1```````````````````````````` +M`````````````````````````!P`````````'``````````<`````````!P` +M```?````'````!\````<````'P```!P````?````'````!\````<````'P`` +M`!P````?````'````!\````<````'P```!P`````````'`````````!Z```` +M`````'H`````````>@````````!Z````?P```'H```!_````>@```'\```!Z +M````?P```'H```!_````>@```'\```!Z````?P```'H```!_````>@```'\` +M``!Z`````````'H````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M9F8.``````!F9@H`9F8&`&9F!@!F9@(`9F8"`&9F/@!F9CX`9F8Z`&9F.@`` +M````9F8V``````!F9C(``````&9F#@```````````&9F!@`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````0`!`0$!`0$!`0$``0`!````````_P`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````$P(H`!("*``;`>````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````^S6,`#.Q```````````S```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````>'AX>'AX>'AX>'AX>`!D<'AX>'AX> +M'AX>'AX`'AX>'AX>'AX>`!X>'AX>'AX>'@`!!@($`@(```0$!@0(`P`````9 +M'AX>'AX>&!D>'AX>'AX8&!X>'AX>'AX>`!4>'A@5'AX8&!X>'@,(``````8` +M``````````#_!0```````!@8&!@8'0$&!@8&``8``!X`'@`>`!@`!@8&`0$! +M`?T&!@````````8!`0``'@```````````````0`````````````````5&!@8 +M&!@8&!@8%1@8````````````````````_O[^_OX`%!88&!02$!@8```````` +M````````````````````````````%1@8&!@8&!05&!@8&!@8%!(8&!@8&!@8 +M&````````0````$````1&!@4$1@8%!08&!@``````/L4%!04%!@8&!@8&!@8 +M&!@8&!@8`!@8&!@8&!@8&!@8&!@`&!@8&!@8&!@8`!@8&!@8&!@8&``8&!@8 +M&!@8&!@8&!@8&!@8&!@8&!@8&!@8`!@8&!@8&!@8&!@8&!@8&!@8&`$!`0$! +M`0`````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````!65```>P````````!:5```.P````````!:5```>P`` +M```````*(```.P````````!:5```0P`````````*`````0```#`P```````` +M`````````````````0```#\````````````````````'`````````@(````` +M```````````!``("``$```("`0`!`@`"`@`````!``$``@(!``````````$` +M```````"`@```0```0```0`````"``("``````(```````(````!```````` +M``````(```$``@`$```````````````"``(``````````````````@`"``$` +M`````@````````````(``0(``@("`````````@`"```!```````````````` +M`````0```0````(``0(```````````,"```````````"``````("```````` +M`````````````````0`"`@```````````````````@`"`0````````````(` +M`````@`"`@`"`````````@`````````````"`@(``````@`"`@("``$```(` +M`````0(``@("``(!`@````(````"``$```(```(!`````````````@`````` +M``````````(``````````````````0````$"`0(```("```````!``(```$` +M`0`"```````````````````````````````````````"`````````````@`` +M``(`!``"`````@````(````"``(``@(````````````"``````(``````@`` +M````!0````(``0```0```0(```````````````````````$```````$``@`` +M``$``@`!``````(````````````````````````````````````````!```` +M```````````````````````````````````````````````````````````` +M``````(````````"`````````````````````````````@``````*2G_____ +M```````````````````````````````````````````````````````````> +M`0``+`L````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````0(#!`4&!P@)"@L,#0X/$"HJ*RPM +M+B]*2TQ-3D]0:VQM;G!QBXR-CH^1K*VNK["QS,S,S<[/T-'2T]/3T]/3T]/3 +MT]/3T]/3T],`00```````````0(#!`4&!P@)"@L,#0X/$"HJ*RPM+B]*2TQ- +M3D]0:FMM;F]PBHN,C8Z/JJNLK:ZORLO,S<[/T-#0T-#0T-#0T-#0T-#0T-#0 +MT-``/@$"`P0$!08'"`D*"PP-#BHK+"TN+TI+3$U.3U!J:FML;6YOBHN,C8Z/ +MD*JKK*VNK["PRLK+S,W.S]#1TM/4U=;7V-G:VMK:VMK:VMK:VMK:VMH`0P(" +M`P0%!@8'"`D*"PP-#BHK+"TN+TI+3$U.3U!0:FML;6YOBHN,C8Z/D*JKK*VN +MK["PRLK+S,W.S]#1TM/4U=;7U]?7U]?7U]?7U]?7U]?7U]<`0`(#`P0%!@<( +M"0H+#`T.*BLL+2XO2DM,34Y/3U!J:VQM;F^*BXR-CH^0JJNLK:ZOL+#*RLO, +MS<[/T-'2T]34U-34U-34U-34U-34U-34U-34U-0`/``````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``#_?_]__W__?_]_``````````````````````````````````"JJ@``_P`` +M`/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_```` +M_P```/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_ +M````_P```/\```#_````_P```/\```#_```````!`````0````$````!```` +M`0````$````!`````0````$````!`````0````$````!`````0````$````! +M`````0````$````!`````0````$````!`````0````$````!`````0````$` +M```!`````0````$````````````````````````````````````````````` +M``````````````````````````````````````````````!_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_ +M?W]_?W]_?W]_?W]_?W]_?W]_?W\```````````````"^````O@````$````` +M`````0```%\```!?`````@`````````"````+P```"\````#``````````,` +M```8````&``````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````H```````````````````#_`/\````````````` +M`````````/\`_P``````-````````````````````/\`_P`````````````` +M````````_P#_``````!P````````````````````_P#_```````````````` +M``````#_`/\``````)D```````````````````#_`/\````````````````` +M`````/\`_P```````````````````````0````$``````````0````$````` +M`````0````$````````````````````!`````0`````````!`````0`````` +M```!`````0``````````````````````````````C`H````````````````` +M``````````````````P#"````````````/\````````````````````````` +M`````````````````````/\````````````````````````````````````` +M`````````/\``````````````````````````````````````````````/\` +M`````````````````````````````````````````````/\````````````` +M`````````````````````````````````/\````````````````````````` +M`````````````````````/\````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````!`````````&`*@0`````````````````````````````````````` +M``````````````````````$,'K8.,@(1'KD.,@,6'KL.,@0;'KX.,@4@'L`. +M,@8E'L,.,@$B`'1@1>8B-'9P1>LB,'@`1O`B-'H01O4B-'P@ +M1OHB-'XP1O\B,(!`1@0B-()01@DB`(1@1@XB-(9P1A,B,(@`1Q@B,XH01QTB +M,XP@1R(B-(XP1R@(`?'H"`(QZ`@!D>@(`5'H"`)!Z`@`\>@(```````#@ +M````@`````````````````````````````"`]```@$L```!````````````` +M``````````````````#D````7````$`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````D(8"`"B"`@"`A@(` +M"(4"`&"&`@#$!`(`K(4"`&""`@`PA`(`#(("`!""`@`````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 8 07:02:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 509EDCD362C; Wed, 8 Feb 2017 07:02:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205D25E0; Wed, 8 Feb 2017 07:02:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1872uSE017752; Wed, 8 Feb 2017 07:02:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1872uwE017751; Wed, 8 Feb 2017 07:02:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080702.v1872uwE017751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r313422 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:02:57 -0000 Author: adrian Date: Wed Feb 8 07:02:56 2017 New Revision: 313422 URL: https://svnweb.freebsd.org/changeset/base/313422 Log: mumble mumble 3 megabyte firmware images sigh. Approved by: core (implicit) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Feb 8 07:02:09 2017 (r313421) +++ svnadmin/conf/sizelimit.conf Wed Feb 8 07:02:56 2017 (r313422) @@ -27,3 +27,4 @@ np obrien peter rwatson +adrian From owner-svn-src-all@freebsd.org Wed Feb 8 07:03:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA17CD3677; Wed, 8 Feb 2017 07:03:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFD546E4; Wed, 8 Feb 2017 07:03:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v187398M017812; Wed, 8 Feb 2017 07:03:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18739x2017811; Wed, 8 Feb 2017 07:03:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080703.v18739x2017811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313423 - head/sys/contrib/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:03:11 -0000 Author: adrian Date: Wed Feb 8 07:03:09 2017 New Revision: 313423 URL: https://svnweb.freebsd.org/changeset/base/313423 Log: [iwm] add this 3 megabyte firmware image. Added: head/sys/contrib/dev/iwm/iwm-8000C-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-8000C-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-8000C-17.fw.uu Wed Feb 8 07:03:09 2017 (r313423) @@ -0,0 +1,53122 @@ +begin 644 iwm-8000C-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(````!````'````!`````````` +M````````````````&P````0````"````$P```+P"````0$``!@```*$````` +M``$``````(:````B!18@&LP!`$````!``````0```'$Q!0`````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````#)HZK+"NR_;[>SV-J?H*@2 +M)"VN"OM[Z)]:'1-) +MBXB&):Q^@4FLV\VRR$6:.F52&%E"TY(P!W2[JX&"60!'>'E_$E.$9DQ"<\"AA1+1?2W:MEA`D:D*_3B32F; +M&>"J>2NA*_RWBGOMO_;^DQAVF]8/%ULJT$W"]"STML5RM(DDN&U([K3\US#5 +M9'!WV03*PM0=Q0$HQ.OOB86Z;1&IO_UWHS_:'WVO?0$2,[A#@Y!VA2$U9`5G +MYXD1(`C,DU7;E46SIN?N'F$PTY3X@Z`R_?A'D*G8PY[J;Y%+W>FEW:?H:1CQ +M_$2,#K5'MRL"KM!U#E&B'-EJ,H1#EGEDS\GO;S1H4B'?0VUT++-8,4D%#@.Z +MR@2_W',#````!P````B``0```(```(`!``<````(``4`````````!0`'```` +MN*T```"`1`"PK0``$P````2``0```(```````!$```!Q,04```$````````, +MT(``2":```CU@`#L[(``E!.``(!P@0`````````````````````````````` +M``!L(,`0#QL)(MP=P!`*`!M`(``;;@H``&&``!MN/@``80`!&VY1``!A``(; +M;F$``&$0`!MN`0``86\``&%J``!A```;)"``&R7D'<`12`CA&!\`"&(``!LE +M`0`;)```!24!``4D``@%.0$`!6*((,`1`@`%)``(!3D!``5BC"#`$00`!20` +M"`4Y`0`%8I`@P!$(``4D``@%.0$`!6*4(,`1$``%)``(!3D!``5BF"#`$2`` +M!20`"`4Y`0`%8IP@P!%```4D``@%.0$`!6*@(,`1```()0``""1(".$91`CA +M&10(P!(!`!MP"@``80\<'2($`!TF)`C`$@$;(R+H'<`0`0`C<`$``&$1`!LP +M`0`;,.@=P!&\#P!A```;)(``&R7D'<`1"`!?<`D``&'0!\`2``D;*,P'@($` +M`,`7U`?`$@`)&RC(!X"!``#`%ZX/`&',!\`2X`>`@0``P!?(!\`2W`>`@0`` +MP!>G#P!A```;)``!&R7D'<`1"`!?<*(/`&$```4EX@0%)-0'P!(`"1LH``4; +M*=P'@($``,`7T`?`$@`)&R@`!1LIX`>`@0``P!>5#P!A```;)``"&R7D'<`1 +M"`!?<`0``&'L'\`0__\;,^P?P!&,#P!A[!_`$```&S'L'\`1B`\`80``&R4@ +M`!LD7!S`$0```&'<'<`0```=)````"$!`%@Q0`!F<`@``&&`9^(8`0`3<`4` +M`&$(`%@P"`!D,28``&$(`%@P"0``80]%`"(`7``Y]"7`$`$!$S(!`1,S`0`3 +M8N__`#($``!B`V``8@``6#@"`%@Q=P``8>@=P!!X^`$D_\`!)0`!$SD/$P$B +M'`C`$@`!$SCH'<`1`0!2)'A%P!`!`!-P#```80@`6##8'L`0"@`30`(`$VX$ +M``!A`0`()```""5$".$9`0``80"`6#`(`&0Q````80@`6&[C#P!A```3)0`` +M$R0D$,`1`(`3)```$R4X',`1D`K`$@$`$W`%``!A```3)0``$R0``"$E```A +M)!(``&$``!,E`P`3)```(242`"$D#T0`(@H``$```0!P!```8?[_$S("`#!P +M^/\A,OK_(3(``@!P!```8?W_$S("`#!PQ_\A,M?_(3(H`,T1#R$3(BP`S1%P +M"L`2!`#-$70*P!((`,T1>`K`$@``S1&`"L`2\![-$80*P!(P*@=P!`/$P@=P!!P^`$D__\! +M)0`!$SD/$P$B%`C`$@`!$SCH'<`1`0!2)'A%P!`!`!-P`@``80@`9#'C#P!A +MC`K`$@$`$VY>``!AJ-6`@0``P!8&`1-B!`C`$`0`$V0/7``B"@``0``&`'`: +M``!A```3)```$R4``,`7(`!8,<@@P!!P1<`0$`C`$```$R4#`!,D'`C`$1P( +MP!$``!,D!`C`$0\4%2($`!4F#S`@(OO_,#(#`!,D&`C`$0\4%2("`!4F#R`P +M(@``$R001<`1&`C`$1``6#$``!,E`P`3)```(24_`"$D#TP`(@H``$`!``!P +M!```8?[_$S("`#!P^/\A,OK_(3("``!P!```8?W_$S("`#!PQ_\A,M?_(3(H +M`,T1#R$3(BP`S1$``!,E```3)`P`S1%\"L`2``#-$0]-$R($$,41`@`3)/`< +MP!$!`!,D[!S`$0``$R1P`!,E$!S`$0``$R4``!,DX!S`$0``$R4!`!,D<$3$ +M$60`$R101,01F-6`@0``P!8"`1-B#Q05(@P`%28!`!,D`0`3)"00P!$``!,D +M``#`%P\4%2(0`!4F!@`3)%!$Q!$``!,D<$3$$0``%20````A```;)0``&R0! +M`&1N`0`;)`(`9&X"`!LD!`!D;@0`&R0,`!MB#QL+(@\+8R(!`!M``@`;00`` +M`&$``!LEG`N`@0`;&B@``,`6```;)0(`&T```!MQ#V1C(@``'20````A```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````#0!P`````````````!`0$!`0$!`;T? +M``!C+@``_____P``````````````````````````"``````````````````` +M`````````````````````````````0`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````#,P```1$```````````````"B@````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````!$`(`````````````D````*``` +M`"P````P````-````#@````\````0````$0```!(````3````%````!4```` +M6````%P```!@````9````&@```!L````<````'0```!X````?````(````"$ +M````B````(P```"0````E0```)D```"=````H0```*4```"I````K0```+$` +M```J````.@```$H```!:````:@```'H```"*````FP```*L````"````!``` +M``8````#````"P```!,````;````(P```"L````S````.@```$(````!```` +M``````0````%`````````````````/\```#^`0```O\```/_``$`_P$``0(! +M`@+_`@#_`P(`_@0"``/_````````````````>-(```H````$````)-.````` +M`````````````(S2```*````!````"33@``````````````````````````` +M````````````````````````````'@```!Z('HA:````5@```%:(5H@"`0`` +MJ@```*J(JHC^`0``C`H``%2,5(RD'P````#_```!`/\```/_```&_P``"?\` +M``K_`0#_`0$!`0$!``+_`0(#_P$!!O\!`0G_`0`*_P$`_@("`/\#`@($`P(` +M!?\"``C_`@,&_P(`"?\"`@/_`@`*_P(`_@0#`/\%`P('_P,`"?\#`P/_`P,& +M_P,`"O\#`/X&````````````````8)4```H````$````)-.````````````` +M`````/B5```%````!````"33@``````````````````````````````````` +M````+),!`$25`0"TE`$`')4!`)"/`0"(CP$`,&4``!1B``!D8@`````````` +M````````````````````````````````_P<```#_```'_P`!"0@```K_`0(` +M``$#`?\!`P+_`0,#_P$!!/\!`@4``0$+_P$"#/\!!`8&`0$'_P$`"/\!``K_ +M`@(`_P(#`?\"`P+_`@,#_P(!!`$"`@4``@$+`0("#`$"!`8&`@('``(`"`$" +M``H!`P#_`@,#`/\#`P'_`P,"_P,#`P0#`00%`P(%``,!"P4#`@P%`P0&!@,# +M!_\#``@%`P`*!0,`_@,$!`#_!`0!_P0$`O\$!`/_!`0$_P0$!?\$!`O_!`0, +M_P0$!@8$!`<&!``(_P0`"O\`````````````_P````$#``("`@`#``(```7_ +M```&_P``!/\```<$```(_P$`_P$!`0`#`0(!`@$"`@(!``3_`0$'!`$`"/\" +M`P`&`@("!@(`!?\"``;_`@`$_P(`!P<"``@'`P,`!@,``04#`@(&`P$%_P,` +M!O\#``0'`P`'!P,`"`<`````````````````$```]@\``-@/``"F#P``80\` +M``D/``"=#@``(`X``)$-``#Q#```00P``((+``"T"@``V0D``/((````"``` +M`P<``/X%``#Q!```W@,``,<"``"L`0``C@````````````````$````!```` +M```````````!`````0````$```````````````$```C)@``!``,$R8```0`# +ME!.```$``>S+@``!``/PRX```0`#I/P!``(`!```(````"``````````55(` +M`$=%``!,20``3D,``$1)``!350``6EH``%I:``!:6@``6EH``%I:``!:6@`` +M6EH``%I:``!:6@``6EH`````````"`0,`@H&#@$)!0T#"PL+I*H"`#,S`P`` +M``0`,E4%````"`"KJ@H````,`,W,#``````````````````````````````` +M``````````````````#_````````````````````;-\```4```($````)-.` +M`/\```````````````````````````````8````````````````````````` +M````````````````H!.``-#T@``8`````````````````````````/____\` +M````````````````````(`(`````(0(`````(@(`````(P(`````)`(````` +M)0(`````!@``````````````T+P"`,2\`@#PO`(`$,`"`,2]`@"(O0(`-+T" +M`'C``@`8#H``D.Z``!X```#,D40``0````````#JD40````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````H/\```4```($ +M````)-.````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````````"` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````0/_````_P(`_P`"`0/_`@,$_P(""@$"`@O_`@4%`@("`/\"`/X# +M`0#_!`$!`@4!`@'_`0(`_P$`_@8#`/\'`P,*"`,#"P@#`@'_`P4%`@,#`O\# +M`PG_`P(`_P,`_@D$`/\*!`0*"P0$"PL$!`@,!`(!_P0#!/\$!04-!`0"_P0" +M``X%!0H/!04+#P4&!A`%!0(1!0(`$@8`_Q,&!@H4!@8+%`8$!_\&!`(5!@8) +M_P8"`/\&`/X6````````````````*-L```H````$````)-.``(A]``#\?0`` +MY!\``/1]```4K```)*P``""L``!````G@```*X```1N`` +M`!?@```8X```1^```"C@```IX```..```#G@````B`$`8F)B8F)B````G`$` +M9V=G9V=G````D`$`9&1D9&1D``!F9F9F9F8````````````````````````( +M<@``!0````0````DTX``^'$```!R``"T<@``_'$```1R```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````,P;`````,@;`````$`<```` +M`$P<`````%`<`````%0<`````%@<`````%P<`````&`<`````&0<`````'`< +M``````@<`````&@<`````&P<`````$0<`````$@<`````!`<```````<```` +M`)@>`````)P>`````*0>`````*@>`````,`>`````+@>`````+P>```````= +M`````"`=`````$`=`````&`=`````(`=`````*`=`````,`=`````.`=```` +M`````````!0````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````$````````````` +M``````#8!@```/\#`-`'````_P4`4`<```#_+0`L!P```/\]`(`&````_P0` +MI`8```#_)0#X!@```/\\`.`O`@``_]T`>`<```#_3`#,!P```/\B`'0'```` +M_R8`R`<```#_*`#P+@(``"```"@N`@``_S``P`8```#_!P"@!P```/\@``P0 +M$``$`1`.$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0#Q`)$!`%"A`+$!`0$`(0 +M$`T0$!`0$!`0$!`0$`8#$!`0$!`0$!`0$!`0$!`($!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0!Q`0$!`0 +M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!#=!P!0\@@````````````` +M``````````````````````````````````````````````````````````#_ +M````W!Z``,04@0`:``````````$``````````````.`>@`#\%($`&``````` +M```!``````````````#__________________________P`````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````````````````*3T +M`@!0$P(`;/T"`%`3`@","P0`4!,"`'SJ`0"HUP,`!#X"`%`3`@!0$P(`X.P# +M`.#L`P#@[`,`X.P#`.#L`P#@[`,`X.P#`%`3`@!0$P(`4!,"`%`3`@"L"`$` +M4!,"`%`3`@`$/@(`4!,"`%`3`@#4/0(`O#T"`%`3`@!0$P(```$````!```` +M```````````!`````0````$```````````````$````````````````````` +M``````````````````````````````````````````````$````!```````` +M````````````!R@P.DA06&!H<'B`B)"9FZ&E```````````````````````` +M```````````````````````````````````````````````````````````` +M``````````$````"`````P````````#_````_P```/\```#_```````````` +M````````R$("``4```($````)-.``````````````````+!,`@`%```"!``` +M`"33@`````````````````````````````````````````````````#_```` +M`````!A&`````"!&`````"1&`````(!&`````(1&`````(A&`````(Q&```` +M`)!&`````)1&`````)A&`````)Q&`````*!&`````,!&`````,1&`````,A& +M`````,Q&`````-!&`````-1&`````-A&`````-Q&`````.!&`````.1&```` +M`.A&`````.Q&`````/!&`````/1&`````/A&`````/Q&`````!1&``````!' +M``````1'``````A'``````Q'`````$!'`````$1'`````'Q'`````(!'```` +M`(1'`````(A'`````)!'`````)1'`````)A'`````*!'`````*1'`````*A' +M`````*1&``````1&``````A&``````Q&`````!!&``````!&`````#,````` +M`&`<`````&0<`````&@<`````&P<`````'`<`````'0<`````'@<`````(`< +M`````(@<`````(P<`````)`<`````)0<`````)@<`````)P<`````*`<```` +M`*0<`````*@<`````*P<`````+`<`````+0<`````+@<`````+P<`````,`< +M`````,0<`````,@<`````,P<`````-`<`````-0<`````-@<`````-P<```` +M`*@=`````+@=`````+P=`````,`=`````,0=`````,@=`````,P=`````-`= +M`````-0=`````-@=`````-P=`````.`=`````.0=`````.@=`````.P=```` +M`/`=`````/0=`````/@=`````/P=`````&0?`````.P?`````'0>`````$0? +M`````(`?`````(0?`````(@?`````(P?`````)`?`````)0?`````)@?```` +M`)P?`````*`?`````*0?`````*@?`````*P?`````+`?`````.0?`````/`? +M`````/0?`````/P?`````$8`````````````````````````X!P`````Y!P` +M````Z!P`````]!P`````^!P`````#!T`````&!T`````+!T`````,!T````` +MG!T`````H!T`````,!X`````-!X`````.!X`````/!X`````3!X`````4!X` +M````5!X`````6!X`````7!X`````9!X`````>!X`````?!X`````A!X````` +MC!X`````D!X`````E!X`````F!X`````G!X`````H!X`````P!X`````Q!X` +M````T!X`````U!X``````!\`````X!X`````!!\`````W!X`````=!\````` +M>!\`````?!\`````^!\`````*@`````````````````````````````````` +M``,````?````````````````````$$(`@$M+2TM+```````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````$````````````````````````````````` +M`````````````````````````````````````````````/\````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````/SP```````````````````,`````````_P`````````` +M````````````````````````````````````__\````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````(```` +M```````````````````````````````````````````````````````````` +M`````````*2,```*````!````"33@````````````'21```@DP``Q)$``,R0 +M``!0DP``Y)(``""1``"`D`````$````!!`$!`0`"`0$!`P$``@`*$`I0"I`*T`L`"T`+@`NP"_`,,`Q@#*`,X`T0#5 +M`-@`W`#?`.,`YP#J`.X`\0#U`/@`_`#_``(!!@$)`0T!$`$4`1`2$! +M)`$H`2L!+@$R`34!.`$[`3\!0@%%`4@!3`%/`5(!50%9`5P!7P%B`64!:`%K +M`6\!<@%U`7@!>P%^`8$!A`&'`8H!C0&0`9,!E@&:`9T!GP&B`:4!J`&K`:X! +ML0&T`;(!Y0'H`>L![0'P +M`?,!]@'X`?L!_@$!`@,"!@()`@P"#@(1`A0"%@(9`AP"'@(A`B0")@(I`BP" +M+@(Q`C0"-@(Y`CL"/@)!`D,"1@)(`DL"30)0`E,"50)8`EH"70)?`F("9`)G +M`FD";`)N`G$"P)]`G\"@@*$`H<"B0*,`HX"D`*3`I4"F`*:`IP" +MGP*A`J,"I@*H`JL"K0*O`K("M`*V`KD"NP*]`L`"P@+$`L8"R0++`LT"T`+2 +M`M0"U@+9`ML"W0+?`N("Y`+F`N@"Z@+M`N\"\0+S`O8"^`+Z`OP"_@(``ZL` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````8F@``!0````0````DTX`````````% +M``!R`0``J`(```,)`PD%"0P1`````````````````````/____\`'``````$ +M'``````('``````,'``````H'`````!('`````!,'`````!0'`````!0'``` +M``!\'``````H.```````3``````$3``````(3``````,3``````@3``````D +M3``````H3`````!`3`````!$3`````!@3`````"`3`````"@3`````#`3``` +M``#$3`````#(3`````#,3`````#@3```````30````!@30``````)`````#, +M)@````#<)@````#$)@`````@)``````T)`````"8)0````"<)0````"@)0`` +M``"D)0````"H)0````"L)0````#$)0````#()0````#4)0````#8)0````#< +M)0````#@)0````#D)0````#H)0````#L)0````#P)0`````$)P`````8$``` +M```L$`````!`$`````!,$`````",#0````"4#0````"<#0````#`1`````#$ +M1`````#(1`````#,1`````#01`````#41`````#81`````#@1`````#D1``` +M``#H1`````#L1`````#X1`````#\1```````10`````D10`````H10`````L +M10````!$10````"X10````!@"``````(#0`````0#0`````4#0``````#0`` +M```$#0````!5```````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````/____^`V8``Z$B!`!@``````````0``````````````!"`````````` +M````````````````````@E7"34)$PGR"-$(L0B1"'((4P@U +M"!<(^0?'!VL'4````!K0```3@```"$`$``$`!``:,```` +M&`$``!@!```8`0``&`$`*A0``"A(```F>```!K0```3@```"$`$``$`!``:( +M````&`$`"E0(``B$```&M```!.````(0`0``0`$``!@!```8`0``&`$``!@! +M```8`0!C`````(`$`,8```#&&`<`0$`5`&,!``#&`0``"B0```A8```&N``` +M!.0```(4`0``0`$`!H@````8`0``&`$``!@!```8`0``&`$`"B0```A8```& +MN```!.0```(4`0``0`$`!H@````8`0``&`$``!@!```8`0``&`$``!@!```8 +M`0``&`$``!@!```8`0``&`$``!@!```8`0!"`````````*4```"EE`(`0$`5 +M`$(```"E````"CP```AL```&P```!/0```(D`0``4`$``8`!``%,`0`$P``` +M`!@!```8`0``&`$`"CP```AL```&P```!/0```(D`0``4`$``8`!``%,`0`$ +MP````!@!```8`0``&`$``!@!```8`0``&`$``!@!```8`0``&`$``!@!```8 +M`0`"``````````8````&&```0$`5``(````&````&@```!@8```62```%'@` +M`!*P```&X```!!@!``),`0``@`$``!@!```8`0``&`$`&@```!@8```62``` +M%'@``!*P```&X```!!@!``),`0``@`$`"'````:L```$V````@@!```X`0`` +M&`$``!@!```8`0``&`$``!@!```8`0"$``````````@!```((00`0$`5`(0` +M```(`0``&@@``!@T```69```%)0``!+$```&"`$`!#@!``)D`0``E`$``!@! +M```8`0``&`$`&@@``!@T```69```%)0``!+$```&"`$`!#@!``)D`0``E`$` +M`!@!```8`0``&`$``!@!```8`0``&`$``!@!```8`0``&`$``!@!```8`0"$ +M``````````@!```((00`0$`5`(0````(`0`````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````! +M````(`````,```#I`.D````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````#/[__P$```#2V``` +MTM@``"YG__\N9___$````-+8``#2V```+F?__RYG__\0````TM@``-+8```N +M9___+F?__Q````#2V```TM@``"YG__\N9___$````-+8``#2V```+F?__RYG +M__\0````TM@``-+8```N9___+F?__Q````#2V```TM@``"YG__\N9___$``` +M`-+8``#2V```+F?__RYG__\0````TM@``-+8```N9___+F?__Q````#2V``` +MTM@``"YG__\N9___$````-+8``#2V```+F?__RYG__\0````TM@``-+8```N +M9___+F?__Q`````````````````````````````````````````````````` +M````````F@````$``````.0,```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````/]__W__?_]__W\````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````3 +M$Q,7&Q\I*S,[#1,3$Q<;(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J+#A`#104 +M&!P<)"PN-D`-$1$1$1DA)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^6'@`'B8F +M)BXN-D9>G@`@("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL; +M(RLU/U.;`!L?(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS.5V5`!08'!PD +M+#0Z4)0`&R,C(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ +M/45IF0`3$Q,7&Q\I*S,[#1,3$Q<;(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J +M+#A`#104&!P<)"PN-D`-$1$1$1DA)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^ +M6'@`'B8F)BXN-D9>G@`@("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%E +MG0`;&QL;(RLU/U.;`!L?(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS.5V5 +M`!08'!PD+#0Z4)0`&R,C(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(` +M&2$A)2DQ/45IF0`J*BHJ*BHJ*BHR#2HJ*BHJ*BHJ+C(-*"@H*"@H*"@H*`TJ +M*BHJ*BHJ*C`X#2HJ*BHJ*BHJ,#@-)RG@`@("`@*#`P/$R@`!XB +M(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL;(RLU/U.;`!L?(R,K*S,^3YL`'"0D +M*"PT/DADG``5%149'2TS.5V5`!08'!PD+#0Z4)0`&R,C(RLS/TMGFP`2$A8: +M'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ/45IF0`3$Q,7&Q\I*S,[#1,3$Q<; +M(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J+#A`#104&!P<)"PN-D`-$1$1$1DA +M)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^6'@`'B8F)BXN-D9>G@`@("`@*#`P +M/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL;(RLU/U.;`!L?(R,K*S,^ +M3YL`'"0D*"PT/DADG``5%149'2TS.5V5`!08'!PD+#0Z4)0`&R,C(RLS/TMG +MFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ/45IF0`3$Q,7&Q\I*S,[ +M#1,3$Q<;(RPM,SL-%!04%!PD)"PT.`T4%!04'"`J+#A`#104&!P<)"PN-D`- +M$1$1$1DA)2DM-0TD)"0D+#0T/&!X`"0D+"PL,#0^6'@`'B8F)BXN-D9>G@`@ +M("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU.4%EG0`;&QL;(RLU/U.;`!L? +M(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS.5V5`!08'!PD+#0Z4)0`&R,C +M(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([9I(`&2$A)2DQ/45IF0`J*BHJ +M*BHJ*BHR#2HJ*BHJ*BHJ+C(-*"@H*"@H*"@H*`TJ*BHJ*BHJ*C`X#2HJ*BHJ +M*BHJ,#@-)RG@`@("`@*#`P/$R@`!XB(B8J+C(X4IX`'24E)2TU +M.4%EG0`;&QL;(RLU/U.;`!L?(R,K*S,^3YL`'"0D*"PT/DADG``5%149'2TS +M.5V5`!08'!PD+#0Z4)0`&R,C(RLS/TMGFP`2$A8:'B8P.E*2`!(:'AXB)C([ +M9I(`&2$A)2DQ/45IF0`0$!`0%"`H*#`P#1`0$!`4("@H,#@-*"@H*"XX0DA. +M6``H*"@H,CQ$3%)>`"@H*"@R/$1,5&``*"@H*#`X0$948``H*"@H,#A`1E1@ +M`!`0$!`4("@H,#`-$!`0$!0@*"@P.`TH*"@H+CA"2$Y8`"@H*"@R/$1,4EX` +M*"@H*#(\1$Q48``H*"@H,#A`1E1@`"@H*"@P.$!&5&``_W__?_]__W__?_]_ +M_W__?_]__W\````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````,`4``#`'X`#0"``"D`J@!`````8P`#`(@`%0"7`#D`NP$@`- +M@!3@#D`5@!`P%_`1``S`$T`.T!1@#T`6@!'0%Z`>4!E`(*`:4"*P'"`D\!UP +M&'`?$!K@()`;H"-@'6`E@"[0)V`O,"FP,3`K@#,`+>`FP"Y`*)`PD"IP,H`K +M<#0@.Y`U8#R@-T`^@#C0/X`Z`#6@.Z`V8#T0.!`_@#E@0(!&H$%`2$!#`$H0 +M13!+P$700'!'P$(@21!$D$IP12!,L%003E!6P$^P6!!2X%FP4S!-H%4`3U!7 +MX%!@6\!U +M`'Y0=P!_4'EP@#![0(*@B5"$,(N@A?"-L(?PCH"(((/`BO"$D(S@AG".((AP +MD""8()(`FA"4P)O`E6"=<)?0D:"8T))`FT"5`)Q@EK"><*7@GV"G@*'0J$"C +M$*O0I""?0*:PH$"H4*+PJ2"DD*L@LS"MP+00KX"V<+$0N*"R(*SPLU"N8+4P +ML'"W(++@N(#`L+K`P3"\\,,0OC#%D+_PN0#!,+OPPE"]@,20OH#&4,_PQW#0 +M0,KPT<#+8--PSH#'P,\`R2#1\,JPTB#-X-/0VY#5P-W0UV#?@-D@X5#;,-3` +MW$#74-Y0V)#@P-J@X9#IH./@ZF#E$.U`YQ#NP.B@XC#J@.00[%#F<.W0Y]#N +MT/6`\##W\/%`^I#S8/L`];#OL/80\;#XX/*@^D#TL/SP_^#]\/]0__#_X/_P +M__#_@/WP_Y#^\/_`__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_ +M\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P +M__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_ +M\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_\/_P__#_@`"` +M`8`"@`.`!(`%@`:`!X`(@`F`"H`+@`R`#8`.@`^`$(`1@!*`$X`4@!6`%H`7 +M@!B`&8`:@!N`'(`=@!Z`'X`@@"&`(H`C@"2`)8`F@">`*(`I@"J`*X`L@"V` +M+H`O@#"`,8`R@#.`-(`U@#:`-X`X@#F`.H`[@#R`/8`^@#^`0(!!@$*`0X!$ +M@$6`1H!'@$B`28!*@$N`3(!-@$Z`3X!0@%&`4H!3H+L-`&!;`P"@NPT`X"(" +M```````````!``$````!``$````!``$````!``$````!``$````!``$````! +M`````0````$````!`````0````$````!``$````!``$````!``$````!``$` +M```!``$````!``$````!`````0````$````!`````0````$````!``$````! +M``$````!``$````!``$````!``$````!``$````!`````0````$````!```` +M`0````$````!``$````!``$````!``$````!``$````!``$````!``$````! +M`````0````$````!`````0````$````!``$````!``$````!``$````!``$` +M```!``$````!``$````!`````0````$````!`````0````$````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````=W<#`PT-!@8#`PT-!@8#`PT-!@8# +M`PT-!@8#`PT-!@8#`PT-```````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````)A9$`28&8JB```````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 8 07:03:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FB33CD36CF; Wed, 8 Feb 2017 07:03:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D3CF83E; Wed, 8 Feb 2017 07:03:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1873OVY017864; Wed, 8 Feb 2017 07:03:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1873Ot9017863; Wed, 8 Feb 2017 07:03:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080703.v1873Ot9017863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r313424 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:03:25 -0000 Author: adrian Date: Wed Feb 8 07:03:24 2017 New Revision: 313424 URL: https://svnweb.freebsd.org/changeset/base/313424 Log: No need for more of that thanks. Approved by: core (implicit) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Feb 8 07:03:09 2017 (r313423) +++ svnadmin/conf/sizelimit.conf Wed Feb 8 07:03:24 2017 (r313424) @@ -27,4 +27,3 @@ np obrien peter rwatson -adrian From owner-svn-src-all@freebsd.org Wed Feb 8 07:03:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3AB0CD375C; Wed, 8 Feb 2017 07:03:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0B6EA13; Wed, 8 Feb 2017 07:03:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1873qeD017936; Wed, 8 Feb 2017 07:03:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1873q5u017935; Wed, 8 Feb 2017 07:03:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080703.v1873q5u017935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313425 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:03:54 -0000 Author: adrian Date: Wed Feb 8 07:03:52 2017 New Revision: 313425 URL: https://svnweb.freebsd.org/changeset/base/313425 Log: [iwm] add version 17 firmware. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 8 07:03:24 2017 (r313424) +++ head/sys/conf/files Wed Feb 8 07:03:52 2017 (r313425) @@ -1897,7 +1897,7 @@ iwm3160fw.fwo optional iwm3160fw | iwm no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-3160-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-3160-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" @@ -1911,7 +1911,7 @@ iwm7260fw.fwo optional iwm7260fw | iwm no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7260-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7260-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" @@ -1925,7 +1925,7 @@ iwm7265fw.fwo optional iwm7265fw | iwm no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7265-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7265-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" @@ -1939,7 +1939,7 @@ iwm8000Cfw.fwo optional iwm8000Cfw | i no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-8000C-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" From owner-svn-src-all@freebsd.org Wed Feb 8 07:04:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D3D5CD37A2; Wed, 8 Feb 2017 07:04:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43510AEF; Wed, 8 Feb 2017 07:04:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18747a9017994; Wed, 8 Feb 2017 07:04:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18747g2017990; Wed, 8 Feb 2017 07:04:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080704.v18747g2017990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313426 - in head/sys/modules/iwmfw: iwm3160fw iwm7260fw iwm7265fw iwm8000Cfw 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:04:08 -0000 Author: adrian Date: Wed Feb 8 07:04:06 2017 New Revision: 313426 URL: https://svnweb.freebsd.org/changeset/base/313426 Log: [iwm] bump firmware to version 17. Modified: head/sys/modules/iwmfw/iwm3160fw/Makefile head/sys/modules/iwmfw/iwm7260fw/Makefile head/sys/modules/iwmfw/iwm7265fw/Makefile head/sys/modules/iwmfw/iwm8000Cfw/Makefile Modified: head/sys/modules/iwmfw/iwm3160fw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm3160fw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm3160fw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm3160fw -IMG= iwm-3160-16 +IMG= iwm-3160-17 .include Modified: head/sys/modules/iwmfw/iwm7260fw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm7260fw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm7260fw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm7260fw -IMG= iwm-7260-16 +IMG= iwm-7260-17 .include Modified: head/sys/modules/iwmfw/iwm7265fw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm7265fw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm7265fw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm7265fw -IMG= iwm-7265-16 +IMG= iwm-7265-17 .include Modified: head/sys/modules/iwmfw/iwm8000Cfw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:03:52 2017 (r313425) +++ head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:04:06 2017 (r313426) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm8000Cfw -IMG= iwm-8000C-16 +IMG= iwm-8000C-17 .include From owner-svn-src-all@freebsd.org Wed Feb 8 07:05:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAE02CD3864; Wed, 8 Feb 2017 07:05:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A93ACB8; Wed, 8 Feb 2017 07:05:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1875utI018106; Wed, 8 Feb 2017 07:05:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1875uYq018103; Wed, 8 Feb 2017 07:05:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080705.v1875uYq018103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313427 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:05:57 -0000 Author: adrian Date: Wed Feb 8 07:05:56 2017 New Revision: 313427 URL: https://svnweb.freebsd.org/changeset/base/313427 Log: [iwm] Recognize the IWM_UCODE_TLV_FW_MEM_SEG firmware section type. * Will be needed for loading version 22 of 7265D firmware. Obtained from: DragonflyBSD commit 1d244c8133cf15d00d46836bc48958188cf9f510 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:04:06 2017 (r313426) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:05:56 2017 (r313427) @@ -892,6 +892,9 @@ iwm_read_firmware(struct iwm_softc *sc, le32toh(((const uint32_t *)tlv_data)[2])); break; + case IWM_UCODE_TLV_FW_MEM_SEG: + break; + default: device_printf(sc->sc_dev, "%s: unknown firmware section %d, abort\n", Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 07:04:06 2017 (r313426) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 8 07:05:56 2017 (r313427) @@ -1006,6 +1006,7 @@ enum iwm_ucode_tlv_type { IWM_UCODE_TLV_FW_DBG_CONF = 39, IWM_UCODE_TLV_FW_DBG_TRIGGER = 40, IWM_UCODE_TLV_FW_GSCAN_CAPA = 50, + IWM_UCODE_TLV_FW_MEM_SEG = 51, }; struct iwm_ucode_tlv { From owner-svn-src-all@freebsd.org Wed Feb 8 07:07:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6179CD38E8; Wed, 8 Feb 2017 07:07:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 829E7E07; Wed, 8 Feb 2017 07:07:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1877NLr018196; Wed, 8 Feb 2017 07:07:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1877Nrq018194; Wed, 8 Feb 2017 07:07:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080707.v1877Nrq018194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313428 - in head/sys: conf modules/iwmfw/iwm8000Cfw 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:07:24 -0000 Author: adrian Date: Wed Feb 8 07:07:23 2017 New Revision: 313428 URL: https://svnweb.freebsd.org/changeset/base/313428 Log: [iwm] back this out to version 16 for now. Since I'm manually playing the dragonflybsd iwm/iwmfw commits forward, I'm .. well, this. This right here. Modified: head/sys/conf/files head/sys/modules/iwmfw/iwm8000Cfw/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 8 07:05:56 2017 (r313427) +++ head/sys/conf/files Wed Feb 8 07:07:23 2017 (r313428) @@ -1939,7 +1939,7 @@ iwm8000Cfw.fwo optional iwm8000Cfw | i no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-8000C-17.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" Modified: head/sys/modules/iwmfw/iwm8000Cfw/Makefile ============================================================================== --- head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:05:56 2017 (r313427) +++ head/sys/modules/iwmfw/iwm8000Cfw/Makefile Wed Feb 8 07:07:23 2017 (r313428) @@ -1,6 +1,6 @@ # $FreeBSD$ KMOD= iwm8000Cfw -IMG= iwm-8000C-17 +IMG= iwm-8000C-16 .include From owner-svn-src-all@freebsd.org Wed Feb 8 07:08:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0424CD3968; Wed, 8 Feb 2017 07:08:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0128F48; Wed, 8 Feb 2017 07:08:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1878D2L018266; Wed, 8 Feb 2017 07:08:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1878DdK018265; Wed, 8 Feb 2017 07:08:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080708.v1878DdK018265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313429 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:08:15 -0000 Author: adrian Date: Wed Feb 8 07:08:13 2017 New Revision: 313429 URL: https://svnweb.freebsd.org/changeset/base/313429 Log: [iwm] SCAN_ABORT_UMAC response doesn't use a wide id Obtained from: DragonflyBSD commit cef47a9cbb0a3ce5f18369fed9403d2764884bc2 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:07:23 2017 (r313428) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:08:13 2017 (r313429) @@ -5482,7 +5482,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_TIME_EVENT_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): - case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): + case IWM_SCAN_ABORT_UMAC: case IWM_SCAN_OFFLOAD_REQUEST_CMD: case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: From owner-svn-src-all@freebsd.org Wed Feb 8 07:09:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A012DCD3A14; Wed, 8 Feb 2017 07:09:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FD52117D; Wed, 8 Feb 2017 07:09:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1879AfV018463; Wed, 8 Feb 2017 07:09:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1879A8j018462; Wed, 8 Feb 2017 07:09:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702080709.v1879A8j018462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 8 Feb 2017 07:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313430 - head/sys/dev/iwm 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 07:09:11 -0000 Author: adrian Date: Wed Feb 8 07:09:10 2017 New Revision: 313430 URL: https://svnweb.freebsd.org/changeset/base/313430 Log: [iwm] Remove 1s delay after fw loading. Can't reproduce issues on AC8260. The 1s delay was added in the update to version 16 fw, where Family 8000 support was added. Obtained from: DragonflyBSD commit bb480ca679a7ea530bdca6e41082d5755e9751dc Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:08:13 2017 (r313429) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 8 07:09:10 2017 (r313430) @@ -2678,12 +2678,6 @@ iwm_load_firmware(struct iwm_softc *sc, } } - /* - * Give the firmware some time to initialize. - * Accessing it too early causes errors. - */ - msleep(&w, &sc->sc_mtx, 0, "iwmfwinit", hz); - return error; } From owner-svn-src-all@freebsd.org Wed Feb 8 08:35:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ECEDCD4415; Wed, 8 Feb 2017 08:35:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E240D1BDB; Wed, 8 Feb 2017 08:35:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v188Z0hn055135; Wed, 8 Feb 2017 08:35:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v188Z0ed055131; Wed, 8 Feb 2017 08:35:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080835.v188Z0ed055131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 08:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313431 - stable/11/lib/libwrap X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 08:35:01 -0000 Author: ngie Date: Wed Feb 8 08:34:59 2017 New Revision: 313431 URL: https://svnweb.freebsd.org/changeset/base/313431 Log: MFC r312392: Use SRCTOP instead of .CURDIR-relative path in .PATH directive Modified: stable/11/lib/libwrap/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libwrap/Makefile ============================================================================== --- stable/11/lib/libwrap/Makefile Wed Feb 8 07:09:10 2017 (r313430) +++ stable/11/lib/libwrap/Makefile Wed Feb 8 08:34:59 2017 (r313431) @@ -15,7 +15,7 @@ MLINKS= hosts_access.3 hosts_ctl.3 \ hosts_access.3 request_set.3 \ hosts_options.5 hosts.allow.5 -.PATH: ${.CURDIR}/../../contrib/tcp_wrappers +.PATH: ${SRCTOP}/contrib/tcp_wrappers CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCESS -DNETGROUP -DDAEMON_UMASK=022 \ -DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" -DPROCESS_OPTIONS \ From owner-svn-src-all@freebsd.org Wed Feb 8 08:35:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B86CD444E; Wed, 8 Feb 2017 08:35:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E95A1C0A; Wed, 8 Feb 2017 08:35:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v188Z522055184; Wed, 8 Feb 2017 08:35:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v188Z5M2055183; Wed, 8 Feb 2017 08:35:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080835.v188Z5M2055183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 08:35: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: r313432 - stable/10/lib/libwrap 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 08:35:06 -0000 Author: ngie Date: Wed Feb 8 08:35:05 2017 New Revision: 313432 URL: https://svnweb.freebsd.org/changeset/base/313432 Log: MFC r312392: Use SRCTOP instead of .CURDIR-relative path in .PATH directive Modified: stable/10/lib/libwrap/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libwrap/Makefile ============================================================================== --- stable/10/lib/libwrap/Makefile Wed Feb 8 08:34:59 2017 (r313431) +++ stable/10/lib/libwrap/Makefile Wed Feb 8 08:35:05 2017 (r313432) @@ -14,7 +14,7 @@ MLINKS= hosts_access.3 hosts_ctl.3 \ hosts_access.3 request_set.3 \ hosts_options.5 hosts.allow.5 -.PATH: ${.CURDIR}/../../contrib/tcp_wrappers +.PATH: ${SRCTOP}/contrib/tcp_wrappers CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCESS -DNETGROUP -DDAEMON_UMASK=022 \ -DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" -DPROCESS_OPTIONS \ From owner-svn-src-all@freebsd.org Wed Feb 8 08:37:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A744CD4607; Wed, 8 Feb 2017 08:37:45 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F8281F3B; Wed, 8 Feb 2017 08:37:44 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v188bi4v055374; Wed, 8 Feb 2017 08:37:44 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v188bir1055373; Wed, 8 Feb 2017 08:37:44 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702080837.v188bir1055373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 8 Feb 2017 08:37: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: r313433 - stable/10/usr.sbin/bsdinstall/partedit 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 08:37:45 -0000 Author: rpokala Date: Wed Feb 8 08:37:43 2017 New Revision: 313433 URL: https://svnweb.freebsd.org/changeset/base/313433 Log: MFC r304142: ensure stripe size is non-zero multiple of 4096 Ensure that the sector size is a multiple of 4096 to avoid creating unaligned partitions when the actual sector size is hidden from us. NOTE: This change was MFCed to stable/11 months ago as as r304448; I'm just MFCing it back one more stream. Modified: stable/10/usr.sbin/bsdinstall/partedit/gpart_ops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- stable/10/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed Feb 8 08:35:05 2017 (r313432) +++ stable/10/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed Feb 8 08:37:43 2017 (r313433) @@ -795,6 +795,7 @@ gpart_max_free(struct ggeom *geom, intma { struct gconfig *gc; struct gprovider *pp, **providers; + intmax_t sectorsize, stripesize, offset; intmax_t lastend; intmax_t start, end; intmax_t maxsize, maxstart; @@ -845,12 +846,25 @@ gpart_max_free(struct ggeom *geom, intma pp = LIST_FIRST(&geom->lg_consumer)->lg_provider; - /* Compute beginning of new partition and maximum available space */ - if (pp->lg_stripesize > 0 && - (maxstart*pp->lg_sectorsize % pp->lg_stripesize) != 0) { - intmax_t offset = (pp->lg_stripesize - - ((maxstart*pp->lg_sectorsize) % pp->lg_stripesize)) / - pp->lg_sectorsize; + /* + * Round the start and size of the largest available space up to + * the nearest multiple of the adjusted stripe size. + * + * The adjusted stripe size is the least common multiple of the + * actual stripe size, or the sector size if no stripe size was + * reported, and 4096. The reason for this is that contemporary + * disks often have 4096-byte physical sectors but report 512 + * bytes instead for compatibility with older / broken operating + * systems and BIOSes. For the same reasons, virtualized storage + * may also report a 512-byte stripe size, or none at all. + */ + sectorsize = pp->lg_sectorsize; + if ((stripesize = pp->lg_stripesize) == 0) + stripesize = sectorsize; + while (stripesize % 4096 != 0) + stripesize *= 2; + if ((offset = maxstart * sectorsize % stripesize) != 0) { + offset = (stripesize - offset) / sectorsize; maxstart += offset; maxsize -= offset; } From owner-svn-src-all@freebsd.org Wed Feb 8 08:43:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E60CD4928; Wed, 8 Feb 2017 08:43:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D817689; Wed, 8 Feb 2017 08:43:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-246-6.lns20.per4.internode.on.net [121.45.246.6]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v188gseq012371 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 8 Feb 2017 00:42:57 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r313272 - in head/sys: kern sys To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702050520.v155KTW8080845@repo.freebsd.org> <20170205120536.GA16310@dft-labs.eu> From: Julian Elischer Message-ID: Date: Wed, 8 Feb 2017 16:42:48 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170205120536.GA16310@dft-labs.eu> 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 08:43:00 -0000 On 5/2/17 8:05 pm, Mateusz Guzik wrote: > On Sun, Feb 05, 2017 at 05:20:29AM +0000, Mateusz Guzik wrote: >> Author: mjg >> Date: Sun Feb 5 05:20:29 2017 >> New Revision: 313272 >> URL: https://svnweb.freebsd.org/changeset/base/313272 >> >> Log: >> sx: uninline slock/sunlock >> >> Shared locking routines explicitly read the value and test it. If the >> change attempt fails, they fall back to a regular function which would >> retry in a loop. >> >> The problem is that with many concurrent readers the risk of failure is pretty >> high and even the value returned by fcmpset is very likely going to be stale >> by the time the loop in the fallback routine is reached. >> >> Uninline said primitives. It gives a throughput increase when doing concurrent >> slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s. >> >> Interestingly, rwlock primitives are already not inlined. >> > Note that calling to "hard" primitives each is somewhat expensive. > In order to remedy part of the cost I intend to introduce uninlined > variants which only know how to spin. I have a WIP patch for rwlocks and > after I flesh it out I'll adapt it for sx. > please remember to report back with some ministat plots when you are done so we can see the results.. Thanks for doing the work. >> Modified: >> head/sys/kern/kern_sx.c >> head/sys/sys/sx.h >> >> Modified: head/sys/kern/kern_sx.c >> ============================================================================== >> --- head/sys/kern/kern_sx.c Sun Feb 5 04:54:20 2017 (r313271) >> +++ head/sys/kern/kern_sx.c Sun Feb 5 05:20:29 2017 (r313272) >> @@ -276,29 +276,6 @@ sx_destroy(struct sx *sx) >> } >> >> int >> -_sx_slock(struct sx *sx, int opts, const char *file, int line) >> -{ >> - int error = 0; >> - >> - if (SCHEDULER_STOPPED()) >> - return (0); >> - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), >> - ("sx_slock() by idle thread %p on sx %s @ %s:%d", >> - curthread, sx->lock_object.lo_name, file, line)); >> - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, >> - ("sx_slock() of destroyed sx @ %s:%d", file, line)); >> - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); >> - error = __sx_slock(sx, opts, file, line); >> - if (!error) { >> - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); >> - WITNESS_LOCK(&sx->lock_object, 0, file, line); >> - TD_LOCKS_INC(curthread); >> - } >> - >> - return (error); >> -} >> - >> -int >> sx_try_slock_(struct sx *sx, const char *file, int line) >> { >> uintptr_t x; >> @@ -391,21 +368,6 @@ sx_try_xlock_(struct sx *sx, const char >> } >> >> void >> -_sx_sunlock(struct sx *sx, const char *file, int line) >> -{ >> - >> - if (SCHEDULER_STOPPED()) >> - return; >> - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, >> - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); >> - _sx_assert(sx, SA_SLOCKED, file, line); >> - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); >> - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); >> - __sx_sunlock(sx, file, line); >> - TD_LOCKS_DEC(curthread); >> -} >> - >> -void >> _sx_xunlock(struct sx *sx, const char *file, int line) >> { >> >> @@ -840,14 +802,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ >> kick_proc0(); >> } >> >> -/* >> - * This function represents the so-called 'hard case' for sx_slock >> - * operation. All 'easy case' failures are redirected to this. Note >> - * that ideally this would be a static function, but it needs to be >> - * accessible from at least sx.h. >> - */ >> int >> -_sx_slock_hard(struct sx *sx, int opts, const char *file, int line) >> +_sx_slock(struct sx *sx, int opts, const char *file, int line) >> { >> GIANT_DECLARE; >> #ifdef ADAPTIVE_SX >> @@ -1051,14 +1007,8 @@ _sx_slock_hard(struct sx *sx, int opts, >> return (error); >> } >> >> -/* >> - * This function represents the so-called 'hard case' for sx_sunlock >> - * operation. All 'easy case' failures are redirected to this. Note >> - * that ideally this would be a static function, but it needs to be >> - * accessible from at least sx.h. >> - */ >> void >> -_sx_sunlock_hard(struct sx *sx, const char *file, int line) >> +_sx_sunlock(struct sx *sx, const char *file, int line) >> { >> uintptr_t x; >> int wakeup_swapper; >> @@ -1066,6 +1016,7 @@ _sx_sunlock_hard(struct sx *sx, const ch >> if (SCHEDULER_STOPPED()) >> return; >> >> + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); >> x = SX_READ_VALUE(sx); >> for (;;) { >> /* >> >> Modified: head/sys/sys/sx.h >> ============================================================================== >> --- head/sys/sys/sx.h Sun Feb 5 04:54:20 2017 (r313271) >> +++ head/sys/sys/sx.h Sun Feb 5 05:20:29 2017 (r313272) >> @@ -111,10 +111,8 @@ void _sx_sunlock(struct sx *sx, const ch >> void _sx_xunlock(struct sx *sx, const char *file, int line); >> int _sx_xlock_hard(struct sx *sx, uintptr_t v, uintptr_t tid, int opts, >> const char *file, int line); >> -int _sx_slock_hard(struct sx *sx, int opts, const char *file, int line); >> void _sx_xunlock_hard(struct sx *sx, uintptr_t tid, const char *file, int >> line); >> -void _sx_sunlock_hard(struct sx *sx, const char *file, int line); >> #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) >> void _sx_assert(const struct sx *sx, int what, const char *file, int line); >> #endif >> @@ -179,41 +177,6 @@ __sx_xunlock(struct sx *sx, struct threa >> _sx_xunlock_hard(sx, tid, file, line); >> } >> >> -/* Acquire a shared lock. */ >> -static __inline int >> -__sx_slock(struct sx *sx, int opts, const char *file, int line) >> -{ >> - uintptr_t x = sx->sx_lock; >> - int error = 0; >> - >> - if (!(x & SX_LOCK_SHARED) || >> - !atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) >> - error = _sx_slock_hard(sx, opts, file, line); >> - else >> - LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, >> - 0, 0, file, line, LOCKSTAT_READER); >> - >> - return (error); >> -} >> - >> -/* >> - * Release a shared lock. We can just drop a single shared lock so >> - * long as we aren't trying to drop the last shared lock when other >> - * threads are waiting for an exclusive lock. This takes advantage of >> - * the fact that an unlocked lock is encoded as a shared lock with a >> - * count of 0. >> - */ >> -static __inline void >> -__sx_sunlock(struct sx *sx, const char *file, int line) >> -{ >> - uintptr_t x = sx->sx_lock; >> - >> - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); >> - if (x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS) || >> - !atomic_cmpset_rel_ptr(&sx->sx_lock, x, x - SX_ONE_SHARER)) >> - _sx_sunlock_hard(sx, file, line); >> -} >> - >> /* >> * Public interface for lock operations. >> */ >> @@ -227,12 +190,6 @@ __sx_sunlock(struct sx *sx, const char * >> _sx_xlock((sx), SX_INTERRUPTIBLE, (file), (line)) >> #define sx_xunlock_(sx, file, line) \ >> _sx_xunlock((sx), (file), (line)) >> -#define sx_slock_(sx, file, line) \ >> - (void)_sx_slock((sx), 0, (file), (line)) >> -#define sx_slock_sig_(sx, file, line) \ >> - _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) >> -#define sx_sunlock_(sx, file, line) \ >> - _sx_sunlock((sx), (file), (line)) >> #else >> #define sx_xlock_(sx, file, line) \ >> (void)__sx_xlock((sx), curthread, 0, (file), (line)) >> @@ -240,13 +197,13 @@ __sx_sunlock(struct sx *sx, const char * >> __sx_xlock((sx), curthread, SX_INTERRUPTIBLE, (file), (line)) >> #define sx_xunlock_(sx, file, line) \ >> __sx_xunlock((sx), curthread, (file), (line)) >> +#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ >> #define sx_slock_(sx, file, line) \ >> - (void)__sx_slock((sx), 0, (file), (line)) >> + (void)_sx_slock((sx), 0, (file), (line)) >> #define sx_slock_sig_(sx, file, line) \ >> - __sx_slock((sx), SX_INTERRUPTIBLE, (file), (line)) >> + _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) >> #define sx_sunlock_(sx, file, line) \ >> - __sx_sunlock((sx), (file), (line)) >> -#endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ >> + _sx_sunlock((sx), (file), (line)) >> #define sx_try_slock(sx) sx_try_slock_((sx), LOCK_FILE, LOCK_LINE) >> #define sx_try_xlock(sx) sx_try_xlock_((sx), LOCK_FILE, LOCK_LINE) >> #define sx_try_upgrade(sx) sx_try_upgrade_((sx), LOCK_FILE, LOCK_LINE) >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Wed Feb 8 08:52:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 345B0CD4D07; Wed, 8 Feb 2017 08:52:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3D90BCA; Wed, 8 Feb 2017 08:52:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id e4so11220425pfg.0; Wed, 08 Feb 2017 00:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Ts+wqcP2wZ1lVljUN8XkLE7whCOAnM9+C00bsShD7Hs=; b=MAfU7lKooTbXzuQbZGDNSqjvxzHCqrs2oj5Xv4Ym61ZdxDp247ivJNHstzl2WLxa3C EdidEmAPNiUe/s4Z5Vp7Xjyvm8LcbTdwLzwcn1XxHVuSzaItK73pPEtaUI3R7rYHBy7/ /5RvjB8F1QBYDHn7jmwao44VAL5U0pVbsWb+DLM/EnLRP77uNVsh1n9x2WvU9T6tvtcQ 6S+CJvR1UPaqCUkb+tMuErUyOFQITLK0gTSZGNvR1dNugIu9uJXE+1HNPRHGSKS7VViR +F3ZPxZpY9jldY6vB6Yu5elxY5Yy1qD4w+Te5KdsDP7kE6OkPbMZM2A99rYDg/NCCxj3 hu7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Ts+wqcP2wZ1lVljUN8XkLE7whCOAnM9+C00bsShD7Hs=; b=CfzywIU1VoK5jVkNk8uprXQTWIH6W9XB9JCZTvLxd7VuF7iHVATZk/YnjuHcz3A6GL 5l/TnrjOBCBl0zgbpNZuBfk/6zl+xfIEHTeoSc3g416qV5MBhiaxcKLYHqaGe6edOA+Q wkbwe36Sj8qOlw/9DfjLVN81lwbipKQ9gCvseO+XKyYnWN67L7jyav65DSmv7sG7Rdq3 8ox+cYOOU+rWheUXCAw/s7+CJ4auAaLHCNh6Adzn7mFFfqN54MOSgOiRo+qWI1uKPBfu musAKvq8DitmxRnTYEuAca0FVBEm56AuPUL7/Hzxb43M1eFIR8T8rQUMVGCaPyvUfF8e oNvQ== X-Gm-Message-State: AIkVDXLhb6rJCpIimy1NIv0hflbma2cSQjwo2p2XywSoSkTcKF6BLr84TgDuDCvfGbCJhA== X-Received: by 10.98.16.14 with SMTP id y14mr24803277pfi.63.1486543943305; Wed, 08 Feb 2017 00:52:23 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id m21sm18089339pgh.4.2017.02.08.00.52.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 00:52:22 -0800 (PST) Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701281630.v0SGUEfW063907@repo.freebsd.org> Date: Wed, 8 Feb 2017 00:52:20 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> References: <201701281630.v0SGUEfW063907@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 08:52:24 -0000 --Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 28, 2017, at 08:30, Baptiste Daroussin = wrote: >=20 > Author: bapt > Date: Sat Jan 28 16:30:14 2017 > New Revision: 312926 > URL: https://svnweb.freebsd.org/changeset/base/312926 >=20 > Log: > Revert r312923 a better approach will be taken later >=20 > Modified: > head/bin/ed/Makefile > head/contrib/dma/mail.c > head/share/mk/bsd.doc.mk > head/sys/amd64/amd64/db_trace.c > head/sys/amd64/cloudabi64/cloudabi64_sysvec.c > head/sys/cam/ctl/ctl_ioctl.h > head/sys/cddl/dev/fbt/x86/fbt_isa.c > head/sys/compat/cloudabi/cloudabi_fd.c > head/sys/compat/cloudabi64/cloudabi64_poll.c > head/sys/compat/linuxkpi/common/include/linux/slab.h > head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c > head/sys/contrib/dev/acpica/include/acpixf.h > head/sys/ddb/ddb.h > head/sys/dev/drm2/drm_agpsupport.c > head/sys/dev/drm2/drm_bufs.c > head/sys/dev/drm2/drm_dma.c > head/sys/dev/drm2/drm_drv.c > head/sys/dev/drm2/drm_os_freebsd.c > head/sys/dev/drm2/drm_os_freebsd.h > head/sys/dev/drm2/drm_stub.c > head/sys/fs/nfsserver/nfs_nfsdstate.c > head/sys/kern/kern_descrip.c > head/sys/kern/kern_shutdown.c > head/sys/modules/drm2/drm2/Makefile > head/tools/build/Makefile > head/tools/tools/locale/etc/unicode.conf > head/usr.bin/getconf/confstr.gperf > head/usr.bin/getconf/getconf.c > head/usr.bin/getconf/limits.gperf > head/usr.bin/getconf/pathconf.gperf > head/usr.bin/getconf/progenv.gperf > head/usr.bin/getconf/sysconf.gperf > head/usr.sbin/nscd/nscd.c > head/usr.sbin/nscd/nscdcli.c I noticed that this revision and the next one are a point of = issue when running =E2=80=9Csvn merge --reintegrate ". Was "svn merge -c = -=E2=80=9C used? Thanks, -Ngie --Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908 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 iQIcBAEBCgAGBQJYmtxFAAoJEPWDqSZpMIYV+14QAM/YM4XkDD5Nkh2Ch5tBGJ4W /xWa9rc9RzgWxji9axHpQJld4C0tjCuRGGm+EQXbAyb30Oo8jcEd9sBhym0RPOla qXrK50ydDXSl5V3CZ7CyD7T6bAsp5ItrV4+1dgxZh9LiJObjmIcXW1izlNmxCLBc sVcsD12OzbvpyN5Hp1Xoibjhl/cJrcCj1+Om0iZvo0e/SO41GCS8X1lIMc2xSEMD 9FodAzGeJrNof1KCOTEmYBLrAdFC+liySHlt8XI6GRpapGy6hG9FBlf8ul4EowSR To/Sg2no7/EC2noPS+PE8mUoEaCgAbbG/qNowfvCim+3Vyu97G80HXYSSVPIvXif eZAOVFFV/yy7IZg4OI0P79EMGZ5S0KL0eKUIF8r0anu7eIr/+lRQ8ubyPHd940ZW UQwLG/ygYoaBPWz8fdPK9VM7kfgHWg+MKJdzpAEbQY1Pg+Gd4JgpjxnCDCGGy6bL Qwuh5u6p/HGszd1bkB0819uPzkPIExPwNHuiYijhsFiqPDsTiSgqAFLSygUSPTe8 y7KCQVl8BZXalQgi00rATk8tj2+xiFReFnhnGI7+iAetaLMHEBGufskLRCBAZboQ A/x2t+phKH6ugEXicbdtpBT7LbE8Yvaolrgz96K7y+gal6EwH9KRw9a7uBLTfAJL sAs7IsTHyYygm/fn+igX =g8YI -----END PGP SIGNATURE----- --Apple-Mail=_657136FC-AF6C-49AF-8BA4-CAD685E0C908-- From owner-svn-src-all@freebsd.org Wed Feb 8 09:19:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70976CD548F; Wed, 8 Feb 2017 09:19:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 405C21A36; Wed, 8 Feb 2017 09:19:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189JnWm072295; Wed, 8 Feb 2017 09:19:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189Jnkd072294; Wed, 8 Feb 2017 09:19:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080919.v189Jnkd072294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313436 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:19:50 -0000 Author: ngie Date: Wed Feb 8 09:19:49 2017 New Revision: 313436 URL: https://svnweb.freebsd.org/changeset/base/313436 Log: Clarify #includes for hexdump(3) vs sbuf_hexdump(9) hexdump(3) only requires libutil.h, whereas sbuf_hexdump(9) requires sys/types.h (for ssize_t) and sys/sbuf.h MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/hexdump.3 Modified: head/lib/libutil/hexdump.3 ============================================================================== --- head/lib/libutil/hexdump.3 Wed Feb 8 09:03:31 2017 (r313435) +++ head/lib/libutil/hexdump.3 Wed Feb 8 09:19:49 2017 (r313436) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2014 +.Dd February 8, 2017 .Dt HEXDUMP 3 .Os .Sh NAME @@ -36,9 +36,10 @@ .Nd "dump a block of bytes to standard out in hexadecimal form" .Sh SYNOPSIS .In libutil.h -.In sys/sbuf.h .Ft void .Fn hexdump "void *ptr" "int length" "const char *hdr" "int flags" +.In sys/types.h +.In sys/sbuf.h .Ft void .Fo sbuf_hexdump .Fa "struct sbuf *sb" From owner-svn-src-all@freebsd.org Wed Feb 8 09:22:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A1B4CD56FD; Wed, 8 Feb 2017 09:22:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 174721E7A; Wed, 8 Feb 2017 09:22:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189Malq075952; Wed, 8 Feb 2017 09:22:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189MaUf075951; Wed, 8 Feb 2017 09:22:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080922.v189MaUf075951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313437 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:22:37 -0000 Author: ngie Date: Wed Feb 8 09:22:35 2017 New Revision: 313437 URL: https://svnweb.freebsd.org/changeset/base/313437 Log: Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes sbuf_hexdump(9)'s behavior MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Feb 8 09:19:49 2017 (r313436) +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 (r313437) @@ -35,6 +35,7 @@ MAN+= expand_number.3 flopen.3 fparseln. property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 +MLINKS+=hexdump.3 sbuf_hexdump.9 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ From owner-svn-src-all@freebsd.org Wed Feb 8 09:24:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDAE5CD579D; Wed, 8 Feb 2017 09:24:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951BC1FE1; Wed, 8 Feb 2017 09:24:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189OPDx076064; Wed, 8 Feb 2017 09:24:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189OP8K076063; Wed, 8 Feb 2017 09:24:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080924.v189OP8K076063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313438 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:24:27 -0000 Author: ngie Date: Wed Feb 8 09:24:25 2017 New Revision: 313438 URL: https://svnweb.freebsd.org/changeset/base/313438 Log: Clean up trailing and leading whitespace for variables to make it consistent with the rest of the file and style.Makefile(9) a bit more MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 (r313437) +++ head/lib/libutil/Makefile Wed Feb 8 09:24:25 2017 (r313438) @@ -36,7 +36,7 @@ MAN+= expand_number.3 flopen.3 fparseln. _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 MLINKS+=hexdump.3 sbuf_hexdump.9 -MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 +MLINKS+=kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ login_cap.3 login_getcaplist.3 login_cap.3 login_getcapnum.3 \ @@ -58,9 +58,9 @@ MLINKS+=pidfile.3 pidfile_close.3 \ pidfile.3 pidfile_open.3 \ pidfile.3 pidfile_remove.3 \ pidfile.3 pidfile_write.3 -MLINKS+= property.3 property_find.3 property.3 properties_free.3 -MLINKS+= property.3 properties_read.3 -MLINKS+= pty.3 forkpty.3 pty.3 openpty.3 +MLINKS+=property.3 property_find.3 property.3 properties_free.3 +MLINKS+=property.3 properties_read.3 +MLINKS+=pty.3 forkpty.3 pty.3 openpty.3 MLINKS+=quotafile.3 quota_close.3 \ quotafile.3 quota_fsname.3 \ quotafile.3 quota_open.3 \ @@ -70,7 +70,7 @@ MLINKS+=quotafile.3 quota_close.3 \ quotafile.3 quota_write_limits.3 \ quotafile.3 quota_write_usage.3 MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \ - uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3 + uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3 MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_dup.3 \ pw_util.3 pw_edit.3 \ From owner-svn-src-all@freebsd.org Wed Feb 8 09:28:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5D66CD5889; Wed, 8 Feb 2017 09:28:13 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EED229B; Wed, 8 Feb 2017 09:28:13 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-246-6.lns20.per4.internode.on.net [121.45.246.6]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v189S7i0012630 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 8 Feb 2017 01:28:11 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r313350 - head/sys/kern To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702062036.v16Kaxbc061348@repo.freebsd.org> From: Julian Elischer Message-ID: Date: Wed, 8 Feb 2017 17:28:02 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702062036.v16Kaxbc061348@repo.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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:28:14 -0000 On 7/2/17 4:36 am, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Feb 6 20:36:59 2017 > New Revision: 313350 > URL: https://svnweb.freebsd.org/changeset/base/313350 > > Log: > In r290196 the root mount hold mechanism was changed to make it not wait > for mount hold release if the root device already exists. So, unless your > rootdev is not on USB - ie in the usual case - the root mount won't wait > for USB. However, the old behaviour was sometimes used as "wait until USB > is fully enumerated", and r290196 broke that. > > This commit adds vfs.root_mount_always_wait tunable, to force the kernel > to always wait for root mount holds, even if the root is already there. can we not add some more specific way to wait for enumeration? like a sysctl that counts number of enumerations completed? > > Reviewed by: kib > MFC after: 2 weeks > Relnotes: yes > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D9387 > > Modified: > head/sys/kern/vfs_mountroot.c > > Modified: head/sys/kern/vfs_mountroot.c > ============================================================================== > --- head/sys/kern/vfs_mountroot.c Mon Feb 6 18:44:15 2017 (r313349) > +++ head/sys/kern/vfs_mountroot.c Mon Feb 6 20:36:59 2017 (r313350) > @@ -132,6 +132,11 @@ static int root_mount_complete; > static int root_mount_timeout = 3; > TUNABLE_INT("vfs.mountroot.timeout", &root_mount_timeout); > > +static int root_mount_always_wait = 0; > +SYSCTL_INT(_vfs, OID_AUTO, root_mount_always_wait, CTLFLAG_RDTUN, > + &root_mount_always_wait, 0, > + "Wait for root mount holds even if the root device already exists"); > + > SYSCTL_PROC(_vfs, OID_AUTO, root_mount_hold, > CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, > NULL, 0, sysctl_vfs_root_mount_hold, "A", > @@ -961,10 +966,11 @@ vfs_mountroot_wait_if_neccessary(const c > > /* > * In case of ZFS and NFS we don't have a way to wait for > - * specific device. > + * specific device. Also do the wait if the user forced that > + * behaviour by setting vfs.root_mount_always_wait=1. > */ > if (strcmp(fs, "zfs") == 0 || strstr(fs, "nfs") != NULL || > - dev[0] == '\0') { > + dev[0] == '\0' || root_mount_always_wait != 0) { > vfs_mountroot_wait(); > return (0); > } > > From owner-svn-src-all@freebsd.org Wed Feb 8 09:38:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C97CBCD5A6F; Wed, 8 Feb 2017 09:38:57 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78B4F9C0; Wed, 8 Feb 2017 09:38:57 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mail-qk0-x234.google.com with SMTP id u25so115803185qki.2; Wed, 08 Feb 2017 01:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x1OhgdLxPjAkzwMpTu624ks8um0LZnB8OXfvVg3DjeY=; b=j3hVqd2rMD8jzBSpj+fmX+tbYAq+LAGBbqJsD5+EVnsDO7OlU/S+cecQvmAboyeGSe e8x4Mx+iiYSj0MJUj6BDsFcGFwIMmX1d1plbkMFqJP0UWWXLtHoS5FPwGzf0r43l1fEf WzwgD5nAuHSriqu3bjRkiYjV9TZoVbj28pVfaoA492FjAMgqVuJTLreVKGVM8NjQywFE v7RCIge3x7y73kV7M7/o+z7OBK1W5Ya1VIt0HleQvFzdWhnX0cgX5RVcYt2nWNhIj2Ku i6YTSmPr0N1EKXXxW6m6MDXtXYI7xjE2qrQ8WvWqqXabqrY/EgWxy2Mgq9hKrfR3EurG 5rIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x1OhgdLxPjAkzwMpTu624ks8um0LZnB8OXfvVg3DjeY=; b=RniaHjYOhcCdeoJLqiZPhkHbXQBiM3//CE50TT4FGCNG6XPigJ3Ah994rrbdxRrgCd a9mRrLUrOKiJC8oQRvLr5TecpW/G7hcj5Y359AjZe/RxGLaVLhKn8goZ974nUdOgMYZX xluLdHXYfrshmWQa+fwO3ef8/lFMWewV1LJfcwTQm5TqmjUHQQM1dbrfsFVXOb0OYs4j LX+F2bFeZAZz50I9dIdnbEa3KxY7AHuvpTBvkG7QqidJolxQuIKEijS9vJSYz0mRCACa qz8uo3cW8dN15eB7RXfNfDxeJPNPfLOYmslyLIZxEta34dL/DaGYg41sk1GoMhamb75d M1JQ== X-Gm-Message-State: AMke39kWbRyGZkS+4m6kn0MQ3lXM3Z1dxQ3maHQwQQ5Ia6vs6ET5b81dOx78CYyt5iCh8FFQVfQHR1V1eKka5g== X-Received: by 10.55.150.7 with SMTP id y7mr19269597qkd.232.1486546736648; Wed, 08 Feb 2017 01:38:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.150.188 with HTTP; Wed, 8 Feb 2017 01:38:56 -0800 (PST) In-Reply-To: <201702080922.v189MaUf075951@repo.freebsd.org> References: <201702080922.v189MaUf075951@repo.freebsd.org> From: Sergey Kandaurov Date: Wed, 8 Feb 2017 12:38:56 +0300 Message-ID: Subject: Re: svn commit: r313437 - head/lib/libutil To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:38:57 -0000 On 8 February 2017 at 12:22, Ngie Cooper wrote: > Author: ngie > Date: Wed Feb 8 09:22:35 2017 > New Revision: 313437 > URL: https://svnweb.freebsd.org/changeset/base/313437 > > Log: > Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes > sbuf_hexdump(9)'s behavior > > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/lib/libutil/Makefile > > Modified: head/lib/libutil/Makefile > ============================================================ > ================== > --- head/lib/libutil/Makefile Wed Feb 8 09:19:49 2017 (r313436) > +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 (r313437) > @@ -35,6 +35,7 @@ MAN+= expand_number.3 flopen.3 fparseln. > property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ > _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 > MAN+= login.conf.5 > +MLINKS+=hexdump.3 sbuf_hexdump.9 > This looks odd imho also that sbuf_hexdump(3) is part of libsbuf. Note also hexdump(3) taht's essential copy of hexdump(9). If go this duplicating route why not copy sbuf_hexdump description as well. I like more how that's done with sbuf(9) that's the only man page, ymmv. -- wbr, pluknet From owner-svn-src-all@freebsd.org Wed Feb 8 09:46:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE6B0CD5D7C; Wed, 8 Feb 2017 09:46:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72862E6F; Wed, 8 Feb 2017 09:46:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v189kFXh084497; Wed, 8 Feb 2017 09:46:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v189kFVT084495; Wed, 8 Feb 2017 09:46:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702080946.v189kFVT084495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 8 Feb 2017 09:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313439 - in head: contrib/netbsd-tests/dev/audio contrib/netbsd-tests/dev/cgd contrib/netbsd-tests/dev/clock_subr contrib/netbsd-tests/dev/scsipi contrib/netbsd-tests/dev/sysmon contri... 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:46:16 -0000 Author: ngie Date: Wed Feb 8 09:46:15 2017 New Revision: 313439 URL: https://svnweb.freebsd.org/changeset/base/313439 Log: Merge content from ^/projects/netbsd-tests-upstream-01-2017 into ^/head The primary end-goal of this drop is ease future merges with NetBSD and collaborate further with the NetBSD project. The goal was (largely, not completely as some items are still oustanding in the NetBSD GNATS system) achieved by doing the following: - Pushing as many changes required to port contrib/netbsd-tests back to NetBSD as possible, then pull the upstream applied changes back in to FreeBSD. - Diff reduce with upstream where possible by: -- Improving libnetbsd header, etc compat glue. -- Using _SED variables to modify test scripts on the fly for items that could not be upstreamed to NetBSD. As a bonus for this work, this change also introduces testcases for uniq(1). Many thanks to Christos for working with me to get many of the changes back into the NetBSD project. In collaboration with: Christos Zoulas MFC after: 1 month Sponsored by: Dell EMC Isilon Added: head/contrib/netbsd-tests/dev/clock_subr/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/dev/clock_subr/ head/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c head/contrib/netbsd-tests/fs/vfs/t_rwtoro.c - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/fs/vfs/t_rwtoro.c head/contrib/netbsd-tests/kernel/arch/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/kernel/arch/ head/contrib/netbsd-tests/lib/libc/gen/exect/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/gen/exect/ head/contrib/netbsd-tests/lib/libc/hash/t_hmac.c - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/hash/t_hmac.c head/contrib/netbsd-tests/lib/libpthread_dbg/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libpthread_dbg/ head/contrib/netbsd-tests/lib/librefuse/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/librefuse/ head/contrib/netbsd-tests/net/carp/t_basic.sh - copied unchanged from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/net/carp/t_basic.sh head/contrib/netbsd-tests/net/if_tun/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/net/if_tun/ head/contrib/netbsd-tests/net/if_vlan/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/net/if_vlan/ head/contrib/netbsd-tests/sys/uvm/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/sys/uvm/ head/contrib/netbsd-tests/usr.bin/mixerctl/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/usr.bin/mixerctl/ head/contrib/netbsd-tests/usr.bin/uniq/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/usr.bin/uniq/ head/usr.bin/uniq/tests/ - copied from r313435, projects/netbsd-tests-upstream-01-2017/usr.bin/uniq/tests/ Deleted: head/contrib/netbsd-tests/net/carp/t_basic.c Modified: head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue head/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c head/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c head/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c head/contrib/netbsd-tests/dev/scsipi/t_cd.c head/contrib/netbsd-tests/dev/sysmon/t_swwdog.c head/contrib/netbsd-tests/fs/common/h_fsmacros.h head/contrib/netbsd-tests/fs/ffs/h_quota2_tests.c head/contrib/netbsd-tests/fs/ffs/t_fifos.c head/contrib/netbsd-tests/fs/ffs/t_mount.c head/contrib/netbsd-tests/fs/ffs/t_quota2_1.c head/contrib/netbsd-tests/fs/ffs/t_quota2_remount.c head/contrib/netbsd-tests/fs/ffs/t_snapshot.c head/contrib/netbsd-tests/fs/ffs/t_snapshot_log.c head/contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c head/contrib/netbsd-tests/fs/hfs/t_pathconvert.c head/contrib/netbsd-tests/fs/kernfs/t_basic.c head/contrib/netbsd-tests/fs/lfs/t_pr.c head/contrib/netbsd-tests/fs/msdosfs/t_snapshot.c head/contrib/netbsd-tests/fs/nfs/t_mountd.c head/contrib/netbsd-tests/fs/nullfs/t_basic.c head/contrib/netbsd-tests/fs/ptyfs/t_nullpts.c head/contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c head/contrib/netbsd-tests/fs/puffs/t_basic.c head/contrib/netbsd-tests/fs/puffs/t_fuzz.c head/contrib/netbsd-tests/fs/puffs/t_io.c head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh head/contrib/netbsd-tests/fs/tmpfs/t_renamerace.c head/contrib/netbsd-tests/fs/umapfs/t_basic.c head/contrib/netbsd-tests/fs/union/t_pr.c head/contrib/netbsd-tests/fs/vfs/t_full.c head/contrib/netbsd-tests/fs/vfs/t_io.c head/contrib/netbsd-tests/fs/vfs/t_renamerace.c head/contrib/netbsd-tests/fs/vfs/t_ro.c head/contrib/netbsd-tests/fs/vfs/t_union.c head/contrib/netbsd-tests/fs/vfs/t_unpriv.c head/contrib/netbsd-tests/fs/vfs/t_vfsops.c head/contrib/netbsd-tests/fs/vfs/t_vnops.c head/contrib/netbsd-tests/include/sys/t_socket.c head/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c head/contrib/netbsd-tests/kernel/kqueue/read/t_file.c head/contrib/netbsd-tests/kernel/kqueue/read/t_file2.c head/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c head/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c head/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c head/contrib/netbsd-tests/kernel/kqueue/t_proc1.c head/contrib/netbsd-tests/kernel/kqueue/t_proc2.c head/contrib/netbsd-tests/kernel/kqueue/t_proc3.c head/contrib/netbsd-tests/kernel/kqueue/t_sig.c head/contrib/netbsd-tests/kernel/kqueue/t_vnode.c head/contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c head/contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c head/contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c head/contrib/netbsd-tests/kernel/t_extent.c head/contrib/netbsd-tests/kernel/t_filedesc.c head/contrib/netbsd-tests/kernel/t_lock.c head/contrib/netbsd-tests/kernel/t_mqueue.c head/contrib/netbsd-tests/kernel/t_ptrace.c head/contrib/netbsd-tests/kernel/t_ptrace_wait.c head/contrib/netbsd-tests/kernel/t_pty.c head/contrib/netbsd-tests/kernel/t_rnd.c head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c head/contrib/netbsd-tests/lib/libc/db/t_db.sh head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c head/contrib/netbsd-tests/lib/libc/gen/t_glob.c head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c head/contrib/netbsd-tests/lib/libc/hash/h_hash.c head/contrib/netbsd-tests/lib/libc/hash/t_sha2.c head/contrib/netbsd-tests/lib/libc/locale/t_io.c head/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c head/contrib/netbsd-tests/lib/libc/regex/debug.c head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c head/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c head/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c head/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c head/contrib/netbsd-tests/lib/libc/ssp/h_memset.c head/contrib/netbsd-tests/lib/libc/ssp/h_read.c head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c head/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c head/contrib/netbsd-tests/lib/libc/string/t_strlen.c head/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c head/contrib/netbsd-tests/lib/libc/sys/t_connect.c head/contrib/netbsd-tests/lib/libc/sys/t_dup.c head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c head/contrib/netbsd-tests/lib/libc/sys/t_kevent.c head/contrib/netbsd-tests/lib/libc/sys/t_link.c head/contrib/netbsd-tests/lib/libc/sys/t_listen.c head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c head/contrib/netbsd-tests/lib/libc/sys/t_mlock.c head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c head/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c head/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c head/contrib/netbsd-tests/lib/libc/sys/t_msync.c head/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c head/contrib/netbsd-tests/lib/libc/sys/t_pipe.c head/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c head/contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c head/contrib/netbsd-tests/lib/libc/sys/t_select.c head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c head/contrib/netbsd-tests/lib/libc/sys/t_sigaction.c head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c head/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c head/contrib/netbsd-tests/lib/libc/sys/t_stat.c head/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c head/contrib/netbsd-tests/lib/libc/sys/t_truncate.c head/contrib/netbsd-tests/lib/libc/sys/t_umask.c head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c head/contrib/netbsd-tests/lib/libc/sys/t_wait.c head/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c head/contrib/netbsd-tests/lib/libc/sys/t_write.c head/contrib/netbsd-tests/lib/libm/t_ilogb.c head/contrib/netbsd-tests/lib/libm/t_pow.c head/contrib/netbsd-tests/lib/libm/t_precision.c head/contrib/netbsd-tests/lib/libm/t_scalbn.c head/contrib/netbsd-tests/lib/libposix/t_rename.c head/contrib/netbsd-tests/lib/libpthread/h_common.h head/contrib/netbsd-tests/lib/libpthread/t_condwait.c head/contrib/netbsd-tests/lib/libpthread/t_detach.c head/contrib/netbsd-tests/lib/libpthread/t_fork.c head/contrib/netbsd-tests/lib/libpthread/t_fpu.c head/contrib/netbsd-tests/lib/libpthread/t_join.c head/contrib/netbsd-tests/lib/libpthread/t_mutex.c head/contrib/netbsd-tests/lib/libpthread/t_once.c head/contrib/netbsd-tests/lib/libpthread/t_sem.c head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c head/contrib/netbsd-tests/lib/librt/t_sem.c head/contrib/netbsd-tests/lib/librumpclient/t_fd.c head/contrib/netbsd-tests/lib/semaphore/sem.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c head/contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c head/contrib/netbsd-tests/modules/t_builtin.c head/contrib/netbsd-tests/net/bpf/t_bpf.c head/contrib/netbsd-tests/net/bpf/t_mbuf.c head/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c head/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c head/contrib/netbsd-tests/net/bpfjit/t_cop.c head/contrib/netbsd-tests/net/bpfjit/t_extmem.c head/contrib/netbsd-tests/net/bpfjit/t_mbuf.c head/contrib/netbsd-tests/net/config/netconfig.c head/contrib/netbsd-tests/net/icmp/t_forward.c head/contrib/netbsd-tests/net/icmp/t_ping.c head/contrib/netbsd-tests/net/if/t_ifconfig.sh head/contrib/netbsd-tests/net/if_loop/t_pr.c head/contrib/netbsd-tests/net/ndp/t_ra.sh head/contrib/netbsd-tests/net/net/t_raw.c head/contrib/netbsd-tests/rump/modautoload/t_modautoload.c head/contrib/netbsd-tests/rump/rumpkern/t_kern.c head/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c head/contrib/netbsd-tests/rump/rumpkern/t_modcmd.c head/contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c head/contrib/netbsd-tests/rump/rumpkern/t_signals.c head/contrib/netbsd-tests/rump/rumpkern/t_threads.c head/contrib/netbsd-tests/rump/rumpkern/t_tsleep.c head/contrib/netbsd-tests/rump/rumpkern/t_vm.c head/contrib/netbsd-tests/rump/rumpvfs/t_basic.c head/contrib/netbsd-tests/rump/rumpvfs/t_etfs.c head/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh head/etc/mtree/BSD.tests.dist head/lib/libc/tests/hash/Makefile head/lib/libc/tests/regex/Makefile head/tests/sys/fs/tmpfs/Makefile head/usr.bin/uniq/Makefile Directory Properties: head/ (props changed) head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue ============================================================================== --- head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Wed Feb 8 09:24:25 2017 (r313438) +++ head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Wed Feb 8 09:46:15 2017 (r313439) @@ -1,1040 +1,1035 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629360S39&D`>;SS,K;%2@`2::%N=I -MVR86:*KOO>O99MMM-XP&76N]W/6T=[SW@<[G'3H:Z'K1F?=WON]WO>]S=WN^ -ML]W>^WN[[W;V\VW>[OMN^WW;;3+3/=TK*Y5E4LVE#-E5H:"S530#1IB5LS:V -MJHK6!JVA2M9LR*V:MFUJ55JBM:Q4*EL,5$`50)L6M11:P55:V%+55:U5C!I3 -M1L,BU5-5JV-%F55-5EL;:@5:K+%5:S--;5-;:M5MJVZZ[:V]>[:7NTN>][;> -M[O/MO-M[NYOM]WN^[K69ON\^][WO(Q/N8ZZ![N''=O3VP[V/>RCRX[0VJ7FW -M-FQJ%7-G0R;9MB*N\G'>PTM*5H%``-LF2NKF=-LQFU*50444`446P`&FV06V -MUE17-HDJB[#--!MBC$-1L#;!MF@JALFIM-IE3-30"JH#2D`$`!,F$R83(830 -M--,AD!H&AH`R#$9`:&AHR`Q-`,":8)D8C`3)@FF":8@P"9,$,"&)D#0)@$&D -MD$TPF@`)@```````-`"8`)@"8F$R8`F3$`)@`:&F@),R83":8$Q---,"8"8( -M,:1D#!,H--)2:$$VF##`"#329,1A-!,Q$:F)A-#$-3TT4>F4]">IZ0&U#3:@ -MVC4#`-(/4#3T@#30&@/1/1#0#1D``#$-!HR:-!)I2E$H&3TVPVH\BE/QIHC1 -M3,34T4]IE-I0WD4?IJ33T0`R:&T0`9!IM0&CRC(`!HT&AZ@`&@`````````` -M``TI$#1IHIFU,F`T:F*>"G@$F:3TP"-3T9&"&FT*/3"3R,33)I/":&C(T&(T -M4\T-`GIDR-,$T:GIJ>1B831II/(&D\C4S(::8F)HU-02:E)*!#5/%/>V,B-H -MB&"-#(TF(Q38BFVE3_48AM!-(]4_*GJ:>4>-4V*'IIE/RFIY-3RFU#$S4WJA -MH](](]&H::/1/4:>IZFF:0/2!DVIZAH-J9`>4!H:?.1!_\Q4%G*&;V=R9PT='B<1$&>Y2K7;'1?;`L!0$`X6":FH$!$6!]N]*1& -M`>)4`P7%5$G@V]E5TZFK&($]>M7]W^OSGV?[[OM^+/=V,U7MZH"`7P^J9Y.4XK0O)T]ML=,$]>C2&`+KJIP7B%-.A(A^%=L6PJT7:EU�$"\C_*-.JQ+2^W+*<`+ -M[7C&UXHH9B@ULW[I"-T:`@7%]:`B#,.N],:_+:SN\[:H0"]MG;I((-):D9I@ -MEY+M.9\`=/Z'Y5'G)UUBI`$7\=-,6\WB0M^K1(IGM("()_S^&EB%H$,(T:^: -MUJXAFG+?)LZ=2(B>DJ4`+\#0+:GW.!F9[Y0"67\4D'5N=?C<2IH"`B?%D\H0 -MGG&E/!&")G6)];))G]L??MF>!#;?]*:P<1'/-^\77VA0`%Z]R -ME-$,ZC*8W\V[=O*,`"`LNLU]SC!;I4"KG=/S#X!?7Y]N/BU*2;"=,Y6JXJ7( -M\0$Q,LORY367(RS2IZ5>L>\@(%\(7%0'&&F:-KRF&'2:+-/TMFDH`&<+FRQ] -M2/+>LL58^19Q"!7L,11[)RREOK.2B(B\T[XU`#;W%RR(G[K(5$X17%G>A! -M5%N-\(U<88J#4CQIX2R!95&T"Z:FJFOLXD$6)JV@!^C#B[K7^`23@`L&RH8#R4AD93YM`Q3];.J--PN6QM[K)JH -M(O;C-[U@O)%QFS:U:_'AEV+O+ML-FTP(.3(!E'S>H'.(0@#>MJ$"'FJI*?4K -MJ(^8_>2M:QGP"F_OWH5:].!EVM>UB'TW=R@(I#\VT2P%KT]_6]DV]DSX*:$B -M$\P$5TX-N@FLFP9/6Z#&OW(]F)2R!;.(FW!F6.80[RE%T=?O6H/*`%S(]JQ[ -MR7,>5IA_&NS_C[WLV",$5K/Y3CA9I<=R)5=2;=$"#3;X4$!A3SS<4MFG&3LO -M(C(AK8$A:MCVU5]2F6(!3!"(X/?9Y:@`ZT))M.B\B78]MY1`BX"?4#9]!56Z -M)(%K(4E%,HP1?M]'(C@/O^H")>Y@&LC0T?.?#9A!9W#]194/2$B@/0R$+"9F]7%, -M*1BYC&C`#LQ@*O)X;[/:@Q((+?>_Z#+K*>EX6<1R+?T&:\=DJ!\#0UPA_,^E -MKZ<2Y.D"5H,L:04L5`\;Q^3FH0!$N<-%2!`?/ZS>I:''+V&_V'MP$I)`W;W0 -M<("[Y"-384_['P.#[FK55I#5ZVMM[DH!4-F!?_"G;WQ+<>IO:.A1D`8W/]@0M8>%BW/(+<-&H2+N=9T(HE -M8\PHC>;Y(&31@"8(L>$>5^/YP&:Y@'%$18BM3_NBBG3?7>!ZKL^1-#L?/ -MI`&OUVRZ_+Y/!HD`*"]TF31QJ9YV"1#B\R/?U",@5[-@I;.4&_W%90)LS8U+ -M`,#YI0(2X6ML1-K;[$WRF]A\#Y!IMEPB$/?B%:LF@SS8@#$1(96`NH:/6&-` -M!:=-[T<("%]0_N*VT8X/5G4]+'5W>2@57]UECJP$[[:29VK4&^<0`O3I=VF? -MKR@)6"J[:JVG6:T`(X0_F^G'Y[@#IX#*^6`L@0>X[PUGR@1M8&GY?GK+(:KI -M_U,(@U>K55\YIW+R5A#A_I*4^UE*=FQJ$`;GLX^GP`%VFAMHQLA -MVW-FEG)_<:*\3(P705=2"A.U_T1]?;OU(#\LK5$7LA$\:N3_/7'@3_L2$4!K -MJ6$S1,[?R[77H`%;Q,<;P<]WB#C?6PY9\/V7UF*!4\2`M<&]Z=&$0`^[XVX` -MP>#"!:ZO,V=QZ_BB!8WP5-F0XF%^[*`J8WXH"<]L!5-)?B8P\`,YVUF%`M%7EW:-*$+>N64?@;# -M6+FLFTL@'_E2321+T;G=ZYGMTB0'"&+[8**(!6Z&96X#]H(:2NZ%,2"$GFN, -M1!^?3G/A^`L*^I@/+HZ6G:DLBAZ_E30+MJ_"3C6J2\[8"57T0*Q`"%5OI.Y. -M:BNS&C[E[K4@%]-&1?WDI(=$YDICRZ]&1/M.`*SX?V1W6>I79`5A)E)=C -MC=S#.CUY].X/Z]T\1.%B=8L[(9KD:Y=]^`D`AJ=I:%X(.1-A<7W`!S-]'$IU -M%-,2`BN_0O@K[OJ'6R\VPY5,3$:,BZ"HE]\AB;53X3@H[X^"Q3E2>4%#6-2: -M>^%"&#=/Z`@,;KO?/M\""U$)66_)4NJ?&F2ZTN,QPSL<'S\O.`#\I/;_'\T\ -M\-UI3`?SYZ:\L#\%AH`3:"O?XZN.EK961YEOS49"&]N%ZP3[JVOQ(P=(?G.6 -M@"M:W;)3<$\42B["?O/^=:1F#6]NZ$72@W50#Y79>"J>K0,*`@N)KT"+ -MZ#V_U(:?,N,'9\5&MI`$7^7$@&/KSB6TZC+HW]3$;[NL`N)UQ1FMLA(2OD\, -MU-4^]`5TS)K^W:"%9?8I@#2TGV8,J0KY?V?HZW)%R@*_M:XB%7\[7[?P:+XG -M]Q&X;\NX'>`&K2Z:_Q+0S=C1O(G$9#64P!8K][WE]U4>TJFLWGKV#V18-2@R -M8+PTOK0G!;/I"G/^B\0/-;"WIP@_PRA]#,0B6+V)K?EQ=JK2J^C(DC[`S_#X -MY"3TWE]1\OSVL0(N;%("2?M9ZI%FL[0`%"TQ] -MLWN_%Q7@Q^2]DUETH`>JNY1%N_++1LROZ>56$Q,7?.DD3?D:TBT$%+8?@O=, -MI("V5)HR`5A@RVJDL_?A(029R?[YENFJ2&8AT% -MAH6LF-70$`OWGS?-)?`A8JG!J?%BHFQ9=TR**BD@F:4QF(@.L`,57(WQ!&7* -MGC:=$3`_\4$,7F=+;N-@^ORPA65Q4U)$1_U9=>^G^O)/=\V,['3Z#NE@24'X -M=@U7X)-@E=Q@E'!@5_O2O$2"(_!93W=VB(#"F-EGAUAGK"PI/7HT9!#`D5[Y -M\+'#?L&`?+99C>0W1!!Z[=:J17*V6,CT(^FX5>=WB+G?#?J>A=T@<1CRU($& -M2/KW2SC-%H(8X0R]O``AJ6;Q6%^K*1B208.WI0!J4>@[T4Z6:D(9;.)+M_1- -MD"V&FA!;[J;:O3>;"4Q<%,4Y9Y.."\W*KZ:-!PZ3;$/=\"N4*'#KN#<9_N@B -MQ2=Z3G3EXJ/09W=Q:+STH`I>+,97UO,$WD!()PS]%F:D('H[F.JU@(>YN9OAUH:$_GW-1*(O^MOQS@06;P87 -M:-R?;K+]`04'98(@+A!K949?(_%S,4L9H$=7%`"GS.&9\=+H:;/X_;W^YMH< -M"`NS4-HBV;9?TX0@D-MV//U([Z4A$+WJ^K::^5S2ZJW[N0=5QIYEJ -M=&Z\W[TBD`7-[6J=-74GF61-$`:NXFO.%)=[[['PD6!H:;V/CZ?H.Q@V*Y3) -M(*(U*S_(`/X`@=4A8N1X;%PR]WU'P@+J3H?%;:O%,!M`$NVB]R")87^3W$@Z@#S-W_E3`9X%)L4B] -M6_71C'P<+:@@B2Q8.33:?)*X7!K<\Y@""[>-"CM-^)"A0$'ZQ -MUML"Y6[R\SL]`>$W58Z2ZL/G<&BN`"S?9P>JEF>9LK)Z?`TF2@=J?D?SU%]\ -MW2C2*QY;KIS^#>[A@(M]1Q3>IZ28P$!0&!DN>1#QKZ+6SW.]/5S;\E4CTD_V -MU!):LAW$J=&UU6.(N$C -MLD@@W6RR($]+)$-=IJ=G_\M`\%7E[I+&X(JO-968S9V4N@0@/FM[:` -M_DOHOVK;9]H"`YSN@MDXZ5!^\;IM^0"ZT[=\^+)':SZM<12_B%("*PA+=^-6 -M4X_PN14]E.7-."Q^B5'&6TA[JYMVGDV@!"6IH/Z6JH@=S^?QJF3 -M!%)(6*9O6O[NA.NF%0*E0`7VVG[["W;V*1;OZ\T -MW:K[M91`=CW>?L7]P`2I.^9+5TYAQM`E(0%F$ZV>R`(-RC7H&]XXFP:UY%BC -M`)R"D*N0[730$"U_3>;"DF%<'PC3?1;![F/0$!`7,+9HVZ(Q&0*AY&)ULVCY -M+1$(Q-SG5-O"<=//)P//$5`7SK)KA'4P'#J4"OU;LGD;/`VB,,ES0$FE7$DK=#UHE`B"R(_/."6="48`%=C -MEUSNIQ$$'36Q-I&5Q98XY)(("#_'Q/I0`.M?]'YG8[&O\#T,WD(20@3N/DL_0J^9;`\([->'9A>G7GCX\9E -M0@!M=I66J/(],51@(@0?HS\478WX*Y0T*XJ_O=U@*6WFC3'B"(E.&1'DANP8 -MA"9[NDG#6V]/W#46R."#QGG`O/#C)\[4?2`5H^5G3W+1P5.,(-QBP&W;-.%? -M>-((FRE+9_]=P/6!9$?X[H"/MB#IS`3J?[;1Z39%A=G\K;XFA6OI;)8DN$C" -M7BML%@PI!R4,UBVE3B=_ZKF<0@AH@GWQH836)<,FH8K\Z1<`_]C"$EEWC%^! -M/Y>[K2`I79%TH]PM=ML)@!SW*@GM%S$@J3N28M)R-`A+=E0XY^IL#V`"]FQ+ -M^_4^]%/H2!_ZO.Z:1OO/.8$>DXQ6NJ6@RJ$@&7W`;:(MKWWPFQW;(@(#-U?F -M5&F]RJ`A#+VFVB@-@,'YAF.IL?V!1W3A`*O%]39V9A:^=$086@"=9YY/=SI% -MP.43I]O%5,)TL*VCMQ>K<+1@HN)6`Y+R!4_X_[?Z1FD()>SVM"YCWW&/D(N1E:+:6?SS"^T^ -M>=9VH1@3/V1P?4WZR_1P%2B?BLO6(!4HEY]22&L[0O;91=\SO%,3IA"MH[!B -M%CFMX;((MF&F@-:$#^/NR4^?H#P+/T?`(?"H1O\3JUR+0$3,YUPX/"V!XHN$ -M4I81(I##TI)/`O^DT'P/ALO4[G$M3G3UU0\M=O((04/Q>A^QPA4[V'_/X-$'J#` -MO++H<>8QCBZ$W -M)UR&A$!99;W<4^-+"5>D]I#=H>!H8G2&P7(Q_(!?:3VM_H>=M^AN) -M]$08[0JX/,N;+V:J5'I6(6V.$(:0ZX_O4^QL.>\MF$P#[-^RDL0I]Q%IA\Z7&&FQAHOC`D/9^WQY/_D&5RP';_%[KSXRXR"- -MF8_*GR>O=!,]"!HE3EGA09H#U/^0V%;4=#9/YAX%'X,O\!"!B0Q? -M0.$N*`P//0.Z40@-,IF["EION'/2:'+N!#DP74'%[`W6W$.LT!L1>2LAH-3&4=%D#P&9C[JB -M];D8SD-)BOV;`_Z^+M/#??G`.L6]X+VMQ,0,SZ)HV(7+922%)EYPV/>7YUQJ -M!F5L#3[/:P0.`4%JR2QH)>8$]JHLV*0:[,(?IQ8<-C8[FQCJ78RA5_6X:=%? -ML;9!'+Z7+@8YD,W0.Z!V<.E@:$%BG_<]G3G5ZM]/H,].8:E4@PJ!J(D)H".9OD;4' -M"EQJXO^TH/ZS1L+=5L$%Z]`8O]7IOZY=8C-N1>,Q1=^BFR@T+P:'@C3,3:*. -M3`"L]U%/UP=A9X#@_-05U7IC2>XUP/.GC'>F"Y[4=*YQM^4F*N%V!PAFPKE1 -M6C!"G!@N@+W^R3SZV=E77GWPH-/N38#!++$4!=X:K+&1A2:W][17AS990I0; -M_Y#W\L@\:%VI#A:K9PY?,VY!>'`[-/7_S]GZET(W$\(#P:6IV9-1`H;VP=R? -M$`$G:%9(6N(ABM$"PMCR#P^[&TL]\"<,%S_QL -MQ(0B^P3W;T0R$$,%O,Q.5^I:K:OQNEMR8W^HR9"+KL.A[&]/%$`O)-.G_<7: -MIEO@!2J#72LI4S)[\@T]>'F\[H=F?&BM:7\O0^-ICQSRP&+Y9<=`EM^-,*'X -M?.R(5S.U$/)84-J#B5/5X#K<8L^0]0=L2#DD7]O],#(!9[U@83@F_Q:-[OF*D/&+-'5/=5`+VG)*RF0!&^C -M6JEQSUE0R*U.P`*S^=SAK8%RM=JW9#^Y\7`(?6_56S7G8;R>EHQ[,XHQCI_6 -M:2&_SJDYG\[4`..FZBLFED?N/A(KAL;1^9VFA:LF05>S^-5\:T/A\T.W2`9Z -MCR5SH84"^^CO0=:VV;P.D748UHW-!?N2_1E1I$^UWXVY#??7?O7MSNQE*Y-H -M`P:-/D3G!;1RA!ZK]T"0R3#7TR$X)IH7CXG#@3499,D8:^1/?H!S7?-HM(@Q -M5K9@4,%"4ZEMT/"_\0SAXXEGRN_`)&U1H,4XI9J%((D#1[,AX1TPPPPBAZA& -M!3:"V2`C$8#"*&6;GU'3+`_,_6_`]S@AW#.X23A3AL[JPI?;_?6!8+%_D?YJ -M"=RQ9,"'UT26,!(G^/'S\&#HPY'/H]/]YA#ZW![^Q`)_(&S?W>C!PZDI$S*_ -MUF+Y[5.P1GTK/PX0EJ?`18=(:`&YJA^N]`U#AQ"+T\#6/?[DT&&`FCR7_5SE -M3GT=O`34]-,T2!`[DP:*Y=PT_6.H1]9U[%)JHU=TQC$I`Y;L,@;.$8:7L$%I -MM"XSG]H0%WK:P_]@,2PP)2Z[_1E93+*BL864BUC^]U@OC2?, -M5HK_HTJ(^6Z-<^88P#OK\;*<(OS,[<;O2_HSYBTHY1P_+Q'R&J6YG@G!0OC: -M>\X;HTP3T>WODBO/KV&');,/W9PJI3G"N7[P80""\*]K-:J[PN8WX-`')Z0Q -M--X#0N7R,,".J0^Z!RMW)_]S`QNHH4L"$:\H;!ENOD+(_R]9VD9X/7%Q)JQ[ -MY9[BYU8,+$#4ST5"'!V*CZA;H/`[?D#]_FIH,]/BKM(!O7/T:`3.2LX]F,#- -M[&$7Y@#SAXL^MW08\-[)B=,(V35`ZHLV.H?2C%@DT.Q^0G;L;W8S,YX'S5FQ -M0]`-49S:KL`7G8CO5,>\PM[OA%:@E#8=HV(YA%,P&#W:#`)SIG$0JJYFRR/@ -M(+%6W79$,W]AO<]5W6UR([/ON4,7;95RLCA'%$_H<%;3OAEL?Y*9]>;#3](/ -M-R@-JH$4LK_`R'1W(2^VPAL`8/K@^'`+$>7=IVL\&G3>NVAYP3\X<%:[TM`< -M+"9Y@CBSG?P=]85NZ'DQNQPA!/)PX)?/^[,<+7DFE6(ATIMM]^U008;L8X"W -M[8QF_,%\FX'5WG$,N8?F+;B7G56R`2>UAA`.;N#K#>-B/V":GQTZEP/"@+2& -MM-+T9%?KWB3'YE+;FW'U5"7A(PKWH;VK.F%=ZR -MS(3]Q`&IWIBP]V+H4P=LP3L=6"K5"Q!G2@<(:94)[VKP&H^:!QE?V@6C?E), -MA4_]'=&O[1+0WBN:K)FZG#59EBBC)ZRR15_BZIL0V4+V[VH?0'#+A<$__@*: -M1$AF]*;V'!.;(TG+1/DO!74UZ1,RB[-,9@O7`ZQMR^81(%,/IHK.9)N=HY+J -M37V]PXP0V*+*^_O=>@,TN;S0AFDU#U+)-BRD?9MJ[U>W/BZE9/])=8,]$&EZ -M-Z39$`8='K/B)J?HK#-E2]+<55)7Y&H@J2T:"NY[7`PCXUIG0`QX[;&;C@%; -M;&NIZ^J,7XHX7#2P-7?AB>�K5LYFY=Y -M?>J;Q;S[(`!>@[EW>7(]]!87MS_!V'$>`/2*"7SXXURC&\UN(&G0';=SP@7+ -MVNAG47FKWFQVT\M&VP^@";ZN!DB&`R26G&XEN>YYQSY0TZ!(-B`EO>HF'`86 -M,#9Z;[R_`0AA)_K.`#-#T?P?T.UTGTR5.Y9\QA/20\KYWM?DZ1I*,56:J`?J -M`<%`JBA\SG0%)YC\Y]/C';2K_N94D+)VP-.#6J[.J0D"*&/'$1Z#4\9?C"_#R^!U=*?2B4 -M$O5>N6J@)VM%-A"%>T7Z<[%`W1,_8CPJVZ!]I2H'MGX\859[G^:;[;.ZT@K2 -MXD/QA?6&O;P39*5)-]]-!88S!6L>*9IUY)MRD(OKWQ;C(LFW*,/)LR0&.IS0 -M*BDINQ+[8/GQ$OIDDC.$:;IWCB5CYV4MA6Y_[PU[)W.K'OOG!J605KP./&_@ -M9>_3AG1%CUH("==L#X3WT%UMUM>O>8O<#OH@O#>DK+CV8J]I]Z++#\?\@"3# -M7&*,YQ)VG)<3AKJ..-128TQGSL\E]G]MT*S_L+849W@I1C>-;)FK,/*H7KR -M*W'9T`MJ,UV%J)E-X;(.TQAC=CV63Q[;`TQ;6EC-6^OAH?ZY8X^W%YHPXYOK -MJ(5*.U*W0]@^VE4!(N%D;#CC&>YZ^\K[=.QZ/N-%]TS/3O=.$KLF<=V7_@8D -MHVW1N<_W4^R#N&+6H:W2S0Q&@,=)Z,/G9'J=O#[2:X"KS4 *4E+FJA=+MIBA.]H>Q78=?8#9:.G@*9W:JJLW@HI>6Y-:[VB4+=@Q!O_T -M+^?.I*GUM.AGE44K_[PI*NZJ?YG3[DQE+;!QH$J:`F&I85,[_J>UR$]Y]_I" -MK)#L[22+9XSI4+CC[9*R]'64IG+*KR`;=.Z@-L4Q/O:%,3V%7LE%ZIN\$_.* -MP$987+OB2FN'*F\M11A6MHY1E(\4D2Q#D%*M1\WXSIE=;*?9F(IYT@BI`M;J -MNBC-P7<#+SYY$?:&(Q/G>KJQ\YFKXWW -M-2QBHGCI#\_Z"C;C2F;(0AX=:D/T[3!P -MI`RQ@#5U=#2]%(&<_6$$_"-&P-D9]??T^\>AAG.&@009*9,DAU:7U#7-GS.' -M*,*!ECV-23)VX_1Z/B2_,G,]"D@5?7P^_8<@@Z7 -MF'?9XZ6-B]O:`*R;E1.X09Z#%H="PVY^^%3V8'!+@[^L%Z'D3&DV-TR -MFN"DMW,-!*[?E')VOE]F>QWJ(A8L/M8+YZ<[KPVC8&7>"7QC#%NYJ.S,6C_T -M-@_IZ6L9^@>G\N*69H*7-C3#1>G7:]J'0,*RPG7S2<%$P;,:#3$K_',B;KIZ -MSXKNY@.[6\S:F"CV1;.5!DPVKB<(UB:]*WR9AL!_2_HG[SZJ.T_!NSEW/$>! -M@O%K:V5/"!V&RTS?S^7YG+-?W4;LU\A"F04VLZ1Q!@8,9?1&+%T/K-K+\.YO -M';3N&L19V=E=\CB<'`0]I'&==V-<_L<+@ENI+=&QR?OF9:_&OEDL.^U@UII< -MZX6RLGR&GS/8THS3VLF;@^@B3U%!/QDMP>GU6`HMCRX`C\,[(Q\ -M@0%&)S2>O$Z9H/7A0@*%^XUITX;\A1`KPKDO<6/Z,\PCEM(BC-884!CC8HM) -MF=3146A@FSQ@F=<)^_*J3W8>!#NO7?.T\&D#)_9W.5\[`*)Z]I)*G\9I(P:U -M@I"4D8JJJ'OT@?I&8^6(=28]6\HNX8$I&&YF3 -M#L#OXN;7LJ`2/!&SDLZ(O5Q_5&*.Y$*FK#:9XQQ?)!?Y!,&CT2=^,HFS1G]: -MPN.WO7,A!3)$*G4#^YNOJR8'Z"+T"J'(Y0-]'XUPJA@YM>>C!L,>NE'1S]*# -MAKO>,3+%V9K>L#BU.W;)-\BV]74>NU\SE422.BPFD&\VN#BM&<,6?0$S2&+T -MW]7@6U%Y$^]M.P'_MMDGHW'F3[+0<%!C<]8!*31_W\--]';+?ZN=6U6XG7'L -M6Q+(UV2OW3G<:O"7P0MI=BGUEJQ#UVL?+A995B40&\&@$M&#I:C&EH`\]^!S -M8,,5$QEJ?/8NL<0K]&F&;BSOK1.X]L_HOOUE)8;YF+\S'Q5S`U2DEM%B[A5] -MT*`UM3&Q[BV77-G;(8KL^<3:0\$!`B@@2S%RH>QY:"L@$HN8;\):5)UN6*SJ -M4G1AOW9J++H*\.;=PM)^E'%VAA;PX$G'_#5O4^T#BHY&\AK+_92,K777?5!8 -MR&YA<51GK$?5I<]H;30:ZPPL+%PKO7ODJ4NYZQKSK%@[&,J=(OS.=NKG%<8F -M7U^NFS]-&;2+S^R@=DQ&,-='/FH^4R[JXD.52=G*4X'"/^O^\_@'Z?[#$^4_ -M*:2GZEA\J*J"2%$MH,(?F2?^J*463X2'FH&F\OT(A\J6/@3M/E>?91+.U>UY -M':#DQ]1O^?//&`6!F<`/#M&2X#MI9<4G:9)1R'.,9EU.,WG:_?,WJZH-K%=H -MNUL]B1!8ST=)^)J:N9N=^JJ.U.IW-2U/(R -MWEA5-[O-YQ`\BDI=4)3VRASN)S_;M@;9A3;7=UT]NG -M+Z[I4\NG40>U>!4_+;-$;9]^4I]?J1W*)7HWJ]X431VG$X'>T\.]Z%'73#F'= -M\+IW)V:S-N-MI:`K)]=A;K@;D#N)0K-RH5Z,\0N+,1YL.'&=5Z=QKF!>G7MN -MP_CJH79C-W_7>1JF>`6J>XPY"ZAB8\"J>/2>B'HR>B",/D(3X1]TDUFR(18!]L`OVC2,8B0]J -MQ?1%$\"CW#)MOQL`,[H]YZ/5\9.58>E`/=0W&PLL[:D]/&NCG*/$9WEB.63# -MG4,ZXCF2EYQEE=1P[9J+D!24HTMQ5?P3J1`&;-R;YZDZ:;XSNB,Z_AE'5\=M -MO_?)W9V+YIZ=LD'S#5TE_`QX,[2.C2)7I)V"9F6674*J89HTKQF7:%1J`&=R -M=0E):BI7,U^#R&M02/K5]QE;?)\\/S<[?N+,R]Z9UV]BW")?Z5W_U2WEMRY3 -MY)3Z>H5`V7\5E):H#U[Z17"1ZW[@38>KC\RV75A(A21Q!TVQ4N[G(YU$H)./ -MG*:"=GUPVKV5+1+V??9_"17,E9L>^S.GD1*;&$:'A<@Y)+(654C@ZR -M_U"SG(2TF9^;EA2P#.V-_ZJC$V5PE/M-EIY_6I4V&$N8/([%`C.&W[BJ\[4[ -M=_;>H;I\_R4O^)`N-$L'WXRK)K84< -M&/WZ$ON<:V&ZDJ7B]D[2?[0ZJWB12F"=#'/#/%H!7-42(#,'E=8'R"+>VT\* -M11-):53)F$*Q4)454&*EJ'ER#G!4C.VS,/5NQY.L$I0$D99I3C7+4Y4T.*VC -MFKFF,_&S0CA<`7!CQP%0+(*J&_/=V58(![P01B23`3Y[`XA^ZH4" -M$\!.F!'@'(R\5?FAFHZUKS"",#APY>A&^M\T;\Q)U^\71U1^\U!J8NHD?YE= -M6:=%?L2P/%9U_\>'1&0?JNM+D+[0_8$P.;GEFDEYO)9?E1QIS?([>FCD(>U7DO*-5?3(_]?\^C$`OQ"4SWG7/^)3 -MJ,2\KBKG>H@#B_Y$9R>49,K^1_A/7B1"MTW&!BH6N5_RG$M8@6PK7*B)JU6$ -MD1.SSE\\&P")E#IAR59+U.;ZX3K[,Q]+29>45>#`E$Q<4O>N>=X-0_-4B%*< -MG9\PW@0YAV[%,M2Y]>I40C!EVJ;H8&OKZ\43D#YHVO.,15X,8Q@5>_FH#QWL -MM%Q23`#!8P"GXE#W.*%]#&(3$^_5U'N@8@>%B?$>8&!'?70')C&1&'5[EF=; -M"[@M3IU_K3F6Z-'_!2+SC0?L5K&.J?1C1T=,YD^&+&?%K4\W_: -MV]+LM_T3'&@UX?,975H)WBA!&>-C)1*R\-N_$1OU!YZ;`<:*$9A23T/^DXMI -MSHBHF.AXALIVVFQ$$39-S1Y5B19.KZ&6"91#_^CYB&E;V5S4BNK#;E%M-GEWK)S.;)!QT9`6>V;59[F9I17'5]56"L/N?S_QNGZ6_&E1`U3XS1 -M$?C6L5!0AB82X&LC4DF((*DGS__?V*?32_$?8^F/JWZ3ZA_2?&^^=I_H8)T- -M;)X;/R6:%FFF-UE?HY,.\K7^B'L-Q\YI.JL]>OP!?HL2U7))C-\XDE#^8R.L -M`3!O/`;5JPR?N):V_[&BH3AZ&GCDY[;#I\\U?5N?*#.1]@B=-NI+MBLG; -M2-=DA72[K4NO!O^RL.L8_Q+EP8*$4S&V*[^W9,W?RF.R.<[O[>%T -MMTNP3*[&EWEE1HK],U,8>WBVU*?RIY_^*=E^Q1J![C6L.KR3<:RCUIR,P& -M*./;G"OU6+H4"'9^MU9T+$0"'O#1T250J*7,Y>XM=H%,V=ZM+DP<+2+MQUD= -M+Z[(.8F7?ZD_U?:M(_QZ#&@V#FUN27XM:J[0S$M(3X3KI^!S5^)8BIR>SRO5 -M03_W/V=I;_!7EL>L\O4X].]R:VK]>.3Y71'E`'G]$#6Z*E#'7Q>QC!B?+I\0 -M]8%#X@5GQ`8,A[)%5!1@'Q(.+*_$M)*(Q9/\#)[7XV'M,GS8L]_@^74..E)8 -MC%+!&(.NPI3G`VH#-A4U`$4QQODU]-]=_%]]]I)=65.1W[#)Q:%$E4/_?+W1 -MJ/2(591#`U1B6PS2WZ\ -M3KQBC`Z\3KLIB@E,A'_ZUX+0E51&!$KUO??&70LJZM*#WG%AB"PJ;%DA^/B^AK5WJ9G>/>Y92TS@^_\+P.Q.W4H#K]=@J=M!8PBC`>/[OKZ7@PU.=@6G9P#9A@H?N=R'4;OUI]*--R$ -M^QCC0K]".78^3M:(>I]K(ZFG8D<1!LK>NMR7YA#Q1>'YC4B>$,*DV[&F -M3="[\K=SM.Z=-:26I@ME67XJ@IU<^E/T[W578(WS\KL-[G1=MU%3D5`0JV_K -MJW?)ECVU'P5W?:^>QR>9\/^]WL?'YOL8C>HYSWR)-76D\?U]ZR+VV51NW5 -M2W3?A(\VM^OR'D_?6SZZ>V:\K*R^D5TYMEHZ'$O>:"/;O7O"-!3X5\75%\3; -M\R^55##>!1!JW@PL*"\JHHD.7(V5(3!9*6EB?AR%`YB%3DX:I[KJ\3V7%F9 -M[4R'2_.XU#Z6<:$(J#NQY[J]7D4ME0K>!->H;NN+QET"'-CT,>41/*%M -M\EJP/1A@LL8HPA0\M*=M)/*HL8R%%\L4/'N'Y_W?Q?DX^M^@\?V/^>S]2M/^ -M5('7UH43YAK'&C\IK_5,GY9ZL*7\Z\ZA34=NO3JLS*B8F)B6IID1U%)(9U%1 -M,V&5X_J%2;LD^['7T<)P@=84LWJ["X%58BFQ@#X&"%0H.`K*2?+ZH5'4V0]* -M+'595;2J"D@4K2J*B<"$_G,*(H:G,/;#XO.5CQY_"7R\J!$ -M#!UAE@0?>SV8KTH]NKB/'#JP0GK\_^VF$TCF+QT;%><8EWI=+8ATM/0_ZT)U -MKXH[:AMN3]/;]7-FY_'H:.C-H;)7!@3/;)2\0+J!+H'HTL)Y8#/*T60/F`8P -M#M34'C\IY4\MFK4&]644U:'0FFM=:89IE#4-P':R4OE_)767%M#W?^2;TE[G -MK$Y?=NG]Z6;.)_X9SIX2?DJDYW1:XDV<]HZ&A/GT&O9^\XU-[<#T[K]?QQU^ -MNCOE1*IP_0X=D@GKC:4/3/`13TP5%MD/3#T[8B*0*1&&,"$"#$8B?P($B@!` -M92`%?.>U]//U#\&CJ5M;\1W_9BP1^9M%W.(OBCW+!722E4!#8G:E%9)2;4*B -MFHI2F=4E9%4*C4YXE1-JYQ7554]B$2F^Y0S*0H9B9H^,\9XIXY'QM)12*2>- -M%C)/'(L$45(&S!LJF!RE#Q?S]^6;^^=GLO9GG6><\H\?@\X]?\OZW_O@MN7R -M^R;_/`C7LCDC_<,/-.5DQR5(K)TZ*8Q^4K^SF6EH@6M,)AW7'>7,4M+O)@\I -MY3R]VWRH."(J>BA&"(^6R1D&*G+9!D5FPTL)RYO"[X;^_X1RPY1O?M#P/F?G -M>_[S_3[>B=?H_3C#]G.[ZUVE^[S'S/*-;5T2HK+"!26$B965UA6D5@UTZ.-. -MX'W(`YR;P7?.P[*8MD:RUHJPG?`4BD#O@,$-Y@";SQX\#$1X$&\2`_XP<*AQ -M'A9'0:T.-[R^ZE4?RW9PULTP3\I0>_IUAT:=DF6U=5W2PL!7D5@R.BD5135U -M9RBUR>U*TN1;J8&=',\8YU=01XF,Y$Y"G(!$G(%7!5$G()QV4"(@'((B(SD, -M`10Y%%:4"SD,ZJ1UO<]]7XE)Q05/`'S/@[!.Q(7P'9BP,0$ -MB*C`-01B/F/'@<8$`XD#YYP.(.).`!.)$'%0Y=>2DOWN?5R=GL=?X/P^;?[& -M?Z%@J*R1CV@TIEI*IIT"1(B3)FX-Q7T>*2/W\W[Q]QK>3N\?DKE9?_6:<[C=MG<7.\FV]O7,_5ZU"74`U)%E%=E<<> -MNP%*Z,`8:D.R`B(R3L`8*(L)V1[]I;";SS@0/GS`CX?KGZSJX3CF&VC$'IZ<=-$W)#ID' -M%*,DP$1('3`0W65(%*S+I@GO:AA]/JGSQ?4GF4[V]K;#@TZ.2E09\O+A2UZ% -M2:$62Q=N''J0GSZFJ)7I41(TY]\?"2`,X,SDT,Z='-99@55@=$!0#4`Q(I)T -M0$42((2D8@4*D"".,$I<7Q'>'5'+'L?.NY#X7SO-6A_KZ'Q5Q?A\8 -MYEWNNZX.Z'CBE(HDIJHDTS5D$[18&9D@`21'2$ZGMZBA.N3J=6*BI)VB#&2= -M8J6AVE"3`:P44SS%-7XS,'Q/35_O][^OW9FYOF9F5-9W/F=B3Z81B$/I3B5" -M!JF<6]IE!+R")8R3,$1BA+R*<:RP+%*9`SR*9V0<[%0YA6@T<#P56NZQU-?[ -M.GL?(7V$S[S/RO:Y?TPRYO[?I)NL-IHB8LL@8D5[5`8;S -MJ/$?(_^_@OM'X1_I^S[J9_B)GP9ARB+WN.+T#%])3%/H11$$8!1>5]'G7P%0 -M$@/R,$PPB2,04`\R?Y63Q8I#FYJ%)0)A!!3%$!C)&QL$;(Q[7K?6_%_J4?*] -M\&?!THIK2S,UP-W)KH9%TV`F;;0V$&,`I%-*4`I%#X?^RF$`VQ19#:&&YVB( -MR;1=GN'':NUV:;2,?T'-BXKZ?^>0;0K[,S*YN[[`3=T6>_S1W-+>-.,4XU@( -M2DA+"!8PI"6`,5D-$-#0D*DSZ*JEA?H4T'@?'ZY[3D\?]*SXA6'$G,-WV/?7 -M)R26Y*+C((8(H&2,23.`L,TE$%@%D.]I@PQD"BDHA<"E7`C@.JZCJCE[!'3N -M7!<'3V;U304:PX6'/'UWNMVW.+HZ?,H;CP[N@=U.W=R*FY0Z";MV,&+8&)'= -MC`%(@Q0#S)#@Q0FZ&Z=&X$W;J4W8W,8(QW,(-/#'2C'F7_F?OG^;Z,F239\K -M+JVI))!4J@T@0#5J`K#J#!TITI2=4!0PRKAG:=6H@(`BLD-X;XHL-_>.KK\/ -MU)^-]3B]CZ#RXO)C7R)EQY''DJ8'&6&*<>5!RM[=I#``P1BH$U23)"JR%F+3 -M)`3C9K$P?`?>?YS_PK'O?52^U"JSGRZ4L4`?AAA8(5?"@0A49"D!$!!0YI, -M/M\6`8`YJ59#5`2TAB#4LAS/T=4+4JBI3B0Z3=TR].!%%#I)4.C$LW$:ZL0#I`6*2:4@@PFL/#)6?0QT9] -M[6=WZW('^3W^3FV]+IDCC(51!5@?@-6`0`0/92I?>)2I*A%(8`%`8J!F(7H5-)HA8"F:J-*B -M@,&"^7R^\O+\RGXI;SN=YG&Y^J8C%BLX\!KJ:[18%`8Q83B(1=:2H2@+B2HL -M0"HI#$8@Q&$TN)O'=_=\;V78/B\.FF?H["OHMNW -M;MMJS8;`V$B1)-A(QMI)L@B(,)LE2&@LV"S9-'9,>34)7>-S-V=I_:[S?M>C -M\OM?%P]C#4X5MX=E=8U:H*&J"13!.L:JH*H=0JR=00WR`Q"=4#:J&,4628)U -M")TQ(S?U8O4>HUITG3N[/G.#LX.$0M)PCPV,X8*3AD'SF@<)$49#A(JPX8<" -M`]NV]U<7#P4Z9@N,8JG%Q);.'B3A:K#B)@(L!$(< -M4`4!&!Q(09!96Q(<0<3*K`H-M8<)QYA#FQ\/1<04H"QG?D.N>'T^][W -M^)V/,/E'$,/>;NQ3KHFN.LVFXW4-VXW&X,,^:W0E0W2+)4A@DPR&Z;DHDH"P -MW!NYIR'SG>]#BX3SNY[@IYQYPGVN;G"*O@W-6U5'3#P>+HVXE"S;5:);2;`VPVMU6&" -M0VR.VPVLL@L\MJ(3`;:63;W:S4=W4?,X*88SQHWV4%')[)PCA=73-HPHX=/" -MZ?J,(!44DTY#U6G4+)@LLD&"L0-,FDP1TVI4X6F;6$1PF?1\'_]X?P>Y\?J= -M/Q'=R[^^90R$RY4B9%,L+$#*112,3"$^;@*:`&@"Z`NAGIHII,>?NC\/C^#E -MET''T=SBG&'$!QR+#4T8%@HLG&V#`*"@H&%JIAF'"JDTS"\+3>5IZQV*.EP> -M4<0MD%4)?(4P"AA+Y!S5"\:35LAJLP -M!>WE&D7]HB9CH'-YN74W=BTR,@^)")UN@Z:*0TU9WK-F>S #%LU0!$V#") -M(B$-@9LLQ0-D48DV;'ME(Z"7`Z*LC^K`.7JPUN@L>W6Y8VXWX4$+KY?4OHPA -M'D`*(&8A@0*6(+`,Q+&6)8D#,"Y@S/JKZL#X84?#I>#SSVN_:EF2BB*(-$4J -M;;%4-D$$&&:9R@LSF;4K(R+(*C"9P-25@9)+DH5)35%(7)DEMK=;;R"V[9V\ -MV*RL2'(@R&1:0Y`#6E0EA%J`:IER8Q+@7HRZ.CQ -M`X#@AP+.`X`[A%(I#@(+.!A1"4.!(482G`R<%CLN,&-O5Q;S$&_;O -MG,WN9;CXMYQC.)D9YMUN:FWY/OL.FF_APFSR!YJ.V6VQ86VU518I:$Q45`*`+:H -M"H18@BD,9,:6RC;93C*;"ZG:W]OB[&R=YT?7[?V#SNQL9LQ>,OU:S5F#,&:J -M*#5@9DF:2*!F@"A,TFJA%S4F;5U5.?O;18]'I]WN=W=B;;;=BZ7-Q=<"PN@" -M(8$)=)%N0&`7(,I!;BZZ1@**C=E&W-MP8*[PK5N[K8._V7ZIBA;?@54@$*HJ -M0@F$"@IG@+)>@(19*HI9#/(L!B`0H(%4E`H2$&%0215$1A+CNS4W\F+'P>]> -MU'7W@\'L]FPQ2DP(FPBPV$FP`1)L:K(%(I%`U(*IJ:E4U-0U#*<7:-KF'P_` -M\0Z1T.AO8]2LAW]FP[_F+ML=NQVM*K#;)L9J2;2&Q-KB(':A%6$1$M(8@I#: -MJAVE)M=NW%QC3R.P[WI^+DY.3(UIDVH:SCXZ:\8M7C+27CQ36@DPUEA-:'"S -MM)J%9-4%FM"MM(4(:33`Q&'$X>,.C?+76YG&/E_@>VXN7+K,R!DUDMRN5L0H -M&AR,#1-22D%%"2(DF@02M(:@&,F8::6K*&?1H:7O!R^\3.^KN]\?!-_NGO\H -MLPEK:VA:%J*`DM8%*(2C&DM5F(D"D,=JUPJ!0&TO(V5Y*[TB"YZ`M"`/R/R60(!`820J/D)M>:.W%MW&V6%P7<*ZHEU2@*A%)<$BPN`6Y%` -M$$$@H)JFB0TBI4!*417<;-2JQ7'7*CF*WM[7!+++@KX-_2/5Z3U^`WS=OF^% -M`63>3I0F]PA+#>P4*)"R,2&H%WUM$-Z8E4W[YTG@ZK>;/S/Z6_=V#?Y60RW< -M?4W>1<270B@72`H7$+A"((@U06F,PG%.KL^J['<]R:'U&@-!ZE70%06/J+*J -MB0[D$8L1`P0AW"=Q(49"QY[`9P8L*//7@YN+G\FO[MX-#/3CXQUVX[E[I\_!JIA%("`LEZJ%^>+G=JL^7I9MKD^)ENZ&[LC= -M26VX\0ACH$06&,BP%DR(&2*1DR061F6+*Q3&1@'7BTV2TV=FPV+ -M1\%U#J*Z*[^OE$*,@Z>'L?5[/7C'!>IZE010QTMDD,!(I*JBD-S64W+#HW8P -M%DE0P!AFYA$)N8544H`UV"&LZ[14=PX865?P^9?SN#>Z8I;QK;MS)F -M"N"F95+99,[9+(*3,DF<)4R64%0469%#(7!=MUN97*5@W#K=#+73U>KR_+_$ -M];S^?LZ-&?GV:VC6UBHZU)K2:R1@YZ*36`UF00%U(2C`H0Z$*DL1%)T3H;;$ -M7G._HUJ2M'!P>%YENT;NW5IERY,EQD,BY$%R3(B0,CD:P&`YV!,$6$L%,Q?8[IM[7/]CO\GDFK?Q.A9FSCG0M3/FS1'U?V_9Z7:^LZ'@9!6QI;K6Y: -MLE0520)!()$D((`I$P];!0U,DH2'7"*2M9`[0**#U2=<[3U^EZ7D\G3O3YCR -MY9>+(USAXSC*IQ/&%(LX(*063CA[9EM4EMD&0X[:K`2+%XV$#3G:-?2[@Z80\"#%-D%AM2,!=+8%(*;6 -MH4!$V@B<7535,SR6^KS8W=!7=^R\C#Q3C5=CT[2K32LJTM):T(=K)%EB"22T -M!8"P+8*H6B*A;9;I60*QVS';Q>-TJW#P#Q/6&R4%! -M2<QAY=KK]CT^;Z/W1[_X?) -MHZ6Z.AG.72FD,$-"(PT0C"+-&+4EA&(&@+!3"32:(AI;=#0T>3E?==\ZGR[? -MA7?V3+J#$R:F295LHI"Z"@HC)E`4,TE8&@3#%K`J.FB)H6!- -M-5MTS;VW9LFT4NOHUXFT>5O]W?CN6W&;5MR71EJ5+B199!9+DIA*@+%+F`PB -MA<%PXJ"KK<&.[:K(59RKNZ/$Y'(,G/XG%Z=KMJ,V&CH:&,8#!HS29H3225(# -M,THU*P*`NCIC!3,\MKEVIJ%:F7+E$\.[J'J -M-YH;-DTQ39IJ4V!*`[*3)DE"2M8%D-C(NR@,N>-A7>5VHGC\/N6[3U?A9[M' -MT)X.0U\>NNO!R)9S2W3?GLFP-C$--$@;&1D58-L$"960U`E299J+%#B'$-O*V'&G'KI@ACMXQ),$!9,3C<3`4!(LF*63%7%H.+: -M0ZSAV<1OZN.KKJZS6S70X]=5)8:TK)0BG$U`FL#"5#6)#N!;22 -MNH;&\3QE$UFTR[J<_=X]-?M[9PG$\1Q3A9Q2SAXJ*1%DK(,A\Q98"PE`4.)# -MB8,%.YCAQQ%'BEO:.'3R5O,>3C^0>5Y.^\Z.A\43O-I8KJ3O3[. -MG?'MX/>_#\X\T/-`\T?-IAPPP",\U&`I)YI'53V[A@%`$S@G&`SCG`L*A?50HA"^!20+V\*9FO? -M@??6-&`,AAUT(AWN=DYCCH=E>$K@!!)<#S%#H#H*&E:1`V6HA4(@(A)LA.5) -M-@1U)BA0ZF4C@=!+0;/)F3E%R.)R(B3)C".5@(19#4 -M0RAK:Y5JAE8:A4(50)P$$^"<34H[M/I=Y"R+I/6]YR -M?-\4Z^2\.OCA;:3B8DX^*DL!2!\N"BDX`Z>4C)RD!A0%=*WIB8=,8A@O]OP& -M.,SUU1#1BGK08)FGHKM"V"DM)C9*82T)%@=J1<"L@@E*`H@3Q"U0AA6$V,&K -M2Q]O+8@3E0+)M8(XHLH2OF$B$1E)D*ASAS@*$YN>R,F.>P#4!4!0$.=B<]0\ -M'90IJQNQ3<[NSG?+NW>EIGU\NLKDG)D:U!89`:T)A)D3#!9(D4U6S#)E%->4 -MRM*9996]KC,CJZS+T#;Z'=RUNOAUZ^[52S*M!CKRP(2=LD,,(D63)BU@6"<% -M`82*!H">9P>&D=FW);ZG5\;)S;//%VS=$`Y4,4-81"*(@1*1SU"JG.\Z!8%$ -M@L%(,#GPXP!4("B$@")2!#$"I`6M&D:U!%2@Y]*ET-W#>VZ5J%\/O^#;7:[3 -M:&U@R*38R(0VB#)4VS:@[5`4!5=5Y2'@+3MI2MK738AYF[=KMB=(1GT$GT"$ -MG@G#C$*0R*$ULF`J`I$FL>/A,)IJJ3Y\,!,*4*%&MJ;_=7(&[AN -M2@2W'@^7PKKX)0H'B'X%(4R%`3-)#,&IJ$U"RM3-FU;"K.'@U.=T^\ZW1QF' -M3PF$4TTPE1285=-L9"P`PC2!*`1TQBP8*+#2CIE"85KA5I\+6-WA<%>-XVT: -MF'A8<,:#"89A2+!`PB19!A%@I,)#2*3@9R@,14G#3$Y70P2J1++;W[&*ICK4 -M6@:`*2**+0A:TRXL8PI+D4&%S(H#`+:J0N&DP,L9!)%DP%K:RZ68++"Q2[2T -M2W15Q='4RMJKT.#HCMUX;>$85A$,0-R,"4B.E218J2$4@01&2`W*$4W)$G1N -MH3%I!"88,4-U3=T(IK)0J7P_,<=!KNUEKUQ`+NON6!8YO=]J$6=F[ -M=><>5XTIA=HP8&UBD$21@;4A&!M9*@*@<((NE2CR/@O91+ZZH>U0^[=L[[UY -MJPTW8U[-<6'WMH(FT(;0-J0ML!(H;=MA8"BS;JHF4WS)EU*W^AUNIQ.O<8C" -M;V+>JRK`V"L=6QP5@3`$Y&,!UF+@AR0-0@5)0,D.1(4B@HD,,E"B)&DUFV]9 -MDNL+@Q&H([I:#=%)[2-L50V6P!E0F=L4!0LF8RVDY&2@%%Y3EN9N!IQI%+E& -MBG.UZ^OT.&H[P:NKRN4+0BE,,4:K"(B1$!$JDA9)SI&0YTA&$?<\^"525I:D -MYL&+B)$]!++#6V;0CR/.--$4:%$UE::1HD(TQ0%"--*C"&%)I,)4(8$(R!OO>CV>\.IZO)I-$'/2C8&C"I2& -M@)HR4`MLBDJ10B0-#,-#/E'+R?2?1:^K7EEN-W3>DY,N2.+AR)#(AQY9 -M^7WO3Z)X=Y;=YOW[T(].^H4FY@DG2[V`LC(;TA$F$I:"*;T97?.># -MTUZ-V[U+=&&JVXW;&!W4P/K,>#QUGV!0I?1]'T?(*%]'R"`'Q4B$T=HCMI*( -M#(*3NF%D=4\,/=">3R9Z?;^SW>S/EUAQAPG`\4XJ)PZN+$L"H09)CZ2J&Q@" -MD*)IL,,PH)IX>'P\8O#MUWQ^CWW%Q'$.0Y^@^+MUAPG$<4XD0XI#B& -M2,#B8%0BH!ID(`43301H-,%#.5=/2&CIQY:RSL->Q8M0B%(6J$M+;J*A<8L% -MDL`7`W,9+FE0E0ERU4QL@6`=LG;(%!
&1$,4R/;TW5?@V<'3M.?S]?=,= -MMI5J+Q)IRU0N8EP%R10&`H%Q)C808%R%S"F)"XN$9=K&//F-7KXC@4X7@G<< -M/`BIC@08IP`<`E9"R`=Q!)W!!)>"BP[EG`IP2[-W:O%W4TZOA^'U_5^B]3PO -M6>'V=_H7];EZVML:VP*:]:VNA>)KDUXTT$UHA%!A->(%C"@FE-"1'2HUR]T& -MN;LX=.SO.]X1N]CFY;CC&+);+;JA4N1EP&)4@R2YE,-)AA(DG*%L`*2L*P#E -M(\M(RV\@AQ,G1YHWN`&).GJ@ -M(2QBP!(I[9`C)-;$8+(,.);36@,GJJ,)#"1'2I-,!:HK1I4J0^>MX/'Q9:S7KUUG&+-=:)#6C$@R>X8L4(A*R37`UH -MZDUFOCFLXSPY%6VW9L#48>IFF7H -M(`I57A?FOIH63-$!(7LO8&9D+))8(H2,EZC(DS5I6&!#!8MYN!Q'<.6?8<%W -M(WN-M:N4KQZTR3)$UZJ9281)DP*)*2(A-5Y?/Z''W-75GH&9PK/4$S@9XR,#.,!(=N8K=JW$8C$XL6*;N.K,:%D,:U8-A0MD!RK1H" -M0R6,D8&3"*1(9(I!@8V%)4QHP3'0.[L)L;`<38YG,Z7K-[>^S^IS?"OX7`>7 -ML\'N_2,%WZK9OW0WUWW>;]Y.G>"I;8;[90-[(,DWH=QA$@+(L*3>MHM#I:XJ -M3`*B5`;MZE9JFH-_'(`>*K$)M&*$0@:2;;8%DVS -M:;5/+AAM#"-47;6NXWW^,\V_9U7WWA8%FQ8$2Q!D0B2)%B$02)2H*A8//8DG -M/&%9*0.<1>=,)#!,+%DSH"YR^N7?L>'U>MCV/5N\W6W8[2ZQ+;"J,%B%I<)< -ML;@+FJJQMLI8R%S$06"@,)B#*A9(ZZJ)1"ARL8=Y[]--.]WYXPET5[\N#G]G -M:V(ADA@@2!'GH'P\Q]A1@1]'E141'R2@P(4`8$8@1D,S*J9E-3-6:HCSK]+9 -MV>#G=WN=+JV[=VW95MUPN,+;:*)*D+;92K","4#""%HD2*6I$TY;L[)A[O:P -M]/OSUIAPCAT8G$8ISZ^U@Q,C5(9%M"9*PC(&0K("0F0!0*$%8F4!1,(:1HBC -M"WNW.=_KW?A['AS,&&S#!L/P)`D#X#^I9?@)@D+T!9&0TE1$(P+QI%)4?(,! -M"E++Y#[N)*NQBPX<*]K4:]2.QW_,]+UQ?&LB"'-,)`1WH&<#/,ZYZE0J(S., -M8"@L,\!K!@2]`L9*A+V(D4$)>BD&&2\-4=E*+[+S.5VD";F&41[TQ8^ -M?B'[PS*73W1PQZT<,$*&`/@/E($`5"JA!>BRRJ%`9"]$0@D+U$IL9"R-ZH^Z -M00_OZ[YX>''C&+O?W+)/;M-!+#5E2'`X`X2CA!28FA,Y-$6`@#I94`I(9KHV -M1=3J6()@L*H4,U+`+H:O:EF\Z[O^-S9_O!WG=6!V;(LQ\J&/BB-(S@J#'<'1 -MT$O17%J(0J=`D%((06($@0",A"$"F,1V2BZHIS!@8H8":AIXQ-CAQX+.KZ3I -M]QU3.='1HOSN?D:,XYH7@S.R@#.P82]%`OLHI(%A`SK%C(1)+`O`SU11GSWG -M(T&^+]NYN5>Q]&/[5.3JZL#T&3"Q^)3"(8AE$BT8U0QI&A)1G0`/0=%QA)$A -M@8&I`H'0:K"PZ$*PO0C.@>@]R?\C+?EOGI^QRW,SY6YN>I,IE4RRJ51=83(8 -M*023*VLB@,#(XV@H0HBL51/!*3Y*%2D.EX>6.'@=HNKOBAL41'1I4G'`CB(X -M$8:#!@9HB08&>E6$0*K`9&DH="E)WCO!YA!.]@N?(YP/J.D?!ZW&F9=:LXV' -M&W$+B.%P#1@@*&B,#1(P-+;I0"DK`$FB$D.(V&P7)-B^+PW>5M2][XBU9'', -MUM*(:((:#01JBH2B7,D9`L$1!06022T48"2Y@+0)%%#14M)N%NYMB87'=9ZN -M_[?WPS^7Z?AO=/+NY=Y<."G4J4JEM3L\'4=3$'J+$G4C;0.HAU'N+)9`JC%D -M6"0ZA!.IB'56JAU([ZG2=._6['W!^'[\;>CO%QO76RRKANA;<#:TA9=)@C`2 -M2X4&"!+A1D%D0ESC9*N1+`:IH"RI*M4;)U!U/3=2YX&[T=99_9F>&O/Q#E=G -M%,]-L,S!?(UQKZ^OJ20WQ3U)M<4V0V4P5*-F!LJH39C(R!LCZ^@H"RJD9-D8 -M,=H-C:VJH\*7.N?F>B%33,!RY9%$DY(R`R&0B -MA$DM&4A"C&8S&KCG/.6/4]GD[O*?+^]Y9H\SW9@^KVGH].PXF'ZB_@_/UN"W -M5R"13(E6XA-220)(B"1"$!*`$H"(=<0,(4`ZV(BP$A.N3K\5QVZ&(:A9)*TQ -M;B!O;2& -M^,G&ED-Z()!(=+`0!4*E0:52H*@VAWFUL[:J-K9Z(R;>YW"R_BZGD>L\ZM\T -MF:S^(?2;?>]EESR?J.QHYG4&)/$'AZUFV"+9-H@I:-FT&%"B*2"AA-U&)!0$ -MDW>.E$C`I%@,..[J0L8!9)U;(Q!,>/&RWT*P<_F')^>#/&V]OF%'"0YM.EUS -M-=`61V5C:6)[=@@&R(HI-3(6`9B5(5`%#4&4A0:AJ`<\QMV3(7\'?]??W_?: -M?'U+.MES%WQQ<76R9J1"+C"!Q%>#Q0@`NA7D"*'B%"(0!*(_9-#`,#(5),R. -M:B5"D49F-LW)?8Q1!,@R:@QV`O*^B_]_G/?+TU+;=E'`XX'"`J@.%M"0@629 -MXM(@P!SJQ96`4GT[,W"30,&A<#2,NNDN!VP>$>*871ZFQ-FM^5HCE.I5>6\' -MV&]`^CP!'=E3NL9#;W8V%1@%ML[I3`X=3"P-#E$$(^&/$/DADR8\+L!H^$R2 -MM=A'=I%O1_1?U^3[8*SS!,[:;FOU3<#-29H:I)F8D6$*3,J]HU`0F98R1D-$ -M8Q(NQD0[LV]V=V)2FW;W9>SQESJ+%9$74Y7ZI]13IJO=[WL?9YAS-KGU,7+Y -MN.]>S*Z7M0D2"N2!6,H+V+(8[Z6"0[%U4A8!JB/<;(,#L)(F%$"H*Y))"$5Z -MQ%>NQE<>TEEEDJYW_,Q?FL.9X(HT+:YTJ[DN2ZW(`JQDF12+&#"*9%5,B62C -M(@9X9D@S.6T6?`G(^(/$XWC7,RIDS,S.5V?"J;8I;A$<Z$.\%PPF\8+`0B\3)&!OB#.E!FIK,`UQSY&A\;CHS,.#>W -M_#?;FR;>8>/T/L,I*2&C1(=R>OZ^0O&XZ/;FX-W>'I-HVDVMI-FD3:-IC`-H -M8,8LB!':H7OL"R%&"3OVV=X.\>^;_;Q[#V>`>]X/7^H[Q^K_'>M]B=\50Q[< -MY=#9_/\M2D<*:?$]/N--0`.L^[4!Q.A.)G%R/`XQB#B8@`Y2.$LAX4AJ"ZKX -M7!"HP1@'A13PTJQ8,DE8PQ3[;[JS4P0E8LG`R6$]T&,408SFY&-0.CI31)C& -MBG4'.@5;M/=?EU3>C2YU`;QW!IK^E)Z]2%50'T;'<_':SGA6[:67D5L8ED$L -MH!E80)0@ST!!((0"4@@D9)J`BG[MA6\R3(:7091!;_.B^16,K)$RDDC'1&G8A#Q(BA%5QC=ZFZ^O-K#QY`E2HD*1,C;F]O.3*]((9;Y9)R>\OX5`BJTE.2[A`H?=/3DHWX$I(E% -MM53ID_`*X:9C,R?8T&GO*'/9XX@1_!SP>RC$4WP,%]+XY!*)?))`%])P*D&$ -MY?!5>SP6260F`58P0YLLLK@?=5Q^QZW0[Y>3V>?;GKHS?6PH@.72DER'WJ1% -MGXH_C6;QJS,BKTA2UTT<67=3C;7<&*ONQ2FK)')M3>1HZ5W:$+S>?GOS1EU7 -M+_7P+'F8.O@&QID%X['6()V+&%$PL"RBE3G!.ZYJ0&#S6F1"%,1((84Q@'X/ -MQQ5ICP/&VC!.U,[!D8X5=6__5G*"&H8`T5G#4.HPLN.C8<.2KE:$VJ$1U\:S -M*BD\[GXBYL-+QO?"<\7%^T0"4G/^M/)3_B^S]TA16EA&K4!H.L8[+BOP$SV# -MN*AFM2X7JG;;W=ET^U[7M?*]KLX>W:;EJJ.;$=9QHIF[O+J?G+G\?X].@X_F5ZC?<5HI];CP";5'!!K0[O -MIQZCQUQ[W&WMX&7<&X8=Q#U/-A!:DL1/?64(8<,^CLLFI)0CZ@'94P.*P,!" -M@XGPQQQ0D(LLT\IZA2^^=CU+511^)T=?+Y4W+R51&&;XJWMCT:;9X[UG0D5- -M@L_]$U-&P4M?^[&J\J$QG7NHM>_-3,@/M'XI,]8NH:UM77%E"Q++>SS\GEO2 -M)G1^$']+Q=^+[`8QZ5/=)OAD8GW[<^HJF*45!8 -M/XE5H$IWUK1(Y!=6!FE8CIJ=F><]ITN/OZK6?!%4I<;/H"'DT!QTW\>,;&(; -MJ!TD(,1*(F\0C$023Q^K3#*J2,">8"B`L$DA#'&(X&!BA(0IUD7+RB]2KOLY/\L`MPF^%6\;P5+ -M!JLX$:-M6W;]U;,)XEE?FAZ5KZE6=TR]-N64R6$3#_#[G/\9KCNP1:(AU./9 -MBG\D2Z?(&]:?MV_%\7Q)I$W0J[K4P)O,*(46RDGJH -MB*1@1]2GJHQ!2"2-OC:@C``XH009[LPL*1]BA-!!C=PK!TP>P.N;Z,O#\88J -M&=[]?R47F.05_'3\*KZ6&S<90WQRFJ3\YP\2V0'85ONGK/6A.(I#$(DV-.=N -M>8O@AAE/M02W+(>=JD@Q`%+D:/$H4.0+[E+HYVBNC]34KW)*&5=I5[=W4QG7P_6SI_LAZ?0`R[D/SOL>DA['KSV#RZ -MF'L+IUV'L`"GF/KJ/KVR"`5FB44D7UXP9JU7']J_[/A':/4K\+ZO\K]J?P># -M'^GH_GGQX05G5H'G4\]L-"7^CZ?-2 -M1R]Q62]"--Q":-2O=;YU41UM?.$6AO-8!_!QK.BSXT"?H*JW>DWN?<;,NUAS -MHFQ]&YRSA\/U)_3\@\=>G,&,+.S7B'9;&@YW9/8V45`]@QBHD#Z -M%B)'YBU!8PD^A7V2D*2?0C#W]D&5!C`XP,+V;$V@WQX#&0FD)T/8G1.Y-C-^ -M:>!T?MG!Z<5V(G7QF7XB90:MPP_`P[_IW9(#ZS[S$0>T([/X+JG1BX]^3>-: -MX&;*'+*FO.[?SL9BS%G._KD6I^C5*._G&0P=>=3%96Y\L]+=P8/3YU$?!?X/*LX>VI;M0_* -M[5RV#CX]G4Y'?[O"T/Z!<.^''WG.\;L@]D-P1AT/%G34#<3Q1Y]`4V0DKJTQ -M1$121)/H$^+[6,!QI23S^U0M*OHM6LP.('P4S,'21\^`<5&?.AAZ#CIL!%-F -M!LY.#@GL._:L)2/YGF8O&"UTM/LHR%*%=DGIT:#X?ZYYC%#RW"ZG:-=PL`\H -M#L"B93=3J+#1(REMQ5K=&"'RBHM1Y\$+<`SP0Z72HK[?X-@5Y5\OP4:Y\ANR -MLV1@8O[RY[_ADI^"8,^.-56_^\JB^U$/ZN]N0C^H-!6%88H, -M.)BZK/-)G>9-@R9_#NNML\IS5H^/-!RG&A44_;(/I].P';K[QYQW%Q&5V>?_ -M;F:\+MG7-->[9>MGI@,#;NTG74#&M]CS=K0MK,[O$`,\*WQPVGXGB\3:\5U: -MH23QY)A>^O-45MF@\M;UIK6(4X"G<33\?>O]_9.A*+Q[K(S.5M;(MP7:GT.; -M4'&D.@:S46EA'N+Q9NHPW(">J871RD_*T3O<.P>*K_HIC9GDG]9MK(/<#F%J -M@9OL8M)F(A>JC\7I-)75DS9'/U\8.;T%[`9W#O1UE60@G-7S5RW1NTX;DA:]H+*WY<)( -MQF-], -M(FH2;>HO:)NB1HJJBLK)I#Q%1=:82-D:.,ZRA(E27/EGPC?;%MS(7LZ4 -MZ;]<]6NDWG2M#"CSH*B-G,-(AJ$)'U(QQC-YX@V@B1&(P]!""JL//8!1"9D0 -M]"O@V4L(STR*LG\=F.W>VIAL_5_(IB'RXD?91A]4S^&?)^2?)[5+\A$#P3=O -MYBZ0]KYKW"N-%K1B3#/ZTIR9K8Z8?2<-]RR"5YY0J`G1N?TPW/WAG2=ILJ#FIQ$!C)ZUK!$H"_Z%"?\VV6O_@/.IQAA`/ -M5V=Y?D21G+"JRD%'45&W\\&G)7V,GLBU1Z$QGR^U -MNL9E&EN#\2B-A-WEF#15&?,+"#_+>S-O*P.7COG?7);1GP-0[1+G?MW_NA.0 -MPT3(-8GJ,R^R$)N[*=EA,VLS53L.X_;_<$^AX*['$WO?,][[H^/ZRR?%$9UZ_:DGQ8JF1D#ZT% -M8#"'UJJOXNU7ZS_/<)'SE2'A9!"XQGS1#1))!!<(`#C$A`T0'4,+,&-A%PM( -M'NWHN!HL?0&?I=,W7`S]M/N9S6Z"-X!@Y3G@V?8VCW?K+8 -MUZABR2.V2LRL4=T!J4(]?)\B1CO=8*Q;\J[*\_#R@G4@5C,X["?OPP@S\BD> -M^*86+UQ87_SS03E=_[\<6;_0?GE&^:[?EXMOC4T?[C.6,WA_7-^N+#"^X\W2 -M*N*Z(<6W5;#F5K#V+.)QY?-6-8"5OQ%Q?I1ZL:1]7ZJJPV*`''9"@4=E,#+L -M8!I75BTTP:(_!OH_"5^)4C;1NY]"LJ),CEL9I\#@+OHK7`#PT47>Q6%7<<-= -M8-!#!3*M)!B -M2F1^/XQP56^Z9=#E(B_,PWN@.U7\"NO626++K%8769KM;`TFPQW0!=>H'(9, -M#9@'CBU^>@4*.C1X078$XT4N_@;)+S?2O;]V?>7OAOA2)8 -M>*.+JES6;(WV\_@+?UP@5G)E,!^@G*3":[L"T5RF,#@BIK'?CF#=IF+I(HUI -MQ&'?:!B+>,$QGT!C!J?@CF`L+P_>*X"QC9@:58\1@.Q/O2VMR&2)M8_MMH.$ -M[&A8-&.[E5?"T4KG993<-<(RR-Z-!::Q@&L._;-9?`,#K[:+!P5)O,WN,^IO -M3>24)IS]CB[LZ.;U=?#(2%BZ5X3L.MKVNTQF6UIH2KPAZXAL]`1_I>!$9#Q$ -M=-Y/-BX@NC+ODES$3']Z?6J8T+5BNMY.N?,?3G)#N^]2U>(SZETO>'SE7&E\ -MA$YMPSDP,,*U<CQAZ-0_HA6C -M1R)V!I-3^NTT5C;(<3@V@_H=Z;$*=10AFUU@I?M#^I<%O%IP,#++Q;[%?BAM -M$R<4*?,[D36.,,#G.,3PJ:9LW>IW>*C6`8:S -M+["BV=P-9?/%HU3=4S`->/RGH*X,/D??G-AY_`L,?*RFI^79U&-B.1!6$(Z" -MGVF"NM`75`?*3.9[$B=+E,L'DM!QK:>-K-PQ]C?SGUC/(AVWV_Q_LI]D_+4GZ/45('SV)44'Z]*2 -M'[%"7]L%BS\"DLD%#ML/G62P#C!D,1'!,8B<]^-^:M:R4(4![.FM!Z#Y;^\, -M[UXC^!3*OD/!(O;#1;K8=QH,#LISY!^"4><5/N&77I&:[I4'&\\"S-,QM'5; -MLJSY/GA4'E[]YLLX@+]>D?NPF/02AS=\(P1>;D')55L&@UGD*\P!!,N6*F'9 -M-#GQ_!&I>)3IW#';>;WD'.1G;YY)'5#\U8]CRE;@6Y:2]Y>@LVS_9O<'M4N< -M3P9FS)PKX6X9-.\*$(!Y,WW4>[1796#-IJ2?2"%Q/_C=O+55UI(X[ICO`XG+ -MQ8K*@=D@7)H?F.&+=^IV-D+E!M;5"V<6PU]%\=/Z&%#OMS]L`-88.C\7I[77 -MH:*0_9B7>V/;(8,*/^>1.ST]1&+QSSI#=D].F#U;>",^2(O>8#M-YI/2$Z&1 -M;R?K=.@,R7UP@8B;-#:]\QGB/XC)LHV8-$NR#G4RR.BP\?C[Y-](1,&_G'IP -MG/`G./=A>:IAO#"9/7^%VT0_4QX$EH@<[]QCPH]);ST[7[5/J)]EB_6\DC=&V3PZ@SC.81#:^D42JT/%;#U%3)\< -M0"`OFE&A3H%+9GV?@"`HZ17?R3U?#6C+H^@\)$:)<8]Q!&PXH&NYL;!;.DTI*7I\+Q:=;Y]O*2S*.594W8F -M8B!%$9\RM>*:,':\!H$[#Q:TP&S(L(DXL>?C'$_F('U/:=4<+:%UKLP&>!L@ -MX"Z5E,\`_&,)\P!'EIVJL8(P)_<0GD,XKU+*1)]JE3]@Q83\WK4?XG^MCJ!Z -M5#OJZEFE.W$[4'Z"?;6'XS/`\_T,!_50[F0YAD7#R9P`X6:L@V;9S-V<>9P: -M->LR"$':8UMS6OTY9.M,%6:%%KX75H+P(4 -MJ/E\WS?^<^)8[8+=IER"5WYCW?:BC?(50M_E1CBD/=EZ/TD,D(/H6&* -MD=>:\3G3<[T&K.EMG'FJ[-Y38'J/*OPHS9:K.MV.I^FI^,!!JKTM@B16#[A6 -M)Q!5UM[@M!I2S-I=X;R!>Z)._Q"H]J!`:+U'@8[;EZQVY3"C/7X14+[PP#I0 -M'R'L3IS_^["D$SQ5F-?=ICG`/S\-4;)KH66.#=9>T-OMWTE[=Q4.'@?+B3P> -M8H51@E//_BC17&A;UX9]^-#_8PN]JW(Q8XYD,:"]7_07=\\DTYN(;K*HX+SZ -MAHH..,&B5$VPMN8,"%HQ%ZXEMM[+O+,_QYLKQG+G3H.$-KIM4>,3:2IK!Q_. -M8!5XB*5C=KVS`G`*1DH6B&^>(F -M4M#.L-Y*[FAC!'.5O5-0Y'5+L&.TC[0X<]7H-]&&A+]_5&FO[CR5C!HLA*!I -M-N?KQB@_ES9Y78I8WGM-J-EU3N*3]LWHM][SAH<]F!9W8XQNX)^4AMN6K-%[ -M4ON#XJ!;-F8SD]-3D3BM*@A%F'1YW!*02JW+X'-N(M49N*+A&L:PM:X"IZ:X -MX%]2V-`7'JCG&R+/=F>..D&:WZ89_M\'TTVFEU'-[3%E->6;XU-K,J!J!NS5 -ME!DX*%I1;WLOI3R*(LV_-\LB=C"`L#"`8K0NN>E)CGYASQNCXGW8@<\UM?BH -MP1)^QL/<,Z7]'=^-G]N?Y[/I6*'+H; -MMZ[X#U=X_=3"!O0ZQ7^3&[=&/I]5`!OIRP16/M1@.WYHES'A;!X:KIAW6PL+ -MW]SO..`/Y1AVBL389V6:]C0X1`:J%JWKEE&)CM:W=&P^7_'F[<05#O^S -M?"[^DGR^(FB!35P"CWLAM_(OZLQ6TFDM&W6F9EAP`^5N&3%:7946I%#_`5PJ -MY]\PP-VD6VSZAY'YD1+M<+_2^#$':4.F_/J!H?KML?!T#H8:`X$30]SDW@#! -MA+>"*3H:+@FBN(\#:,30Y[I3NR67I->C!*J1K0U;EWUT0=*:_GQ_G@KA;ZK_ -ML,IM7E=E>]#K-_D-D+3#51HABC0+5:+M-FDNZ$6MC\K_-VBI_0-<=LS"TM18 -M?UNTT[]$K4]TGB&R%"X\TV(0Y&!GRR<\=]('37I$V%`3'U.X('US+_^C>;M* -MNTC##KS-6,_SX0\3EA;V:E#B'!@^'N%OZP#\#UA5J5YDFX^+8&$K:A^4_U*M -MR0/-Z<28[[754/#JC@V;KG5)PC.1*Z -MP:@%I]/86BI*FA>+WJ`K6PG;'XZ[0_LD`=_#K?^"/WU0/H3O@'#-:,H*>@!^ -M[L#P"MAE:UF1N?)Q3B7IU;'5,JP/^CQ2EF<'H<\L7.B?=7D\0@?3OQPILT(E -MJ%M46O3_[1"_9OAB:PFR=`T9VB]$1\F"J`AZD>0W=,)@M%:5$''FBN/')CXI -M-3[_F@Y]=9Q`&R\^\-CG#]\@U,!19S0UCA:C`;S6LDKJC,LZ^.]D1#C`.SSE -M4S(23!(R];LJ9)=+[O'3/=]Q5+[E3UQXG<_#U6MWAH5\N(&.+2U/FXP"F8N2 -MK>"I-YY@"WS)PP.:L_PS^C"@3AVU3>%^NS.T2[M158(_O/'8RI*%X)W(?O-% -M311H2/&>0/!Y;UN.#RKN]=ZB0+"P%/1G-05OX=:;)NVE",$PY0PX)4D9R@'6 -M\XZ!05/A)9P/O%2XT*7>7JWVF:7`TCT!S3`\T=Y5N`+,Q_$T*,Z4[Z_2+72M -M-@-?J[\M:QFH^^0\/M[VB`[>X-*X/L[^/-+.6H+H?#G&X)H;RHJ#>_SQ[XA^ -MK9(GBR+039BE)9<"V]0=+U\$E5M.B0.3M=Q;'[ORRDF\SI"+TDN>_;Z6!Y+- -M/2F2,AM/SW'>+CK`B4^R:N6!.RCK8C2N1V3*D7>?CBX6(VG!.OXP'A,].!"\ -M*T[,VG*-W1W%N_VK,+'\3"7H-@:PZ`)K9&4\48PJXP+7KQODI]3["<$1J&\X -M:K>TN#/K"W3J7BQ&K450P!+G>#0G+2>]%[0B#U)>WR$BE/:8"]"LJ6OX_.XJ -M9#9X]O'%4@]ICX+*/,6M_S'*2,GFTUG8\9(##ML9Q3L'^ -MOOZ`)`8O_>@X$^L-<:F^]HQ?S(-W=XT0N]MDQ)+<9@E77VB[ZNR"07W@X44D -MI+P"8_)CPA$`EV"&R=]K/G`!%%:BBE^*N);6US>=77`)/46)(*Y_'[A%[T$ -M223UUM4?$JX"^C0A_#T;U,@!:W11GF-MM76UAV!`L\RB(@];9_DTVACSQ%#9 -M>U;ZX9_<#^SP#^(B0A)S+,)%39;7SV6Z=V>";*47CN?AR?82O$-%9IV"J]A$ -MZK7ZZJ2')\.;J`?!,6*RQ316:^O[?H_1_K?W2D0A?5LL=P'B("*OI$H_7#EG -M@]+_RR:%0_G?C:_4A(O!]C^[;3&EQFPOJAXENW)3PY45$,<2!\_/`&DT5\;* -M5G]\KX49P-6[S8+;VM)K1E&AAW2-_/$!D5(?D: -MW7'R*S1Y_D$-!;..@[3OW:KCMO$`M',%>X^O]1\OO^R7BRWTA^JB0_I"0YF& -MS1HNFC.;F$_Z_4B*0Z6K\3CG1G/Q@^N?)0\03)L)Y]EI,^!\_;D1_7+;&R.N -M,CN%F^-@L1HLY/Y;,W?X`&T272NQ9*^.J:3Z0G,/@K;B8.P&P_R[]1G6S]CX -M2L/HC6Y/<0HP&P%;BWN""6_G7R_YZG#1@.!>O4<]YD3E&Q9S'3J_VSUYLMMJ -M)#"BRIEWN&RV<[\74L9G:K.'`-*0.Q(]'\Y#VX'R39&@]8UFG%W,+Z:<"[C; -M'5_6,8YLT!/;2$QE-F_N0AC2ARARL%S-E+:J'*MJ(@Z<'#A77>TPE)33FR=9 -M=^=C964X[T`Z_RD[!_1P/0AOD'21@/8W94&:.U4'=&3F:0J]*3I_SWX7)'[# -MY!^J*V_J"_@\9H4;UU9PO99[92.#K[VF`YM8)XV%SY4V]:(73M)T@TES\PY' -M\@K:T^"6FJ9NIP5M8X&@.?@=@P@#UL:!?3),=!RZ>]^AH24S8&P20?Z[6+^_ -M-%3_Y[FP4]^#F-*:D*O9N.\20490'$F29KM9G$D%\EWIOQ#.M;DN)5"C -M^B`$#L\O.M"BI0.*^S9YC!:;4+SC;<:*/D(,Y'^3#.%/_FNWV@+T8V/*:9`0 -MJ?IXO>WQBX5/_`R"D367BP-&<&_I+9(,36'BG9H_?+"^^R@#"XZ[X.$(>`W& -M0TP$IY:$V.UZ<^:'F+=\HU$Q>9F9+*YVQP.WEK_+] -M"]:0J/F08O&5=^G0V4U=Q_O?30?Z`IJ^&_-@5:/S-6S539%E8O)AC=6&3.%- -M_]3XWCYWT]-Q_!"`5O`6#N^@;`F^L^Z;4$,)TLV6Y.ET.]X@-1I&7\XN/YM& -M@(/V$#;G<&R(TI3A-VKE`+<..U.X -M)T:O(R.#*?@T7H3MCFR*&I,+1!DA*7R?/@^I&"Z;W;1+40NEBN/'MSRAIT%; -M$4*`AQ_]VO!:#Q.&!W"GI'3^8^`_=W;;4A;:F&5#@#.^U)>I8-"PW4:!MYZ* -M-@Y"@-V8K+2_O#Q*,;%@EEJW.@8[4@L&.JG)TXQXM;H -M,>1>^8/I7(L0O%F;W7U)P2?"@048V.YLJU>ZA:6`I:-+XRJ?`W -MJY9=,+.+A38T'W)/@2JH#Q4:[X#Q";_%(!2;6UAY`Z!,KG&`F97!7#CAV"&/ -MZF0VIS-N&GZ?S7=H:*8*[C36JHB%)WM!8#69@\4_W5&#@$K_`*;!S'4!;\1I -M;X1>W+;":.%.S_7(O;M\3:JW2V!\JC@D7O^-W\$?!BCXV&G(LJQSWO.-O/`< -ML*LZV?.B)$.TFFW#&9,&4ZW.J`)1\5=4<5-(/'7-OKE07O^UW6R9T;[C2(`8 -M_J$=P&V67*1``XZ>Y"MCS59"D#O9-)'JHB*TOSZ,E0!,C$1S$M6QXD_N@IG_H>A.)7 -M0QKP11RIQGGA9L\+_B^$%R\&ZW4/MTILWR$$?3.3(\8A&Y3B(D1TN+PN81*N -M'&3[+BSQ#07,&X\T"&L-.;^($Y;Z,V-7^=X0S[;`476`$E08QU.%(<2!(6SD -M:9(TOC4Z#/R/[1NB5`'/P^(V7ZM-!]."(B'-#O)N;`;ES.;8Y -M"<,`;JW06_'T!ZI(O5#;%IHR[/ISOMJB&F=30HUG'H6T`-6XK(J"_H>&#"43 -MW18#G5=TJ"\[\3XAWUOF7)#[4,=%G^)GR+N=MD6M)I$-R0G,%LN;!`-=Z,^U6=X$:'-?R*D80&O,`7])GB$#?8C -M-,K4"5"Y\I@4@9,]JS8S]$"67+-,]%^M_1`2PR(S9O/._)_`I31J -M[VN((A>8+I5TR"O@P`Q6&AAF,(!6`KMGU:*&07I90U!:[(AG:J3W9#@=;J'K -MY?JO#%0!`5.ZOO)VO+T(Q$X$X=P63&=-Q<^0'S:F*?C_ZYT`7>ORN[/C65I$ -M^*\0;%_H(RA`#)7]X[\H0#%KDA*'7\X\)8_#(FAH5\QB4M/YW7QH4,@:?S^EZ[_SI$#5A/,R?;_2]7I0#\9)#5 -M2/?45*?-[;XGCL@0`$-IUN+NXK_=,I$`$WJY!S"8^1;/Y\@2<.WS>^,J[I1'UT1W8G];+J"`$'Y9>L/[3 -M"2?MF_[V-H8>`)4X%5OW2ET&[2>'^?=:.W)UC"VY-$1$C5M%R^!7X7D]5KZ; -M7C/MK&]]6I`@BMS")#GF_/UY#W+R1$"&U1_3LMQA:JN -MVRLLTT3W'S-(0"GOFD[_48TU>OJ\86EGB!BXGM?;<22F`00=MWO.9Y8EPYS' -MR6B4VU9RW2!1T=4!!GIOPD/*]MT[-=W,S'DX1$[32"TX+I):?''N/D`I/IM' -M4OBO@J$>9X2@^`-HD<_V2GNMVOYN#7DD/$Y>ADA;'?[BO4P!W*N*CHVV>W+\ -M9Q84@"C5^1-0&SEE[#`97J331$WN<>*2Q/D!^#\+&.UU<<<`"6G]6]3'FJ^G -M92&9E=;K50=H?!!.3=$G6*J\]@X<7B*0!,-/C125LA;!O[9$%/*D&T>2@`1[?E_6BXQA<='_(;Y>7#JGTJ8`9(T["8PF>E%_ -ME6^"4.OQOY.HR!>=P@2W@[ZM7YA-QSAGQED0(+ZL*M=+4!*WPFN3_9<^"&IW -M?VY3P6\H-XPM4FFU.1K5K[A[$IQ&? -M4[C]X^*D/,671D`)/LW;,Z2(T[*F\1[NXN%0`$OW'2U?8`B&G&77Z>XBO(T; -MIP3I$'-5B/L/=U#&XMBPY0SBDD`N=R[07^H+BZ-@=&C -ME)`*>1:EL0:3C9@(Y,245D=UZC&WX,-)A`!OL2NPA -M=U9HR!)=)XERANOX4R`;(G\IO,1$0;E -M#I3)2^`/W+)&X;9'QLR(`!\SNI[]:!W:.O>N'$L:=K1DHR!62?0_FNE?;76W -M5W:)AFO\4R+W5N7TV07)UA_`_"UL(-$`%WSVXC9^<ZD_O-)1$6O^4M.4Y"S'+V.I<;/6'P%.R\!3FZBN -M'O,K*'CX(8RSB=6NNM^"TE9`-^`J\@);/\T1`:A\@DKJ -MMX"5DZ5($U#F\/HH"*1EG6G)H8H=LF"_`ANFJWT]"339WT)`<7YR+V!A_O:7COO> -MQ.ZO,>;EOJ2`73]8%-ON2*W]T!X",9R*)=+]=CWYU<8FOC;*PLJ9+(A0<`%C -M';J6GLB=4,ZU]5$17%S@>SME_81ZY.3H(D^!.O`"]E]Q -MS^<.YZB^7N5:`X7'?K3T1Y`7_S>W)P\A""&KN&H\-W-G``!B-W9LDY[',0*7 -MXWP\Y[ZP+;TZM$TWTPF86+23"ROSX&< -MQL'G[;HY7B2R$%/]T$P;O/PWCKZ3;/G7LZ[\K*41!O;VHKGDJ_$B-68=..Y\ -M`17>(35W$KZ)1OCY%#3X$91/KA1#'>IR-_)"0&+I'1=-/(2<]N6[29K#I4!$ -M_VQ%Z*C`Y]6:];]D,"O`I`!PW\%YOX$X]3Z3VW-XI@LTZ^A/)C6B!-SR!?>IK$\GH`>!YU:_G^[U^).")MO_$0;<7L+$\*:%.^U$1?80>5H]SP -MH30D,]RUB)?DL`#\=6D()@LHJY]S.P'P2Y<2P']T]3T4:/JGR"UU,@G@@\=+ -M0O`E)A?Z:TA&GC@@WBA6,&X/`KN^NV0@*599L!]YSO)<;@IC:<7,JE$!_,EJ -M`C!0Z5OMOF,2ML&A@41$VZ>YK`,+,<6VF]4C/D2GS>Q)$$<7OVR\.B]F,]NP -M0J1*+?#9LBR=1)QVL71]4"-)(IL`4+.=%A"OVM^CM2#:;;'A,J#;&F$1+V+O -M`%BI;**:12N[VO%:Z5((@QQ$@25,M;D-_)GB&Y5/F14?\V7B_[;0:B@`?,Y2 -M$5_]MPU?N#$1UU3!$(C(M%U;DAB/Y5_YGL=LSH`7$L%?T`6NC0C[N'A?7*&0 -MD"_G6!?!\CY[,H]YQXK/2QD<]YT@`?2& -MC%7R$)5.#(;#':[*O(O2S_6!YCFLGP/3X2`3+T9A9ZG6C,NUT"(A[D\^"QTO -MZ^AL>DEZ=(EM/*+DL%1G9<1WF.D,"\<7KR-5-2XC5;PT!]JF" -M#UF91M0-]]8`AN+`OF5IBLRVA<=>4]UTI%?=AGG""_<=#19D,)+/T0$!F'2S -M(9J,WF.FD>=P6!4X*,B\^.TO@(\YD#SD@`9_G@#ZJ/L6!B)[#D4CZJI"+>@!PXK>5-1R%,%[J.C -M(@DX%)%]!C?*VB4P+_;8&^(J;`8H,W"3CC-:(A%9"80+R@"OEA5",&HL?,?7!KS01D4[R@KS)`#K*,/Q,M>"5DJ(9=$"VA`+75HX9);&Q/1!0?D9!DF=41,JW]1WJCH -M,0/D/ART_6D,OO_'^^M!8[9(`*LBZ2![=N^?EQ3H"%A1,#\`557[T6^2=M,V -M)FO6T8"9>)FM($_92'&Q@?#ZIGO+HFV5^207VA#'Q\K2(-UV\/7`"[U%.QGW -MD1D^D@L5>`N?K\MJ3@M.?Z"9NE'GWXZ"B5D@57]J39)"JX;MHQ_2[FX&7:/( -MZ,B<"''G)T`,5W7%G7=P23Y(LGU"'1U?2'!T,YD2;T`(37A9I'^IW5(AU]9J -M[+2\#*=#Q(2%CE)@$/=R/Q!B5\"*50$HU7GE.^^D0F$(AL\6E:X0$ -MQ=_M83[A&7=\MMQB+(72,(T>YZQ\OB[\=M?P0]%UYUZ8Q.^/W:GO39"FEB)P -M1\S0+W1K]!CT),'6UR20%#&CNO24EI3OCWFX1@KV*(A4V6EKEP920LI%,C`Y -M'6@EEKY1$&#=;FO5;T;F-9HVY/)")6\DO3S0!?/RZO:IZKF=]PU4,C%++$!. -M>!IA'K8\Q$C,0D6[\4H"&P2,8?*DUH57*'54 -M8"Z9_2'37'/[0RX\3:`@XUW*?B!8_2I?VH8:HE76#3IY(%S.]($2P]=G^N_L -MAFC,I$+C"A/>^0$XBEK^U\7Z$`Y<0\W--KIV;`!P%VIW5B#70XH!8O!:+=Q"BFS.;<*U -M>N4T@E`%NJ_>2Q`FY+&EWE'G)%+=*9$!5.1`-3_<_7&C?QF1YTX/9 -M(#+SV6'HZDHD+R`ONS@M/H/'-R$EESXY+HJ`F#.OBQ#Y2?#TE4R';(MEFOL6 -M6","$N_U-%=$0_JTL+% -MQ."K+3NKY7&"0%G?*G_EV?2`W4-\HDJEJQ$*D!3L1`+"U/8F%3/?81!@4:ST -MVY$&&HLNFO)]AH]!91%J*A,`)>`,0)96L"M3OQR>L9:"'"=3I4P`N&0B!]4K -MN!/0DP@R\,>4R&BLR!2'3W.X2LZ'CYCAOI$*R`/J=XO(9I1>T/L]O1:QJ6($ -M!3:!D\(M=7G&R/;)::;4P:-6Z8.B(DBT^K/SDU[J:P`N503,`J5.4].I[Z(./"X?*S^K!%">>`:5F[[4A>1%E]1X+D@+/^?,'_.8\2$.U -MOE,%`(9D@!8S]XO7S"U.1IX=^+1CR->#];K^:A=IIF>.EDU7RT\/AHB`JWRHS6Q#^:243'3F_ -M(AG9*`W5/L$QXC'0;3BG2#>1)C(R/#9H4&10%C)/1D1;#<^N8-P5TIB80#S4 -MS3UB(O1%^-ZFK+/UVVW$L:!`.L5);#2]JH];,FP8E*XJ`18[2J?OU>9//>>A -M49:?*\:BE\H")IH'SHQ50P#:QH4POC=G`+_KO018+U=]G@IMT8/S&I*8$AM6 -MGNWC.`34J\+R*F@,J-4>A&1B7.D@*]:(`0@B'!1HDS@'C2:WKJNC"EJP1:O> -M]Q,V-OVT0S*NG(R$'2>?H]?]%L$!SV;C+ZJDRSY'_UFHUNAE0F9L,1$$/1@E -M.`VORJ]R8,'C?VX,>-#"F`OEZ:.]TMVO*Z5]+>B-,=LX1,!!_8W=WQ^A_NW2 -MU$]I<80'?F$?$T:TQ<-`7?_J>Z[KURF99P`.KXYJ2I[?7'X+[_/R.WORQ$3( -MEV;"IG=`U0"QHCJUEUHP3H2CI%@RFV5L]!.[""+>TSWP,+L5@5^0QHYKD@`);D%:,NF9"A%(V1LK_TIM+)7S",$083.2HU,IAAFT'XT4$ -M?KD3U7')$I1"I._]\#P!!78-ZZX%HIIC4@)GI="3J]'-G"($!/F";"$X;)_"2&TDDA)\#BWJV=LP`]FAV799YS"0\=-?CU[U[ -M]/CISW_1L5^$A`#N#].H2;S%@=VHZ>RV_5"=L-6G!$*Q=R5^L65DQ&(P(P&2:S4C7` -MI8:*T>=/$0=6%U>^QJ]19]OB[<$K&%()RS

-M2X_PW\A4?`_T,KO6V2"`&K3MT,)!CK(Q.$F)Q>PD._D?Y*B^4D*2DD`6%-K8_P_JX2!'5M`WMGAS"KQWJHOF+*UVOQ:T[Y9-3P0*:WWIXLJ?C- -MUZV=DJTK6B``2W7?Q^C,9G.S@>+J0P=!_WD]A`#3_>Y.LY!9N]=.H@! -M5<3DW_A4"O%8FJ8(JMD+#XY#2LZ&2YJ4@!!8^J9Q;X_04\]2WO:]/KHT8(N#N? -M.RP'[7_8W^LB&QHZJGJ<0EMX$D^/^9T'!QBWAHT1$+>ZL+"U4V0E\.+S$-7& -M?.E_'!DT,GI3P(DFW0K0NYLF4^AB>9#5?NG)A+!%U^U&1$P=C,+:I:Z(R=?"9MF:$RKNC2@@'_$L?IRA.PM&PI@"V4DW;=.NQE$!G*O0 -M<2FBEN>ST^PK:4`G?N8HG(2#9=4[9NBPU,@75J,&4W(#B$5)7,">)F//)?JD -M(AAW?&JOS\C;2`8+C-,ECG&;S4V'-F2`BPY76`6C*^TZ<3!ICXBW8Q+(R(IJ -MPD=_V;-<]R\W$)-FF7_LY%TD10_/HQ$.J)0(EAUOI;$\Z-U/"3#'J)?$)`D@ -MT\)L()ABS_02AY,@?!#2]]K`&)V-5J5[<\[M]U\$4M_NV6/ZE)Y$6/%P&&)" -M@##\T3#,]>TX^FMTL@4^0$9,B46EIO_7PTT?JDP$5D\SBBVD6P38:VFJ"(9> -MFWL4HA?5`(4HB`C77YOO')]QKNZYYI^/"QJ>B(%>Q4-LY?.D'#;^-D.`AO\Z -MRP:C/<+\M"$$70[\XF(*$95EYG<%2A1GP0B/7`R#]N4>DDNA506P\X(M\*3B -MYPB@%N)A+!NKIQ7;$^,XIB`^[6,,>0'(WC733>(+6T3*<5RPD$`Q[ZGZQ%$R -MK>_NCIQV9E4NK]JWP)0!6HSR:0_@Y;)SFUH?^7TF^51@A083IZWJJ'*;HWE[ -M!B3-9KT$IQ=$D`$VR-[!;XBS"*"^;+RLFF!H0@#Q6<6D..:(%V[6?%W$:[E: -MW1;9L;^3PJK7V5/0H2U_DO1=@J$OY%>3:5662$!$.'F[;RI9 -M"GX^Q74GI[))>;981@$CSTG`D#;II8WJ2D_P9URN*!((B=OJ<[I%%/N23OH] -M,.9U_'>;^(20![J&#(A5/G*P8MXF7!FZ+CJFH1P7?K$)I$*S-9JV#BFLC)JW -M?,)92?8D\_[=:E``13__IP%L$]^JMVD*JLCH@_%VK58MEKU\E-(`:KZ10`? -M%J[A`OY&P2@0ZF.Z8`A5S7YA.I5[$)0]#8KPJ2`%&7(N_@Y[!`:/8C^SL -M7UN+$XNDTE6R5"40'77+[7T9"S7[+0O]A0LS,XL28`%+NXOFS/%6`JZC?-]M -MM.AUDM2>%,!;B?!+":PA6=>AIF!SS4LBL_CJT)$XYC7R'FL>]VVNNK_O[)I$ -M*F?/_ZR$!E\D.K!KH5LHV)LD:SUT]/4KLCG"(N7\G^9($?A?^_KWHR_G_Y\; -M4[1.VL/[3@0U4S%LY$)Z,P`ZZG4U%#5?#"1D7S[WW[9%XNB_<=]O]3PNVG64 -MDGI((2KQ#XC[B71.G5+,;_A\3XW:(`#X)-!4:M>(N\XL;V]*4&H[/M9*)%92 -MM7FVB:``R3`!2HD$A^&FX*?Q3O$<61]KDD@BHU4!>R?]8Z^?][&\>5$"'8B- -M-)D`Z2./Q[,EG+YQE=6>W`'Y3P0P1C -MP;\VHB%?D)99.NY(&`&/>9NBD%\4BHID!;K7NR"&3LY+AOU0_;[1J -MVX;__9AP3@ABJ4B`$WG;6*"X79OW62Q*;A)B`P5+H31`?$7O5G7UG-#JS-=Y -M]+3[M4(#SNW(GM*1"3'.T>SU\0C)U2E7AA_7T%Y(^M(!#@-W]D0I:`SS,V"W -M=J02^2-RUZ-"1"N7[T`2O/2K%7?^0W]M,9!2Z^8]\FF`$R9ER4D/:(=^]8 -MN/4)\\G>JG9PC(!IK`_=?&[B:NG*;0$`P_CQ+$:0&42BW*HF4$JW-L+N)K6I -M(*XFZOP@3@T]+P`-/@T&,KZK7``L\OLPB>Z0SFL -M9T+85;%-("3U;S5$6WE_,-,FUW?8,V\)O-MTD`?09,@DP&)E(_HU9\"C=MKP -MB(;[,X#:Y=-S"O=6'1:%I88?3!)I`>F@[)`<&6/G#O>:^>Y&0ZR30R!$ -M(/Z]I?I+A6C$(++YCND`G\G1-QW2Z3N>WP -MDB!?R#!.&Y^9%VG.LA+W^89(0'[/I$4P\>F$D-S0^X0]OG]:.]2<"4 -MJP@)^C^ML,>]8_QX:PB+4;/9^0$&.$_#_Y_BT?7=+#+E?8.3AY]"FD`X8Z:(0F-E -M$Z2S"6DZEPH2`#8@O(FHYW?+_X6UWA?QB)0!B(9C:$1Z\"I9RD'']_5,-=7# -MG7T>ED0JZF;N_NUT><`%6I9Y^<6]`G]Z;T",`;JTL:4@/WRF7DC8\^)RW;DD -M0'X3N>"&^?&5N&_2\\\]])<497ZK'=4B*][<)H;]8E;L;)9V,ZN[+?)8&]6: -M,A%#:O^@VN#*.OB6Z%&1>AZ:@`)SVIC6F]QG=]FH#(]"SGZK=*.^3@3]KI/T -MN<`1#G?\S=B^5J!^J8Y=1C8U$,1$E?#Y?N6]29WZ.CAD$I$V]T@*+N?]9 -MEBHVFE$`&YR1%RT&CE+E:VNC^2$BQZ\1#NOFKV4$_I?CY(Z.\%#FTR'ME4`) -M*7*^8`-I.])!NZ*3'*3^!/J\%,0&E@"`NZE-9P.'=8?0J=ED:FQH)-Y64XB' -M<]OV[G7_3R"*.0Q+=UZ=5XO#9.%RUBCLXGDP`P_0H`$8""BP8R\=N5BNYRD@ -MN[2I``[T``5GK,GSKOPI_QC,>Y+(03KWXQK(#.B8\.&F0U.MIT]#XT -M<2BB9=,!"+Y5!X&7;`%LCKDM>2'S6K<%WO(P1^2'FWM6N(0.1GY'^RI`>;"]N+7P4@9XL172P.,X -M$0ZW98YYBB=#JM+/61X.>C[2<0%B`5(W5>C$!WT9CXW+1N=EWW163@O4WVH` -M'<43H?//N?_:2-6`GKQ`[U2CDX%#V,URIF:(AYQ]]:T*W12,,;1HP.MJ7D@3 -M(E^;+3JHF[$.E<)?;N/TL^IPX/5^5:(%(,?BH0!P4=YH>OG-UU--,)9!G]*; -M3P4(1!0QZ;)L^D'U$H*,DS'0&74[G>@%NH7&Y%.BV1QUVG&])T@Y*3Z/Q!"N -MJ0>.N4BQ;VRE:),!6K6"%VOX1FZM/!?I2]UECP,^;SE`F$!.PVY\6.%!9@O' *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 8 09:53:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC7F0CD5102; Wed, 8 Feb 2017 09:53:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98DB41762; Wed, 8 Feb 2017 09:53:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id v184so14755234pgv.1; Wed, 08 Feb 2017 01:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=kHqxtcO847xW+nk1XzTowkQZw1FT0CiCbUZAp32u7s0=; b=WoEVJsSZM2TW5TMFYUr2oAp8cwnzxWrMlBjkJOnwjOny1ibng1ZSwTZ6lqVZ2wAuI3 qki+Foy6aJgmhr2b+THJZro/zgyjD/dj6VwXelONbKIjqINJNYek1rE4tB2V9mF9bxzJ wrSFQCZV7fm2LcmVj3XgEp144d/nNAlhk/HbnZmsED+cqQYzZCeeNf3+TqP0WR/qUHH5 RVjJJ/2M0iK9MWar6dU6K4u6+i7txm69qgFsQvf3hOoM0aVG9mpf1+PdxpbeDh/VKDy5 yOVAUNWnwcpBre1kMaf4uQ2xX9VMs+6NRTsoClQQntXHKVzH9327IMPCMOYhl0osKe8G 1jGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=kHqxtcO847xW+nk1XzTowkQZw1FT0CiCbUZAp32u7s0=; b=IwbRBRbKkrcxLoq/4K7nEhe5Jy8cXwpK926j6OBk1lUB9+yvOizY++mDaDNKXXQlT1 DfGB462PX6956weRfAS7RhbvZDVz9RhapmjRG5Q04vPdi4KjDTyldzRVPhQXDTlwxNg8 A9ZU7g2f2bIjo9vt8oG3oop6wbk/ASB+NNwDUMucfGtyC/VwWrCkyrldXHcv/RdXmKnU Hif5CMGl8nSFbMp/z9v/3ygVBLWUbmy/t2NSWMXS44BBdDReobVV8Y34lBQ39LuQ5ixW JTM8eW7+sfy9iRfdO8XWYRcS/3FYrrWyRajK/IQ65Zf9J4nWK84OT9QuU8BaoVZzpn7s rWyg== X-Gm-Message-State: AIkVDXKPX788FU+DE4AhkJLRpRPFNCLSzx6fGSVpCBI4wfIf1s0/JM7RCEFdrIDk4Lxuaw== X-Received: by 10.84.225.20 with SMTP id t20mr32977341plj.154.1486547580076; Wed, 08 Feb 2017 01:53:00 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u24sm18585151pfi.25.2017.02.08.01.52.59 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 01:52:59 -0800 (PST) Subject: Re: svn commit: r313437 - head/lib/libutil Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 8 Feb 2017 01:52:58 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <779F34BC-816D-48E4-90B6-8DD3FCE401A4@gmail.com> References: <201702080922.v189MaUf075951@repo.freebsd.org> To: Sergey Kandaurov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:53:00 -0000 --Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 8, 2017, at 01:38, Sergey Kandaurov wrote: >=20 > On 8 February 2017 at 12:22, Ngie Cooper wrote: > Author: ngie > Date: Wed Feb 8 09:22:35 2017 > New Revision: 313437 > URL: https://svnweb.freebsd.org/changeset/base/313437 >=20 > Log: > Create link from hexdump(3) to sbuf_hexdump(9) as the manpage = describes > sbuf_hexdump(9)'s behavior >=20 > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon >=20 > Modified: > head/lib/libutil/Makefile >=20 > Modified: head/lib/libutil/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/libutil/Makefile Wed Feb 8 09:19:49 2017 = (r313436) > +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 = (r313437) > @@ -35,6 +35,7 @@ MAN+=3D expand_number.3 flopen.3 fparseln. > property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 = \ > _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 > MAN+=3D login.conf.5 > +MLINKS+=3Dhexdump.3 sbuf_hexdump.9 >=20 > This looks odd imho also that sbuf_hexdump(3) is part of libsbuf. > Note also hexdump(3) taht's essential copy of hexdump(9). > If go this duplicating route why not copy sbuf_hexdump description as = well. >=20 > I like more how that's done with sbuf(9) that's the only man page, = ymmv. Ack. The implementation is spread between iexdump(3) and sbuf(9), but = probably should just be in sbuf(9). I=E2=80=99ll look at cleaning this = up further after I talk with scottl@ a bit more. Thanks! -Ngie --Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21 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 iQIcBAEBCgAGBQJYmup6AAoJEPWDqSZpMIYV/u0QAMTpUlg+dub5Kxse90a5cakw cUBxwitGcKP7kGjvHbJLdjdBlxcqNynXnb+olNL8XUmfJu4WCeFvRg4Rwj8LqsIF AzKapSakVY0BVvFBCiEx45AUNlLLydXtHxDxZVKDJJVqAfkmmbekH3TD/RX2WI8w RLYdDuqs42FW8SDLK8JrGgaOH0iqM45/AXN9RLGMnakGZnZJ3mhwTnLTK+97dwCb A+Xk1t7M9ZG+vsgelmKC4dvkMv8o4Z3PoBJT5tykxhz+uAqy1LEbf55QtPHt8sLA dzb3A+UoXnl81GQaNc2A2bOA66uXPEFIEWGT09c4ex44D0DmLoC0QqRbwc0VIHuw qDnCwEUEiCVbJJor+kZOh57N9fOaFZq3n8gYR2oUkR2bDa97Dmc35r+PKd55uSfo ZVkFFpQgJ2khh6MkYWweFRzP/mZSOaFLgwf79BsPiK+v2WJUVynlJnZcFl1NGyfG /sbcFVnaDrz2/jQvuUUtKwAquJdbXTYC0y1dk13nlEM6DIS4AGpEcZyWdY+XjXWK 8mAun5oaZHd2/N6OKd8OSI5m8V66F00rWSy+eXyBcKL/K7FYW10DwASJ9V/tNYuR mXDxRaTWeDhneKg9SkP5nKtCsc6C8Ei9Jh3uVvq+xjlp6+RNrOiQ77u28LdrAr46 KW3GLGMrKPDADXsrFWbM =pcE5 -----END PGP SIGNATURE----- --Apple-Mail=_9876E442-C670-4379-A654-6A495960BE21-- From owner-svn-src-all@freebsd.org Wed Feb 8 09:56:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A168CD51B4; Wed, 8 Feb 2017 09:56:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4062819DD; Wed, 8 Feb 2017 09:56:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id 75so14770721pgf.3; Wed, 08 Feb 2017 01:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=7sjWRORumHE27US5H/l17IhWRt7y0bf8JFbTcHFVlAI=; b=MM6zaBAbMnhabzSO1n1jt6X3C92GylJ025JY842o0m7cYHSoljTPnsfRkaC/vBsNKd NJ/JWwDTWd2ln0GPEEWBUEBQhAayQ/Qc3GBn2OqtwTt3vYnWYa8ceTi4eJqPVkdsR3lp RydP4pxpeP47c98AIf4snVEl3XRtYUCcMAJaNhLnSKjQDGrHyYZYqZ62VNkzECOtFeUV c2eZzVeuRlNfTczrqSQTl4nT7QdQPBf1limtnqxIdqOZNzwjuTt6G8RnNeJabffab3Gn uAQ76CcpnI6c6B/EGDsDYlILZre/yNjUiG/TH+2XpJfu6jP84v5At6sdt+qTDe2dOVuI VJow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=7sjWRORumHE27US5H/l17IhWRt7y0bf8JFbTcHFVlAI=; b=gREL8Oy0Y5AGnKJ277tOduERj4/8mQeLvr1fPR6Wq+JPfZLLGZq9SfiyOqPo/8Uq/o ZGbjDvpB1HXaBAnjMJPc9ZJ7lhap7iHU69icKWLokBcjYUjFkFIk2hQ89PMgew+l24Sj sO2AxdwUx6EmKCO+u8cGdiuy0l9q2TQtuQYKFKBah/u+cEIY9GmQg9DfNCU+3aQCpLIq 1lXaqZU28AsIcnQ8wsMFGqvrgoVB4645hutNsGMcIUyCazY5X3zUQNuwaEp+yQwEWPMu 6HBwBYh4pdfoa7F+f9xV7tKNqjIvhNWqhMFqA19bQDnQkePdR5a2WmvTkGTXKpKGtEv9 RO3A== X-Gm-Message-State: AIkVDXJeSuXaPj1vD2FoIewGcQXM9lFsGKYYAa0JYvbZrlqNE96/+N6lFmlNTvXoShKAtw== X-Received: by 10.98.67.153 with SMTP id l25mr25033552pfi.91.1486547765889; Wed, 08 Feb 2017 01:56:05 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e189sm18514591pfg.64.2017.02.08.01.56.04 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 01:56:05 -0800 (PST) Subject: Re: svn commit: r313437 - head/lib/libutil Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <779F34BC-816D-48E4-90B6-8DD3FCE401A4@gmail.com> Date: Wed, 8 Feb 2017 01:56:04 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702080922.v189MaUf075951@repo.freebsd.org> <779F34BC-816D-48E4-90B6-8DD3FCE401A4@gmail.com> To: Sergey Kandaurov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 09:56:06 -0000 --Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 8, 2017, at 01:52, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Feb 8, 2017, at 01:38, Sergey Kandaurov wrote: >>=20 >> On 8 February 2017 at 12:22, Ngie Cooper wrote: >> Author: ngie >> Date: Wed Feb 8 09:22:35 2017 >> New Revision: 313437 >> URL: https://svnweb.freebsd.org/changeset/base/313437 >>=20 >> Log: >> Create link from hexdump(3) to sbuf_hexdump(9) as the manpage = describes >> sbuf_hexdump(9)'s behavior >>=20 >> MFC after: 3 weeks >> Sponsored by: Dell EMC Isilon >>=20 >> Modified: >> head/lib/libutil/Makefile >>=20 >> Modified: head/lib/libutil/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/libutil/Makefile Wed Feb 8 09:19:49 2017 = (r313436) >> +++ head/lib/libutil/Makefile Wed Feb 8 09:22:35 2017 = (r313437) >> @@ -35,6 +35,7 @@ MAN+=3D expand_number.3 flopen.3 fparseln. >> property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 = \ >> _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 >> MAN+=3D login.conf.5 >> +MLINKS+=3Dhexdump.3 sbuf_hexdump.9 >>=20 >> This looks odd imho also that sbuf_hexdump(3) is part of libsbuf. >> Note also hexdump(3) taht's essential copy of hexdump(9). >> If go this duplicating route why not copy sbuf_hexdump description as = well. >>=20 >> I like more how that's done with sbuf(9) that's the only man page, = ymmv. >=20 > Ack. The implementation is spread between iexdump(3) and sbuf(9), but = probably should just be in sbuf(9). =E2=80=A6 for sbuf_hexdump(9). The point behind sbuf(3) and the = separation in documentation with the kernel and user interface is a bit = curious. > I=E2=80=99ll look at cleaning this up further after I talk with = scottl@ a bit more. Thanks! -Ngie --Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4 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 iQIcBAEBCgAGBQJYmus0AAoJEPWDqSZpMIYVDRMQALUY3tnDel1QXeP6iT/Fjkc+ I0yhBBaRqI6RL3IuK3VczyilfswoqBj/h4kIFnCyySE0RxCKBoXAmDrvFL8gcEaT BY1awO1XpMhwwsksyxuhbWUueh2YL6i7sbgCRbClBzm4im71tEQfl+n3HwNI7U8a JGPdXIU2OlB3xSHMIx5DhWWdUuAsRnnEg6c7gR5GsSSPvoE5szap2z69BQF6xNyN Vrh69COpn3aBWJN1xh9LYwmI0b0tW4kwm8U0iOyPB/p1/Phwo8rspQBhXHsv23gu tHoKCsiicGmYFXstYYqYiTLHb/4UWuM3TVoMSUGwD2DLya3Xln/6fEB98CnqUXWq oWMPLmkxHcU6yi/clYpvbdsVHyR8q4vKeJmfZDEbklrYWA2dgYjsCXzv+33TnwFe x0QcVUEoui6XO0R/5jI/QnwBEPr7VSYMT1H7VFVC0sjiuhJtTX+0RD2VkMEV5lRZ /WHnyWd+EXe+Sq5u70TqMDx0WFRE4MP37cFdgmvLWRizWIzsXl1ujPKujSMOS0U7 sCWzliM44PW8QtYptMWccvLoecVZq0Zc9KTSvqO598mRtBv5CG4z7RfQ/vH+6V/n Q0r6+1/+ydjG3wI9zb3P7xqmB3XEBBG/I5ZTYX3nJso0uGmaG+ljQ60e/4MXpxUh 2xlrvtDPTy0hGlJreB6y =IgYX -----END PGP SIGNATURE----- --Apple-Mail=_DD168B0A-943A-4343-8EA1-570B625660C4-- From owner-svn-src-all@freebsd.org Wed Feb 8 12:58:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9333CD6E33; Wed, 8 Feb 2017 12:58:37 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 933501F7F; Wed, 8 Feb 2017 12:58:37 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cbRpT-0006ZK-CB; Wed, 08 Feb 2017 13:58:35 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Stanislav Galabov" Subject: Re: svn commit: r313343 - head/sys/arm/arm References: <201702061458.v16EwOjU015633@repo.freebsd.org> Date: Wed, 08 Feb 2017 13:58:34 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201702061458.v16EwOjU015633@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 353bb18b0f14186cd389c275975c39f5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 12:58:37 -0000 Hello, Is this applicable to 11-CURRENT also? That version (sys/arm/arm/identcpu.c) has: void identify_arm_cpu(void) { u_int cpuid, reg, size, sets, ways; u_int8_t type, linesize, ctrl; int i; Regards, Ronald. On Mon, 06 Feb 2017 15:58:24 +0100, Stanislav Galabov wrote: > Author: sgalabov > Date: Mon Feb 6 14:58:24 2017 > New Revision: 313343 > URL: https://svnweb.freebsd.org/changeset/base/313343 > > Log: > sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() > identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a > u_int8_t variable to store the result of cpu_get_control(). > It should really use a u_int variable, the same way as done for > cpu_ident() > in the same function, as both cpuid and control registers are 32-bit.. > This issue causes users of identcpu-v4 to incorrectly report things > such as > icache status (bit 12 in cpu control register) and basically anything > defined in bits above bit 7 :-) > Reviewed by: manu > Sponsored by: Smartcom - Bulgaria AD > Differential Revision: https://reviews.freebsd.org/D9460 > > Modified: > head/sys/arm/arm/identcpu-v4.c > > Modified: head/sys/arm/arm/identcpu-v4.c > ============================================================================== > --- head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 (r313342) > +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 (r313343) > @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) > void > identify_arm_cpu(void) > { > - u_int cpuid; > - u_int8_t ctrl; > + u_int cpuid, ctrl; > int i; > ctrl = cpu_get_control(); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Wed Feb 8 12:58:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C7D8CD6E54; Wed, 8 Feb 2017 12:58:43 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8D6F1FA5; Wed, 8 Feb 2017 12:58:42 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-io0-x241.google.com with SMTP id m98so15744440iod.2; Wed, 08 Feb 2017 04:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Y0Ovd0dS+Wgo2zamPXH2Sa00VqLWVPSbx6SJzm6gwws=; b=QDzBW0pYW8t/B+LoreSgAL+q7w9qnxUJ62Dsjp//azTW49cBtZ28BeE96qAIR3Ow2L /jPmMHlkj7jhjty2DaladksNgLdtsxaataqv74u5MRATbZmKtw5+CuMlzNBOXn3PXmr3 7/LgwOkYZVPTDEaAWhvMgYkG6FC4nZkbZKiVh8Ov+NbBlsnxnmmHbzFgXZHR2TUq5vtz /AjYSEB3Wpd7FelESrXSg/EaeqByuxL3h5AMKmZ2CrBoDCb6pYDMRH6lUql/H0RC4AzZ Bbg5YElcC/n7FdObPJatild7TBdFq2JBDMdhDa2iTwx/RVCTQYhhYQ8WU6QjOf4CsTc/ IeVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Y0Ovd0dS+Wgo2zamPXH2Sa00VqLWVPSbx6SJzm6gwws=; b=bmSxhpMKZsm4xFnJzFPz7+iRCcLDdziTodni6AufGtSvCbB8Pn068CxfyDZtReKOgX bwDmJNlqpkL+Kih43b/TzaFUT7d+YuE/PVzGmB4rnGf5sKyBdCtZGHkZY+Qyi9SUDh+t 9SUm8tJiilqRYFEegX3BA5rcgbgzsNrd4NCtbfslgCfUQ7f42yaFKbK+izLR0+tf2nEX 5T4lG1o0zNdR4otVDynWWz0nPknFRtgl7Q7UCoD6YF1jhzqEzKLKIN5ifd9XsCNJQ9CS gr9MZ3P+uPop2GtYzCz+1p+cumKb+LUlaZdZtcHDo5bfzqzOaPCR2YXxA9yWJaPdrA0W S9cQ== X-Gm-Message-State: AMke39kYTzapnWHRn8e2A2izxeIrhFhDPrytxFkext8hhEW9/Cu1SBGbXS7hdDYHHyf3HoIiunUcxNEvhGoEhQ== X-Received: by 10.107.152.144 with SMTP id a138mr9935068ioe.207.1486558722107; Wed, 08 Feb 2017 04:58:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Wed, 8 Feb 2017 04:58:41 -0800 (PST) In-Reply-To: <20170207113844.2cd08852@zapp> References: <201702061308.v16D8nGC071178@repo.freebsd.org> <20170207113844.2cd08852@zapp> From: Svatopluk Kraus Date: Wed, 8 Feb 2017 13:58:41 +0100 Message-ID: Subject: Re: svn commit: r313339 - head/sys/kern To: Andrew Turner Cc: 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 12:58:43 -0000 On Tue, Feb 7, 2017 at 12:38 PM, Andrew Turner wrote: > On Tue, 7 Feb 2017 11:35:48 +0100 > Svatopluk Kraus wrote: >> Does an xref refer only to one hardware? Or two hardwares may have >> same xrefs? Why one hardware cannot be represented by one PIC in >> INTRNG even if two drivers exist for it? > > The xref is an FDT thing, in INTRNG we use it as a handle to hardware. > This changes it so each of these handles refers to hardware within one > of two spaces, the PIC space and MSI space. It may be that for FDT > these spaces are non overlapping, however with ACPI it will simplify > the code to allow us to have the same handle refer to different > controllers in different spaces. In INTRNG, the xref is not FDT thing, but general hardware identifier which is intented to be unique in a system. See intr_map_irq(device_t dev, intptr_t xref, struct intr_map_data *data). The xref should be independent on mapping data. INTRNG should know nothing about mapping data, but your change just changed that. The xref is opaque for INTRNG too. So, I do not see where is the problem to have unique xref identifiers in a system. The xref can be defined that way. So, do you have a problem with overlapping spaces or you just want to have more PICs for one xref? > >> On Mon, Feb 6, 2017 at 2:08 PM, Andrew Turner >> wrote: >> > Author: andrew >> > Date: Mon Feb 6 13:08:48 2017 >> > New Revision: 313339 >> > URL: https://svnweb.freebsd.org/changeset/base/313339 >> > >> > Log: >> > Only allow the pic type to be either a PIC or MSI type. All >> > interrupt controller drivers handle either MSI/MSI-X interrupts, or >> > regular interrupts, as such enforce this in the interrupt handling >> > framework. If a later driver was to handle both it would need to >> > create one of each. >> > >> > This will allow future changes to allow the xref space to >> > overlap, but refer to different drivers. >> > >> > Obtained from: ABT Systems Ltd >> > Sponsored by: The FreeBSD Foundation >> > X-Differential Revision: https://reviews.freebsd.org/D8616 > ... >> > @@ -822,13 +827,13 @@ intr_pic_claim_root(device_t dev, intptr >> > { >> > struct intr_pic *pic; >> > >> > - pic = pic_lookup(dev, xref); >> > + pic = pic_lookup(dev, xref, FLAG_PIC); >> > if (pic == NULL) { >> > device_printf(dev, "not registered\n"); >> > return (EINVAL); >> > } >> > >> > - KASSERT((pic->pic_flags & FLAG_PIC) != 0, >> > + KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_PIC, >> > ("%s: Found a non-PIC controller: %s", __func__, >> > device_get_name(pic->pic_dev))); >> > >> >> So, you would check that pic_lookup(dev, xref, FLAG_PIC) returns PIC >> with FLAG_PIC set? >> Really? This nonsense is in other places too. If you would like to be >> this way, check it only in pic_lookup() then! > > It's there so if someone makes a change to pic_lookup that breaks > this assumption they will be told about it. For me, it's too much. It's like calling mtx_lock() and immediately check that the mutex is locked. It's mental to check that a function really returned what was requested. Especially, when the function returns NULL in case that the request cannot be met. Should anyone check any function that it does what is announced? From owner-svn-src-all@freebsd.org Wed Feb 8 12:59:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C437ACD6EDA; Wed, 8 Feb 2017 12:59:16 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66EEB2BF; Wed, 8 Feb 2017 12:59:16 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id v77so33012326wmv.0; Wed, 08 Feb 2017 04:59:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bz1WoOVWLwvZyzNqOA08jkg7r/ElG9ITTwh0dYcUupQ=; b=mN3qOub9puSxSRC0wBQ/yKTZdMS6nLsWbhwAbzxv/amwa8A2X64Yf6nayE8Z7Sak06 xZ/0SfojYtD4715UMgKmq0Lu70D11Gb5S7aDokssOcPwG9d03pLtmzBBJDNiamd2FuuE 7zQYu8Cl/ubVn3XlTmkieYZplUXNudDZYpTMBwNoiWlKRLmQ3ugQrAFP2FyYGCwLDf6h lEO1MM55BSxxIlJTJDv61btICiulyt8+hgbjfId+W3lrOg9kqf2/zgAdjVB6K8GK0ZSB FLLfUGmP1p1gTnNsXDU3BFdoZCxmApNZObozJpZVboQR5iz4ooM68ifAHAAFBmCiZrHQ 7WlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bz1WoOVWLwvZyzNqOA08jkg7r/ElG9ITTwh0dYcUupQ=; b=V9gUv3P4tftDW4mQ/ATFwBhroUYSyfmF6rZOWq8dKr9lvSILQukzAw8iyeY5EbACcl qQGxq/okLn7ZYkcVpq/qM9CWX1zVijB1+IISbZn4W6tkSjNCD4zZJLO7g2BuIVBcM3oR 4W/ooy1KryOtpe/2QP1fLW8Go9fWoVbEpq6ZcY2B+aCDuy+Gc+WuQimgk2i4lXAAa5ka tYxoYzpwgCyi2r6Q1qLefq0PYE9GfEumZMcXplf85h6r4qz9jSJO/bl6mfw5aFdNDmNq gprOrXl6efczWu2sK/RfgGrElzInB68TDA8jgylpvXUeP0WEa7L1Ny4Ln/GGadDiZyrS OS4A== X-Gm-Message-State: AIkVDXK9p1t1vtWKS2rSLQDnFiULaM7WQPiqxs51tbejEDJEIAR6ZkLewaK3qUHNaMB1bg== X-Received: by 10.223.148.230 with SMTP id 93mr19062090wrr.13.1486558753965; Wed, 08 Feb 2017 04:59:13 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id w99sm12952949wrb.5.2017.02.08.04.59.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 04:59:13 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 8 Feb 2017 13:59:12 +0100 From: Baptiste Daroussin To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... Message-ID: <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> References: <201701281630.v0SGUEfW063907@repo.freebsd.org> <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bhsrxqnlhlo7s7kz" Content-Disposition: inline In-Reply-To: <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> User-Agent: NeoMutt/20170128 (1.7.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 12:59:16 -0000 --bhsrxqnlhlo7s7kz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 08, 2017 at 12:52:20AM -0800, Ngie Cooper (yaneurabeya) wrote: >=20 > > On Jan 28, 2017, at 08:30, Baptiste Daroussin wrote: > >=20 > > Author: bapt > > Date: Sat Jan 28 16:30:14 2017 > > New Revision: 312926 > > URL: https://svnweb.freebsd.org/changeset/base/312926 > >=20 > > Log: > > Revert r312923 a better approach will be taken later > >=20 > > Modified: > > head/bin/ed/Makefile > > head/contrib/dma/mail.c > > head/share/mk/bsd.doc.mk > > head/sys/amd64/amd64/db_trace.c > > head/sys/amd64/cloudabi64/cloudabi64_sysvec.c > > head/sys/cam/ctl/ctl_ioctl.h > > head/sys/cddl/dev/fbt/x86/fbt_isa.c > > head/sys/compat/cloudabi/cloudabi_fd.c > > head/sys/compat/cloudabi64/cloudabi64_poll.c > > head/sys/compat/linuxkpi/common/include/linux/slab.h > > head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c > > head/sys/contrib/dev/acpica/include/acpixf.h > > head/sys/ddb/ddb.h > > head/sys/dev/drm2/drm_agpsupport.c > > head/sys/dev/drm2/drm_bufs.c > > head/sys/dev/drm2/drm_dma.c > > head/sys/dev/drm2/drm_drv.c > > head/sys/dev/drm2/drm_os_freebsd.c > > head/sys/dev/drm2/drm_os_freebsd.h > > head/sys/dev/drm2/drm_stub.c > > head/sys/fs/nfsserver/nfs_nfsdstate.c > > head/sys/kern/kern_descrip.c > > head/sys/kern/kern_shutdown.c > > head/sys/modules/drm2/drm2/Makefile > > head/tools/build/Makefile > > head/tools/tools/locale/etc/unicode.conf > > head/usr.bin/getconf/confstr.gperf > > head/usr.bin/getconf/getconf.c > > head/usr.bin/getconf/limits.gperf > > head/usr.bin/getconf/pathconf.gperf > > head/usr.bin/getconf/progenv.gperf > > head/usr.bin/getconf/sysconf.gperf > > head/usr.sbin/nscd/nscd.c > > head/usr.sbin/nscd/nscdcli.c >=20 > I noticed that this revision and the next one are a point of issue when = running =E2=80=9Csvn merge --reintegrate ". Was "svn merge -c -=E2=80=9C us= ed? Yes the crap was I did svn merge -c -312923 then svn ci which took the reve= rt and all the temporary crap I had I reverted entirely that one later and commit "manually" the files that were supposed to be reverted initially by copying the files from before r312923 So sorry it was a total mess. Bapt --bhsrxqnlhlo7s7kz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlibFhwACgkQY4mL3PG3 Plq2CRAAnLcs2m+voJKZNPxzeFVpUhrDwmNJGrQQ957SDIiQNSwr7gR3LB+J7GxZ hpwE7tXwvc3aCOMdrqCnO3EhOGpfoD4erwRLObbp87NnOSGXAgJaMfMu591/em68 0YcaeK/PiPH9y5QZEOKkXIpVVlBQev5/0tm3R6IE3UDkbfaWiAX2pTP0nwoBMUNP hQqEvBwTsEtm7PQlmEATjR0xAxgk37kbBthrxLxxsFYPlzocpNhVuSnKfleH3xkY I8KYt82Nl4yp+ONtKtYGVsoa+mVCa5GN5g46tfqcnXD1xMwqfzJY3KFgFu/zo8wd EVNwqG4t/q9j0KcRMNEZH0EIyjHANHSPE1MyD7Dlow+VFQDt1ly7pinksWjB8DNa k/3HawyrlXD1WkkWa5ayTSEbuEP0aIqct6SHG4qRIFlZM5MJJzCOZRCzSJOfsEzx UPaX8DHIqMLh1tOQyD7DKULwCMZosNXv03X1zn/jBmc+z+Sae88/mtvwB1nkAHNR Rh8QwZ4NTmYPbvLgbITk9EOiNxzQQzB3aOVynrlIQmjWaG6qjF/+szu/o+k+8ogV nWR5xsLlQfBzUPEdsn4PtHUMyCTGhRnbtfkIF9a6VJV0lDgmzg8umIw502HVZ9aE WyAXNlj1+WjCnIaUy0oXNjbqlaaxG+4G/+xfabiW/QUpTLxYHmI= =31x3 -----END PGP SIGNATURE----- --bhsrxqnlhlo7s7kz-- From owner-svn-src-all@freebsd.org Wed Feb 8 13:01:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72D0BCD6F92; Wed, 8 Feb 2017 13:01:50 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06C688BE; Wed, 8 Feb 2017 13:01:50 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id u63so33120748wmu.2; Wed, 08 Feb 2017 05:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=97uQQPCZN3ZfLJ1CopBMoOgXBpIYlWWB0hgsXU8SmvA=; b=uAATg9mJWWvXdBb2wvzB2tN+C5i/+LcdKeUQHxjrw9xavaBe8KV/1CrHRDcVrKAiHN s6GN10dZmlvYq1J0a+uV0Th4g1Mef71nVw1cdP7BpZEwd9kErOhxY/HxAkw0DItE0Vm4 mWzPBNWyFh8NZXxTVU0YTozn8ulW8apFHdPZKK0o/pKIpGmsKZ1hp0WRG9zwvgNHnW1n 51TDHo11PfKEuRn2Kbtkk6Yce9CwTrnMsw+vTrd6SsAUdzITUdDsQSn+UfB/gvRn8Wrn adtQ1TbVasZTZru2YxhI0oRJX/Hui6NsJh4cqWbtv43/FMF0M/+kVEjFyi6Heclxq5Zb jHlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=97uQQPCZN3ZfLJ1CopBMoOgXBpIYlWWB0hgsXU8SmvA=; b=dJFo1JDgf0Aks94x8LSFIMTF2zJLfCTvknzzemS+xWGScdlke1CqlNQ4qtGxI4at4Z lw/0nU/HDYz1fz7IlCVfmspjMMzvlluKe0LBF3TJiXgGOYCOQV9y7auLSD1ISDwEAi+u eiWsPOinzQ3h/BvCuSBORedO8gLEIx5kh/Bly0TnNtaYi5zkTVazWqpE0cZnqtq3NSjy joVQigP5+e3r4Q2KSq6TMs1N3mneSpwl2/+d+mCPOicaZ+nXImNLEW0AkUMuIHecXri4 ZUL4LhVBS2FIbuqg3JgLYvUYZPkYAdT0GNFH/RkkWlsCl8mEk6M913MXECFBGW7IOIVg 3Mbw== X-Gm-Message-State: AMke39mFCp4N2xRSbWKyQv9RyR58szos396b/UMN8qrKXW2cweL2nsRRit8s82weatVYOg== X-Received: by 10.28.45.197 with SMTP id t188mr19203822wmt.15.1486558908586; Wed, 08 Feb 2017 05:01:48 -0800 (PST) Received: from [192.168.252.71] ([193.178.153.36]) by smtp.gmail.com with ESMTPSA id a13sm3264760wma.13.2017.02.08.05.01.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 05:01:47 -0800 (PST) From: Stanislav Galabov X-Google-Original-From: Stanislav Galabov Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r313343 - head/sys/arm/arm In-Reply-To: Date: Wed, 8 Feb 2017 15:01:46 +0200 Cc: Stanislav Galabov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <27DC1078-9C59-4B6C-A9CF-9E6D246F7366@FreeBSD.org> References: <201702061458.v16EwOjU015633@repo.freebsd.org> To: Ronald Klop X-Mailer: Apple Mail (2.3226) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 13:01:50 -0000 Hi, I hadn=E2=80=99t looked at 11-CURRENT to be honest, but looking at it - = yes, it seems is applicable there too. Unfortunately I am not certain I=E2=80=99ll have time to MFC this, so if = anyone wants to/has the time - please be my guest. Best wishes, Stanislav > On Feb 8, 2017, at 14:58, Ronald Klop wrote: >=20 > Hello, >=20 > Is this applicable to 11-CURRENT also? >=20 > That version (sys/arm/arm/identcpu.c) has: > void > identify_arm_cpu(void) > { > u_int cpuid, reg, size, sets, ways; > u_int8_t type, linesize, ctrl; > int i; >=20 > Regards, > Ronald. >=20 >=20 > On Mon, 06 Feb 2017 15:58:24 +0100, Stanislav Galabov = wrote: >=20 >> Author: sgalabov >> Date: Mon Feb 6 14:58:24 2017 >> New Revision: 313343 >> URL: https://svnweb.freebsd.org/changeset/base/313343 >>=20 >> Log: >> sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu() >> identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a >> u_int8_t variable to store the result of cpu_get_control(). >> It should really use a u_int variable, the same way as done for = cpu_ident() >> in the same function, as both cpuid and control registers are = 32-bit.. >> This issue causes users of identcpu-v4 to incorrectly report things = such as >> icache status (bit 12 in cpu control register) and basically = anything >> defined in bits above bit 7 :-) >> Reviewed by: manu >> Sponsored by: Smartcom - Bulgaria AD >> Differential Revision: https://reviews.freebsd.org/D9460 >>=20 >> Modified: >> head/sys/arm/arm/identcpu-v4.c >>=20 >> Modified: head/sys/arm/arm/identcpu-v4.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/arm/arm/identcpu-v4.c Mon Feb 6 14:41:34 2017 = (r313342) >> +++ head/sys/arm/arm/identcpu-v4.c Mon Feb 6 14:58:24 2017 = (r313343) >> @@ -294,8 +294,7 @@ u_int cpu_pfr(int num) >> void >> identify_arm_cpu(void) >> { >> - u_int cpuid; >> - u_int8_t ctrl; >> + u_int cpuid, ctrl; >> int i; >> ctrl =3D cpu_get_control(); >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to = "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Wed Feb 8 13:37:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FEBECD6D06; Wed, 8 Feb 2017 13:37:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C58C1EA9; Wed, 8 Feb 2017 13:37:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18Dbvsb078199; Wed, 8 Feb 2017 13:37:57 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18Dbvla078198; Wed, 8 Feb 2017 13:37:57 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702081337.v18Dbvla078198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 8 Feb 2017 13:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313441 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 13:37:58 -0000 Author: cy Date: Wed Feb 8 13:37:57 2017 New Revision: 313441 URL: https://svnweb.freebsd.org/changeset/base/313441 Log: MFC r312777, r312780: Issue an error message when an incorrect flush argument is encountered (and style fixup). Modified: stable/11/contrib/ipfilter/tools/ipf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/tools/ipf.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/tools/ipf.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ipf.c Wed Feb 8 09:47:38 2017 (r313440) +++ stable/11/contrib/ipfilter/tools/ipf.c Wed Feb 8 13:37:57 2017 (r313441) @@ -409,13 +409,16 @@ static void flushfilter(arg, filter) closedevice(); return; } - - if (strchr(arg, 'i') || strchr(arg, 'I')) + else if (strchr(arg, 'i') || strchr(arg, 'I')) fl = FR_INQUE; - if (strchr(arg, 'o') || strchr(arg, 'O')) + else if (strchr(arg, 'o') || strchr(arg, 'O')) fl = FR_OUTQUE; - if (strchr(arg, 'a') || strchr(arg, 'A')) + else if (strchr(arg, 'a') || strchr(arg, 'A')) fl = FR_OUTQUE|FR_INQUE; + else { + fprintf(stderr, "Incorrect flush argument: %s\n", arg); + usage(); + } if (opts & OPT_INACTIVE) fl |= FR_INACTIVE; rem = fl; From owner-svn-src-all@freebsd.org Wed Feb 8 13:37:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4E02CD6D0A; Wed, 8 Feb 2017 13:37:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8147F1EAA; Wed, 8 Feb 2017 13:37:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18Dbvuj078205; Wed, 8 Feb 2017 13:37:57 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18Dbv7X078204; Wed, 8 Feb 2017 13:37:57 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702081337.v18Dbv7X078204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 8 Feb 2017 13:37:57 +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: r313441 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 13:37:58 -0000 Author: cy Date: Wed Feb 8 13:37:57 2017 New Revision: 313441 URL: https://svnweb.freebsd.org/changeset/base/313441 Log: MFC r312777, r312780: Issue an error message when an incorrect flush argument is encountered (and style fixup). Modified: stable/10/contrib/ipfilter/tools/ipf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/tools/ipf.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/tools/ipf.c ============================================================================== --- stable/10/contrib/ipfilter/tools/ipf.c Wed Feb 8 09:47:38 2017 (r313440) +++ stable/10/contrib/ipfilter/tools/ipf.c Wed Feb 8 13:37:57 2017 (r313441) @@ -409,13 +409,16 @@ static void flushfilter(arg, filter) closedevice(); return; } - - if (strchr(arg, 'i') || strchr(arg, 'I')) + else if (strchr(arg, 'i') || strchr(arg, 'I')) fl = FR_INQUE; - if (strchr(arg, 'o') || strchr(arg, 'O')) + else if (strchr(arg, 'o') || strchr(arg, 'O')) fl = FR_OUTQUE; - if (strchr(arg, 'a') || strchr(arg, 'A')) + else if (strchr(arg, 'a') || strchr(arg, 'A')) fl = FR_OUTQUE|FR_INQUE; + else { + fprintf(stderr, "Incorrect flush argument: %s\n", arg); + usage(); + } if (opts & OPT_INACTIVE) fl |= FR_INACTIVE; rem = fl; From owner-svn-src-all@freebsd.org Wed Feb 8 15:43:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8993BCD50A6; Wed, 8 Feb 2017 15:43:09 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B515DD2; Wed, 8 Feb 2017 15:43:09 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id B47DD13013; Wed, 8 Feb 2017 15:43:07 +0000 (UTC) Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... To: Baptiste Daroussin , "Ngie Cooper (yaneurabeya)" References: <201701281630.v0SGUEfW063907@repo.freebsd.org> <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: <98fba402-dfc3-8977-2f50-8790a8c19637@freebsd.org> Date: Wed, 8 Feb 2017 10:42:58 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 15:43:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO Content-Type: multipart/mixed; boundary="3D1WjLW2VAk55cuMIeuwDsNtAc7K86eRU"; protected-headers="v1" From: Allan Jude To: Baptiste Daroussin , "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <98fba402-dfc3-8977-2f50-8790a8c19637@freebsd.org> Subject: Re: svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common... References: <201701281630.v0SGUEfW063907@repo.freebsd.org> <6F201758-8984-49A9-9F47-5E9C4F5700E4@gmail.com> <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> In-Reply-To: <20170208125911.sxr2gtayke3qpohr@ivaldir.etoilebsd.net> --3D1WjLW2VAk55cuMIeuwDsNtAc7K86eRU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-02-08 07:59, Baptiste Daroussin wrote: > On Wed, Feb 08, 2017 at 12:52:20AM -0800, Ngie Cooper (yaneurabeya) wro= te: >> >>> On Jan 28, 2017, at 08:30, Baptiste Daroussin wrot= e: >>> >>> Author: bapt >>> Date: Sat Jan 28 16:30:14 2017 >>> New Revision: 312926 >>> URL: https://svnweb.freebsd.org/changeset/base/312926 >>> >>> Log: >>> Revert r312923 a better approach will be taken later >>> >>> Modified: >>> head/bin/ed/Makefile >>> head/contrib/dma/mail.c >>> head/share/mk/bsd.doc.mk >>> head/sys/amd64/amd64/db_trace.c >>> head/sys/amd64/cloudabi64/cloudabi64_sysvec.c >>> head/sys/cam/ctl/ctl_ioctl.h >>> head/sys/cddl/dev/fbt/x86/fbt_isa.c >>> head/sys/compat/cloudabi/cloudabi_fd.c >>> head/sys/compat/cloudabi64/cloudabi64_poll.c >>> head/sys/compat/linuxkpi/common/include/linux/slab.h >>> head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c >>> head/sys/contrib/dev/acpica/include/acpixf.h >>> head/sys/ddb/ddb.h >>> head/sys/dev/drm2/drm_agpsupport.c >>> head/sys/dev/drm2/drm_bufs.c >>> head/sys/dev/drm2/drm_dma.c >>> head/sys/dev/drm2/drm_drv.c >>> head/sys/dev/drm2/drm_os_freebsd.c >>> head/sys/dev/drm2/drm_os_freebsd.h >>> head/sys/dev/drm2/drm_stub.c >>> head/sys/fs/nfsserver/nfs_nfsdstate.c >>> head/sys/kern/kern_descrip.c >>> head/sys/kern/kern_shutdown.c >>> head/sys/modules/drm2/drm2/Makefile >>> head/tools/build/Makefile >>> head/tools/tools/locale/etc/unicode.conf >>> head/usr.bin/getconf/confstr.gperf >>> head/usr.bin/getconf/getconf.c >>> head/usr.bin/getconf/limits.gperf >>> head/usr.bin/getconf/pathconf.gperf >>> head/usr.bin/getconf/progenv.gperf >>> head/usr.bin/getconf/sysconf.gperf >>> head/usr.sbin/nscd/nscd.c >>> head/usr.sbin/nscd/nscdcli.c >> >> I noticed that this revision and the next one are a point of issue wh= en running =E2=80=9Csvn merge --reintegrate ". Was "svn merge -c -=E2=80=9C= used? >=20 > Yes the crap was I did svn merge -c -312923 then svn ci which took the = revert > and all the temporary crap I had >=20 > I reverted entirely that one later and commit "manually" the files that= were > supposed to be reverted initially by copying the files from before r312= 923 >=20 > So sorry it was a total mess. >=20 > Bapt >=20 Yeah, it looks like bapt@ committed his work-in-progress make OpenSSL in base private patch. --=20 Allan Jude --3D1WjLW2VAk55cuMIeuwDsNtAc7K86eRU-- --CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO 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.0.22 (MingW32) iQIcBAEBAgAGBQJYmzyFAAoJEBmVNT4SmAt+5X0P+wd6WvcYW909bK/8/BxJglPZ ThdIXYtRp0sWzCNcJqXKnb9im2/iQxPo6Q/3N1aJ17DOm0i7ZtZTu51qiDYylREH WqUt/Iwd50nNblVmVUxJ7fntZFleybXS7sh7Px8jYts5d5pbTFkPovtccIVkgQpa C3oP6S8J8vg3fv/MR8VTh4lK25KCaAbrYJDGgIm9FmDMYOHoU2oVsmCf967+H/ri W4MQSSLnYye90zl71rTY5dkXPeRbmlATuKlc6cbITwUbU0Bdy2MuAOaReQq9Qvt2 FVwnMulYFth2/glAyZetCif/wGT0BPNcqyBQnN9+zTrPfEYImvqs9UDPzpdtSG7D FmDrLJZF3EYpCw/e4Qqwe8qaOnDriR2dOeCCDBD173OoOFke8ABb+PkjcBT2Lkg4 /1GE0pvWCEw2zUjK+uTQWaYgMgKlNDVehMui7Q6l5qZaLvVCehebcD3yqOKDq/wV jmpuYMnFbLgDg5itSwMc7grd7KbRnrl3aoFyfZYEyUT4YN/XK3pwn353uTiQWwBV SXxDNp9o3Bx+ZWKW+lcItXIroE11Ky+RQGSuYqqMQCOvwer8gODiVJo0Q9Q78qEF Az2SpR7zf3gwPRFVwdY79K3AgPJ5Os6rJoxcZeFwmz4FZnuUJ8VfcZEG4edigPqg eA/YxhrTI79D2Pwcdyao =NbJt -----END PGP SIGNATURE----- --CQTn02gPGV4UL29HCVAOX3MJn8xcdj8WO-- From owner-svn-src-all@freebsd.org Wed Feb 8 15:52:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 503E7CD56FD; Wed, 8 Feb 2017 15:52:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBFB12AF; Wed, 8 Feb 2017 15:52:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18Fq9wg034507; Wed, 8 Feb 2017 15:52:09 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18Fq9hc034506; Wed, 8 Feb 2017 15:52:09 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702081552.v18Fq9hc034506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 8 Feb 2017 15:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313442 - head/sys/boot/efi/libefi 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 15:52:10 -0000 Author: tsoome Date: Wed Feb 8 15:52:09 2017 New Revision: 313442 URL: https://svnweb.freebsd.org/changeset/base/313442 Log: loader: possible NULL pointer dereference in efipart.c Fix bugs found by Coverity in efipart.c. The Issue is that efi_devpath_last_node() can return NULL pointer, and therefore we should check for it. In real life we really do not expect to see it to happen, so we will just error out from the test. CID: 1371004 Reported by: Coverity Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9490 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Wed Feb 8 13:37:57 2017 (r313441) +++ head/sys/boot/efi/libefi/efipart.c Wed Feb 8 15:52:09 2017 (r313442) @@ -364,6 +364,9 @@ efipart_hdinfo_add(EFI_HANDLE disk_handl if (disk_devpath == NULL || part_devpath == NULL) { return (ENOENT); } + node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); + if (node == NULL) + return (ENOENT); /* This should not happen. */ pd = malloc(sizeof(pdinfo_t)); if (pd == NULL) { @@ -372,7 +375,6 @@ efipart_hdinfo_add(EFI_HANDLE disk_handl } memset(pd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&pd->pd_part); - node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); STAILQ_FOREACH(hd, &hdinfo, pd_link) { if (efi_devpath_match(hd->pd_devpath, disk_devpath) != 0) { From owner-svn-src-all@freebsd.org Wed Feb 8 16:00:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB5BDCD5AC7; Wed, 8 Feb 2017 16:00:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68FEE190B; Wed, 8 Feb 2017 16:00:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18G0e6u035713; Wed, 8 Feb 2017 16:00:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18G0eTQ035712; Wed, 8 Feb 2017 16:00:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702081600.v18G0eTQ035712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 8 Feb 2017 16:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313443 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 16:00:41 -0000 Author: mav Date: Wed Feb 8 16:00:40 2017 New Revision: 313443 URL: https://svnweb.freebsd.org/changeset/base/313443 Log: MFC r312750: Add Timeout and Protect mode page description from MMC-6. Modified: stable/11/share/misc/scsi_modes Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/scsi_modes ============================================================================== --- stable/11/share/misc/scsi_modes Wed Feb 8 15:52:09 2017 (r313442) +++ stable/11/share/misc/scsi_modes Wed Feb 8 16:00:40 2017 (r313443) @@ -478,4 +478,17 @@ {Current Write Speed Supported (kBps)} i2 }; +0x1d "Timeout and Protect" { + {Reserved} *i2 + {Reserved} *t4 + {G3Enable} t1 + {TMOE} t1 + {DISP} t1 + {SWPP} t1 + {Reserved} *i1 + {Group 1 Minimum Timeout} i2 + {Group 2 Minimum Timeout} i2 + {Group 3 Timeout} i2 +}; + 0x00 "Vendor-Specific"; From owner-svn-src-all@freebsd.org Wed Feb 8 16:01:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC3BBCD5B4D; Wed, 8 Feb 2017 16:01:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8FA51ADB; Wed, 8 Feb 2017 16:01:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18G1E58036455; Wed, 8 Feb 2017 16:01:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18G1ELd036454; Wed, 8 Feb 2017 16:01:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702081601.v18G1ELd036454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 8 Feb 2017 16:01: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: r313444 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 16:01:16 -0000 Author: mav Date: Wed Feb 8 16:01:14 2017 New Revision: 313444 URL: https://svnweb.freebsd.org/changeset/base/313444 Log: MFC r312750: Add Timeout and Protect mode page description from MMC-6. Modified: stable/10/share/misc/scsi_modes Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/scsi_modes ============================================================================== --- stable/10/share/misc/scsi_modes Wed Feb 8 16:00:40 2017 (r313443) +++ stable/10/share/misc/scsi_modes Wed Feb 8 16:01:14 2017 (r313444) @@ -478,4 +478,17 @@ {Current Write Speed Supported (kBps)} i2 }; +0x1d "Timeout and Protect" { + {Reserved} *i2 + {Reserved} *t4 + {G3Enable} t1 + {TMOE} t1 + {DISP} t1 + {SWPP} t1 + {Reserved} *i1 + {Group 1 Minimum Timeout} i2 + {Group 2 Minimum Timeout} i2 + {Group 3 Timeout} i2 +}; + 0x00 "Vendor-Specific"; From owner-svn-src-all@freebsd.org Wed Feb 8 16:06:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CECCCD5BE0; Wed, 8 Feb 2017 16:06:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB6FE1E88; Wed, 8 Feb 2017 16:06:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18G6Jog039738; Wed, 8 Feb 2017 16:06:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18G6JwI039735; Wed, 8 Feb 2017 16:06:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702081606.v18G6JwI039735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 8 Feb 2017 16:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313445 - stable/11/sys/dev/ahci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 16:06:21 -0000 Author: mav Date: Wed Feb 8 16:06:19 2017 New Revision: 313445 URL: https://svnweb.freebsd.org/changeset/base/313445 Log: MFC r312767: Partially workaround ASMedia HBA error recovery. Taking closer look on my ASM1062 I found that it has bunch of issues around error recovery: reported wrong CCS, failed commands reported as completed, READ LOG EXT times out after NCQ error. This patch workarounds first two problems, that were making ATAPI devices close to unusable on these HBAs. Modified: stable/11/sys/dev/ahci/ahci.c stable/11/sys/dev/ahci/ahci.h stable/11/sys/dev/ahci/ahci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ahci/ahci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci.c Wed Feb 8 16:01:14 2017 (r313444) +++ stable/11/sys/dev/ahci/ahci.c Wed Feb 8 16:06:19 2017 (r313445) @@ -758,7 +758,7 @@ ahci_ch_attach(device_t dev) /* Construct SIM entry */ ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch, device_get_unit(dev), (struct mtx *)&ch->mtx, - min(2, ch->numslots), + (ch->quirks & AHCI_Q_NOCCS) ? 1 : min(2, ch->numslots), (ch->caps & AHCI_CAP_SNCQ) ? ch->numslots : 0, devq); if (ch->sim == NULL) { @@ -1271,8 +1271,19 @@ ahci_ch_intr_main(struct ahci_channel *c /* Process command errors */ if (istatus & (AHCI_P_IX_OF | AHCI_P_IX_IF | AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) { - ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK) - >> AHCI_P_CMD_CCS_SHIFT; + if (ch->quirks & AHCI_Q_NOCCS) { + /* + * ASMedia chips sometimes report failed commands as + * completed. Count all running commands as failed. + */ + cstatus |= ch->rslots; + + /* They also report wrong CCS, so try to guess one. */ + ccs = powerof2(cstatus) ? ffs(cstatus) - 1 : -1; + } else { + ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & + AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT; + } //device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x fbs %08x ccs %d\n", // __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), // serr, ATA_INL(ch->r_mem, AHCI_P_FBS), ccs); Modified: stable/11/sys/dev/ahci/ahci.h ============================================================================== --- stable/11/sys/dev/ahci/ahci.h Wed Feb 8 16:01:14 2017 (r313444) +++ stable/11/sys/dev/ahci/ahci.h Wed Feb 8 16:06:19 2017 (r313445) @@ -598,6 +598,7 @@ enum ahci_err_type { #define AHCI_Q_FORCE_PI 0x00040000 #define AHCI_Q_RESTORE_CAP 0x00080000 #define AHCI_Q_NOMSIX 0x00100000 +#define AHCI_Q_NOCCS 0x00400000 #define AHCI_Q_BIT_STRING \ "\020" \ @@ -621,7 +622,8 @@ enum ahci_err_type { "\0221MSI" \ "\023FORCE_PI" \ "\024RESTORE_CAP" \ - "\025NOMSIX" + "\025NOMSIX" \ + "\027NOCCS" int ahci_attach(device_t dev); int ahci_detach(device_t dev); Modified: stable/11/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci_pci.c Wed Feb 8 16:01:14 2017 (r313444) +++ stable/11/sys/dev/ahci/ahci_pci.c Wed Feb 8 16:06:19 2017 (r313445) @@ -73,15 +73,15 @@ static const struct { {0x78021022, 0x00, "AMD Hudson-2", 0}, {0x78031022, 0x00, "AMD Hudson-2", 0}, {0x78041022, 0x00, "AMD Hudson-2", 0}, - {0x06011b21, 0x00, "ASMedia ASM1060", 0}, - {0x06021b21, 0x00, "ASMedia ASM1060", 0}, - {0x06111b21, 0x00, "ASMedia ASM1061", 0}, - {0x06121b21, 0x00, "ASMedia ASM1062", 0}, - {0x06201b21, 0x00, "ASMedia ASM106x", 0}, - {0x06211b21, 0x00, "ASMedia ASM106x", 0}, - {0x06221b21, 0x00, "ASMedia ASM106x", 0}, - {0x06241b21, 0x00, "ASMedia ASM106x", 0}, - {0x06251b21, 0x00, "ASMedia ASM106x", 0}, + {0x06011b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS}, + {0x06021b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS}, + {0x06111b21, 0x00, "ASMedia ASM1061", AHCI_Q_NOCCS}, + {0x06121b21, 0x00, "ASMedia ASM1062", AHCI_Q_NOCCS}, + {0x06201b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06211b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, {0x26818086, 0x00, "Intel ESB2", 0}, From owner-svn-src-all@freebsd.org Wed Feb 8 16:08:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98035CD5CDA; Wed, 8 Feb 2017 16:08:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72995EA; Wed, 8 Feb 2017 16:08:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18G7xDU039852; Wed, 8 Feb 2017 16:07:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18G7xrL039848; Wed, 8 Feb 2017 16:07:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702081607.v18G7xrL039848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 8 Feb 2017 16:07:59 +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: r313446 - stable/10/sys/dev/ahci 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 16:08:00 -0000 Author: mav Date: Wed Feb 8 16:07:59 2017 New Revision: 313446 URL: https://svnweb.freebsd.org/changeset/base/313446 Log: MFC r312767: Partially workaround ASMedia HBA error recovery. Taking closer look on my ASM1062 I found that it has bunch of issues around error recovery: reported wrong CCS, failed commands reported as completed, READ LOG EXT times out after NCQ error. This patch workarounds first two problems, that were making ATAPI devices close to unusable on these HBAs. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahci.h stable/10/sys/dev/ahci/ahci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Wed Feb 8 16:06:19 2017 (r313445) +++ stable/10/sys/dev/ahci/ahci.c Wed Feb 8 16:07:59 2017 (r313446) @@ -711,7 +711,7 @@ ahci_ch_attach(device_t dev) /* Construct SIM entry */ ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch, device_get_unit(dev), (struct mtx *)&ch->mtx, - min(2, ch->numslots), + (ch->quirks & AHCI_Q_NOCCS) ? 1 : min(2, ch->numslots), (ch->caps & AHCI_CAP_SNCQ) ? ch->numslots : 0, devq); if (ch->sim == NULL) { @@ -1224,8 +1224,19 @@ ahci_ch_intr_main(struct ahci_channel *c /* Process command errors */ if (istatus & (AHCI_P_IX_OF | AHCI_P_IX_IF | AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) { - ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK) - >> AHCI_P_CMD_CCS_SHIFT; + if (ch->quirks & AHCI_Q_NOCCS) { + /* + * ASMedia chips sometimes report failed commands as + * completed. Count all running commands as failed. + */ + cstatus |= ch->rslots; + + /* They also report wrong CCS, so try to guess one. */ + ccs = powerof2(cstatus) ? ffs(cstatus) - 1 : -1; + } else { + ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & + AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT; + } //device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x fbs %08x ccs %d\n", // __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), // serr, ATA_INL(ch->r_mem, AHCI_P_FBS), ccs); Modified: stable/10/sys/dev/ahci/ahci.h ============================================================================== --- stable/10/sys/dev/ahci/ahci.h Wed Feb 8 16:06:19 2017 (r313445) +++ stable/10/sys/dev/ahci/ahci.h Wed Feb 8 16:07:59 2017 (r313446) @@ -574,6 +574,7 @@ enum ahci_err_type { #define AHCI_Q_SATA1_UNIT0 0x00008000 /* need better method for this */ #define AHCI_Q_ABAR0 0x00010000 #define AHCI_Q_1MSI 0x00020000 +#define AHCI_Q_NOCCS 0x00400000 #define AHCI_Q_BIT_STRING \ "\020" \ @@ -594,7 +595,8 @@ enum ahci_err_type { "\017MAXIO_64K" \ "\020SATA1_UNIT0" \ "\021ABAR0" \ - "\0221MSI" + "\0221MSI" \ + "\027NOCCS" int ahci_attach(device_t dev); int ahci_detach(device_t dev); Modified: stable/10/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci_pci.c Wed Feb 8 16:06:19 2017 (r313445) +++ stable/10/sys/dev/ahci/ahci_pci.c Wed Feb 8 16:07:59 2017 (r313446) @@ -73,15 +73,15 @@ static const struct { {0x78021022, 0x00, "AMD Hudson-2", 0}, {0x78031022, 0x00, "AMD Hudson-2", 0}, {0x78041022, 0x00, "AMD Hudson-2", 0}, - {0x06011b21, 0x00, "ASMedia ASM1060", 0}, - {0x06021b21, 0x00, "ASMedia ASM1060", 0}, - {0x06111b21, 0x00, "ASMedia ASM1061", 0}, - {0x06121b21, 0x00, "ASMedia ASM1062", 0}, - {0x06201b21, 0x00, "ASMedia ASM106x", 0}, - {0x06211b21, 0x00, "ASMedia ASM106x", 0}, - {0x06221b21, 0x00, "ASMedia ASM106x", 0}, - {0x06241b21, 0x00, "ASMedia ASM106x", 0}, - {0x06251b21, 0x00, "ASMedia ASM106x", 0}, + {0x06011b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS}, + {0x06021b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS}, + {0x06111b21, 0x00, "ASMedia ASM1061", AHCI_Q_NOCCS}, + {0x06121b21, 0x00, "ASMedia ASM1062", AHCI_Q_NOCCS}, + {0x06201b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06211b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, + {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, {0x26818086, 0x00, "Intel ESB2", 0}, From owner-svn-src-all@freebsd.org Wed Feb 8 16:46:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFA72CD6889; Wed, 8 Feb 2017 16:46:58 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 633211A31; Wed, 8 Feb 2017 16:46:58 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18Gkv6E056125; Wed, 8 Feb 2017 16:46:57 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18Gkvfr056123; Wed, 8 Feb 2017 16:46:57 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201702081646.v18Gkvfr056123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Wed, 8 Feb 2017 16:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313447 - in head/sys: dev/acpica x86/x86 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 16:46:58 -0000 Author: jtl Date: Wed Feb 8 16:46:57 2017 New Revision: 313447 URL: https://svnweb.freebsd.org/changeset/base/313447 Log: Ensure the idle thread's loop services interrupts in a timely way when using the ACPI C1/mwait sleep method. Previously, the mwait instruction would return when an interrupt was pending; however, the idle loop did not actually enable interrupts when this occurred. This led to a situation where the idle loop could quickly spin through the C1/mwait sleep method a number of times when an interrupt was pending. (Eventually, the situation corrected itself when something other than an interrupt triggered the idle loop to either enable interrupts or schedule another thread.) Reviewed by: kib, imp (earlier version) Input from: jhb MFC after: 1 week Sponsored by: Netflix Modified: head/sys/dev/acpica/acpi_cpu.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Wed Feb 8 16:07:59 2017 (r313446) +++ head/sys/dev/acpica/acpi_cpu.c Wed Feb 8 16:46:57 2017 (r313447) @@ -1158,6 +1158,9 @@ acpi_cpu_idle(sbintime_t sbt) end_time = ((cpu_ticks() - cputicks) << 20) / cpu_tickrate(); if (curthread->td_critnest == 0) end_time = min(end_time, 500000 / hz); + /* acpi_cpu_c1() returns with interrupts enabled. */ + if (cx_next->do_mwait) + ACPI_ENABLE_IRQS(); sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + end_time) / 4; return; } Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Wed Feb 8 16:07:59 2017 (r313446) +++ head/sys/x86/x86/cpu_machdep.c Wed Feb 8 16:46:57 2017 (r313447) @@ -129,6 +129,14 @@ acpi_cpu_c1(void) __asm __volatile("sti; hlt"); } +/* + * Use mwait to pause execution while waiting for an interrupt or + * another thread to signal that there is more work. + * + * NOTE: Interrupts will cause a wakeup; however, this function does + * not enable interrupt handling. The caller is responsible to enable + * interrupts. + */ void acpi_cpu_idle_mwait(uint32_t mwait_hint) { From owner-svn-src-all@freebsd.org Wed Feb 8 17:03:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00BACCD6FA9; Wed, 8 Feb 2017 17:03:54 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C18BF941; Wed, 8 Feb 2017 17:03:53 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18H3q5k064194; Wed, 8 Feb 2017 17:03:52 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18H3qZD064193; Wed, 8 Feb 2017 17:03:52 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702081703.v18H3qZD064193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Wed, 8 Feb 2017 17:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313448 - head/usr.sbin/bsdinstall/scripts 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 17:03:54 -0000 Author: garga (ports committer) Date: Wed Feb 8 17:03:52 2017 New Revision: 313448 URL: https://svnweb.freebsd.org/changeset/base/313448 Log: bsdinstall: Make sure chroot filesystems are umounted after use * DISTDIR_IS_UNIONFS is set every time BSDINSTALL_DISTDIR is mounted inside BSDINSTALL_CHROOT. Use this flag to decide if it needs to be umounted * BSDINSTALL_CHROOT/dev is mounted when 'bsdinstall mount' is called, there is no need to mount it again when user goes to shell after installation Reviewed by: allanjude Obtained from: pfSense MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D8573 Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Wed Feb 8 16:46:57 2017 (r313447) +++ head/usr.sbin/bsdinstall/scripts/auto Wed Feb 8 17:03:52 2017 (r313448) @@ -449,9 +449,11 @@ finalconfig trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" +if [ -n "$DISTDIR_IS_UNIONFS" ]; then + umount -f $BSDINSTALL_DISTDIR +fi + if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then - [ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \ - umount "$BSDINSTALL_DISTDIR" rm -rf "$BSDINSTALL_FETCHDEST" fi @@ -460,7 +462,6 @@ dialog --backtitle "FreeBSD Installer" - "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 if [ $? -eq 0 ]; then clear - mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" echo This shell is operating in a chroot in the new system. \ When finished making configuration changes, type \"exit\". chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 From owner-svn-src-all@freebsd.org Wed Feb 8 17:45:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56720CD6FE9; Wed, 8 Feb 2017 17:45:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2612E766; Wed, 8 Feb 2017 17:45:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18HjOZc080927; Wed, 8 Feb 2017 17:45:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18HjOAW080925; Wed, 8 Feb 2017 17:45:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702081745.v18HjOAW080925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 8 Feb 2017 17:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313449 - in head: sys/sys usr.bin/gcore 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 17:45:25 -0000 Author: jhb Date: Wed Feb 8 17:45:23 2017 New Revision: 313449 URL: https://svnweb.freebsd.org/changeset/base/313449 Log: Trim trailing whitespace (mostly introduced in r313407). Sponsored by: DARPA / AFRL Modified: head/sys/sys/proc.h head/usr.bin/gcore/elfcore.c Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Feb 8 17:03:52 2017 (r313448) +++ head/sys/sys/proc.h Wed Feb 8 17:45:23 2017 (r313449) @@ -315,7 +315,7 @@ struct thread { } td_state; /* (t) thread state */ union { register_t tdu_retval[2]; - off_t tdu_off; + off_t tdu_off; } td_uretoff; /* (k) Syscall aux returns. */ #define td_retval td_uretoff.tdu_retval u_int td_cowgen; /* (k) Generation of COW pointers. */ @@ -619,7 +619,7 @@ struct proc { u_int p_xsig; /* (c) Stop/kill sig. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ - + /* End area that is copied on creation. */ #define p_endcopy p_elf_flags struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Wed Feb 8 17:03:52 2017 (r313448) +++ head/usr.bin/gcore/elfcore.c Wed Feb 8 17:45:23 2017 (r313449) @@ -434,7 +434,7 @@ elf_puthdr(int efd, pid_t pid, vm_map_en err(1, "Failed to re-read ELF header"); else if (cnt != sizeof(binhdr)) errx(1, "Failed to re-read ELF header"); - + ehdr = (Elf_Ehdr *)hdr; ehdr->e_ident[EI_MAG0] = ELFMAG0; From owner-svn-src-all@freebsd.org Wed Feb 8 18:32:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AB3ACD6927; Wed, 8 Feb 2017 18:32:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4324AF22; Wed, 8 Feb 2017 18:32:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18IWatx001836; Wed, 8 Feb 2017 18:32:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18IWZlC001828; Wed, 8 Feb 2017 18:32:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702081832.v18IWZlC001828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 8 Feb 2017 18:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313450 - in stable/11: lib/libc/gen lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 18:32:37 -0000 Author: jhb Date: Wed Feb 8 18:32:35 2017 New Revision: 313450 URL: https://svnweb.freebsd.org/changeset/base/313450 Log: MFC 310638: Rename the 'flags' argument to getfsstat() to 'mode' and validate it. This argument is not a bitmask of flags, but only accepts a single value. Fail with EINVAL if an invalid value is passed to 'flag'. Rename the 'flags' argument to getmntinfo(3) to 'mode' as well to match. This is a followup to r308088. Modified: stable/11/lib/libc/gen/getmntinfo.3 stable/11/lib/libc/gen/getmntinfo.c stable/11/lib/libc/sys/getfsstat.2 stable/11/sys/compat/freebsd32/freebsd32_misc.c stable/11/sys/compat/freebsd32/syscalls.master stable/11/sys/kern/syscalls.master stable/11/sys/kern/vfs_syscalls.c stable/11/sys/sys/syscallsubr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/getmntinfo.3 ============================================================================== --- stable/11/lib/libc/gen/getmntinfo.3 Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/lib/libc/gen/getmntinfo.3 Wed Feb 8 18:32:35 2017 (r313450) @@ -28,7 +28,7 @@ .\" @(#)getmntinfo.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd December 27, 2016 .Dt GETMNTINFO 3 .Os .Sh NAME @@ -41,7 +41,7 @@ .In sys/ucred.h .In sys/mount.h .Ft int -.Fn getmntinfo "struct statfs **mntbufp" "int flags" +.Fn getmntinfo "struct statfs **mntbufp" "int mode" .Sh DESCRIPTION The .Fn getmntinfo @@ -55,7 +55,7 @@ The .Fn getmntinfo function passes its -.Fa flags +.Fa mode argument transparently to .Xr getfsstat 2 . .Sh RETURN VALUES Modified: stable/11/lib/libc/gen/getmntinfo.c ============================================================================== --- stable/11/lib/libc/gen/getmntinfo.c Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/lib/libc/gen/getmntinfo.c Wed Feb 8 18:32:35 2017 (r313450) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); * Return information about mounted filesystems. */ int -getmntinfo(struct statfs **mntbufp, int flags) +getmntinfo(struct statfs **mntbufp, int mode) { static struct statfs *mntbuf; static int mntsize; @@ -50,7 +50,7 @@ getmntinfo(struct statfs **mntbufp, int if (mntsize <= 0 && (mntsize = getfsstat(0, 0, MNT_NOWAIT)) < 0) return (0); - if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, flags)) < 0) + if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) return (0); while (bufsize <= mntsize * sizeof(struct statfs)) { if (mntbuf) @@ -58,7 +58,7 @@ getmntinfo(struct statfs **mntbufp, int bufsize = (mntsize + 1) * sizeof(struct statfs); if ((mntbuf = malloc(bufsize)) == NULL) return (0); - if ((mntsize = getfsstat(mntbuf, bufsize, flags)) < 0) + if ((mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) return (0); } *mntbufp = mntbuf; Modified: stable/11/lib/libc/sys/getfsstat.2 ============================================================================== --- stable/11/lib/libc/sys/getfsstat.2 Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/lib/libc/sys/getfsstat.2 Wed Feb 8 18:32:35 2017 (r313450) @@ -28,7 +28,7 @@ .\" @(#)getfsstat.2 8.3 (Berkeley) 5/25/95 .\" $FreeBSD$ .\" -.Dd November 6, 2016 +.Dd December 27, 2016 .Dt GETFSSTAT 2 .Os .Sh NAME @@ -41,7 +41,7 @@ .In sys/ucred.h .In sys/mount.h .Ft int -.Fn getfsstat "struct statfs *buf" "long bufsize" "int flags" +.Fn getfsstat "struct statfs *buf" "long bufsize" "int mode" .Sh DESCRIPTION The .Fn getfsstat @@ -74,11 +74,11 @@ is given as NULL, returns just the number of mounted file systems. .Pp Normally -.Fa flags +.Fa mode should be specified as .Dv MNT_WAIT . If -.Fa flags +.Fa mode is set to .Dv MNT_NOWAIT , .Fn getfsstat @@ -108,6 +108,12 @@ The .Fa buf argument points to an invalid address. +.It Bq Er EINVAL +.Fa mode +is set to a value other than +.Dv MNT_WAIT +or +.Dv MNT_NOWAIT . .It Bq Er EIO An .Tn I/O Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_misc.c Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Wed Feb 8 18:32:35 2017 (r313450) @@ -254,7 +254,7 @@ freebsd4_freebsd32_getfsstat(struct thre count = uap->bufsize / sizeof(struct statfs32); size = count * sizeof(struct statfs); - error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE, uap->flags); + error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE, uap->mode); if (size > 0) { sp = buf; copycount = count; Modified: stable/11/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/11/sys/compat/freebsd32/syscalls.master Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/sys/compat/freebsd32/syscalls.master Wed Feb 8 18:32:35 2017 (r313450) @@ -89,7 +89,7 @@ obreak_args int 18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ struct statfs32 *buf, long bufsize, \ - int flags); } + int mode); } 19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int offset, \ int whence); } 20 AUE_GETPID NOPROTO { pid_t getpid(void); } @@ -712,7 +712,7 @@ off_t *sbytes, int flags); } 394 AUE_NULL UNIMPL mac_syscall 395 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs *buf, \ - long bufsize, int flags); } + long bufsize, int mode); } 396 AUE_STATFS NOPROTO { int statfs(char *path, \ struct statfs *buf); } 397 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs *buf); } Modified: stable/11/sys/kern/syscalls.master ============================================================================== --- stable/11/sys/kern/syscalls.master Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/sys/kern/syscalls.master Wed Feb 8 18:32:35 2017 (r313450) @@ -85,7 +85,7 @@ 17 AUE_NULL STD { int obreak(char *nsize); } break \ obreak_args int 18 AUE_GETFSSTAT COMPAT4 { int getfsstat(struct ostatfs *buf, \ - long bufsize, int flags); } + long bufsize, int mode); } 19 AUE_LSEEK COMPAT { long lseek(int fd, long offset, \ int whence); } 20 AUE_GETPID STD { pid_t getpid(void); } @@ -707,7 +707,7 @@ 394 AUE_NULL STD { int mac_syscall(const char *policy, \ int call, void *arg); } 395 AUE_GETFSSTAT STD { int getfsstat(struct statfs *buf, \ - long bufsize, int flags); } + long bufsize, int mode); } 396 AUE_STATFS STD { int statfs(char *path, \ struct statfs *buf); } 397 AUE_FSTATFS STD { int fstatfs(int fd, struct statfs *buf); } Modified: stable/11/sys/kern/vfs_syscalls.c ============================================================================== --- stable/11/sys/kern/vfs_syscalls.c Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/sys/kern/vfs_syscalls.c Wed Feb 8 18:32:35 2017 (r313450) @@ -390,7 +390,7 @@ kern_fstatfs(struct thread *td, int fd, struct getfsstat_args { struct statfs *buf; long bufsize; - int flags; + int mode; }; #endif int @@ -399,7 +399,7 @@ sys_getfsstat(td, uap) register struct getfsstat_args /* { struct statfs *buf; long bufsize; - int flags; + int mode; } */ *uap; { size_t count; @@ -408,7 +408,7 @@ sys_getfsstat(td, uap) if (uap->bufsize < 0 || uap->bufsize > SIZE_MAX) return (EINVAL); error = kern_getfsstat(td, &uap->buf, uap->bufsize, &count, - UIO_USERSPACE, uap->flags); + UIO_USERSPACE, uap->mode); if (error == 0) td->td_retval[0] = count; return (error); @@ -421,13 +421,20 @@ sys_getfsstat(td, uap) */ int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, - size_t *countp, enum uio_seg bufseg, int flags) + size_t *countp, enum uio_seg bufseg, int mode) { struct mount *mp, *nmp; struct statfs *sfsp, *sp, *sptmp, *tofree; size_t count, maxcount; int error; + switch (mode) { + case MNT_WAIT: + case MNT_NOWAIT: + break; + default: + return (EINVAL); + } restart: maxcount = bufsize / sizeof(struct statfs); if (bufsize == 0) { @@ -461,7 +468,7 @@ restart: continue; } #endif - if (flags == MNT_WAIT) { + if (mode == MNT_WAIT) { if (vfs_busy(mp, MBF_MNTLSTLOCK) != 0) { /* * If vfs_busy() failed, and MBF_NOWAIT @@ -490,10 +497,10 @@ restart: sp->f_namemax = NAME_MAX; sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; /* - * If MNT_NOWAIT or MNT_LAZY is specified, do not - * refresh the fsstat cache. + * If MNT_NOWAIT is specified, do not refresh + * the fsstat cache. */ - if (flags != MNT_LAZY && flags != MNT_NOWAIT) { + if (mode != MNT_NOWAIT) { error = VFS_STATFS(mp, sp); if (error != 0) { mtx_lock(&mountlist_mtx); @@ -609,7 +616,7 @@ freebsd4_fstatfs(td, uap) struct freebsd4_getfsstat_args { struct ostatfs *buf; long bufsize; - int flags; + int mode; }; #endif int @@ -618,7 +625,7 @@ freebsd4_getfsstat(td, uap) register struct freebsd4_getfsstat_args /* { struct ostatfs *buf; long bufsize; - int flags; + int mode; } */ *uap; { struct statfs *buf, *sp; @@ -633,7 +640,7 @@ freebsd4_getfsstat(td, uap) return (EINVAL); size = count * sizeof(struct statfs); error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE, - uap->flags); + uap->mode); td->td_retval[0] = count; if (size != 0) { sp = buf; Modified: stable/11/sys/sys/syscallsubr.h ============================================================================== --- stable/11/sys/sys/syscallsubr.h Wed Feb 8 17:45:23 2017 (r313449) +++ stable/11/sys/sys/syscallsubr.h Wed Feb 8 18:32:35 2017 (r313450) @@ -109,7 +109,7 @@ int kern_futimens(struct thread *td, int int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, long *basep, ssize_t *residp, enum uio_seg bufseg); int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, - size_t *countp, enum uio_seg bufseg, int flags); + size_t *countp, enum uio_seg bufseg, int mode); int kern_getitimer(struct thread *, u_int, struct itimerval *); int kern_getppid(struct thread *); int kern_getpeername(struct thread *td, int fd, struct sockaddr **sa, From owner-svn-src-all@freebsd.org Wed Feb 8 18:32:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA7FBCD699E; Wed, 8 Feb 2017 18:32:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98A1E1013; Wed, 8 Feb 2017 18:32:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18IWrrx001897; Wed, 8 Feb 2017 18:32:53 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18IWrIa001896; Wed, 8 Feb 2017 18:32:53 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702081832.v18IWrIa001896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 8 Feb 2017 18:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313451 - head/sys/boot/common 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 18:32:54 -0000 Author: tsoome Date: Wed Feb 8 18:32:53 2017 New Revision: 313451 URL: https://svnweb.freebsd.org/changeset/base/313451 Log: loader: possible NULL pointer dereference in bcache.c Coverity detected the possible NULL pointer dereference case. Also updated comment as was suggested in illumos review. CID: 1371008 Reported by: Coverity Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9496 Modified: head/sys/boot/common/bcache.c Modified: head/sys/boot/common/bcache.c ============================================================================== --- head/sys/boot/common/bcache.c Wed Feb 8 18:32:35 2017 (r313450) +++ head/sys/boot/common/bcache.c Wed Feb 8 18:32:53 2017 (r313451) @@ -224,13 +224,13 @@ read_strategy(void *devdata, int rw, dad caddr_t p_buf; uint32_t *marker; - marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); - if (bc == NULL) { errno = ENODEV; return (-1); } + marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize); + if (rsize != NULL) *rsize = 0; @@ -290,10 +290,9 @@ read_strategy(void *devdata, int rw, dad * And secondly, this way we get the most conservative setup for the ra. * * The selection of multiple of 16 blocks (8KB) is quite arbitrary, however, - * we want to have the CD (2K) and the 4K disks to be covered. - * Also, as we have 32 blocks to be allocated as the fallback value in the - * bcache_allocate(), the 16 ra blocks will allow the read ahead - * to be used even with bcache this small. + * we want to cover CDs (2K) and 4K disks. + * bcache_allocate() will always fall back to a minimum of 32 blocks. + * Our choice of 16 read ahead blocks will always fit inside the bcache. */ ra = bc->bcache_nblks - BHASH(bc, p_blk + p_size); From owner-svn-src-all@freebsd.org Wed Feb 8 18:33:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1EA0CD69DD; Wed, 8 Feb 2017 18:33:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A12710B6; Wed, 8 Feb 2017 18:33:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18IX1b1001979; Wed, 8 Feb 2017 18:33:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18IX0HZ001968; Wed, 8 Feb 2017 18:33:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702081833.v18IX0HZ001968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 8 Feb 2017 18:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313452 - in stable/11/sys: compat/freebsd32 kern sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 18:33:02 -0000 Author: jhb Date: Wed Feb 8 18:33:00 2017 New Revision: 313452 URL: https://svnweb.freebsd.org/changeset/base/313452 Log: Regen after r313450. Modified: stable/11/sys/compat/freebsd32/freebsd32_proto.h stable/11/sys/compat/freebsd32/freebsd32_syscall.h stable/11/sys/compat/freebsd32/freebsd32_syscalls.c stable/11/sys/compat/freebsd32/freebsd32_sysent.c stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c stable/11/sys/kern/init_sysent.c stable/11/sys/kern/syscalls.c stable/11/sys/kern/systrace_args.c stable/11/sys/sys/syscall.h stable/11/sys/sys/syscall.mk stable/11/sys/sys/sysproto.h Modified: stable/11/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_proto.h Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/compat/freebsd32/freebsd32_proto.h Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -917,7 +917,7 @@ int ofreebsd32_getdirentries(struct thre struct freebsd4_freebsd32_getfsstat_args { char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd4_freebsd32_statfs_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; Modified: stable/11/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscall.h Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/compat/freebsd32/freebsd32_syscall.h Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #define FREEBSD32_SYS_syscall 0 Modified: stable/11/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ const char *freebsd32_syscallnames[] = { Modified: stable/11/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_sysent.c Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/compat/freebsd32/freebsd32_sysent.c Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #include "opt_compat.h" Modified: stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Feb 8 18:33:00 2017 (r313452) @@ -1969,7 +1969,7 @@ systrace_args(int sysnum, void *params, struct getfsstat_args *p = params; uarg[0] = (intptr_t) p->buf; /* struct statfs * */ iarg[1] = p->bufsize; /* long */ - iarg[2] = p->flags; /* int */ + iarg[2] = p->mode; /* int */ *n_args = 3; break; } Modified: stable/11/sys/kern/init_sysent.c ============================================================================== --- stable/11/sys/kern/init_sysent.c Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/kern/init_sysent.c Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #include "opt_compat.h" Modified: stable/11/sys/kern/syscalls.c ============================================================================== --- stable/11/sys/kern/syscalls.c Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/kern/syscalls.c Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ const char *syscallnames[] = { Modified: stable/11/sys/kern/systrace_args.c ============================================================================== --- stable/11/sys/kern/systrace_args.c Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/kern/systrace_args.c Wed Feb 8 18:33:00 2017 (r313452) @@ -2081,7 +2081,7 @@ systrace_args(int sysnum, void *params, struct getfsstat_args *p = params; uarg[0] = (intptr_t) p->buf; /* struct statfs * */ iarg[1] = p->bufsize; /* long */ - iarg[2] = p->flags; /* int */ + iarg[2] = p->mode; /* int */ *n_args = 3; break; } Modified: stable/11/sys/sys/syscall.h ============================================================================== --- stable/11/sys/sys/syscall.h Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/sys/syscall.h Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #define SYS_syscall 0 Modified: stable/11/sys/sys/syscall.mk ============================================================================== --- stable/11/sys/sys/syscall.mk Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/sys/syscall.mk Wed Feb 8 18:33:00 2017 (r313452) @@ -1,7 +1,7 @@ # FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/11/sys/kern/syscalls.master 304977 2016-08-29 05:15:43Z kib +# created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb MIASM = \ syscall.o \ exit.o \ Modified: stable/11/sys/sys/sysproto.h ============================================================================== --- stable/11/sys/sys/sysproto.h Wed Feb 8 18:32:53 2017 (r313451) +++ stable/11/sys/sys/sysproto.h Wed Feb 8 18:33:00 2017 (r313452) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #ifndef _SYS_SYSPROTO_H_ @@ -1107,7 +1107,7 @@ struct mac_syscall_args { struct getfsstat_args { char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct statfs_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -2356,7 +2356,7 @@ int ogetdirentries(struct thread *, stru struct freebsd4_getfsstat_args { char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)]; char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd4_statfs_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; From owner-svn-src-all@freebsd.org Wed Feb 8 19:26:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62B58CD5FA5; Wed, 8 Feb 2017 19:26:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17B7F1E1B; Wed, 8 Feb 2017 19:26:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18JPxKJ023708; Wed, 8 Feb 2017 19:25:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18JPwcF023706; Wed, 8 Feb 2017 19:25:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702081925.v18JPwcF023706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Feb 2017 19:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313453 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 19:26:00 -0000 Author: mjg Date: Wed Feb 8 19:25:58 2017 New Revision: 313453 URL: https://svnweb.freebsd.org/changeset/base/313453 Log: Implement LOCKSTAT_OOL_PROFILE_ENABLED For use in uninlined locking primitives to decide whether lockstat or profiling needs to be taken care of. Modified: head/sys/sys/lockstat.h head/sys/sys/sdt.h Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Wed Feb 8 18:33:00 2017 (r313452) +++ head/sys/sys/lockstat.h Wed Feb 8 19:25:58 2017 (r313453) @@ -107,10 +107,6 @@ extern int lockstat_enabled; LOCKSTAT_RECORD1(probe, lp, a); \ } while (0) -#ifndef LOCK_PROFILING -#define LOCKSTAT_PROFILE_ENABLED(probe) SDT_PROBE_ENABLED(lockstat, , , probe) -#endif - struct lock_object; uint64_t lockstat_nsecs(struct lock_object *); @@ -134,10 +130,16 @@ uint64_t lockstat_nsecs(struct lock_obje #define LOCKSTAT_PROFILE_RELEASE_RWLOCK(probe, lp, a) \ LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) +#endif /* !KDTRACE_HOOKS */ + #ifndef LOCK_PROFILING -#define LOCKSTAT_PROFILE_ENABLED(probe) 0 +#define LOCKSTAT_PROFILE_ENABLED(probe) \ + SDT_PROBE_ENABLED(lockstat, , , probe) +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) \ + SDT_PROBE_ENABLED(lockstat, , , probe) +#else +#define LOCKSTAT_OOL_PROFILE_ENABLED(probe) 1 #endif -#endif /* !KDTRACE_HOOKS */ #endif /* _KERNEL */ #endif /* _SYS_LOCKSTAT_H */ Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Wed Feb 8 18:33:00 2017 (r313452) +++ head/sys/sys/sdt.h Wed Feb 8 19:25:58 2017 (r313453) @@ -86,6 +86,7 @@ #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) +#define SDT_PROBE_ENABLED(prov, mod, func, name) 0 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) From owner-svn-src-all@freebsd.org Wed Feb 8 19:28:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C3CCCD613B; Wed, 8 Feb 2017 19:28:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 240FE298; Wed, 8 Feb 2017 19:28:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18JSl2Y023859; Wed, 8 Feb 2017 19:28:47 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18JSlN3023858; Wed, 8 Feb 2017 19:28:47 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702081928.v18JSlN3023858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Feb 2017 19:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313454 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 19:28:48 -0000 Author: mjg Date: Wed Feb 8 19:28:46 2017 New Revision: 313454 URL: https://svnweb.freebsd.org/changeset/base/313454 Log: rwlock: implemenet rlock/runlock fast path This improves singlethreaded throughput on my test machine from ~247 mln ops/s to ~328 mln. It is mostly about avoiding the setup cost of lockstat. Reviewed by: jhb (previous version) Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Wed Feb 8 19:25:58 2017 (r313453) +++ head/sys/kern/kern_rwlock.c Wed Feb 8 19:28:46 2017 (r313454) @@ -359,13 +359,44 @@ _rw_wunlock_cookie(volatile uintptr_t *c * is unlocked and has no writer waiters or spinners. Failing otherwise * prioritizes writers before readers. */ -#define RW_CAN_READ(_rw) \ - ((curthread->td_rw_rlocks && (_rw) & RW_LOCK_READ) || ((_rw) & \ +#define RW_CAN_READ(td, _rw) \ + (((td)->td_rw_rlocks && (_rw) & RW_LOCK_READ) || ((_rw) & \ (RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) == \ RW_LOCK_READ) -void -__rw_rlock(volatile uintptr_t *c, const char *file, int line) +static bool __always_inline +__rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, + const char *file, int line) +{ + + /* + * Handle the easy case. If no other thread has a write + * lock, then try to bump up the count of read locks. Note + * that we have to preserve the current state of the + * RW_LOCK_WRITE_WAITERS flag. If we fail to acquire a + * read lock, then rw_lock must have changed, so restart + * the loop. Note that this handles the case of a + * completely unlocked rwlock since such a lock is encoded + * as a read lock with no waiters. + */ + while (RW_CAN_READ(td, *vp)) { + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, vp, + *vp + RW_ONE_READER)) { + if (LOCK_LOG_TEST(&rw->lock_object, 0)) + CTR4(KTR_LOCK, + "%s: %p succeed %p -> %p", __func__, + rw, (void *)*vp, + (void *)(*vp + RW_ONE_READER)); + td->td_rw_rlocks++; + return (true); + } + } + return (false); +} + +static void __noinline +__rw_rlock_hard(volatile uintptr_t *c, struct thread *td, uintptr_t v, + const char *file, int line) { struct rwlock *rw; struct turnstile *ts; @@ -378,7 +409,6 @@ __rw_rlock(volatile uintptr_t *c, const uint64_t waittime = 0; int contested = 0; #endif - uintptr_t v; #if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS) struct lock_delay_arg lda; #endif @@ -399,51 +429,15 @@ __rw_rlock(volatile uintptr_t *c, const #endif rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), - ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", - curthread, rw->lock_object.lo_name, file, line)); - KASSERT(rw->rw_lock != RW_DESTROYED, - ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); - KASSERT(rw_wowner(rw) != curthread, - ("rw_rlock: wlock already held for %s @ %s:%d", - rw->lock_object.lo_name, file, line)); - WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER, file, line, NULL); - #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&rw->lock_object); #endif - v = RW_READ_VALUE(rw); #ifdef KDTRACE_HOOKS state = v; #endif for (;;) { - /* - * Handle the easy case. If no other thread has a write - * lock, then try to bump up the count of read locks. Note - * that we have to preserve the current state of the - * RW_LOCK_WRITE_WAITERS flag. If we fail to acquire a - * read lock, then rw_lock must have changed, so restart - * the loop. Note that this handles the case of a - * completely unlocked rwlock since such a lock is encoded - * as a read lock with no waiters. - */ - if (RW_CAN_READ(v)) { - /* - * The RW_LOCK_READ_WAITERS flag should only be set - * if the lock has been unlocked and write waiters - * were present. - */ - if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, - v + RW_ONE_READER)) { - if (LOCK_LOG_TEST(&rw->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: %p succeed %p -> %p", __func__, - rw, (void *)v, - (void *)(v + RW_ONE_READER)); - break; - } - continue; - } + if (__rw_rlock_try(rw, td, &v, file, line)) + break; #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -485,7 +479,7 @@ __rw_rlock(volatile uintptr_t *c, const rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = RW_READ_VALUE(rw); - if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) + if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(td, v)) break; cpu_spinwait(); } @@ -513,7 +507,7 @@ __rw_rlock(volatile uintptr_t *c, const * recheck its state and restart the loop if needed. */ v = RW_READ_VALUE(rw); - if (RW_CAN_READ(v)) { + if (RW_CAN_READ(td, v)) { turnstile_cancel(ts); continue; } @@ -538,7 +532,7 @@ __rw_rlock(volatile uintptr_t *c, const /* * The lock is held in write mode or it already has waiters. */ - MPASS(!RW_CAN_READ(v)); + MPASS(!RW_CAN_READ(td, v)); /* * If the RW_LOCK_READ_WAITERS flag is already set, then @@ -598,10 +592,36 @@ __rw_rlock(volatile uintptr_t *c, const */ LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, contested, waittime, file, line, LOCKSTAT_READER); +} + +void +__rw_rlock(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + struct thread *td; + uintptr_t v; + + td = curthread; + rw = rwlock2rw(c); + + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), + ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", + td, rw->lock_object.lo_name, file, line)); + KASSERT(rw->rw_lock != RW_DESTROYED, + ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); + KASSERT(rw_wowner(rw) != td, + ("rw_rlock: wlock already held for %s @ %s:%d", + rw->lock_object.lo_name, file, line)); + WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER, file, line, NULL); + + v = RW_READ_VALUE(rw); + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(rw__acquire) || + !__rw_rlock_try(rw, td, &v, file, line))) + __rw_rlock_hard(c, td, v, file, line); + LOCK_LOG_LOCK("RLOCK", &rw->lock_object, 0, 0, file, line); WITNESS_LOCK(&rw->lock_object, 0, file, line); TD_LOCKS_INC(curthread); - curthread->td_rw_rlocks++; } int @@ -641,40 +661,25 @@ __rw_try_rlock(volatile uintptr_t *c, co return (0); } -void -_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line) +static bool __always_inline +__rw_runlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp) { - struct rwlock *rw; - struct turnstile *ts; - uintptr_t x, v, queue; - - if (SCHEDULER_STOPPED()) - return; - - rw = rwlock2rw(c); - - KASSERT(rw->rw_lock != RW_DESTROYED, - ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); - __rw_assert(c, RA_RLOCKED, file, line); - WITNESS_UNLOCK(&rw->lock_object, 0, file, line); - LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line); - /* TODO: drop "owner of record" here. */ - x = RW_READ_VALUE(rw); for (;;) { /* * See if there is more than one read lock held. If so, * just drop one and return. */ - if (RW_READERS(x) > 1) { - if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, - x - RW_ONE_READER)) { + if (RW_READERS(*vp) > 1) { + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, vp, + *vp - RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR4(KTR_LOCK, "%s: %p succeeded %p -> %p", - __func__, rw, (void *)x, - (void *)(x - RW_ONE_READER)); - break; + __func__, rw, (void *)*vp, + (void *)(*vp - RW_ONE_READER)); + td->td_rw_rlocks--; + return (true); } continue; } @@ -682,18 +687,41 @@ _rw_runlock_cookie(volatile uintptr_t *c * If there aren't any waiters for a write lock, then try * to drop it quickly. */ - if (!(x & RW_LOCK_WAITERS)) { - MPASS((x & ~RW_LOCK_WRITE_SPINNER) == + if (!(*vp & RW_LOCK_WAITERS)) { + MPASS((*vp & ~RW_LOCK_WRITE_SPINNER) == RW_READERS_LOCK(1)); - if (atomic_fcmpset_rel_ptr(&rw->rw_lock, &x, + if (atomic_fcmpset_rel_ptr(&rw->rw_lock, vp, RW_UNLOCKED)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, rw); - break; + td->td_rw_rlocks--; + return (true); } continue; } + break; + } + return (false); +} + +static void __noinline +__rw_runlock_hard(volatile uintptr_t *c, struct thread *td, uintptr_t v, + const char *file, int line) +{ + struct rwlock *rw; + struct turnstile *ts; + uintptr_t x, queue; + + if (SCHEDULER_STOPPED()) + return; + + rw = rwlock2rw(c); + + for (;;) { + if (__rw_runlock_try(rw, td, &v)) + break; + /* * Ok, we know we have waiters and we think we are the * last reader, so grab the turnstile lock. @@ -746,13 +774,38 @@ _rw_runlock_cookie(volatile uintptr_t *c turnstile_broadcast(ts, queue); turnstile_unpend(ts, TS_SHARED_LOCK); turnstile_chain_unlock(&rw->lock_object); + td->td_rw_rlocks--; break; } LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, LOCKSTAT_READER); +} + +void +_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + struct thread *td; + uintptr_t v; + + rw = rwlock2rw(c); + + KASSERT(rw->rw_lock != RW_DESTROYED, + ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); + __rw_assert(c, RA_RLOCKED, file, line); + WITNESS_UNLOCK(&rw->lock_object, 0, file, line); + LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line); + + td = curthread; + v = RW_READ_VALUE(rw); + + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(rw__release) || + !__rw_runlock_try(rw, td, &v))) + __rw_runlock_hard(c, td, v, file, line); + TD_LOCKS_DEC(curthread); - curthread->td_rw_rlocks--; } + /* * This function is called when we are unable to obtain a write lock on the * first try. This means that at least one other thread holds either a From owner-svn-src-all@freebsd.org Wed Feb 8 19:29:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AA2FCD61A2; Wed, 8 Feb 2017 19:29:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B8C35F9; Wed, 8 Feb 2017 19:29:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18JTYng023933; Wed, 8 Feb 2017 19:29:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18JTYcU023932; Wed, 8 Feb 2017 19:29:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702081929.v18JTYcU023932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 8 Feb 2017 19:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313455 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 19:29:35 -0000 Author: mjg Date: Wed Feb 8 19:29:34 2017 New Revision: 313455 URL: https://svnweb.freebsd.org/changeset/base/313455 Log: sx: implement slock/sunlock fast path See r313454. Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Wed Feb 8 19:28:46 2017 (r313454) +++ head/sys/kern/kern_sx.c Wed Feb 8 19:29:34 2017 (r313455) @@ -799,8 +799,32 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ kick_proc0(); } -int -_sx_slock(struct sx *sx, int opts, const char *file, int line) +static bool __always_inline +__sx_slock_try(struct sx *sx, uintptr_t *xp, const char *file, int line) +{ + + /* + * If no other thread has an exclusive lock then try to bump up + * the count of sharers. Since we have to preserve the state + * of SX_LOCK_EXCLUSIVE_WAITERS, if we fail to acquire the + * shared lock loop back and retry. + */ + while (*xp & SX_LOCK_SHARED) { + MPASS(!(*xp & SX_LOCK_SHARED_WAITERS)); + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, xp, + *xp + SX_ONE_SHARER)) { + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR4(KTR_LOCK, "%s: %p succeed %p -> %p", + __func__, sx, (void *)*xp, + (void *)(*xp + SX_ONE_SHARER)); + return (true); + } + } + return (false); +} + +static int __noinline +_sx_slock_hard(struct sx *sx, int opts, const char *file, int line, uintptr_t x) { GIANT_DECLARE; #ifdef ADAPTIVE_SX @@ -810,7 +834,6 @@ _sx_slock(struct sx *sx, int opts, const uint64_t waittime = 0; int contested = 0; #endif - uintptr_t x; int error = 0; #if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS) struct lock_delay_arg lda; @@ -830,17 +853,8 @@ _sx_slock(struct sx *sx, int opts, const #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), - ("sx_slock() by idle thread %p on sx %s @ %s:%d", - curthread, sx->lock_object.lo_name, file, line)); - KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_slock() of destroyed sx @ %s:%d", file, line)); - WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); #ifdef KDTRACE_HOOKS all_time -= lockstat_nsecs(&sx->lock_object); -#endif - x = SX_READ_VALUE(sx); -#ifdef KDTRACE_HOOKS state = x; #endif @@ -849,25 +863,8 @@ _sx_slock(struct sx *sx, int opts, const * shared locks once there is an exclusive waiter. */ for (;;) { - /* - * If no other thread has an exclusive lock then try to bump up - * the count of sharers. Since we have to preserve the state - * of SX_LOCK_EXCLUSIVE_WAITERS, if we fail to acquire the - * shared lock loop back and retry. - */ - if (x & SX_LOCK_SHARED) { - MPASS(!(x & SX_LOCK_SHARED_WAITERS)); - if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, - x + SX_ONE_SHARER)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: %p succeed %p -> %p", __func__, - sx, (void *)x, - (void *)(x + SX_ONE_SHARER)); - break; - } - continue; - } + if (__sx_slock_try(sx, &x, file, line)) + break; #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif @@ -1006,51 +1003,62 @@ _sx_slock(struct sx *sx, int opts, const if (error == 0) { LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, contested, waittime, file, line, LOCKSTAT_READER); - LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); - WITNESS_LOCK(&sx->lock_object, 0, file, line); - TD_LOCKS_INC(curthread); } GIANT_RESTORE(); return (error); } -void -_sx_sunlock(struct sx *sx, const char *file, int line) +int +_sx_slock(struct sx *sx, int opts, const char *file, int line) { uintptr_t x; - int wakeup_swapper; - - if (SCHEDULER_STOPPED()) - return; + int error; + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, - ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); - _sx_assert(sx, SA_SLOCKED, file, line); - WITNESS_UNLOCK(&sx->lock_object, 0, file, line); - LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); + ("sx_slock() of destroyed sx @ %s:%d", file, line)); + WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); + + error = 0; x = SX_READ_VALUE(sx); + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(sx__acquire) || + !__sx_slock_try(sx, &x, file, line))) + error = _sx_slock_hard(sx, opts, file, line, x); + if (error == 0) { + LOCK_LOG_LOCK("SLOCK", &sx->lock_object, 0, 0, file, line); + WITNESS_LOCK(&sx->lock_object, 0, file, line); + TD_LOCKS_INC(curthread); + } + return (error); +} + +static bool __always_inline +_sx_sunlock_try(struct sx *sx, uintptr_t *xp) +{ + for (;;) { /* * We should never have sharers while at least one thread * holds a shared lock. */ - KASSERT(!(x & SX_LOCK_SHARED_WAITERS), + KASSERT(!(*xp & SX_LOCK_SHARED_WAITERS), ("%s: waiting sharers", __func__)); /* * See if there is more than one shared lock held. If * so, just drop one and return. */ - if (SX_SHARERS(x) > 1) { - if (atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, - x - SX_ONE_SHARER)) { + if (SX_SHARERS(*xp) > 1) { + if (atomic_fcmpset_rel_ptr(&sx->sx_lock, xp, + *xp - SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, "%s: %p succeeded %p -> %p", - __func__, sx, (void *)x, - (void *)(x - SX_ONE_SHARER)); - break; + __func__, sx, (void *)*xp, + (void *)(*xp - SX_ONE_SHARER)); + return (true); } continue; } @@ -1059,18 +1067,36 @@ _sx_sunlock(struct sx *sx, const char *f * If there aren't any waiters for an exclusive lock, * then try to drop it quickly. */ - if (!(x & SX_LOCK_EXCLUSIVE_WAITERS)) { - MPASS(x == SX_SHARERS_LOCK(1)); - x = SX_SHARERS_LOCK(1); + if (!(*xp & SX_LOCK_EXCLUSIVE_WAITERS)) { + MPASS(*xp == SX_SHARERS_LOCK(1)); + *xp = SX_SHARERS_LOCK(1); if (atomic_fcmpset_rel_ptr(&sx->sx_lock, - &x, SX_LOCK_UNLOCKED)) { + xp, SX_LOCK_UNLOCKED)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded", __func__, sx); - break; + return (true); } continue; } + break; + } + return (false); +} + +static void __noinline +_sx_sunlock_hard(struct sx *sx, uintptr_t x, const char *file, int line) +{ + int wakeup_swapper; + + if (SCHEDULER_STOPPED()) + return; + + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_READER); + + for (;;) { + if (_sx_sunlock_try(sx, &x)) + break; /* * At this point, there should just be one sharer with @@ -1103,6 +1129,24 @@ _sx_sunlock(struct sx *sx, const char *f kick_proc0(); break; } +} + +void +_sx_sunlock(struct sx *sx, const char *file, int line) +{ + uintptr_t x; + + KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, + ("sx_sunlock() of destroyed sx @ %s:%d", file, line)); + _sx_assert(sx, SA_SLOCKED, file, line); + WITNESS_UNLOCK(&sx->lock_object, 0, file, line); + LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); + + x = SX_READ_VALUE(sx); + if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(sx__release) || + !_sx_sunlock_try(sx, &x))) + _sx_sunlock_hard(sx, x, file, line); + TD_LOCKS_DEC(curthread); } From owner-svn-src-all@freebsd.org Wed Feb 8 20:08:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76E52CD6C5B; Wed, 8 Feb 2017 20:08:39 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3720C1BD0; Wed, 8 Feb 2017 20:08:39 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18K8cwX040087; Wed, 8 Feb 2017 20:08:38 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18K8cib040084; Wed, 8 Feb 2017 20:08:38 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702082008.v18K8cib040084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 8 Feb 2017 20:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313456 - stable/11/sys/dev/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 20:08:39 -0000 Author: vangyzen Date: Wed Feb 8 20:08:38 2017 New Revision: 313456 URL: https://svnweb.freebsd.org/changeset/base/313456 Log: MFC r313180 PCIe HotPlug: remove tests for DL active link capability As of r313097, the HotPlug code requires the link to support reporting of the data-link status. Remove tests for this capability from code that can now assume its presence. Sponsored by: Dell EMC Modified: stable/11/sys/dev/pci/pci_pci.c stable/11/sys/dev/pci/pcib_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pci_pci.c ============================================================================== --- stable/11/sys/dev/pci/pci_pci.c Wed Feb 8 19:29:34 2017 (r313455) +++ stable/11/sys/dev/pci/pci_pci.c Wed Feb 8 20:08:38 2017 (r313456) @@ -918,6 +918,7 @@ static void pcib_probe_hotplug(struct pcib_softc *sc) { device_t dev; + uint32_t link_cap; uint16_t link_sta, slot_sta; if (!pci_enable_pcie_hp) @@ -930,12 +931,12 @@ pcib_probe_hotplug(struct pcib_softc *sc if (!(pcie_read_config(dev, PCIER_FLAGS, 2) & PCIEM_FLAGS_SLOT)) return; - sc->pcie_link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4); sc->pcie_slot_cap = pcie_read_config(dev, PCIER_SLOT_CAP, 4); if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_HPC) == 0) return; - if ((sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0) + link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4); + if ((link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0) return; /* @@ -947,8 +948,7 @@ pcib_probe_hotplug(struct pcib_softc *sc * If there is an open MRL but the Data Link Layer is active, * the MRL is not real. */ - if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) != 0 && - (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) != 0) { + if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) != 0) { link_sta = pcie_read_config(dev, PCIER_LINK_STA, 2); slot_sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); if ((slot_sta & PCIEM_SLOT_STA_MRLSS) != 0 && @@ -1061,10 +1061,8 @@ pcib_hotplug_present(struct pcib_softc * return (0); /* Require the Data Link Layer to be active. */ - if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) { - if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE)) - return (0); - } + if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE)) + return (0); return (-1); } @@ -1121,20 +1119,18 @@ pcib_pcie_hotplug_update(struct pcib_sof * changed on this interrupt. Stop any scheduled timer if * the Data Link Layer is active. */ - if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) { - if (card_inserted && - !(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) && - sc->pcie_slot_sta & - (PCIEM_SLOT_STA_MRLSC | PCIEM_SLOT_STA_PDC)) { - if (cold) - device_printf(sc->dev, - "Data Link Layer inactive\n"); - else - callout_reset(&sc->pcie_dll_timer, hz, - pcib_pcie_dll_timeout, sc); - } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) - callout_stop(&sc->pcie_dll_timer); - } + if (card_inserted && + !(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) && + sc->pcie_slot_sta & + (PCIEM_SLOT_STA_MRLSC | PCIEM_SLOT_STA_PDC)) { + if (cold) + device_printf(sc->dev, + "Data Link Layer inactive\n"); + else + callout_reset(&sc->pcie_dll_timer, hz, + pcib_pcie_dll_timeout, sc); + } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) + callout_stop(&sc->pcie_dll_timer); pcib_pcie_hotplug_command(sc, val, mask); @@ -1384,7 +1380,7 @@ pcib_setup_hotplug(struct pcib_softc *sc mask = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE | PCIEM_SLOT_CTL_CCIE | PCIEM_SLOT_CTL_PDCE | PCIEM_SLOT_CTL_MRLSCE | PCIEM_SLOT_CTL_PFDE | PCIEM_SLOT_CTL_ABPE; - val = PCIEM_SLOT_CTL_PDCE | PCIEM_SLOT_CTL_HPIE; + val = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE | PCIEM_SLOT_CTL_PDCE; if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_APB) val |= PCIEM_SLOT_CTL_ABPE; if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_PCP) @@ -1393,8 +1389,6 @@ pcib_setup_hotplug(struct pcib_softc *sc val |= PCIEM_SLOT_CTL_MRLSCE; if (!(sc->pcie_slot_cap & PCIEM_SLOT_CAP_NCCS)) val |= PCIEM_SLOT_CTL_CCIE; - if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) - val |= PCIEM_SLOT_CTL_DLLSCE; /* Turn the attention indicator off. */ if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_AIP) { Modified: stable/11/sys/dev/pci/pcib_private.h ============================================================================== --- stable/11/sys/dev/pci/pcib_private.h Wed Feb 8 19:29:34 2017 (r313455) +++ stable/11/sys/dev/pci/pcib_private.h Wed Feb 8 20:08:38 2017 (r313456) @@ -132,7 +132,6 @@ struct pcib_softc uint16_t bridgectl; /* bridge control register */ uint16_t pcie_link_sta; uint16_t pcie_slot_sta; - uint32_t pcie_link_cap; uint32_t pcie_slot_cap; struct resource *pcie_irq; void *pcie_ihand; From owner-svn-src-all@freebsd.org Wed Feb 8 20:21:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32678CD6011; Wed, 8 Feb 2017 20:21:31 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44F87E6; Wed, 8 Feb 2017 20:21:30 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18KLTK4046395; Wed, 8 Feb 2017 20:21:29 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18KLTuG046394; Wed, 8 Feb 2017 20:21:29 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702082021.v18KLTuG046394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Wed, 8 Feb 2017 20:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313457 - head/usr.sbin/arp 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 20:21:31 -0000 Author: garga (ports committer) Date: Wed Feb 8 20:21:29 2017 New Revision: 313457 URL: https://svnweb.freebsd.org/changeset/base/313457 Log: Fix style(9) Reviewed by: vangyzen, allanjude, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9494 Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Wed Feb 8 20:08:38 2017 (r313456) +++ head/usr.sbin/arp/arp.c Wed Feb 8 20:21:29 2017 (r313457) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); * arp - display, set, and delete arp table entries */ - #include #include #include @@ -80,8 +79,8 @@ __FBSDID("$FreeBSD$"); #include #include -typedef void (action_fn)(struct sockaddr_dl *sdl, - struct sockaddr_in *s_in, struct rt_msghdr *rtm); +typedef void (action_fn)(struct sockaddr_dl *sdl, struct sockaddr_in *s_in, + struct rt_msghdr *rtm); static int search(u_long addr, action_fn *action); static action_fn print_entry; @@ -344,18 +343,20 @@ set(int argc, char **argv) } } else if (strncmp(argv[0], "blackhole", 9) == 0) { if (flags & RTF_REJECT) { - printf("Choose one of blackhole or reject, not both.\n"); + printf("Choose one of blackhole or reject, " + "not both."); } flags |= RTF_BLACKHOLE; } else if (strncmp(argv[0], "reject", 6) == 0) { if (flags & RTF_BLACKHOLE) { - printf("Choose one of blackhole or reject, not both.\n"); + printf("Choose one of blackhole or reject, " + "not both."); } flags |= RTF_REJECT; } else if (strncmp(argv[0], "trail", 5) == 0) { /* XXX deprecated and undocumented feature */ printf("%s: Sending trailers is no longer supported\n", - host); + host); } argv++; } @@ -381,7 +382,7 @@ set(int argc, char **argv) /* * In the case a proxy-arp entry is being added for - * a remote end point, the RTF_ANNOUNCE flag in the + * a remote end point, the RTF_ANNOUNCE flag in the * RTM_GET command is an indication to the kernel * routing code that the interface associated with * the prefix route covering the local end of the @@ -467,7 +468,7 @@ delete(char *host) sdl = (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)addr); /* - * With the new L2/L3 restructure, the route + * With the new L2/L3 restructure, the route * returned is a prefix route. The important * piece of information from the previous * RTM_GET is the interface index. In the @@ -486,7 +487,7 @@ delete(char *host) * is a proxy-arp entry to remove. */ if (flags & RTF_ANNOUNCE) { - fprintf(stderr, "delete: cannot locate %s\n",host); + fprintf(stderr, "delete: cannot locate %s\n", host); return (1); } @@ -525,7 +526,7 @@ search(u_long addr, action_fn *action) mib[5] = RTF_LLINFO; #else mib[5] = 0; -#endif +#endif if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) err(1, "route-sysctl-estimate"); if (needed == 0) /* empty table */ @@ -575,7 +576,7 @@ print_entry(struct sockaddr_dl *sdl, struct if_nameindex *p; int seg; - if (ifnameindex == NULL) + if (ifnameindex == NULL) if ((ifnameindex = if_nameindex()) == NULL) err(1, "cannot retrieve interface names"); @@ -597,7 +598,8 @@ print_entry(struct sockaddr_dl *sdl, sdl->sdl_type == IFT_L2VLAN || sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) - printf("%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); + printf("%s", + ether_ntoa((struct ether_addr *)LLADDR(sdl))); else { int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0; @@ -607,7 +609,7 @@ print_entry(struct sockaddr_dl *sdl, printf("(incomplete)"); for (p = ifnameindex; p && ifnameindex->if_index && - ifnameindex->if_name; p++) { + ifnameindex->if_name; p++) { if (p->if_index == sdl->sdl_index) { printf(" on %s", p->if_name); break; @@ -629,31 +631,31 @@ print_entry(struct sockaddr_dl *sdl, printf(" published"); switch(sdl->sdl_type) { case IFT_ETHER: - printf(" [ethernet]"); - break; + printf(" [ethernet]"); + break; case IFT_ISO88025: - printf(" [token-ring]"); + printf(" [token-ring]"); trld = SDL_ISO88025(sdl); if (trld->trld_rcf != 0) { printf(" rt=%x", ntohs(trld->trld_rcf)); for (seg = 0; seg < ((TR_RCF_RIFLEN(trld->trld_rcf) - 2 ) / 2); - seg++) + seg++) printf(":%x", ntohs(*(trld->trld_route[seg]))); } break; case IFT_FDDI: - printf(" [fddi]"); - break; + printf(" [fddi]"); + break; case IFT_ATM: - printf(" [atm]"); - break; + printf(" [atm]"); + break; case IFT_L2VLAN: printf(" [vlan]"); break; case IFT_IEEE1394: - printf(" [firewire]"); - break; + printf(" [firewire]"); + break; case IFT_BRIDGE: printf(" [bridge]"); break; @@ -662,8 +664,8 @@ print_entry(struct sockaddr_dl *sdl, break; default: break; - } - + } + printf("\n"); } @@ -688,13 +690,13 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: arp [-n] [-i interface] hostname", - " arp [-n] [-i interface] -a", - " arp -d hostname [pub]", - " arp -d [-i interface] -a", - " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", - " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", - " arp -f filename"); + "usage: arp [-n] [-i interface] hostname", + " arp [-n] [-i interface] -a", + " arp -d hostname [pub]", + " arp -d [-i interface] -a", + " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", + " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", + " arp -f filename"); exit(1); } @@ -753,12 +755,12 @@ rtmsg(int cmd, struct sockaddr_in *dst, case RTM_GET: rtm->rtm_addrs |= RTA_DST; } -#define NEXTADDR(w, s) \ - do { \ - if ((s) != NULL && rtm->rtm_addrs & (w)) { \ - bcopy((s), cp, sizeof(*(s))); \ - cp += SA_SIZE(s); \ - } \ +#define NEXTADDR(w, s) \ + do { \ + if ((s) != NULL && rtm->rtm_addrs & (w)) { \ + bcopy((s), cp, sizeof(*(s))); \ + cp += SA_SIZE(s); \ + } \ } while (0) NEXTADDR(RTA_DST, dst); @@ -814,7 +816,7 @@ get_ether_addr(in_addr_t ipaddr, struct } #define NEXTIFR(i) \ - ((struct ifreq *)((char *)&(i)->ifr_addr \ + ((struct ifreq *)((char *)&(i)->ifr_addr \ + MAX((i)->ifr_addr.sa_len, sizeof((i)->ifr_addr))) ) /* @@ -835,14 +837,10 @@ get_ether_addr(in_addr_t ipaddr, struct if (ioctl(sock, SIOCGIFFLAGS, &ifreq) < 0) continue; if ((ifreq.ifr_flags & - (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT| - IFF_LOOPBACK|IFF_NOARP)) - != (IFF_UP|IFF_BROADCAST)) + (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT| + IFF_LOOPBACK|IFF_NOARP)) != (IFF_UP|IFF_BROADCAST)) continue; - /* - * Get its netmask and check that it's on - * the right subnet. - */ + /* Get its netmask and check that it's on the right subnet. */ if (ioctl(sock, SIOCGIFNETMASK, &ifreq) < 0) continue; mask = ((struct sockaddr_in *) From owner-svn-src-all@freebsd.org Wed Feb 8 20:31:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68B46CD6544; Wed, 8 Feb 2017 20:31:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3697CD3E; Wed, 8 Feb 2017 20:31:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18KVsm3051961; Wed, 8 Feb 2017 20:31:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18KVsrR051960; Wed, 8 Feb 2017 20:31:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702082031.v18KVsrR051960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 8 Feb 2017 20:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313458 - head/contrib/llvm/tools/lld/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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 20:31:55 -0000 Author: emaste Date: Wed Feb 8 20:31:54 2017 New Revision: 313458 URL: https://svnweb.freebsd.org/changeset/base/313458 Log: lld: Allow arbitrary code alignment in .eh_frame According to the specification, CIE code alignment factor is an arbitrary unsigned LEB128 encoded value. PR: 216908 Reported by: Wolfgang Meyer Obtained from: Upstream LLD r277105 MFC after: 1 week Modified: head/contrib/llvm/tools/lld/ELF/EhFrame.cpp Modified: head/contrib/llvm/tools/lld/ELF/EhFrame.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/EhFrame.cpp Wed Feb 8 20:21:29 2017 (r313457) +++ head/contrib/llvm/tools/lld/ELF/EhFrame.cpp Wed Feb 8 20:31:54 2017 (r313458) @@ -117,9 +117,8 @@ template uint8_t getFdeEnco StringRef Aug(reinterpret_cast(D.begin()), AugEnd - D.begin()); D = D.slice(Aug.size() + 1); - // Code alignment factor should always be 1 for .eh_frame. - if (readByte(D) != 1) - fatal("CIE code alignment must be 1"); + // Skip code alignment factor. + skipLeb128(D); // Skip data alignment factor. skipLeb128(D); From owner-svn-src-all@freebsd.org Wed Feb 8 23:17:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D1CCCD67A6; Wed, 8 Feb 2017 23:17:25 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F36EBB92; Wed, 8 Feb 2017 23:17:24 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v18NHO3Z018453; Wed, 8 Feb 2017 23:17:24 GMT (envelope-from def@FreeBSD.org) Received: (from def@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v18NHNRZ018451; Wed, 8 Feb 2017 23:17:23 GMT (envelope-from def@FreeBSD.org) Message-Id: <201702082317.v18NHNRZ018451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: def set sender to def@FreeBSD.org using -f From: Konrad Witaszczyk Date: Wed, 8 Feb 2017 23:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313459 - head/sbin/decryptcore 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.23 Precedence: list List-Id: "SVN commit messages 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, 08 Feb 2017 23:17:25 -0000 Author: def Date: Wed Feb 8 23:17:23 2017 New Revision: 313459 URL: https://svnweb.freebsd.org/changeset/base/313459 Log: Don't decrypt a core if a vmcore file already exists by default. Allow to change this behaviour using the -f flag. Approved by: pjd (mentor) Modified: head/sbin/decryptcore/decryptcore.8 head/sbin/decryptcore/decryptcore.c Modified: head/sbin/decryptcore/decryptcore.8 ============================================================================== --- head/sbin/decryptcore/decryptcore.8 Wed Feb 8 20:31:54 2017 (r313458) +++ head/sbin/decryptcore/decryptcore.8 Wed Feb 8 23:17:23 2017 (r313459) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2016 +.Dd February 9, 2017 .Dt DECRYPTCORE 8 .Os .Sh NAME @@ -32,13 +32,13 @@ .Nd "decrypt a core dump of the operating system" .Sh SYNOPSIS .Nm -.Op Fl Lv +.Op Fl fLv .Fl p Ar privatekeyfile .Fl k Ar keyfile .Fl e Ar encryptedcore .Fl c Ar core .Nm -.Op Fl Lv +.Op Fl fLv .Op Fl d Ar crashdir .Fl p Ar privatekeyfile .Fl n Ar dumpnr @@ -70,10 +70,20 @@ file where corresponds to .Ar dumpnr . .Pp +By default +.Nm +does not overwrite an old core dump as a user might want to store the core +somewhere else for the future. +This behaviour can be changed using the +.Fl f +flag. +.Pp The .Nm utility can be started with the following command line arguments: .Bl -tag -width ".Fl e Ar encryptedcore" +.It Fl f +Remove a decryped core dump if it already exists. .It Fl L Write log messages to .Xr syslogd 8 . Modified: head/sbin/decryptcore/decryptcore.c ============================================================================== --- head/sbin/decryptcore/decryptcore.c Wed Feb 8 20:31:54 2017 (r313458) +++ head/sbin/decryptcore/decryptcore.c Wed Feb 8 23:17:23 2017 (r313459) @@ -55,8 +55,8 @@ usage(void) { pjdlog_exitx(1, - "usage: decryptcore [-Lv] -p privatekeyfile -k keyfile -e encryptedcore -c core\n" - " decryptcore [-Lv] [-d crashdir] -p privatekeyfile -n dumpnr"); + "usage: decryptcore [-fLv] -p privatekeyfile -k keyfile -e encryptedcore -c core\n" + " decryptcore [-fLv] [-d crashdir] -p privatekeyfile -n dumpnr"); } static int @@ -115,8 +115,8 @@ failed: } static bool -decrypt(const char *privkeyfile, const char *keyfile, const char *input, - const char *output) +decrypt(int ofd, const char *privkeyfile, const char *keyfile, + const char *input) { uint8_t buf[KERNELDUMP_BUFFER_SIZE], key[KERNELDUMP_KEY_MAX_SIZE]; EVP_CIPHER_CTX ctx; @@ -124,14 +124,14 @@ decrypt(const char *privkeyfile, const c FILE *fp; struct kerneldumpkey *kdk; RSA *privkey; - int ifd, kfd, ofd, olen, privkeysize; + int ifd, kfd, olen, privkeysize; ssize_t bytes; pid_t pid; + PJDLOG_ASSERT(ofd >= 0); PJDLOG_ASSERT(privkeyfile != NULL); PJDLOG_ASSERT(keyfile != NULL); PJDLOG_ASSERT(input != NULL); - PJDLOG_ASSERT(output != NULL); privkey = NULL; @@ -142,11 +142,14 @@ decrypt(const char *privkeyfile, const c pid = fork(); if (pid == -1) { pjdlog_errno(LOG_ERR, "Unable to create child process"); + close(ofd); return (false); } - if (pid > 0) + if (pid > 0) { + close(ofd); return (wait_for_process(pid) == 0); + } kfd = open(keyfile, O_RDONLY); if (kfd == -1) { @@ -158,11 +161,6 @@ decrypt(const char *privkeyfile, const c pjdlog_errno(LOG_ERR, "Unable to open %s", input); goto failed; } - ofd = open(output, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (ofd == -1) { - pjdlog_errno(LOG_ERR, "Unable to open %s", output); - goto failed; - } fp = fopen(privkeyfile, "r"); if (fp == NULL) { pjdlog_errno(LOG_ERR, "Unable to open %s", privkeyfile); @@ -247,8 +245,7 @@ decrypt(const char *privkeyfile, const c } if (olen > 0 && write(ofd, buf, olen) != olen) { - pjdlog_errno(LOG_ERR, "Unable to write data to %s", - output); + pjdlog_errno(LOG_ERR, "Unable to write core"); goto failed; } } while (bytes > 0); @@ -269,9 +266,11 @@ main(int argc, char **argv) { char core[PATH_MAX], encryptedcore[PATH_MAX], keyfile[PATH_MAX]; const char *crashdir, *dumpnr, *privatekey; - int ch, debug; + int ch, debug, error, ofd; size_t ii; - bool usesyslog; + bool force, usesyslog; + + error = 1; pjdlog_init(PJDLOG_MODE_STD); pjdlog_prefix_set("(decryptcore) "); @@ -281,10 +280,11 @@ main(int argc, char **argv) crashdir = NULL; dumpnr = NULL; *encryptedcore = '\0'; + force = false; *keyfile = '\0'; privatekey = NULL; usesyslog = false; - while ((ch = getopt(argc, argv, "Lc:d:e:k:n:p:v")) != -1) { + while ((ch = getopt(argc, argv, "Lc:d:e:fk:n:p:v")) != -1) { switch (ch) { case 'L': usesyslog = true; @@ -302,6 +302,9 @@ main(int argc, char **argv) pjdlog_exitx(1, "Encrypted core file path is too long."); } break; + case 'f': + force = true; + break; case 'k': if (strlcpy(keyfile, optarg, sizeof(keyfile)) >= sizeof(keyfile)) { @@ -361,13 +364,24 @@ main(int argc, char **argv) pjdlog_mode_set(PJDLOG_MODE_SYSLOG); pjdlog_debug_set(debug); - if (!decrypt(privatekey, keyfile, encryptedcore, core)) { + if (force && unlink(core) == -1 && errno != ENOENT) { + pjdlog_errno(LOG_ERR, "Unable to remove old core"); + goto out; + } + ofd = open(core, O_WRONLY | O_CREAT | O_EXCL, 0600); + if (ofd == -1) { + pjdlog_errno(LOG_ERR, "Unable to open %s", core); + goto out; + } + + if (!decrypt(ofd, privatekey, keyfile, encryptedcore)) { if (unlink(core) == -1 && errno != ENOENT) - pjdlog_exit(1, "Unable to remove core"); - exit(1); + pjdlog_errno(LOG_ERR, "Unable to remove core"); + goto out; } + error = 0; +out: pjdlog_fini(); - - exit(0); + exit(error); } From owner-svn-src-all@freebsd.org Thu Feb 9 00:28:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D4E9CD6ACA; Thu, 9 Feb 2017 00:28:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E8AC1DAC; Thu, 9 Feb 2017 00:28:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v190S3Bq049586; Thu, 9 Feb 2017 00:28:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v190S3NE049585; Thu, 9 Feb 2017 00:28:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702090028.v190S3NE049585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 9 Feb 2017 00:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313460 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 00:28:04 -0000 Author: markj Date: Thu Feb 9 00:28:03 2017 New Revision: 313460 URL: https://svnweb.freebsd.org/changeset/base/313460 Log: MFC r311901: Do not set BIO_DONE if the BIO specifies a completion handler. Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Wed Feb 8 23:17:23 2017 (r313459) +++ stable/11/sys/kern/vfs_bio.c Thu Feb 9 00:28:03 2017 (r313460) @@ -3929,10 +3929,8 @@ biodone(struct bio *bp) bp->bio_flags |= BIO_DONE; wakeup(bp); mtx_unlock(mtxp); - } else { - bp->bio_flags |= BIO_DONE; + } else done(bp); - } } /* From owner-svn-src-all@freebsd.org Thu Feb 9 02:08:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F27A6CD6B83; Thu, 9 Feb 2017 02:08:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C18E6185F; Thu, 9 Feb 2017 02:08:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1928gx3090425; Thu, 9 Feb 2017 02:08:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1928gTJ090424; Thu, 9 Feb 2017 02:08:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702090208.v1928gTJ090424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 9 Feb 2017 02:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313461 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 02:08:44 -0000 Author: cy Date: Thu Feb 9 02:08:42 2017 New Revision: 313461 URL: https://svnweb.freebsd.org/changeset/base/313461 Log: MFC r312791: Use normal KNF cuddling of elses. Reported by: bde Modified: stable/11/contrib/ipfilter/tools/ipf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/tools/ipf.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/tools/ipf.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ipf.c Thu Feb 9 00:28:03 2017 (r313460) +++ stable/11/contrib/ipfilter/tools/ipf.c Thu Feb 9 02:08:42 2017 (r313461) @@ -408,8 +408,7 @@ static void flushfilter(arg, filter) } closedevice(); return; - } - else if (strchr(arg, 'i') || strchr(arg, 'I')) + } else if (strchr(arg, 'i') || strchr(arg, 'I')) fl = FR_INQUE; else if (strchr(arg, 'o') || strchr(arg, 'O')) fl = FR_OUTQUE; From owner-svn-src-all@freebsd.org Thu Feb 9 02:08:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 443ECCD6B87; Thu, 9 Feb 2017 02:08:44 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10DCD1860; Thu, 9 Feb 2017 02:08:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1928hx7090431; Thu, 9 Feb 2017 02:08:43 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1928htf090430; Thu, 9 Feb 2017 02:08:43 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702090208.v1928htf090430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 9 Feb 2017 02:08: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: r313461 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 02:08:44 -0000 Author: cy Date: Thu Feb 9 02:08:42 2017 New Revision: 313461 URL: https://svnweb.freebsd.org/changeset/base/313461 Log: MFC r312791: Use normal KNF cuddling of elses. Reported by: bde Modified: stable/10/contrib/ipfilter/tools/ipf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/tools/ipf.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/tools/ipf.c ============================================================================== --- stable/10/contrib/ipfilter/tools/ipf.c Thu Feb 9 00:28:03 2017 (r313460) +++ stable/10/contrib/ipfilter/tools/ipf.c Thu Feb 9 02:08:42 2017 (r313461) @@ -408,8 +408,7 @@ static void flushfilter(arg, filter) } closedevice(); return; - } - else if (strchr(arg, 'i') || strchr(arg, 'I')) + } else if (strchr(arg, 'i') || strchr(arg, 'I')) fl = FR_INQUE; else if (strchr(arg, 'o') || strchr(arg, 'O')) fl = FR_OUTQUE; From owner-svn-src-all@freebsd.org Thu Feb 9 04:07:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0CDBCD70C6; Thu, 9 Feb 2017 04:07:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A880A1FEB; Thu, 9 Feb 2017 04:07:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1947UlE040079; Thu, 9 Feb 2017 04:07:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1947UFx040073; Thu, 9 Feb 2017 04:07:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702090407.v1947UFx040073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 04:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313462 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 04:07:31 -0000 Author: adrian Date: Thu Feb 9 04:07:30 2017 New Revision: 313462 URL: https://svnweb.freebsd.org/changeset/base/313462 Log: [net80211] quiet IE handling improvements * on the station side, only call the quiet time IE method if we have a quiet IE - otherwise call the NULL method once, and then don't waste time calling NULL * on the beacon generation side - force a beacon regeneration each time quiet time is enabled/disabled. Without this, enabling/disabling quiet time IE would cause the beacon contents to be corrupted since none of the "move contents around" logic (like for CSA and TIM handling) is implemented. This changes the size of ieee80211_node so it requires a kernel recompile, but no userland recompile. Tested: * AR9380, AP mode, enabling/disabling quiet time IE * AR9380, STA mode, with upcoming driver changes. Modified: head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_node.h Thu Feb 9 04:07:30 2017 (r313462) @@ -249,6 +249,11 @@ struct ieee80211_node { struct ieee80211vap *ni_wdsvap; /* associated WDS vap */ void *ni_rctls; /* private ratectl state */ + + /* quiet time IE state for the given node */ + uint32_t ni_quiet_ie_set; /* Quiet time IE was seen */ + struct ieee80211_quiet_ie ni_quiet_ie; /* last seen quiet IE */ + uint64_t ni_spare[3]; }; MALLOC_DECLARE(M_80211_NODE); Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_output.c Thu Feb 9 04:07:30 2017 (r313462) @@ -2128,7 +2128,6 @@ ieee80211_add_qos(uint8_t *frm, const st * Send a probe request frame with the specified ssid * and any optional information element data. */ -/* XXX VHT? */ int ieee80211_send_probereq(struct ieee80211_node *ni, const uint8_t sa[IEEE80211_ADDR_LEN], @@ -2438,7 +2437,6 @@ ieee80211_send_mgmt(struct ieee80211_nod case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: - /* XXX VHT? */ /* * asreq frame format * [2] capability information @@ -2700,7 +2698,6 @@ bad: * Space is left to prepend and 802.11 header at the * front but it's left to the caller to fill in. */ -/* XXX VHT? */ struct mbuf * ieee80211_alloc_proberesp(struct ieee80211_node *bss, int legacy) { @@ -3035,7 +3032,6 @@ ieee80211_tx_mgt_cb(struct ieee80211_nod } } -/* XXX VHT? */ static void ieee80211_beacon_construct(struct mbuf *m, uint8_t *frm, struct ieee80211_node *ni) @@ -3163,15 +3159,23 @@ ieee80211_beacon_construct(struct mbuf * } else bo->bo_csa = frm; + bo->bo_quiet = NULL; if (vap->iv_flags & IEEE80211_F_DOTH) { - bo->bo_quiet = frm; if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && - (vap->iv_flags_ext & IEEE80211_FEXT_DFS)) { - if (vap->iv_quiet) + (vap->iv_flags_ext & IEEE80211_FEXT_DFS) && + (vap->iv_quiet == 1)) { + /* + * We only insert the quiet IE offset if + * the quiet IE is enabled. Otherwise don't + * put it here or we'll just overwrite + * some other beacon contents. + */ + if (vap->iv_quiet) { + bo->bo_quiet = frm; frm = ieee80211_add_quiet(frm,vap, 0); + } } - } else - bo->bo_quiet = frm; + } if (IEEE80211_IS_CHAN_ANYG(ni->ni_chan)) { bo->bo_erp = frm; @@ -3239,7 +3243,6 @@ ieee80211_beacon_construct(struct mbuf * /* * Allocate a beacon frame and fillin the appropriate bits. */ -/* XXX VHT? */ struct mbuf * ieee80211_beacon_alloc(struct ieee80211_node *ni) { @@ -3252,6 +3255,14 @@ ieee80211_beacon_alloc(struct ieee80211_ uint8_t *frm; /* + * Update the "We're putting the quiet IE in the beacon" state. + */ + if (vap->iv_quiet == 1) + vap->iv_flags_ext |= IEEE80211_FEXT_QUIET_IE; + else if (vap->iv_quiet == 0) + vap->iv_flags_ext &= ~IEEE80211_FEXT_QUIET_IE; + + /* * beacon frame format * * Note: This needs updating for 802.11-2012. @@ -3286,7 +3297,6 @@ ieee80211_beacon_alloc(struct ieee80211_ * NB: we allocate the max space required for the TIM bitmap. * XXX how big is this? */ - /* XXX VHT? */ pktlen = 8 /* time stamp */ + sizeof(uint16_t) /* beacon interval */ + sizeof(uint16_t) /* capabilities */ @@ -3392,6 +3402,42 @@ ieee80211_beacon_update(struct ieee80211 return 1; /* just assume length changed */ } + /* + * Handle the quiet time element being added and removed. + * Again, for now we just cheat and reconstruct the whole + * beacon - that way the gap is provided as appropriate. + * + * So, track whether we have already added the IE versus + * whether we want to be adding the IE. + */ + if ((vap->iv_flags_ext & IEEE80211_FEXT_QUIET_IE) && + (vap->iv_quiet == 0)) { + /* + * Quiet time beacon IE enabled, but it's disabled; + * recalc + */ + vap->iv_flags_ext &= ~IEEE80211_FEXT_QUIET_IE; + ieee80211_beacon_construct(m, + mtod(m, uint8_t*) + sizeof(struct ieee80211_frame), ni); + /* XXX do WME aggressive mode processing? */ + IEEE80211_UNLOCK(ic); + return 1; /* just assume length changed */ + } + + if (((vap->iv_flags_ext & IEEE80211_FEXT_QUIET_IE) == 0) && + (vap->iv_quiet == 1)) { + /* + * Quiet time beacon IE disabled, but it's now enabled; + * recalc + */ + vap->iv_flags_ext |= IEEE80211_FEXT_QUIET_IE; + ieee80211_beacon_construct(m, + mtod(m, uint8_t*) + sizeof(struct ieee80211_frame), ni); + /* XXX do WME aggressive mode processing? */ + IEEE80211_UNLOCK(ic); + return 1; /* just assume length changed */ + } + wh = mtod(m, struct ieee80211_frame *); /* @@ -3600,10 +3646,17 @@ ieee80211_beacon_update(struct ieee80211 vap->iv_csa_count++; /* NB: don't clear IEEE80211_BEACON_CSA */ } + + /* + * Only add the quiet time IE if we've enabled it + * as appropriate. + */ if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && - (vap->iv_flags_ext & IEEE80211_FEXT_DFS) ){ - if (vap->iv_quiet) + (vap->iv_flags_ext & IEEE80211_FEXT_DFS)) { + if (vap->iv_quiet && + (vap->iv_flags_ext & IEEE80211_FEXT_QUIET_IE)) { ieee80211_add_quiet(bo->bo_quiet, vap, 1); + } } if (isset(bo->bo_flags, IEEE80211_BEACON_ERP)) { /* Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_proto.h Thu Feb 9 04:07:30 2017 (r313462) @@ -391,6 +391,8 @@ enum { IEEE80211_BEACON_TDMA = 9, /* TDMA Info */ IEEE80211_BEACON_ATH = 10, /* ATH parameters */ IEEE80211_BEACON_MESHCONF = 11, /* Mesh Configuration */ + IEEE80211_BEACON_QUIET = 12, /* Quiet time IE */ + IEEE80211_BEACON_VHTINFO = 13, /* VHT information */ }; int ieee80211_beacon_update(struct ieee80211_node *, struct mbuf *, int mcast); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_sta.c Thu Feb 9 04:07:30 2017 (r313462) @@ -1319,6 +1319,27 @@ startbgscan(struct ieee80211vap *vap) ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))); } +#ifdef notyet +/* + * Compare two quiet IEs and return if they are equivalent. + * + * The tbttcount isnt checked - that's not part of the configuration. + */ +static int +compare_quiet_ie(const struct ieee80211_quiet_ie *q1, + const struct ieee80211_quiet_ie *q2) +{ + + if (q1->period != q2->period) + return (0); + if (le16dec(&q1->duration) != le16dec(&q2->duration)) + return (0); + if (le16dec(&q1->offset) != le16dec(&q2->offset)) + return (0); + return (1); +} +#endif + static void sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, const struct ieee80211_rx_stats *rxs, @@ -1449,8 +1470,26 @@ sta_recv_mgmt(struct ieee80211_node *ni, ht_state_change = 1; } - if (scan.quiet) + /* + * If we have a quiet time IE then report it up to + * the driver. + * + * Otherwise, inform the driver that the quiet time + * IE has disappeared - only do that once rather than + * spamming it each time. + */ + if (scan.quiet) { ic->ic_set_quiet(ni, scan.quiet); + ni->ni_quiet_ie_set = 1; + memcpy(&ni->ni_quiet_ie, scan.quiet, + sizeof(struct ieee80211_quiet_ie)); + } else { + if (ni->ni_quiet_ie_set == 1) + ic->ic_set_quiet(ni, NULL); + ni->ni_quiet_ie_set = 0; + bzero(&ni->ni_quiet_ie, + sizeof(struct ieee80211_quiet_ie)); + } if (scan.tim != NULL) { struct ieee80211_tim_ie *tim = Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Thu Feb 9 02:08:42 2017 (r313461) +++ head/sys/net80211/ieee80211_var.h Thu Feb 9 04:07:30 2017 (r313462) @@ -636,12 +636,13 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FEXT_SEQNO_OFFLOAD 0x00100000 /* CONF: driver does seqno insertion/allocation */ #define IEEE80211_FEXT_FRAG_OFFLOAD 0x00200000 /* CONF: hardware does 802.11 fragmentation + assignment */ #define IEEE80211_FEXT_VHT 0x00400000 /* CONF: VHT support */ +#define IEEE80211_FEXT_QUIET_IE 0x00800000 /* STATUS: quiet IE in a beacon has been added */ #define IEEE80211_FEXT_BITS \ "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD" \ - "\26VHT" + "\26VHT\27QUIET_IE" /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ From owner-svn-src-all@freebsd.org Thu Feb 9 04:42:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAB7ACD7C03; Thu, 9 Feb 2017 04:42:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 603261257; Thu, 9 Feb 2017 04:42:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v194gLdT053876; Thu, 9 Feb 2017 04:42:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v194gL83053873; Thu, 9 Feb 2017 04:42:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702090442.v194gL83053873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 04:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313463 - in stable/11/sys/i386: i386 isa X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 04:42:22 -0000 Author: kib Date: Thu Feb 9 04:42:21 2017 New Revision: 313463 URL: https://svnweb.freebsd.org/changeset/base/313463 Log: MFC r313109: Use ANSI definitions for some i386 functions. Modified: stable/11/sys/i386/i386/machdep.c stable/11/sys/i386/i386/vm_machdep.c stable/11/sys/i386/isa/npx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/machdep.c ============================================================================== --- stable/11/sys/i386/i386/machdep.c Thu Feb 9 04:07:30 2017 (r313462) +++ stable/11/sys/i386/i386/machdep.c Thu Feb 9 04:42:21 2017 (r313463) @@ -2444,8 +2444,7 @@ i386_kdb_init(void) } register_t -init386(first) - int first; +init386(int first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Thu Feb 9 04:07:30 2017 (r313462) +++ stable/11/sys/i386/i386/vm_machdep.c Thu Feb 9 04:42:21 2017 (r313463) @@ -176,11 +176,7 @@ alloc_fpusave(int flags) * ready to run and return to user mode. */ void -cpu_fork(td1, p2, td2, flags) - register struct thread *td1; - register struct proc *p2; - struct thread *td2; - int flags; +cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) { register struct proc *p1; struct pcb *pcb2; Modified: stable/11/sys/i386/isa/npx.c ============================================================================== --- stable/11/sys/i386/isa/npx.c Thu Feb 9 04:07:30 2017 (r313462) +++ stable/11/sys/i386/isa/npx.c Thu Feb 9 04:42:21 2017 (r313463) @@ -550,8 +550,7 @@ SYSINIT(npxinitstate, SI_SUB_DRIVERS, SI * Free coprocessor (if we have it). */ void -npxexit(td) - struct thread *td; +npxexit(struct thread *td) { critical_enter(); @@ -581,7 +580,7 @@ npxexit(td) } int -npxformat() +npxformat(void) { if (!hw_float) @@ -961,7 +960,7 @@ npxresume(union savefpu *addr) } void -npxdrop() +npxdrop(void) { struct thread *td; @@ -1297,8 +1296,7 @@ fpu_clean_state(void) #endif /* CPU_ENABLE_SSE */ static void -fpurstor(addr) - union savefpu *addr; +fpurstor(union savefpu *addr) { #ifdef CPU_ENABLE_SSE From owner-svn-src-all@freebsd.org Thu Feb 9 04:45:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65E1BCD7CDB; Thu, 9 Feb 2017 04:45:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1876E13E1; Thu, 9 Feb 2017 04:45:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v194jJiQ056152; Thu, 9 Feb 2017 04:45:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v194jI2O056149; Thu, 9 Feb 2017 04:45:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702090445.v194jI2O056149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 04:45:18 +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: r313464 - in stable/10/sys/i386: i386 isa 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 04:45:20 -0000 Author: kib Date: Thu Feb 9 04:45:18 2017 New Revision: 313464 URL: https://svnweb.freebsd.org/changeset/base/313464 Log: MFC r313109: Use ANSI definitions for some i386 functions. Modified: stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/i386/vm_machdep.c stable/10/sys/i386/isa/npx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Thu Feb 9 04:42:21 2017 (r313463) +++ stable/10/sys/i386/i386/machdep.c Thu Feb 9 04:45:18 2017 (r313464) @@ -3157,8 +3157,7 @@ init386(first) #else register_t -init386(first) - int first; +init386(int first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; Modified: stable/10/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/10/sys/i386/i386/vm_machdep.c Thu Feb 9 04:42:21 2017 (r313463) +++ stable/10/sys/i386/i386/vm_machdep.c Thu Feb 9 04:45:18 2017 (r313464) @@ -209,11 +209,7 @@ alloc_fpusave(int flags) * ready to run and return to user mode. */ void -cpu_fork(td1, p2, td2, flags) - register struct thread *td1; - register struct proc *p2; - struct thread *td2; - int flags; +cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) { register struct proc *p1; struct pcb *pcb2; Modified: stable/10/sys/i386/isa/npx.c ============================================================================== --- stable/10/sys/i386/isa/npx.c Thu Feb 9 04:42:21 2017 (r313463) +++ stable/10/sys/i386/isa/npx.c Thu Feb 9 04:45:18 2017 (r313464) @@ -559,8 +559,7 @@ SYSINIT(npxinitstate, SI_SUB_DRIVERS, SI * Free coprocessor (if we have it). */ void -npxexit(td) - struct thread *td; +npxexit(struct thread *td) { critical_enter(); @@ -590,7 +589,7 @@ npxexit(td) } int -npxformat() +npxformat(void) { if (!hw_float) @@ -970,7 +969,7 @@ npxresume(union savefpu *addr) } void -npxdrop() +npxdrop(void) { struct thread *td; @@ -1203,8 +1202,7 @@ fpu_clean_state(void) #endif /* CPU_ENABLE_SSE */ static void -fpurstor(addr) - union savefpu *addr; +fpurstor(union savefpu *addr) { #ifdef CPU_ENABLE_SSE From owner-svn-src-all@freebsd.org Thu Feb 9 07:29:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED2ABCD74C9; Thu, 9 Feb 2017 07:29:08 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0F5DB29; Thu, 9 Feb 2017 07:29:08 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v197T7lT021208; Thu, 9 Feb 2017 07:29:07 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v197T7Si021205; Thu, 9 Feb 2017 07:29:07 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201702090729.v197T7Si021205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Thu, 9 Feb 2017 07:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313465 - head/sys/dev/rt 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 07:29:09 -0000 Author: sgalabov Date: Thu Feb 9 07:29:07 2017 New Revision: 313465 URL: https://svnweb.freebsd.org/changeset/base/313465 Log: Set GDMA1 Frames Destination Port to Port 0 (CPU) Some U-Boot versions do not initialize MT7620's Frame Engine. Then it is not possible to receive packets from the network. Setting GDMA1 Frames Destination Port to Port 0 (CPU) in GDM Forwarding Configuration register solves this issue. Submitted by: Hiroki Mori (yamori813@yahoo.co.jp) Reviewed by: adrian mizhka (previous version) Differential Revision: https://reviews.freebsd.org/D9301 Modified: head/sys/dev/rt/if_rt.c head/sys/dev/rt/if_rtreg.h head/sys/dev/rt/if_rtvar.h Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Thu Feb 9 04:45:18 2017 (r313464) +++ head/sys/dev/rt/if_rt.c Thu Feb 9 07:29:07 2017 (r313465) @@ -393,11 +393,13 @@ rt_attach(device_t dev) sc->csum_fail_ip = RT305X_RXD_SRC_IP_CSUM_FAIL; sc->csum_fail_l4 = RT305X_RXD_SRC_L4_CSUM_FAIL; } - + /* Fill in soc-specific registers map */ switch(sc->rt_chipid) { case RT_CHIPID_MT7620: case RT_CHIPID_MT7621: + sc->gdma1_base = MT7620_GDMA1_BASE; + /* fallthrough */ case RT_CHIPID_RT5350: device_printf(dev, "%cT%x Ethernet MAC (rev 0x%08x)\n", sc->rt_chipid >= 0x7600 ? 'M' : 'R', @@ -431,18 +433,7 @@ rt_attach(device_t dev) default: device_printf(dev, "RT305XF Ethernet MAC (rev 0x%08x)\n", sc->mac_rev); - RT_WRITE(sc, GDMA1_BASE + GDMA_FWD_CFG, - ( - GDM_ICS_EN | /* Enable IP Csum */ - GDM_TCS_EN | /* Enable TCP Csum */ - GDM_UCS_EN | /* Enable UDP Csum */ - GDM_STRPCRC | /* Strip CRC from packet */ - GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ - GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ - GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ - GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ - )); - + sc->gdma1_base = GDMA1_BASE; sc->delay_int_cfg=PDMA_BASE+DELAY_INT_CFG; sc->fe_int_status=GE_PORT_BASE+FE_INT_STATUS; sc->fe_int_enable=GE_PORT_BASE+FE_INT_ENABLE; @@ -464,6 +455,19 @@ rt_attach(device_t dev) sc->int_tx_done_mask=INT_TXQ0_DONE; } + if (sc->gdma1_base != 0) + RT_WRITE(sc, sc->gdma1_base + GDMA_FWD_CFG, + ( + GDM_ICS_EN | /* Enable IP Csum */ + GDM_TCS_EN | /* Enable TCP Csum */ + GDM_UCS_EN | /* Enable UDP Csum */ + GDM_STRPCRC | /* Strip CRC from packet */ + GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ + GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ + GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ + GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ + )); + /* allocate Tx and Rx rings */ for (i = 0; i < RT_SOFTC_TX_RING_COUNT; i++) { error = rt_alloc_tx_ring(sc, &sc->tx_ring[i], i); @@ -782,18 +786,18 @@ rt_init_locked(void *priv) //rt305x_sysctl_set(SYSCTL_RSTCTRL, SYSCTL_RSTCTRL_FRENG); /* Fwd to CPU (uni|broad|multi)cast and Unknown */ - if(sc->rt_chipid == RT_CHIPID_RT3050) - RT_WRITE(sc, GDMA1_BASE + GDMA_FWD_CFG, - ( - GDM_ICS_EN | /* Enable IP Csum */ - GDM_TCS_EN | /* Enable TCP Csum */ - GDM_UCS_EN | /* Enable UDP Csum */ - GDM_STRPCRC | /* Strip CRC from packet */ - GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* Forward UCast to CPU */ - GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* Forward BCast to CPU */ - GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* Forward MCast to CPU */ - GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* Forward Other to CPU */ - )); + if (sc->gdma1_base != 0) + RT_WRITE(sc, sc->gdma1_base + GDMA_FWD_CFG, + ( + GDM_ICS_EN | /* Enable IP Csum */ + GDM_TCS_EN | /* Enable TCP Csum */ + GDM_UCS_EN | /* Enable UDP Csum */ + GDM_STRPCRC | /* Strip CRC from packet */ + GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ + GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ + GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ + GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ + )); /* disable DMA engine */ RT_WRITE(sc, sc->pdma_glo_cfg, 0); @@ -965,25 +969,25 @@ rt_stop_locked(void *priv) /* disable interrupts */ RT_WRITE(sc, sc->fe_int_enable, 0); - if(sc->rt_chipid == RT_CHIPID_RT5350 || - sc->rt_chipid == RT_CHIPID_MT7620 || - sc->rt_chipid == RT_CHIPID_MT7621) { - } else { - /* reset adapter */ - RT_WRITE(sc, GE_PORT_BASE + FE_RST_GLO, PSE_RESET); - - RT_WRITE(sc, GDMA1_BASE + GDMA_FWD_CFG, - ( - GDM_ICS_EN | /* Enable IP Csum */ - GDM_TCS_EN | /* Enable TCP Csum */ - GDM_UCS_EN | /* Enable UDP Csum */ - GDM_STRPCRC | /* Strip CRC from packet */ - GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* Forward UCast to CPU */ - GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* Forward BCast to CPU */ - GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* Forward MCast to CPU */ - GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* Forward Other to CPU */ - )); + if(sc->rt_chipid != RT_CHIPID_RT5350 && + sc->rt_chipid != RT_CHIPID_MT7620 && + sc->rt_chipid != RT_CHIPID_MT7621) { + /* reset adapter */ + RT_WRITE(sc, GE_PORT_BASE + FE_RST_GLO, PSE_RESET); } + + if (sc->gdma1_base != 0) + RT_WRITE(sc, sc->gdma1_base + GDMA_FWD_CFG, + ( + GDM_ICS_EN | /* Enable IP Csum */ + GDM_TCS_EN | /* Enable TCP Csum */ + GDM_UCS_EN | /* Enable UDP Csum */ + GDM_STRPCRC | /* Strip CRC from packet */ + GDM_DST_PORT_CPU << GDM_UFRC_P_SHIFT | /* fwd UCast to CPU */ + GDM_DST_PORT_CPU << GDM_BFRC_P_SHIFT | /* fwd BCast to CPU */ + GDM_DST_PORT_CPU << GDM_MFRC_P_SHIFT | /* fwd MCast to CPU */ + GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ + )); } static void Modified: head/sys/dev/rt/if_rtreg.h ============================================================================== --- head/sys/dev/rt/if_rtreg.h Thu Feb 9 04:45:18 2017 (r313464) +++ head/sys/dev/rt/if_rtreg.h Thu Feb 9 07:29:07 2017 (r313465) @@ -105,9 +105,10 @@ #define FOE_TS_TIMESTAMP_MASK 0x0000ffff #define FOE_TS_TIMESTAMP_SHIFT 0 -#define GDMA1_BASE 0x0020 -#define GDMA2_BASE 0x0060 -#define CDMA_BASE 0x0080 +#define GDMA1_BASE 0x0020 +#define GDMA2_BASE 0x0060 +#define CDMA_BASE 0x0080 +#define MT7620_GDMA1_BASE 0x600 #define GDMA_FWD_CFG 0x00 /* Only GDMA */ #define GDM_DROP_256B (1<<23) Modified: head/sys/dev/rt/if_rtvar.h ============================================================================== --- head/sys/dev/rt/if_rtvar.h Thu Feb 9 04:45:18 2017 (r313464) +++ head/sys/dev/rt/if_rtvar.h Thu Feb 9 07:29:07 2017 (r313465) @@ -283,6 +283,7 @@ struct rt_softc uint32_t fe_int_enable; uint32_t pdma_glo_cfg; uint32_t pdma_rst_idx; + uint32_t gdma1_base; uint32_t tx_base_ptr[RT_SOFTC_TX_RING_COUNT]; uint32_t tx_max_cnt[RT_SOFTC_TX_RING_COUNT]; uint32_t tx_ctx_idx[RT_SOFTC_TX_RING_COUNT]; From owner-svn-src-all@freebsd.org Thu Feb 9 08:19:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBDF0CD7763; Thu, 9 Feb 2017 08:19:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3DC6C9; Thu, 9 Feb 2017 08:19:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v198JUrD041825; Thu, 9 Feb 2017 08:19:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v198JUDj041822; Thu, 9 Feb 2017 08:19:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702090819.v198JUDj041822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Feb 2017 08:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313467 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 08:19:32 -0000 Author: mjg Date: Thu Feb 9 08:19:30 2017 New Revision: 313467 URL: https://svnweb.freebsd.org/changeset/base/313467 Log: locks: tidy up unlock fallback paths Update comments to note these functions are reachable if lockstat is enabled. Check if the lock has any bits set before attempting unlock, which saves an unnecessary atomic operation. Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Thu Feb 9 08:03:07 2017 (r313466) +++ head/sys/kern/kern_mutex.c Thu Feb 9 08:19:30 2017 (r313467) @@ -853,25 +853,24 @@ thread_lock_set(struct thread *td, struc /* * __mtx_unlock_sleep: the tougher part of releasing an MTX_DEF lock. * - * We are only called here if the lock is recursed or contested (i.e. we - * need to wake up a blocked thread). + * We are only called here if the lock is recursed, contested (i.e. we + * need to wake up a blocked thread) or lockstat probe is active. */ void __mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file, int line) { struct mtx *m; struct turnstile *ts; + uintptr_t tid, v; if (SCHEDULER_STOPPED()) return; + tid = (uintptr_t)curthread; m = mtxlock2mtx(c); + v = MTX_READ_VALUE(m); - if (!mtx_recursed(m)) { - LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, m); - if (_mtx_release_lock(m, (uintptr_t)curthread)) - return; - } else { + if (v & MTX_RECURSED) { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) @@ -879,6 +878,10 @@ __mtx_unlock_sleep(volatile uintptr_t *c return; } + LOCKSTAT_PROFILE_RELEASE_LOCK(adaptive__release, m); + if (v == tid && _mtx_release_lock(m, tid)) + return; + /* * We have to lock the chain before the turnstile so this turnstile * can be removed from the hash list if it is empty. Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Thu Feb 9 08:03:07 2017 (r313466) +++ head/sys/kern/kern_rwlock.c Thu Feb 9 08:19:30 2017 (r313467) @@ -1030,9 +1030,10 @@ __rw_wlock_hard(volatile uintptr_t *c, u } /* - * This function is called if the first try at releasing a write lock failed. - * This means that one of the 2 waiter bits must be set indicating that at - * least one thread is waiting on this lock. + * This function is called if lockstat is active or the first try at releasing + * a write lock failed. The latter means that the lock is recursed or one of + * the 2 waiter bits must be set indicating that at least one thread is waiting + * on this lock. */ void __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, @@ -1047,18 +1048,19 @@ __rw_wunlock_hard(volatile uintptr_t *c, return; rw = rwlock2rw(c); - - if (!rw_recursed(rw)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, - LOCKSTAT_WRITER); - if (_rw_write_unlock(rw, tid)) - return; - } else { + v = RW_READ_VALUE(rw); + if (v & RW_LOCK_WRITER_RECURSED) { if (--(rw->rw_recurse) == 0) atomic_clear_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); + if (LOCK_LOG_TEST(&rw->lock_object, 0)) + CTR2(KTR_LOCK, "%s: %p unrecursing", __func__, rw); return; } + LOCKSTAT_PROFILE_RELEASE_RWLOCK(rw__release, rw, LOCKSTAT_WRITER); + if (v == tid && _rw_write_unlock(rw, tid)) + return; + KASSERT(rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS), ("%s: neither of the waiter flags are set", __func__)); Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Thu Feb 9 08:03:07 2017 (r313466) +++ head/sys/kern/kern_sx.c Thu Feb 9 08:19:30 2017 (r313467) @@ -749,12 +749,8 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ MPASS(!(sx->sx_lock & SX_LOCK_SHARED)); - if (!sx_recursed(sx)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, - LOCKSTAT_WRITER); - if (atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) - return; - } else { + x = SX_READ_VALUE(sx); + if (x & SX_LOCK_RECURSED) { /* The lock is recursed, unrecurse one level. */ if ((--sx->sx_recurse) == 0) atomic_clear_ptr(&sx->sx_lock, SX_LOCK_RECURSED); @@ -762,6 +758,12 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ CTR2(KTR_LOCK, "%s: %p unrecursing", __func__, sx); return; } + + LOCKSTAT_PROFILE_RELEASE_RWLOCK(sx__release, sx, LOCKSTAT_WRITER); + if (x == tid && + atomic_cmpset_rel_ptr(&sx->sx_lock, tid, SX_LOCK_UNLOCKED)) + return; + MPASS(sx->sx_lock & (SX_LOCK_SHARED_WAITERS | SX_LOCK_EXCLUSIVE_WAITERS)); if (LOCK_LOG_TEST(&sx->lock_object, 0)) From owner-svn-src-all@freebsd.org Thu Feb 9 13:32:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25B5FCD6B72; Thu, 9 Feb 2017 13:32:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E43CC1A00; Thu, 9 Feb 2017 13:32:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19DWKnn074831; Thu, 9 Feb 2017 13:32:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19DWKGW074830; Thu, 9 Feb 2017 13:32:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702091332.v19DWKGW074830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 9 Feb 2017 13:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313472 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 13:32:21 -0000 Author: mjg Date: Thu Feb 9 13:32:19 2017 New Revision: 313472 URL: https://svnweb.freebsd.org/changeset/base/313472 Log: rwlock: fix r313454 The runlock slow path would update wrong variable before restarting the loop, in effect corrupting the state. Reported by: pho Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Thu Feb 9 09:02:45 2017 (r313471) +++ head/sys/kern/kern_rwlock.c Thu Feb 9 13:32:19 2017 (r313472) @@ -755,7 +755,7 @@ __rw_runlock_hard(volatile uintptr_t *c, if (!atomic_cmpset_rel_ptr(&rw->rw_lock, RW_READERS_LOCK(1) | v, x)) { turnstile_chain_unlock(&rw->lock_object); - x = RW_READ_VALUE(rw); + v = RW_READ_VALUE(rw); continue; } if (LOCK_LOG_TEST(&rw->lock_object, 0)) From owner-svn-src-all@freebsd.org Thu Feb 9 15:16:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E635CCD7314; Thu, 9 Feb 2017 15:16:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2C61285; Thu, 9 Feb 2017 15:16:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19FG8tr016674; Thu, 9 Feb 2017 15:16:08 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19FG8mA016673; Thu, 9 Feb 2017 15:16:08 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702091516.v19FG8mA016673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 9 Feb 2017 15:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313474 - head/sys/mips/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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 15:16:10 -0000 Author: allanjude Date: Thu Feb 9 15:16:08 2017 New Revision: 313474 URL: https://svnweb.freebsd.org/changeset/base/313474 Log: Add I2C device hints for Onion Omega This allows you to control up to 8 relay expansions from FreeBSD https://github.com/freebsd/freebsd-wifi-build/wiki/Onion-Omega#controlling-the-relay-expansion Reviewed by: adrian, mizhka MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D9503 Modified: head/sys/mips/conf/ONIONOMEGA.hints Modified: head/sys/mips/conf/ONIONOMEGA.hints ============================================================================== --- head/sys/mips/conf/ONIONOMEGA.hints Thu Feb 9 14:47:34 2017 (r313473) +++ head/sys/mips/conf/ONIONOMEGA.hints Thu Feb 9 15:16:08 2017 (r313474) @@ -123,3 +123,10 @@ hint.gpioled.3.pins=0x00008000 hint.gpioled.3.name="blue" hint.gpioled.3.invert=0 +# I2C +# 0x20 - 0x27 = Relay Controllers (0x27 is default) +# 0x5a = PWM/Servo Controller +hint.gpioiic.0.at="gpiobus0" +hint.gpioiic.0.pins=0x300000 # pins 20 and 21 +hint.gpioiic.0.scl=0 # pin 20 +hint.gpioiic.0.sda=1 # pin 21 From owner-svn-src-all@freebsd.org Thu Feb 9 17:47:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B3C3CD7E7B; Thu, 9 Feb 2017 17:47:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 597AF1A00; Thu, 9 Feb 2017 17:47:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19Hl2c2079798; Thu, 9 Feb 2017 17:47:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19Hl1Hx079792; Thu, 9 Feb 2017 17:47:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201702091747.v19Hl1Hx079792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 9 Feb 2017 17:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313475 - in head: lib/libstand sbin/fsck_ffs 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 17:47:03 -0000 Author: cem Date: Thu Feb 9 17:47:01 2017 New Revision: 313475 URL: https://svnweb.freebsd.org/changeset/base/313475 Log: ufs: Use UFS_MAXNAMLEN constant (like NFS, EXT2FS, SVR4, IBCS2) instead of redefining the MAXNAMLEN constant. No functional change. Reviewed by: kib@, markj@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9500 Modified: head/lib/libstand/ufs.c head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/pass3.c head/sys/ufs/ufs/dir.h head/sys/ufs/ufs/dirhash.h head/sys/ufs/ufs/ufs_lookup.c Modified: head/lib/libstand/ufs.c ============================================================================== --- head/lib/libstand/ufs.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/lib/libstand/ufs.c Thu Feb 9 17:47:01 2017 (r313475) @@ -586,7 +586,7 @@ ufs_open(upath, f) ncp = cp; while ((c = *cp) != '\0' && c != '/') { - if (++len > MAXNAMLEN) { + if (++len > UFS_MAXNAMLEN) { rc = ENOENT; goto out; } Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/sbin/fsck_ffs/fsutil.c Thu Feb 9 17:47:01 2017 (r313475) @@ -889,7 +889,7 @@ getpathname(char *namebuf, ino_t curdir, cp -= len; memmove(cp, namebuf, (size_t)len); *--cp = '/'; - if (cp < &namebuf[MAXNAMLEN]) + if (cp < &namebuf[UFS_MAXNAMLEN]) break; ino = idesc.id_number; } Modified: head/sbin/fsck_ffs/pass3.c ============================================================================== --- head/sbin/fsck_ffs/pass3.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/sbin/fsck_ffs/pass3.c Thu Feb 9 17:47:01 2017 (r313475) @@ -52,7 +52,7 @@ pass3(void) int loopcnt, inpindex, state; ino_t orphan; struct inodesc idesc; - char namebuf[MAXNAMLEN+1]; + char namebuf[UFS_MAXNAMLEN+1]; for (inpindex = inplast - 1; inpindex >= 0; inpindex--) { if (got_siginfo) { Modified: head/sys/ufs/ufs/dir.h ============================================================================== --- head/sys/ufs/ufs/dir.h Thu Feb 9 15:16:08 2017 (r313474) +++ head/sys/ufs/ufs/dir.h Thu Feb 9 17:47:01 2017 (r313475) @@ -57,7 +57,7 @@ * the length of the entry, and the length of the name contained in * the entry. These are followed by the name padded to a 4 byte boundary * with null bytes. All names are guaranteed null terminated. - * The maximum length of a name in a directory is MAXNAMLEN. + * The maximum length of a name in a directory is UFS_MAXNAMLEN. * * The macro DIRSIZ(fmt, dp) gives the amount of space required to represent * a directory entry. Free space in a directory is represented by @@ -72,14 +72,15 @@ * dp->d_ino set to 0. */ #define DIRBLKSIZ DEV_BSIZE -#define MAXNAMLEN 255 +#define UFS_MAXNAMLEN 255 struct direct { u_int32_t d_ino; /* inode number of entry */ u_int16_t d_reclen; /* length of this record */ u_int8_t d_type; /* file type, see below */ u_int8_t d_namlen; /* length of string in d_name */ - char d_name[MAXNAMLEN + 1];/* name with length <= MAXNAMLEN */ + char d_name[UFS_MAXNAMLEN + 1]; + /* name with length <= UFS_MAXNAMLEN */ }; /* @@ -124,7 +125,7 @@ struct direct { /* * Template for manipulating directories. Should use struct direct's, - * but the name field is MAXNAMLEN - 1, and this just won't do. + * but the name field is UFS_MAXNAMLEN - 1, and this just won't do. */ struct dirtemplate { u_int32_t dot_ino; Modified: head/sys/ufs/ufs/dirhash.h ============================================================================== --- head/sys/ufs/ufs/dirhash.h Thu Feb 9 15:16:08 2017 (r313474) +++ head/sys/ufs/ufs/dirhash.h Thu Feb 9 17:47:01 2017 (r313475) @@ -48,7 +48,7 @@ #define DIRHASH_DEL (-2) /* deleted entry; may be part of chain */ #define DIRALIGN 4 -#define DH_NFSTATS (DIRECTSIZ(MAXNAMLEN + 1) / DIRALIGN) +#define DH_NFSTATS (DIRECTSIZ(UFS_MAXNAMLEN + 1) / DIRALIGN) /* max DIRALIGN words in a directory entry */ /* Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Thu Feb 9 15:16:08 2017 (r313474) +++ head/sys/ufs/ufs/ufs_lookup.c Thu Feb 9 17:47:01 2017 (r313475) @@ -771,7 +771,7 @@ ufs_dirbad(ip, offset, how) * record length must be multiple of 4 * entry must fit in rest of its DIRBLKSIZ block * record must be large enough to contain entry - * name is not longer than MAXNAMLEN + * name is not longer than UFS_MAXNAMLEN * name must be as long as advertised, and null terminated */ int @@ -792,7 +792,7 @@ ufs_dirbadentry(dp, ep, entryoffsetinblo # endif if ((ep->d_reclen & 0x3) != 0 || ep->d_reclen > DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)) || - ep->d_reclen < DIRSIZ(OFSFMT(dp), ep) || namlen > MAXNAMLEN) { + ep->d_reclen < DIRSIZ(OFSFMT(dp), ep) || namlen > UFS_MAXNAMLEN) { /*return (1); */ printf("First bad\n"); goto bad; From owner-svn-src-all@freebsd.org Thu Feb 9 17:48:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82FE6CD7F4F; Thu, 9 Feb 2017 17:48:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52AE01CEF; Thu, 9 Feb 2017 17:48:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19HmXsF080025; Thu, 9 Feb 2017 17:48:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19HmX6E080024; Thu, 9 Feb 2017 17:48:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702091748.v19HmX6E080024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Feb 2017 17:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313476 - head/sys/dev/e1000 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 17:48:34 -0000 Author: andrew Date: Thu Feb 9 17:48:33 2017 New Revision: 313476 URL: https://svnweb.freebsd.org/changeset/base/313476 Log: Add support for the Intel 82572EI back to em(4), it seems it was dropped when oving to iflib. Reviewed by: sbruno Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9511 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Feb 9 17:47:01 2017 (r313475) +++ head/sys/dev/e1000/if_em.c Thu Feb 9 17:48:33 2017 (r313476) @@ -104,6 +104,7 @@ static pci_vendor_info_t em_vendor_info_ PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, "Intel(R) PRO/1000 Network Connection"), + PVID(0x8086, E1000_DEV_ID_82572EI, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82572EI_COPPER, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82572EI_FIBER, "Intel(R) PRO/1000 Network Connection"), PVID(0x8086, E1000_DEV_ID_82572EI_SERDES, "Intel(R) PRO/1000 Network Connection"), From owner-svn-src-all@freebsd.org Thu Feb 9 19:58:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E59A6CD889B; Thu, 9 Feb 2017 19:58:13 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFD821304; Thu, 9 Feb 2017 19:58:13 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19JwCvS034513; Thu, 9 Feb 2017 19:58:12 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19JwCWi034512; Thu, 9 Feb 2017 19:58:12 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702091958.v19JwCWi034512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Thu, 9 Feb 2017 19:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313477 - head/usr.sbin/arp 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 19:58:14 -0000 Author: garga (ports committer) Date: Thu Feb 9 19:58:12 2017 New Revision: 313477 URL: https://svnweb.freebsd.org/changeset/base/313477 Log: Cleanup on usr.sbin/arp/arp.c * 'blackhole' and 'reject' are mutually exclusive, replace printf() by errx() when both are selected. * 'trail' option is no longer supported since first import of arp from 4.4BSD. XXX message was added 13 years ago in r128192. I believe it's time to remove it. * Use warnx() to print some informative messages instead of printf() * Replace strncmp() by strcmp() when validating parameters and exit when invalid parameter is found Reviewed by: allanjude, vangyzen, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9504 Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Thu Feb 9 17:48:33 2017 (r313476) +++ head/usr.sbin/arp/arp.c Thu Feb 9 19:58:12 2017 (r313477) @@ -319,7 +319,7 @@ set(int argc, char **argv) return (1); doing_proxy = flags = expire_time = 0; while (argc-- > 0) { - if (strncmp(argv[0], "temp", 4) == 0) { + if (strcmp(argv[0], "temp") == 0) { struct timespec tp; int max_age; size_t len = sizeof(max_age); @@ -329,10 +329,10 @@ set(int argc, char **argv) &max_age, &len, NULL, 0) != 0) err(1, "sysctlbyname"); expire_time = tp.tv_sec + max_age; - } else if (strncmp(argv[0], "pub", 3) == 0) { + } else if (strcmp(argv[0], "pub") == 0) { flags |= RTF_ANNOUNCE; doing_proxy = 1; - if (argc && strncmp(argv[1], "only", 3) == 0) { + if (argc && strcmp(argv[1], "only") == 0) { /* * Compatibility: in pre FreeBSD 8 times * the "only" keyword used to mean that @@ -341,29 +341,28 @@ set(int argc, char **argv) */ argc--; argv++; } - } else if (strncmp(argv[0], "blackhole", 9) == 0) { + } else if (strcmp(argv[0], "blackhole") == 0) { if (flags & RTF_REJECT) { - printf("Choose one of blackhole or reject, " + errx(1, "Choose one of blackhole or reject, " "not both."); } flags |= RTF_BLACKHOLE; - } else if (strncmp(argv[0], "reject", 6) == 0) { + } else if (strcmp(argv[0], "reject") == 0) { if (flags & RTF_BLACKHOLE) { - printf("Choose one of blackhole or reject, " + errx(1, "Choose one of blackhole or reject, " "not both."); } flags |= RTF_REJECT; - } else if (strncmp(argv[0], "trail", 5) == 0) { - /* XXX deprecated and undocumented feature */ - printf("%s: Sending trailers is no longer supported\n", - host); + } else { + warnx("Invalid parameter '%s'", argv[0]); + usage(); } argv++; } ea = (struct ether_addr *)LLADDR(&sdl_m); if (doing_proxy && !strcmp(eaddr, "auto")) { if (!get_ether_addr(dst->sin_addr.s_addr, ea)) { - printf("no interface found for %s\n", + warnx("no interface found for %s", inet_ntoa(dst->sin_addr)); return (1); } @@ -399,7 +398,7 @@ set(int argc, char **argv) if ((sdl->sdl_family != AF_LINK) || (rtm->rtm_flags & RTF_GATEWAY) || !valid_type(sdl->sdl_type)) { - printf("cannot intuit interface index and type for %s\n", host); + warnx("cannot intuit interface index and type for %s", host); return (1); } sdl_m.sdl_type = sdl->sdl_type; @@ -487,7 +486,7 @@ delete(char *host) * is a proxy-arp entry to remove. */ if (flags & RTF_ANNOUNCE) { - fprintf(stderr, "delete: cannot locate %s\n", host); + warnx("delete: cannot locate %s", host); return (1); } @@ -870,9 +869,8 @@ get_ether_addr(in_addr_t ipaddr, struct */ dla = (struct sockaddr_dl *) &ifr->ifr_addr; memcpy(hwaddr, LLADDR(dla), dla->sdl_alen); - printf("using interface %s for proxy with address ", - ifp->ifr_name); - printf("%s\n", ether_ntoa(hwaddr)); + printf("using interface %s for proxy with address %s\n", ifp->ifr_name, + ether_ntoa(hwaddr)); retval = dla->sdl_alen; done: close(sock); From owner-svn-src-all@freebsd.org Thu Feb 9 21:12:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEDA2CD82E1; Thu, 9 Feb 2017 21:12:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FABBDCF; Thu, 9 Feb 2017 21:12:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LCRaF067611; Thu, 9 Feb 2017 21:12:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LCQ5s067598; Thu, 9 Feb 2017 21:12:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092112.v19LCQ5s067598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:12: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: r313478 - in stable/10/contrib/netbsd-tests: fs fs/tmpfs kernel/kqueue kernel/kqueue/read 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:12:29 -0000 Author: ngie Date: Thu Feb 9 21:12:26 2017 New Revision: 313478 URL: https://svnweb.freebsd.org/changeset/base/313478 Log: MFC r305483,r306030,r306031,r306033,r306036: r305483: Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper format specifier for pointers when printing them out with printf(3) Pointyhat to: ngie r306030: Port vnode_leak_test:main to FreeBSD Use a simpler way of dumping kern.maxvnodes, i.e. `sysctl -n kern.maxvnodes` The awk filtering method employed in NetBSD doesn't work on FreeBSD r306031: Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD Use kldstat -m to determine whether or not a filesystem is loaded. This works well with tmpfs, ufs, and zfs r306033: Port sizes_test and statvfs_test to FreeBSD Similar to r306030, use a simpler method for getting the value of `hw.pagesize`, i.e. `sysctl -n hw.pagesize`. The awk filtering method doesn't work on FreeBSD r306036: Port to mknod_test and readdir_test to FreeBSD The `mknod p` command doesn't exist on FreeBSD, like on NetBSD. Use mkfifo instead to create named pipes (FIFOs). Modified: stable/10/contrib/netbsd-tests/fs/h_funcs.subr stable/10/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_file.c stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc1.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/h_funcs.subr ============================================================================== --- stable/10/contrib/netbsd-tests/fs/h_funcs.subr Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/fs/h_funcs.subr Thu Feb 9 21:12:26 2017 (r313478) @@ -45,6 +45,15 @@ require_fs() { # if we have autoloadable modules, just assume the file system atf_require_prog sysctl + # Begin FreeBSD + if true; then + if kldstat -m ${name}; then + found=yes + else + found=no + fi + else + # End FreeBSD autoload=$(sysctl -n kern.module.autoload) [ "${autoload}" = "1" ] && return 0 @@ -57,6 +66,9 @@ require_fs() { fi shift done + # Begin FreeBSD + fi + # End FreeBSD [ ${found} = yes ] || \ atf_skip "The kernel does not include support the " \ "\`${name}' file system" Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh Thu Feb 9 21:12:26 2017 (r313478) @@ -106,7 +106,15 @@ pipe_body() { test_mount umask 022 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mkfifo pipe + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty mknod pipe p + # Begin FreeBSD + fi + # End FreeBSD eval $(stat -s pipe) [ ${st_mode} = 010644 ] || atf_fail "Invalid mode" @@ -124,7 +132,15 @@ pipe_kqueue_body() { umask 022 atf_check -s eq:0 -o empty -e empty mkdir dir + # Begin FreeBSD + if true; then + echo 'mkfifo dir/pipe' | kqueue_monitor 1 dir + else + # End FreeBSD echo 'mknod dir/pipe p' | kqueue_monitor 1 dir + # Begin FreeBSD + fi + # End FreeBSD kqueue_check dir NOTE_WRITE test_unmount Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh Thu Feb 9 21:12:26 2017 (r313478) @@ -59,7 +59,15 @@ types_body() { atf_check -s eq:0 -o empty -e empty ln -s reg lnk atf_check -s eq:0 -o empty -e empty mknod blk b 0 0 atf_check -s eq:0 -o empty -e empty mknod chr c 0 0 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mkfifo fifo + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty mknod fifo p + # Begin FreeBSD + fi + # End FreeBSD atf_check -s eq:0 -o empty -e empty \ $(atf_get_srcdir)/h_tools sockets sock Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_sizes.sh Thu Feb 9 21:12:26 2017 (r313478) @@ -54,7 +54,15 @@ big_head() { big_body() { test_mount -o -s10M + # Begin FreeBSD + if true; then + pagesize=$(sysctl -n hw.pagesize) + else + # End FreeBSD pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3) + # Begin FreeBSD + fi + # End FreeBSD eval $($(atf_get_srcdir)/h_tools statvfs . | sed -e 's|^f_|cf_|') cf_bused=$((${cf_blocks} - ${cf_bfree})) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_statvfs.sh Thu Feb 9 21:12:26 2017 (r313478) @@ -38,7 +38,15 @@ values_head() { values_body() { test_mount -o -s10M + # Begin FreeBSD + if true; then + pagesize=$(sysctl -n hw.pagesize) + else + # End FreeBSD pagesize=$(sysctl hw.pagesize | cut -d ' ' -f 3) + # Begin FreeBSD + fi + # End FreeBSD eval $($(atf_get_srcdir)/h_tools statvfs .) [ ${pagesize} -eq ${f_bsize} ] || \ atf_fail "Invalid bsize" Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnode_leak.sh Thu Feb 9 21:12:26 2017 (r313478) @@ -36,7 +36,15 @@ main_head() { } main_body() { echo "Lowering kern.maxvnodes to 2000" + # Begin FreeBSD + if true; then + sysctl -n kern.maxvnodes > oldvnodes + else + # End FreeBSD sysctl kern.maxvnodes | awk '{ print $3; }' >oldvnodes + # Begin FreeBSD + fi + # End FreeBSD atf_check -s eq:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000 test_mount -o -s$(((4000 + 2) * 4096)) Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c Thu Feb 9 21:12:26 2017 (r313478) @@ -78,7 +78,11 @@ ATF_TC_BODY(fifo, tc) RL(n = kevent(kq, NULL, 0, event, 1, NULL)); (void)printf("kevent num %d filt %d flags: %#x, fflags: %#x, " +#ifdef __FreeBSD__ + "data: %" PRIdPTR "\n", n, event[0].filter, event[0].flags, +#else "data: %" PRId64 "\n", n, event[0].filter, event[0].flags, +#endif event[0].fflags, event[0].data); ATF_REQUIRE_EQ(event[0].filter, EVFILT_READ); Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_file.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_file.c Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_file.c Thu Feb 9 21:12:26 2017 (r313478) @@ -111,7 +111,11 @@ ATF_TC_BODY(file, tc) num += n; (void)printf("kevent num %d flags: %#x, fflags: %#x, data: " +#ifdef __FreeBSD__ + "%" PRIdPTR "\n", n, event[0].flags, event[0].fflags, +#else "%" PRId64 "\n", n, event[0].flags, event[0].fflags, +#endif event[0].data); if (event[0].data < 0) Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c Thu Feb 9 21:12:26 2017 (r313478) @@ -67,7 +67,11 @@ ATF_TC_BODY(pipe, tc) RL(n = kevent(kq, NULL, 0, event, 1, NULL)); (void)printf("kevent num %d flags: %#x, fflags: %#x, data: " +#ifdef __FreeBSD__ + "%" PRIdPTR "\n", n, event[0].flags, event[0].fflags, event[0].data); +#else "%" PRId64 "\n", n, event[0].flags, event[0].fflags, event[0].data); +#endif RL(n = read(fds[0], buffer, event[0].data)); buffer[n] = '\0'; Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c Thu Feb 9 21:12:26 2017 (r313478) @@ -103,7 +103,11 @@ h_check(bool check_master) RL(n = kevent(kq, NULL, 0, event, 1, NULL)); (void)printf("kevent num %d filt %d flags: %#x, fflags: %#x, " +#ifdef __FreeBSD__ + "data: %" PRIdPTR "\n", n, event[0].filter, event[0].flags, +#else "data: %" PRId64 "\n", n, event[0].filter, event[0].flags, +#endif event[0].fflags, event[0].data); ATF_REQUIRE_EQ(event[0].filter, EVFILT_READ); Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc1.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc1.c Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc1.c Thu Feb 9 21:12:26 2017 (r313478) @@ -138,7 +138,11 @@ ATF_TC_BODY(proc1, tc) printf(" NOTE_FORK"); } if (event[0].fflags & NOTE_CHILD) +#ifdef __FreeBSD__ + printf(" NOTE_CHILD, parent = %" PRIdPTR, event[0].data); +#else printf(" NOTE_CHILD, parent = %" PRId64, event[0].data); +#endif printf("\n"); } Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c Thu Feb 9 19:58:12 2017 (r313477) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c Thu Feb 9 21:12:26 2017 (r313478) @@ -117,7 +117,11 @@ ATF_TC_BODY(sig, tc) if (n == 0) continue; +#ifdef __FreeBSD__ + (void)printf("sig: kevent flags: 0x%x, data: %" PRIdPTR " (# " +#else (void)printf("sig: kevent flags: 0x%x, data: %" PRId64 " (# " +#endif "times signal posted)\n", event[0].flags, event[0].data); } From owner-svn-src-all@freebsd.org Thu Feb 9 21:19:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69AB8CD8408; Thu, 9 Feb 2017 21:19:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44370FA3; Thu, 9 Feb 2017 21:19:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LJPp2067969; Thu, 9 Feb 2017 21:19:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LJPaC067966; Thu, 9 Feb 2017 21:19:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092119.v19LJPaC067966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:19: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: r313479 - in stable/10: contrib/netbsd-tests/lib/libc/gen lib/libc/gen 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:19:26 -0000 Author: ngie Date: Thu Feb 9 21:19:24 2017 New Revision: 313479 URL: https://svnweb.freebsd.org/changeset/base/313479 Log: MFC r279154,r279397: r279154 (by jilles): nice(): Correct return value and [EPERM] error. PR: 189821 Obtained from: NetBSD Relnotes: yes r279397 (by jilles): nice(): Put back old return value, keeping [EPERM] error. Commit r279154 changed the API and ABI significantly, and {NZERO} is still wrong. Also, preserve errno on success instead of setting it to 0. PR: 189821 Relnotes: yes Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_nice.c stable/10/lib/libc/gen/nice.3 stable/10/lib/libc/gen/nice.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_nice.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_nice.c Thu Feb 9 21:12:26 2017 (r313478) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_nice.c Thu Feb 9 21:19:24 2017 (r313479) @@ -72,11 +72,6 @@ ATF_TC_BODY(nice_err, tc) { int i; -#ifdef __FreeBSD__ - atf_tc_expect_fail("nice(incr) with incr < 0 fails with unprivileged " - "users and sets errno == EPERM; see PR # 189821 for more details"); -#endif - /* * The call should fail with EPERM if the * supplied parameter is negative and the Modified: stable/10/lib/libc/gen/nice.3 ============================================================================== --- stable/10/lib/libc/gen/nice.3 Thu Feb 9 21:12:26 2017 (r313478) +++ stable/10/lib/libc/gen/nice.3 Thu Feb 9 21:19:24 2017 (r313479) @@ -28,7 +28,7 @@ .\" @(#)nice.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd February 28, 2015 .Dt NICE 3 .Os .Sh NAME @@ -48,20 +48,48 @@ This interface is obsoleted by .Pp The .Fn nice -function obtains the scheduling priority of the process -from the system and sets it to the priority value specified in -.Fa incr . +function adds +.Fa incr +to the scheduling priority of the process. The priority is a value in the range -20 to 20. The default priority is 0; lower priorities cause more favorable scheduling. Only the super-user may lower priorities. .Pp Children inherit the priority of their parent processes via .Xr fork 2 . +.Sh RETURN VALUES +Upon successful completion, +.Fn nice +returns 0, and +.Va errno +is unchanged. +Otherwise, \-1 is returned, the process' nice value is not changed, and +.Va errno +is set to indicate the error. +.Sh ERRORS +The +.Fn nice +function will fail if: +.Bl -tag -width Er +.It Bq Er EPERM +The +.Fa incr +argument is negative and the caller does not have appropriate privileges. +.El .Sh SEE ALSO .Xr nice 1 , .Xr fork 2 , .Xr setpriority 2 , .Xr renice 8 +.Sh STANDARDS +The +.Fn nice +function conforms to +.St -p1003.1-2008 +except for the return value. +This implementation returns 0 upon successful completion but +the standard requires returning the new nice value, +which could be \-1. .Sh HISTORY A .Fn nice Modified: stable/10/lib/libc/gen/nice.c ============================================================================== --- stable/10/lib/libc/gen/nice.c Thu Feb 9 21:12:26 2017 (r313478) +++ stable/10/lib/libc/gen/nice.c Thu Feb 9 21:19:24 2017 (r313479) @@ -43,14 +43,20 @@ __FBSDID("$FreeBSD$"); * Backwards compatible nice. */ int -nice(incr) - int incr; +nice(int incr) { - int prio; + int saverrno, prio; + saverrno = errno; errno = 0; prio = getpriority(PRIO_PROCESS, 0); - if (prio == -1 && errno) + if (prio == -1 && errno != 0) return (-1); - return (setpriority(PRIO_PROCESS, 0, prio + incr)); + if (setpriority(PRIO_PROCESS, 0, prio + incr) == -1) { + if (errno == EACCES) + errno = EPERM; + return (-1); + } + errno = saverrno; + return (0); } From owner-svn-src-all@freebsd.org Thu Feb 9 21:23:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CF3CCD88C8; Thu, 9 Feb 2017 21:23:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F6EA15E3; Thu, 9 Feb 2017 21:23:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LNgae071870; Thu, 9 Feb 2017 21:23:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LNg0P071867; Thu, 9 Feb 2017 21:23:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092123.v19LNg0P071867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:23: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: r313480 - in stable/10: contrib/netbsd-tests/lib/libc/string lib/libc/string 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:23:43 -0000 Author: ngie Date: Thu Feb 9 21:23:41 2017 New Revision: 313480 URL: https://svnweb.freebsd.org/changeset/base/313480 Log: MFC r283584: Relnotes: yes r283584 (by emaste): memmem(3): empty little string matches the beginning of the big string This function originated in glibc, and this matches their behaviour (and NetBSD, OpenBSD, and musl). An empty big string (arg "l") is handled by the existing l_len < s_len test. Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c stable/10/lib/libc/string/memmem.3 stable/10/lib/libc/string/memmem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Thu Feb 9 21:19:24 2017 (r313479) +++ stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Thu Feb 9 21:23:41 2017 (r313480) @@ -75,7 +75,7 @@ ATF_TC_HEAD(memmem_basic, tc) ATF_TC_BODY(memmem_basic, tc) { -#if defined(__darwin__) || defined(__FreeBSD__) +#if defined(__darwin__) expect(memmem(b2, lb2, p0, lp0) == NULL); expect(memmem(b0, lb0, p0, lp0) == NULL); #else Modified: stable/10/lib/libc/string/memmem.3 ============================================================================== --- stable/10/lib/libc/string/memmem.3 Thu Feb 9 21:19:24 2017 (r313479) +++ stable/10/lib/libc/string/memmem.3 Thu Feb 9 21:23:41 2017 (r313480) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2005 +.Dd May 26, 2015 .Dt MEMMEM 3 .Os .Sh NAME @@ -51,14 +51,12 @@ in the byte string .Fa big . .Sh RETURN VALUES If -.Fa big_len -is smaller than -.Fa little_len , -if .Fa little_len -is 0, if -.Fa big_len -is 0 or if +is zero +.Fa big +is returned (that is, an empty little is deemed to match at the beginning of +big); +if .Fa little occurs nowhere in .Fa big , @@ -84,3 +82,11 @@ function first appeared in .Sh BUGS This function was broken in Linux libc up to and including version 5.0.9 and in GNU libc prior to version 2.1. +Prior to +.Fx 11.0 +.Nm +returned +.Dv NULL +when +.Fa little_len +equals 0. Modified: stable/10/lib/libc/string/memmem.c ============================================================================== --- stable/10/lib/libc/string/memmem.c Thu Feb 9 21:19:24 2017 (r313479) +++ stable/10/lib/libc/string/memmem.c Thu Feb 9 21:23:41 2017 (r313480) @@ -42,9 +42,9 @@ memmem(const void *l, size_t l_len, cons const char *cl = (const char *)l; const char *cs = (const char *)s; - /* we need something to compare */ - if (l_len == 0 || s_len == 0) - return NULL; + /* empty "s" matches the beginning of "l" */ + if (s_len == 0) + return (void *)cl; /* "s" must be smaller or equal to "l" */ if (l_len < s_len) From owner-svn-src-all@freebsd.org Thu Feb 9 21:26:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A347CD89BB; Thu, 9 Feb 2017 21:26:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5652417C4; Thu, 9 Feb 2017 21:26:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LQEcw072106; Thu, 9 Feb 2017 21:26:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LQEUx072103; Thu, 9 Feb 2017 21:26:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092126.v19LQEUx072103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:26: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: r313481 - in stable/10: contrib/netbsd-tests/lib/libc/c063 lib/libc/tests/c063 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:26:15 -0000 Author: ngie Date: Thu Feb 9 21:26:14 2017 New Revision: 313481 URL: https://svnweb.freebsd.org/changeset/base/313481 Log: MFC r277648: r277648 (by jilles): Enable utimensat tests from NetBSD. As with other tests from c063, a required #include was missing. Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c stable/10/lib/libc/tests/c063/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Thu Feb 9 21:23:41 2017 (r313480) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Thu Feb 9 21:26:14 2017 (r313481) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 20 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #include #define DIR "dir" Modified: stable/10/lib/libc/tests/c063/Makefile ============================================================================== --- stable/10/lib/libc/tests/c063/Makefile Thu Feb 9 21:23:41 2017 (r313480) +++ stable/10/lib/libc/tests/c063/Makefile Thu Feb 9 21:26:14 2017 (r313481) @@ -2,7 +2,7 @@ TESTSDIR= ${TESTSBASE}/lib/libc/c063 -#TODO: t_o_search, t_utimensat +#TODO: t_o_search NETBSD_ATF_TESTS_C= faccessat_test NETBSD_ATF_TESTS_C+= fchmodat_test @@ -18,6 +18,7 @@ NETBSD_ATF_TESTS_C+= readlinkat_test NETBSD_ATF_TESTS_C+= renameat_test NETBSD_ATF_TESTS_C+= symlinkat_test NETBSD_ATF_TESTS_C+= unlinkat_test +NETBSD_ATF_TESTS_C+= utimensat CFLAGS+= -D_INCOMPLETE_XOPEN_C063 From owner-svn-src-all@freebsd.org Thu Feb 9 21:29:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD84CD8A99; Thu, 9 Feb 2017 21:29:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB37B19D8; Thu, 9 Feb 2017 21:29:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LTJr0072374; Thu, 9 Feb 2017 21:29:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LTIMY072372; Thu, 9 Feb 2017 21:29:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092129.v19LTIMY072372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:29:18 +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: r313482 - in stable/10: contrib/netbsd-tests/lib/libc/ssp lib/libc/tests/ssp 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:29:20 -0000 Author: ngie Date: Thu Feb 9 21:29:18 2017 New Revision: 313482 URL: https://svnweb.freebsd.org/changeset/base/313482 Log: MFC r276527: Don't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins job The h_raw application doesn't do proper bounds checking without the option being supplied via the build, which means that it doesn't throw signals and fail as expected PR: 196430 Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh stable/10/lib/libc/tests/ssp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Thu Feb 9 21:26:14 2017 (r313481) +++ stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Thu Feb 9 21:29:18 2017 (r313482) @@ -361,6 +361,9 @@ raw_head() raw_body() { prog="$(atf_get_srcdir)/h_raw" + # Begin FreeBSD + [ -x $prog ] || atf_skip "$prog is missing; skipping testcase" + # End FreeBSD h_pass "$prog 9" # Begin FreeBSD Modified: stable/10/lib/libc/tests/ssp/Makefile ============================================================================== --- stable/10/lib/libc/tests/ssp/Makefile Thu Feb 9 21:26:14 2017 (r313481) +++ stable/10/lib/libc/tests/ssp/Makefile Thu Feb 9 21:29:18 2017 (r313482) @@ -26,7 +26,11 @@ PROGS+= h_getcwd PROGS+= h_memcpy PROGS+= h_memmove PROGS+= h_memset +# This testcase doesn't run properly when not compiled with -fsantize=bounds +# with clang, which is currently contingent on a compiler_rt update +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30500 PROGS+= h_raw +.endif PROGS+= h_read PROGS+= h_readlink PROGS+= h_snprintf From owner-svn-src-all@freebsd.org Thu Feb 9 21:30:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03380CD8B4F; Thu, 9 Feb 2017 21:30:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAFC11CAF; Thu, 9 Feb 2017 21:30:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LUrw0072599; Thu, 9 Feb 2017 21:30:53 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LUr2R072597; Thu, 9 Feb 2017 21:30:53 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702092130.v19LUr2R072597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 9 Feb 2017 21:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313483 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:30:55 -0000 Author: asomers Date: Thu Feb 9 21:30:53 2017 New Revision: 313483 URL: https://svnweb.freebsd.org/changeset/base/313483 Log: Fix setting birthtime in ZFS sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c * In zfs_freebsd_setattr, if the caller wants to set the birthtime, set the bits that zfs_settattr expects * In zfs_setattr, if XAT_CREATETIME is set, set xoa_createtime, expected by zfs_xvattr_set. The two levels of indirection seem excessive, but it minimizes diffs vs OpenZFS. * In zfs_setattr, check for overflow of va_birthtime (from delphij) * Remove red herring in zfs_getattr sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h * Un-booby-trap some macros New tests are under review at https://github.com/pjd/pjdfstest/pull/6 Reviewed by: avg MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9353 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Feb 9 21:29:18 2017 (r313482) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Feb 9 21:30:53 2017 (r313483) @@ -2786,15 +2786,6 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i zfs_sa_get_scanstamp(zp, xvap); } - if (XVA_ISSET_REQ(xvap, XAT_CREATETIME)) { - uint64_t times[2]; - - (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_CRTIME(zfsvfs), - times, sizeof (times)); - ZFS_TIME_DECODE(&xoap->xoa_createtime, times); - XVA_SET_RTN(xvap, XAT_CREATETIME); - } - if (XVA_ISSET_REQ(xvap, XAT_REPARSE)) { xoap->xoa_reparse = ((zp->z_pflags & ZFS_REPARSE) != 0); XVA_SET_RTN(xvap, XAT_REPARSE); @@ -2956,6 +2947,11 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i return (SET_ERROR(EOVERFLOW)); } } + if (xoap && (mask & AT_XVATTR) && XVA_ISSET_REQ(xvap, XAT_CREATETIME) && + TIMESPEC_OVERFLOW(&vap->va_birthtime)) { + ZFS_EXIT(zfsvfs); + return (SET_ERROR(EOVERFLOW)); + } attrzp = NULL; aclp = NULL; @@ -3400,6 +3396,8 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (xoap && (mask & AT_XVATTR)) { + if (XVA_ISSET_REQ(xvap, XAT_CREATETIME)) + xoap->xoa_createtime = vap->va_birthtime; /* * restore trimmed off masks * so that return masks can be set for caller. @@ -5251,6 +5249,10 @@ zfs_freebsd_setattr(ap) xvap.xva_xoptattrs.xoa_sparse); #undef FLAG_CHANGE } + if (vap->va_birthtime.tv_sec != VNOVAL) { + xvap.xva_vattr.va_mask |= AT_XVATTR; + XVA_SET_REQ(&xvap, XAT_CREATETIME); + } return (zfs_setattr(vp, (vattr_t *)&xvap, 0, cred, NULL)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Thu Feb 9 21:29:18 2017 (r313482) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Thu Feb 9 21:30:53 2017 (r313483) @@ -268,27 +268,30 @@ typedef struct xvattr { * XVA_SET_REQ() sets an attribute bit in the proper element in the bitmap * of requested attributes (xva_reqattrmap[]). */ -#define XVA_SET_REQ(xvap, attr) \ +#define XVA_SET_REQ(xvap, attr) { \ ASSERT((xvap)->xva_vattr.va_mask | AT_XVATTR); \ ASSERT((xvap)->xva_magic == XVA_MAGIC); \ - (xvap)->xva_reqattrmap[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr) + (xvap)->xva_reqattrmap[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr); \ +} /* * XVA_CLR_REQ() clears an attribute bit in the proper element in the bitmap * of requested attributes (xva_reqattrmap[]). */ -#define XVA_CLR_REQ(xvap, attr) \ +#define XVA_CLR_REQ(xvap, attr) { \ ASSERT((xvap)->xva_vattr.va_mask | AT_XVATTR); \ ASSERT((xvap)->xva_magic == XVA_MAGIC); \ - (xvap)->xva_reqattrmap[XVA_INDEX(attr)] &= ~XVA_ATTRBIT(attr) + (xvap)->xva_reqattrmap[XVA_INDEX(attr)] &= ~XVA_ATTRBIT(attr); \ +} /* * XVA_SET_RTN() sets an attribute bit in the proper element in the bitmap * of returned attributes (xva_rtnattrmap[]). */ -#define XVA_SET_RTN(xvap, attr) \ +#define XVA_SET_RTN(xvap, attr) { \ ASSERT((xvap)->xva_vattr.va_mask | AT_XVATTR); \ ASSERT((xvap)->xva_magic == XVA_MAGIC); \ - (XVA_RTNATTRMAP(xvap))[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr) + (XVA_RTNATTRMAP(xvap))[XVA_INDEX(attr)] |= XVA_ATTRBIT(attr); \ +} /* * XVA_ISSET_REQ() checks the requested attribute bitmap (xva_reqattrmap[]) From owner-svn-src-all@freebsd.org Thu Feb 9 21:37:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A838CD8CDD; Thu, 9 Feb 2017 21:37:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6ED91FDC; Thu, 9 Feb 2017 21:37:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LbaSP076421; Thu, 9 Feb 2017 21:37:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LbaKj076420; Thu, 9 Feb 2017 21:37:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092137.v19LbaKj076420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:37: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: r313484 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:37:38 -0000 Author: ngie Date: Thu Feb 9 21:37:36 2017 New Revision: 313484 URL: https://svnweb.freebsd.org/changeset/base/313484 Log: Record r286620 and r286638 as having been MFCed No net change Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Thu Feb 9 21:54:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82395CD81A1; Thu, 9 Feb 2017 21:54:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46AD5E5B; Thu, 9 Feb 2017 21:54:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19LsKRk085097; Thu, 9 Feb 2017 21:54:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19LsIni085078; Thu, 9 Feb 2017 21:54:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092154.v19LsIni085078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 21:54:18 +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: r313485 - in stable/10: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json cddl/contrib/opensolaris/cmd/dtrace/test/tst/comm... 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 21:54:21 -0000 Author: ngie Date: Thu Feb 9 21:54:18 2017 New Revision: 313485 URL: https://svnweb.freebsd.org/changeset/base/313485 Log: MFC r277912,r278738,r279418,r280835,r288416: r277912 (by markj): Include required headers in DTrace test programs. r278738 (by markj): Tweak the fds test program so that it actually compiles. Also use 0 instead of -1 for the bogus ioctl command so that dmesg doesn't get spammed with sign extension warnings when the test program runs. r279418 (by markj): Add infrastructure to integrate the DTrace test suite with Kyua. For each test category, we generate a script containing ATF test cases for the tests under that category. Each test case simply runs dtest.pl (the upstream test harness) with the corresponding test files. The exclude.sh script is used to record info about tests which should be skipped or are expected to fail; it is used to generate atf_skip and atf_expect_fail calls. The genmakefiles.sh script can be used to regenerate the test makefiles when new tests are brought it from upstream. The test suite is currently not connected to the build as there is a small number of lingering test issues which still need to be worked out. In the meantime however, the test suite can be easily built and installed manually from cddl/usr.sbin/dtrace/tests. r280835 (by markj): Replace dtest.pl, the upstream DTrace test suite harness, with a shell script. This reimplementation is much simpler than dtest.pl and is more amenable to being run under Kyua - dtest.pl writes error output to a temporary directory that is deleted when the run finishes, making it hard to debug test failures. This change also removes the test suite's dependency on perl. r288416 (by markj): Update DTrace test makefiles after r288415. Added: stable/10/cddl/usr.sbin/dtrace/tests/ - copied from r279418, head/cddl/usr.sbin/dtrace/tests/ stable/10/cddl/usr.sbin/dtrace/tests/tools/dtest.sh - copied unchanged from r280835, head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c stable/10/cddl/usr.sbin/dtrace/tests/Makefile stable/10/cddl/usr.sbin/dtrace/tests/Makefile.inc1 stable/10/cddl/usr.sbin/dtrace/tests/common/privs/Makefile stable/10/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile stable/10/cddl/usr.sbin/dtrace/tests/tools/gentest.sh stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c Thu Feb 9 21:54:18 2017 (r313485) @@ -26,6 +26,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include + #include #include #include @@ -69,7 +71,7 @@ main(int argc, char *argv[]) */ if (sigsetjmp(env, 1) == 0) { for (;;) - (void) ioctl(-1, -1, NULL); + (void) ioctl(-1, 0, NULL); } /* @@ -80,20 +82,19 @@ main(int argc, char *argv[]) fds[n++] = open(file, O_WRONLY); fds[n++] = open(file, O_RDWR); - fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC | - O_LARGEFILE | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_RSYNC | - O_SYNC | O_TRUNC | O_XATTR, 0666); + fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | + O_NOCTTY | O_NONBLOCK | O_NDELAY | O_SYNC | O_TRUNC | 0666); fds[n++] = open(file, O_RDWR); (void) lseek(fds[n - 1], 123, SEEK_SET); /* * Once we have all the file descriptors in the state we want to test, - * issue a bogus ioctl() on each fd with cmd -1 and arg NULL to whack + * issue a bogus ioctl() on each fd with cmd 0 and arg NULL to whack * our DTrace script into recording the content of the fds[] array. */ for (i = 0; i < n; i++) - (void) ioctl(fds[i], -1, NULL); + (void) ioctl(fds[i], 0, NULL); assert(n <= sizeof (fds) / sizeof (fds[0])); exit(0); Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d Thu Feb 9 21:54:18 2017 (r313485) @@ -36,7 +36,7 @@ syscall::ioctl:entry } syscall::ioctl:entry -/pid == $1 && arg0 != -1u && arg1 == -1u && arg2 == NULL/ +/pid == $1 && arg0 != -1u && arg1 == 0 && arg2 == NULL/ { printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name); printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname); Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Thu Feb 9 21:54:18 2017 (r313485) @@ -14,6 +14,8 @@ */ #include +#include +#include #include "usdt.h" #define FMT "{" \ Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c Thu Feb 9 21:54:18 2017 (r313485) @@ -28,6 +28,7 @@ #include #include +#include #include #include #include Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Thu Feb 9 21:54:18 2017 (r313485) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include int Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Thu Feb 9 21:54:18 2017 (r313485) @@ -26,6 +26,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include +#include #include #include #include Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Thu Feb 9 21:54:18 2017 (r313485) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Thu Feb 9 21:54:18 2017 (r313485) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Thu Feb 9 21:54:18 2017 (r313485) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Thu Feb 9 21:54:18 2017 (r313485) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +#include #include /* Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Feb 9 21:54:18 2017 (r313485) @@ -28,6 +28,7 @@ #include #include +#include /*ARGSUSED*/ int Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Thu Feb 9 21:54:18 2017 (r313485) @@ -26,6 +26,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include +#include + +#include #include #include "forker.h" Modified: stable/10/cddl/usr.sbin/dtrace/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/Makefile Sat Feb 28 23:30:06 2015 (r279418) +++ stable/10/cddl/usr.sbin/dtrace/tests/Makefile Thu Feb 9 21:54:18 2017 (r313485) @@ -8,10 +8,8 @@ TESTS_SUBDIRS+= common .PATH: ${.CURDIR:H:H:H:H}/tests KYUAFILE= YES -.PATH: ${.CURDIR:H:H:H}/contrib/opensolaris/cmd/dtrace/test/cmd/scripts +.PATH: ${.CURDIR}/tools SCRIPTSDIR= ${TESTSDIR} -SCRIPTS= dtest.pl - -SUBDIR_PARALLEL= +SCRIPTS= dtest.sh .include Modified: stable/10/cddl/usr.sbin/dtrace/tests/Makefile.inc1 ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Sat Feb 28 23:30:06 2015 (r279418) +++ stable/10/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Thu Feb 9 21:54:18 2017 (r313485) @@ -16,7 +16,6 @@ ${TESTGROUP}EXEDIR= ${TESTSDIR} TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} -TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/perl" TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh" TEST_METADATA.t_dtrace_contrib+= required_user="root" Modified: stable/10/cddl/usr.sbin/dtrace/tests/common/privs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/privs/Makefile Sat Feb 28 23:30:06 2015 (r279418) +++ stable/10/cddl/usr.sbin/dtrace/tests/common/privs/Makefile Thu Feb 9 21:54:18 2017 (r313485) @@ -8,6 +8,7 @@ TESTFILES= \ tst.fds.ksh \ tst.func_access.ksh \ tst.getf.ksh \ + tst.kpriv.ksh \ tst.op_access.ksh \ tst.procpriv.ksh \ tst.providers.ksh \ Modified: stable/10/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile Sat Feb 28 23:30:06 2015 (r279418) +++ stable/10/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile Thu Feb 9 21:54:18 2017 (r313485) @@ -14,6 +14,8 @@ TESTFILES= \ err.D_OP_INCOMPAT.dupltype.d \ err.D_OP_INCOMPAT.dupttype.d \ err.D_SYNTAX.declare.d \ + err.bigglobal.d \ + err.biglocal.d \ tst.basicvar.d \ tst.basicvar.d.out \ tst.localvar.d \ Copied: stable/10/cddl/usr.sbin/dtrace/tests/tools/dtest.sh (from r280835, head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Thu Feb 9 21:54:18 2017 (r313485, copy of r280835, head/cddl/usr.sbin/dtrace/tests/tools/dtest.sh) @@ -0,0 +1,129 @@ +# $FreeBSD$ + +usage() +{ + cat >&2 <<__EOF__ +A harness for test cases in the DTrace test suite. + +usage: $(basename $0) +__EOF__ + exit 1 +} + +gettag() +{ + local tag + + tag=$(basename $1) + tag=${tag#*.} + tag=${tag%%[a-z.]*} + echo $tag +} + +runtest() +{ + local dflags exe exstatus pid retval status + + exstatus=0 + retval=0 + + case $TFILE in + drp.DTRACEDROP_*.d|err.*.d|tst.*.d) + case $TFILE in + drp.DTRACEDROP_*.d) + dflags="-x droptags" + tag=$(gettag "$TFILE") + ;; + err.D_*.d) + exstatus=1 + dflags="-x errtags" + tag=$(gettag "$TFILE") + ;; + err.*.d) + exstatus=1 + ;; + esac + + exe=${TFILE%.*}.exe + if [ -f "$exe" -a -x "$exe" ]; then + ./$exe & + pid=$! + dflags="$dflags ${pid}" + fi + + dtrace -C -s "${TFILE}" $dflags >$STDOUT 2>$STDERR + status=$? + + if [ $status -ne $exstatus ]; then + ERRMSG="dtrace exited with status ${status}, expected ${exstatus}" + retval=1 + elif [ -n "${tag}" ] && ! grep -Fq " [${tag}] " ${STDERR}; then + ERRMSG="dtrace's error output did not contain expected tag ${tag}" + retval=1 + fi + + if [ -n "$pid" ]; then + kill -0 $pid >/dev/null 2>&1 && kill -9 $pid >/dev/null 2>&1 + wait + fi + ;; + err.*.ksh|tst.*.ksh) + expr "$TFILE" : 'err.*' >/dev/null && exstatus=1 + + ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR + status=$? + + if [ $status -ne $exstatus ]; then + ERRMSG="script exited with status ${status}, expected ${exstatus}" + retval=1 + fi + ;; + *) + ERRMSG="unexpected test file name $TFILE" + retval=1 + ;; + esac + + return $retval +} + +[ $# -eq 1 ] || usage + +readonly STDERR=$(mktemp) +readonly STDOUT=$(mktemp) +readonly TFILE=$(basename $1) +readonly EXOUT=${TFILE}.out + +kldstat -q -m dtrace_test || kldload dtrace_test +cd $(dirname $1) +runtest +RESULT=$? + +if [ $RESULT -eq 0 -a -f $EXOUT -a -r $EXOUT ] && \ + ! cmp $STDOUT $EXOUT >/dev/null 2>&1; then + ERRMSG="test output mismatch" + RESULT=1 +fi + +if [ $RESULT -ne 0 ]; then + echo "test $TFILE failed: $ERRMSG" >&2 + if [ $(stat -f '%z' $STDOUT) -gt 0 ]; then + cat >&2 <<__EOF__ +test stdout: +-- +$(cat $STDOUT) +-- +__EOF__ + fi + if [ $(stat -f '%z' $STDERR) -gt 0 ]; then + cat >&2 <<__EOF__ +test stderr: +-- +$(cat $STDERR) +-- +__EOF__ + fi +fi + +rm -f $STDERR $STDOUT +exit $RESULT Modified: stable/10/cddl/usr.sbin/dtrace/tests/tools/gentest.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/gentest.sh Sat Feb 28 23:30:06 2015 (r279418) +++ stable/10/cddl/usr.sbin/dtrace/tests/tools/gentest.sh Thu Feb 9 21:54:18 2017 (r313485) @@ -33,8 +33,8 @@ ${tcase}_head() ${tcase}_body() { $mod - atf_check -s exit:0 -o ignore -e ignore \\ - "\$(atf_get_srcdir)/../../dtest" -n "\$(atf_get_srcdir)/${tfile}" + atf_check -s exit:0 -o empty -e empty \\ + "\$(atf_get_srcdir)/../../dtest" "\$(atf_get_srcdir)/${tfile}" } __EOF__ } Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Feb 9 21:37:36 2017 (r313484) +++ stable/10/etc/mtree/BSD.tests.dist Thu Feb 9 21:54:18 2017 (r313485) @@ -53,6 +53,168 @@ usr.bin .. usr.sbin + dtrace + common + aggs + .. + arithmetic + .. + arrays + .. + assocs + .. + begin + .. + bitfields + .. + buffering + .. + builtinvar + .. + cg + .. + clauses + .. + cpc + .. + decls + .. + drops + .. + dtraceUtil + .. + end + .. + enum + .. + error + .. + exit + .. + fbtprovider + .. + funcs + .. + grammar + .. + include + .. + inline + .. + io + .. + ip + .. + java_api + .. + json + .. + lexer + .. + llquantize + .. + mdb + .. + mib + .. + misc + .. + multiaggs + .. + offsetof + .. + operators + .. + pid + .. + plockstat + .. + pointers + .. + pragma + .. + predicates + .. + preprocessor + .. + print + .. + printa + .. + printf + .. + privs + .. + probes + .. + proc + .. + profile-n + .. + providers + .. + raise + .. + rates + .. + safety + .. + scalars + .. + sched + .. + scripting + .. + sdt + .. + sizeof + .. + speculation + .. + stability + .. + stack + .. + stackdepth + .. + stop + .. + strlen + .. + strtoll + .. + struct + .. + syscall + .. + sysevent + .. + tick-n + .. + trace + .. + tracemem + .. + translators + .. + typedef + .. + types + .. + uctf + .. + union + .. + usdt + .. + ustack + .. + vars + .. + version + .. + .. + .. .. .. etc From owner-svn-src-all@freebsd.org Thu Feb 9 22:04:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3FB1CD85C7; Thu, 9 Feb 2017 22:04:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E52E16D8; Thu, 9 Feb 2017 22:04:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19M4wfm089295; Thu, 9 Feb 2017 22:04:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19M4vKG089279; Thu, 9 Feb 2017 22:04:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092204.v19M4vKG089279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 22:04:57 +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: r313486 - in stable/10: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf cddl/contrib/opensolaris/cmd/dtrace/test/tst/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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 22:04:59 -0000 Author: ngie Date: Thu Feb 9 22:04:56 2017 New Revision: 313486 URL: https://svnweb.freebsd.org/changeset/base/313486 Log: MFC r258903,r264487,r271699,r288415: r258903 (by markj): Enable some previously-disabled DTrace tests for umod, ufunc and usym. They expect the installed ksh binary to be named "ksh", which is not the case when it's installed on FreeBSD via the shells/ksh93 port. Allow for it to be "ksh93" as well so that the tests can actually pass. r264487 (by markj): Replace a few Solarisisms with their corresponding FreeBSDisms to make a few printf tests pass. r271699 (by markj): Implement a workaround to allow this test program to be compiled with clang. It seems that if a pragma is used to define a weak alias for a local function, the pragma must appear after the function is defined. PR: 193056 r288415 (by markj): MFV r288408: 6266 harden dtrace_difo_chunksize() with respect to malicious DIF illumos/illumos-gate@395c7a3dcfc66b8b671dc4b3c4a2f0ca26449922 Author: Bryan Cantrill Added: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.kpriv.ksh - copied unchanged from r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.kpriv.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.bigglobal.d - copied unchanged from r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.bigglobal.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.biglocal.d - copied unchanged from r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.biglocal.d Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d.out stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h stable/10/tools/test/dtrace/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Thu Feb 9 22:04:56 2017 (r313486) @@ -35,14 +35,14 @@ * leading underscores. */ -#pragma weak _go = go - static int go(int a) { return (a + 1); } +#pragma weak _go = go + static void handle(int sig) { Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d Thu Feb 9 22:04:56 2017 (r313486) @@ -44,7 +44,7 @@ BEGIN printf("\n"); - printf("%%a = %a\n", &`kmem_alloc); + printf("%%a = %a\n", &`malloc); printf("%%c = %c\n", i); printf("%%d = %d\n", i); printf("%%hd = %hd\n", (short)i); Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d.out ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d.out Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.basics.d.out Thu Feb 9 22:04:56 2017 (r313486) @@ -1,5 +1,5 @@ -%a = genunix`kmem_alloc +%a = kernel`malloc %c = a %d = 97 %hd = 97 Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d Thu Feb 9 22:04:56 2017 (r313486) @@ -36,6 +36,6 @@ BEGIN { - printf("sysname = %s", `utsname.sysname); + printf("sysname = %s", `ostype); exit(0); } Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d.out ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d.out Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d.out Thu Feb 9 22:04:56 2017 (r313486) @@ -1 +1 @@ -sysname = SunOS +sysname = FreeBSD Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d Thu Feb 9 22:04:56 2017 (r313486) @@ -38,6 +38,6 @@ BEGIN { - printf("symbol = %a", &`kmem_alloc); + printf("symbol = %a", &`malloc); exit(0); } Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d.out ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d.out Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.sym.d.out Thu Feb 9 22:04:56 2017 (r313486) @@ -1 +1 @@ -symbol = kernel`kmem_alloc +symbol = kernel`malloc Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.kpriv.ksh (from r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.kpriv.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.kpriv.ksh Thu Feb 9 22:04:56 2017 (r313486, copy of r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/tst.kpriv.ksh) @@ -0,0 +1,112 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2015, Joyent, Inc. All rights reserved. +# + +err=/tmp/err.$$ + +ppriv -s A=basic,dtrace_user $$ + +# +# When we lack dtrace_kernel, we expect to not be able to get at kernel memory +# via any subroutine or other vector. +# +# trace(func((void *)&\`utsname)); } +/usr/sbin/dtrace -wq -Cs /dev/stdin 2> $err < /dev/null +script | tee /dev/fd/2 | egrep 'ksh(93)?`[a-zA-Z_]' > /dev/null status=$? kill $child Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh Thu Feb 9 22:04:56 2017 (r313486) @@ -62,7 +62,7 @@ child=$! # # The only thing we can be sure of here is that ksh is doing some work. # -script | tee /dev/fd/2 | grep -w ksh > /dev/null +script | tee /dev/fd/2 | egrep -w 'ksh(93)?' > /dev/null status=$? kill $child Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh Thu Feb 9 22:04:56 2017 (r313486) @@ -63,7 +63,7 @@ child=$! # This test is essentially the same as that in the ufunc test; see that # test for the rationale. # -script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null +script | tee /dev/fd/2 | egrep 'ksh(93)?`[a-zA-Z_]' > /dev/null status=$? kill $child Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.bigglobal.d (from r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.bigglobal.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.bigglobal.d Thu Feb 9 22:04:56 2017 (r313486, copy of r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.bigglobal.d) @@ -0,0 +1,26 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2015, Joyent, Inc. All rights reserved. + */ + +struct mrbig { + char toomany[100000]; +}; + +struct mrbig mrbig; + +BEGIN +{ + mrbig.toomany[0] = '!'; + exit(0); +} Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.biglocal.d (from r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.biglocal.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.biglocal.d Thu Feb 9 22:04:56 2017 (r313486, copy of r288415, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/err.biglocal.d) @@ -0,0 +1,26 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2015, Joyent, Inc. All rights reserved. + */ + +struct mrbig { + char toomany[100000]; +}; + +this struct mrbig mrbig; + +BEGIN +{ + this->mrbig.toomany[0] = '!'; + exit(0); +} Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Feb 9 22:04:56 2017 (r313486) @@ -155,7 +155,7 @@ int dtrace_destructive_disallow = 0; dtrace_optval_t dtrace_nonroot_maxsize = (16 * 1024 * 1024); size_t dtrace_difo_maxsize = (256 * 1024); dtrace_optval_t dtrace_dof_maxsize = (8 * 1024 * 1024); -size_t dtrace_global_maxsize = (16 * 1024); +size_t dtrace_statvar_maxsize = (16 * 1024); size_t dtrace_actions_max = (16 * 1024); size_t dtrace_retain_max = 1024; dtrace_optval_t dtrace_helper_actions_max = 128; @@ -699,13 +699,33 @@ dtrace_canstore_statvar(uint64_t addr, s dtrace_statvar_t **svars, int nsvars) { int i; + size_t maxglobalsize, maxlocalsize; + + if (nsvars == 0) + return (0); + + maxglobalsize = dtrace_statvar_maxsize; + maxlocalsize = (maxglobalsize + sizeof (uint64_t)) * NCPU; for (i = 0; i < nsvars; i++) { dtrace_statvar_t *svar = svars[i]; + uint8_t scope; + size_t size; - if (svar == NULL || svar->dtsv_size == 0) + if (svar == NULL || (size = svar->dtsv_size) == 0) continue; + scope = svar->dtsv_var.dtdv_scope; + + /* + * We verify that our size is valid in the spirit of providing + * defense in depth: we want to prevent attackers from using + * DTrace to escalate an orthogonal kernel heap corruption bug + * into the ability to store to arbitrary locations in memory. + */ + VERIFY((scope == DIFV_SCOPE_GLOBAL && size < maxglobalsize) || + (scope == DIFV_SCOPE_LOCAL && size < maxlocalsize)); + if (DTRACE_INRANGE(addr, sz, svar->dtsv_data, svar->dtsv_size)) return (1); } @@ -4455,7 +4475,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, if (!dtrace_destructive_disallow && dtrace_priv_proc_control(state) && - !dtrace_istoxic(kaddr, size)) { + !dtrace_istoxic(kaddr, size) && + dtrace_canload(kaddr, size, mstate, vstate)) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); dtrace_copyout(kaddr, uaddr, size, flags); DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); @@ -4470,7 +4491,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, if (!dtrace_destructive_disallow && dtrace_priv_proc_control(state) && - !dtrace_istoxic(kaddr, size)) { + !dtrace_istoxic(kaddr, size) && + dtrace_strcanload(kaddr, size, mstate, vstate)) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); dtrace_copyoutstr(kaddr, uaddr, size, flags); DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); @@ -6458,6 +6480,11 @@ dtrace_dif_emulate(dtrace_difo_t *difo, regs[r2] ? regs[r2] : dtrace_strsize_default) + 1; } else { + if (regs[r2] > LONG_MAX) { + *flags |= CPU_DTRACE_ILLOP; + break; + } + tupregs[ttop].dttk_size = regs[r2]; } @@ -9919,9 +9946,10 @@ dtrace_difo_validate(dtrace_difo_t *dp, break; } - if (v->dtdv_scope == DIFV_SCOPE_GLOBAL && - vt->dtdt_size > dtrace_global_maxsize) { - err += efunc(i, "oversized by-ref global\n"); + if ((v->dtdv_scope == DIFV_SCOPE_GLOBAL || + v->dtdv_scope == DIFV_SCOPE_LOCAL) && + vt->dtdt_size > dtrace_statvar_maxsize) { + err += efunc(i, "oversized by-ref static\n"); break; } } @@ -10265,6 +10293,9 @@ dtrace_difo_chunksize(dtrace_difo_t *dp, if (srd == 0) return; + if (sval > LONG_MAX) + return; + tupregs[ttop++].dttk_size = sval; } @@ -10326,6 +10357,19 @@ dtrace_difo_chunksize(dtrace_difo_t *dp, */ size = P2ROUNDUP(size, sizeof (uint64_t)); + /* + * Before setting the chunk size, check that we're not going + * to set it to a negative value... + */ + if (size > LONG_MAX) + return; + + /* + * ...and make certain that we didn't badly overflow. + */ + if (size < ksize || size < sizeof (dtrace_dynvar_t)) + return; + if (size > vstate->dtvs_dynvars.dtds_chunksize) vstate->dtvs_dynvars.dtds_chunksize = size; } @@ -13945,6 +13989,8 @@ dtrace_dstate_init(dtrace_dstate_t *dsta if ((dstate->dtds_chunksize = chunksize) == 0) dstate->dtds_chunksize = DTRACE_DYNVAR_CHUNKSIZE; + VERIFY(dstate->dtds_chunksize < LONG_MAX); + if (size < (min = dstate->dtds_chunksize + sizeof (dtrace_dynhash_t))) size = min; @@ -13985,6 +14031,9 @@ dtrace_dstate_init(dtrace_dstate_t *dsta ((uintptr_t)base + hashsize * sizeof (dtrace_dynhash_t)); limit = (uintptr_t)base + size; + VERIFY((uintptr_t)start < limit); + VERIFY((uintptr_t)start >= (uintptr_t)base); + maxper = (limit - (uintptr_t)start) / NCPU; maxper = (maxper / dstate->dtds_chunksize) * dstate->dtds_chunksize; @@ -14010,7 +14059,7 @@ dtrace_dstate_init(dtrace_dstate_t *dsta start = (dtrace_dynvar_t *)limit; } - ASSERT(limit <= (uintptr_t)base + size); + VERIFY(limit <= (uintptr_t)base + size); for (;;) { next = (dtrace_dynvar_t *)((uintptr_t)dvar + @@ -14019,6 +14068,8 @@ dtrace_dstate_init(dtrace_dstate_t *dsta if ((uintptr_t)next + dstate->dtds_chunksize >= limit) break; + VERIFY((uintptr_t)dvar >= (uintptr_t)base && + (uintptr_t)dvar <= (uintptr_t)base + size); dvar->dtdv_next = next; dvar = next; } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Thu Feb 9 22:04:56 2017 (r313486) @@ -1317,16 +1317,19 @@ extern void dtrace_copystr(uintptr_t, ui /* * DTrace Assertions * - * DTrace calls ASSERT from probe context. To assure that a failed ASSERT - * does not induce a markedly more catastrophic failure (e.g., one from which - * a dump cannot be gleaned), DTrace must define its own ASSERT to be one that - * may safely be called from probe context. This header file must thus be - * included by any DTrace component that calls ASSERT from probe context, and - * _only_ by those components. (The only exception to this is kernel - * debugging infrastructure at user-level that doesn't depend on calling - * ASSERT.) + * DTrace calls ASSERT and VERIFY from probe context. To assure that a failed + * ASSERT or VERIFY does not induce a markedly more catastrophic failure (e.g., + * one from which a dump cannot be gleaned), DTrace must define its own ASSERT + * and VERIFY macros to be ones that may safely be called from probe context. + * This header file must thus be included by any DTrace component that calls + * ASSERT and/or VERIFY from probe context, and _only_ by those components. + * (The only exception to this is kernel debugging infrastructure at user-level + * that doesn't depend on calling ASSERT.) */ #undef ASSERT +#undef VERIFY +#define VERIFY(EX) ((void)((EX) || \ + dtrace_assfail(#EX, __FILE__, __LINE__))) #ifdef DEBUG #define ASSERT(EX) ((void)((EX) || \ dtrace_assfail(#EX, __FILE__, __LINE__))) Modified: stable/10/tools/test/dtrace/Makefile ============================================================================== --- stable/10/tools/test/dtrace/Makefile Thu Feb 9 21:54:18 2017 (r313485) +++ stable/10/tools/test/dtrace/Makefile Thu Feb 9 22:04:56 2017 (r313486) @@ -59,7 +59,6 @@ IGNORE= \ ${TESTSRCDIR}/tst/common/proc/tst.discard.ksh \ ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh \ ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.c \ ${TESTSRCDIR}/tst/common/scalars/tst.misc.d \ ${TESTSRCDIR}/tst/common/scalars/tst.selfarray2.d \ ${TESTSRCDIR}/tst/common/sysevent/tst.post.c \ @@ -115,10 +114,6 @@ NOTWORK+= \ ${TESTSRCDIR}/tst/common/profile-n/tst.func.ksh \ ${TESTSRCDIR}/tst/common/profile-n/tst.mod.ksh \ ${TESTSRCDIR}/tst/common/profile-n/tst.sym.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.ufunc.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.umod.ksh \ - ${TESTSRCDIR}/tst/common/profile-n/tst.usym.ksh \ ${TESTSRCDIR}/tst/common/safety/tst.basename.d \ ${TESTSRCDIR}/tst/common/safety/tst.caller.d \ ${TESTSRCDIR}/tst/common/safety/tst.cleanpath.d \ From owner-svn-src-all@freebsd.org Thu Feb 9 22:14:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9490CD8968; Thu, 9 Feb 2017 22:14:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 958DB1D4B; Thu, 9 Feb 2017 22:14:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19MEHTG093371; Thu, 9 Feb 2017 22:14:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19MEHHN093368; Thu, 9 Feb 2017 22:14:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092214.v19MEHHN093368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 22:14: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: r313487 - in stable/10: etc/mtree lib/libpam/libpam lib/libpam/libpam/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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 22:14:18 -0000 Author: ngie Date: Thu Feb 9 22:14:17 2017 New Revision: 313487 URL: https://svnweb.freebsd.org/changeset/base/313487 Log: MFC r274138,r274149: r274138 (by des): Hook up OpenPAM's own unit tests to the build. r274149 (by markj): Create a directory for the PAM tests. Added: stable/10/lib/libpam/libpam/tests/ - copied from r274138, head/lib/libpam/libpam/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libpam/libpam/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Feb 9 22:04:56 2017 (r313486) +++ stable/10/etc/mtree/BSD.tests.dist Thu Feb 9 22:14:17 2017 (r313487) @@ -310,6 +310,8 @@ .. libnv .. + libpam + .. librt .. libthr Modified: stable/10/lib/libpam/libpam/Makefile ============================================================================== --- stable/10/lib/libpam/libpam/Makefile Thu Feb 9 22:04:56 2017 (r313486) +++ stable/10/lib/libpam/libpam/Makefile Thu Feb 9 22:14:17 2017 (r313487) @@ -198,4 +198,8 @@ DPSRCS= openpam_static.c INCS= ${HEADERS} ${ADD_HEADERS} INCSDIR= ${INCLUDEDIR}/security +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From owner-svn-src-all@freebsd.org Thu Feb 9 22:49:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87D06CD8298; Thu, 9 Feb 2017 22:49:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8D11061; Thu, 9 Feb 2017 22:49:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19MnvHX006205; Thu, 9 Feb 2017 22:49:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19MnmtK006121; Thu, 9 Feb 2017 22:49:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092249.v19MnmtK006121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 22:49: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: r313488 - in stable/10: bin/cat/tests bin/date/tests bin/expr/tests bin/ls/tests bin/mv/tests bin/pax/tests bin/pkill/tests bin/sh/tests bin/sleep/tests bin/test/tests bin/tests cddl/li... 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 22:49:58 -0000 Author: ngie Date: Thu Feb 9 22:49:48 2017 New Revision: 313488 URL: https://svnweb.freebsd.org/changeset/base/313488 Log: MFC r289172,r290254: r289172: Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity r290254: Remove unused variable (SRCDIR) Modified: stable/10/bin/cat/tests/Makefile stable/10/bin/date/tests/Makefile stable/10/bin/expr/tests/Makefile stable/10/bin/ls/tests/Makefile stable/10/bin/mv/tests/Makefile stable/10/bin/pax/tests/Makefile stable/10/bin/pkill/tests/Makefile stable/10/bin/sh/tests/Makefile stable/10/bin/sleep/tests/Makefile stable/10/bin/test/tests/Makefile stable/10/bin/tests/Makefile stable/10/cddl/lib/tests/Makefile stable/10/cddl/sbin/tests/Makefile stable/10/cddl/tests/Makefile stable/10/cddl/usr.bin/tests/Makefile stable/10/cddl/usr.sbin/dtrace/tests/Makefile stable/10/cddl/usr.sbin/tests/Makefile stable/10/gnu/lib/tests/Makefile stable/10/gnu/tests/Makefile stable/10/gnu/usr.bin/diff/tests/Makefile stable/10/gnu/usr.bin/tests/Makefile stable/10/lib/atf/libatf-c++/tests/Makefile stable/10/lib/atf/libatf-c++/tests/detail/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/atf/libatf-c/tests/detail/Makefile stable/10/lib/atf/tests/Makefile stable/10/lib/atf/tests/test-programs/Makefile stable/10/lib/libc/tests/Makefile stable/10/lib/libc/tests/Makefile.netbsd-tests stable/10/lib/libc/tests/c063/Makefile stable/10/lib/libc/tests/db/Makefile stable/10/lib/libc/tests/gen/Makefile stable/10/lib/libc/tests/gen/execve/Makefile stable/10/lib/libc/tests/gen/posix_spawn/Makefile stable/10/lib/libc/tests/hash/Makefile stable/10/lib/libc/tests/inet/Makefile stable/10/lib/libc/tests/locale/Makefile stable/10/lib/libc/tests/net/Makefile stable/10/lib/libc/tests/net/getaddrinfo/Makefile stable/10/lib/libc/tests/regex/Makefile stable/10/lib/libc/tests/rpc/Makefile stable/10/lib/libc/tests/setjmp/Makefile stable/10/lib/libc/tests/ssp/Makefile stable/10/lib/libc/tests/stdio/Makefile stable/10/lib/libc/tests/stdlib/Makefile stable/10/lib/libc/tests/string/Makefile stable/10/lib/libc/tests/sys/Makefile stable/10/lib/libc/tests/termios/Makefile stable/10/lib/libc/tests/time/Makefile stable/10/lib/libc/tests/tls/Makefile stable/10/lib/libc/tests/tls/dso/Makefile stable/10/lib/libc/tests/ttyio/Makefile stable/10/lib/libcrypt/tests/Makefile stable/10/lib/libmp/tests/Makefile stable/10/lib/libnv/tests/Makefile stable/10/lib/libpam/libpam/tests/Makefile stable/10/lib/librt/tests/Makefile stable/10/lib/libthr/tests/Makefile stable/10/lib/libthr/tests/dlopen/Makefile stable/10/lib/libthr/tests/dlopen/dso/Makefile stable/10/lib/libutil/tests/Makefile stable/10/lib/msun/tests/Makefile stable/10/lib/tests/Makefile stable/10/libexec/atf/atf-check/tests/Makefile stable/10/libexec/atf/atf-sh/tests/Makefile stable/10/libexec/atf/tests/Makefile stable/10/libexec/tests/Makefile stable/10/sbin/devd/tests/Makefile stable/10/sbin/dhclient/tests/Makefile stable/10/sbin/growfs/tests/Makefile stable/10/sbin/mdconfig/tests/Makefile stable/10/sbin/tests/Makefile stable/10/secure/lib/tests/Makefile stable/10/secure/libexec/tests/Makefile stable/10/secure/tests/Makefile stable/10/secure/usr.bin/tests/Makefile stable/10/secure/usr.sbin/tests/Makefile stable/10/share/examples/tests/Makefile stable/10/share/tests/Makefile stable/10/tests/etc/Makefile stable/10/tests/sys/mqueue/Makefile stable/10/tests/sys/pjdfstest/tests/Makefile stable/10/usr.bin/apply/tests/Makefile stable/10/usr.bin/basename/tests/Makefile stable/10/usr.bin/calendar/tests/Makefile stable/10/usr.bin/cmp/tests/Makefile stable/10/usr.bin/col/tests/Makefile stable/10/usr.bin/comm/tests/Makefile stable/10/usr.bin/cut/tests/Makefile stable/10/usr.bin/dirname/tests/Makefile stable/10/usr.bin/file2c/tests/Makefile stable/10/usr.bin/grep/tests/Makefile stable/10/usr.bin/gzip/tests/Makefile stable/10/usr.bin/join/tests/Makefile stable/10/usr.bin/jot/tests/Makefile stable/10/usr.bin/lastcomm/tests/Makefile stable/10/usr.bin/m4/tests/Makefile stable/10/usr.bin/ncal/tests/Makefile stable/10/usr.bin/printf/tests/Makefile stable/10/usr.bin/sed/tests/Makefile stable/10/usr.bin/tests/Makefile stable/10/usr.bin/truncate/tests/Makefile stable/10/usr.bin/uudecode/tests/Makefile stable/10/usr.bin/uuencode/tests/Makefile stable/10/usr.bin/xargs/tests/Makefile stable/10/usr.bin/yacc/tests/Makefile stable/10/usr.sbin/etcupdate/tests/Makefile stable/10/usr.sbin/fstyp/tests/Makefile stable/10/usr.sbin/newsyslog/tests/Makefile stable/10/usr.sbin/nmtree/tests/Makefile stable/10/usr.sbin/pw/tests/Makefile stable/10/usr.sbin/sa/tests/Makefile stable/10/usr.sbin/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cat/tests/Makefile ============================================================================== --- stable/10/bin/cat/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/cat/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR}/../../.. -SRCTOP= ${.CURDIR}/../../.. -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/cat - -TESTSDIR= ${TESTSBASE}/bin/cat - NETBSD_ATF_TESTS_SH= cat_test FILESDIR= ${TESTSDIR} Modified: stable/10/bin/date/tests/Makefile ============================================================================== --- stable/10/bin/date/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/date/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/date - ATF_TESTS_SH= format_string_test .include Modified: stable/10/bin/expr/tests/Makefile ============================================================================== --- stable/10/bin/expr/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/expr/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR}/../../.. -SRCTOP= ${.CURDIR}/../../.. -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/expr - -TESTSDIR= ${TESTSBASE}/bin/expr - NETBSD_ATF_TESTS_SH= expr_test ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g' Modified: stable/10/bin/ls/tests/Makefile ============================================================================== --- stable/10/bin/ls/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/ls/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/bin/ls - ATF_TESTS_SH+= ls_tests # This seems like overkill, but the idea in mind is that all of the testcases # should be runnable as !root Modified: stable/10/bin/mv/tests/Makefile ============================================================================== --- stable/10/bin/mv/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/mv/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/mv - TAP_TESTS_SH= legacy_test .include Modified: stable/10/bin/pax/tests/Makefile ============================================================================== --- stable/10/bin/pax/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/pax/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/pax - TAP_TESTS_PERL= legacy_test .include Modified: stable/10/bin/pkill/tests/Makefile ============================================================================== --- stable/10/bin/pkill/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/pkill/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/pkill - TAP_TESTS_SH= pgrep-F_test TAP_TESTS_SH+= pgrep-LF_test TAP_TESTS_SH+= pgrep-P_test Modified: stable/10/bin/sh/tests/Makefile ============================================================================== --- stable/10/bin/sh/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/sh/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/sh - TESTS_SUBDIRS+= builtins TESTS_SUBDIRS+= errors TESTS_SUBDIRS+= execution Modified: stable/10/bin/sleep/tests/Makefile ============================================================================== --- stable/10/bin/sleep/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/sleep/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,12 +1,7 @@ # $FreeBSD$ -TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/bin/sleep -.PATH: ${TESTSRC} - .include -TESTSDIR= ${TESTSBASE}/bin/sleep -ATF_TESTS_SH= sleep_test -ATF_TESTS_SH_SRC_sleep_test= t_sleep.sh +NETBSD_ATF_TESTS_SH= sleep_test .include Modified: stable/10/bin/test/tests/Makefile ============================================================================== --- stable/10/bin/test/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/test/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/test - TAP_TESTS_SH= legacy_test # Some tests in here are silently not run when the tests are executed as # root. Explicitly tell Kyua to drop privileges. Modified: stable/10/bin/tests/Makefile ============================================================================== --- stable/10/bin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/bin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/bin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/cddl/lib/tests/Makefile ============================================================================== --- stable/10/cddl/lib/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/cddl/lib/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/cddl/sbin/tests/Makefile ============================================================================== --- stable/10/cddl/sbin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/cddl/sbin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/cddl/tests/Makefile ============================================================================== --- stable/10/cddl/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/cddl/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/cddl/usr.bin/tests/Makefile ============================================================================== --- stable/10/cddl/usr.bin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/cddl/usr.bin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/cddl/usr.sbin/dtrace/tests/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/dtrace/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/cddl/usr.sbin/dtrace/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,10 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace TESTS_SUBDIRS+= common -.PATH: ${.CURDIR:H:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= YES .PATH: ${.CURDIR}/tools Modified: stable/10/cddl/usr.sbin/tests/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/cddl/usr.sbin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/gnu/lib/tests/Makefile ============================================================================== --- stable/10/gnu/lib/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/gnu/lib/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/gnu/tests/Makefile ============================================================================== --- stable/10/gnu/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/gnu/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/gnu/usr.bin/diff/tests/Makefile ============================================================================== --- stable/10/gnu/usr.bin/diff/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/gnu/usr.bin/diff/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,17 +1,14 @@ # $FreeBSD$ -TESTSRC= ${.CURDIR}/../../../../contrib/netbsd-tests/usr.bin/diff -.PATH: ${TESTSRC} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.bin/diff -.include - -TESTSDIR= ${TESTSBASE}/gnu/usr.bin/diff -ATF_TESTS_SH= diff_test +NETBSD_ATF_TESTS_SH= diff_test ATF_TESTS_SH_SED_diff_test= -e 's/t_diff/`basename $$0`/g' -ATF_TESTS_SH_SRC_diff_test= t_diff.sh FILESDIR= ${TESTSDIR} FILES+= d_mallocv1.in FILES+= d_mallocv2.in +.include + .include Modified: stable/10/gnu/usr.bin/tests/Makefile ============================================================================== --- stable/10/gnu/usr.bin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/gnu/usr.bin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/atf/libatf-c++/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,10 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++ TESTS_SUBDIRS= detail -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail Modified: stable/10/lib/atf/libatf-c++/tests/detail/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/tests/detail/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/atf/libatf-c++/tests/detail/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++/detail -ATF= ${.CURDIR:H:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c++/detail CFLAGS+= -DATF_C_TESTS_BASE='"${TESTSBASE}/lib/atf/libatf-c"' Modified: stable/10/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/atf/libatf-c/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,10 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c TESTS_SUBDIRS= detail -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail Modified: stable/10/lib/atf/libatf-c/tests/detail/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/detail/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/atf/libatf-c/tests/detail/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c/detail -ATF= ${.CURDIR:H:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c/detail CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"' Modified: stable/10/lib/atf/tests/Makefile ============================================================================== --- stable/10/lib/atf/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/atf/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes SUBDIR= test-programs Modified: stable/10/lib/atf/tests/test-programs/Makefile ============================================================================== --- stable/10/lib/atf/tests/test-programs/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/atf/tests/test-programs/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -5,7 +5,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf/test-programs KYUAFILE= yes -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/test-programs CFLAGS+= -I${ATF} Modified: stable/10/lib/libc/tests/Makefile ============================================================================== --- stable/10/lib/libc/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc - SUBDIR= tls_dso TESTS_SUBDIRS= c063 Modified: stable/10/lib/libc/tests/Makefile.netbsd-tests ============================================================================== --- stable/10/lib/libc/tests/Makefile.netbsd-tests Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/Makefile.netbsd-tests Thu Feb 9 22:49:48 2017 (r313488) @@ -1,8 +1,8 @@ # $FreeBSD$ -OBJTOP?= ${.OBJDIR:H:H:H:H} -SRCTOP?= ${.CURDIR:H:H:H:H} -TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/lib/libc/${.CURDIR:T} +TESTSRC:= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:C/libc\/tests/libc/} + +TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} WARNS?= 2 Modified: stable/10/lib/libc/tests/c063/Makefile ============================================================================== --- stable/10/lib/libc/tests/c063/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/c063/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/c063 - #TODO: t_o_search NETBSD_ATF_TESTS_C= faccessat_test Modified: stable/10/lib/libc/tests/db/Makefile ============================================================================== --- stable/10/lib/libc/tests/db/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/db/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/db - BINDIR= ${TESTSDIR} PROGS= h_db Modified: stable/10/lib/libc/tests/gen/Makefile ============================================================================== --- stable/10/lib/libc/tests/gen/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/gen/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen - ATF_TESTS_C+= arc4random_test ATF_TESTS_C+= fmtcheck2_test ATF_TESTS_C+= fmtmsg_test Modified: stable/10/lib/libc/tests/gen/execve/Makefile ============================================================================== --- stable/10/lib/libc/tests/gen/execve/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/gen/execve/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,13 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T} - .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen/execve - NETBSD_ATF_TESTS_C= execve_test .include "../../Makefile.netbsd-tests" Modified: stable/10/lib/libc/tests/gen/posix_spawn/Makefile ============================================================================== --- stable/10/lib/libc/tests/gen/posix_spawn/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/gen/posix_spawn/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,13 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T} - .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen/posix_spawn - BINDIR= ${TESTSDIR} NETBSD_ATF_TESTS_C= fileactions_test Modified: stable/10/lib/libc/tests/hash/Makefile ============================================================================== --- stable/10/lib/libc/tests/hash/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/hash/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/hash - NETBSD_ATF_TESTS_C= .if ${MK_OPENSSL} != "no" @@ -29,8 +27,8 @@ LDADD+= -lmd DPADD.sha2_test+= ${LIBCRYPTO} LDADD.sha2_test+= -lcrypto -CFLAGS.sha2_test+= -I${.CURDIR}/../../../../crypto/openssh/openbsd-compat -CFLAGS.sha2_test+= -I${.CURDIR}/../../../../crypto/openssh +CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh/openbsd-compat +CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh .include "../Makefile.netbsd-tests" Modified: stable/10/lib/libc/tests/inet/Makefile ============================================================================== --- stable/10/lib/libc/tests/inet/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/inet/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/inet - NETBSD_ATF_TESTS_C= inet_network_test .include "../Makefile.netbsd-tests" Modified: stable/10/lib/libc/tests/locale/Makefile ============================================================================== --- stable/10/lib/libc/tests/locale/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/locale/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/locale - ATF_TESTS_C+= btowc_test ATF_TESTS_C+= c16rtomb_test ATF_TESTS_C+= iswctype_test Modified: stable/10/lib/libc/tests/net/Makefile ============================================================================== --- stable/10/lib/libc/tests/net/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/net/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/net - ATF_TESTS_C+= ether_test ATF_TESTS_C+= eui64_aton_test ATF_TESTS_C+= eui64_ntoa_test Modified: stable/10/lib/libc/tests/net/getaddrinfo/Makefile ============================================================================== --- stable/10/lib/libc/tests/net/getaddrinfo/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/net/getaddrinfo/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,13 +1,9 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} .include -TESTSDIR= ${TESTSBASE}/lib/libc/net/getaddrinfo - BINDIR= ${TESTSDIR} .error "This testcase needs to be ported to FreeBSD (the output from getaddrinfo_test differs from NetBSD)" Modified: stable/10/lib/libc/tests/regex/Makefile ============================================================================== --- stable/10/lib/libc/tests/regex/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/regex/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,8 +4,6 @@ BINDIR= ${TESTSDIR} -TESTSDIR= ${TESTSBASE}/lib/libc/regex - IMPLEMENTATION?= -DREGEX_SPENCER CFLAGS.h_regex+=-I${TESTSRC} -I${.CURDIR:H:H}/regex Modified: stable/10/lib/libc/tests/rpc/Makefile ============================================================================== --- stable/10/lib/libc/tests/rpc/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/rpc/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,6 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/rpc SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} \ h_testbits.h Modified: stable/10/lib/libc/tests/setjmp/Makefile ============================================================================== --- stable/10/lib/libc/tests/setjmp/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/setjmp/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/setjmp - NETBSD_ATF_TESTS_C= setjmp_test NETBSD_ATF_TESTS_C+= threadjmp_test @@ -10,4 +8,6 @@ LDADD.threadjmp_test+= -lpthread WARNS?= 4 +.include "../Makefile.netbsd-tests" + .include Modified: stable/10/lib/libc/tests/ssp/Makefile ============================================================================== --- stable/10/lib/libc/tests/ssp/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/ssp/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/ssp - NO_WERROR= WARNS?= 2 Modified: stable/10/lib/libc/tests/stdio/Makefile ============================================================================== --- stable/10/lib/libc/tests/stdio/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/stdio/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/stdio - ATF_TESTS_C+= fdopen_test ATF_TESTS_C+= fmemopen2_test ATF_TESTS_C+= fopen2_test Modified: stable/10/lib/libc/tests/stdlib/Makefile ============================================================================== --- stable/10/lib/libc/tests/stdlib/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/stdlib/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -10,8 +10,6 @@ ATF_TESTS_CXX+= cxa_thread_atexit_test ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test .endif -TESTSDIR= ${TESTSBASE}/lib/libc/stdlib - # TODO: t_getenv_thread, t_mi_vector_hash NETBSD_ATF_TESTS_C+= abs_test NETBSD_ATF_TESTS_C+= atoi_test Modified: stable/10/lib/libc/tests/string/Makefile ============================================================================== --- stable/10/lib/libc/tests/string/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/string/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -5,8 +5,6 @@ ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= wcscasecmp_test ATF_TESTS_C+= wcsnlen_test -TESTSDIR= ${TESTSBASE}/lib/libc/string - # TODO: popcount, stresep NETBSD_ATF_TESTS_C+= memchr_test Modified: stable/10/lib/libc/tests/sys/Makefile ============================================================================== --- stable/10/lib/libc/tests/sys/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/sys/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/sys - ATF_TESTS_C+= queue_test # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, Modified: stable/10/lib/libc/tests/termios/Makefile ============================================================================== --- stable/10/lib/libc/tests/termios/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/termios/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/termios - NETBSD_ATF_TESTS_C= tcsetpgrp_test .include "../Makefile.netbsd-tests" Modified: stable/10/lib/libc/tests/time/Makefile ============================================================================== --- stable/10/lib/libc/tests/time/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/time/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/time - NETBSD_ATF_TESTS_C= mktime_test NETBSD_ATF_TESTS_C+= strptime_test Modified: stable/10/lib/libc/tests/tls/Makefile ============================================================================== --- stable/10/lib/libc/tests/tls/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/tls/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,7 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/tls .if !defined(NO_PIC) SUBDIR+= dso .endif Modified: stable/10/lib/libc/tests/tls/dso/Makefile ============================================================================== --- stable/10/lib/libc/tests/tls/dso/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/tls/dso/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,6 @@ # $FreeBSD$ OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/tls/${.CURDIR:T} LIB= h_tls_dlopen Modified: stable/10/lib/libc/tests/ttyio/Makefile ============================================================================== --- stable/10/lib/libc/tests/ttyio/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libc/tests/ttyio/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/ttyio - # TODO: ptm_test NETBSD_ATF_TESTS_C= ttyio_test Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libcrypt/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,8 +4,6 @@ SRCTOP= ${.CURDIR:H:H:H} OBJTOP= ${.OBJDIR:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libcrypt -TESTSDIR= ${TESTSBASE}/lib/libcrypt - NETBSD_ATF_TESTS_C+= crypt_test CFLAGS+= -I${.CURDIR:H} Modified: stable/10/lib/libmp/tests/Makefile ============================================================================== --- stable/10/lib/libmp/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libmp/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libmp - TAP_TESTS_C+= legacy_test DPADD+= ${LIBCRYPTO} ${LIBMP} Modified: stable/10/lib/libnv/tests/Makefile ============================================================================== --- stable/10/lib/libnv/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libnv/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libnv - ATF_TESTS_CXX= \ dnv_tests \ nv_tests \ Modified: stable/10/lib/libpam/libpam/tests/Makefile ============================================================================== --- stable/10/lib/libpam/libpam/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libpam/libpam/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,6 +1,6 @@ # $FreeBSD$ -OPENPAM = ${.CURDIR}/../../../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/t TESTSDIR = ${TESTSBASE}/lib/libpam Modified: stable/10/lib/librt/tests/Makefile ============================================================================== --- stable/10/lib/librt/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/librt/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H} -SRCTOP= ${.CURDIR:H:H:H} -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/librt - -TESTSDIR= ${TESTSBASE}/lib/librt - DPADD+= ${LIBRT} LDADD+= -lrt Modified: stable/10/lib/libthr/tests/Makefile ============================================================================== --- stable/10/lib/libthr/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libthr/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,11 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H} -SRCTOP= ${.CURDIR:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread -TESTSDIR= ${TESTSBASE}/lib/libthr - # TODO: t_name (missing pthread_getname_np support in FreeBSD) NETBSD_ATF_TESTS_C= barrier_test NETBSD_ATF_TESTS_C+= cond_test Modified: stable/10/lib/libthr/tests/dlopen/Makefile ============================================================================== --- stable/10/lib/libthr/tests/dlopen/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libthr/tests/dlopen/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen .include Modified: stable/10/lib/libthr/tests/dlopen/dso/Makefile ============================================================================== --- stable/10/lib/libthr/tests/dlopen/dso/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libthr/tests/dlopen/dso/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso SHLIB= h_pthread_dlopen Modified: stable/10/lib/libutil/tests/Makefile ============================================================================== --- stable/10/lib/libutil/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/libutil/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libutil - TAP_TESTS_C+= flopen_test TAP_TESTS_C+= grp_test TAP_TESTS_C+= humanize_number_test Modified: stable/10/lib/msun/tests/Makefile ============================================================================== --- stable/10/lib/msun/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/msun/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,11 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H} -SRCTOP= ${.CURDIR:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm -TESTSDIR= ${TESTSBASE}/lib/msun - # All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H Modified: stable/10/lib/tests/Makefile ============================================================================== --- stable/10/lib/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/lib/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/lib - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/libexec/atf/atf-check/tests/Makefile ============================================================================== --- stable/10/libexec/atf/atf-check/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/libexec/atf/atf-check/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf/atf-check - -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh ATF_TESTS_SH= atf-check_test Modified: stable/10/libexec/atf/atf-sh/tests/Makefile ============================================================================== --- stable/10/libexec/atf/atf-sh/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/libexec/atf/atf-sh/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf/atf-sh - -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh ATF_TESTS_SH+= atf_check_test Modified: stable/10/libexec/atf/tests/Makefile ============================================================================== --- stable/10/libexec/atf/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/libexec/atf/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/libexec/tests/Makefile ============================================================================== --- stable/10/libexec/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/libexec/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/sbin/devd/tests/Makefile ============================================================================== --- stable/10/sbin/devd/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/sbin/devd/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/devd - ATF_TESTS_C= client_test TEST_METADATA.client_test= required_programs="devd" TEST_METADATA.client_test+= required_user="root" Modified: stable/10/sbin/dhclient/tests/Makefile ============================================================================== --- stable/10/sbin/dhclient/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/sbin/dhclient/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/dhclient - .PATH: ${.CURDIR}/.. PLAIN_TESTS_C= option-domain-search_test Modified: stable/10/sbin/growfs/tests/Makefile ============================================================================== --- stable/10/sbin/growfs/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/sbin/growfs/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/growfs - TAP_TESTS_PERL= legacy_test .include Modified: stable/10/sbin/mdconfig/tests/Makefile ============================================================================== --- stable/10/sbin/mdconfig/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/sbin/mdconfig/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,10 +1,7 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/mdconfig - ATF_TESTS_SH= mdconfig_test - TEST_METADATA.mdconfig_test+= required_user="root" .include Modified: stable/10/sbin/tests/Makefile ============================================================================== --- stable/10/sbin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/sbin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/sbin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/secure/lib/tests/Makefile ============================================================================== --- stable/10/secure/lib/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/secure/lib/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/secure/libexec/tests/Makefile ============================================================================== --- stable/10/secure/libexec/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/secure/libexec/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/libexec - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/secure/tests/Makefile ============================================================================== --- stable/10/secure/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/secure/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/secure/usr.bin/tests/Makefile ============================================================================== --- stable/10/secure/usr.bin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/secure/usr.bin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/secure/usr.sbin/tests/Makefile ============================================================================== --- stable/10/secure/usr.sbin/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/secure/usr.sbin/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/usr.sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/share/examples/tests/Makefile ============================================================================== --- stable/10/share/examples/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/share/examples/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -2,11 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/share/examples - SUBDIR= tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes -.PATH: ${.CURDIR:H:H:H}/tests .include Modified: stable/10/share/tests/Makefile ============================================================================== --- stable/10/share/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/share/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/share -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: stable/10/tests/etc/Makefile ============================================================================== --- stable/10/tests/etc/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/tests/etc/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/etc -.PATH: ${.CURDIR:H} +.PATH: ${SRCTOP}/tests KYUAFILE= yes SUBDIR+= rc.d Modified: stable/10/tests/sys/mqueue/Makefile ============================================================================== --- stable/10/tests/sys/mqueue/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/tests/sys/mqueue/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -6,7 +6,7 @@ ATF_TESTS_SH= mqueue_test BINDIR= ${TESTSDIR} -CFLAGS+= -I${.CURDIR:H:H} +CFLAGS+= -I${SRCTOP}/tests PROGS+= mqtest1 PROGS+= mqtest2 Modified: stable/10/tests/sys/pjdfstest/tests/Makefile ============================================================================== --- stable/10/tests/sys/pjdfstest/tests/Makefile Thu Feb 9 22:14:17 2017 (r313487) +++ stable/10/tests/sys/pjdfstest/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) @@ -1,6 +1,6 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 9 22:57:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E2E6CD84C2; Thu, 9 Feb 2017 22:57:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6FEA15F4; Thu, 9 Feb 2017 22:57:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19Mvvde010573; Thu, 9 Feb 2017 22:57:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19MvuxC010569; Thu, 9 Feb 2017 22:57:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702092257.v19MvuxC010569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 9 Feb 2017 22:57: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: r313489 - in stable/10: contrib/netbsd-tests/lib/libc/setjmp etc/mtree lib/libc/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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 22:57:58 -0000 Author: ngie Date: Thu Feb 9 22:57:56 2017 New Revision: 313489 URL: https://svnweb.freebsd.org/changeset/base/313489 Log: MFC r296586: r296586 (by bdrewery): Fix and connect setjmp test. Modified: stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libc/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c Thu Feb 9 22:49:48 2017 (r313488) +++ stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c Thu Feb 9 22:57:56 2017 (r313489) @@ -87,7 +87,7 @@ __RCSID("$NetBSD: t_setjmp.c,v 1.1 2010/ static int expectsignal; static void -aborthandler(int signo) +aborthandler(int signo __unused) { ATF_REQUIRE_MSG(expectsignal, "kill(SIGABRT) succeeded"); atf_tc_pass(); Modified: stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c Thu Feb 9 22:49:48 2017 (r313488) +++ stable/10/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c Thu Feb 9 22:57:56 2017 (r313489) @@ -91,7 +91,7 @@ static pthread_t myself = NULL; static int expectsignal; static void -aborthandler(int signo) +aborthandler(int signo __unused) { ATF_REQUIRE(myself == pthread_self()); ATF_REQUIRE_MSG(expectsignal, "kill(SIGABRT) succeeded"); Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Feb 9 22:49:48 2017 (r313488) +++ stable/10/etc/mtree/BSD.tests.dist Thu Feb 9 22:57:56 2017 (r313489) @@ -285,6 +285,8 @@ .. ssp .. + setjmp + .. stdio .. stdlib Modified: stable/10/lib/libc/tests/Makefile ============================================================================== --- stable/10/lib/libc/tests/Makefile Thu Feb 9 22:49:48 2017 (r313488) +++ stable/10/lib/libc/tests/Makefile Thu Feb 9 22:57:56 2017 (r313489) @@ -15,6 +15,7 @@ TESTS_SUBDIRS+= nss TESTS_SUBDIRS+= regex TESTS_SUBDIRS+= resolv TESTS_SUBDIRS+= rpc +TESTS_SUBDIRS+= setjmp TESTS_SUBDIRS+= stdio TESTS_SUBDIRS+= stdlib TESTS_SUBDIRS+= string From owner-svn-src-all@freebsd.org Thu Feb 9 23:15:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FE22CD8C3B; Thu, 9 Feb 2017 23:15:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1930E2A9; Thu, 9 Feb 2017 23:15:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NFCKm018437; Thu, 9 Feb 2017 23:15:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NFC9I018435; Thu, 9 Feb 2017 23:15:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092315.v19NFC9I018435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313490 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:15:13 -0000 Author: adrian Date: Thu Feb 9 23:15:11 2017 New Revision: 313490 URL: https://svnweb.freebsd.org/changeset/base/313490 Log: [ath] initial station side quiet IE support. This implements hardware assisted quiet IE support. Quiet time is an optional interval on DFS channels (but doesn't have to be DFS only channels! sigh) where the station and AP can be quiet in order to allow for channel utilisation measurements. Typically that's stuff like radar detection, spectral scan, other-BSS frame sniffing, checking how busy the air is, etc. The hardware implements it as one of the generic timers, which is supplied a period, offset from the trigger period and duration to stay quiet. The AP can announce quiet time configurations which change, and so this code also tracks that. Implementation details: * track the current quiet time IE * compare the new one against the previous one - if only the TBTT counter changes, don't update things * If tbttcount=1 then program it into the hardware - that is when it is easiest to program the correct starting offset (one TBTT + configured offset). * .. later on check to see if it can be done on any tbttcount * If the IE goes away then remove the quiet timer and clear the config * Upon reset, state change, new beacon - clear quiet time IE and just let it resync from the next beacon. History: This was work done initially by sibridgetech.com in 2011/2012/2013 as part of some FreeBSD wifi DFS contracting work they had for a third party. They implemented the net80211 quiet time IE pieces and had some test code for the station side which didn't entirely use the timers correctly. I figured out how to use the timers correctly without stopping/starting the transmit DMA engine each time. When done correctly, the timer just needs to be programmed once and left alone until the next configuration change. So, thanks to Himali Patel and Parthiv Shah for their work way back then. I finally figured it out and finished it! TODO: * Now, I'd rather net80211 did the quiet time IE tracking and parsing, pushing configurations into the driver is needed. I'll look at doing that in a subsequent update. * This doesn't handle multiple quiet time IEs, which will currently just mess things up. I'll look into supporting that in the future (at least by only obeying "one" of them, and then ignoring subsequent IEs in a beacon/probe frame.) * This also implements the STA side and not the AP side - the AP side will come later, and involves taking various other intervals into account (eg the beacon offset for multi-VAP modes, the SWBA time, etc, etc) as well as obtaining the configuration when a beacon is configured/generated rather than "hearing" an IE. * .. investigate supporting quiet IE in mesh, tdma, ibss modes * .. investigate supporting quiet IE for non-DFS channels (so this can be done for say, 2GHz channels.) * Chances are i should commit NULL methods for the ar5210, ar5211 HALs.. Tested: * AR9380, STA mode - announcing quiet, removing quiet, changing quite time config, whilst doing iperf testing; * AR9380, AP mode. 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 Thu Feb 9 22:57:56 2017 (r313489) +++ head/sys/dev/ath/if_ath.c Thu Feb 9 23:15:11 2017 (r313490) @@ -199,6 +199,7 @@ static void ath_set_channel(struct ieee8 #ifdef ATH_ENABLE_11N static void ath_update_chw(struct ieee80211com *); #endif /* ATH_ENABLE_11N */ +static int ath_set_quiet_ie(struct ieee80211_node *, uint8_t *); static void ath_calibrate(void *); static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void ath_setup_stationkey(struct ieee80211_node *); @@ -1325,6 +1326,7 @@ ath_attach(u_int16_t devid, struct ath_s ic->ic_update_chw = ath_update_chw; #endif /* ATH_ENABLE_11N */ + ic->ic_set_quiet = ath_set_quiet_ie; #ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT /* @@ -2523,6 +2525,20 @@ ath_settkipmic(struct ath_softc *sc) } } +static void +ath_vap_clear_quiet_ie(struct ath_softc *sc) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap; + struct ath_vap *avp; + + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + avp = ATH_VAP(vap); + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + } +} + static int ath_init(struct ath_softc *sc) { @@ -2569,6 +2585,9 @@ ath_init(struct ath_softc *sc) sc->sc_rx_resetted = 1; ATH_RX_UNLOCK(sc); + /* Clear quiet IE state for each VAP */ + ath_vap_clear_quiet_ie(sc); + ath_chan_change(sc, ic->ic_curchan); /* Let DFS at it in case it's a DFS channel */ @@ -2950,6 +2969,9 @@ ath_reset(struct ath_softc *sc, ATH_RESE sc->sc_rx_resetted = 1; ATH_RX_UNLOCK(sc); + /* Quiet time handling - ensure we resync */ + ath_vap_clear_quiet_ie(sc); + /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, ic->ic_curchan); @@ -4157,9 +4179,12 @@ ath_tx_update_stats(struct ath_softc *sc sc->sc_ant_tx[txant]++; if (ts->ts_finaltsi != 0) sc->sc_stats.ast_tx_altrate++; + + /* XXX TODO: should do per-pri conuters */ pri = M_WME_GETAC(bf->bf_m); if (pri >= WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; + if ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) ni->ni_inact = ni->ni_inact_reload; } else { @@ -5243,6 +5268,9 @@ ath_chan_set(struct ath_softc *sc, struc sc->sc_rx_resetted = 1; ATH_RX_UNLOCK(sc); + /* Quiet time handling - ensure we resync */ + ath_vap_clear_quiet_ie(sc); + /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, chan); @@ -5516,11 +5544,154 @@ ath_update_chw(struct ieee80211com *ic) { struct ath_softc *sc = ic->ic_softc; - DPRINTF(sc, ATH_DEBUG_STATE, "%s: called\n", __func__); + //DPRINTF(sc, ATH_DEBUG_STATE, "%s: called\n", __func__); + device_printf(sc->sc_dev, "%s: called\n", __func__); + + /* + * XXX TODO: schedule a tasklet that stops things without freeing, + * walks the now stopped TX queue(s) looking for frames to retry + * as if we TX filtered them (whch may mean dropping non-ampdu frames!) + * but okay) then place them back on the software queue so they + * can have the rate control lookup done again. + */ ath_set_channel(ic); } #endif /* ATH_ENABLE_11N */ +/* + * This is called by the beacon parsing routine in the receive + * path to update the current quiet time information provided by + * an AP. + * + * This is STA specific, it doesn't take the AP TBTT/beacon slot + * offset into account. + * + * The quiet IE doesn't control the /now/ beacon interval - it + * controls the upcoming beacon interval. So, when tbtt=1, + * the quiet element programming shall be for the next beacon + * interval. There's no tbtt=0 behaviour defined, so don't. + * + * Since we're programming the next quiet interval, we have + * to keep in mind what we will see when the next beacon + * is received with potentially a quiet IE. For example, if + * quiet_period is 1, then we are always getting a quiet interval + * each TBTT - so if we just program it in upon each beacon received, + * it will constantly reflect the "next" TBTT and we will never + * let the counter stay programmed correctly. + * + * So: + * + the first time we see the quiet IE, program it and store + * the details somewhere; + * + if the quiet parameters don't change (ie, period/duration/offset) + * then just leave the programming enabled; + * + (we can "skip" beacons, so don't try to enforce tbttcount unless + * you're willing to also do the skipped beacon math); + * + if the quiet IE is removed, then halt quiet time. + */ +static int +ath_set_quiet_ie(struct ieee80211_node *ni, uint8_t *ie) +{ + struct ieee80211_quiet_ie *q; + struct ieee80211vap *vap = ni->ni_vap; + struct ath_vap *avp = ATH_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct ath_softc *sc = ic->ic_softc; + + if (vap->iv_opmode != IEEE80211_M_STA) + return (0); + + /* Verify we have a quiet time IE */ + if (ie == NULL) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: called; NULL IE, disabling\n", __func__); + + ath_hal_set_quiet(sc->sc_ah, 0, 0, 0, HAL_QUIET_DISABLE); + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + return (0); + } + + /* If we do, verify it's actually legit */ + if (ie[0] != IEEE80211_ELEMID_QUIET) + return 0; + if (ie[1] != 6) + return 0; + + /* Note: this belongs in net80211, parsed out and everything */ + q = (void *) ie; + + /* + * Compare what we have stored to what we last saw. + * If they're the same then don't program in anything. + */ + if ((q->period == avp->quiet_ie.period) && + (le16dec(&q->duration) == le16dec(&avp->quiet_ie.duration)) && + (le16dec(&q->offset) == le16dec(&avp->quiet_ie.offset))) + return (0); + + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: called; tbttcount=%d, period=%d, duration=%d, offset=%d\n", + __func__, + (int) q->tbttcount, + (int) q->period, + (int) le16dec(&q->duration), + (int) le16dec(&q->offset)); + + /* + * Don't program in garbage values. + */ + if ((le16dec(&q->duration) == 0) || + (le16dec(&q->duration) >= ni->ni_intval)) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid duration (%d)\n", __func__, + le16dec(&q->duration)); + return (0); + } + /* + * Can have a 0 offset, but not a duration - so just check + * they don't exceed the intval. + */ + if (le16dec(&q->duration) + le16dec(&q->offset) >= ni->ni_intval) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid duration + offset (%d+%d)\n", __func__, + le16dec(&q->duration), + le16dec(&q->offset)); + return (0); + } + if (q->tbttcount == 0) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid tbttcount (0)\n", __func__); + return (0); + } + if (q->period == 0) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: invalid period (0)\n", __func__); + return (0); + } + + /* + * This is a new quiet time IE config, so wait until tbttcount + * is equal to 1, and program it in. + */ + if (q->tbttcount == 1) { + DPRINTF(sc, ATH_DEBUG_QUIETIE, + "%s: programming\n", __func__); + ath_hal_set_quiet(sc->sc_ah, + q->period * ni->ni_intval, /* convert to TU */ + le16dec(&q->duration), /* already in TU */ + le16dec(&q->offset) + ni->ni_intval, + HAL_QUIET_ENABLE | HAL_QUIET_ADD_CURRENT_TSF); + /* + * Note: no HAL_QUIET_ADD_SWBA_RESP_TIME; as this is for + * STA mode + */ + + /* Update local state */ + memcpy(&avp->quiet_ie, ie, sizeof(struct ieee80211_quiet_ie)); + } + + return (0); +} + static void ath_set_channel(struct ieee80211com *ic) { @@ -5826,6 +5997,9 @@ ath_newstate(struct ieee80211vap *vap, e "%s: STA; syncbeacon=1\n", __func__); sc->sc_syncbeacon = 1; + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + if (csa_run_transition) ath_beacon_config(sc, vap); @@ -5891,6 +6065,10 @@ ath_newstate(struct ieee80211vap *vap, e taskqueue_unblock(sc->sc_tq); } else if (nstate == IEEE80211_S_INIT) { + + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + /* * If there are no vaps left in RUN state then * shutdown host/driver operation: @@ -5934,6 +6112,9 @@ ath_newstate(struct ieee80211vap *vap, e } ATH_UNLOCK(sc); } + } else if (nstate == IEEE80211_S_SCAN) { + /* Quiet time handling - ensure we resync */ + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); } bad: ieee80211_free_node(ni); Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Thu Feb 9 22:57:56 2017 (r313489) +++ head/sys/dev/ath/if_ath_beacon.c Thu Feb 9 23:15:11 2017 (r313490) @@ -761,6 +761,12 @@ ath_beacon_generate(struct ath_softc *sc bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_PREWRITE); /* + * XXX TODO: tie into net80211 for quiet time IE update and program + * local AP timer if we require it. The process of updating the + * beacon will also update the IE with the relevant counters. + */ + + /* * Enable the CAB queue before the beacon queue to * insure cab frames are triggered by this beacon. */ @@ -917,6 +923,7 @@ ath_beacon_config(struct ath_softc *sc, ((((u_int32_t)(_h)) << 22) | (((u_int32_t)(_l)) >> 10)) #define FUDGE 2 struct ath_hal *ah = sc->sc_ah; + struct ath_vap *avp; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; u_int32_t nexttbtt, intval, tsftu; @@ -935,12 +942,19 @@ ath_beacon_config(struct ath_softc *sc, return; } + /* Now that we have a vap, we can do this bit */ + avp = ATH_VAP(vap); + ni = ieee80211_ref_node(vap->iv_bss); ATH_LOCK(sc); ath_power_set_power_state(sc, HAL_PM_AWAKE); ATH_UNLOCK(sc); + /* Always clear the quiet IE timers; let the next update program them */ + ath_hal_set_quiet(ah, 0, 0, 0, HAL_QUIET_DISABLE); + memset(&avp->quiet_ie, 0, sizeof(avp->quiet_ie)); + /* extract tstamp from last beacon and convert to TU */ nexttbtt = TSF_TO_TU(le32dec(ni->ni_tstamp.data + 4), le32dec(ni->ni_tstamp.data)); From owner-svn-src-all@freebsd.org Thu Feb 9 23:20:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1C7DCD8CEF; Thu, 9 Feb 2017 23:20:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2BC475F; Thu, 9 Feb 2017 23:20:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NKti4020774; Thu, 9 Feb 2017 23:20:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NKtHi020768; Thu, 9 Feb 2017 23:20:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092320.v19NKtHi020768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313491 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:20:57 -0000 Author: adrian Date: Thu Feb 9 23:20:55 2017 New Revision: 313491 URL: https://svnweb.freebsd.org/changeset/base/313491 Log: [ath_hal] implement NULL methods for ah_setQuiet for AR5210, AR5211. Tested: * "crap, I didn't bring my cardbus collection and T400 with me" compile tested. Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c head/sys/dev/ath/ath_hal/ar5211/ar5211.h head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210.h Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210.h Thu Feb 9 23:20:55 2017 (r313491) @@ -251,6 +251,8 @@ extern HAL_BOOL ar5210SetCTSTimeout(stru extern u_int ar5210GetCTSTimeout(struct ath_hal *); extern HAL_BOOL ar5210SetDecompMask(struct ath_hal *, uint16_t, int); void ar5210SetCoverageClass(struct ath_hal *, uint8_t, int); +extern HAL_STATUS ar5210SetQuiet(struct ath_hal *, uint32_t, uint32_t, + uint32_t, HAL_QUIET_FLAG); extern HAL_STATUS ar5210GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t *); extern HAL_BOOL ar5210SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Thu Feb 9 23:20:55 2017 (r313491) @@ -135,6 +135,7 @@ static const struct ath_hal_private ar52 .ah_getCTSTimeout = ar5210GetCTSTimeout, .ah_setDecompMask = ar5210SetDecompMask, .ah_setCoverageClass = ar5210SetCoverageClass, + .ah_setQuiet = ar5210SetQuiet, .ah_get11nExtBusy = ar5210Get11nExtBusy, .ah_getMibCycleCounts = ar5210GetMibCycleCounts, .ah_setChainMasks = ar5210SetChainMasks, Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Thu Feb 9 23:20:55 2017 (r313491) @@ -552,6 +552,13 @@ ar5210SetCoverageClass(struct ath_hal *a { } +HAL_STATUS +ar5210SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, + uint32_t next_start, HAL_QUIET_FLAG flags) +{ + return HAL_OK; +} + /* * Control Adaptive Noise Immunity Parameters */ Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211.h Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211.h Thu Feb 9 23:20:55 2017 (r313491) @@ -271,6 +271,8 @@ extern HAL_BOOL ar5211SetSifsTime(struct extern u_int ar5211GetSifsTime(struct ath_hal *); extern HAL_BOOL ar5211SetDecompMask(struct ath_hal *, uint16_t, int); extern void ar5211SetCoverageClass(struct ath_hal *, uint8_t, int); +extern HAL_STATUS ar5211SetQuiet(struct ath_hal *, uint32_t, uint32_t, + uint32_t, HAL_QUIET_FLAG); extern uint32_t ar5211GetCurRssi(struct ath_hal *); extern u_int ar5211GetDefAntenna(struct ath_hal *); extern void ar5211SetDefAntenna(struct ath_hal *ah, u_int antenna); Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Thu Feb 9 23:20:55 2017 (r313491) @@ -135,6 +135,7 @@ static const struct ath_hal_private ar52 .ah_getCTSTimeout = ar5211GetCTSTimeout, .ah_setDecompMask = ar5211SetDecompMask, .ah_setCoverageClass = ar5211SetCoverageClass, + .ah_setQuiet = ar5211SetQuiet, .ah_get11nExtBusy = ar5211Get11nExtBusy, .ah_getMibCycleCounts = ar5211GetMibCycleCounts, .ah_setChainMasks = ar5211SetChainMasks, Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Thu Feb 9 23:15:11 2017 (r313490) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Thu Feb 9 23:20:55 2017 (r313491) @@ -554,6 +554,13 @@ ar5211SetCoverageClass(struct ath_hal *a { } +HAL_STATUS +ar5211SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, + uint32_t next_start, HAL_QUIET_FLAG flags) +{ + return HAL_OK; +} + /* * Control Adaptive Noise Immunity Parameters */ From owner-svn-src-all@freebsd.org Thu Feb 9 23:29:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9800CCD8FF4; Thu, 9 Feb 2017 23:29:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6519FCAD; Thu, 9 Feb 2017 23:29:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NTvaB022605; Thu, 9 Feb 2017 23:29:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NTvpu022604; Thu, 9 Feb 2017 23:29:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092329.v19NTvpu022604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313492 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:29:58 -0000 Author: adrian Date: Thu Feb 9 23:29:57 2017 New Revision: 313492 URL: https://svnweb.freebsd.org/changeset/base/313492 Log: [net80211] don't bother doing fragmentation if the driver supports fragmentation offload. Tested: * ath10k, which does its own fragmentation in firmware. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Feb 9 23:20:55 2017 (r313491) +++ head/sys/net80211/ieee80211_output.c Thu Feb 9 23:29:57 2017 (r313492) @@ -1631,12 +1631,20 @@ ieee80211_encap(struct ieee80211vap *vap __func__); } + /* + * Check if xmit fragmentation is required. + * + * If the hardware does fragmentation offload, then don't bother + * doing it here. + */ + if (IEEE80211_CONF_FRAG_OFFLOAD(ic)) + txfrag = 0; + else + txfrag = (m->m_pkthdr.len > vap->iv_fragthreshold && + !IEEE80211_IS_MULTICAST(wh->i_addr1) && + (vap->iv_caps & IEEE80211_C_TXFRAG) && + (m->m_flags & (M_FF | M_AMPDU_MPDU)) == 0); - /* check if xmit fragmentation is required */ - txfrag = (m->m_pkthdr.len > vap->iv_fragthreshold && - !IEEE80211_IS_MULTICAST(wh->i_addr1) && - (vap->iv_caps & IEEE80211_C_TXFRAG) && - (m->m_flags & (M_FF | M_AMPDU_MPDU)) == 0); if (key != NULL) { /* * IEEE 802.1X: send EAPOL frames always in the clear. From owner-svn-src-all@freebsd.org Thu Feb 9 23:32:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0F49CD818B; Thu, 9 Feb 2017 23:32:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0C55F13; Thu, 9 Feb 2017 23:32:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NW3vD024349; Thu, 9 Feb 2017 23:32:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NW3n2024348; Thu, 9 Feb 2017 23:32:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092332.v19NW3n2024348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313493 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:32:05 -0000 Author: kib Date: Thu Feb 9 23:32:03 2017 New Revision: 313493 URL: https://svnweb.freebsd.org/changeset/base/313493 Log: Define ELF_ST_VISIBILITY(). Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/sys/elf_generic.h Modified: head/sys/sys/elf_generic.h ============================================================================== --- head/sys/sys/elf_generic.h Thu Feb 9 23:29:57 2017 (r313492) +++ head/sys/sys/elf_generic.h Thu Feb 9 23:32:03 2017 (r313493) @@ -84,5 +84,6 @@ __ElfType(Ssize); #define ELF_ST_BIND __ELFN(ST_BIND) #define ELF_ST_TYPE __ELFN(ST_TYPE) #define ELF_ST_INFO __ELFN(ST_INFO) +#define ELF_ST_VISIBILITY __ELFN(ST_VISIBILITY) #endif /* !_SYS_ELF_GENERIC_H_ */ From owner-svn-src-all@freebsd.org Thu Feb 9 23:33:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7938BCD820C; Thu, 9 Feb 2017 23:33:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48F2311C1; Thu, 9 Feb 2017 23:33:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NX6TU026724; Thu, 9 Feb 2017 23:33:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NX6Ll026723; Thu, 9 Feb 2017 23:33:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092333.v19NX6Ll026723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313494 - head/libexec/rtld-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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:33:07 -0000 Author: kib Date: Thu Feb 9 23:33:06 2017 New Revision: 313494 URL: https://svnweb.freebsd.org/changeset/base/313494 Log: Handle protected symbols in rtld. Protected symbol reference in GOT of the defining object must be resolved to itself, same as -Bsymbolic globally. Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D9317 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Feb 9 23:32:03 2017 (r313493) +++ head/libexec/rtld-elf/rtld.c Thu Feb 9 23:33:06 2017 (r313494) @@ -3957,15 +3957,19 @@ symlook_default(SymLook *req, const Obj_ donelist_init(&donelist); symlook_init_from_req(&req1, req); - /* Look first in the referencing object if linked symbolically. */ - if (refobj->symbolic && !donelist_check(&donelist, refobj)) { - res = symlook_obj(&req1, refobj); - if (res == 0) { - req->sym_out = req1.sym_out; - req->defobj_out = req1.defobj_out; - assert(req->defobj_out != NULL); - } + /* + * Look first in the referencing object if linked symbolically, + * and similarly handle protected symbols. + */ + res = symlook_obj(&req1, refobj); + if (res == 0 && (refobj->symbolic || + ELF_ST_VISIBILITY(req1.sym_out->st_other) == STV_PROTECTED)) { + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); } + if (refobj->symbolic || req->defobj_out != NULL) + donelist_check(&donelist, refobj); symlook_global(req, &donelist); From owner-svn-src-all@freebsd.org Thu Feb 9 23:35:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F301DCD82C6; Thu, 9 Feb 2017 23:35:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62DC1360; Thu, 9 Feb 2017 23:35:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NZvtE026870; Thu, 9 Feb 2017 23:35:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NZvSQ026869; Thu, 9 Feb 2017 23:35:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092335.v19NZvSQ026869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313495 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:35:59 -0000 Author: kib Date: Thu Feb 9 23:35:57 2017 New Revision: 313495 URL: https://svnweb.freebsd.org/changeset/base/313495 Log: Do not establish advisory locks when doing open(O_EXLOCK) or open(O_SHLOCK) for files which do not have DTYPE_VNODE type. Both flock(2) and fcntl(2) syscalls refuse to acquire advisory lock on a file which type is not DTYPE_VNODE. Do the same when lock is requested from open(2). Restructure the block in vn_open_vnode() which handles O_EXLOCK and O_SHLOCK open flags to make it easier to quit its execution earlier with an error. Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Feb 9 23:33:06 2017 (r313494) +++ head/sys/kern/vfs_vnops.c Thu Feb 9 23:35:57 2017 (r313495) @@ -349,8 +349,12 @@ vn_open_vnode(struct vnode *vp, int fmod if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) return (error); - if (fmode & (O_EXLOCK | O_SHLOCK)) { + while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { KASSERT(fp != NULL, ("open with flock requires fp")); + if (fp->f_type != DTYPE_VNODE) { + error = EBADF; + break; + } lock_flags = VOP_ISLOCKED(vp); VOP_UNLOCK(vp, 0); lf.l_whence = SEEK_SET; @@ -367,8 +371,12 @@ vn_open_vnode(struct vnode *vp, int fmod if (error == 0) fp->f_flag |= FHASLOCK; vn_lock(vp, lock_flags | LK_RETRY); - if (error == 0 && vp->v_iflag & VI_DOOMED) + if (error != 0) + break; + if ((vp->v_iflag & VI_DOOMED) != 0) { error = ENOENT; + break; + } /* * Another thread might have used this vnode as an @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod * Ensure the vnode is still able to be opened for * writing after the lock has been obtained. */ - if (error == 0 && accmode & VWRITE) + if ((accmode & VWRITE) != 0) error = vn_writechk(vp); + break; + } - if (error != 0) { - fp->f_flag |= FOPENFAILED; - fp->f_vnode = vp; - if (fp->f_ops == &badfileops) { - fp->f_type = DTYPE_VNODE; - fp->f_ops = &vnops; - } - vref(vp); + if (error != 0) { + fp->f_flag |= FOPENFAILED; + fp->f_vnode = vp; + if (fp->f_ops == &badfileops) { + fp->f_type = DTYPE_VNODE; + fp->f_ops = &vnops; } - } - if (error == 0 && fmode & FWRITE) { + vref(vp); + } else if ((fmode & FWRITE) != 0) { VOP_ADD_WRITECOUNT(vp, 1); CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, vp->v_writecount); From owner-svn-src-all@freebsd.org Thu Feb 9 23:36:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0A92CD834A; Thu, 9 Feb 2017 23:36:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74250151B; Thu, 9 Feb 2017 23:36:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NaoFm026956; Thu, 9 Feb 2017 23:36:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NaoD2026955; Thu, 9 Feb 2017 23:36:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702092336.v19NaoD2026955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 9 Feb 2017 23:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313496 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 09 Feb 2017 23:36:51 -0000 Author: kib Date: Thu Feb 9 23:36:50 2017 New Revision: 313496 URL: https://svnweb.freebsd.org/changeset/base/313496 Log: Increase a chance of devfs_close() calling d_close cdevsw method. If a file opened over a vnode has an advisory lock set at close, vn_closefile() acquires additional vnode use reference to prevent freeing the vnode in vn_close(). Side effect is that for device vnodes, devfs_close() sees that vnode reference count is greater than one and refuses to call d_close(). Create internal version of vn_close() which can avoid dropping the vnode reference if needed, and use this to execute VOP_CLOSE() without acquiring a new reference. Note that any parallel reference to the vnode would still prevent d_close call, if the reference is not from an opened file, e.g. due to stat(2). Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Feb 9 23:35:57 2017 (r313495) +++ head/sys/kern/vfs_vnops.c Thu Feb 9 23:36:50 2017 (r313496) @@ -430,12 +430,9 @@ vn_writechk(vp) /* * Vnode close call */ -int -vn_close(vp, flags, file_cred, td) - register struct vnode *vp; - int flags; - struct ucred *file_cred; - struct thread *td; +static int +vn_close1(struct vnode *vp, int flags, struct ucred *file_cred, + struct thread *td, bool keep_ref) { struct mount *mp; int error, lock_flags; @@ -457,11 +454,22 @@ vn_close(vp, flags, file_cred, td) __func__, vp, vp->v_writecount); } error = VOP_CLOSE(vp, flags, file_cred, td); - vput(vp); + if (keep_ref) + VOP_UNLOCK(vp, 0); + else + vput(vp); vn_finished_write(mp); return (error); } +int +vn_close(struct vnode *vp, int flags, struct ucred *file_cred, + struct thread *td) +{ + + return (vn_close1(vp, flags, file_cred, td, false)); +} + /* * Heuristic to detect sequential operation. */ @@ -1573,18 +1581,15 @@ vn_closefile(struct file *fp, struct thr struct vnode *vp; struct flock lf; int error; + bool ref; vp = fp->f_vnode; fp->f_ops = &badfileops; + ref= (fp->f_flag & FHASLOCK) != 0 && fp->f_type == DTYPE_VNODE; - if (__predict_false((fp->f_flag & FHASLOCK) != 0) && - fp->f_type == DTYPE_VNODE) - vrefact(vp); - - error = vn_close(vp, fp->f_flag, fp->f_cred, td); + error = vn_close1(vp, fp->f_flag, fp->f_cred, td, ref); - if (__predict_false((fp->f_flag & FHASLOCK) != 0) && - fp->f_type == DTYPE_VNODE) { + if (__predict_false(ref)) { lf.l_whence = SEEK_SET; lf.l_start = 0; lf.l_len = 0; From owner-svn-src-all@freebsd.org Fri Feb 10 00:24:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84641CD76E3 for ; Fri, 10 Feb 2017 00:24:40 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5444113C0 for ; Fri, 10 Feb 2017 00:24:39 +0000 (UTC) (envelope-from joerg@bec.de) Received: from britannica.bec.de (p200300D2ABCA8F004639C4FFFE599710.dip0.t-ipconnect.de [IPv6:2003:d2:abca:8f00:4639:c4ff:fe59:9710]) (Authenticated sender: joerg@bec.de) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id B5C7F172093 for ; Fri, 10 Feb 2017 01:24:36 +0100 (CET) Date: Fri, 10 Feb 2017 01:24:35 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r313494 - head/libexec/rtld-elf Message-ID: <20170210002435.GA18625@britannica.bec.de> References: <201702092333.v19NX6Ll026723@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702092333.v19NX6Ll026723@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 00:24:40 -0000 On Thu, Feb 09, 2017 at 11:33:06PM +0000, Konstantin Belousov wrote: > Protected symbol reference in GOT of the defining object must be > resolved to itself, same as -Bsymbolic globally. This doesn't make sense to me. Why do they remain in the DSO, they should have been resolved the linker already? Joerg From owner-svn-src-all@freebsd.org Fri Feb 10 01:04:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3958CD83C1; Fri, 10 Feb 2017 01:04:13 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A748B823; Fri, 10 Feb 2017 01:04:13 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A14Cab063656; Fri, 10 Feb 2017 01:04:12 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A14B5R063644; Fri, 10 Feb 2017 01:04:11 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201702100104.v1A14B5R063644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 10 Feb 2017 01:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313497 - in head/sys: amd64/conf conf dev/ixl 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 01:04:14 -0000 Author: erj Date: Fri Feb 10 01:04:11 2017 New Revision: 313497 URL: https://svnweb.freebsd.org/changeset/base/313497 Log: ixl(4): Update to 1.7.12-k Refresh upstream driver before impending conversion to iflib. Major new features: - Support for Fortville-based 25G adapters - Support for I2C reads/writes (To prevent getting or sending corrupt data, you should set dev.ixl.0.debug.disable_fw_link_management=1 when using I2C [this will disable link!], then set it to 0 when done. The driver implements the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data, but there are read_i2c and write_i2c sysctls under the .debug sysctl tree [the latter being useful for upper page support in QSFP+]). - Addition of an iWARP client interface (so the future iWARP driver for X722 devices can communicate with the base driver). - Compiling this option in is enabled by default, with "options IXL_IW" in GENERIC. Differential Revision: https://reviews.freebsd.org/D9227 Reviewed by: sbruno MFC after: 2 weeks Sponsored by: Intel Corporation Added: head/sys/dev/ixl/ixl_iw.c (contents, props changed) head/sys/dev/ixl/ixl_iw.h - copied, changed from r313496, head/sys/dev/ixl/ixl_pf_iov.h head/sys/dev/ixl/ixl_iw_int.h - copied, changed from r313496, head/sys/dev/ixl/ixl_pf_iov.h head/sys/dev/ixl/ixl_pf_i2c.c (contents, props changed) Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/conf/files.amd64 head/sys/conf/options.amd64 head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_devids.h head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.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/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_pf.h head/sys/dev/ixl/ixl_pf_iov.c head/sys/dev/ixl/ixl_pf_iov.h head/sys/dev/ixl/ixl_pf_main.c head/sys/dev/ixl/ixl_txrx.c head/sys/dev/ixl/ixlv.h head/sys/dev/ixl/ixlvc.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/amd64/conf/GENERIC Fri Feb 10 01:04:11 2017 (r313497) @@ -233,6 +233,7 @@ device em # Intel PRO/1000 Gigabit Et device ix # Intel PRO/10GbE PCIE PF Ethernet device ixv # Intel PRO/10GbE PCIE VF Ethernet device ixl # Intel XL710 40Gbe PCIE Ethernet +options IXL_IW # Enable iWARP Client Interface in ixl(4) device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/amd64/conf/NOTES Fri Feb 10 01:04:11 2017 (r313497) @@ -335,6 +335,7 @@ device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel XL710 40Gbe PCIE Ethernet +options IXL_IW # Enable iWARP Client Interface in ixl(4) device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/conf/files.amd64 Fri Feb 10 01:04:11 2017 (r313497) @@ -256,6 +256,10 @@ dev/ixl/ixl_pf_qmgr.c optional ixl pci compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixl_pf_iov.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_i2c.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_iw.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/if_ixlv.c optional ixlv pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixlvc.c optional ixlv pci \ Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/conf/options.amd64 Fri Feb 10 01:04:11 2017 (r313497) @@ -48,6 +48,9 @@ AGP_DEBUG opt_agp.h ATKBD_DFLT_KEYMAP opt_atkbd.h +# iWARP client interface support in ixl +IXL_IW opt_ixl.h + # ------------------------------- # EOF # ------------------------------- Modified: head/sys/dev/ixl/i40e_adminq.c ============================================================================== --- head/sys/dev/ixl/i40e_adminq.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_adminq.c Fri Feb 10 01:04:11 2017 (r313497) @@ -1020,11 +1020,11 @@ enum i40e_status_code i40e_clean_arq_ele desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc); desc_idx = ntc; + hw->aq.arq_last_status = + (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); flags = LE16_TO_CPU(desc->flags); if (flags & I40E_AQ_FLAG_ERR) { ret_code = I40E_ERR_ADMIN_QUEUE_ERROR; - hw->aq.arq_last_status = - (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: Event received with error 0x%X.\n", Modified: head/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq_cmd.h Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Feb 10 01:04:11 2017 (r313497) @@ -154,6 +154,7 @@ enum i40e_admin_queue_opc { /* WoL commands */ i40e_aqc_opc_set_wol_filter = 0x0120, i40e_aqc_opc_get_wake_reason = 0x0121, + i40e_aqc_opc_clear_all_wol_filters = 0x025E, /* internal switch commands */ i40e_aqc_opc_get_switch_config = 0x0200, @@ -535,7 +536,8 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID 0x80 #define I40E_AQC_MC_MAG_EN_VALID 0x100 -#define I40E_AQC_ADDR_VALID_MASK 0x1F0 +#define I40E_AQC_WOL_PRESERVE_STATUS 0x200 +#define I40E_AQC_ADDR_VALID_MASK 0x3F0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -556,6 +558,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_a struct i40e_aqc_mac_address_write { __le16 command_flags; #define I40E_AQC_MC_MAG_EN 0x0100 +#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200 #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 @@ -594,6 +597,7 @@ struct i40e_aqc_set_wol_filter { __le16 cmd_flags; #define I40E_AQC_SET_WOL_FILTER 0x8000 #define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000 +#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000 #define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0 #define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1 __le16 valid_flags; @@ -1757,6 +1761,8 @@ struct i40e_aq_get_phy_abilities_resp { #define I40E_AQ_PHY_LINK_ENABLED 0x08 #define I40E_AQ_PHY_AN_ENABLED 0x10 #define I40E_AQ_PHY_FLAG_MODULE_QUAL 0x20 +#define I40E_AQ_PHY_FEC_ABILITY_KR 0x40 +#define I40E_AQ_PHY_FEC_ABILITY_RS 0x80 __le16 eee_capability; #define I40E_AQ_EEE_100BASE_TX 0x0002 #define I40E_AQ_EEE_1000BASE_T 0x0004 @@ -1768,11 +1774,20 @@ struct i40e_aq_get_phy_abilities_resp { u8 d3_lpan; #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01 u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 +#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01 +#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02 #define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 #define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 mod_type_ext; + u8 fec_cfg_curr_mod_ext_info; +#define I40E_AQ_ENABLE_FEC_KR 0x01 +#define I40E_AQ_ENABLE_FEC_RS 0x02 +#define I40E_AQ_REQUEST_FEC_KR 0x04 +#define I40E_AQ_REQUEST_FEC_RS 0x08 +#define I40E_AQ_ENABLE_FEC_AUTO 0x10 +#define I40E_AQ_FEC +#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0 +#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5 + u8 ext_comp_code; u8 phy_id[4]; u8 module_type[3]; @@ -1796,11 +1811,15 @@ struct i40e_aq_set_phy_config { /* same __le32 eeer; u8 low_power_ctrl; u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 -#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 -#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 reserved[2]; + u8 fec_config; +#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0) +#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1) +#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2) +#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3) +#define I40E_AQ_SET_FEC_AUTO BIT(4) +#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0 +#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT) + u8 reserved; }; I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config); @@ -1890,6 +1909,8 @@ struct i40e_aqc_get_link_status { u8 loopback; /* use defines from i40e_aqc_set_lb_mode */ __le16 max_frame_size; u8 config; +#define I40E_AQ_CONFIG_FEC_KR_ENA 0x01 +#define I40E_AQ_CONFIG_FEC_RS_ENA 0x02 #define I40E_AQ_CONFIG_CRC_ENA 0x04 #define I40E_AQ_CONFIG_PACING_MASK 0x78 u8 power_desc; Modified: head/sys/dev/ixl/i40e_common.c ============================================================================== --- head/sys/dev/ixl/i40e_common.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_common.c Fri Feb 10 01:04:11 2017 (r313497) @@ -78,7 +78,6 @@ enum i40e_status_code i40e_set_mac_type( hw->mac.type = I40E_MAC_X722; break; case I40E_DEV_ID_X722_VF: - case I40E_DEV_ID_X722_VF_HV: case I40E_DEV_ID_X722_A0_VF: hw->mac.type = I40E_MAC_X722_VF; break; @@ -1088,7 +1087,8 @@ enum i40e_status_code i40e_get_mac_addr( status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL); if (flags & I40E_AQC_LAN_ADDR_VALID) - memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac)); + i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac), + I40E_NONDMA_TO_NONDMA); return status; } @@ -1111,7 +1111,8 @@ enum i40e_status_code i40e_get_port_mac_ return status; if (flags & I40E_AQC_PORT_ADDR_VALID) - memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac)); + i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac), + I40E_NONDMA_TO_NONDMA); else status = I40E_ERR_INVALID_MAC_ADDR; @@ -1224,6 +1225,8 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_1000BASE_LX: case I40E_PHY_TYPE_40GBASE_SR4: case I40E_PHY_TYPE_40GBASE_LR4: + case I40E_PHY_TYPE_25GBASE_LR: + case I40E_PHY_TYPE_25GBASE_SR: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1238,6 +1241,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_SFPP_CU: case I40E_PHY_TYPE_40GBASE_AOC: case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_CR: media = I40E_MEDIA_TYPE_DA; break; case I40E_PHY_TYPE_1000BASE_KX: @@ -1245,6 +1249,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_KR: case I40E_PHY_TYPE_40GBASE_KR4: case I40E_PHY_TYPE_20GBASE_KR2: + case I40E_PHY_TYPE_25GBASE_KR: media = I40E_MEDIA_TYPE_BACKPLANE; break; case I40E_PHY_TYPE_SGMII: @@ -1725,10 +1730,13 @@ enum i40e_status_code i40e_set_fc(struct config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK; /* Copy over all the old settings */ config.phy_type = abilities.phy_type; + config.phy_type_ext = abilities.phy_type_ext; config.link_speed = abilities.link_speed; config.eee_capability = abilities.eee_capability; config.eeer = abilities.eeer_val; config.low_power_ctrl = abilities.d3_lpan; + config.fec_config = abilities.fec_cfg_curr_mod_ext_info & + I40E_AQ_PHY_FEC_CONFIG_MASK; status = i40e_aq_set_phy_config(hw, &config, NULL); if (status) @@ -1888,6 +1896,8 @@ enum i40e_status_code i40e_aq_get_link_i hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed; hw_link_info->link_info = resp->link_info; hw_link_info->an_info = resp->an_info; + hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA | + I40E_AQ_CONFIG_FEC_RS_ENA); hw_link_info->ext_info = resp->ext_info; hw_link_info->loopback = resp->loopback; hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size); @@ -1910,12 +1920,13 @@ enum i40e_status_code i40e_aq_get_link_i else hw_link_info->crc_enable = FALSE; - if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE)) + if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED)) hw_link_info->lse_enable = TRUE; else hw_link_info->lse_enable = FALSE; - if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && + if ((hw->mac.type == I40E_MAC_XL710) && + (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; @@ -2280,6 +2291,43 @@ enum i40e_status_code i40e_aq_set_vsi_mu } /** +* i40e_aq_set_vsi_full_promiscuous +* @hw: pointer to the hw struct +* @seid: VSI number +* @set: set promiscuous enable/disable +* @cmd_details: pointer to command details structure or NULL +**/ +enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw, + u16 seid, bool set, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (set) + flags = I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST); + + cmd->seid = CPU_TO_LE16(seid); + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_mc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number @@ -2348,6 +2396,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc } /** + * i40e_aq_set_vsi_bc_promisc_on_vlan + * @hw: pointer to the hw struct + * @seid: vsi number + * @enable: set broadcast promiscuous enable/disable for a given VLAN + * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw, + u16 seid, bool enable, u16 vid, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (enable) + flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST); + cmd->seid = CPU_TO_LE16(seid); + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number @@ -2680,14 +2762,17 @@ enum i40e_status_code i40e_update_link_i if (status) return status; - if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) { + /* extra checking needed to ensure link info to user is timely */ + if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { status = i40e_aq_get_phy_capabilities(hw, FALSE, false, &abilities, NULL); if (status) return status; - memcpy(hw->phy.link_info.module_type, &abilities.module_type, - sizeof(hw->phy.link_info.module_type)); + i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type, + sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA); } return status; } @@ -3537,6 +3622,14 @@ static void i40e_parse_discover_capabili break; case I40E_AQ_CAP_ID_MNG_MODE: p->management_mode = number; + if (major_rev > 1) { + p->mng_protocols_over_mctp = logical_id; + i40e_debug(hw, I40E_DEBUG_INIT, + "HW Capability: Protocols over MCTP = %d\n", + p->mng_protocols_over_mctp); + } else { + p->mng_protocols_over_mctp = 0; + } i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: Management Mode = %d\n", p->management_mode); @@ -3765,7 +3858,6 @@ static void i40e_parse_discover_capabili else p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL; p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0; - p->proxy_support = p->proxy_support; i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: WOL proxy filters = %d\n", hw->num_wol_proxy_filters); @@ -3806,8 +3898,10 @@ static void i40e_parse_discover_capabili /* partition id is 1-based, and functions are evenly spread * across the ports as partitions */ - hw->partition_id = (hw->pf_id / hw->num_ports) + 1; - hw->num_partitions = num_functions / hw->num_ports; + if (hw->num_ports != 0) { + hw->partition_id = (hw->pf_id / hw->num_ports) + 1; + hw->num_partitions = num_functions / hw->num_ports; + } /* additional HW specific goodies that might * someday be HW version specific @@ -4292,11 +4386,15 @@ enum i40e_status_code i40e_aq_start_stop /** * i40e_aq_add_udp_tunnel * @hw: pointer to the hw struct - * @udp_port: the UDP port to add + * @udp_port: the UDP port to add in Host byte order * @header_len: length of the tunneling header length in DWords * @protocol_index: protocol index type * @filter_index: pointer to filter index * @cmd_details: pointer to command details structure or NULL + * + * Note: Firmware expects the udp_port value to be in Little Endian format, + * and this function will call CPU_TO_LE16 to convert from Host byte order to + * Little Endian order. **/ enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw, u16 udp_port, u8 protocol_index, @@ -5905,9 +6003,6 @@ enum i40e_status_code i40e_aq_configure_ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); - if (bwd_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(bwd_size); status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details); @@ -5916,7 +6011,92 @@ enum i40e_status_code i40e_aq_configure_ } /** - * i40e_read_phy_register + * i40e_read_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + if (status) { + i40e_debug(hw, I40E_DEBUG_PHY, + "PHY: Can't write command to external PHY.\n"); + } else { + command = rd32(hw, I40E_GLGEN_MSRWD(port_num)); + *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >> + I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT; + } + + return status; +} + +/** + * i40e_write_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes specified PHY register value + **/ +enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT; + wr32(hw, I40E_GLGEN_MSRWD(port_num), command); + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + return status; +} + +/** + * i40e_read_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -5925,9 +6105,8 @@ enum i40e_status_code i40e_aq_configure_ * * Reads specified PHY register value **/ -enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 *value) +enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -5937,8 +6116,8 @@ enum i40e_status_code i40e_read_phy_regi command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -5960,8 +6139,8 @@ enum i40e_status_code i40e_read_phy_regi command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_READ) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -5991,7 +6170,7 @@ phy_read_end: } /** - * i40e_write_phy_register + * i40e_write_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -6000,9 +6179,8 @@ phy_read_end: * * Writes value to specified PHY register **/ -enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 value) +enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -6012,8 +6190,8 @@ enum i40e_status_code i40e_write_phy_reg command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -6037,8 +6215,8 @@ enum i40e_status_code i40e_write_phy_reg command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_WRITE) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -6059,6 +6237,78 @@ phy_write_end: } /** + * i40e_write_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes value to specified PHY register + **/ +enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_write_phy_register_clause22(hw, + reg, phy_addr, value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_write_phy_register_clause45(hw, + page, reg, phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** + * i40e_read_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_read_phy_register_clause22(hw, reg, phy_addr, + value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_read_phy_register_clause45(hw, page, reg, + phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** * i40e_get_phy_address * @hw: pointer to the HW structure * @dev_num: PHY port num that address we want @@ -6100,14 +6350,16 @@ enum i40e_status_code i40e_blink_phy_lin for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, led_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + &led_reg); if (status) goto phy_blinking_end; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_reg); @@ -6119,20 +6371,18 @@ enum i40e_status_code i40e_blink_phy_lin if (time > 0 && interval > 0) { for (i = 0; i < time * 1000; i += interval) { - status = i40e_read_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (led_reg & I40E_PHY_LED_MANUAL_ON) led_reg = 0; else led_reg = I40E_PHY_LED_MANUAL_ON; - status = i40e_write_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; i40e_msec_delay(interval); @@ -6140,8 +6390,9 @@ enum i40e_status_code i40e_blink_phy_lin } restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); phy_blinking_end: return status; @@ -6172,8 +6423,10 @@ enum i40e_status_code i40e_led_get_phy(s for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, temp_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - temp_addr, phy_addr, ®_val); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + temp_addr, phy_addr, + ®_val); if (status) return status; *val = reg_val; @@ -6206,41 +6459,42 @@ enum i40e_status_code i40e_led_set_phy(s i = rd32(hw, I40E_PFGEN_PORTNUM); port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK); phy_addr = i40e_get_phy_address(hw, port_num); - - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) return status; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + led_reg); if (status) return status; } - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (on) led_reg = I40E_PHY_LED_MANUAL_ON; else led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; if (mode & I40E_PHY_LED_MODE_ORIG) { led_ctl = (mode & I40E_PHY_LED_MODE_MASK); - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_ctl); } return status; restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); return status; } @@ -6485,10 +6739,13 @@ enum i40e_status_code i40e_aq_set_arp_pr i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data)); status = i40e_asq_send_command(hw, &desc, proxy_config, sizeof(struct i40e_aqc_arp_proxy_data), @@ -6519,10 +6776,13 @@ enum i40e_status_code i40e_aq_set_ns_pro i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_ns_proxy_table_entry); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data)); status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry, sizeof(struct i40e_aqc_ns_proxy_data), @@ -6569,9 +6829,11 @@ enum i40e_status_code i40e_aq_set_clear_ if (set_filter) { if (!filter) return I40E_ERR_PARAM; + cmd_flags |= I40E_AQC_SET_WOL_FILTER; - buff_len = sizeof(*filter); + cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR; } + if (no_wol_tco) cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL; cmd->cmd_flags = CPU_TO_LE16(cmd_flags); @@ -6582,6 +6844,12 @@ enum i40e_status_code i40e_aq_set_clear_ valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID; cmd->valid_flags = CPU_TO_LE16(valid_flags); + buff_len = sizeof(*filter); + desc.datalen = CPU_TO_LE16(buff_len); + + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); + cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); @@ -6618,3 +6886,24 @@ enum i40e_status_code i40e_aq_get_wake_e return status; } +/** +* i40e_aq_clear_all_wol_filters +* @hw: pointer to the hw struct +* @cmd_details: pointer to command details structure or NULL +* +* Get information for the reason of a Wake Up event +**/ +enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_clear_all_wol_filters); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + Modified: head/sys/dev/ixl/i40e_devids.h ============================================================================== --- head/sys/dev/ixl/i40e_devids.h Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_devids.h Fri Feb 10 01:04:11 2017 (r313497) @@ -63,7 +63,6 @@ #define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 #define I40E_DEV_ID_SFP_I_X722 0x37D3 #define I40E_DEV_ID_X722_VF 0x37CD -#define I40E_DEV_ID_X722_VF_HV 0x37D9 #define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \ (d) == I40E_DEV_ID_QSFP_B || \ Modified: head/sys/dev/ixl/i40e_lan_hmc.c ============================================================================== --- head/sys/dev/ixl/i40e_lan_hmc.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_lan_hmc.c Fri Feb 10 01:04:11 2017 (r313497) @@ -1240,11 +1240,6 @@ enum i40e_status_code i40e_hmc_get_objec u64 obj_offset_in_fpm; u32 sd_idx, sd_lmt; - if (NULL == hmc_info) { - ret_code = I40E_ERR_BAD_PTR; - DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n"); - goto exit; - } if (NULL == hmc_info->hmc_obj) { ret_code = I40E_ERR_BAD_PTR; DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n"); Modified: head/sys/dev/ixl/i40e_nvm.c ============================================================================== --- head/sys/dev/ixl/i40e_nvm.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_nvm.c Fri Feb 10 01:04:11 2017 (r313497) @@ -220,14 +220,14 @@ enum i40e_status_code i40e_read_nvm_word { enum i40e_status_code ret_code = I40E_SUCCESS; - if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { - ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); - if (!ret_code) { + ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); + if (!ret_code) { + if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { ret_code = i40e_read_nvm_word_aq(hw, offset, data); - i40e_release_nvm(hw); + } else { + ret_code = i40e_read_nvm_word_srctl(hw, offset, data); } - } else { - ret_code = i40e_read_nvm_word_srctl(hw, offset, data); + i40e_release_nvm(hw); } return ret_code; } @@ -886,9 +886,20 @@ enum i40e_status_code i40e_nvmupd_comman *((u16 *)&bytes[2]) = hw->nvm_wait_opcode; } + /* Clear error status on read */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + return I40E_SUCCESS; } + /* Clear status even it is not read and log */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) { + i40e_debug(hw, I40E_DEBUG_NVM, + "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n"); + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT: status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno); @@ -1247,6 +1258,11 @@ void i40e_nvmupd_check_wait_event(struct } hw->nvm_wait_opcode = 0; + if (hw->aq.arq_last_status) { + hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR; + return; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT_WAIT: hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; @@ -1409,7 +1425,8 @@ static enum i40e_status_code i40e_nvmupd if (hw->nvm_buff.va) { buff = hw->nvm_buff.va; - memcpy(buff, &bytes[aq_desc_len], aq_data_len); + i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len, + I40E_NONDMA_TO_NONDMA); } } @@ -1482,7 +1499,7 @@ static enum i40e_status_code i40e_nvmupd __func__, cmd->offset, cmd->offset + len); buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset; - memcpy(bytes, buff, len); + i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA); bytes += len; remainder -= len; @@ -1496,7 +1513,7 @@ static enum i40e_status_code i40e_nvmupd i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n", __func__, start_byte, start_byte + remainder); - memcpy(bytes, buff, remainder); + i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA); } return I40E_SUCCESS; Modified: head/sys/dev/ixl/i40e_osdep.c ============================================================================== --- head/sys/dev/ixl/i40e_osdep.c Thu Feb 9 23:36:50 2017 (r313496) +++ head/sys/dev/ixl/i40e_osdep.c Fri Feb 10 01:04:11 2017 (r313497) @@ -189,15 +189,71 @@ void i40e_debug_shared(struct i40e_hw *hw, enum i40e_debug_mask mask, char *fmt, ...) { va_list args; + device_t dev; if (!(mask & ((struct i40e_hw *)hw)->debug_mask)) return; + dev = ((struct i40e_osdep *)hw->back)->dev; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 10 01:13:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E55B4CD87C2; Fri, 10 Feb 2017 01:13:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9672CD3B; Fri, 10 Feb 2017 01:13:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A1DDd4067945; Fri, 10 Feb 2017 01:13:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A1DCrS067935; Fri, 10 Feb 2017 01:13:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100113.v1A1DCrS067935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 01:13: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: r313498 - in stable/10: bin/cat/tests contrib/netbsd-tests contrib/netbsd-tests/bin/cat contrib/netbsd-tests/bin/sh contrib/netbsd-tests/bin/sh/dotcmd contrib/netbsd-tests/crypto/opencr... 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 01:13:15 -0000 Author: ngie Date: Fri Feb 10 01:13:12 2017 New Revision: 313498 URL: https://svnweb.freebsd.org/changeset/base/313498 Log: MFC r305358,r305449,r305451,r306367,r306397,r309474: This also contains a merge of ^/projects/netbsd-tests-update-12@r304035 . This change never hit ^/head because bin/cat's behavior was changed (on ^/head) to match NetBSD. PR: 210607 r305358: Update contrib/netbsd-tests with new content from NetBSD This updates the snapshot from 09/30/2014 to 08/11/2016 This brings in a number of new testcases from upstream, most notably: - bin/cat - lib/libc - lib/msun - lib/libthr - usr.bin/sort lib/libc/tests/stdio/open_memstream_test.c was moved to lib/libc/tests/stdio/open_memstream2_test.c to accomodate the new open_memstream test from NetBSD. Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox r305449: Install h_db to unbreak some of the lib/libc/db testcases after r305358 r305451: Fix lib/libc/rpc test assumptions added in r305358 - Require root in the tcp/udp subtests (it's needed on FreeBSD when registering services). - Skip the tests if service registration fails. r306367 (by br): Allow up to 6 arguments only on MIPS. r306397 (by br): Use right piece of code for FreeBSD. r309474: Don't build :strvis_locale if VIS_NOLOCALE is undefined The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower in conditionally running the test instead of backporting the newer version of libc-vis Added: stable/10/contrib/netbsd-tests/bin/cat/d_se_output.in - copied unchanged from r305358, head/contrib/netbsd-tests/bin/cat/d_se_output.in stable/10/contrib/netbsd-tests/bin/cat/d_se_output.out - copied unchanged from r305358, head/contrib/netbsd-tests/bin/cat/d_se_output.out stable/10/contrib/netbsd-tests/bin/sh/t_arith.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_arith.sh stable/10/contrib/netbsd-tests/bin/sh/t_cmdsub.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_cmdsub.sh stable/10/contrib/netbsd-tests/bin/sh/t_option.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_option.sh stable/10/contrib/netbsd-tests/bin/sh/t_redir.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_redir.sh stable/10/contrib/netbsd-tests/bin/sh/t_redircloexec.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_redircloexec.sh stable/10/contrib/netbsd-tests/bin/sh/t_shift.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_shift.sh stable/10/contrib/netbsd-tests/bin/sh/t_varval.sh - copied unchanged from r305358, head/contrib/netbsd-tests/bin/sh/t_varval.sh stable/10/contrib/netbsd-tests/dev/fss/ - copied from r305358, head/contrib/netbsd-tests/dev/fss/ stable/10/contrib/netbsd-tests/dev/usb/ - copied from r305358, head/contrib/netbsd-tests/dev/usb/ stable/10/contrib/netbsd-tests/include/sys/t_pslist.c - copied unchanged from r305358, head/contrib/netbsd-tests/include/sys/t_pslist.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_vnode.c - copied unchanged from r305358, head/contrib/netbsd-tests/kernel/kqueue/t_vnode.c stable/10/contrib/netbsd-tests/lib/libc/db/h_lfsr.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/db/h_lfsr.c stable/10/contrib/netbsd-tests/lib/libc/db/t_db_hash_seq.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/db/t_db_hash_seq.c stable/10/contrib/netbsd-tests/lib/libc/inet/t_inet_addr.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/inet/t_inet_addr.c stable/10/contrib/netbsd-tests/lib/libc/stdio/t_open_memstream.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/stdio/t_open_memstream.c stable/10/contrib/netbsd-tests/lib/libc/stdlib/t_strtoi.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/stdlib/t_strtoi.c stable/10/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc stable/10/contrib/netbsd-tests/lib/libc/sys/t_bind.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/sys/t_bind.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_getsockname.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/sys/t_getsockname.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_posix_fallocate.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/sys/t_posix_fallocate.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_wait.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libc/sys/t_wait.c stable/10/contrib/netbsd-tests/lib/libm/t_fenv.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libm/t_fenv.c stable/10/contrib/netbsd-tests/lib/libm/t_hypot.c - copied unchanged from r305358, head/contrib/netbsd-tests/lib/libm/t_hypot.c stable/10/contrib/netbsd-tests/lib/libusbhid/ - copied from r305358, head/contrib/netbsd-tests/lib/libusbhid/ stable/10/contrib/netbsd-tests/net/arp/ - copied from r305358, head/contrib/netbsd-tests/net/arp/ stable/10/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh stable/10/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh stable/10/contrib/netbsd-tests/net/if/ifconf.c - copied unchanged from r305358, head/contrib/netbsd-tests/net/if/ifconf.c stable/10/contrib/netbsd-tests/net/if/t_ifconf.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/if/t_ifconf.sh stable/10/contrib/netbsd-tests/net/if/t_ifconfig.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/if/t_ifconfig.sh stable/10/contrib/netbsd-tests/net/if_gif/ - copied from r305358, head/contrib/netbsd-tests/net/if_gif/ stable/10/contrib/netbsd-tests/net/if_pppoe/ - copied from r305358, head/contrib/netbsd-tests/net/if_pppoe/ stable/10/contrib/netbsd-tests/net/if_tap/ - copied from r305358, head/contrib/netbsd-tests/net/if_tap/ stable/10/contrib/netbsd-tests/net/in_cksum/ - copied from r305358, head/contrib/netbsd-tests/net/in_cksum/ stable/10/contrib/netbsd-tests/net/mcast/ - copied from r305358, head/contrib/netbsd-tests/net/mcast/ stable/10/contrib/netbsd-tests/net/mpls/t_mpls_fw6.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/mpls/t_mpls_fw6.sh stable/10/contrib/netbsd-tests/net/mpls/t_mpls_fw64.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/mpls/t_mpls_fw64.sh stable/10/contrib/netbsd-tests/net/ndp/ - copied from r305358, head/contrib/netbsd-tests/net/ndp/ stable/10/contrib/netbsd-tests/net/net/t_forwarding.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/net/t_forwarding.sh stable/10/contrib/netbsd-tests/net/net/t_ipaddress.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/net/t_ipaddress.sh stable/10/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh stable/10/contrib/netbsd-tests/net/net/t_ipv6address.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/net/t_ipv6address.sh stable/10/contrib/netbsd-tests/net/route/t_flags.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/route/t_flags.sh stable/10/contrib/netbsd-tests/net/route/t_flags6.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/route/t_flags6.sh stable/10/contrib/netbsd-tests/net/route/t_route.sh - copied unchanged from r305358, head/contrib/netbsd-tests/net/route/t_route.sh stable/10/contrib/netbsd-tests/sbin/gpt/ - copied from r305358, head/contrib/netbsd-tests/sbin/gpt/ stable/10/contrib/netbsd-tests/sbin/resize_ffs/t_check.sh - copied unchanged from r305358, head/contrib/netbsd-tests/sbin/resize_ffs/t_check.sh stable/10/contrib/netbsd-tests/sys/net/ - copied from r305358, head/contrib/netbsd-tests/sys/net/ stable/10/contrib/netbsd-tests/sys/netatalk/ - copied from r305358, head/contrib/netbsd-tests/sys/netatalk/ stable/10/contrib/netbsd-tests/sys/netinet/ - copied from r305358, head/contrib/netbsd-tests/sys/netinet/ stable/10/contrib/netbsd-tests/sys/netinet6/ - copied from r305358, head/contrib/netbsd-tests/sys/netinet6/ stable/10/contrib/netbsd-tests/usr.bin/config/d_min - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/config/d_min stable/10/contrib/netbsd-tests/usr.bin/gdb/ - copied from r305358, head/contrib/netbsd-tests/usr.bin/gdb/ stable/10/contrib/netbsd-tests/usr.bin/ld/ - copied from r305358, head/contrib/netbsd-tests/usr.bin/ld/ stable/10/contrib/netbsd-tests/usr.bin/netpgpverify/Testspec - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/netpgpverify/Testspec stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_struct.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_nested_struct.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_init4.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_init4.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_type_question_colon.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_type_question_colon.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_typefun.c - copied unchanged from r305358, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_typefun.c stable/10/lib/libc/tests/stdio/open_memstream2_test.c - copied unchanged from r305358, head/lib/libc/tests/stdio/open_memstream2_test.c Deleted: stable/10/contrib/netbsd-tests/bin/sh/t_compexit.sh stable/10/contrib/netbsd-tests/fs/nfs/nfsservice/mountd.c stable/10/contrib/netbsd-tests/fs/nfs/nfsservice/nfsd.c stable/10/lib/libc/tests/stdio/open_memstream_test.c Modified: stable/10/bin/cat/tests/Makefile stable/10/contrib/netbsd-tests/bin/cat/d_align.in stable/10/contrib/netbsd-tests/bin/cat/d_align.out stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh stable/10/contrib/netbsd-tests/bin/sh/dotcmd/scoped_command stable/10/contrib/netbsd-tests/bin/sh/dotcmd/t_dotcmd.sh stable/10/contrib/netbsd-tests/bin/sh/t_evaltested.sh stable/10/contrib/netbsd-tests/bin/sh/t_exit.sh stable/10/contrib/netbsd-tests/bin/sh/t_expand.sh stable/10/contrib/netbsd-tests/bin/sh/t_fsplit.sh stable/10/contrib/netbsd-tests/bin/sh/t_here.sh stable/10/contrib/netbsd-tests/bin/sh/t_set_e.sh stable/10/contrib/netbsd-tests/bin/sh/t_ulimit.sh stable/10/contrib/netbsd-tests/bin/sh/t_varquote.sh stable/10/contrib/netbsd-tests/bin/sh/t_wait.sh stable/10/contrib/netbsd-tests/crypto/opencrypto/t_opencrypto.sh stable/10/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue stable/10/contrib/netbsd-tests/dev/dm/h_dm.c stable/10/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh stable/10/contrib/netbsd-tests/dev/sysmon/t_swwdog.c stable/10/contrib/netbsd-tests/fs/common/fstest_lfs.c stable/10/contrib/netbsd-tests/fs/common/h_fsmacros.h stable/10/contrib/netbsd-tests/fs/nfs/nfsservice/rumpnfsd.c stable/10/contrib/netbsd-tests/fs/nfs/t_rquotad.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh stable/10/contrib/netbsd-tests/fs/vfs/t_io.c stable/10/contrib/netbsd-tests/fs/vfs/t_renamerace.c stable/10/contrib/netbsd-tests/fs/vfs/t_unpriv.c stable/10/contrib/netbsd-tests/fs/vfs/t_vnops.c stable/10/contrib/netbsd-tests/games/t_factor.sh stable/10/contrib/netbsd-tests/h_macros.h stable/10/contrib/netbsd-tests/include/sys/t_bitops.c stable/10/contrib/netbsd-tests/include/sys/t_cdefs.c stable/10/contrib/netbsd-tests/include/sys/t_socket.c stable/10/contrib/netbsd-tests/include/t_paths.c stable/10/contrib/netbsd-tests/ipf/expected/n14 stable/10/contrib/netbsd-tests/ipf/expected/n14_6 stable/10/contrib/netbsd-tests/ipf/t_filter_parse.sh stable/10/contrib/netbsd-tests/ipf/t_nat_exec.sh stable/10/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc1.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc2.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc3.c stable/10/contrib/netbsd-tests/kernel/t_rnd.c stable/10/contrib/netbsd-tests/lib/libbpfjit/t_bpfjit.c stable/10/contrib/netbsd-tests/lib/libc/arch/ia64/return_one.S stable/10/contrib/netbsd-tests/lib/libc/arch/powerpc/return_one.S stable/10/contrib/netbsd-tests/lib/libc/arch/riscv/return_one.S stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh stable/10/contrib/netbsd-tests/lib/libc/gen/execve/t_execve.c stable/10/contrib/netbsd-tests/lib/libc/gen/isqemu.h stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawn.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_fpsetmask.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_nice.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_randomid.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_time.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_vis.c stable/10/contrib/netbsd-tests/lib/libc/inet/t_inet_network.c stable/10/contrib/netbsd-tests/lib/libc/net/t_servent.sh stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c stable/10/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c stable/10/contrib/netbsd-tests/lib/libc/stdlib/t_posix_memalign.c stable/10/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c stable/10/contrib/netbsd-tests/lib/libc/stdlib/t_strtol.c stable/10/contrib/netbsd-tests/lib/libc/string/t_memset.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_connect.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_kevent.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_mlock.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_mmap.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_mprotect.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c stable/10/contrib/netbsd-tests/lib/libc/time/t_strptime.c stable/10/contrib/netbsd-tests/lib/libcurses/director/testlang_parse.y stable/10/contrib/netbsd-tests/lib/libm/t_exp.c stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c stable/10/contrib/netbsd-tests/lib/libm/t_log.c stable/10/contrib/netbsd-tests/lib/libm/t_pow.c stable/10/contrib/netbsd-tests/lib/libpthread/t_cond.c stable/10/contrib/netbsd-tests/lib/libpthread/t_mutex.c stable/10/contrib/netbsd-tests/lib/libpthread/t_rwlock.c stable/10/contrib/netbsd-tests/lib/librumpclient/t_exec.sh stable/10/contrib/netbsd-tests/lib/librumpclient/t_fd.c stable/10/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh stable/10/contrib/netbsd-tests/lib/libutil/t_parsedate.c stable/10/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c stable/10/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c stable/10/contrib/netbsd-tests/net/icmp/t_forward.c stable/10/contrib/netbsd-tests/net/icmp/t_ping.c stable/10/contrib/netbsd-tests/net/icmp/t_ping2.sh stable/10/contrib/netbsd-tests/net/if_bridge/t_bridge.sh stable/10/contrib/netbsd-tests/net/mpls/t_ldp_regen.sh stable/10/contrib/netbsd-tests/net/mpls/t_mpls_fw.sh stable/10/contrib/netbsd-tests/net/mpls/t_rfc4182.sh stable/10/contrib/netbsd-tests/net/net/t_tcp.c stable/10/contrib/netbsd-tests/net/route/t_change.sh stable/10/contrib/netbsd-tests/rump/modautoload/t_modautoload.c stable/10/contrib/netbsd-tests/rump/rumpkern/h_server/h_simpleserver.c stable/10/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c stable/10/contrib/netbsd-tests/rump/rumpkern/t_sp.sh stable/10/contrib/netbsd-tests/rump/rumpnet/t_shmif.sh stable/10/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c stable/10/contrib/netbsd-tests/sbin/resize_ffs/common.sh stable/10/contrib/netbsd-tests/sbin/resize_ffs/t_grow.sh stable/10/contrib/netbsd-tests/sbin/resize_ffs/t_grow_swapped.sh stable/10/contrib/netbsd-tests/sbin/resize_ffs/t_shrink.sh stable/10/contrib/netbsd-tests/sbin/resize_ffs/t_shrink_swapped.sh stable/10/contrib/netbsd-tests/sbin/sysctl/t_perm.sh stable/10/contrib/netbsd-tests/share/mk/t_lib.sh stable/10/contrib/netbsd-tests/share/mk/t_prog.sh stable/10/contrib/netbsd-tests/share/mk/t_test.sh stable/10/contrib/netbsd-tests/usr.bin/cc/t_hello.sh stable/10/contrib/netbsd-tests/usr.bin/config/support/conf/files stable/10/contrib/netbsd-tests/usr.bin/config/t_config.sh stable/10/contrib/netbsd-tests/usr.bin/make/t_make.sh stable/10/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh stable/10/contrib/netbsd-tests/usr.bin/sed/t_sed.sh stable/10/contrib/netbsd-tests/usr.bin/sort/d_any_char_dflag_out.txt (contents, props changed) stable/10/contrib/netbsd-tests/usr.bin/sort/d_any_char_fflag_out.txt (contents, props changed) stable/10/contrib/netbsd-tests/usr.bin/sort/d_any_char_iflag_out.txt (contents, props changed) stable/10/contrib/netbsd-tests/usr.sbin/traceroute/t_traceroute.sh stable/10/lib/libc/tests/db/Makefile stable/10/lib/libc/tests/hash/Makefile stable/10/lib/libc/tests/inet/Makefile stable/10/lib/libc/tests/stdio/Makefile stable/10/lib/libc/tests/stdlib/Makefile stable/10/lib/libc/tests/sys/Makefile stable/10/lib/msun/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cat/tests/Makefile ============================================================================== --- stable/10/bin/cat/tests/Makefile Fri Feb 10 01:04:11 2017 (r313497) +++ stable/10/bin/cat/tests/Makefile Fri Feb 10 01:13:12 2017 (r313498) @@ -4,9 +4,17 @@ NETBSD_ATF_TESTS_SH= cat_test FILESDIR= ${TESTSDIR} -FILES= d_align.in +FILES+= d_align.in FILES+= d_align.out +FILES+= d_se_output.in +FILES+= d_se_output.out .include +d_align.out: ${TESTSRC}/d_align.out + sed -E -e 's,^[[:space:]]{7}\$$$$,\$$,' < ${.ALLSRC} > ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} + +CLEANFILES+= d_align.out d_align.out.tmp + .include Modified: stable/10/contrib/netbsd-tests/bin/cat/d_align.in ============================================================================== --- stable/10/contrib/netbsd-tests/bin/cat/d_align.in Fri Feb 10 01:04:11 2017 (r313497) +++ stable/10/contrib/netbsd-tests/bin/cat/d_align.in Fri Feb 10 01:13:12 2017 (r313498) @@ -1,3 +1,5 @@ a b c + 1 2 3 + x y z Modified: stable/10/contrib/netbsd-tests/bin/cat/d_align.out ============================================================================== --- stable/10/contrib/netbsd-tests/bin/cat/d_align.out Fri Feb 10 01:04:11 2017 (r313497) +++ stable/10/contrib/netbsd-tests/bin/cat/d_align.out Fri Feb 10 01:13:12 2017 (r313498) @@ -1,3 +1,5 @@ 1 a b c$ + $ 2 1 2 3$ + $ 3 x y z$ Copied: stable/10/contrib/netbsd-tests/bin/cat/d_se_output.in (from r305358, head/contrib/netbsd-tests/bin/cat/d_se_output.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_se_output.in Fri Feb 10 01:13:12 2017 (r313498, copy of r305358, head/contrib/netbsd-tests/bin/cat/d_se_output.in) @@ -0,0 +1,3 @@ + +Of course it runs NetBSD + Copied: stable/10/contrib/netbsd-tests/bin/cat/d_se_output.out (from r305358, head/contrib/netbsd-tests/bin/cat/d_se_output.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_se_output.out Fri Feb 10 01:13:12 2017 (r313498, copy of r305358, head/contrib/netbsd-tests/bin/cat/d_se_output.out) @@ -0,0 +1,3 @@ +$ +Of course it runs NetBSD$ +$ Modified: stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh ============================================================================== --- stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Fri Feb 10 01:04:11 2017 (r313497) +++ stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Fri Feb 10 01:13:12 2017 (r313498) @@ -1,4 +1,4 @@ -# $NetBSD: t_cat.sh,v 1.2 2012/03/27 17:57:02 jruoho Exp $ +# $NetBSD: t_cat.sh,v 1.3 2016/06/16 01:04:58 sevan Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -52,8 +52,20 @@ nonexistent_body() { -x "cat /some/name/that/does/not/exist" } +atf_test_case se_output +se_output_head() { + atf_set "descr" "Test that cat(1) prints a $ sign " \ + "on blank lines with options '-se' (PR bin/51250)" +} + +se_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_se_output.out \ + -x "cat -se $(atf_get_srcdir)/d_se_output.in" +} + atf_init_test_cases() { atf_add_test_case align atf_add_test_case nonexistent + atf_add_test_case se_output } Modified: stable/10/contrib/netbsd-tests/bin/sh/dotcmd/scoped_command ============================================================================== --- stable/10/contrib/netbsd-tests/bin/sh/dotcmd/scoped_command Fri Feb 10 01:04:11 2017 (r313497) +++ stable/10/contrib/netbsd-tests/bin/sh/dotcmd/scoped_command Fri Feb 10 01:13:12 2017 (r313498) @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: scoped_command,v 1.1 2014/05/31 14:29:06 christos Exp $ +# $NetBSD: scoped_command,v 1.2 2016/03/27 14:57:50 christos Exp $ # # Copyright (c) 2014 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,6 +30,27 @@ # POSSIBILITY OF SUCH DAMAGE. # +: ${TEST_SH:=/bin/sh} + +sane_sh() +{ + set -- ${TEST_SH} + case "$#" in + (0) set /bin/sh;; + (1|2) ;; + (*) set "$1";; # Just ignore options if we cannot make them work + esac + + case "$1" in + /*) TEST_SH="$1${2+ }$2";; + ./*) TEST_SH="${PWD}${1#.}${2+ }$2";; + */*) TEST_SH="${PWD}/$1${2+ }$2";; + *) TEST_SH="$( command -v "$1" )${2+ }$2";; + esac +} + +sane_sh + set -e # USAGE: @@ -52,7 +73,7 @@ cmd="echo 'before ${3}' ${2} echo 'after ${3}, return value:' ${?}" -echo "#!/bin/sh" +echo "#!${TEST_SH}" [ 'func' = "${1}" ] && cat </dev/null + then + # 16 bits or less, or hex unsupported, just give up... + return + fi + test $( ${TEST_SH} -c 'echo $(( 0x1FFFF ))' ) = 131071 || return + + # when attempting to exceed the number of available bits + # the shell may react in any of 3 (rational) ways + # 1. syntax error (maybe even core dump...) and fail + # 2. represent a positive number input as negative value + # 3. keep the number positive, but not the value expected + # (perhaps pegged at the max possible value) + # any of those may be accompanied by a message to stderr + + # Must check all 3 possibilities for each plausible size + # Tests do not use 0x8000... because that value can have weird + # other side effects that are not relevant to discover here. + # But we do want to try and force the sign bit set. + + if ! ${TEST_SH} -c ': $(( 0xC0000000 ))' 2>/dev/null + then + # proobably shell detected overflow and complained + ARITH_BITS=32 + return + fi + if ${TEST_SH} 2>/dev/null \ + -c 'case $(( 0xC0000000 )); in (-*) exit 0;; esac; exit 1' + then + ARITH_BITS=32 + return + fi + if ${TEST_SH} -c '[ $(( 0xC0000000 )) != 3221225472 ]' 2>/dev/null + then + ARITH_BITS=32 + return + fi + + if ! ${TEST_SH} -c ': $(( 0xC000000000000000 ))' 2>/dev/null + then + ARITH_BITS=64 + return + fi + if ${TEST_SH} 2>/dev/null \ + -c 'case $(( 0xC000000000000000 )); in (-*) exit 0;; esac; exit 1' + then + ARITH_BITS=64 + return + fi + if ${TEST_SH} 2>/dev/null \ + -c '[ $((0xC000000000000000)) != 13835058055282163712 ]' + then + ARITH_BITS=64 + return + fi + + if ${TEST_SH} 2>/dev/null -c \ + '[ $((0x123456781234567812345678)) = 5634002657842756053938493048 ]' + then + # just assume... (for now anyway, revisit when it happens...) + ARITH_BITS=96 + return + fi +} + +atf_test_case constants +constants_head() +{ + atf_set "descr" "Tests that arithmetic expansion can handle constants" +} +constants_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $((0x0))' + + # atf_expect_fail "PR bin/50959" + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $((0X0))' + # atf_expect_pass + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $((000))' + + atf_check -s exit:0 -o inline:'1\n' -e empty \ + ${TEST_SH} -c 'echo $(( 000000001 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty \ + ${TEST_SH} -c 'echo $(( 0x000000 ))' + + atf_check -s exit:0 -o inline:'99999\n' -e empty \ + ${TEST_SH} -c 'echo $((99999))' + + [ ${ARITH_BITS} -gt 44 ] && + atf_check -s exit:0 -o inline:'9191919191919\n' -e empty \ + ${TEST_SH} -c 'echo $((9191919191919))' + + atf_check -s exit:0 -o inline:'13\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xD ))' + atf_check -s exit:0 -o inline:'11\n' -e empty ${TEST_SH} -c \ + 'echo $(( 013 ))' + atf_check -s exit:0 -o inline:'7\n' -e empty ${TEST_SH} -c \ + 'x=7;echo $(($x))' + atf_check -s exit:0 -o inline:'9\n' -e empty ${TEST_SH} -c \ + 'x=9;echo $((x))' + + atf_check -s exit:0 -o inline:'11\n' -e empty \ + ${TEST_SH} -c 'x=0xB; echo $(( $x ))' + atf_check -s exit:0 -o inline:'27\n' -e empty \ + ${TEST_SH} -c 'x=0X1B; echo $(( x ))' + atf_check -s exit:0 -o inline:'27\n' -e empty \ + ${TEST_SH} -c 'X=033; echo $(( $X ))' + atf_check -s exit:0 -o inline:'219\n' -e empty \ + ${TEST_SH} -c 'X=0333; echo $(( X ))' + atf_check -s exit:0 -o inline:'0\n' -e empty \ + ${TEST_SH} -c 'NULL=; echo $(( NULL ))' + + # Not clear if this is 0, nothing, or an error, so omit for now + # atf_check -s exit:0 -o inline:'0\n' -e empty \ + # ${TEST_SH} -c 'echo $(( ))' + + # not clear whether this should return 0 or an error, so omit for now + # atf_check -s exit:0 -o inline:'0\n' -e empty \ + # ${TEST_SH} -c 'echo $(( UNDEFINED_VAR ))' +} + + +atf_test_case do_unary_plus +do_unary_plus_head() +{ + atf_set "descr" "Tests that unary plus works as expected" +} +do_unary_plus_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( +0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( +1 ))' + atf_check -s exit:0 -o inline:'6\n' -e empty ${TEST_SH} -c \ + 'echo $(( + 6 ))' + atf_check -s exit:0 -o inline:'4321\n' -e empty ${TEST_SH} -c \ + 'echo $(( + 4321 ))' + atf_check -s exit:0 -o inline:'17185\n' -e empty ${TEST_SH} -c \ + 'echo $(( + 0x4321 ))' +} + +atf_test_case do_unary_minus +do_unary_minus_head() +{ + atf_set "descr" "Tests that unary minus works as expected" +} +do_unary_minus_body() +{ + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( - 0 ))' + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( - 1 ))' + atf_check -s exit:0 -o inline:'-6\n' -e empty ${TEST_SH} -c \ + 'echo $(( - 6 ))' + atf_check -s exit:0 -o inline:'-4321\n' -e empty ${TEST_SH} -c \ + 'echo $(( - 4321 ))' + atf_check -s exit:0 -o inline:'-2257\n' -e empty ${TEST_SH} -c \ + 'echo $(( - 04321 ))' + atf_check -s exit:0 -o inline:'-7\n' -e empty ${TEST_SH} -c \ + 'echo $((-7))' +} + +atf_test_case do_unary_not +do_unary_not_head() +{ + atf_set "descr" "Tests that unary not (boolean) works as expected" +} +do_unary_not_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( ! 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( ! 0 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( !1234 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( !0xFFFF ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( ! 000000 ))' +} + +atf_test_case do_unary_tilde +do_unary_tilde_head() +{ + atf_set "descr" "Tests that unary not (bitwise) works as expected" +} +do_unary_tilde_body() +{ + # definitely 2's complement arithmetic here... + + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( ~ 0 ))' + atf_check -s exit:0 -o inline:'-2\n' -e empty ${TEST_SH} -c \ + 'echo $(( ~ 1 ))' + + atf_check -s exit:0 -o inline:'-1235\n' -e empty ${TEST_SH} -c \ + 'echo $(( ~1234 ))' + atf_check -s exit:0 -o inline:'-256\n' -e empty ${TEST_SH} -c \ + 'echo $(( ~0xFF ))' +} + +atf_test_case elementary_add +elementary_add_head() +{ + atf_set "descr" "Tests that simple addition works as expected" +} +elementary_add_body() +{ + # some of these tests actually test unary ops & op precedence... + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 + 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 + 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 + 1 ))' + atf_check -s exit:0 -o inline:'2\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 + 1 ))' + atf_check -s exit:0 -o inline:'10\n' -e empty ${TEST_SH} -c \ + 'echo $(( 4 + 6 ))' + atf_check -s exit:0 -o inline:'10\n' -e empty ${TEST_SH} -c \ + 'echo $(( 6 + 4 ))' + atf_check -s exit:0 -o inline:'5555\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1234 + 4321 ))' + atf_check -s exit:0 -o inline:'3333\n' -e empty ${TEST_SH} -c \ + 'echo $((1111+2222))' + atf_check -s exit:0 -o inline:'5555\n' -e empty ${TEST_SH} -c \ + 'echo $((+3333+2222))' + atf_check -s exit:0 -o inline:'7777\n' -e empty ${TEST_SH} -c \ + 'echo $((+3333 + +4444))' + atf_check -s exit:0 -o inline:'-7777\n' -e empty ${TEST_SH} -c \ + 'echo -$((+4125+ +3652))' +} + +atf_test_case elementary_sub +elementary_sub_head() +{ + atf_set "descr" "Tests that simple subtraction works as expected" +} +elementary_sub_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 - 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 - 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 - 1 ))' + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 - 1 ))' + atf_check -s exit:0 -o inline:'488\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1066 - 578 ))' + atf_check -s exit:0 -o inline:'-3662\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2016-5678 ))' + atf_check -s exit:0 -o inline:'-3662\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2016+-5678 ))' + atf_check -s exit:0 -o inline:'-3662\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2016-+5678 ))' + atf_check -s exit:0 -o inline:'-7694\n' -e empty ${TEST_SH} -c \ + 'echo $(( -2016-5678 ))' + atf_check -s exit:0 -o inline:'--1\n' -e empty ${TEST_SH} -c \ + 'echo -$(( -1018 - -1017 ))' +} + +atf_test_case elementary_mul +elementary_mul_head() +{ + atf_set "descr" "Tests that simple multiplication works as expected" +} +elementary_mul_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 * 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 * 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 * 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 * 1 ))' + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 * 1 ))' + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 * -1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 * -1 ))' + atf_check -s exit:0 -o inline:'391\n' -e empty ${TEST_SH} -c \ + 'echo $(( 17 * 23 ))' + atf_check -s exit:0 -o inline:'169\n' -e empty ${TEST_SH} -c \ + 'echo $(( 13*13 ))' + atf_check -s exit:0 -o inline:'-11264\n' -e empty ${TEST_SH} -c \ + 'echo $(( -11 *1024 ))' + atf_check -s exit:0 -o inline:'-16983\n' -e empty ${TEST_SH} -c \ + 'echo $(( 17* -999 ))' + atf_check -s exit:0 -o inline:'9309\n' -e empty ${TEST_SH} -c \ + 'echo $(( -29*-321 ))' +} + +atf_test_case elementary_div +elementary_div_head() +{ + atf_set "descr" "Tests that simple division works as expected" +} +elementary_div_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 / 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 / 1 ))' + test ${ARITH_BITS} -ge 38 && + atf_check -s exit:0 -o inline:'99999999999\n' -e empty \ + ${TEST_SH} -c 'echo $(( 99999999999 / 1 ))' + atf_check -s exit:0 -o inline:'2\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2 / 1 ))' + + atf_check -s exit:0 -o inline:'3\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 / 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 / 2 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 / 3 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 / 4 ))' + + atf_check -s exit:0 -o inline:'173\n' -e empty ${TEST_SH} -c \ + 'echo $(( 123456 / 713 ))' + atf_check -s exit:0 -o inline:'13\n' -e empty ${TEST_SH} -c \ + 'echo $(( 169 / 13 ))' +} + +atf_test_case elementary_rem +elementary_rem_head() +{ + atf_set "descr" "Tests that simple modulus works as expected" +} +elementary_rem_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 % 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 % 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2 % 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 9999 % 1 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 % 2 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 % 2 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2 % 2 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xFFFF % 2 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 % 3 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 % 3 ))' + atf_check -s exit:0 -o inline:'2\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2 % 3 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 % 3 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3123 % 3 ))' + + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 9999 % 2 ))' + + atf_check -s exit:0 -o inline:'107\n' -e empty ${TEST_SH} -c \ + 'echo $(( 123456%173 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $((169%13))' +} + +atf_test_case elementary_shl +elementary_shl_head() +{ + atf_set "descr" "Tests that simple shift left works as expected" +} +elementary_shl_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 << 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 << 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 << 17 ))' + + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 << 0 ))' + atf_check -s exit:0 -o inline:'2\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 << 1 ))' + atf_check -s exit:0 -o inline:'131072\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 << 17 ))' + + atf_check -s exit:0 -o inline:'2021161080\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x3C3C3C3C << 1 ))' + + test "${ARITH_BITS}" -ge 40 && + atf_check -s exit:0 -o inline:'129354309120\n' -e empty \ + ${TEST_SH} -c 'echo $(( 0x3C3C3C3C << 7 ))' + test "${ARITH_BITS}" -ge 72 && + atf_check -s exit:0 -o inline:'1111145054534149079040\n' \ + -e empty ${TEST_SH} -c 'echo $(( 0x3C3C3C3C << 40 ))' + + return 0 +} + +atf_test_case elementary_shr +elementary_shr_head() +{ + atf_set "descr" "Tests that simple shift right works as expected" +} +elementary_shr_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 >> 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 >> 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 >> 17 ))' + + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 >> 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 >> 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2 >> 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 >> 1 ))' + + atf_check -s exit:0 -o inline:'4\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x10 >> 2 ))' + atf_check -s exit:0 -o inline:'4\n' -e empty ${TEST_SH} -c \ + 'echo $(( 022 >> 2 ))' + + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 131072 >> 17 ))' + + test ${ARITH_BITS} -ge 40 && + atf_check -s exit:0 -o inline:'8\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x4000000000 >> 35 ))' + test ${ARITH_BITS} -ge 80 && + atf_check -s exit:0 -o inline:'4464\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x93400FACE005C871000 >> 64 ))' + + return 0 +} + +atf_test_case elementary_eq +elementary_eq_head() +{ + atf_set "descr" "Tests that simple equality test works as expected" +} +elementary_eq_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 == 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 == 0000 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 == 0x00 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 == 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'X=30; Y=0x1E; echo $(( X == Y ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1234 == 4660 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1234 == 011064 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 == 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 == 0000000000000001 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 == 0x10000000000000 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 == 2 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'X=3; Y=7; echo $(( X == Y ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1234 == 0x4660 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 01234 == 0x11064 ))' +} +atf_test_case elementary_ne +elementary_ne_head() +{ + atf_set "descr" "Tests that simple inequality test works as expected" +} +elementary_ne_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 != 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x71 != 17 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1234 != 01234 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1234 != 01234 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'X=3; echo $(( X != 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'X=3; Y=0x11; echo $(( X != Y ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 3 != 3 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 != 0x0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xA != 012 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'X=1; echo $(( X != 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'X=0xC; Y=014; echo $(( X != Y ))' +} +atf_test_case elementary_lt +elementary_lt_head() +{ + atf_set "descr" "Tests that simple less than test works as expected" +} +elementary_lt_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 < 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 < 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 < 10 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 100 < 101 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xA1 < 200 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 < 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 < 0 ))' + + test ${ARITH_BITS} -ge 40 && + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1BEEFF00D < 0x1FACECAFE ))' + + return 0 +} +atf_test_case elementary_le +elementary_le_head() +{ + atf_set "descr" "Tests that simple less or equal test works as expected" +} +elementary_le_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 <= 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 <= 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 <= 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 <= 10 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 100 <= 101 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xA1 <= 161 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 <= 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( -100 <= -200 ))' + + test ${ARITH_BITS} -ge 40 && + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'cost=; AUD=; echo $(( $cost 0x2FEEDBABE <= $AUD 12866927294 ))' + + return 0 +} +atf_test_case elementary_gt +elementary_gt_head() +{ + atf_set "descr" "Tests that simple greater than works as expected" +} +elementary_gt_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 > 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 > -1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 11 > 012 ))' + + # atf_expect_fail "PR bin/50959" + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2147483647 > 0X7FFFFF0 ))' + # atf_expect_pass + + test ${ARITH_BITS} -gt 32 && + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x80000000 > 0x7FFFFFFF ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 > 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 > 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 > 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 > 10 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2015 > 2016 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xA1 > 200 ))' + + test ${ARITH_BITS} -ge 44 && + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x7F07F07F0 > 34099628014 ))' + + return 0 +} +atf_test_case elementary_ge +elementary_ge_head() +{ + atf_set "descr" "Tests that simple greater or equal works as expected" +} +elementary_ge_body() +{ + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 >= 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 >= 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( -100 >= -101 ))' + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( -1 >= 0 ))' +} + +atf_test_case fiddle_bits_and +fiddle_bits_and_head() +{ + atf_set "descr" "Test bitwise and operations in arithmetic expressions" +} +fiddle_bits_and_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 & 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 & 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 & 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 & 1 ))' + + atf_check -s exit:0 -o inline:'255\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xFF & 0xFF ))' + atf_check -s exit:0 -o inline:'255\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xFFFF & 0377 ))' + + test "${ARITH_BITS}" -ge 48 && + atf_check -s exit:0 -o inline:'70377641607203\n' -e empty \ + ${TEST_SH} -c 'echo $(( 0x5432FEDC0123 & 0x42871357BAB3 ))' + + return 0 +} +atf_test_case fiddle_bits_or +fiddle_bits_or_head() +{ + atf_set "descr" "Test bitwise or operations in arithmetic expressions" +} +fiddle_bits_or_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 | 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 | 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 | 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 | 1 ))' + + atf_check -s exit:0 -o inline:'4369\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1111 | 0x1111 ))' + atf_check -s exit:0 -o inline:'255\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xAA | 0125 ))' + + test "${ARITH_BITS}" -ge 48 && + atf_check -s exit:0 -o inline:'95348271856563\n' -e empty \ + ${TEST_SH} -c 'echo $(( 0x5432FEDC0123 | 0x42871357BAB3 ))' + + return 0 +} +atf_test_case fiddle_bits_xor +fiddle_bits_xor_head() +{ + atf_set "descr" "Test bitwise xor operations in arithmetic expressions" +} +fiddle_bits_xor_body() +{ + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 ^ 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 ^ 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 ^ 1 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 ^ 1 ))' + + atf_check -s exit:0 -o inline:'255\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xF0 ^ 0x0F ))' + atf_check -s exit:0 -o inline:'15\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xF0 ^ 0xFF ))' + + test "${ARITH_BITS}" -ge 48 && + atf_check -s exit:0 -o inline:'24970630249360\n' -e empty \ + ${TEST_SH} -c 'echo $(( 0x5432FEDC0123 ^ 0x42871357BAB3 ))' + + return 0 +} + +atf_test_case logical_and +logical_and_head() +{ + atf_set "descr" "Test logical and operations in arithmetic expressions" +} +logical_and_body() +{ + # cannot test short-circuit eval until sh implements side effects... + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 && 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 && 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 && 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 && 1 ))' + + # atf_expect_fail "PR bin/50960" + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1111 && 01234 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0xFFFF && 0xF0F0 ))' +} +atf_test_case logical_or +logical_or_head() +{ + atf_set "descr" "Test logical or operations in arithmetic expressions" +} +logical_or_body() +{ + # cannot test short-circuit eval until sh implements side effects... + + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 || 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 || 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 || 1 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 || 1 ))' + + # atf_expect_fail "PR bin/50960" + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1111 || 01234 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x33 || 0xF0F0 ))' +} + +atf_test_case make_selection +make_selection_head() +{ + atf_set "descr" "Test ?: operator in arithmetic expressions" +} +make_selection_body() +{ + # atf_expect_fail "PR bin/50958" + + atf_check -s exit:0 -o inline:'3\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0 ? 2 : 3 ))' + atf_check -s exit:0 -o inline:'2\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 ? 2 : 3 ))' + + atf_check -s exit:0 -o inline:'111\n' -e empty ${TEST_SH} -c \ + 'echo $(( 0x1234 ? 111 : 222 ))' + + atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 < 2 ? -1 : 1 > 2 ? 1 : 0 ))' + atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \ + 'echo $(( 1 < 1 ? -1 : 1 > 1 ? 1 : 0 ))' + atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \ + 'echo $(( 2 < 1 ? -1 : 2 > 1 ? 1 : 0 ))' +} + +atf_test_case operator_precedence +operator_precedence_head() +{ + atf_set "descr" "Test operator precedence without parentheses" +} +operator_precedence_body() +{ + # NB: apart from $(( )) ** NO ** parentheses in the expressions. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 10 01:18:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E4CCCD8A54; Fri, 10 Feb 2017 01:18:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 436A01031; Fri, 10 Feb 2017 01:18:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A1IFc9068186; Fri, 10 Feb 2017 01:18:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A1IFOD068185; Fri, 10 Feb 2017 01:18:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702100118.v1A1IFOD068185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 01:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313499 - stable/11/contrib/elftoolchain/libelftc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 01:18:16 -0000 Author: emaste Date: Fri Feb 10 01:18:15 2017 New Revision: 313499 URL: https://svnweb.freebsd.org/changeset/base/313499 Log: MFC r311946: readelf: add S390 relocation types From https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.html Modified: stable/11/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Fri Feb 10 01:13:12 2017 (r313498) +++ stable/11/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Fri Feb 10 01:18:15 2017 (r313499) @@ -664,6 +664,37 @@ elftc_reloc_type_str(unsigned int mach, case 48: return "R_RISCV_GPREL_S"; } break; + case EM_S390: + switch (type) { + case 0: return "R_390_NONE"; + case 1: return "R_390_8"; + case 2: return "R_390_12"; + case 3: return "R_390_16"; + case 4: return "R_390_32"; + case 5: return "R_390_PC32"; + case 6: return "R_390_GOT12"; + case 7: return "R_390_GOT32"; + case 8: return "R_390_PLT32"; + case 9: return "R_390_COPY"; + case 10: return "R_390_GLOB_DAT"; + case 11: return "R_390_JMP_SLOT"; + case 12: return "R_390_RELATIVE"; + case 13: return "R_390_GOTOFF"; + case 14: return "R_390_GOTPC"; + case 15: return "R_390_GOT16"; + case 16: return "R_390_PC16"; + case 17: return "R_390_PC16DBL"; + case 18: return "R_390_PLT16DBL"; + case 19: return "R_390_PC32DBL"; + case 20: return "R_390_PLT32DBL"; + case 21: return "R_390_GOTPCDBL"; + case 22: return "R_390_64"; + case 23: return "R_390_PC64"; + case 24: return "R_390_GOT64"; + case 25: return "R_390_PLT64"; + case 26: return "R_390_GOTENT"; + } + break; case EM_SPARC: case EM_SPARCV9: switch(type) { From owner-svn-src-all@freebsd.org Fri Feb 10 01:26:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 573CCCD8D29; Fri, 10 Feb 2017 01:26:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1239814B9; Fri, 10 Feb 2017 01:26:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A1QoRJ072141; Fri, 10 Feb 2017 01:26:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A1Qo7h072140; Fri, 10 Feb 2017 01:26:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100126.v1A1Qo7h072140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 01:26: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: r313500 - stable/10/contrib/netbsd-tests/lib/libc/rpc 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 01:26:51 -0000 Author: ngie Date: Fri Feb 10 01:26:49 2017 New Revision: 313500 URL: https://svnweb.freebsd.org/changeset/base/313500 Log: Expect :raw to fail with a SIGSEGV on ^/stable/10 I haven't fully dug into why this happens, but it happens deterministically on ^/stable/10, but not on ^/stable/11 or ^/head PR: 216954 Sponsored by: Dell EMC Isilon Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Fri Feb 10 01:18:15 2017 (r313499) +++ stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Fri Feb 10 01:26:49 2017 (r313500) @@ -45,6 +45,12 @@ __RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/ #define RPCBPROC_NULL 0 +/* XXX (ngie): for clarity on what needs to be reverted later. */ +#define __FreeBSD_bug_216954__ +#ifdef __FreeBSD_bug_216954__ +#include +#endif + static int reply(caddr_t replyp, struct netbuf * raddrp, struct netconfig * nconf) { @@ -337,9 +343,14 @@ ATF_TC_HEAD(raw, tc) ATF_TC_BODY(raw, tc) { #ifdef __FreeBSD__ +#ifdef __FreeBSD_bug_216954__ + atf_tc_expect_signal(SIGSEGV, + "fails with SIGSEGV only on ^/stable/10 -- bug # 216954"); +#else atf_tc_expect_fail("fails with: clnt_call: " "RPC: Can't decode result -- PR # 211804"); #endif +#endif rawtest(NULL); } From owner-svn-src-all@freebsd.org Fri Feb 10 01:59:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E68EFCD8787; Fri, 10 Feb 2017 01:59:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 996E6B1A; Fri, 10 Feb 2017 01:59:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A1xZiD084648; Fri, 10 Feb 2017 01:59:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A1xZuW084647; Fri, 10 Feb 2017 01:59:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100159.v1A1xZuW084647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 01:59: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: r313503 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 01:59:37 -0000 Author: ngie Date: Fri Feb 10 01:59:35 2017 New Revision: 313503 URL: https://svnweb.freebsd.org/changeset/base/313503 Log: Record mergeinfo for r288682 and r288683 (items that should never be MFCed) No net change Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Feb 10 02:01:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1458CD8AF1; Fri, 10 Feb 2017 02:01:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEC5D9A; Fri, 10 Feb 2017 02:01:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A21Wnh087569; Fri, 10 Feb 2017 02:01:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A21WVF087568; Fri, 10 Feb 2017 02:01:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702100201.v1A21WVF087568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 10 Feb 2017 02:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313504 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:01:33 -0000 Author: markj Date: Fri Feb 10 02:01:32 2017 New Revision: 313504 URL: https://svnweb.freebsd.org/changeset/base/313504 Log: When patching USDT probes, use non-unique names for aliases of weak symbols. Aliases are normally given names that include a key that's unique for each input object file. This, for example, ensures that aliases for identically named local symbols in different object files don't conflict. However, in some cases the static linker will leave an undefined alias after merging identical weak symbols, resulting in a link error. A non-unique name allows the aliases to be merged as well. PR: 216871 X-MFC With: r313262 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 10 01:59:35 2017 (r313503) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 10 02:01:32 2017 (r313504) @@ -261,7 +261,7 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION_ sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); + sym->st_other = 0; sym->st_shndx = SHN_UNDEF; rel++; @@ -445,7 +445,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const d sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); + sym->st_other = 0; sym->st_shndx = SHN_UNDEF; rel++; @@ -1187,6 +1187,7 @@ process_obj(dtrace_hdl_t *dtp, const cha static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; static const char dt_symfmt[] = "%s%ld.%s"; + static const char dt_weaksymfmt[] = "%s.%s"; char probename[DTRACE_NAMELEN]; int fd, i, ndx, eprobe, mod = 0; Elf *elf = NULL; @@ -1548,44 +1549,46 @@ process_obj(dtrace_hdl_t *dtp, const cha if (dt_symtab_lookup(data_sym, osym, isym, rela.r_offset, shdr_rel.sh_info, &fsym, - (emachine1 == EM_PPC64), elf) != 0 && - dt_symtab_lookup(data_sym, 0, osym, + (emachine1 == EM_PPC64), elf) == 0) { + if (fsym.st_name > data_str->d_size) + goto err; + + r = s = (char *) data_str->d_buf + fsym.st_name; + assert(strstr(s, dt_symprefix) == s); + s = strchr(s, '.') + 1; + } else if (dt_symtab_lookup(data_sym, 0, osym, rela.r_offset, shdr_rel.sh_info, &fsym, - (emachine1 == EM_PPC64), elf) != 0) - goto err; - - if (fsym.st_name > data_str->d_size) - goto err; + (emachine1 == EM_PPC64), elf) == 0) { + u_int bind; - assert(GELF_ST_TYPE(fsym.st_info) == STT_FUNC); - - /* - * If this is our first time encountering this symbol, - * emit an alias. - */ - s = (char *)data_str->d_buf + fsym.st_name; - - if (strncmp(s, dt_symprefix, - sizeof (dt_symprefix) - 1) != 0) { - u_int bind = GELF_ST_BIND(fsym.st_info); + bind = GELF_ST_BIND(fsym.st_info) == STB_WEAK ? + STB_WEAK : STB_GLOBAL; + /* + * Emit an alias for the symbol. It needs to be + * non-preemptible so that .SUNW_dof relocations + * may be resolved at static link time. Aliases + * of weak symbols are given a non-unique name + * so that they may be merged by the linker. + */ dsym = fsym; dsym.st_name = istr; - dsym.st_info = GELF_ST_INFO(bind == STB_LOCAL ? - STB_GLOBAL : bind, STT_FUNC); + dsym.st_info = GELF_ST_INFO(bind, STT_FUNC); dsym.st_other = GELF_ST_VISIBILITY(STV_HIDDEN); (void) gelf_update_sym(data_sym, isym, &dsym); r = (char *) data_str->d_buf + istr; - istr += 1 + sprintf(r, dt_symfmt, dt_symprefix, objkey, - s); + s = (char *) data_str->d_buf + fsym.st_name; + if (bind == STB_WEAK) + istr += sprintf(r, dt_weaksymfmt, + dt_symprefix, s); + else + istr += sprintf(r, dt_symfmt, + dt_symprefix, objkey, s); + istr++; isym++; assert(isym <= nsym); - } else { - r = s; - s = strchr(s, '.'); - assert(s != NULL); - s++; - } + } else + goto err; if ((pvp = dt_provider_lookup(dtp, pname)) == NULL) { return (dt_link_error(dtp, elf, fd, bufs, From owner-svn-src-all@freebsd.org Fri Feb 10 02:21:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D489CD81D4; Fri, 10 Feb 2017 02:21:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B8E21921; Fri, 10 Feb 2017 02:21:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2Lwp9096741; Fri, 10 Feb 2017 02:21:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2LvSl096737; Fri, 10 Feb 2017 02:21:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100221.v1A2LvSl096737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:21:57 +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: r313505 - in stable/10: . etc/mtree tests/sys/kqueue tests/sys/kqueue/libkqueue 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:21:59 -0000 Author: ngie Date: Fri Feb 10 02:21:57 2017 New Revision: 313505 URL: https://svnweb.freebsd.org/changeset/base/313505 Log: MFC r304797,r305467: r304797 (by jmmv): Make use of Kyua's work directories. Change the vnode tests to use the current directory when creating temporary files, which we can assume is a volatile work directory, and then make the kqueue_test.sh driver _not_ abandon the directory created by Kyua. This makes the various kqueue tests independent of each other, and ensures the temporary file is cleaned up on failure. Problem spotted by asomers@ when reviewing D4254. r305467: Move tests/sys/kqueue/... to tests/sys/kqueue/libkqueue/... This is being done to clearly distinguish the libkqueue tests from the (soon to be imported) NetBSD tests. Added: stable/10/tests/sys/kqueue/libkqueue/ - copied from r305467, head/tests/sys/kqueue/libkqueue/ Replaced: stable/10/tests/sys/kqueue/Makefile - copied unchanged from r305467, head/tests/sys/kqueue/Makefile Deleted: stable/10/tests/sys/kqueue/common.h stable/10/tests/sys/kqueue/config.h stable/10/tests/sys/kqueue/kqueue_test.sh stable/10/tests/sys/kqueue/proc.c stable/10/tests/sys/kqueue/signal.c stable/10/tests/sys/kqueue/timer.c stable/10/tests/sys/kqueue/user.c stable/10/tests/sys/kqueue/vnode.c Modified: stable/10/ObsoleteFiles.inc stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Fri Feb 10 02:01:32 2017 (r313504) +++ stable/10/ObsoleteFiles.inc Fri Feb 10 02:21:57 2017 (r313505) @@ -53,6 +53,9 @@ OLD_FILES+=usr/share/man/man4/hv_vss.4.g .endif # 20161118: Remove hv_ata_pci_disengage(4) OLD_FILES+=usr/share/man/man4/hv_ata_pci_disengage.4.gz +# 20160906: libkqueue tests moved to /usr/tests/sys/kqueue/libkqueue +OLD_FILES+=usr/tests/sys/kqueue/kqtest +OLD_FILES+=usr/tests/sys/kqueue/kqueue_test # 20160723: stale MLINK removed OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz # 20160216: Remove obsolete unbound-control-setup Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Fri Feb 10 02:01:32 2017 (r313504) +++ stable/10/etc/mtree/BSD.tests.dist Fri Feb 10 02:21:57 2017 (r313505) @@ -407,6 +407,8 @@ .. .. kqueue + libkqueue + .. .. mac bsdextended Copied: stable/10/tests/sys/kqueue/Makefile (from r305467, head/tests/sys/kqueue/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tests/sys/kqueue/Makefile Fri Feb 10 02:21:57 2017 (r313505, copy of r305467, head/tests/sys/kqueue/Makefile) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/kqueue +BINDIR= ${TESTSDIR} + +TESTS_SUBDIRS+= libkqueue + +.include From owner-svn-src-all@freebsd.org Fri Feb 10 02:27:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCAD7CD8283; Fri, 10 Feb 2017 02:27:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 929711C4A; Fri, 10 Feb 2017 02:27:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2RmAF097067; Fri, 10 Feb 2017 02:27:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2Rmee097065; Fri, 10 Feb 2017 02:27:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702100227.v1A2Rmee097065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 02:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313506 - stable/11/contrib/elftoolchain/libelftc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:27:50 -0000 Author: emaste Date: Fri Feb 10 02:27:48 2017 New Revision: 313506 URL: https://svnweb.freebsd.org/changeset/base/313506 Log: MFC r308430, r309782: libelftc: add elf{32,64}-trad{big,little}mips Modified: stable/11/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 stable/11/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 Fri Feb 10 02:21:57 2017 (r313505) +++ stable/11/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 Fri Feb 10 02:27:48 2017 (r313506) @@ -82,6 +82,8 @@ Known descriptor names and their propert .It Li elf32-shbig-linux Ta ELF Ta MSB Ta 32 .It Li elf32-shl-linux Ta ELF Ta LSB Ta 32 .It Li elf32-sparc Ta ELF Ta MSB Ta 32 +.It Li elf32-tradbigmips Ta ELF Ta MSB Ta 32 +.It Li elf32-tradlittlemips Ta ELF Ta LSB Ta 32 .It Li elf64-alpha Ta ELF Ta LSB Ta 64 .It Li elf64-alpha-freebsd Ta ELF Ta LSB Ta 64 .It Li elf64-big Ta ELF Ta MSB Ta 64 @@ -101,6 +103,8 @@ Known descriptor names and their propert .It Li elf64-sh64-linux Ta ELF Ta LSB Ta 64 .It Li elf64-sparc Ta ELF Ta MSB Ta 64 .It Li elf64-sparc-freebsd Ta ELF Ta MSB Ta 64 +.It Li elf64-tradbigmips Ta ELF Ta MSB Ta 64 +.It Li elf64-tradlittlemips Ta ELF Ta LSB Ta 64 .It Li elf64-x86-64 Ta ELF Ta LSB Ta 64 .It Li elf64-x86-64-freebsd Ta ELF Ta LSB Ta 64 .It Li ihex Ta IHEX Ta - Ta - Modified: stable/11/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Fri Feb 10 02:21:57 2017 (r313505) +++ stable/11/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Fri Feb 10 02:27:48 2017 (r313506) @@ -195,6 +195,22 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf32-tradbigmips", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS32, + .bt_machine = EM_MIPS, + }, + + { + .bt_name = "elf32-tradlittlemips", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2LSB, + .bt_elfclass = ELFCLASS32, + .bt_machine = EM_MIPS, + }, + + { .bt_name = "elf64-alpha", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, @@ -351,6 +367,22 @@ struct _Elftc_Bfd_Target _libelftc_targe }, { + .bt_name = "elf64-tradbigmips", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_MIPS, + }, + + { + .bt_name = "elf64-tradlittlemips", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2LSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_MIPS, + }, + + { .bt_name = "elf64-x86-64", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2LSB, From owner-svn-src-all@freebsd.org Fri Feb 10 02:29:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF13ECD8315; Fri, 10 Feb 2017 02:29:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB9551D93; Fri, 10 Feb 2017 02:29:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2T95S097160; Fri, 10 Feb 2017 02:29:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2T9X5097159; Fri, 10 Feb 2017 02:29:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100229.v1A2T9X5097159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:29: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: r313507 - stable/10/tests/sys/kqueue/libkqueue 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:29:11 -0000 Author: ngie Date: Fri Feb 10 02:29:09 2017 New Revision: 313507 URL: https://svnweb.freebsd.org/changeset/base/313507 Log: Remove EVFILT_PROCDESC block This reapplies the patch that was done in ^/stable/10@r297977 This is a direct commit to ^/stable/10 Sponsored by: Dell EMC Isilon Modified: stable/10/tests/sys/kqueue/libkqueue/main.c Modified: stable/10/tests/sys/kqueue/libkqueue/main.c ============================================================================== --- stable/10/tests/sys/kqueue/libkqueue/main.c Fri Feb 10 02:27:48 2017 (r313506) +++ stable/10/tests/sys/kqueue/libkqueue/main.c Fri Feb 10 02:29:09 2017 (r313507) @@ -113,12 +113,6 @@ kevent_fflags_dump(struct kevent *kev) KEVFFL_DUMP(NOTE_TRACKERR); KEVFFL_DUMP(NOTE_TRACK); buf[strlen(buf) - 1] = ')'; - } else if (kev->filter == EVFILT_PROCDESC) { - snprintf(buf, 1024, "fflags = %x (", kev->fflags); - KEVFFL_DUMP(NOTE_EXIT); - KEVFFL_DUMP(NOTE_FORK); - KEVFFL_DUMP(NOTE_EXEC); - buf[strlen(buf) - 1] = ')'; } else if (kev->filter == EVFILT_VNODE) { snprintf(buf, 1024, "fflags = %x (", kev->fflags); KEVFFL_DUMP(NOTE_DELETE); From owner-svn-src-all@freebsd.org Fri Feb 10 02:29:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84080CD8372; Fri, 10 Feb 2017 02:29:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD241EC1; Fri, 10 Feb 2017 02:29:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2TekO097235; Fri, 10 Feb 2017 02:29:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2TdUf097230; Fri, 10 Feb 2017 02:29:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100229.v1A2TdUf097230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:29: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: r313508 - in stable/10: contrib/netbsd-tests/kernel/kqueue tests/sys/kqueue 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:29:41 -0000 Author: ngie Date: Fri Feb 10 02:29:39 2017 New Revision: 313508 URL: https://svnweb.freebsd.org/changeset/base/313508 Log: MFC r305468: Port contrib/netbsd-tests/kernel/kqueue/... as tests/sys/kqueue/... proc2_test must be skipped because the invariant tested (`ke.fflags & NOTE_TRACKERR`) doesn't pass. Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc2.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc3.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c stable/10/contrib/netbsd-tests/kernel/kqueue/t_vnode.c stable/10/tests/sys/kqueue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc2.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc2.c Fri Feb 10 02:29:09 2017 (r313507) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc2.c Fri Feb 10 02:29:39 2017 (r313508) @@ -34,6 +34,9 @@ __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); __RCSID("$NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc3.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc3.c Fri Feb 10 02:29:09 2017 (r313507) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/t_proc3.c Fri Feb 10 02:29:39 2017 (r313508) @@ -32,6 +32,9 @@ #include __RCSID("$NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c Fri Feb 10 02:29:09 2017 (r313507) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/t_sig.c Fri Feb 10 02:29:39 2017 (r313508) @@ -34,6 +34,9 @@ __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); __RCSID("$NetBSD: t_sig.c,v 1.2 2010/11/03 16:10:20 christos Exp $"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include @@ -60,9 +63,13 @@ ATF_TC_HEAD(sig, tc) ATF_TC_BODY(sig, tc) { struct timespec timeout; +#ifdef __NetBSD__ struct kfilter_mapping km; +#endif struct kevent event[1]; +#ifdef __NetBSD__ char namebuf[32]; +#endif pid_t pid, child; int kq, n, num, status; @@ -84,16 +91,22 @@ ATF_TC_BODY(sig, tc) RL(kq = kqueue()); +#ifdef __NetBSD__ (void)strlcpy(namebuf, "EVFILT_SIGNAL", sizeof(namebuf)); km.name = namebuf; RL(ioctl(kq, KFILTER_BYNAME, &km)); (void)printf("got %d as filter number for `%s'.\n", km.filter, km.name); +#endif /* ignore the signal to avoid taking it for real */ REQUIRE_LIBC(signal(SIGUSR1, SIG_IGN), SIG_ERR); event[0].ident = SIGUSR1; +#ifdef __NetBSD__ event[0].filter = km.filter; +#else + event[0].filter = EVFILT_SIGNAL; +#endif event[0].flags = EV_ADD | EV_ENABLE; RL(kevent(kq, event, 1, NULL, 0, NULL)); Modified: stable/10/contrib/netbsd-tests/kernel/kqueue/t_vnode.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/kqueue/t_vnode.c Fri Feb 10 02:29:09 2017 (r313507) +++ stable/10/contrib/netbsd-tests/kernel/kqueue/t_vnode.c Fri Feb 10 02:29:39 2017 (r313508) @@ -1,3 +1,6 @@ +#ifdef __FreeBSD__ +#include +#endif #include #include #include Modified: stable/10/tests/sys/kqueue/Makefile ============================================================================== --- stable/10/tests/sys/kqueue/Makefile Fri Feb 10 02:29:09 2017 (r313507) +++ stable/10/tests/sys/kqueue/Makefile Fri Feb 10 02:29:39 2017 (r313508) @@ -1,8 +1,20 @@ # $FreeBSD$ +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel/kqueue + TESTSDIR= ${TESTSBASE}/sys/kqueue BINDIR= ${TESTSDIR} +NETBSD_ATF_TESTS_C= proc1_test +# XXX: fails `ke.fflags & NOTE_TRACKERR` invariant +#NETBSD_ATF_TESTS_C+= proc2_test +NETBSD_ATF_TESTS_C+= proc3_test +NETBSD_ATF_TESTS_C+= sig_test +NETBSD_ATF_TESTS_C+= vnode_test + +WARNS?= 3 + TESTS_SUBDIRS+= libkqueue +.include .include From owner-svn-src-all@freebsd.org Fri Feb 10 02:37:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF109CD858A; Fri, 10 Feb 2017 02:37:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B6093B5; Fri, 10 Feb 2017 02:37:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2bgZr001460; Fri, 10 Feb 2017 02:37:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2bgJr001459; Fri, 10 Feb 2017 02:37:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100237.v1A2bgJr001459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:37: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: r313509 - stable/10/contrib/netbsd-tests/lib/libc/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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:37:43 -0000 Author: ngie Date: Fri Feb 10 02:37:42 2017 New Revision: 313509 URL: https://svnweb.freebsd.org/changeset/base/313509 Log: MFC r288444: This change has no functional impact on ^/stable/10 because arm64 isn't supported on 10.x, but it is being done to ease additional backports in this test r288444 (by andrew): Pass 8 arguments to makecontext on arm64 as this is all we support. Obtained from: EuroBSDCon Devsummit Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Fri Feb 10 02:29:39 2017 (r313508) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Fri Feb 10 02:37:42 2017 (r313509) @@ -53,6 +53,8 @@ run(int n, ...) va_start(va, n); #if defined(__FreeBSD__) && defined(__amd64__) for (i = 0; i < 5; i++) { +#elif defined(__FreeBSD__) && defined(__aarch64__) + for (i = 0; i < 7; i++) { #elif defined(__FreeBSD__) && defined(__mips__) for (i = 0; i < 5; i++) { #else @@ -118,6 +120,10 @@ ATF_TC_BODY(setcontext_link, tc) /* FreeBSD/amd64 only permits up to 6 arguments. */ makecontext(&uc[i], (void *)run, 6, i, 0, 1, 2, 3, 4); +#elif defined(__FreeBSD__) && defined(__aarch64__) + /* FreeBSD/arm64 only permits up to 8 arguments. */ + makecontext(&uc[i], (void *)run, 8, i, + 0, 1, 2, 3, 4, 5, 6); #elif defined(__FreeBSD__) && defined(__mips__) /* FreeBSD/mips only permits up to 6 arguments. */ makecontext(&uc[i], (void *)run, 6, i, From owner-svn-src-all@freebsd.org Fri Feb 10 02:41:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE732CD8628; Fri, 10 Feb 2017 02:41:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E2982D; Fri, 10 Feb 2017 02:41:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2fXZq004457; Fri, 10 Feb 2017 02:41:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2fXpJ004456; Fri, 10 Feb 2017 02:41:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100241.v1A2fXpJ004456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:41: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: r313510 - stable/10/contrib/netbsd-tests/lib/libc/db 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:41:34 -0000 Author: ngie Date: Fri Feb 10 02:41:33 2017 New Revision: 313510 URL: https://svnweb.freebsd.org/changeset/base/313510 Log: MFC r301753: Fix up r274061 Detect /usr/share/dict/words the "right way" by using require.files instead of the hacked up attempt in the dict(..) function, which didn't work properly on systems where MK_DICT == no. Modified: stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh Fri Feb 10 02:37:42 2017 (r313509) +++ stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh Fri Feb 10 02:41:33 2017 (r313510) @@ -42,6 +42,7 @@ dict() elif [ -f /usr/dict/words ]; then echo /usr/dict/words else + echo "" atf_fail "no dictionary found" fi } @@ -49,12 +50,7 @@ dict() # Begin FreeBSD dict() { - if [ -f /usr/share/dict/words ]; then - echo /usr/share/dict/words - else - echo /nonexistent - atf_skip "Test requires dict/words" - fi + echo /usr/share/dict/words } # End FreeBSD @@ -67,6 +63,9 @@ small_btree_head() "Checks btree database using small keys and small data" \ "pairs: takes the first hundred entries in the dictionary," \ "and makes them be key/data pairs." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_btree_body() { @@ -93,6 +92,9 @@ small_hash_head() "Checks hash database using small keys and small data" \ "pairs: takes the first hundred entries in the dictionary," \ "and makes them be key/data pairs." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_hash_body() { @@ -119,6 +121,9 @@ small_recno_head() "Checks recno database using small keys and small data" \ "pairs: takes the first hundred entries in the dictionary," \ "and makes them be key/data pairs." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_recno_body() { @@ -143,6 +148,9 @@ medium_btree_head() "Checks btree database using small keys and medium" \ "data pairs: takes the first 200 entries in the" \ "dictionary, and gives them each a medium size data entry." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } medium_btree_body() { @@ -171,6 +179,9 @@ medium_hash_head() "Checks hash database using small keys and medium" \ "data pairs: takes the first 200 entries in the" \ "dictionary, and gives them each a medium size data entry." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } medium_hash_body() { @@ -736,6 +747,9 @@ small_page_btree_head() "reverses them, and gives them each a small size data" \ "entry. Uses a small page size to make sure the btree" \ "split code gets hammered." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_page_btree_body() { @@ -789,6 +803,9 @@ atf_test_case byte_orders_btree byte_orders_btree_head() { atf_set "descr" "Checks btree database using differing byte orders" + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } byte_orders_btree_body() { @@ -821,6 +838,9 @@ bsize_ffactor_head() atf_set "timeout" "1800" atf_set "descr" "Checks hash database with various" \ "bucketsizes and fill factors" + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } bsize_ffactor_body() { From owner-svn-src-all@freebsd.org Fri Feb 10 02:44:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73806CD8806; Fri, 10 Feb 2017 02:44:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 434BEB39; Fri, 10 Feb 2017 02:44:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2i9Gm005592; Fri, 10 Feb 2017 02:44:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2i9h0005591; Fri, 10 Feb 2017 02:44:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100244.v1A2i9h0005591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:44: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: r313511 - stable/10/contrib/netbsd-tests/lib/libc/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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:44:10 -0000 Author: ngie Date: Fri Feb 10 02:44:09 2017 New Revision: 313511 URL: https://svnweb.freebsd.org/changeset/base/313511 Log: MFC r303840: r303840 (by jhb): Add timer_settime tests using SIGEV_THREAD. Note that these tests should work fine on NetBSD and other systems as SIGEV_THREAD is POSIX. Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Fri Feb 10 02:41:33 2017 (r313510) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Fri Feb 10 02:44:09 2017 (r313511) @@ -116,6 +116,61 @@ timer_signal_create(clockid_t cid, bool ATF_REQUIRE(timer_delete(t) == 0); } +#ifdef __FreeBSD__ +static void +timer_callback(union sigval value) +{ + timer_t *tp; + + tp = value.sival_ptr; + + if (*tp == t) + fail = false; +} + +static void +timer_thread_create(clockid_t cid, bool expire) +{ + struct itimerspec tim; + struct sigevent evt; + + t = 0; + fail = true; + + (void)memset(&evt, 0, sizeof(struct sigevent)); + (void)memset(&tim, 0, sizeof(struct itimerspec)); + + /* + * Create the timer (SIGEV_THREAD). + */ + evt.sigev_notify_function = timer_callback; + evt.sigev_value.sival_ptr = &t; + evt.sigev_notify = SIGEV_THREAD; + + ATF_REQUIRE(timer_create(cid, &evt, &t) == 0); + + /* + * Start the timer. + */ + tim.it_value.tv_sec = expire ? 5 : 1; + tim.it_value.tv_nsec = 0; + + ATF_REQUIRE(timer_settime(t, 0, &tim, NULL) == 0); + + (void)sleep(2); + + if (expire) { + if (!fail) + atf_tc_fail("timer fired too soon"); + } else { + if (fail) + atf_tc_fail("timer failed to fire"); + } + + ATF_REQUIRE(timer_delete(t) == 0); +} +#endif + ATF_TC(timer_create_err); ATF_TC_HEAD(timer_create_err, tc) { @@ -198,6 +253,64 @@ ATF_TC_BODY(timer_create_mono_expire, tc timer_signal_create(CLOCK_MONOTONIC, true); } +ATF_TC(timer_thread_create_real); +ATF_TC_HEAD(timer_thread_create_real, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_REALTIME and sigevent(3), " + "SIGEV_THREAD"); +} + +#ifdef __FreeBSD__ +ATF_TC_BODY(timer_thread_create_real, tc) +{ + timer_thread_create(CLOCK_REALTIME, false); +} + +ATF_TC(timer_thread_create_mono); +ATF_TC_HEAD(timer_thread_create_mono, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_MONOTONIC and sigevent(3), " + "SIGEV_THREAD"); +} + +ATF_TC_BODY(timer_thread_create_mono, tc) +{ + timer_thread_create(CLOCK_MONOTONIC, false); +} + +ATF_TC(timer_thread_create_real_expire); +ATF_TC_HEAD(timer_thread_create_real_expire, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_REALTIME and sigevent(3), " + "SIGEV_THREAD, with expiration"); +} + +ATF_TC_BODY(timer_thread_create_real_expire, tc) +{ + timer_thread_create(CLOCK_REALTIME, true); +} + +ATF_TC(timer_thread_create_mono_expire); +ATF_TC_HEAD(timer_thread_create_mono_expire, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_MONOTONIC and sigevent(3), " + "SIGEV_THREAD, with expiration"); +} + +ATF_TC_BODY(timer_thread_create_mono_expire, tc) +{ + timer_thread_create(CLOCK_MONOTONIC, true); +} +#endif + ATF_TP_ADD_TCS(tp) { @@ -206,6 +319,12 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, timer_create_mono); ATF_TP_ADD_TC(tp, timer_create_real_expire); ATF_TP_ADD_TC(tp, timer_create_mono_expire); +#ifdef __FreeBSD__ + ATF_TP_ADD_TC(tp, timer_thread_create_real); + ATF_TP_ADD_TC(tp, timer_thread_create_mono); + ATF_TP_ADD_TC(tp, timer_thread_create_real_expire); + ATF_TP_ADD_TC(tp, timer_thread_create_mono_expire); +#endif return atf_no_error(); } From owner-svn-src-all@freebsd.org Fri Feb 10 02:47:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15C22CD8CAE; Fri, 10 Feb 2017 02:47:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBB39DC7; Fri, 10 Feb 2017 02:47:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2lWwL005866; Fri, 10 Feb 2017 02:47:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2lWGN005865; Fri, 10 Feb 2017 02:47:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100247.v1A2lWGN005865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:47: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: r313512 - stable/10/contrib/netbsd-tests/fs/tmpfs 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:47:34 -0000 Author: ngie Date: Fri Feb 10 02:47:32 2017 New Revision: 313512 URL: https://svnweb.freebsd.org/changeset/base/313512 Log: MFC r306038: Port vnd_test to FreeBSD Use mdmfs/mdconfig instead of vndconfig/newfs. vndconfig doesn't exist on FreeBSD. TODO: need to parameterize out the md(4) device as it's currently hardcoded to "3" (in both the FreeBSD and NetBSD cases). Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Fri Feb 10 02:44:09 2017 (r313511) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Fri Feb 10 02:47:32 2017 (r313512) @@ -38,12 +38,21 @@ basic_body() { atf_check -s eq:0 -o ignore -e ignore \ dd if=/dev/zero of=disk.img bs=1m count=10 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mkdir mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img atf_check -s eq:0 -o ignore -e ignore newfs /dev/rvnd3a atf_check -s eq:0 -o empty -e empty mkdir mnt atf_check -s eq:0 -o empty -e empty mount /dev/vnd3a mnt + # Begin FreeBSD + fi + # End FreeBSD echo "Creating test files" for f in $(jot -w %u 100 | uniq); do @@ -58,7 +67,15 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 + else + # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 + # Begin FreeBSD + fi + # End FreeBSD test_unmount touch done @@ -66,7 +83,15 @@ basic_body() { basic_cleanup() { if [ ! -f done ]; then umount mnt 2>/dev/null 1>&2 + # Begin FreeBSD + if true; then + atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 + else + # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 + # Begin FreeBSD + fi + # End FreeBSD fi } From owner-svn-src-all@freebsd.org Fri Feb 10 02:48:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D40FCCD8D30; Fri, 10 Feb 2017 02:48:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A307FEF1; Fri, 10 Feb 2017 02:48:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2mO18005961; Fri, 10 Feb 2017 02:48:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2mORU005960; Fri, 10 Feb 2017 02:48:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100248.v1A2mORU005960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:48: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: r313513 - stable/10/contrib/netbsd-tests/lib/libc/string 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:48:25 -0000 Author: ngie Date: Fri Feb 10 02:48:24 2017 New Revision: 313513 URL: https://svnweb.freebsd.org/changeset/base/313513 Log: MFC r306784: r306784 (by emaste): Add test for a musl libc memmem bug With a short needle (aka little) musl's memmem could read past the end of the haystack (aka big). This was fixed in musl commit c718f9f. Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Fri Feb 10 02:47:32 2017 (r313512) +++ stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c Fri Feb 10 02:48:24 2017 (r313513) @@ -51,6 +51,8 @@ char p6[] = "9"; int lp6 = 1; char p7[] = "654"; int lp7 = 3; +char p8[] = "89abc"; +int lp8 = 5; char b0[] = ""; int lb0 = 0; @@ -94,6 +96,7 @@ ATF_TC_BODY(memmem_basic, tc) expect(memmem(b2, lb2, p4, lp4) == NULL); expect(memmem(b2, lb2, p7, lp7) == NULL); + expect(memmem(b2, lb2, p8, lp8) == NULL); } ATF_TP_ADD_TCS(tp) From owner-svn-src-all@freebsd.org Fri Feb 10 02:51:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53847CD8EBF; Fri, 10 Feb 2017 02:51:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25D6B1270; Fri, 10 Feb 2017 02:51:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2psSe006970; Fri, 10 Feb 2017 02:51:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2prXG006967; Fri, 10 Feb 2017 02:51:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100251.v1A2prXG006967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:51: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: r313514 - stable/10/contrib/netbsd-tests/fs/tmpfs 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:51:55 -0000 Author: ngie Date: Fri Feb 10 02:51:53 2017 New Revision: 313514 URL: https://svnweb.freebsd.org/changeset/base/313514 Log: MFC r307190,r307196,r307204,r307205: r307190: Skip :uchg on FreeBSD Unfortunately removing files with uchg set always succeeds with root on FreeBSD. Unfortunately running the test as an unprivileged user isn't doable because mounting tmpfs requires root PR: 212861 r307196: Port contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD - Add inttypes.h #include for PRId64 macro - Use FreeBSD's copy of getfh(2), which doesn't include a `fh_size` parameter. Use sizeof(fhandle_t) instead as the size of fhp is always fixed as fhandle_t, unlike NetBSD's copy of fhp, which is void*. r307204: Expect :large to fail on FreeBSD FreeBSD doesn't appear to validate large -o size values like NetBSD does PR: 212862 r307205: Change atf_skip call to atf_expect_fail to make it clear that a failure is expected PR: 212861 Suggested by: jmmv Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Fri Feb 10 02:48:24 2017 (r313513) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Fri Feb 10 02:51:53 2017 (r313514) @@ -50,6 +50,10 @@ #include #include +#ifdef __FreeBSD__ +#include +#endif + /* --------------------------------------------------------------------- */ static int getfh_main(int, char **); @@ -70,7 +74,12 @@ getfh_main(int argc, char **argv) if (argc < 2) return EXIT_FAILURE; +#ifdef __FreeBSD__ + fh_size = sizeof(fhandle_t); +#else fh_size = 0; +#endif + fh = NULL; for (;;) { if (fh_size) { @@ -85,7 +94,11 @@ getfh_main(int argc, char **argv) * but it may change if someone moves things around, * so retry untill we have enough memory. */ +#ifdef __FreeBSD__ + error = getfh(argv[1], fh); +#else error = getfh(argv[1], fh, &fh_size); +#endif if (error == 0) { break; } else { Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Fri Feb 10 02:48:24 2017 (r313513) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Fri Feb 10 02:51:53 2017 (r313514) @@ -93,7 +93,18 @@ negative_body() { test_unmount } +# Begin FreeBSD +if true; then +atf_test_case large cleanup +large_cleanup() { + umount -f tmp 2>/dev/null +} +else +# End FreeBSD atf_test_case large +# Begin FreeBSD +fi +# End FreeBSD large_head() { atf_set "descr" "Tests that extremely long values passed to -s" \ "are handled correctly" @@ -103,6 +114,10 @@ large_body() { test_mount -o -s9223372036854775807 test_unmount + # Begin FreeBSD + atf_expect_fail "-o -s succeeds unexpectedly on FreeBSD - bug 212862" + # End FreeBSD + mkdir tmp atf_check -s eq:1 -o empty -e ignore \ mount -t tmpfs -o -s9223372036854775808 tmpfs tmp Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Fri Feb 10 02:48:24 2017 (r313513) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Fri Feb 10 02:51:53 2017 (r313514) @@ -46,13 +46,28 @@ single_body() { test_unmount } +# Begin FreeBSD +if true; then +atf_test_case uchg cleanup +uchg_cleanup() { + Mount_Point=$(pwd)/mntpt test_unmount || : +} +else +# End FreeBSD atf_test_case uchg +# Begin FreeBSD +fi +# End FreeBSD uchg_head() { atf_set "descr" "Checks that files with the uchg flag set cannot" \ "be removed" atf_set "require.user" "root" } uchg_body() { + # Begin FreeBSD + atf_expect_fail "this fails on FreeBSD with root - bug 212861" + # End FreeBSD + test_mount atf_check -s eq:0 -o empty -e empty touch a From owner-svn-src-all@freebsd.org Fri Feb 10 02:53:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96975CD8FC2; Fri, 10 Feb 2017 02:53:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62CCE1593; Fri, 10 Feb 2017 02:53:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2rGto010087; Fri, 10 Feb 2017 02:53:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2rGPV010086; Fri, 10 Feb 2017 02:53:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100253.v1A2rGPV010086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:53: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: r313515 - stable/10/contrib/netbsd-tests/lib/libpthread 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:53:17 -0000 Author: ngie Date: Fri Feb 10 02:53:16 2017 New Revision: 313515 URL: https://svnweb.freebsd.org/changeset/base/313515 Log: MFC r307553,r307583: r307553 (by br): Skip test on MIPS as it modifies TLS pointer in set_mcontext(). Discussed with: kib r307583 (by br): Skip test on FreeBSD only. So test can be upstreamed to NetBSD. Requested by: ngie Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Fri Feb 10 02:51:53 2017 (r313514) +++ stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Fri Feb 10 02:53:16 2017 (r313515) @@ -104,6 +104,15 @@ ATF_TC_BODY(swapcontext1, tc) { pthread_t thread; +#if defined(__FreeBSD__) && defined(__mips__) + /* + * MIPS modifies TLS pointer in set_mcontext(), so + * swapping contexts obtained from different threads + * gives us different pthread_self() return value. + */ + atf_tc_skip("Platform is not supported."); +#endif + oself = (void *)&val1; nself = (void *)&val2; From owner-svn-src-all@freebsd.org Fri Feb 10 02:55:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72D33CD90D8; Fri, 10 Feb 2017 02:55:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C377181C; Fri, 10 Feb 2017 02:55:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2tX6l010418; Fri, 10 Feb 2017 02:55:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2tXcS010417; Fri, 10 Feb 2017 02:55:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100255.v1A2tXcS010417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:55: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: r313516 - stable/10/contrib/netbsd-tests/fs/tmpfs 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:55:34 -0000 Author: ngie Date: Fri Feb 10 02:55:33 2017 New Revision: 313516 URL: https://svnweb.freebsd.org/changeset/base/313516 Log: MFC r307701: Expect tests/sys/fs/tmpfs/link_test:kqueue to fail It fails with: "dir/b did not receive NOTE_LINK" Also, add needed cleanup logic to cleanup the mountpoint after the fact PR: 213662 Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh Fri Feb 10 02:53:16 2017 (r313515) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh Fri Feb 10 02:55:33 2017 (r313516) @@ -93,7 +93,18 @@ subdirs_body() { test_unmount } +# Begin FreeBSD +if true; then +atf_test_case kqueue cleanup +kqueue_cleanup() { + Mount_Point=$(pwd)/mntpt test_unmount || : +} +else +# End FreeBSD atf_test_case kqueue +# Begin FreeBSD +fi +# End FreeBSD kqueue_head() { atf_set "descr" "Verifies that creating a link raises the correct" \ "kqueue events" @@ -102,6 +113,10 @@ kqueue_head() { kqueue_body() { test_mount + # Begin FreeBSD + atf_expect_fail "fails with: dir/b did not receive NOTE_LINK - bug 213662" + # End FreeBSD + atf_check -s eq:0 -o empty -e empty mkdir dir atf_check -s eq:0 -o empty -e empty touch dir/a echo 'ln dir/a dir/b' | kqueue_monitor 2 dir dir/a From owner-svn-src-all@freebsd.org Fri Feb 10 02:57:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CAC8CD9167; Fri, 10 Feb 2017 02:57:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370431999; Fri, 10 Feb 2017 02:57:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2vcbK010569; Fri, 10 Feb 2017 02:57:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2vcKJ010565; Fri, 10 Feb 2017 02:57:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100257.v1A2vcKJ010565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:57: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: r313517 - in stable/10: contrib/netbsd-tests/lib/libc/sys lib/libc/tests/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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 02:57:39 -0000 Author: ngie Date: Fri Feb 10 02:57:37 2017 New Revision: 313517 URL: https://svnweb.freebsd.org/changeset/base/313517 Log: MFC r309373: r309373 (by bdrewery): Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired. This uses the same fix as r294894 did for the mlock test. The code from that commit is moved into a common object file which PROGS supports building first. Added: stable/10/lib/libc/tests/sys/mlock_helper.c - copied unchanged from r309373, head/lib/libc/tests/sys/mlock_helper.c Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_mlock.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c stable/10/lib/libc/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_mlock.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_mlock.c Fri Feb 10 02:55:33 2017 (r313516) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_mlock.c Fri Feb 10 02:57:37 2017 (r313517) @@ -50,86 +50,13 @@ __RCSID("$NetBSD: t_mlock.c,v 1.6 2016/0 #include #define _KMEMUSER #include + +void set_vm_max_wired(int); +void restore_vm_max_wired(void); #endif static long page = 0; -#ifdef __FreeBSD__ -#define VM_MAX_WIRED "vm.max_wired" - -static void -vm_max_wired_sysctl(int *old_value, int *new_value) -{ - size_t old_len; - size_t new_len = (new_value == NULL ? 0 : sizeof(int)); - - if (old_value == NULL) - printf("Setting the new value to %d\n", *new_value); - else { - ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, NULL, &old_len, - new_value, new_len) == 0, - "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); - } - - ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, old_value, &old_len, - new_value, new_len) == 0, - "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); - - if (old_value != NULL) - printf("Saved the old value (%d)\n", *old_value); -} - -static void -set_vm_max_wired(int new_value) -{ - FILE *fp; - int old_value; - - fp = fopen(VM_MAX_WIRED, "w"); - if (fp == NULL) { - atf_tc_skip("could not open %s for writing: %s", - VM_MAX_WIRED, strerror(errno)); - return; - } - - vm_max_wired_sysctl(&old_value, NULL); - - ATF_REQUIRE_MSG(fprintf(fp, "%d", old_value) > 0, - "saving %s failed", VM_MAX_WIRED); - - fclose(fp); - - vm_max_wired_sysctl(NULL, &new_value); -} - -static void -restore_vm_max_wired(void) -{ - FILE *fp; - int saved_max_wired; - - fp = fopen(VM_MAX_WIRED, "r"); - if (fp == NULL) { - perror("fopen failed\n"); - return; - } - - if (fscanf(fp, "%d", &saved_max_wired) != 1) { - perror("fscanf failed\n"); - fclose(fp); - return; - } - - fclose(fp); - printf("old value in %s: %d\n", VM_MAX_WIRED, saved_max_wired); - - if (saved_max_wired == 0) /* This will cripple the test host */ - return; - - vm_max_wired_sysctl(NULL, &saved_max_wired); -} -#endif - ATF_TC(mlock_clip); ATF_TC_HEAD(mlock_clip, tc) { Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Fri Feb 10 02:55:33 2017 (r313516) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Fri Feb 10 02:57:37 2017 (r313517) @@ -50,6 +50,11 @@ __RCSID("$NetBSD: t_setrlimit.c,v 1.5 20 #include #include +#ifdef __FreeBSD__ +void set_vm_max_wired(int); +void restore_vm_max_wired(void); +#endif + static void sighandler(int); static const char path[] = "setrlimit"; @@ -238,10 +243,18 @@ sighandler(int signo) _exit(EXIT_SUCCESS); } +#ifdef __FreeBSD__ +ATF_TC_WITH_CLEANUP(setrlimit_memlock); +#else ATF_TC(setrlimit_memlock); +#endif ATF_TC_HEAD(setrlimit_memlock, tc) { atf_tc_set_md_var(tc, "descr", "Test setrlimit(2), RLIMIT_MEMLOCK"); +#ifdef __FreeBSD__ + atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); + atf_tc_set_md_var(tc, "require.user", "root"); +#endif } ATF_TC_BODY(setrlimit_memlock, tc) @@ -252,6 +265,11 @@ ATF_TC_BODY(setrlimit_memlock, tc) pid_t pid; int sta; +#ifdef __FreeBSD__ + /* Set max_wired really really high to avoid EAGAIN */ + set_vm_max_wired(INT_MAX); +#endif + page = sysconf(_SC_PAGESIZE); ATF_REQUIRE(page >= 0); @@ -295,6 +313,14 @@ ATF_TC_BODY(setrlimit_memlock, tc) atf_tc_fail("RLIMIT_MEMLOCK not enforced"); } +#ifdef __FreeBSD__ +ATF_TC_CLEANUP(setrlimit_memlock, tc) +{ + + restore_vm_max_wired(); +} +#endif + ATF_TC(setrlimit_nofile_1); ATF_TC_HEAD(setrlimit_nofile_1, tc) { Modified: stable/10/lib/libc/tests/sys/Makefile ============================================================================== --- stable/10/lib/libc/tests/sys/Makefile Fri Feb 10 02:55:33 2017 (r313516) +++ stable/10/lib/libc/tests/sys/Makefile Fri Feb 10 02:57:37 2017 (r313517) @@ -68,6 +68,9 @@ LDADD.timer_create_test+= -lrt .include "../Makefile.netbsd-tests" +SRCS.mlock_test+= mlock_helper.c +SRCS.setrlimit_test+= mlock_helper.c + .if ${COMPILER_TYPE} == "gcc" WARNS?= 3 .else Copied: stable/10/lib/libc/tests/sys/mlock_helper.c (from r309373, head/lib/libc/tests/sys/mlock_helper.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/sys/mlock_helper.c Fri Feb 10 02:57:37 2017 (r313517, copy of r309373, head/lib/libc/tests/sys/mlock_helper.c) @@ -0,0 +1,114 @@ +/*- + * Copyright (C) 2016 Bryan Drewery + * 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. + */ + +/* + * Helper for mlock(3) to avoid EAGAIN errors + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include + +#define VM_MAX_WIRED "vm.max_wired" + +static void +vm_max_wired_sysctl(int *old_value, int *new_value) +{ + size_t old_len; + size_t new_len = (new_value == NULL ? 0 : sizeof(int)); + + if (old_value == NULL) + printf("Setting the new value to %d\n", *new_value); + else { + ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, NULL, &old_len, + new_value, new_len) == 0, + "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); + } + + ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, old_value, &old_len, + new_value, new_len) == 0, + "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); + + if (old_value != NULL) + printf("Saved the old value (%d)\n", *old_value); +} + +void +set_vm_max_wired(int new_value) +{ + FILE *fp; + int old_value; + + fp = fopen(VM_MAX_WIRED, "w"); + if (fp == NULL) { + atf_tc_skip("could not open %s for writing: %s", + VM_MAX_WIRED, strerror(errno)); + return; + } + + vm_max_wired_sysctl(&old_value, NULL); + + ATF_REQUIRE_MSG(fprintf(fp, "%d", old_value) > 0, + "saving %s failed", VM_MAX_WIRED); + + fclose(fp); + + vm_max_wired_sysctl(NULL, &new_value); +} + +void +restore_vm_max_wired(void) +{ + FILE *fp; + int saved_max_wired; + + fp = fopen(VM_MAX_WIRED, "r"); + if (fp == NULL) { + perror("fopen failed\n"); + return; + } + + if (fscanf(fp, "%d", &saved_max_wired) != 1) { + perror("fscanf failed\n"); + fclose(fp); + return; + } + + fclose(fp); + printf("old value in %s: %d\n", VM_MAX_WIRED, saved_max_wired); + + if (saved_max_wired == 0) /* This will cripple the test host */ + return; + + vm_max_wired_sysctl(NULL, &saved_max_wired); +} From owner-svn-src-all@freebsd.org Fri Feb 10 03:04:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6B48CD9478; Fri, 10 Feb 2017 03:04:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE55B27C; Fri, 10 Feb 2017 03:04:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A34gR3015349; Fri, 10 Feb 2017 03:04:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A34gsi015344; Fri, 10 Feb 2017 03:04:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100304.v1A34gsi015344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 03:04: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: r313518 - stable/10/contrib/netbsd-tests/fs/tmpfs 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 03:04:44 -0000 Author: ngie Date: Fri Feb 10 03:04:42 2017 New Revision: 313518 URL: https://svnweb.freebsd.org/changeset/base/313518 Log: MFC r309774,r309778,r309779,r309780: r309774: Only run mdconfig -d -u 3 if /dev/md3 exists on the system This will prevent "cleanup failures" (exit code != 0 returned) when tmpfs is not loaded r309778: Make test_unmount usable in cleanup subroutines - Duplicate test_unmount to _test_unmount - Remove atf_check calls - Call _test_unmount from test_unmount, checking the exit code at the end, and returning it to maintain the test_unmount "contract" r309779: - Ignore errors from umount - Use _test_unmount instead of test_unmount in cleanup r309780: Use _test_unmount instead of test_unmount in cleanup to avoid false positives with atf_check when tmpfs is not loaded, etc Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr Fri Feb 10 02:57:37 2017 (r313517) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/h_funcs.subr Fri Feb 10 03:04:42 2017 (r313518) @@ -59,12 +59,31 @@ test_mount() { # Unmounts the file system mounted by test_mount. # test_unmount() { + # Begin FreeBSD + _test_unmount + exit_code=$? + atf_check_equal "$exit_code" "0" + return $exit_code + # End FreeBSD cd - >/dev/null atf_check -s eq:0 -o empty -e empty umount ${Mount_Point} atf_check -s eq:0 -o empty -e empty rmdir ${Mount_Point} Mount_Point= } +# Begin FreeBSD +_test_unmount() { + if [ -z "${Mount_Point}" -o ! -d "${Mount_Point}" ]; then + return 0 + fi + + cd - >/dev/null + umount ${Mount_Point} + rmdir ${Mount_Point} + Mount_Point= +} +# End FreeBSD + # # kqueue_monitor expected_nevents file1 [.. fileN] # Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh Fri Feb 10 02:57:37 2017 (r313517) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_link.sh Fri Feb 10 03:04:42 2017 (r313518) @@ -97,7 +97,7 @@ subdirs_body() { if true; then atf_test_case kqueue cleanup kqueue_cleanup() { - Mount_Point=$(pwd)/mntpt test_unmount || : + Mount_Point=$(pwd)/mntpt _test_unmount || : } else # End FreeBSD Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Fri Feb 10 02:57:37 2017 (r313517) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Fri Feb 10 03:04:42 2017 (r313518) @@ -97,7 +97,8 @@ negative_body() { if true; then atf_test_case large cleanup large_cleanup() { - umount -f tmp 2>/dev/null + umount -f tmp 2>/dev/null || : + Mount_Point=$(pwd)/mnt _test_unmount || : } else # End FreeBSD Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Fri Feb 10 02:57:37 2017 (r313517) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Fri Feb 10 03:04:42 2017 (r313518) @@ -50,7 +50,7 @@ single_body() { if true; then atf_test_case uchg cleanup uchg_cleanup() { - Mount_Point=$(pwd)/mntpt test_unmount || : + Mount_Point=$(pwd)/mntpt _test_unmount } else # End FreeBSD Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Fri Feb 10 02:57:37 2017 (r313517) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Fri Feb 10 03:04:42 2017 (r313518) @@ -85,7 +85,7 @@ basic_cleanup() { umount mnt 2>/dev/null 1>&2 # Begin FreeBSD if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 + [ ! -c /dev/md3 ] || mdconfig -d -u 3 else # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 From owner-svn-src-all@freebsd.org Fri Feb 10 03:17:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7DCDCD96C7; Fri, 10 Feb 2017 03:17:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2C0ADA; Fri, 10 Feb 2017 03:17:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A3HBZM019669; Fri, 10 Feb 2017 03:17:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A3HBoj019665; Fri, 10 Feb 2017 03:17:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100317.v1A3HBoj019665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 03:17:11 +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: r313519 - in stable/10: etc/mtree tests/sys tests/sys/fs tests/sys/fs/tmpfs 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 03:17:12 -0000 Author: ngie Date: Fri Feb 10 03:17:11 2017 New Revision: 313519 URL: https://svnweb.freebsd.org/changeset/base/313519 Log: MFC r307702: Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite as tests/sys/fs These testcases exercise tmpfs support Added: stable/10/tests/sys/fs/ - copied from r307702, head/tests/sys/fs/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile stable/10/tests/sys/fs/Makefile stable/10/tests/sys/fs/tmpfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Fri Feb 10 03:04:42 2017 (r313518) +++ stable/10/etc/mtree/BSD.tests.dist Fri Feb 10 03:17:11 2017 (r313519) @@ -372,6 +372,10 @@ .. file .. + fs + tmpfs + .. + .. geom class concat Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Fri Feb 10 03:04:42 2017 (r313518) +++ stable/10/tests/sys/Makefile Fri Feb 10 03:17:11 2017 (r313519) @@ -8,6 +8,7 @@ TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file +TESTS_SUBDIRS+= fs TESTS_SUBDIRS+= geom TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue Modified: stable/10/tests/sys/fs/Makefile ============================================================================== --- head/tests/sys/fs/Makefile Fri Oct 21 05:24:08 2016 (r307702) +++ stable/10/tests/sys/fs/Makefile Fri Feb 10 03:17:11 2017 (r313519) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE= tests - TESTSDIR= ${TESTSBASE}/sys/fs TESTSRC= ${SRCTOP}/contrib/netbsd-tests/fs @@ -9,8 +7,8 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests #TESTS_SUBDIRS+= nullfs # XXX: needs rump TESTS_SUBDIRS+= tmpfs -${PACKAGE}FILES+= h_funcs.subr -${PACKAGE}FILESDIR= ${TESTSDIR} +FILES+= h_funcs.subr +FILESDIR= ${TESTSDIR} CLEANFILES+= h_funcs.subr CLEANFILES+= h_funcs.subr.tmp Modified: stable/10/tests/sys/fs/tmpfs/Makefile ============================================================================== --- head/tests/sys/fs/tmpfs/Makefile Fri Oct 21 05:24:08 2016 (r307702) +++ stable/10/tests/sys/fs/tmpfs/Makefile Fri Feb 10 03:17:11 2017 (r313519) @@ -35,8 +35,8 @@ NETBSD_ATF_TESTS_SH+= truncate_test NETBSD_ATF_TESTS_SH+= vnd_test NETBSD_ATF_TESTS_SH+= vnode_leak_test -${PACKAGE}FILES+= h_funcs.subr -${PACKAGE}FILESDIR= ${TESTSDIR} +FILES+= h_funcs.subr +FILESDIR= ${TESTSDIR} PROGS+= h_tools BINDIR.h_tools= ${TESTSDIR} From owner-svn-src-all@freebsd.org Fri Feb 10 03:22:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F12A3CD977F; Fri, 10 Feb 2017 03:22:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAA58DF2; Fri, 10 Feb 2017 03:22:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A3M0jk023506; Fri, 10 Feb 2017 03:22:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A3M0hu023505; Fri, 10 Feb 2017 03:22:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100322.v1A3M0hu023505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 03:22: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: r313520 - stable/10/contrib/netbsd-tests/fs/tmpfs 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 03:22:02 -0000 Author: ngie Date: Fri Feb 10 03:22:00 2017 New Revision: 313520 URL: https://svnweb.freebsd.org/changeset/base/313520 Log: MFC r311233,r311377: r311233: Fix Coverity issues - Initialize .sun_len before passing it to strlcpy and bind. - Close fd on error CID: 978283, 979581 r311377: Redo fix for CID 979581 The previous change was flawed in terms of how it calculated the buffer length for the sockaddr_un object. Use SUN_LEN where appropriate and mute the Coverity complaint by using memset(.., 0, ..) to zero out the entire structure instead of setting .sun_len to a bogus value and strlcpy'ing in the contents of argv[1]. SUN_LEN is now being passed to bind(2) as well. For some odd reason this wasn't flagged as a bug with Coverity. Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Fri Feb 10 03:17:11 2017 (r313519) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Fri Feb 10 03:22:00 2017 (r313520) @@ -243,12 +243,21 @@ sockets_main(int argc, char **argv) return EXIT_FAILURE; } +#ifdef __FreeBSD__ + memset(&addr, 0, sizeof(addr)); +#endif (void)strlcpy(addr.sun_path, argv[1], sizeof(addr.sun_path)); addr.sun_family = PF_UNIX; - +#ifdef __FreeBSD__ + error = bind(fd, (struct sockaddr *)&addr, SUN_LEN(&addr)); +#else error = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); +#endif if (error == -1) { warn("connect"); +#ifdef __FreeBSD__ + (void)close(fd); +#endif return EXIT_FAILURE; } From owner-svn-src-all@freebsd.org Fri Feb 10 03:28:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1687CD98F6; Fri, 10 Feb 2017 03:28:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59A8410EA; Fri, 10 Feb 2017 03:28:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A3S3ZN023833; Fri, 10 Feb 2017 03:28:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A3S3C3023831; Fri, 10 Feb 2017 03:28:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100328.v1A3S3C3023831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 03: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: r313521 - in stable/10/contrib/netbsd-tests/lib/libc: gen 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 03:28:04 -0000 Author: ngie Date: Fri Feb 10 03:28:03 2017 New Revision: 313521 URL: https://svnweb.freebsd.org/changeset/base/313521 Log: MFC r311229,r311244: r311229: humanize_number_basic: don't leak buf CID: 1251407 r311244: mmap_prot_3, mmap_truncate, mmap_truncate_signal: don't leak fd and map CID: 978306, 1251406, 1288196, 1300541 Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Fri Feb 10 03:22:00 2017 (r313520) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Fri Feb 10 03:28:03 2017 (r313521) @@ -247,6 +247,9 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } +#ifdef __FreeBSD__ + free(buf); +#endif } ATF_TC(humanize_number_big); Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_mmap.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Fri Feb 10 03:22:00 2017 (r313520) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Fri Feb 10 03:28:03 2017 (r313521) @@ -381,9 +381,13 @@ ATF_TC_BODY(mmap_prot_3, tc) * the access should generate SIGSEGV. */ fd = open(path, O_RDWR | O_CREAT, 0700); - if (fd < 0) +#ifdef __FreeBSD__ + atf_tc_skip("opening %s failed; skipping testcase: %s", + path, strerror(errno)); +#else return; +#endif ATF_REQUIRE(write(fd, "XXX", 3) == 3); ATF_REQUIRE(close(fd) == 0); @@ -409,6 +413,9 @@ ATF_TC_BODY(mmap_prot_3, tc) ATF_REQUIRE(WIFEXITED(sta) != 0); ATF_REQUIRE(WEXITSTATUS(sta) == SIGSEGV); ATF_REQUIRE(munmap(map, 3) == 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif } ATF_TC_CLEANUP(mmap_prot_3, tc) @@ -453,6 +460,9 @@ ATF_TC_BODY(mmap_truncate, tc) ATF_REQUIRE(ftruncate(fd, page / 12) == 0); ATF_REQUIRE(ftruncate(fd, page / 64) == 0); +#ifdef __FreeBSD__ + (void)munmap(map, page); +#endif ATF_REQUIRE(close(fd) == 0); } @@ -509,6 +519,10 @@ ATF_TC_BODY(mmap_truncate_signal, tc) prevent the access to be optimized out */ ATF_REQUIRE(i == 0); ATF_REQUIRE(sta == 0); +#ifdef __FreeBSD__ + (void)munmap(map, page); + (void)close(fd); +#endif return; } From owner-svn-src-all@freebsd.org Fri Feb 10 04:28:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A002CD64C1; Fri, 10 Feb 2017 04:28:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 163F5B88; Fri, 10 Feb 2017 04:28:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A4Sjp8048375; Fri, 10 Feb 2017 04:28:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A4SjYC048374; Fri, 10 Feb 2017 04:28:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100428.v1A4SjYC048374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 04:28: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: r313522 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 04:28:46 -0000 Author: ngie Date: Fri Feb 10 04:28:44 2017 New Revision: 313522 URL: https://svnweb.freebsd.org/changeset/base/313522 Log: MFC r286536: This unbreaks "make installworld" for me on ^/stable/10 r286536 (by imp): cmp and cp are used by the kerberos install, so need to be imclided in ITOOLS. They are tiny enough that I'm not making conditional: the minuscule savings in disk space isn't worth the obfuscation of Makefile.inc1. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Feb 10 03:28:03 2017 (r313521) +++ stable/10/Makefile.inc1 Fri Feb 10 04:28:44 2017 (r313522) @@ -784,7 +784,7 @@ _zoneinfo= zic tzsetup _nmtree_itools= nmtree .endif -ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ +ITOOLS= [ awk cap_mkdb cat chflags chmod chown cmp cp \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \ rm sed sh strip sysctl test true uname wc ${_zoneinfo} \ From owner-svn-src-all@freebsd.org Fri Feb 10 05:14:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30B41CD6E1B; Fri, 10 Feb 2017 05:14:21 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDFFD1BCA; Fri, 10 Feb 2017 05:14:20 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5EKnA068224; Fri, 10 Feb 2017 05:14:20 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5EK91068223; Fri, 10 Feb 2017 05:14:20 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702100514.v1A5EK91068223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 10 Feb 2017 05:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313523 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:14:21 -0000 Author: vangyzen Date: Fri Feb 10 05:14:19 2017 New Revision: 313523 URL: https://svnweb.freebsd.org/changeset/base/313523 Log: MFC r313401 Fix garbage IP addresses in UDP log_in_vain messages If multiple threads emit a UDP log_in_vain message concurrently, or indeed call inet_ntoa() for any other reason, the IP addresses could be garbage due to concurrent usage of a single string buffer inside inet_ntoa(). Use inet_ntoa_r() with two stack buffers instead. Relnotes: yes Sponsored by: Dell EMC Modified: stable/11/sys/netinet/udp_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/udp_usrreq.c ============================================================================== --- stable/11/sys/netinet/udp_usrreq.c Fri Feb 10 04:28:44 2017 (r313522) +++ stable/11/sys/netinet/udp_usrreq.c Fri Feb 10 05:14:19 2017 (r313523) @@ -674,13 +674,13 @@ udp_input(struct mbuf **mp, int *offp, i INPLOOKUP_RLOCKPCB, ifp, m); if (inp == NULL) { if (udp_log_in_vain) { - char buf[4*sizeof "123"]; + char src[INET_ADDRSTRLEN]; + char dst[INET_ADDRSTRLEN]; - strcpy(buf, inet_ntoa(ip->ip_dst)); log(LOG_INFO, "Connection attempt to UDP %s:%d from %s:%d\n", - buf, ntohs(uh->uh_dport), inet_ntoa(ip->ip_src), - ntohs(uh->uh_sport)); + inet_ntoa_r(ip->ip_dst, dst), ntohs(uh->uh_dport), + inet_ntoa_r(ip->ip_src, src), ntohs(uh->uh_sport)); } UDPSTAT_INC(udps_noport); if (m->m_flags & (M_BCAST | M_MCAST)) { From owner-svn-src-all@freebsd.org Fri Feb 10 05:16:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EB8BCD6E9B; Fri, 10 Feb 2017 05:16:16 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7EC1D06; Fri, 10 Feb 2017 05:16:16 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5GF03068351; Fri, 10 Feb 2017 05:16:15 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5GERJ068339; Fri, 10 Feb 2017 05:16:14 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100516.v1A5GERJ068339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 05:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313524 - in head/sys: netinet 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:16:16 -0000 Author: eri Date: Fri Feb 10 05:16:14 2017 New Revision: 313524 URL: https://svnweb.freebsd.org/changeset/base/313524 Log: The patch provides the same socket option as Linux IP_ORIGDSTADDR. Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD. The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application. This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets. Sponsored-by: rsync.net Differential Revision: D9235 Reviewed-by: adrian Modified: head/sys/netinet/in.h head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_output.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6.h head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/in.h Fri Feb 10 05:16:14 2017 (r313524) @@ -433,6 +433,8 @@ __END_DECLS #define IP_BINDANY 24 /* bool: allow bind to any address */ #define IP_BINDMULTI 25 /* bool: allow multiple listeners on a tuple */ #define IP_RSS_LISTEN_BUCKET 26 /* int; set RSS listen bucket */ +#define IP_ORIGDSTADDR 27 /* bool: receive IP dst addr/port w/dgram */ +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR /* * Options for controlling the firewall and dummynet. Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:16:14 2017 (r313524) @@ -2492,6 +2492,10 @@ db_print_inpflags(int inp_flags) db_printf("%sINP_RECVDSTADDR", comma ? ", " : ""); comma = 1; } + if (inp_flags & INP_ORIGDSTADDR) { + db_printf("%sINP_ORIGDSTADDR", comma ? ", " : ""); + comma = 1; + } if (inp_flags & INP_HDRINCL) { db_printf("%sINP_HDRINCL", comma ? ", " : ""); comma = 1; Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:16:14 2017 (r313524) @@ -618,6 +618,7 @@ short inp_so_options(const struct inpcb #define INP_RECVFLOWID 0x00000100 /* populate recv datagram with flow info */ #define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */ #define INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ +#define INP_ORIGDSTADDR 0x00000800 /* receive IP dst address/port */ /* * Flags passed to in_pcblookup*() functions. Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/ip_output.c Fri Feb 10 05:16:14 2017 (r313524) @@ -1065,6 +1065,7 @@ ip_ctloutput(struct socket *so, struct s case IP_MINTTL: case IP_RECVOPTS: case IP_RECVRETOPTS: + case IP_ORIGDSTADDR: case IP_RECVDSTADDR: case IP_RECVTTL: case IP_RECVIF: @@ -1126,6 +1127,10 @@ ip_ctloutput(struct socket *so, struct s OPTSET(INP_RECVDSTADDR); break; + case IP_ORIGDSTADDR: + OPTSET2(INP_ORIGDSTADDR, optval); + break; + case IP_RECVTTL: OPTSET(INP_RECVTTL); break; @@ -1258,6 +1263,7 @@ ip_ctloutput(struct socket *so, struct s case IP_MINTTL: case IP_RECVOPTS: case IP_RECVRETOPTS: + case IP_ORIGDSTADDR: case IP_RECVDSTADDR: case IP_RECVTTL: case IP_RECVIF: @@ -1303,6 +1309,10 @@ ip_ctloutput(struct socket *so, struct s optval = OPTBIT(INP_RECVDSTADDR); break; + case IP_ORIGDSTADDR: + optval = OPTBIT2(INP_ORIGDSTADDR); + break; + case IP_RECVTTL: optval = OPTBIT(INP_RECVTTL); break; Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:16:14 2017 (r313524) @@ -304,7 +304,7 @@ udp_append(struct inpcb *inp, struct ip { struct sockaddr *append_sa; struct socket *so; - struct mbuf *opts = NULL; + struct mbuf *tmpopts, *opts = NULL; #ifdef INET6 struct sockaddr_in6 udp_in6; #endif @@ -319,7 +319,7 @@ udp_append(struct inpcb *inp, struct ip if (up->u_tun_func != NULL) { in_pcbref(inp); INP_RUNLOCK(inp); - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)udp_in, + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&udp_in[0], up->u_tun_ctx); INP_RLOCK(inp); return (in_pcbrele_rlocked(inp)); @@ -355,16 +355,27 @@ udp_append(struct inpcb *inp, struct ip #endif /* INET6 */ ip_savecontrol(inp, &opts, ip, n); } + if (inp->inp_vflag & INP_IPV4 && inp->inp_flags2 & INP_ORIGDSTADDR) { + tmpopts = sbcreatecontrol((caddr_t)&udp_in[1], + sizeof(struct sockaddr_in), IP_ORIGDSTADDR, IPPROTO_IP); + if (tmpopts) { + if (opts) { + tmpopts->m_next = opts; + opts = tmpopts; + } else + opts = tmpopts; + } + } #ifdef INET6 if (inp->inp_vflag & INP_IPV6) { bzero(&udp_in6, sizeof(udp_in6)); udp_in6.sin6_len = sizeof(udp_in6); udp_in6.sin6_family = AF_INET6; - in6_sin_2_v4mapsin6(udp_in, &udp_in6); + in6_sin_2_v4mapsin6(&udp_in[0], &udp_in6); append_sa = (struct sockaddr *)&udp_in6; } else #endif /* INET6 */ - append_sa = (struct sockaddr *)udp_in; + append_sa = (struct sockaddr *)&udp_in[0]; m_adj(n, off); so = inp->inp_socket; @@ -390,7 +401,7 @@ udp_input(struct mbuf **mp, int *offp, i uint16_t len, ip_len; struct inpcbinfo *pcbinfo; struct ip save_ip; - struct sockaddr_in udp_in; + struct sockaddr_in udpin[2]; struct mbuf *m; struct m_tag *fwd_tag; int cscov_partial, iphlen; @@ -435,11 +446,16 @@ udp_input(struct mbuf **mp, int *offp, i * Construct sockaddr format source address. Stuff source address * and datagram in user buffer. */ - bzero(&udp_in, sizeof(udp_in)); - udp_in.sin_len = sizeof(udp_in); - udp_in.sin_family = AF_INET; - udp_in.sin_port = uh->uh_sport; - udp_in.sin_addr = ip->ip_src; + bzero(&udpin[0], sizeof(struct sockaddr_in)); + udpin[0].sin_len = sizeof(struct sockaddr_in); + udpin[0].sin_family = AF_INET; + udpin[0].sin_port = uh->uh_sport; + udpin[0].sin_addr = ip->ip_src; + bzero(&udpin[1], sizeof(struct sockaddr_in)); + udpin[1].sin_len = sizeof(struct sockaddr_in); + udpin[1].sin_family = AF_INET; + udpin[1].sin_port = uh->uh_dport; + udpin[1].sin_addr = ip->ip_dst; /* * Make mbuf data length reflect UDP length. If not enough data to @@ -568,7 +584,7 @@ udp_input(struct mbuf **mp, int *offp, i blocked = imo_multi_filter(imo, ifp, (struct sockaddr *)&group, - (struct sockaddr *)&udp_in); + (struct sockaddr *)&udpin[0]); if (blocked != MCAST_PASS) { if (blocked == MCAST_NOTGMEMBER) IPSTAT_INC(ips_notmember); @@ -587,7 +603,7 @@ udp_input(struct mbuf **mp, int *offp, i UDP_PROBE(receive, NULL, last, ip, last, uh); if (udp_append(last, ip, n, iphlen, - &udp_in)) { + udpin)) { goto inp_lost; } } @@ -620,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, &udp_in) == 0) + if (udp_append(last, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); @@ -710,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i } UDP_PROBE(receive, NULL, inp, ip, inp, uh); - if (udp_append(inp, ip, m, iphlen, &udp_in) == 0) + if (udp_append(inp, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(inp); return (IPPROTO_DONE); Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/in6.h Fri Feb 10 05:16:14 2017 (r313524) @@ -497,6 +497,9 @@ struct route_in6 { #define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ +#define IPV6_ORIGDSTADDR 65 /* bool: allow getting dstaddr /port info */ +#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR + /* * The following option is private; do not use it from user applications. * It is deliberately defined to the same value as IP_MSFILTER. Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:16:14 2017 (r313524) @@ -1267,7 +1267,7 @@ in6_pcblookup_mbuf(struct inpcbinfo *pcb } void -init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m) +init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int srcordst) { struct ip6_hdr *ip; @@ -1275,7 +1275,7 @@ init_sin6(struct sockaddr_in6 *sin6, str bzero(sin6, sizeof(*sin6)); sin6->sin6_len = sizeof(*sin6); sin6->sin6_family = AF_INET6; - sin6->sin6_addr = ip->ip6_src; + sin6->sin6_addr = srcordst ? ip->ip6_dst : ip->ip6_src; (void)sa6_recoverscope(sin6); /* XXX: should catch errors... */ Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:16:14 2017 (r313524) @@ -113,7 +113,7 @@ int in6_mapped_sockaddr(struct socket *s int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb *, struct ifnet *); int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); -void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ #endif /* !_NETINET6_IN6_PCB_H_ */ Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/ip6_output.c Fri Feb 10 05:16:14 2017 (r313524) @@ -1545,6 +1545,7 @@ ip6_ctloutput(struct socket *so, struct #endif case IPV6_V6ONLY: case IPV6_AUTOFLOWLABEL: + case IPV6_ORIGDSTADDR: case IPV6_BINDANY: case IPV6_BINDMULTI: #ifdef RSS @@ -1730,6 +1731,9 @@ do { \ OPTSET(IN6P_AUTOFLOWLABEL); break; + case IPV6_ORIGDSTADDR: + OPTSET2(INP_ORIGDSTADDR, optval); + break; case IPV6_BINDANY: OPTSET(INP_BINDANY); break; @@ -2018,6 +2022,10 @@ do { \ optval = OPTBIT(IN6P_AUTOFLOWLABEL); break; + case IPV6_ORIGDSTADDR: + optval = OPTBIT2(INP_ORIGDSTADDR); + break; + case IPV6_BINDANY: optval = OPTBIT(INP_BINDANY); break; Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/raw_ip6.c Fri Feb 10 05:16:14 2017 (r313524) @@ -166,7 +166,7 @@ rip6_input(struct mbuf **mp, int *offp, RIP6STAT_INC(rip6s_ipackets); - init_sin6(&fromsa, m); /* general init */ + init_sin6(&fromsa, m, 0); /* general init */ ifp = m->m_pkthdr.rcvif; Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:14:19 2017 (r313523) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:16:14 2017 (r313524) @@ -137,7 +137,7 @@ udp6_append(struct inpcb *inp, struct mb struct sockaddr_in6 *fromsa) { struct socket *so; - struct mbuf *opts; + struct mbuf *opts = NULL, *tmp_opts; struct udpcb *up; INP_LOCK_ASSERT(inp); @@ -149,7 +149,7 @@ udp6_append(struct inpcb *inp, struct mb if (up->u_tun_func != NULL) { in_pcbref(inp); INP_RUNLOCK(inp); - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)fromsa, + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&fromsa[0], up->u_tun_ctx); INP_RLOCK(inp); return (in_pcbrele_rlocked(inp)); @@ -173,11 +173,23 @@ udp6_append(struct inpcb *inp, struct mb if (inp->inp_flags & INP_CONTROLOPTS || inp->inp_socket->so_options & SO_TIMESTAMP) ip6_savecontrol(inp, n, &opts); + if (inp->inp_vflag & INP_IPV6 && inp->inp_flags2 & INP_ORIGDSTADDR) { + tmp_opts = sbcreatecontrol((caddr_t)&fromsa[1], + sizeof(struct sockaddr_in6), IP_ORIGDSTADDR, IPPROTO_IPV6); + if (tmp_opts) { + if (opts) { + tmp_opts->m_next = opts; + opts = tmp_opts; + } else + opts = tmp_opts; + } + + } m_adj(n, off + sizeof(struct udphdr)); so = inp->inp_socket; SOCKBUF_LOCK(&so->so_rcv); - if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)fromsa, n, + if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)&fromsa[0], n, opts) == 0) { SOCKBUF_UNLOCK(&so->so_rcv); m_freem(n); @@ -202,7 +214,7 @@ udp6_input(struct mbuf **mp, int *offp, int off = *offp; int cscov_partial; int plen, ulen; - struct sockaddr_in6 fromsa; + struct sockaddr_in6 fromsa[2]; struct m_tag *fwd_tag; uint16_t uh_sum; uint8_t nxt; @@ -277,8 +289,10 @@ udp6_input(struct mbuf **mp, int *offp, /* * Construct sockaddr format source address. */ - init_sin6(&fromsa, m); - fromsa.sin6_port = uh->uh_sport; + init_sin6(&fromsa[0], m, 0); + fromsa[0].sin6_port = uh->uh_sport; + init_sin6(&fromsa[1], m, 1); + fromsa[1].sin6_port = uh->uh_dport; pcbinfo = udp_get_inpcbinfo(nxt); if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -349,7 +363,7 @@ udp6_input(struct mbuf **mp, int *offp, blocked = im6o_mc_filter(imo, ifp, (struct sockaddr *)&mcaddr, - (struct sockaddr *)&fromsa); + (struct sockaddr *)&fromsa[0]); if (blocked != MCAST_PASS) { if (blocked == MCAST_NOTGMEMBER) IP6STAT_INC(ip6s_notmember); @@ -370,7 +384,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK(last); UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, n, off, &fromsa)) + if (udp6_append(last, n, off, fromsa)) goto inp_lost; INP_RUNLOCK(last); } @@ -402,7 +416,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK(last); INP_INFO_RUNLOCK(pcbinfo); UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, m, off, &fromsa) == 0) + if (udp6_append(last, m, off, fromsa) == 0) INP_RUNLOCK(last); inp_lost: return (IPPROTO_DONE); @@ -482,7 +496,7 @@ udp6_input(struct mbuf **mp, int *offp, } } UDP_PROBE(receive, NULL, inp, ip6, inp, uh); - if (udp6_append(inp, m, off, &fromsa) == 0) + if (udp6_append(inp, m, off, fromsa) == 0) INP_RUNLOCK(inp); return (IPPROTO_DONE); From owner-svn-src-all@freebsd.org Fri Feb 10 05:30:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A67F8CD73FE; Fri, 10 Feb 2017 05:30:15 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 56E8D359; Fri, 10 Feb 2017 05:30:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id c3eRckLFeVQuxc3eSckSOp; Thu, 09 Feb 2017 22:21:45 -0700 X-Authority-Analysis: v=2.2 cv=BNTDlBYG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=NX_4MUJWoXXv2Cpo7zUA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E574E14C; Thu, 9 Feb 2017 21:21:42 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1A5LgfJ003611; Thu, 9 Feb 2017 21:21:42 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702100521.v1A5LgfJ003611@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313495 - head/sys/kern In-Reply-To: Message from Konstantin Belousov of "Thu, 09 Feb 2017 23:35:57 +0000." <201702092335.v19NZvSQ026869@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 09 Feb 2017 21:21:42 -0800 X-CMAE-Envelope: MS4wfArmT95PmROSROQZMsBtw8MOHI4rdLYaAhyLpH3RffJNUTkXXGA8LL8cjUgHwABJ8Lot80xcSju7F2WM3eNVGVmgtzB/xs4BkiKQnJg6WiNTa/gyIg3m dPnNe7pwnUPM0GskKT/HEdklov+CAjurfgs/tDAgpFUxeboW6bFeJlrypG/dm3oQCBf0phV4H2bMYMeCCzTFnoJobkfyEssyPmYZFJ+M9dnygwWC1p9L6Vfp CbX3T3Cn2Bu2ywGJ3VL2v7PV1uORkkSFyb4wV00AefgQh6xJUouaHB1ovG4Qdq32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:30:15 -0000 In message <201702092335.v19NZvSQ026869@repo.freebsd.org>, Konstantin Belousov writes: > Author: kib > Date: Thu Feb 9 23:35:57 2017 > New Revision: 313495 > URL: https://svnweb.freebsd.org/changeset/base/313495 > > Log: > Do not establish advisory locks when doing open(O_EXLOCK) or open(O_SHLOCK) > for files which do not have DTYPE_VNODE type. > > Both flock(2) and fcntl(2) syscalls refuse to acquire advisory lock on > a file which type is not DTYPE_VNODE. Do the same when lock is > requested from open(2). > > Restructure the block in vn_open_vnode() which handles O_EXLOCK and > O_SHLOCK open flags to make it easier to quit its execution earlier > with an error. > > Tested by: pho (previous version) > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > > Modified: > head/sys/kern/vfs_vnops.c > > Modified: head/sys/kern/vfs_vnops.c > ============================================================================= > = > --- head/sys/kern/vfs_vnops.c Thu Feb 9 23:33:06 2017 (r313494) > +++ head/sys/kern/vfs_vnops.c Thu Feb 9 23:35:57 2017 (r313495) > @@ -349,8 +349,12 @@ vn_open_vnode(struct vnode *vp, int fmod > if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) > return (error); > > - if (fmode & (O_EXLOCK | O_SHLOCK)) { > + while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { > KASSERT(fp != NULL, ("open with flock requires fp")); > + if (fp->f_type != DTYPE_VNODE) { > + error = EBADF; > + break; > + } Hi kib@, This broke dhclient. I've attached typescript output at the end of this email. > lock_flags = VOP_ISLOCKED(vp); > VOP_UNLOCK(vp, 0); > lf.l_whence = SEEK_SET; > @@ -367,8 +371,12 @@ vn_open_vnode(struct vnode *vp, int fmod > if (error == 0) > fp->f_flag |= FHASLOCK; > vn_lock(vp, lock_flags | LK_RETRY); > - if (error == 0 && vp->v_iflag & VI_DOOMED) > + if (error != 0) > + break; > + if ((vp->v_iflag & VI_DOOMED) != 0) { > error = ENOENT; > + break; > + } > > /* > * Another thread might have used this vnode as an > @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod > * Ensure the vnode is still able to be opened for > * writing after the lock has been obtained. > */ > - if (error == 0 && accmode & VWRITE) > + if ((accmode & VWRITE) != 0) > error = vn_writechk(vp); > + break; > + } > > - if (error != 0) { > - fp->f_flag |= FOPENFAILED; > - fp->f_vnode = vp; > - if (fp->f_ops == &badfileops) { > - fp->f_type = DTYPE_VNODE; > - fp->f_ops = &vnops; > - } > - vref(vp); > + if (error != 0) { > + fp->f_flag |= FOPENFAILED; > + fp->f_vnode = vp; > + if (fp->f_ops == &badfileops) { > + fp->f_type = DTYPE_VNODE; > + fp->f_ops = &vnops; > } > - } > - if (error == 0 && fmode & FWRITE) { > + vref(vp); > + } else if ((fmode & FWRITE) != 0) { > VOP_ADD_WRITECOUNT(vp, 1); > CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", > __func__, vp, vp->v_writecount); > > Script started on Thu Feb 9 20:22:12 2017 slippy# dhclient lagg0 can't open and lock /var/db/dhclient.leases.lagg0: Bad file descriptor exiting. slippy# truss dhclient lagg0 mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 740511744 (0x2c235000) issetugid() = 0 (0x0) lstat("/etc",{ mode=drwxr-xr-x ,inode=119424,size=3584,blksize=16384 }) = 0 (0x0) lstat("/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=119627,size=5672,blksize=1 6384 }) = 0 (0x0) openat(AT_FDCWD,"/etc/libmap.conf",O_RDONLY|O_CLOEXEC,00) = 3 (0x3) fstat(3,{ mode=-rw-r--r-- ,inode=119627,size=5672,blksize=16384 }) = 0 (0x0) mmap(0x0,5672,PROT_READ,MAP_PRIVATE,3,0x0) = 740544512 (0x2c23d000) close(3) = 0 (0x0) mmap(0x0,36864,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 740552704 (0x2c23f000) munmap(0x2c23d000,5672) = 0 (0x0) openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3) read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\M-7\^C\0"...,128) = 128 (0x80) fstat(3,{ mode=-r--r--r-- ,inode=318545,size=1079,blksize=16384 }) = 0 (0x0) lseek(3,0x80,SEEK_SET) = 128 (0x80) read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,951) = 951 (0x3b7) close(3) = 0 (0x0) access("/lib/libutil.so.9",F_OK) = 0 (0x0) openat(AT_FDCWD,"/lib/libutil.so.9",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3) fstat(3,{ mode=-r--r--r-- ,inode=358296,size=74256,blksize=16384 }) = 0 (0x0) mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 740544512 (0x2c23d000) mmap(0x0,2174976,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 742612992 (0x2c436000) mmap(0x2c436000,69632,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|M AP_PREFAULT_READ,3,0x0) = 742612992 (0x2c436000) mmap(0x2c646000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT _READ,3,0x10000) = 744775680 (0x2c646000) mmap(0x2c648000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1, 0x0) = 744783872 (0x2c648000) munmap(0x2c23d000,4096) = 0 (0x0) close(3) = 0 (0x0) access("/lib/libc.so.7",F_OK) = 0 (0x0) openat(AT_FDCWD,"/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3) fstat(3,{ mode=-r--r--r-- ,inode=358279,size=1785024,blksize=16384 }) = 0 (0x0) mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 740544512 (0x2c23d000) mmap(0x0,3928064,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 744787968 (0x2c649000) mmap(0x2c649000,1679360,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE |MAP_PREFAULT_READ,3,0x0) = 744787968 (0x2c649000) mmap(0x2c9e2000,53248,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAUL T_READ,3,0x199000) = 748560384 (0x2c9e2000) mmap(0x2c9ef000,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,- 1,0x0) = 748613632 (0x2c9ef000) munmap(0x2c23d000,4096) = 0 (0x0) close(3) = 0 (0x0) munmap(0x2c244000,16384) = 0 (0x0) mmap(0x0,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 740573184 (0x2c244000) sysarch(AMD64_SET_FSBASE,0x7fffffffe328) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) readlink("/etc/malloc.conf",0x7fffffffda20,1024) ERR#2 'No such file or directory' issetugid() = 0 (0x0) __sysctl(0x7fffffffd8c0,0x2,0x7fffffffd910,0x7fffffffd908,0x2c7ac7b7,0xd) = 0 (0x0) __sysctl(0x7fffffffd910,0x2,0x7fffffffd9d4,0x7fffffffd9c8,0x0,0x0) = 0 (0x0) mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 748716032 (0x2ca08000) munmap(0x2ca08000,2097152) = 0 (0x0) mmap(0x0,4190208,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 748716032 (0x2ca08000) munmap(0x2ca08000,2064384) = 0 (0x0) munmap(0x2ce00000,28672) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) socket(PF_LOCAL,SOCK_DGRAM|SOCK_CLOEXEC,0) = 3 (0x3) connect(3,{ AF_UNIX "/var/run/logpriv" },106) = 0 (0x0) mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 752877568 (0x2ce00000) openat(AT_FDCWD,"/var/run/dhclient.lagg0.pid",O_WRONLY|O_NONBLOCK|O_CREAT|O_ CLOEXEC,0644) = 4 (0x4) flock(0x4,0x6) = 0 (0x0) stat("/var/run/dhclient.lagg0.pid",{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) ftruncate(4,0x0) = 0 (0x0) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) issetugid() = 0 (0x0) open("/usr/share/zoneinfo/America/Vancouver",O_RDONLY,00) = 5 (0x5) fstat(5,{ mode=-r--r--r-- ,inode=164043,size=2875,blksize=16384 }) = 0 (0x0) read(5,"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0"...,41448) = 2875 (0xb3b) close(5) = 0 (0x0) issetugid() = 0 (0x0) open("/usr/share/zoneinfo/posixrules",O_RDONLY,00) = 5 (0x5) fstat(5,{ mode=-r--r--r-- ,inode=164324,size=3519,blksize=16384 }) = 0 (0x0) read(5,"TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0"...,41448) = 3519 (0xdbf) close(5) = 0 (0x0) open("/etc/dhclient.conf",O_RDONLY,0666) = 5 (0x5) fstat(5,{ mode=-rw-r--r-- ,inode=120257,size=2514,blksize=16384 }) = 0 (0x0) read(5,"# $FreeBSD: head/etc/dhclient.co"...,16384) = 2514 (0x9d2) read(5,0x2ce34600,16384) = 0 (0x0) close(5) = 0 (0x0) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=0,blksize=16384 }) = 0 (0x0) ftruncate(4,0x0) = 0 (0x0) getpid() = 3061 (0xbf5) pwrite(0x4,0x7fffffffe810,0x4,0x0) = 4 (0x4) socket(PF_INET,SOCK_DGRAM,0) = 5 (0x5) ioctl(5,SIOCGIFMEDIA,0xffffe870) = 0 (0x0) close(5) = 0 (0x0) openat(AT_FDCWD,"/dev/null",O_RDWR,00) = 5 (0x5) stat("/etc/nsswitch.conf",{ mode=-rw-r--r-- ,inode=119871,size=400,blksize=1 6384 }) = 0 (0x0) open("/etc/nsswitch.conf",O_RDONLY|O_CLOEXEC,0666) = 6 (0x6) ioctl(6,TIOCGETA,0xffffe4f0) ERR#25 'Inappropriate ioctl for device' fstat(6,{ mode=-rw-r--r-- ,inode=119871,size=400,blksize=16384 }) = 0 (0x0) read(6,"#\n# nsswitch.conf(5) - name ser"...,16384) = 400 (0x190) read(6,0x2ce34600,16384) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_files.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_nis.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_dns.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) access("/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/compat/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/pkg/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/krb5/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/kde4/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/compat/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/ffmpeg0/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/freeradius-2.2.9/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc47/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc48/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc49/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc5/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gcc6/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/gegl-0.2/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/graphviz/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/httrack/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/itcl3.4/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/jitsi/lib/native/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/libxul/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/mysql/plugin/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/nss/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/opencollada/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.20/mach/CORE/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.22/mach/CORE/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/perl5/5.24/mach/CORE/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pgtcl/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pidgin/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/pth/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/qt4/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/samba4/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xmms/Input/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/lib/xrdp/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/libexec/openldap/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm34/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm35/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm36/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm37/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm38/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/local/llvm39/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/casper/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' access("/usr/lib/nss_compat.so.1",F_OK) ERR#2 'No such file or directory' sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) ioctl(6,TIOCGETA,0xffffe4c0) ERR#25 'Inappropriate ioctl for device' close(6) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) geteuid() = 0 (0x0) open("/etc/spwd.db",O_RDONLY|O_CLOEXEC,00) = 6 (0x6) fstat(6,{ mode=-rw------- ,inode=119874,size=57344,blksize=16384 }) = 0 (0x0) read(6,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104) pread(0x6,0x2ce76000,0x1000,0x6000) = 4096 (0x1000) pread(0x6,0x2ce77000,0x1000,0x8000) = 4096 (0x1000) close(6) = 0 (0x0) __sysctl(0x7fffffffe8a0,0x2,0x629820,0x7fffffffe898,0x0,0x0) = 0 (0x0) fork() = 3062 (0xbf6) wait4(-1,{ EXITED,val=0 },0x0,0x0) = 3062 (0xbf6) __sysctl(0x7fffffffe810,0x6,0x0,0x7fffffffe808,0x0,0x0) = 0 (0x0) __sysctl(0x7fffffffe810,0x6,0x2ce80000,0x7fffffffe808,0x0,0x0) = 0 (0x0) openat(AT_FDCWD,"/dev/bpf0",O_RDONLY,00) = 6 (0x6) ioctl(6,BIOCSETIF,0x2ce2a040) = 0 (0x0) ioctl(6,BIOCVERSION,0xffffe828) = 0 (0x0) ioctl(6,BIOCIMMEDIATE,0xffffe814) = 0 (0x0) ioctl(6,BIOCGBLEN,0xffffe810) = 0 (0x0) ioctl(6,BIOCSETF,0xffffe818) = 0 (0x0) ioctl(6,BIOCLOCK,0x0) = 0 (0x0) cap_rights_limit(0x6,0x7fffffffe830) = 0 (0x0) cap_ioctls_limit(0x6,0x4116e0,0x2) = 0 (0x0) openat(AT_FDCWD,"/dev/bpf0",O_WRONLY,00) = 7 (0x7) ioctl(7,BIOCSETIF,0x2ce2a040) = 0 (0x0) ioctl(7,BIOCVERSION,0xffffe830) = 0 (0x0) ioctl(7,BIOCSETWF,0xffffe820) = 0 (0x0) ioctl(7,BIOCLOCK,0x0) = 0 (0x0) cap_rights_limit(0x7,0x7fffffffe838) = 0 (0x0) socket(PF_INET,SOCK_RAW,17) = 8 (0x8) setsockopt(0x8,0x0,0x2,0x7fffffffe81c,0x4) = 0 (0x0) pipe2(0x7fffffffe8e8,0) = 0 (0x0) fork() = 3067 (0xbfb) close(8) = 0 (0x0) close(7) = 0 (0x0) close(9) = 0 (0x0) cap_rights_limit(0xa,0x7fffffffe8d8) = 0 (0x0) openat(AT_FDCWD,"/var/db/dhclient.leases.lagg0",O_RDONLY|O_EXLOCK|O_CREAT,00 ) ERR#9 'Bad file descriptor' stat("/usr/share/nls/C/libc.cat",0x7fffffffe288) ERR#2 'No such file or directory' stat("/usr/share/nls/libc/C",0x7fffffffe288) ERR#2 'No such file or directory' stat("/usr/local/share/nls/C/libc.cat",0x7fffffffe288) ERR#2 'No such file or directory' stat("/usr/local/share/nls/libc/C",0x7fffffffe288) ERR#2 'No such file or directory' getpid() = 3061 (0xbf5) sendto(3,"<27>Feb 9 20:22:24 dhclient[306"...,106,0x0,NULL,0x0) = 106 (0x6a) can't open and lock /var/db/dhclient.leases.lagg0: Bad file descriptorwrite(2,"can't open and lock /var/db/dhcl"...,70) = 70 (0x46) write(2,"\n",1) = 1 (0x1) getpid() = 3061 (0xbf5) sendto(3,"<26>Feb 9 20:22:24 dhclient[306"...,44,0x0,NULL,0x0) = 44 (0x2c) exiting. write(2,"exiting.\n",9) = 9 (0x9) fstat(4,{ mode=-rw-r--r-- ,inode=318523,size=4,blksize=16384 }) = 0 (0x0) unlink("/var/run/dhclient.lagg0.pid") = 0 (0x0) close(4) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,{ SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTER M|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXF SZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },{ }) = 0 (0x0) sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0) exit(0x1) process exit, rval = 1 slippy# exit Script done on Thu Feb 9 20:22:26 2017 -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Fri Feb 10 05:30:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D027DCD745F; Fri, 10 Feb 2017 05:30:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C5F677C; Fri, 10 Feb 2017 05:30:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id 194so2217976pgd.0; Thu, 09 Feb 2017 21:30:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=wYlvhPb2NTwLnbJfm8YG8UBnMbnRhlzUM9xBu/G+Bag=; b=GYeBnBr7kwFH0YTow59WgGVVpDWvSHVIoyC3ko1wTgtI04wpHIlKrqVCjKhtzhx+OV I0uJJw3e9BUyxkuqjnEkAmeTW0znm0NITghy1HzKKWN35q0seoLRVIMvkE3w1oVMLiSe i3GKf50O45etrzjeQwQX5sjLXwBCZf6CM8hZovyDcq5KCVAGXPuLtXtPWadKZs9UUwqw krOCCX05p14Cm77zJo0O7PPTvod1kww47lsdz7mV6hQPkWuaOGQzkzM/SG1N0bcSefhj lAusZhY0DRW6RWR0R4+zXW/a3+lYVJwv734ltGsnn/IMG8+Ija6ND/Skpn2u1GoCOeUb mszQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=wYlvhPb2NTwLnbJfm8YG8UBnMbnRhlzUM9xBu/G+Bag=; b=HAaADl8QdvbjZNyT1XD5LUKDOb9SKG2wGwECB/sYzdgUtONGxPp+WKeqN/HYRKzEsI CsBZZ+QkopdYI9rfLcqccVaNs2q5ItsmRqLWdVdQ8tPy+KMtpWOYb3k0eHGeBzNszLf4 qDvMqx4Y3xWAdxPulPSXvHyEzDrJyPC/ArgQh8yb3/GbAuTDZPq4oer57iyifHpIsoO+ Gcz4zRYlsFC7LCpxj8RRwTQxdSlhHt4sRxz+RxYi8xD/9+KhOKrwPIVZ71nFccnKdogR UwSPhQ7lSfDG0DkjkEj+YKQKLDGl87MxITcMZPLl3E0/2/DkqtARgE56pl+XVCvJtNza dSzw== X-Gm-Message-State: AMke39m0cvS78TAPeXUNEMxw8b3Pm6jATJfB84Hp84iRsM7op29TiPX4G+XCZFrvTfWnjQ== X-Received: by 10.99.94.195 with SMTP id s186mr8488755pgb.197.1486704659244; Thu, 09 Feb 2017 21:30:59 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id a2sm1350637pfc.72.2017.02.09.21.30.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:30:58 -0800 (PST) Subject: Re: svn commit: r311993 - head/sys/dev/nand Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 9 Feb 2017 21:30:56 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Alexander Kabaev , Alexander Motin Message-Id: <26EBCAD7-44FC-4E80-80C2-079D69DEFCB2@gmail.com> References: <201701121805.v0CI5CYg090736@repo.freebsd.org> To: Ronald Klop X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:30:59 -0000 --Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 26, 2017, at 09:07, Ronald Klop wrote: >=20 > Should this be merged to 11-stable also? > I got a build failure on this with 11/arm. Me too when I ran =E2=80=9Cmake tinderbox=E2=80=9D. I=E2=80=99m working = on the merge to ^/stable/10 and ^/stable/11 right now. Thanks, -Ngie --Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA 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 iQIcBAEBCgAGBQJYnVARAAoJEPWDqSZpMIYVLacP/07ilizSyqOd8vU/Oim+lNbS klS2DoKh5GymTP+GaUITbPTbi+PuNnoCs4dBUWqN9eqZdGv7dW3DS+vlmP8IBIon IELMY6K4UqTQUOEmrCRiEqepo9Vsvy+DG/bnsnsaXgxMd+suzZYiDo5bdaHwlegg jZ14Npvs06XhXDAZWlP7Xbc5m1JbqGmCcTtXCH7bWyi/K/CSdVj1XWs0ZENMuU+1 sWZi7YK5jRJWdtWX4F9pEH9/A5d+44GU6xoElZ19BBeUQkiPydRblhzGTxMIOv+l yqw6zw7M8J7cKAPpAo66OfCg+L1Sv3rACQZ/tccgoq51IvksSsPonSmg3P4lb5MD pcF241dIxgrxvagHywKVCQyYJqSB2Sb/PLreUr++xm5yDoaXUzDBm+NybizPmGKO fRGHhwCaByMEG6RUo2Wtyh0fGQfnYwJvb/Ll/NQmya36FyE+l+0FSY4DheQPHCSQ 0mBBLW0p2wxKml/9zysTCGWkyrwCeFmhGfEFs6kmJ3PCv5NDVMSKeHyZzvHzzyMU lQ4G8w4G4f0ZXGe/n6LrzQm53j+3XnTOBpAb6AhQtHdmpJzVotDgxIlCczTZWOX/ H9t/0enu7fGVzTTUNLCyhbGsjNIDuaA6fs/mQDL8BGRsQ/vLv2Fg72OjmFxRTFBb BgFlxCYCLYCURIqnAQML =2SJg -----END PGP SIGNATURE----- --Apple-Mail=_6C808015-34ED-4AE1-9338-A087205434AA-- From owner-svn-src-all@freebsd.org Fri Feb 10 05:32:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EFDBCD76B5; Fri, 10 Feb 2017 05:32:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF2ACB28; Fri, 10 Feb 2017 05:32:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id b145so855580pfb.2; Thu, 09 Feb 2017 21:32:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cvvj9Hv8OBqFTPC19/4ERRZzMV5FI8aQhrjldBgE3rk=; b=qd2noEoIP1Ngn2Q9Z58C/EaR7OIxdDa+z2BREMpPTgvaoPLPfLEhzJsOOEERdrge5f TMXgqTUXQ1k9uW+3cmKR3SWbDwu/2vHrL5svaZq/IZO0otoS2pkGcWuKTgV48l6D8idb E1hRnnF1VOEKGKBHwve/ZjKAraw3XHFkPHdo2MSC0s2+TjWswjvxm60i++91O2wFnKE6 sIdFiKHGYWQc3dUJO7N/Xcvfdnxm0x9vZL32KWmyFZWgzB5ySiwYMhD/YJsTrA6k1SQp AyKQy4wzSbrj1VtQKR5mRi8KX85W122SQfcweHgVQpsUcLkDfJNRkejNnspHnCJcwQC7 jnJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cvvj9Hv8OBqFTPC19/4ERRZzMV5FI8aQhrjldBgE3rk=; b=dOC2l8ufDplAtPq2FyfYx0OWLDlvzEPoVvgnFfMk0vDAy7NZkK2KtAoO/q+LrZvcmA BhM4cGnEM3AvT2G4zkRX7MUaKkc4AXoqEk+CAzJnrfBnkunAQqDQwqOr3XLe2lnrZ7ek 5vk1nyvEzZ7ORbGLGXvqBWSzyY3ozoU6oJ5a/aKS6x1evgCgnH1RHSy6EwDdXWqsFTcg jd49AnrhCVppcf4Mlk4xkFa3ENPSeTuTmxhmR0HcTCTlrBvUrp2MIAo+kv2hgK3RnZe8 EaoNoqT16dQlsvu1/eedLhkr1oVJA/pF+RJzzE4r9ayw7/W07GeWxXsf3F4EWvNnjRtn xZGQ== X-Gm-Message-State: AMke39kXAvTRHgz8yZl2xvJViEJM7SDBCDf8w/4wKQlglc+mq68ihrGmNDXFgs9zzVILYg== X-Received: by 10.84.224.70 with SMTP id a6mr9112916plt.28.1486704773269; Thu, 09 Feb 2017 21:32:53 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p14sm1357358pfl.75.2017.02.09.21.32.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:32:52 -0800 (PST) Subject: Re: svn commit: r311993 - head/sys/dev/nand Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <26EBCAD7-44FC-4E80-80C2-079D69DEFCB2@gmail.com> Date: Thu, 9 Feb 2017 21:32:51 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Alexander Kabaev , Alexander Motin Message-Id: <9C37B132-4DE0-415F-8C18-2BE090F17268@gmail.com> References: <201701121805.v0CI5CYg090736@repo.freebsd.org> <26EBCAD7-44FC-4E80-80C2-079D69DEFCB2@gmail.com> To: Ronald Klop X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:32:54 -0000 --Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 9, 2017, at 21:30, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Jan 26, 2017, at 09:07, Ronald Klop wrote: >>=20 >> Should this be merged to 11-stable also? >> I got a build failure on this with 11/arm. >=20 > Me too when I ran =E2=80=9Cmake tinderbox=E2=80=9D. I=E2=80=99m = working on the merge to ^/stable/10 and ^/stable/11 right now. > Thanks, Ah=E2=80=A6 the fix was merged to ^/stable/11, not ^/stable/10 =E2=80=94 = hence the failure=E2=80=A6 heh. -Ngie --Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44 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 iQIcBAEBCgAGBQJYnVCDAAoJEPWDqSZpMIYVZ5kP/2eQzGipCHVFkf8PrrQVrRUX Sii2nk7OicyTqZm80cF+YIg/zEvhmcITNZB5FI7vpgLqQ09xhY0z4GbTXxJSDWqp fJ9xB9bFhgS6Ein8xHn6vN6gZmc8MjUhdQTNHFjoNBSFvOJGmkMeLT8JkMWmyAHL F5yuaoASHJDBrFHr4zJr5nxJE55wlpDFyLPCGqOiNFV4eH58xtNv22bKRJZ+BhO3 pEvjVyRkh6ATmYU8FUq6W2Unh385gzPhqI/q/59j4WWPqs7lB30IxktfEAt4WaTR +GXpgy4GNt/a1mO4USTeGwdq9gMzdY5x1GIb7jYpw5nPDmym8U214j69cdOr/9CE bZ1SIivijvgAMnT+Bepp4AGNS7ElJqZ5z03P6oOnYkdDWl2ntZPd3n0Gqmr8Xtvc GsVqUq9ALq6Tx3rCLiHKFhVpNNGOT/pOeHRzXyHR5h4xYwE48/qDPv4jT4pLCco8 rN5Xflmye1MBi5a65TVsg4IxAGE85IdANTYKWEHN9y5Z9RNmz155KWw0w9EGZ1uX yWVYXIsjfPtq8xayw1lqUvIcKsoHSGNbTdnMmSzpUdQAQl2ZhwErApyVlHV5H/u1 KBBQE7mZYYQJyLkjo0C5+kcEC+OjNDzPmju/cgRqFfffHwYLZ5ZqcNMftbFo4P/6 U70GCBIPlZRWFZ5qfEEb =J0Dk -----END PGP SIGNATURE----- --Apple-Mail=_FA9F9ADB-A753-41B8-AA5C-3E1FDE97AA44-- From owner-svn-src-all@freebsd.org Fri Feb 10 05:35:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D9BECD77E6; Fri, 10 Feb 2017 05:35:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE53DC90; Fri, 10 Feb 2017 05:35:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5ZU2B076649; Fri, 10 Feb 2017 05:35:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5ZUPf076648; Fri, 10 Feb 2017 05:35:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100535.v1A5ZUPf076648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 05:35: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: r313525 - stable/10/sys/dev/nand 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:35:32 -0000 Author: ngie Date: Fri Feb 10 05:35:30 2017 New Revision: 313525 URL: https://svnweb.freebsd.org/changeset/base/313525 Log: MFC r311993: r311993 (by kan): Fix typo in r311971. Modified: stable/10/sys/dev/nand/nand_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nand/nand_geom.c ============================================================================== --- stable/10/sys/dev/nand/nand_geom.c Fri Feb 10 05:16:14 2017 (r313524) +++ stable/10/sys/dev/nand/nand_geom.c Fri Feb 10 05:35:30 2017 (r313525) @@ -416,7 +416,7 @@ create_geom_disk(struct nand_chip *chip) snprintf(rdisk->d_ident, sizeof(rdisk->d_ident), "nand_raw: Man:0x%02x Dev:0x%02x", chip->id.man_id, chip->id.dev_id); - disk->d_rotation_rate = DISK_RR_NON_ROTATING; + rdisk->d_rotation_rate = DISK_RR_NON_ROTATING; disk_create(rdisk, DISK_VERSION); From owner-svn-src-all@freebsd.org Fri Feb 10 05:37:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF2A9CD7873; Fri, 10 Feb 2017 05:37:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BAE9DD2; Fri, 10 Feb 2017 05:37:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id 75so2211940pgf.3; Thu, 09 Feb 2017 21:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=7l8Gf/gUEhI8356Hmpa56JNrJzAsMjiMGNZFDUuhQYM=; b=fCYfSeywmt5lNR00f6nXZJIoJVF+K9fA4UaGMpPhEOCq3HyAMaGamJq50/JpsfkZId MJJI/SEKDbwDJpRxRFVrUHjpXAEX7gD3y7NiNYwfJi3mIhSSWLsvoGuxJtpJW97N3oBS DcveDZqJTn7MGe1jpLqW9dbwpgMaU41Y0wQSZWsF4uqDpfn7X6Q5n+bIgGE2GoXjS3ie n3AwKtI07khKq4fbvOe0ATInRg1NI8qxIuGonMyadBz1btADLVnyrlHEJFnXPhmQVNR5 UslBTzYQZ+X7rM20s0d3dnnGF8YDqBCy1Q7JyK7VPpnf2jxnya42YPWukRiMeugYYsMK v6rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=7l8Gf/gUEhI8356Hmpa56JNrJzAsMjiMGNZFDUuhQYM=; b=BrBI8EmurA2/saCi+Wpj9f2f+z0BWWImZ0TLW38A7j9mHQVO2ijFKIrpZD4GTZudqF jnUy8S/pSNRwnsIjoATAAFMhhqzEmODMXJbUTnrf8IbHYb3jwEJA0iNBsBK9cvunzrY7 53kAO7PcOK1QlrjtNgTGxTSlx36KfvK2pFMgJcGIF4TrRTy128cGpYBMvx3Z9Kd4XVWG L5Wztr554dZ44TFz4KefHD+F/2zvCcIr39PZgveedPiCoxkqjTfcx/38V6PXhR71tg3b 9UNbkXBYXbS3y6QmSLODnBYwdBjJfHf5c9jtZ+Aeq6eWsH0pycsPBa9azMLvYyE/eJKG jAdw== X-Gm-Message-State: AMke39nrWNXvb0hfwgKy7233GoKtV+q3DFa9YgnvwABOMauXRvAdcRMdmE5EiGoh9sZBBQ== X-Received: by 10.84.170.195 with SMTP id j61mr9208353plb.26.1486705039000; Thu, 09 Feb 2017 21:37:19 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id m136sm1435503pga.22.2017.02.09.21.37.18 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:37:18 -0800 (PST) Subject: Re: svn commit: r312850 - in stable/10/sys: cam dev/arcmsr dev/iir dev/isci dev/ppbus Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C60D0E07-13CC-4D67-AD0D-2EBA5A79FA1E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701262135.v0QLZw4J019142@repo.freebsd.org> Date: Thu, 9 Feb 2017 21:37:17 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: References: <201701262135.v0QLZw4J019142@repo.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:37:19 -0000 --Apple-Mail=_C60D0E07-13CC-4D67-AD0D-2EBA5A79FA1E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 26, 2017, at 13:35, Alexander Motin wrote: >=20 > Author: mav > Date: Thu Jan 26 21:35:58 2017 > New Revision: 312850 > URL: https://svnweb.freebsd.org/changeset/base/312850 >=20 > Log: > MFC r296891 (by imp): > Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the > drivers I've touched, filter out CAM_CDB_PHYS. >=20 > Differential Revision: https://reviews.freebsd.org/D5585 >=20 > Modified: > stable/10/sys/cam/cam_ccb.h > stable/10/sys/dev/arcmsr/arcmsr.c > stable/10/sys/dev/iir/iir.c > stable/10/sys/dev/isci/isci_controller.c > stable/10/sys/dev/isci/isci_io_request.c > stable/10/sys/dev/ppbus/vpo.c > Directory Properties: > stable/10/ (props changed) This commit broke ia64.LINT. Thanks, -Ngie /scratch/tmp/ngie/svn/sys/modules/vpo/../../dev/ppbus/vpo.c: In function = 'vpo_action': /scratch/tmp/ngie/svn/sys/modules/vpo/../../dev/ppbus/vpo.c:319: = warning: format '%x' expects type 'unsigned int', but argument 3 has = type 'uint8_t *' [-Wformat] --- vpo.o --- *** [vpo.o] Error code 1 --Apple-Mail=_C60D0E07-13CC-4D67-AD0D-2EBA5A79FA1E 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 iQIcBAEBCgAGBQJYnVGNAAoJEPWDqSZpMIYV2r4QAIJe0oBvmTACkd3h5qXd0ufL piXEh6Aesl72S3OVKBsRAAsKSGywcCwLNUyB26HisNp/aX08a9Mml5g90H+c9Xy1 wvNGhnh1pTytIxzJcmXxSXLg34PwvTgLj5cGVVJ/NJjwcYxDGhuMTol7PLsiUTIO oIbqD0MznzBc0AKzL8wlVlxDLwUPAHYgWYJLx11ZFPFnuXFMk89wWTvwV+qeKeor 344qrFe1fFzxJ+GT/Q/FVSWRqIOUTZGdiyfXP+xPiDktzrzoKgLUOQIY+chOGYTc ZM7x9astyKotglDtkiUNTzqo5MvuP+R4bi/6HmlZV9bqu29eN6tdVBfQuDw2o9PB aG5xtlCG4rcvPRsfZlgxOjCVPCBrSBNsa03CEKfRqfn8XvFvoPgpHh3YfGnUYn05 K+1W5v+Z1dgxg3A9NjDfWpCPArGyb5/r3wGyho9qfq/5J/S+bdzLdaDXc3S8Akxc l5dQKw2J5MstBs3DBzNPsEj/5pFGrvVJXr7qAHrf8MLslHy4axzIXhp1BT03LugZ Nekl4tJiFyyzPzDEFeKewujJual0YDNiO3SMrYLznDqimTultXZ9Fugex5lWA1yt bD1FSXB9w/Wj1OPHO8gtY8ppQNRj6yS3lxbBmJ2U+waCjYo6h2+2V2Mt0WdE3/RC yEJSanCDqZz0rfm16hek =Ed70 -----END PGP SIGNATURE----- --Apple-Mail=_C60D0E07-13CC-4D67-AD0D-2EBA5A79FA1E-- From owner-svn-src-all@freebsd.org Fri Feb 10 05:38:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 287A8CD791F; Fri, 10 Feb 2017 05:38:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8842EFC; Fri, 10 Feb 2017 05:38:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id e4so1784163pfg.0; Thu, 09 Feb 2017 21:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=2Ns1zxX3jDWEvm86MboQHDVw+HSYu7W3rJAiD4EHjbM=; b=ZBzU15Kb+H3GpaQ7WH+zlXhJLawTnLAhXl1pSWdOrOx9jftNOccPeotHz7x31hwnLm O/PyZIuMt9J8PrQlBPPWJreWjcFWJoaBZPQnpWLkKve6HYQp7vY/DbtHqczg4Sje+Ed0 DedAmBRH2hr9bNIMnmcI32ZNDnVkII6vYWB0lFLkS67MOJyUlOLS5NtM96gn22buqt+k YQhuWwEoqcx+d7D5XLbIVwBS9f6vZ8/bv74sDMHHqcnS/fAb2X2LqqpLErr/WlAXsTWs VCBHL/y4h2GxiP6Fq1iBOzM1LuIFWdvi/saSgK3+008YuX39fTwK910eIiTIjnFlpXHJ 0gVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=2Ns1zxX3jDWEvm86MboQHDVw+HSYu7W3rJAiD4EHjbM=; b=V7/vh8jCNRFOtOoGr6kOq/anNdzjtDqUYUImzwe4uvMDmUd8wCW1XkoCgnfCzUB4cI vYfFYiUNR5LErdZRzoL5wEdpmlVYr+BKFBnVnDshoa8PUSC0PDuwwkqd5Ayypv9290tY 3nZOdYAiQi1bRG9mqMmXX0Mg2AL7gOEESzFoHJk1xzbZewD3gBL79NSrrjIlYtMDQtbJ bsa/THJFZtgMbZzeX3t05dZV9fyf4UYPuW9q70nyYhHeCFHWvUQIPw8aWzv7q07msUlz p9ThwtNLE1FO7PXhca4ecC26QMzQHFC8NQL6e2CdTixoa70bF4HTuQdrohbXDmN7yar2 W9EA== X-Gm-Message-State: AMke39mZTTVBCQOj/SqfxeJ9Vvcwn1H37L/NyqQzuaxSpL359eHTJfo6FiFjNxfJi21b7A== X-Received: by 10.84.210.33 with SMTP id z30mr5196815plh.79.1486705129294; Thu, 09 Feb 2017 21:38:49 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d29sm1417865pfk.83.2017.02.09.21.38.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:38:48 -0800 (PST) Subject: Re: svn commit: r312850 - in stable/10/sys: cam dev/arcmsr dev/iir dev/isci dev/ppbus Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AC99AA67-562A-4DCA-9318-14F566642629"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 9 Feb 2017 21:38:47 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <3ED967B3-8178-4C0E-9566-F6A862D7508C@gmail.com> References: <201701262135.v0QLZw4J019142@repo.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:38:50 -0000 --Apple-Mail=_AC99AA67-562A-4DCA-9318-14F566642629 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 9, 2017, at 21:37, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Jan 26, 2017, at 13:35, Alexander Motin wrote: >>=20 >> Author: mav >> Date: Thu Jan 26 21:35:58 2017 >> New Revision: 312850 >> URL: https://svnweb.freebsd.org/changeset/base/312850 >>=20 >> Log: >> MFC r296891 (by imp): >> Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the >> drivers I've touched, filter out CAM_CDB_PHYS. >>=20 >> Differential Revision: https://reviews.freebsd.org/D5585 >>=20 >> Modified: >> stable/10/sys/cam/cam_ccb.h >> stable/10/sys/dev/arcmsr/arcmsr.c >> stable/10/sys/dev/iir/iir.c >> stable/10/sys/dev/isci/isci_controller.c >> stable/10/sys/dev/isci/isci_io_request.c >> stable/10/sys/dev/ppbus/vpo.c >> Directory Properties: >> stable/10/ (props changed) >=20 > This commit broke ia64.LINT. > Thanks, > -Ngie >=20 > /scratch/tmp/ngie/svn/sys/modules/vpo/../../dev/ppbus/vpo.c: In = function 'vpo_action': > /scratch/tmp/ngie/svn/sys/modules/vpo/../../dev/ppbus/vpo.c:319: = warning: format '%x' expects type 'unsigned int', but argument 3 has = type 'uint8_t *' [-Wformat] > --- vpo.o --- > *** [vpo.o] Error code 1 Which was of course fixed in another commit that wasn=E2=80=99t MFCed = :(=E2=80=A6 -Ngie ------------------------------------------------------------------------ r296944 | imp | 2016-03-16 09:56:28 -0700 (Wed, 16 Mar 2016) | 2 lines Fix debug printf ------------------------------------------------------------------------ --Apple-Mail=_AC99AA67-562A-4DCA-9318-14F566642629 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 iQIcBAEBCgAGBQJYnVHoAAoJEPWDqSZpMIYV0i4QANBztNTwYauhr+EQpYm9Evnx fj+3waGMP3j7O3KTGElfRGBmjJioO8WQ2Uq2TlggvgMhaB9VuA7Enak+QDJ+ms/N UStEM3i6VQy1dlx4yA2bWXagMuopyzcay7UV4uhzQabf/PwZtS7ASfoXsl7q2ElU 5ppJs8p/yMXech7isbmeiRWo0j0zA1vcgYZFsQ/NaOxuW6/L/UrUDtR7cvDtHUEO lVmWj9DWuz8MeelIlBJD6umAOD/m3TbXahkt9/j1spco+gwEOJlPIaXPiDv3gZkB oIONF3LXaW8IdWxfG6VVzWLpfXbq+qCnCyWb5kJnF+hLlHzaeGsjuPE1a4FhhWqd kxLipOmfIS/k2R01bnrifAFM9iQyG1M087Gdbw0ilgN7Ej2Go1rzhwnUv7vZ1EeY Ui+JY4sBFBwC0FPEOm58ZPDxJcTs9li5AbODmxdYB45aUCNsWFEKXLOa3Mo3dGBQ hKvaWApbmNIiMuCL9sJSLPmca4wjV7hyAuCzvL5VkMDXRUaraxU8lxS5RFVErxji BWD9y5Ba+fLbmlkvIhrvIZhs//jolv+nMDd367yCLqpD7b3+DV4mQsEPiKP9Q9Ug 7gpWSuVZN4uq7WgizoGPJYDtWe8Gl7vAoqDmT0aOXjFVVh/am0aTLkou5aCppPGP XHtR6IL11RgQ8+V9g1MR =oaXy -----END PGP SIGNATURE----- --Apple-Mail=_AC99AA67-562A-4DCA-9318-14F566642629-- From owner-svn-src-all@freebsd.org Fri Feb 10 05:42:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A7B2CD7B94; Fri, 10 Feb 2017 05:42:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 373D413A9; Fri, 10 Feb 2017 05:42:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5g6pm079054; Fri, 10 Feb 2017 05:42:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5g6Is079053; Fri, 10 Feb 2017 05:42:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100542.v1A5g6Is079053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 05:42: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: r313526 - stable/10/sys/dev/ppbus 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:42:07 -0000 Author: ngie Date: Fri Feb 10 05:42:06 2017 New Revision: 313526 URL: https://svnweb.freebsd.org/changeset/base/313526 Log: MFC r296944: This unbreaks ia64.LINT r296944 (by imp): Fix debug printf Modified: stable/10/sys/dev/ppbus/vpo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ppbus/vpo.c ============================================================================== --- stable/10/sys/dev/ppbus/vpo.c Fri Feb 10 05:35:30 2017 (r313525) +++ stable/10/sys/dev/ppbus/vpo.c Fri Feb 10 05:42:06 2017 (r313526) @@ -316,7 +316,7 @@ vpo_action(struct cam_sim *sim, union cc } #ifdef VP0_DEBUG device_printf(vpo->vpo_dev, "XPT_SCSI_IO (0x%x) request\n", - scsiio_cdb_ptr(csio)); + *scsiio_cdb_ptr(csio)); #endif vpo_intr(vpo, csio); From owner-svn-src-all@freebsd.org Fri Feb 10 05:43:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A69BFCD7C87; Fri, 10 Feb 2017 05:43:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7325015C9; Fri, 10 Feb 2017 05:43:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id e4so1793146pfg.0; Thu, 09 Feb 2017 21:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=E/EXOgifB9NMKBhnS5Py5ecyS4fvk+CuRKp0yO1jv7w=; b=ounWqVdNEqvxXkHr1UU4RZIe4sMqveA47EemGe9kSYK0V35cuawHSqH0wErpVG0MEG 3W1AedFQGjtVWVwiHvh9kSUT007J4L1KxVoUvpXKEOdLrIdE+NyNtesbBafwn27mySL8 Ls25KYcCtqEuzLyIXZ6thvALEY1AZoTnuAgYMJMMwiqq3sbcPm/AgfQhadaiJfTX2eL1 G5XKzsqlK/FMyIPG4UdlZw1P6LJhX0vwssEyBnH6W8BmTVYr76l95H98vBj3RdP++kIA ht0kFuplP+7P0cO6IUMyoXbmbKiEYK9IAeFZYXKVnX4YvPtcOgjnd7DneFueOHqgaPY8 K+hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=E/EXOgifB9NMKBhnS5Py5ecyS4fvk+CuRKp0yO1jv7w=; b=B1VEMb+NPv+wzpSkwi6skmro42xUPjrj2lxMcAAL2bxQ2EyBO5e5gDA1Sb46r0w5V4 MjpRuF+XwUtZf9iGdjFsiV1GHtdwU6Cge5Sw+nTb5HT3G+Grp13le2uk5STgGbMfTaE/ 3TpRrhV+M6Bg0AbCzeOADT1+hWsEkS6VaxeJalTBmJG6uM8OMIhZdRpUCE730ELTzC0z maG9UWDP28EyTaeRr3+nFrX1vKHLdmsJKtqtHbu+BxEL9pqjU280VhjmhnxvCJKcxPhb CIdjHuXXWGTtXmooCFJEo3YOpIHaHEu+9uayhDg1zl+pUsB0S5IsxbHp7sxoYTvNi7M6 uSrg== X-Gm-Message-State: AMke39kwKDn39NsuCoUOqEK+YHn6MDJv1qs6WpjAl4EAoreoy/NglXrxf4Dsgj0yb0TlMw== X-Received: by 10.84.215.215 with SMTP id g23mr9124465plj.159.1486705410821; Thu, 09 Feb 2017 21:43:30 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p26sm1470227pgn.39.2017.02.09.21.43.30 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 21:43:30 -0800 (PST) Subject: Re: svn commit: r313150 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_465DC3E4-2C66-443D-ABC5-1E083D59C12C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702031220.v13CKi6n063159@repo.freebsd.org> Date: Thu, 9 Feb 2017 21:43:29 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <38AB4192-14B3-4184-9B2B-1A60F94B7E8F@gmail.com> References: <201702031220.v13CKi6n063159@repo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:43:31 -0000 --Apple-Mail=_465DC3E4-2C66-443D-ABC5-1E083D59C12C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 3, 2017, at 04:20, Konstantin Belousov wrote: >=20 > Author: kib > Date: Fri Feb 3 12:20:44 2017 > New Revision: 313150 > URL: https://svnweb.freebsd.org/changeset/base/313150 >=20 > Log: > MFC r289894: > CLFLUSH does not need barriers, the instruction is ordered WRT other = writes. > Use CLFLUSHOPT when available. >=20 > MFC r312555: > Use SFENCE for ordering CLFLUSHOPT. This commit broke pc98 (GENERIC). Thanks, -Ngie /scratch/tmp/ngie/svn/sys/i386/i386/pmap.c:1260:29: error: use of = undeclared identifier 'lapic_paddr' if (pmap_kextract(sva) =3D=3D lapic_paddr) ^ 1 error generated. --- pmap.o --- *** [pmap.o] Error code 1 make[5]: stopped in = /scratch/tmp/ngie/obj/pc98.i386/scratch/tmp/ngie/svn/sys/GENERIC 1 error make[5]: stopped in = /scratch/tmp/ngie/obj/pc98.i386/scratch/tmp/ngie/svn/sys/GENERIC --- buildkernel --- *** [buildkernel] Error code 2 --Apple-Mail=_465DC3E4-2C66-443D-ABC5-1E083D59C12C 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 iQIcBAEBCgAGBQJYnVMBAAoJEPWDqSZpMIYVUJYP/j6ANc4mM5s5Spiw0Um0COia DoqwxoAAXKqWwYw8hUWXUeqVdN7V5r6wkWFMxS9dpPPovAHwovYC9VwmxaRzl2VI f39tRwZbekiW+M0bU5z59kHSWnikm/7PAVCEhIsr/zEUKlE+zv23aQ+Vg42uyJga uX+OsEY7eYs1BUYLbKFbaHv6VanV61nA7aD2WyQXschn2kS0m8w24vMcHmYJBEhk BRfc0cnqs4TJJ8OQy9h5W+RBmbC3Fp0zfVb/5dhglzJVO92PAgYLDAPeBmtfz2jd LZRM8glDrCCvDq1E0/0zDBdDI1AfBZvuHFuxakcAZwnD+VIPBNHItDeRvyEtjfIM ZBt+gP2/xLWYqDnPii1rbKDLN2/PvlSsFT0INsCKW4vtXM3lBBUxVx2KiVwFzrTA QUMKnbqzIrm7ihw+2Qo8Q60HdvjAyL6rIj/iSHIok5kBF5WrswOQ/aukSu7Um8Nj vqWTiIJSZyz8EQUR2YRZYj7sr3C5wDJjZyjUE7KkQHQR7OxWnBQQVsffjwD/qE6H 2OC/TaQhC/a4CfDpyRGW6ar6rys3MXUh7pFawGd+0i4tVXE93+igg0NFaOYeMY4x huULF/E76fANwPUewPWJ1qQBRCI35Xv1aVnkJKGkvmD2aTQa65OrGY7qH0LLd/dr VK0yBJ1rDu6C6msMXKo4 =FCrX -----END PGP SIGNATURE----- --Apple-Mail=_465DC3E4-2C66-443D-ABC5-1E083D59C12C-- From owner-svn-src-all@freebsd.org Fri Feb 10 05:47:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6B3DCD7D41; Fri, 10 Feb 2017 05:47:15 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27B9C171B; Fri, 10 Feb 2017 05:47:14 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Ls7MZ-1cQLtV2HmR-013vKs; Fri, 10 Feb 2017 06:47:06 +0100 Date: Fri, 10 Feb 2017 06:47:00 +0100 From: "O. Hartmann" To: Ermal =?ISO-8859-1?Q?Lu=E7i?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313524 - in head/sys: netinet netinet6 Message-ID: <20170210064649.1f76b10f@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201702100516.v1A5GERJ068339@repo.freebsd.org> References: <201702100516.v1A5GERJ068339@repo.freebsd.org> Organization: Walstatt X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:lwBmvOT84E31Rk9fiS5AO9TnUex2AQylU/iJveCfb+EGnT3dgjs 8Of3Gvc/tls7wnmVBn88VE0ChmC/yjx47Xapjk8vXHh7ivV75hGdvaLchPNDwBRMm41AHGD sHSvJ0/Fbxizab3kcxhBTOyAFXiT63YsPPOILq7xDQFx6qYADCtr0eqYXjff4UyvHdXXD+I h6Yr6zoQKPrNB6Tuce/yQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:5VTumOKeTzk=:wuLKJ85FJeQz2cRmznY04q ue7qE7JkVxTjfKUiT/fY47qEd5pbUIhUZ+lWYDKgxXIZrd1KdJ2FKRu2S6ootw8v94gg8hWNZ 7zBOCaexpBIk5YS10SXDdJczr7bcUPNlMDLwq90W2xDW9WwVY04+25519LlN3/4CXc0k7p/58 /+sBrIGkqCPY8kBe4UyEjqlYYogNgn7pcU+Qd64y2Wk24UlDGAiMb3quLJKk5xlY2EsfN45OA 4nRBQiNSurThRwlm5vHMPjoQ1bkQCaKa6/mMfGiqFzOJrOK6Fuf0O0brSfBEGmSC0vgCFoOW8 RwQFZZCLtV00f/ueFcGnGABsG7J9r0DwfwPPIbY4luaEc7odjsCMmG4rlEJwoB5Ijej4AysiV QtTCDJKly5K0oLf14gxmwWc+U+DeFOSzBjaaerx6hz9WDgzHWtZKsTyYnnhbInKCLuYzcAGOx 6l0SJ6UK7butTW9DfoMkJKprnpzC7aeucygKJ+7JgDocKyHDaXTaFN9LZ9LQIMd3nkc5jTrtC I4nTydk9SFUL1jqsFUSm2DHeTi9iSAfC4E/mQP6dt5nZbidCYGakm4oc8X2X49riB0UMB/qeI g06SMeVsgm0O+UYiYBXetnnlgdndNvq1tECdsgggIX4nwgRxheI3/GeUzcPLV+SyOEph2QtF0 k7cHvsurE+Mm0riGZgggqk1b5v7hVVXXXMCKsSl0Q9zk27ytdrBzE5+9j0J9tWZ/9fClx3Shs BW/ITnCmXINa5Bm/RYXPP0nZHqsxuJHrTY5IqDzt4RAh8QoTx410QoEiFT4lUjK4ly7R8DZ73 c9Rs4IZ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:47:15 -0000 On Fri, 10 Feb 2017 05:16:14 +0000 (UTC) Ermal Lu=C3=A7i wrote: > Author: eri > Date: Fri Feb 10 05:16:14 2017 > New Revision: 313524 > URL: https://svnweb.freebsd.org/changeset/base/313524 >=20 > Log: > The patch provides the same socket option as Linux IP_ORIGDSTADDR. > Unfortunately they will have different integer value due to Linux value > being already assigned in FreeBSD.=20 > The patch is similar to IP_RECVDSTADDR but also provides the destination > port value to the application.=20 > This allows/improves implementation of transparent proxies on UDP socke= ts > due to having the whole information on forwarded packets.=20 > Sponsored-by: rsync.net > Differential Revision: D9235 > Reviewed-by: adrian >=20 > Modified: > head/sys/netinet/in.h > head/sys/netinet/in_pcb.c > head/sys/netinet/in_pcb.h > head/sys/netinet/ip_output.c > head/sys/netinet/udp_usrreq.c > head/sys/netinet6/in6.h > head/sys/netinet6/in6_pcb.c > head/sys/netinet6/in6_pcb.h > head/sys/netinet6/ip6_output.c > head/sys/netinet6/raw_ip6.c > head/sys/netinet6/udp6_usrreq.c >=20 > Modified: head/sys/netinet/in.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in.h Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet/in.h Fri Feb 10 05:16:14 2017 (r313524) > @@ -433,6 +433,8 @@ __END_DECLS > #define IP_BINDANY 24 /* bool: allow bind to any > address */ #define IP_BINDMULTI 25 /* bool: allow > multiple listeners on a tuple */ #define IP_RSS_LISTEN_BUCKET > 26 /* int; set RSS listen bucket */ +#define > IP_ORIGDSTADDR 27 /* bool: receive IP dst addr/port w/dgram > */ +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR=20 > /* > * Options for controlling the firewall and dummynet. >=20 > Modified: head/sys/netinet/in_pcb.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_pcb.c Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:16:14 2017 (r313524) > @@ -2492,6 +2492,10 @@ db_print_inpflags(int inp_flags) > db_printf("%sINP_RECVDSTADDR", comma ? ", " : ""); > comma =3D 1; > } > + if (inp_flags & INP_ORIGDSTADDR) { > + db_printf("%sINP_ORIGDSTADDR", comma ? ", " : ""); > + comma =3D 1; > + } > if (inp_flags & INP_HDRINCL) { > db_printf("%sINP_HDRINCL", comma ? ", " : ""); > comma =3D 1; >=20 > Modified: head/sys/netinet/in_pcb.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_pcb.h Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:16:14 2017 (r313524) > @@ -618,6 +618,7 @@ short inp_so_options(const struct inpcb=20 > #define INP_RECVFLOWID 0x00000100 /* populate recv > datagram with flow info */ #define INP_RECVRSSBUCKETID > 0x00000200 /* populate recv datagram with bucket id */ #define > INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */ > +#define INP_ORIGDSTADDR 0x00000800 /* receive IP dst > address/port */ /* > * Flags passed to in_pcblookup*() functions. >=20 > Modified: head/sys/netinet/ip_output.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_output.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet/ip_output.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -1065,6 +1065,7 @@ ip_ctloutput(struct socket *so, > struct s case IP_MINTTL: > case IP_RECVOPTS: > case IP_RECVRETOPTS: > + case IP_ORIGDSTADDR: > case IP_RECVDSTADDR: > case IP_RECVTTL: > case IP_RECVIF: > @@ -1126,6 +1127,10 @@ ip_ctloutput(struct socket *so, struct s > OPTSET(INP_RECVDSTADDR); > break; > =20 > + case IP_ORIGDSTADDR: > + OPTSET2(INP_ORIGDSTADDR, optval); > + break; > + > case IP_RECVTTL: > OPTSET(INP_RECVTTL); > break; > @@ -1258,6 +1263,7 @@ ip_ctloutput(struct socket *so, struct s > case IP_MINTTL: > case IP_RECVOPTS: > case IP_RECVRETOPTS: > + case IP_ORIGDSTADDR: > case IP_RECVDSTADDR: > case IP_RECVTTL: > case IP_RECVIF: > @@ -1303,6 +1309,10 @@ ip_ctloutput(struct socket *so, struct s > optval =3D OPTBIT(INP_RECVDSTADDR); > break; > =20 > + case IP_ORIGDSTADDR: > + optval =3D OPTBIT2(INP_ORIGDSTADDR); > + break; > + > case IP_RECVTTL: > optval =3D OPTBIT(INP_RECVTTL); > break; >=20 > Modified: head/sys/netinet/udp_usrreq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -304,7 +304,7 @@ udp_append(struct inpcb *inp, > struct ip { > struct sockaddr *append_sa; > struct socket *so; > - struct mbuf *opts =3D NULL; > + struct mbuf *tmpopts, *opts =3D NULL; > #ifdef INET6 > struct sockaddr_in6 udp_in6; > #endif > @@ -319,7 +319,7 @@ udp_append(struct inpcb *inp, struct ip=20 > if (up->u_tun_func !=3D NULL) { > in_pcbref(inp); > INP_RUNLOCK(inp); > - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)udp_in, > + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&udp_in[0], > up->u_tun_ctx); > INP_RLOCK(inp); > return (in_pcbrele_rlocked(inp)); > @@ -355,16 +355,27 @@ udp_append(struct inpcb *inp, struct ip=20 > #endif /* INET6 */ > ip_savecontrol(inp, &opts, ip, n); > } > + if (inp->inp_vflag & INP_IPV4 && inp->inp_flags2 & INP_ORIGDSTADDR) { > + tmpopts =3D sbcreatecontrol((caddr_t)&udp_in[1], > + sizeof(struct sockaddr_in), IP_ORIGDSTADDR, > IPPROTO_IP); > + if (tmpopts) { > + if (opts) { > + tmpopts->m_next =3D opts; > + opts =3D tmpopts; > + } else > + opts =3D tmpopts; > + } > + } > #ifdef INET6 > if (inp->inp_vflag & INP_IPV6) { > bzero(&udp_in6, sizeof(udp_in6)); > udp_in6.sin6_len =3D sizeof(udp_in6); > udp_in6.sin6_family =3D AF_INET6; > - in6_sin_2_v4mapsin6(udp_in, &udp_in6); > + in6_sin_2_v4mapsin6(&udp_in[0], &udp_in6); > append_sa =3D (struct sockaddr *)&udp_in6; > } else > #endif /* INET6 */ > - append_sa =3D (struct sockaddr *)udp_in; > + append_sa =3D (struct sockaddr *)&udp_in[0]; > m_adj(n, off); > =20 > so =3D inp->inp_socket; > @@ -390,7 +401,7 @@ udp_input(struct mbuf **mp, int *offp, i > uint16_t len, ip_len; > struct inpcbinfo *pcbinfo; > struct ip save_ip; > - struct sockaddr_in udp_in; > + struct sockaddr_in udpin[2]; > struct mbuf *m; > struct m_tag *fwd_tag; > int cscov_partial, iphlen; > @@ -435,11 +446,16 @@ udp_input(struct mbuf **mp, int *offp, i > * Construct sockaddr format source address. Stuff source address > * and datagram in user buffer. > */ > - bzero(&udp_in, sizeof(udp_in)); > - udp_in.sin_len =3D sizeof(udp_in); > - udp_in.sin_family =3D AF_INET; > - udp_in.sin_port =3D uh->uh_sport; > - udp_in.sin_addr =3D ip->ip_src; > + bzero(&udpin[0], sizeof(struct sockaddr_in)); > + udpin[0].sin_len =3D sizeof(struct sockaddr_in); > + udpin[0].sin_family =3D AF_INET; > + udpin[0].sin_port =3D uh->uh_sport; > + udpin[0].sin_addr =3D ip->ip_src; > + bzero(&udpin[1], sizeof(struct sockaddr_in)); > + udpin[1].sin_len =3D sizeof(struct sockaddr_in); > + udpin[1].sin_family =3D AF_INET; > + udpin[1].sin_port =3D uh->uh_dport; > + udpin[1].sin_addr =3D ip->ip_dst; > =20 > /* > * Make mbuf data length reflect UDP length. If not enough data to > @@ -568,7 +584,7 @@ udp_input(struct mbuf **mp, int *offp, i > =20 > blocked =3D imo_multi_filter(imo, ifp, > (struct sockaddr *)&group, > - (struct sockaddr *)&udp_in); > + (struct sockaddr *)&udpin[0]); > if (blocked !=3D MCAST_PASS) { > if (blocked =3D=3D MCAST_NOTGMEMBER) > IPSTAT_INC(ips_notmember); > @@ -587,7 +603,7 @@ udp_input(struct mbuf **mp, int *offp, i > UDP_PROBE(receive, NULL, last, ip, > last, uh); > if (udp_append(last, ip, n, iphlen, > - &udp_in)) { > + udpin)) { > goto inp_lost; > } > } > @@ -620,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i > goto badunlocked; > } > UDP_PROBE(receive, NULL, last, ip, last, uh); > - if (udp_append(last, ip, m, iphlen, &udp_in) =3D=3D 0)=20 > + if (udp_append(last, ip, m, iphlen, udp_in) =3D=3D 0)=20 > INP_RUNLOCK(last); > inp_lost: > INP_INFO_RUNLOCK(pcbinfo); > @@ -710,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i > } > =20 > UDP_PROBE(receive, NULL, inp, ip, inp, uh); > - if (udp_append(inp, ip, m, iphlen, &udp_in) =3D=3D 0)=20 > + if (udp_append(inp, ip, m, iphlen, udp_in) =3D=3D 0)=20 > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > =20 >=20 > Modified: head/sys/netinet6/in6.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/netinet6/in6.h Fri Feb 10 05:14:19 2017 (r313523) > +++ head/sys/netinet6/in6.h Fri Feb 10 05:16:14 2017 (r313524) > @@ -497,6 +497,9 @@ struct route_in6 { > #define IPV6_RECVFLOWID 70 /* bool; receive IP6 > flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID > 71 /* bool; receive IP6 RSS bucket id w/ datagram */=20 > +#define IPV6_ORIGDSTADDR 65 /* bool: allow getting > dstaddr /port info */ +#define IPV6_RECVORIGDSTADDR > IPV6_ORIGDSTADDR + > /* > * The following option is private; do not use it from user applications. > * It is deliberately defined to the same value as IP_MSFILTER. >=20 > Modified: head/sys/netinet6/in6_pcb.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/netinet6/in6_pcb.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -1267,7 +1267,7 @@ in6_pcblookup_mbuf(struct > inpcbinfo *pcb } > =20 > void > -init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m) > +init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int srcordst) > { > struct ip6_hdr *ip; > =20 > @@ -1275,7 +1275,7 @@ init_sin6(struct sockaddr_in6 *sin6, str > bzero(sin6, sizeof(*sin6)); > sin6->sin6_len =3D sizeof(*sin6); > sin6->sin6_family =3D AF_INET6; > - sin6->sin6_addr =3D ip->ip6_src; > + sin6->sin6_addr =3D srcordst ? ip->ip6_dst : ip->ip6_src; > =20 > (void)sa6_recoverscope(sin6); /* XXX: should catch errors... */ > =20 >=20 > Modified: head/sys/netinet6/in6_pcb.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/netinet6/in6_pcb.h Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:16:14 > 2017 (r313524) @@ -113,7 +113,7 @@ int > in6_mapped_sockaddr(struct socket *s int in6_mapped_peeraddr(struct > socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb > *, struct ifnet *); int in6_pcbsetport(struct in6_addr *, struct inpcb > *, struct ucred *); -void init_sin6(struct sockaddr_in6 *sin6, struct > mbuf *m); +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, > int); #endif /* _KERNEL */ > =20 > #endif /* !_NETINET6_IN6_PCB_H_ */ >=20 > Modified: head/sys/netinet6/ip6_output.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/netinet6/ip6_output.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/ip6_output.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -1545,6 +1545,7 @@ ip6_ctloutput(struct socket *so, > struct #endif > case IPV6_V6ONLY: > case IPV6_AUTOFLOWLABEL: > + case IPV6_ORIGDSTADDR: > case IPV6_BINDANY: > case IPV6_BINDMULTI: > #ifdef RSS > @@ -1730,6 +1731,9 @@ do { \ > OPTSET(IN6P_AUTOFLOWLABEL); > break; > =20 > + case IPV6_ORIGDSTADDR: > + OPTSET2(INP_ORIGDSTADDR, optval); > + break; > case IPV6_BINDANY: > OPTSET(INP_BINDANY); > break; > @@ -2018,6 +2022,10 @@ do { \ > optval =3D OPTBIT(IN6P_AUTOFLOWLABEL); > break; > =20 > + case IPV6_ORIGDSTADDR: > + optval =3D OPTBIT2(INP_ORIGDSTADDR); > + break; > + > case IPV6_BINDANY: > optval =3D OPTBIT(INP_BINDANY); > break; >=20 > Modified: head/sys/netinet6/raw_ip6.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/netinet6/raw_ip6.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/raw_ip6.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -166,7 +166,7 @@ rip6_input(struct mbuf **mp, int > *offp,=20 > RIP6STAT_INC(rip6s_ipackets); > =20 > - init_sin6(&fromsa, m); /* general init */ > + init_sin6(&fromsa, m, 0); /* general init */ > =20 > ifp =3D m->m_pkthdr.rcvif; > =20 >=20 > Modified: head/sys/netinet6/udp6_usrreq.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/netinet6/udp6_usrreq.c Fri Feb 10 05:14:19 2017 > (r313523) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:16:14 > 2017 (r313524) @@ -137,7 +137,7 @@ udp6_append(struct inpcb *inp, > struct mb struct sockaddr_in6 *fromsa) > { > struct socket *so; > - struct mbuf *opts; > + struct mbuf *opts =3D NULL, *tmp_opts; > struct udpcb *up; > =20 > INP_LOCK_ASSERT(inp); > @@ -149,7 +149,7 @@ udp6_append(struct inpcb *inp, struct mb > if (up->u_tun_func !=3D NULL) { > in_pcbref(inp); > INP_RUNLOCK(inp); > - (*up->u_tun_func)(n, off, inp, (struct sockaddr *)fromsa, > + (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&fromsa[0], > up->u_tun_ctx); > INP_RLOCK(inp); > return (in_pcbrele_rlocked(inp)); > @@ -173,11 +173,23 @@ udp6_append(struct inpcb *inp, struct mb > if (inp->inp_flags & INP_CONTROLOPTS || > inp->inp_socket->so_options & SO_TIMESTAMP) > ip6_savecontrol(inp, n, &opts); > + if (inp->inp_vflag & INP_IPV6 && inp->inp_flags2 & INP_ORIGDSTADDR) { > + tmp_opts =3D sbcreatecontrol((caddr_t)&fromsa[1], > + sizeof(struct sockaddr_in6), IP_ORIGDSTADDR, > IPPROTO_IPV6); > + if (tmp_opts) { > + if (opts) { > + tmp_opts->m_next =3D opts; > + opts =3D tmp_opts; > + } else > + opts =3D tmp_opts; > + } > + > + } > m_adj(n, off + sizeof(struct udphdr)); > =20 > so =3D inp->inp_socket; > SOCKBUF_LOCK(&so->so_rcv); > - if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)fromsa, n, > + if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)&fromsa[0], > n, opts) =3D=3D 0) { > SOCKBUF_UNLOCK(&so->so_rcv); > m_freem(n); > @@ -202,7 +214,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > int off =3D *offp; > int cscov_partial; > int plen, ulen; > - struct sockaddr_in6 fromsa; > + struct sockaddr_in6 fromsa[2]; > struct m_tag *fwd_tag; > uint16_t uh_sum; > uint8_t nxt; > @@ -277,8 +289,10 @@ udp6_input(struct mbuf **mp, int *offp,=20 > /* > * Construct sockaddr format source address. > */ > - init_sin6(&fromsa, m); > - fromsa.sin6_port =3D uh->uh_sport; > + init_sin6(&fromsa[0], m, 0); > + fromsa[0].sin6_port =3D uh->uh_sport; > + init_sin6(&fromsa[1], m, 1); > + fromsa[1].sin6_port =3D uh->uh_dport; > =20 > pcbinfo =3D udp_get_inpcbinfo(nxt); > if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { > @@ -349,7 +363,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > =20 > blocked =3D im6o_mc_filter(imo, ifp, > (struct sockaddr *)&mcaddr, > - (struct sockaddr *)&fromsa); > + (struct sockaddr *)&fromsa[0]); > if (blocked !=3D MCAST_PASS) { > if (blocked =3D=3D MCAST_NOTGMEMBER) > IP6STAT_INC(ip6s_notmember); > @@ -370,7 +384,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > INP_RLOCK(last); > UDP_PROBE(receive, NULL, last, ip6, > last, uh); > - if (udp6_append(last, n, off, > &fromsa)) > + if (udp6_append(last, n, off, > fromsa)) goto inp_lost; > INP_RUNLOCK(last); > } > @@ -402,7 +416,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > INP_RLOCK(last); > INP_INFO_RUNLOCK(pcbinfo); > UDP_PROBE(receive, NULL, last, ip6, last, uh); > - if (udp6_append(last, m, off, &fromsa) =3D=3D 0)=20 > + if (udp6_append(last, m, off, fromsa) =3D=3D 0)=20 > INP_RUNLOCK(last); > inp_lost: > return (IPPROTO_DONE); > @@ -482,7 +496,7 @@ udp6_input(struct mbuf **mp, int *offp,=20 > } > } > UDP_PROBE(receive, NULL, inp, ip6, inp, uh); > - if (udp6_append(inp, m, off, &fromsa) =3D=3D 0) > + if (udp6_append(inp, m, off, fromsa) =3D=3D 0) > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > =20 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" The patch broke buildkernel: [...] /usr/src/sys/netinet/udp_usrreq.c:639:39: error: use of undeclared identifi= er 'udp_in'; did you mean 'udpin'? if (udp_append(last, ip, m, iphlen, udp_in)= =3D=3D 0) ^~~~~~ udpin /usr/src/sys/netinet/udp_usrreq.c:404:21: note: 'udpin' declared here struct sockaddr_in udpin[2]; Kind regards, oh From owner-svn-src-all@freebsd.org Fri Feb 10 05:51:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C46E4CD7E10; Fri, 10 Feb 2017 05:51:41 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E35C1ACE; Fri, 10 Feb 2017 05:51:41 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5pekF083863; Fri, 10 Feb 2017 05:51:40 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5pd0L083855; Fri, 10 Feb 2017 05:51:39 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100551.v1A5pd0L083855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 05:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313527 - in head/sys: netinet 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:51:41 -0000 Author: eri Date: Fri Feb 10 05:51:39 2017 New Revision: 313527 URL: https://svnweb.freebsd.org/changeset/base/313527 Log: Correct missed variable name. Reported-by: ohartmann@walstatt.org Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp_usrreq.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h head/sys/netinet6/in6_src.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:51:39 2017 (r313527) @@ -371,8 +371,8 @@ in_pcbbind(struct inpcb *inp, struct soc */ #if defined(INET) || defined(INET6) int -in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, - struct ucred *cred, int lookupflags) +in_pcb_lport(struct inpcb *inp, struct sockaddr *nam, struct in_addr *laddrp, + u_short *lportp, struct ucred *cred, int lookupflags) { struct inpcbinfo *pcbinfo; struct inpcb *tmpinp; @@ -381,6 +381,7 @@ in_pcb_lport(struct inpcb *inp, struct i u_short aux, first, last, lport; #ifdef INET struct in_addr laddr; + struct sockaddr_in *sin = NULL; #endif pcbinfo = inp->inp_pcbinfo; @@ -447,6 +448,7 @@ in_pcb_lport(struct inpcb *inp, struct i KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; + sin = (struct sockaddr_in *)nam; } #endif tmpinp = NULL; /* Make compiler happy. */ @@ -466,16 +468,29 @@ in_pcb_lport(struct inpcb *inp, struct i lport = htons(*lastport); #ifdef INET6 - if ((inp->inp_vflag & INP_IPV6) != 0) - tmpinp = in6_pcblookup_local(pcbinfo, - &inp->in6p_laddr, lport, lookupflags, cred); + if ((inp->inp_vflag & INP_IPV6) != 0) { + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; + if (sin6 != NULL && (inp->inp_flags & INP_ANONPORT)) { + tmpinp = in6_pcblookup_hash_locked(pcbinfo, + &sin6->sin6_addr, sin6->sin6_port, + &inp->in6p_laddr, lport, + lookupflags & (~INPLOOKUP_WILDCARD), + NULL); + } else + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, lookupflags, cred); + } #endif #if defined(INET) && defined(INET6) else #endif #ifdef INET - tmpinp = in_pcblookup_local(pcbinfo, laddr, - lport, lookupflags, cred); + if (sin != NULL && (inp->inp_flags & INP_ANONPORT)) + tmpinp = in_pcblookup_hash_locked(pcbinfo, sin->sin_addr, sin->sin_port, laddr, + lport, lookupflags & (~INPLOOKUP_WILDCARD), NULL); + else + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, lookupflags, cred); #endif } while (tmpinp != NULL); @@ -571,7 +586,7 @@ in_pcbbind_setup(struct inpcb *inp, stru return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL) { + if (nam == NULL || ((*lportp) == 0 && (inp->inp_flags & INP_ANONPORT))) { if ((error = prison_local_ip4(cred, &laddr)) != 0) return (error); } else { @@ -692,7 +707,7 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags); + error = in_pcb_lport(inp, nam, &laddr, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:51:39 2017 (r313527) @@ -697,8 +697,8 @@ void in_pcbgroup_update_mbuf(struct inpc void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); -int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, - struct ucred *, int); +int in_pcb_lport(struct inpcb *, struct sockaddr *, struct in_addr *, + u_short *, struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) @@ -1238,9 +1238,12 @@ tcp_connect(struct tcpcb *tp, struct soc INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - error = in_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); - if (error) + inp->inp_flags |= INP_ANONPORT; + error = in_pcbbind(inp, nam, td->td_ucred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; goto out; + } } /* @@ -1296,9 +1299,12 @@ tcp6_connect(struct tcpcb *tp, struct so INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); - if (error) + inp->inp_flags |= INP_ANONPORT; + error = in6_pcbbind(inp, nam, td->td_ucred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; goto out; + } } error = in6_pcbconnect(inp, nam, td->td_ucred); if (error != 0) Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, udp_in) == 0) + if (udp_append(last, ip, m, iphlen, udpin) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:51:39 2017 (r313527) @@ -132,7 +132,7 @@ in6_pcbbind(register struct inpcb *inp, return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL) { + if (nam == NULL || (inp->inp_flags & INP_ANONPORT)) { if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); @@ -296,7 +296,7 @@ in6_pcbbind(register struct inpcb *inp, inp->in6p_laddr = sin6->sin6_addr; } if (lport == 0) { - if ((error = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0) { + if ((error = in6_pcbsetport(nam, &inp->in6p_laddr, inp, cred)) != 0) { /* Undo an address bind that may have occurred. */ inp->in6p_laddr = in6addr_any; return (error); @@ -416,9 +416,12 @@ in6_pcbconnect_mbuf(register struct inpc } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { - error = in6_pcbbind(inp, (struct sockaddr *)0, cred); - if (error) + inp->inp_flags |= INP_ANONPORT; + error = in6_pcbbind(inp, nam, cred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; return (error); + } } inp->in6p_laddr = addr6; } Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:51:39 2017 (r313527) @@ -112,7 +112,8 @@ int in6_getsockaddr(struct socket *so, s int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb *, struct ifnet *); -int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); +int in6_pcbsetport(struct sockaddr *, struct in6_addr *, struct inpcb *, + struct ucred *); void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/in6_src.c Fri Feb 10 05:51:39 2017 (r313527) @@ -956,7 +956,8 @@ in6_selecthlim(struct inpcb *in6p, struc * share this function by all *bsd*... */ int -in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) +in6_pcbsetport(struct sockaddr *nam6, struct in6_addr *laddr, struct inpcb *inp, + struct ucred *cred) { struct socket *so = inp->inp_socket; u_int16_t lport = 0; @@ -979,7 +980,7 @@ in6_pcbsetport(struct in6_addr *laddr, s inp->inp_flags |= INP_ANONPORT; - error = in_pcb_lport(inp, NULL, &lport, cred, lookupflags); + error = in_pcb_lport(inp, nam6, NULL, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:42:06 2017 (r313526) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) @@ -778,11 +778,16 @@ udp6_output(struct inpcb *inp, struct mb error = EADDRNOTAVAIL; goto release; } - if (inp->inp_lport == 0 && - (error = in6_pcbsetport(laddr, inp, td->td_ucred)) != 0) { - /* Undo an address bind that may have occurred. */ - inp->in6p_laddr = in6addr_any; - goto release; + if (inp->inp_lport == 0) { + inp->inp_flags |= INP_ANONPORT; + error = in6_pcbsetport((struct sockaddr *)addr6, laddr, + inp, td->td_ucred); + if (error) { + inp->inp_flags &= ~INP_ANONPORT; + /* Undo an address bind that may have occurred. */ + inp->in6p_laddr = in6addr_any; + goto release; + } } } else { if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { From owner-svn-src-all@freebsd.org Fri Feb 10 05:58:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A77B8CD8069; Fri, 10 Feb 2017 05:58:18 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79AA71DC1; Fri, 10 Feb 2017 05:58:18 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A5wHEX084854; Fri, 10 Feb 2017 05:58:17 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A5wGco084846; Fri, 10 Feb 2017 05:58:16 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100558.v1A5wGco084846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 05:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313528 - in head/sys: netinet 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 05:58:18 -0000 Author: eri Date: Fri Feb 10 05:58:16 2017 New Revision: 313528 URL: https://svnweb.freebsd.org/changeset/base/313528 Log: Revert r313527 Heh svn is not git Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp_usrreq.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h head/sys/netinet6/in6_src.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/in_pcb.c Fri Feb 10 05:58:16 2017 (r313528) @@ -371,8 +371,8 @@ in_pcbbind(struct inpcb *inp, struct soc */ #if defined(INET) || defined(INET6) int -in_pcb_lport(struct inpcb *inp, struct sockaddr *nam, struct in_addr *laddrp, - u_short *lportp, struct ucred *cred, int lookupflags) +in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, + struct ucred *cred, int lookupflags) { struct inpcbinfo *pcbinfo; struct inpcb *tmpinp; @@ -381,7 +381,6 @@ in_pcb_lport(struct inpcb *inp, struct s u_short aux, first, last, lport; #ifdef INET struct in_addr laddr; - struct sockaddr_in *sin = NULL; #endif pcbinfo = inp->inp_pcbinfo; @@ -448,7 +447,6 @@ in_pcb_lport(struct inpcb *inp, struct s KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; - sin = (struct sockaddr_in *)nam; } #endif tmpinp = NULL; /* Make compiler happy. */ @@ -468,29 +466,16 @@ in_pcb_lport(struct inpcb *inp, struct s lport = htons(*lastport); #ifdef INET6 - if ((inp->inp_vflag & INP_IPV6) != 0) { - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; - if (sin6 != NULL && (inp->inp_flags & INP_ANONPORT)) { - tmpinp = in6_pcblookup_hash_locked(pcbinfo, - &sin6->sin6_addr, sin6->sin6_port, - &inp->in6p_laddr, lport, - lookupflags & (~INPLOOKUP_WILDCARD), - NULL); - } else - tmpinp = in6_pcblookup_local(pcbinfo, - &inp->in6p_laddr, lport, lookupflags, cred); - } + if ((inp->inp_vflag & INP_IPV6) != 0) + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, lookupflags, cred); #endif #if defined(INET) && defined(INET6) else #endif #ifdef INET - if (sin != NULL && (inp->inp_flags & INP_ANONPORT)) - tmpinp = in_pcblookup_hash_locked(pcbinfo, sin->sin_addr, sin->sin_port, laddr, - lport, lookupflags & (~INPLOOKUP_WILDCARD), NULL); - else - tmpinp = in_pcblookup_local(pcbinfo, laddr, - lport, lookupflags, cred); + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, lookupflags, cred); #endif } while (tmpinp != NULL); @@ -586,7 +571,7 @@ in_pcbbind_setup(struct inpcb *inp, stru return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL || ((*lportp) == 0 && (inp->inp_flags & INP_ANONPORT))) { + if (nam == NULL) { if ((error = prison_local_ip4(cred, &laddr)) != 0) return (error); } else { @@ -707,7 +692,7 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - error = in_pcb_lport(inp, nam, &laddr, &lport, cred, lookupflags); + error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/in_pcb.h Fri Feb 10 05:58:16 2017 (r313528) @@ -697,8 +697,8 @@ void in_pcbgroup_update_mbuf(struct inpc void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); -int in_pcb_lport(struct inpcb *, struct sockaddr *, struct in_addr *, - u_short *, struct ucred *, int); +int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, + struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/tcp_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) @@ -1238,12 +1238,9 @@ tcp_connect(struct tcpcb *tp, struct soc INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in_pcbbind(inp, nam, td->td_ucred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; + error = in_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); + if (error) goto out; - } } /* @@ -1299,12 +1296,9 @@ tcp6_connect(struct tcpcb *tp, struct so INP_HASH_WLOCK(&V_tcbinfo); if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in6_pcbbind(inp, nam, td->td_ucred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; + error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); + if (error) goto out; - } } error = in6_pcbconnect(inp, nam, td->td_ucred); if (error != 0) Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, udpin) == 0) + if (udp_append(last, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/in6_pcb.c Fri Feb 10 05:58:16 2017 (r313528) @@ -132,7 +132,7 @@ in6_pcbbind(register struct inpcb *inp, return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) lookupflags = INPLOOKUP_WILDCARD; - if (nam == NULL || (inp->inp_flags & INP_ANONPORT)) { + if (nam == NULL) { if ((error = prison_local_ip6(cred, &inp->in6p_laddr, ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0) return (error); @@ -296,7 +296,7 @@ in6_pcbbind(register struct inpcb *inp, inp->in6p_laddr = sin6->sin6_addr; } if (lport == 0) { - if ((error = in6_pcbsetport(nam, &inp->in6p_laddr, inp, cred)) != 0) { + if ((error = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0) { /* Undo an address bind that may have occurred. */ inp->in6p_laddr = in6addr_any; return (error); @@ -416,12 +416,9 @@ in6_pcbconnect_mbuf(register struct inpc } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in6_pcbbind(inp, nam, cred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; + error = in6_pcbbind(inp, (struct sockaddr *)0, cred); + if (error) return (error); - } } inp->in6p_laddr = addr6; } Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/in6_pcb.h Fri Feb 10 05:58:16 2017 (r313528) @@ -112,8 +112,7 @@ int in6_getsockaddr(struct socket *so, s int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); int in6_selecthlim(struct in6pcb *, struct ifnet *); -int in6_pcbsetport(struct sockaddr *, struct in6_addr *, struct inpcb *, - struct ucred *); +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/in6_src.c Fri Feb 10 05:58:16 2017 (r313528) @@ -956,8 +956,7 @@ in6_selecthlim(struct inpcb *in6p, struc * share this function by all *bsd*... */ int -in6_pcbsetport(struct sockaddr *nam6, struct in6_addr *laddr, struct inpcb *inp, - struct ucred *cred) +in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) { struct socket *so = inp->inp_socket; u_int16_t lport = 0; @@ -980,7 +979,7 @@ in6_pcbsetport(struct sockaddr *nam6, st inp->inp_flags |= INP_ANONPORT; - error = in_pcb_lport(inp, nam6, NULL, &lport, cred, lookupflags); + error = in_pcb_lport(inp, NULL, &lport, cred, lookupflags); if (error != 0) return (error); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:51:39 2017 (r313527) +++ head/sys/netinet6/udp6_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) @@ -778,16 +778,11 @@ udp6_output(struct inpcb *inp, struct mb error = EADDRNOTAVAIL; goto release; } - if (inp->inp_lport == 0) { - inp->inp_flags |= INP_ANONPORT; - error = in6_pcbsetport((struct sockaddr *)addr6, laddr, - inp, td->td_ucred); - if (error) { - inp->inp_flags &= ~INP_ANONPORT; - /* Undo an address bind that may have occurred. */ - inp->in6p_laddr = in6addr_any; - goto release; - } + if (inp->inp_lport == 0 && + (error = in6_pcbsetport(laddr, inp, td->td_ucred)) != 0) { + /* Undo an address bind that may have occurred. */ + inp->in6p_laddr = in6addr_any; + goto release; } } else { if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { From owner-svn-src-all@freebsd.org Fri Feb 10 06:01:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DA5CCD80FF; Fri, 10 Feb 2017 06:01:49 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE8E38A; Fri, 10 Feb 2017 06:01:48 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A61lDI087878; Fri, 10 Feb 2017 06:01:47 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A61lci087877; Fri, 10 Feb 2017 06:01:47 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100601.v1A61lci087877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 06:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313529 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:01:49 -0000 Author: eri Date: Fri Feb 10 06:01:47 2017 New Revision: 313529 URL: https://svnweb.freebsd.org/changeset/base/313529 Log: Fix build after r313524 Reported-by: ohartmann@walstatt.org Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:58:16 2017 (r313528) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 06:01:47 2017 (r313529) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int *offp, i goto badunlocked; } UDP_PROBE(receive, NULL, last, ip, last, uh); - if (udp_append(last, ip, m, iphlen, udp_in) == 0) + if (udp_append(last, ip, m, iphlen, udpin) == 0) INP_RUNLOCK(last); inp_lost: INP_INFO_RUNLOCK(pcbinfo); @@ -726,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i } UDP_PROBE(receive, NULL, inp, ip, inp, uh); - if (udp_append(inp, ip, m, iphlen, udp_in) == 0) + if (udp_append(inp, ip, m, iphlen, udpin) == 0) INP_RUNLOCK(inp); return (IPPROTO_DONE); From owner-svn-src-all@freebsd.org Fri Feb 10 06:09:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA4E1CD82DB; Fri, 10 Feb 2017 06:09:22 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 456CB63F; Fri, 10 Feb 2017 06:09:21 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MNMyz-1cVAVi1NRx-006tFT; Fri, 10 Feb 2017 07:09:11 +0100 Date: Fri, 10 Feb 2017 07:09:10 +0100 From: "O. Hartmann" To: Ermal =?ISO-8859-1?Q?Lu=E7i?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313529 - head/sys/netinet Message-ID: <20170210070910.188415ae@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201702100601.v1A61lci087877@repo.freebsd.org> References: <201702100601.v1A61lci087877@repo.freebsd.org> Organization: Walstatt X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:vYDc+j7AbjUGqd9Js8O7dQ0Hbx5NDsVp4dvP/MEfRJqWhpNXdsl ntC/8z3sGeMoJl0ecL/nwHRPp0uMQLU7pdetO2TREQBZVI71SotshNmwP9OImlQQADyxtz4 ZOqFnOjI5B3mIzuF+mc44Jj/ah1xprCFeYwIEAEl0hq8Q64X6mbqoQEnyotX8soxIWgUULD Iv0ygVHT1AW7qZd6m1+rg== X-UI-Out-Filterresults: notjunk:1;V01:K0:qQvk2X26+jE=:MSqmD093tza6uCJzUdTPpC LD00ClOhE3biDU3v6zwc3DlMv6R1vR5Th3h8Tp7mTYl/I8Nnl4Wdj8Tio3trCIJ6fzEneUJYv 4GV35UQpDnpyZgDWnKYHq9/q7n3VtGGA5dL2PMVrwX5i0JtHh9MFA+UFs1ARFrGy7MjFaW3Ji uo1/6x42FDio+JU9Y1Iy4xM2WCFdOtspOIv00Ysq0/boPAB1hnY4Dp01xOChqk26QriaXp/xm O/1cBChzeWm4GQscs0EyJ/tcdHnFLXDm7Sju+mvPiI1b+65qp6FhpxtNKzOYkqXZxPUy/subO bDBZpLnV2iU3MG9/WQZijiowpkkt3mqIlJnLKBpkzyrMrDdgdMBIOWyIUldJmD8V6KHy+Y4Ii q8kfVpDWa2iXWfNIsJvfTVWEVDEGZD6lgsjZ+BPL892uBmPnlkEJhCZuPdAEKvDy/v3P35gtv RRDvaapjWCm91AGd+74CYLD0niYDNLuEju8WsO7PvC6upbvX3eet+M1Jjel2RpuczXUQ3NVQU 1LxevJxxGK6x/gZTr5DXG7qrOLTkdZrZ5nLE0nKh/EbSuv+yEdeqf33qqozSpMhR3QIzTSLqH hoqvAFbOdqPUqBDGVreBvesB9MTS501HyF6+hnlUuRbQQq9nlhk4TQwDVBmvmzYGXbuHx2COQ ybYOjqsUqUuURHLLJskfpu7JA/40xL+56IfcH2yyUGnagqFdCQbLOofzwzZj9J50SC0CRnGLw 28mfRtspPgBtioi3nDCfRSIgoyNJTv2H2Q4WX4xlmJTiQuB9ri3tcaV7M1L8n4wdwc6J3B9FJ XkUMhQB07oddCz8ZaqUrpTSO5qX5IspoCSRHHuLHHVlDiR+4H330v8ggTZftWtgeZ80ELE5lP N7v+4UsFrymRE58qAuNyXyn5AzH2iXsNqurvQPvkOMoc1Q14tohE8M4umerxcO8NsV9HPIc/7 uECONUcdoVXoRRhU8F/lFCLxsE0i35wh0yRmGXaCCWRDcOZkZLxKx/jwnCVxtYiZO6byW/hPu WLG4tazlmNt/vD/F2mqPVDo= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:09:23 -0000 On Fri, 10 Feb 2017 06:01:47 +0000 (UTC) Ermal Lu=C3=A7i wrote: > Author: eri > Date: Fri Feb 10 06:01:47 2017 > New Revision: 313529 > URL: https://svnweb.freebsd.org/changeset/base/313529 >=20 > Log: > Fix build after r313524 > =20 > Reported-by: ohartmann@walstatt.org >=20 > Modified: > head/sys/netinet/udp_usrreq.c >=20 > Modified: head/sys/netinet/udp_usrreq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/udp_usrreq.c Fri Feb 10 05:58:16 2017 > (r313528) +++ head/sys/netinet/udp_usrreq.c Fri Feb 10 06:01:47 > 2017 (r313529) @@ -636,7 +636,7 @@ udp_input(struct mbuf **mp, int > *offp, i goto badunlocked; > } > UDP_PROBE(receive, NULL, last, ip, last, uh); > - if (udp_append(last, ip, m, iphlen, udp_in) =3D=3D 0)=20 > + if (udp_append(last, ip, m, iphlen, udpin) =3D=3D 0)=20 > INP_RUNLOCK(last); > inp_lost: > INP_INFO_RUNLOCK(pcbinfo); > @@ -726,7 +726,7 @@ udp_input(struct mbuf **mp, int *offp, i > } > =20 > UDP_PROBE(receive, NULL, inp, ip, inp, uh); > - if (udp_append(inp, ip, m, iphlen, udp_in) =3D=3D 0)=20 > + if (udp_append(inp, ip, m, iphlen, udpin) =3D=3D 0)=20 > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > =20 > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Still (r313529) buildkernel breakage: [...] /usr/src/sys/netinet6/ip6_output.c:1741:10: error: duplicate case value '65' case IPV6_BINDMULTI: ^ /usr/src/sys/netinet6/in6.h:492:25: note: expanded from macro 'IPV6_BINDMUL= TI' #define IPV6_BINDMULTI 65 /* bool; allow multibind to same addr/po= rt */ From owner-svn-src-all@freebsd.org Fri Feb 10 06:20:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24961CD8608; Fri, 10 Feb 2017 06:20:29 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E859AB20; Fri, 10 Feb 2017 06:20:28 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A6KSlb093165; Fri, 10 Feb 2017 06:20:28 GMT (envelope-from eri@FreeBSD.org) Received: (from eri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A6KS8S093164; Fri, 10 Feb 2017 06:20:28 GMT (envelope-from eri@FreeBSD.org) Message-Id: <201702100620.v1A6KS8S093164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eri set sender to eri@FreeBSD.org using -f From: =?UTF-8?Q?Ermal_Lu=c3=a7i?= Date: Fri, 10 Feb 2017 06:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313530 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:20:29 -0000 Author: eri Date: Fri Feb 10 06:20:27 2017 New Revision: 313530 URL: https://svnweb.freebsd.org/changeset/base/313530 Log: Use proper value for socket option on IPv6 Reported-by: ohartmann@walstatt.org Modified: head/sys/netinet6/in6.h Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Fri Feb 10 06:01:47 2017 (r313529) +++ head/sys/netinet6/in6.h Fri Feb 10 06:20:27 2017 (r313530) @@ -497,7 +497,7 @@ struct route_in6 { #define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ -#define IPV6_ORIGDSTADDR 65 /* bool: allow getting dstaddr /port info */ +#define IPV6_ORIGDSTADDR 72 /* bool: allow getting dstaddr /port info */ #define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR /* From owner-svn-src-all@freebsd.org Fri Feb 10 06:31:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A2E3CD8B8B; Fri, 10 Feb 2017 06:31:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36E5F1253; Fri, 10 Feb 2017 06:31:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A6VV8r000930; Fri, 10 Feb 2017 06:31:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A6VVkX000929; Fri, 10 Feb 2017 06:31:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100631.v1A6VVkX000929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 06:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313531 - stable/11/lib/libc/db/hash X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:31:32 -0000 Author: ngie Date: Fri Feb 10 06:31:31 2017 New Revision: 313531 URL: https://svnweb.freebsd.org/changeset/base/313531 Log: MFC r306349: r306349 (by pfg): hash(3): protect in-memory page when using cross-endianness. When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. Obtained from: NetBSD (CVS rev. 1.29) Modified: stable/11/lib/libc/db/hash/hash_page.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/db/hash/hash_page.c ============================================================================== --- stable/11/lib/libc/db/hash/hash_page.c Fri Feb 10 06:20:27 2017 (r313530) +++ stable/11/lib/libc/db/hash/hash_page.c Fri Feb 10 06:31:31 2017 (r313531) @@ -572,7 +572,9 @@ __get_page(HTAB *hashp, char *p, u_int32 int __put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap) { - int fd, page, size, wsize; + int fd, page, size; + ssize_t wsize; + char pbuf[MAX_BSIZE]; size = hashp->BSIZE; if ((hashp->fp == -1) && open_temp(hashp)) @@ -582,15 +584,18 @@ __put_page(HTAB *hashp, char *p, u_int32 if (hashp->LORDER != BYTE_ORDER) { int i, max; + memcpy(pbuf, p, size); if (is_bitmap) { max = hashp->BSIZE >> 2; /* divide by 4 */ for (i = 0; i < max; i++) - M_32_SWAP(((int *)p)[i]); + M_32_SWAP(((int *)pbuf)[i]); } else { - max = ((u_int16_t *)p)[0] + 2; + uint16_t *bp = (uint16_t *)(void *)pbuf; + max = bp[0] + 2; for (i = 0; i <= max; i++) - M_16_SWAP(((u_int16_t *)p)[i]); + M_16_SWAP(bp[i]); } + p = pbuf; } if (is_bucket) page = BUCKET_TO_PAGE(bucket); From owner-svn-src-all@freebsd.org Fri Feb 10 06:34:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 391DACD8D39; Fri, 10 Feb 2017 06:34:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 083DD14EF; Fri, 10 Feb 2017 06:34:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A6YrZ3001132; Fri, 10 Feb 2017 06:34:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A6Yrjb001131; Fri, 10 Feb 2017 06:34:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100634.v1A6Yrjb001131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 06:34: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: r313532 - stable/10/lib/libc/db/hash 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:34:54 -0000 Author: ngie Date: Fri Feb 10 06:34:52 2017 New Revision: 313532 URL: https://svnweb.freebsd.org/changeset/base/313532 Log: MFC r306349: r306349 (by pfg): hash(3): protect in-memory page when using cross-endianness. When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. Obtained from: NetBSD (CVS rev. 1.29) Modified: stable/10/lib/libc/db/hash/hash_page.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/db/hash/hash_page.c ============================================================================== --- stable/10/lib/libc/db/hash/hash_page.c Fri Feb 10 06:31:31 2017 (r313531) +++ stable/10/lib/libc/db/hash/hash_page.c Fri Feb 10 06:34:52 2017 (r313532) @@ -572,7 +572,9 @@ __get_page(HTAB *hashp, char *p, u_int32 int __put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap) { - int fd, page, size, wsize; + int fd, page, size; + ssize_t wsize; + char pbuf[MAX_BSIZE]; size = hashp->BSIZE; if ((hashp->fp == -1) && open_temp(hashp)) @@ -582,15 +584,18 @@ __put_page(HTAB *hashp, char *p, u_int32 if (hashp->LORDER != BYTE_ORDER) { int i, max; + memcpy(pbuf, p, size); if (is_bitmap) { max = hashp->BSIZE >> 2; /* divide by 4 */ for (i = 0; i < max; i++) - M_32_SWAP(((int *)p)[i]); + M_32_SWAP(((int *)pbuf)[i]); } else { - max = ((u_int16_t *)p)[0] + 2; + uint16_t *bp = (uint16_t *)(void *)pbuf; + max = bp[0] + 2; for (i = 0; i <= max; i++) - M_16_SWAP(((u_int16_t *)p)[i]); + M_16_SWAP(bp[i]); } + p = pbuf; } if (is_bucket) page = BUCKET_TO_PAGE(bucket); From owner-svn-src-all@freebsd.org Fri Feb 10 06:53:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC06DCD11F1; Fri, 10 Feb 2017 06:53:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A86E11E5E; Fri, 10 Feb 2017 06:53:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A6rmKp009349; Fri, 10 Feb 2017 06:53:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A6rmL9009347; Fri, 10 Feb 2017 06:53:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702100653.v1A6rmL9009347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 10 Feb 2017 06: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: r313533 - stable/10/usr.sbin/watchdogd 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:53:50 -0000 Author: delphij Date: Fri Feb 10 06:53:48 2017 New Revision: 313533 URL: https://svnweb.freebsd.org/changeset/base/313533 Log: MFC r274583: Default to use 10 seconds as nap interval instead of 1. Modified: stable/10/usr.sbin/watchdogd/watchdogd.8 stable/10/usr.sbin/watchdogd/watchdogd.c Modified: stable/10/usr.sbin/watchdogd/watchdogd.8 ============================================================================== --- stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 06:34:52 2017 (r313532) +++ stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 06:53:48 2017 (r313533) @@ -80,7 +80,7 @@ reboot if there are problems with the sc The .Fl s Ar sleep argument can be used to control the sleep period between each execution -of the check and defaults to one second. +of the check and defaults to 10 seconds. .Pp The .Fl t Ar timeout Modified: stable/10/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 06:34:52 2017 (r313532) +++ stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 06:53:48 2017 (r313533) @@ -80,7 +80,7 @@ static u_int timeout = WD_TO_128SEC; static u_int exit_timeout = WD_TO_NEVER; static u_int pretimeout = 0; static u_int timeout_sec; -static u_int nap = 1; +static u_int nap = 10; static int passive = 0; static int is_daemon = 0; static int is_dry_run = 0; /* do not arm the watchdog, only From owner-svn-src-all@freebsd.org Fri Feb 10 06:58:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77CCCCD126F; Fri, 10 Feb 2017 06:58:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8FA1FBA; Fri, 10 Feb 2017 06:58:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A6wJLE009869; Fri, 10 Feb 2017 06:58:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A6wJnj009868; Fri, 10 Feb 2017 06:58:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702100658.v1A6wJnj009868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 10 Feb 2017 06:58: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: r313534 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 06:58:20 -0000 Author: delphij Date: Fri Feb 10 06:58:18 2017 New Revision: 313534 URL: https://svnweb.freebsd.org/changeset/base/313534 Log: MFC r274583: Default to use 10 seconds as nap interval instead of 1. (the mergeinfo portion; actual code changes were committed from wrong directory). Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Feb 10 07:13:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C104CCD16A1; Fri, 10 Feb 2017 07:13:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E288A08; Fri, 10 Feb 2017 07:13:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7DHxC018003; Fri, 10 Feb 2017 07:13:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7DHZ3017997; Fri, 10 Feb 2017 07:13:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100713.v1A7DHZ3017997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:13: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: r313535 - in stable/10: contrib/netbsd-tests contrib/netbsd-tests/crypto/libcrypto contrib/netbsd-tests/dev/audio contrib/netbsd-tests/dev/cgd contrib/netbsd-tests/fs/ffs contrib/netbsd... 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:13:18 -0000 Author: ngie Date: Fri Feb 10 07:13:16 2017 New Revision: 313535 URL: https://svnweb.freebsd.org/changeset/base/313535 Log: MFC r311925,r311968,r311969,r312008: r311925: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . r312008: Upgrade NetBSD tests to 01.11.2017_23.20 snapshot This contains some new testcases in /usr/tests/...: - .../lib/libc - .../lib/libthr - .../lib/msun - .../sys/kern Tested on: amd64, i386 Added: stable/10/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c - copied unchanged from r312008, head/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c stable/10/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c - copied unchanged from r312008, head/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c stable/10/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c - copied unchanged from r312008, head/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c stable/10/contrib/netbsd-tests/kernel/msg.h - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/msg.h stable/10/contrib/netbsd-tests/kernel/t_ptrace.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace.c stable/10/contrib/netbsd-tests/kernel/t_ptrace_wait.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_wait.c stable/10/contrib/netbsd-tests/kernel/t_ptrace_wait.h - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_wait.h stable/10/contrib/netbsd-tests/kernel/t_ptrace_wait3.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_wait3.c stable/10/contrib/netbsd-tests/kernel/t_ptrace_wait4.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_wait4.c stable/10/contrib/netbsd-tests/kernel/t_ptrace_wait6.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_wait6.c stable/10/contrib/netbsd-tests/kernel/t_ptrace_waitid.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_waitid.c stable/10/contrib/netbsd-tests/kernel/t_ptrace_waitpid.c - copied unchanged from r312008, head/contrib/netbsd-tests/kernel/t_ptrace_waitpid.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc_wnohang.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc_wnohang.c stable/10/contrib/netbsd-tests/lib/libm/t_casinh.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libm/t_casinh.c stable/10/contrib/netbsd-tests/lib/libm/t_fe_round.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libm/t_fe_round.c stable/10/contrib/netbsd-tests/lib/libm/t_ilogb.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libm/t_ilogb.c stable/10/contrib/netbsd-tests/lib/libpthread/t_timedmutex.c - copied unchanged from r312008, head/contrib/netbsd-tests/lib/libpthread/t_timedmutex.c stable/10/contrib/netbsd-tests/net/net/t_mtudisc.sh - copied unchanged from r312008, head/contrib/netbsd-tests/net/net/t_mtudisc.sh stable/10/contrib/netbsd-tests/net/net/t_mtudisc6.sh - copied unchanged from r312008, head/contrib/netbsd-tests/net/net/t_mtudisc6.sh stable/10/contrib/netbsd-tests/net/net/t_ping6_opts.sh - copied unchanged from r312008, head/contrib/netbsd-tests/net/net/t_ping6_opts.sh stable/10/contrib/netbsd-tests/net/net_common.sh - copied unchanged from r312008, head/contrib/netbsd-tests/net/net_common.sh stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_union.c - copied unchanged from r312008, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_union.c stable/10/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c - copied unchanged from r312008, head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c Modified: stable/10/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh stable/10/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh stable/10/contrib/netbsd-tests/dev/audio/h_pad.c stable/10/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue stable/10/contrib/netbsd-tests/fs/ffs/ffs_common.sh stable/10/contrib/netbsd-tests/fs/fifofs/t_fifo.c stable/10/contrib/netbsd-tests/fs/psshfs/t_psshfs.sh stable/10/contrib/netbsd-tests/fs/puffs/t_basic.c stable/10/contrib/netbsd-tests/fs/vfs/t_vnops.c stable/10/contrib/netbsd-tests/h_macros.h stable/10/contrib/netbsd-tests/kernel/t_mqueue.c stable/10/contrib/netbsd-tests/lib/libc/arch/sparc64/exec_prot_support.c stable/10/contrib/netbsd-tests/lib/libc/arch/sparc64/return_one.S stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_openat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c stable/10/contrib/netbsd-tests/lib/libc/db/h_db.c stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_assert.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_dir.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_ftok.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_time.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_vis.c stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c stable/10/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c stable/10/contrib/netbsd-tests/lib/libc/string/t_memmem.c stable/10/contrib/netbsd-tests/lib/libc/string/t_strchr.c stable/10/contrib/netbsd-tests/lib/libc/string/t_strerror.c stable/10/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc stable/10/contrib/netbsd-tests/lib/libc/sys/t_access.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_chroot.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_mincore.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_mmap.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_wait.c stable/10/contrib/netbsd-tests/lib/libc/t_cdb.c stable/10/contrib/netbsd-tests/lib/libm/t_ldexp.c stable/10/contrib/netbsd-tests/lib/libm/t_precision.c stable/10/contrib/netbsd-tests/lib/libpthread/h_common.h stable/10/contrib/netbsd-tests/lib/libpthread/t_mutex.c stable/10/contrib/netbsd-tests/lib/librumpclient/h_execthr.c stable/10/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh stable/10/contrib/netbsd-tests/lib/libusbhid/t_usbhid.c stable/10/contrib/netbsd-tests/net/arp/t_arp.sh stable/10/contrib/netbsd-tests/net/arp/t_dad.sh stable/10/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh stable/10/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh stable/10/contrib/netbsd-tests/net/if/t_compat.c stable/10/contrib/netbsd-tests/net/if/t_ifconfig.sh stable/10/contrib/netbsd-tests/net/if_bridge/t_bridge.sh stable/10/contrib/netbsd-tests/net/if_gif/t_gif.sh stable/10/contrib/netbsd-tests/net/if_pppoe/t_pppoe.sh stable/10/contrib/netbsd-tests/net/if_tap/t_tap.sh stable/10/contrib/netbsd-tests/net/mcast/t_mcast.sh stable/10/contrib/netbsd-tests/net/ndp/t_dad.sh stable/10/contrib/netbsd-tests/net/ndp/t_ndp.sh stable/10/contrib/netbsd-tests/net/ndp/t_ra.sh stable/10/contrib/netbsd-tests/net/net/t_forwarding.sh stable/10/contrib/netbsd-tests/net/net/t_ipaddress.sh stable/10/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh stable/10/contrib/netbsd-tests/net/net/t_ipv6address.sh stable/10/contrib/netbsd-tests/net/route/t_change.sh stable/10/contrib/netbsd-tests/net/route/t_flags.sh stable/10/contrib/netbsd-tests/net/route/t_flags6.sh stable/10/contrib/netbsd-tests/net/route/t_route.sh stable/10/contrib/netbsd-tests/rump/modautoload/t_modautoload.c stable/10/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c stable/10/contrib/netbsd-tests/sys/net/t_print.c stable/10/contrib/netbsd-tests/usr.bin/config/t_config.sh stable/10/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh stable/10/lib/libc/tests/db/Makefile stable/10/lib/libc/tests/gen/Makefile stable/10/lib/libc/tests/stdlib/Makefile stable/10/lib/libc/tests/sys/Makefile stable/10/lib/libthr/tests/Makefile stable/10/lib/msun/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh ============================================================================== --- stable/10/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh Fri Feb 10 06:58:18 2017 (r313534) +++ stable/10/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh Fri Feb 10 07:13:16 2017 (r313535) @@ -1,4 +1,4 @@ -# $NetBSD: t_libcrypto.sh,v 1.3 2010/11/08 19:06:12 pooka Exp $ +# $NetBSD: t_libcrypto.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case bn bn_head() { atf_set "descr" "Checks BIGNUM library" - atf_set "timeout" "300" + atf_set "timeout" "360" } bn_body() { Modified: stable/10/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh ============================================================================== --- stable/10/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh Fri Feb 10 06:58:18 2017 (r313534) +++ stable/10/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh Fri Feb 10 07:13:16 2017 (r313535) @@ -1,4 +1,4 @@ -# $NetBSD: t_pubkey.sh,v 1.3 2011/06/09 05:25:21 spz Exp $ +# $NetBSD: t_pubkey.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case rsa rsa_head() { atf_set "descr" "Checks RSA" - atf_set "timeout" "300" + atf_set "timeout" "420" } rsa_body() { @@ -60,7 +60,7 @@ atf_test_case ec ec_head() { atf_set "descr" "Checks EC cipher" - atf_set "timeout" "300" + atf_set "timeout" "480" } ec_body() { @@ -81,7 +81,7 @@ atf_test_case ecdsa ecdsa_head() { atf_set "descr" "Checks ECDSA algorithm" - atf_set "timeout" "300" + atf_set "timeout" "480" } ecdsa_body() { Modified: stable/10/contrib/netbsd-tests/dev/audio/h_pad.c ============================================================================== --- stable/10/contrib/netbsd-tests/dev/audio/h_pad.c Fri Feb 10 06:58:18 2017 (r313534) +++ stable/10/contrib/netbsd-tests/dev/audio/h_pad.c Fri Feb 10 07:13:16 2017 (r313535) @@ -1,4 +1,4 @@ -/* $NetBSD: h_pad.c,v 1.1 2010/08/04 13:15:15 pooka Exp $ */ +/* $NetBSD: h_pad.c,v 1.2 2016/10/15 07:08:06 nat Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -56,14 +56,14 @@ main(int argc, char *argv[]) ssize_t n; rump_init(); - audiofd = rump_sys_open("/dev/audio0", O_RDWR); - if (audiofd == -1) - err(1, "open audio"); - padfd = rump_sys_open("/dev/pad0", O_RDONLY); if (padfd == -1) err(1, "open pad"); + audiofd = rump_sys_open("/dev/audio0", O_RDWR); + if (audiofd == -1) + err(1, "open audio"); + if ((n = rump_sys_write(audiofd, musa, sizeof(musa))) != sizeof(musa)) err(1, "write"); Modified: stable/10/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue ============================================================================== --- stable/10/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Fri Feb 10 06:58:18 2017 (r313534) +++ stable/10/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Fri Feb 10 07:13:16 2017 (r313535) @@ -1,1035 +1,1040 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629369%IQ#X`MT#FU'+1O7<;MT;NYNNYW<[N[OO;K>W7+>^Y[M;[LV]??=M] -MYZ[MMMO>WO;6=W.KIOKNUF:EFEJVK5I"+:J;8:B5K1JJIJVUJV,K6IK5MJJ6 -M--%5FJLS55K158M5K:U5FU4RVMJ(K0BK-6Q0-L+6JVLJ6MK559M5556*M54J -MJMIMFS-"U6LJRUBRJJRV;55::M6U[G=0JI5-4W66J=KVZ]LNW=]W=FW=S;YM -MDO<]LW>Z[WW%E@WUOD-[G!SN<'=W$CD8@[KN<36:PVO=W;*I*E%4SC -MV]XE)5!54*"@*JJMH)J0H*`4&V4`!11(``!4BJI27O>Z(]5()`22)**%4``I -M0`!*B5`D(DB*5@:5``AH`"8F3"8`F0#3(Q,FF@#1H&(&C)H-#3330!ID,C`C -M!-,F)IIA`TQ-,!,33$831@@R9&$T`!,`@TD@FC$``````&@```:-`3`F$P0T -M,$!@`$``#03T!H-`U,`33$TTQJ-,$P$P%/$R8",!-02FDI"!$QJ>S,`0`$!H -M:!#":$Q-,28$V@0-`34]$:;*:>D]1I[0H'HGDRC:AD&@]0&@/4`]0R`R,AH- -M!H`VHS2`:`(4E)*)&R>J-^GBGL!2,:::2;48GI$IO%)Y)Y)[3TE/U1^FFC*C -MQ&H>IZC$T,AIZAZF31H>4``'J!DTTT---```#U```-`9#0T``T!(I((28-)B -M>A3TTF>14]3VT&IJ>R,@F$TQ'DT3&@FU3\4GFDT>J>333&IBFTPF$T]$-,32 -MGM-4]IDTR)ZI^1I3V332;(93-4_5/R>D#":GDU-D:FIZ>IM3U-HTH)-25)%1 -MM3:3]L/-2$FWD4S4U-B:::FB;4V3"4_4R4>H>U0;4]JGJ&33T]4T`#(T-&0] -M0!HT-`_5`!Z@T````9!IH:```````_Q$/Z:,D&8X$&L.'B.D00+!M12TQ2"> -MGH4)$$U776'(,NA5T"`@H&+#%`;<'^;2<4$`CK#I>?6\SY]KTOQX,LDD%=#] -M=K=W[.S5.*PD:9EE+#8V,8RRL@"_3]+%\'Y\OE<[XY25)9,&QL(&#!(B3@T. -MCTYNF5=LVA0D0'QD+"T]J]AX/R0)P"P$\13QX$Q,/GR(O5_U5.R7J.DE`0K( -MEC0PL$_ONQ0)A@@60_";^_OE&;Q_:\_3BPGL8?\=O:KUNG!-MF0A03X9PPMX -MF'WE;&SK)O(N2J"`80_J9Y6*=6(?DZ7*_=I%;(JB,Q$/X5S@P$*M6IZ6$>F. -M&L;Y&C($S\KC'O`Q#')%M:;\FTP-4ET5[;UV7JU<$0D7*H[&KC\]MFO+$`\& -MK%L^,?8,8N-=10VF1`%ZT<0V#-6C#OCSQ<+:D1!\*'M+14@>!P\/!T&+LDA` -MM>S!`Y))"PU-A7RRF1#XLD2TAAXFXPES0HB!="\G,MI5;+<6\:#8!?:^9F[% -ME',L8MFO;T)7.GR!;_`/D0:1+;UF7Y[3=J&V"``O/U.NE!"#*9$.X86#N,8I -M`#2>Y2VR.+WM3?[`$7UIE`R.12-/ADE3=;A$1!:]O_:**7`0NS1[]JFWB&;, -M9H]?3J1$29(D`##!T*ZI]K?Y2?W`!+<"-:V[)FM&)64CY`27=R&1(43Q0:.3 -M57.RL\G5'0B!%DUBC6R2:/8GH36'00V/_3FF$$BHG7;+O%I3X!8&S2LK'/>1 -M8OS=Z#;4Y$43X>>W=G@!;JCZJXZ+CG@"_SV[O7ZI=P8DJ:+_5D',I4)`;G=/ -M'LMX@K6`@UZ4;>CQD0!>G1L^>LPH@:>W<=.CS^7@)?+I``+POTESZ]3/ZA2! -M75?3@*BYG9V,AZN4Q4&IJ@(<=6[N*2:B4T)ITB]VC:@%[*8[4SK5EZR_]5WDD@B*BP]Z -MM&`(P"9NX?<(%_4:IX/(`!5M=`Y*J0ALV/=9UEH,?/)])PN4S.3Q*JX(OE@. -M2:Z?"+C-^RQK#(AH^YZF'"(N4H(.K.`QOV&@=HI"`,-P0@1,W5)#ZE916Z/V -MDMCV8^`4YS\-7R*L!D&Y@OT/@[O\HB+8?+K:EP*>6KQIHI#9&]*\I@AOG`B[ -ME!(1^\3.":TV[8($^"X\PV,D"7'@5IA -M_&HS5?4^K5(@17-'D>"%FJ8^%HE-%-GP07=Y"M@$+JL?O=<_H_;+X"$$)/+$ -M(#&Y%>VSVDIS6@!!PH[W&3U(!SXV;RV<\".VZ\"A!%NDZM&LY*JMTR0+GH5% -M-UD0(OWQ1PM=G=;!V2D>(AEP2@)MH6&EBU77QS:R7B0`5P)?N)=]4'"%!``L -M6>;IEY>3]?^J#F8Y((@VJ'9(3=(Y;EL/U*W3_M""&*6LOPA)`2G2\;XHZ?,1 -MN@9?--I!`7BU)`)6&?V2\RV=GPPO_+AI`13_]&!9NI8WF&D8=EAD>=1@A]-M -M2*,@.#^UP_^]`1,'Y@7\>&O=GPWW86]K`46*"9"107H9R&2FIS4QC(C9?S9E -M0`/+,`K\G03>F3F0D&K]O^I"WC##9]90$6;P/K*\,L":#V^TRY\OGS?!Z.>D -M($R4A>S*K^+BN!7^#D(`!):^.YO0(#Y_7L:3*O#7:[G5>S#2DD#:[ZDW8'GX -M2)284[['@*/]+TCLR$C2\R=8*W5,5CI?!P%6`2B(:+04!>;6K6S6]](_;T]*B(`QH.-:D+F0Y(DOX[O8A^D&ZOMFWV'@4'P8^/`G6' -M4MT7D&'K95`"'TM;8HC'LCRM8)T%MM8^D+N/=;2(V#3NCX`4ISMR_2ZY!(<< -MODMH/*.`-_8\FLT9T`6L6N;B -ML+\].#\V8R;3BE920@#2V1+PA(E.R3ONAYKUN//A^GSGB+*OAX\D`:G4 -M:N6A>'`4Q\%%^V;+*\"K@=4D2`OFKMZ-$0*_[`*>S-)N7WOTB9UK:P8!A_-* -M!#IK6Q(LWF_4F>(UJO>>(9:Z7`0D,+EMF0/N3>?#*1()V)O8Z86&8^!<^ZRS=X!-^V>ZVP;`ZT!\%Z,_M4O]>(!*Q -M%78V.MY[N[_RBAL(JLA?)W_"-+S/ZED0 -M;/3I;2@T6N\'?(;S])2EU,C6-+$@`&SZ+)688"[5QVM98;-GB%YN\`AY&9IE -MW6!=**T2J@+$5]."ANQ]8K\>S;J0'=Q541?&&5H]>H.:O/8H/BC(H+5TL-!% -MC&+N0$H<`3/0LN='R;P@R<.!'<-C*;7FPP#W3-Z"8=_X,P_=A -MXHKO&(2"G=D,QU$C((T6%6GP&!#S"XF5-4V6YAT`'5EB!2_H5R+\+"TB'N$` -M+T%X4&3]-]G#I0>*@2%GIH7 -MSW9O]0D`OIGB+^\1)&P36=Y]RD/%JD1%"5@`[_O_LUM7*JV1\K6;+I3/![/Q -M.#`S2;N_U[:(B>+8XRN,SF.'J%WW8:0"&DUMP7D:"XONX&O-1"LFTT^RG -MR+S^5?!8/;3Y9K[##DDM+1(B+E*B/MD%:Y4H%W4-P>!,]+^'3!:;H\PZRRFC -M,*N]1$`Y3OHLIC/@I?18G7MEW5J04*WZE9NVEJCX]O3A@!"*.^XTQR#K_H+B -MK`_GST-]:GHOXGP6;!7_\>WC/V4[-<>[Y"(A'>SUX`+BNS=W40.$/SF;@#%7 -M/G9ZN`.E)(9E.O"`OX'_/=0TANWS\@%ZGZ"Q`@[-KB[#G4C"?(+B9O2!?3V? -MU(RWC7&#H]VG6T@"3_+P0#-+4"/+:-K195`'/]=0!>5EY/E\%"0EO%WYN;I\ -M,!92L^L[-@(=H^*F`-%2+>M'^T?2W -M'C:U,6=Z7MD- -M!S,3Y&RP>BX!RT^M!(O4_R)^"A]\?+TU4;M'@"5;;:ZIS@]DEP@`GW#)=.K] -MO\7W&3'^J?:TH`>FSXA%M?%/2O67]%.K"6EKOD22)U:K(B^/TNND%OAGR,>$A17>EHS;U89'SEZ,TK*[C@G2H>W_/QJP2&S5GGO -MJE2]X=O]U=K22`\/)G.A*\;1D5Y8TB9-1"S]]V@!)?#_OC6ZNP(-L@?M71N) -MF5SY`+]]\X//8((6RI`6'=Q>`,79HH,_*7BDQ5B$ -MF#C;\$,9E\_=O%KQ8180+*XJ:0$1[TM:]]/]?3>UY$I,\SDOR,#I1E=JFS"! -M)D6KO$6H8D4OU,[!)!$>B\C[>U3$!Z^KJW(<\.5K:U&!G41!!%$5_Y/6QC+5MNVCN4"&]Z]DJO`(9_'6]7?*ZF8/$&+R1H`D$,1>.+._G@W*)DDB;]VG`*5YF7 -MWD]IU[X\&5T,-")):A_]LR"]=;MJN5!LX6;D=]@@KQ`@^-G`>;-=H$6+3?0; -MYG3YLP?<=K)H?)5`"JW_5R6!`Q9OZ8Z#_17/+4<,$0*_:]M -M['1B(#.(QC+-;7CH'N\LREOH(>W0-/OY\=&_S[F9)"7_77XA@06;X>OJ&IOK -M]_"/D$]\6"(#S']/.AK:OAKS"CC7-%WN:`*S+_$Q\,^Z5>:9-EA;.ZD`(GSF -MIQ:L*`\3U-]F](KQ2F<&;.+!Y/Y?&`$JI5%RF94'0/-]9,`:CO;'C<7'S6Y/ -MC(IK?C@3Z*)/UJ'6-^%6!`"074SY(^7^GX$0[^K\-)/;:';#_=4R9TB+O0^G -M[]]7D3#&W$Q$WJ'_>WZV-KK`!WGEP^O)3UHKSY6'>%*ZJN$_$'M>40"Y'4TKT[6!UHFC)`&?/)6ALNE4_=YKB+#=*OU0?%/4DSB6RY5I(*1T -MBS_(D<8`16E0,O"KK9W:_/'P9`7LW2]VZ=L6P&CX1W4GLP1+"_P[R>#N[U"/ -M6WJ(6I\K#MUC,*=$& -M1:KI+^\1_-\P/5`$`\H[779:X^25NX"RC<8`-!NW(+E)7#8<-$0NNC.=8%;Y -M""W5''H1A\USP=7IXRZHLP`5SU[KII-+72^YR&2"Z82`/&[YW!C^'UK5S(MO -MW&B.-PG"G%8BH=8XL2#/=7#/E$X>/AR(5Z^AT]%#>CG.$(E5&]2?[<@D>*0/ -MLZ<&PTK&10ST<\S7A0!X<3B>_3^EJE_\RHP"TFVYCEX^77UK9&C9T20A*]99 -M7K6E``:<-TKEE8"N>WK92J@43N+VH+CGZ#],-YHU(37CX]<0)-RJOCFS%/>< -MAQN%3[ZBT6R(:O24[5N6@(0PW=6K8XBYT._;F*0;7N`AGO:TU&>^N%)?1CJ+ -MGA$!F/HR`O_,-OQ]:S+*EE+7F; -M)8:Y8$Z23!0[=.AU<55;Y+G00EZ:%X+;4.QH1$7K^V(=S>;QJF5!%*(66:M6 -M[]<2>?+NA5:@B'.L/3K#D=IF8CCD"I:=]2]C(V:VB`Z -MOS\_5M\P`2K/>9)C:#G,^D1A32(@7>9.&JW(0D0'@NOJ*)ZVW.3&/)46P09QKXZA5D`53`!D=\)LX*R1 -M!$VM(PTC]$J02F,8P,".;C\K*?9X_7%;MH6>P6<2HYV8U=JFL3)L0P;&-M=6 -MQ"QWM=K46:O@8B=]_\<9C+E\'NRM?3;$*AU\"9&FVFFQH!@"],<7:RQP[:(X -M(.&1#:N&(>`2H-SY3E0:Q```RU<;/1R="%-3!('Y%^`@'U3/^:?U'4DDD^2K -M_QSJ>F@<3(!_5_39XX%+[S0)3Q!$2G$(CR,W5,0ALWVR5@^PNW\Z?G(" -M`E5V)'F?/MYL@H'05?I>U/0;5$JNX(9@PLAMWF/]5Y=G2)KZA/W]\6KGP7TW -M=W;`93G$(W[@47APG.]9PXDV619K+/GQ=Y"H#*8MA2K<.U0:]J -M:[P_S0(`0S@3L$R/6W=-GT;+A'"+='OL8`Z36_XSN)T+M;(@*I\0Q$P[W.QU -M75`U^S3T[*WDD"J.S-BXH)4"-NVA`QPE7A^H`7^G#K^Y#]GW?Z@6;MLN!LH;Y8V[TBAUSY!77`-3DZ).?CA%NN(3U]N[8L)PO7=2[[? -MK?+IP4G)+./7E[L39T%%XY?YT$-0U[8TLY4Z3UDGQ6P.(=`BEAE9/#\#15F/ -M`>_ME9OM"".@E3DR84IGAU)L@Y9W1:M_[OX_)?[G)6:Y=`;!--*(GTMVGOC@ -M"M.:85V$\*TYC78\0T]2+KO*6=_-F75H3!"RI[5E%MF-L:((=8,M2&70#ZW- -M$O9J/0@H[BV!#T_DCO-3-M>J1$32[58X'"UIXHV&4I<18I##UHY6XXEJN&P/ -M[+_)I,DH:BVYVQQZ_O,X=!-]/8)XA,][37V[KG"[%TA.S(Y(\1:.1<'+8>P! -MTC2B]U(SYL#9%1^*\-#T-R]I/8`]M.T2RK3'>,$!HM`\3#=>9@\`-?GY`S\] -M'^7GF;T%I/11:4V6BU8@[1!]C9"PV\A^?P9`WL8!?79D"YCUK:`64G<=<^![ -MM#C.5F/_>8BBW!5>]G?,QPK`MOE8>+$X\S@'%B3EB66;K,\3Q-+A\#K:&\@;TVTVP'I=^: -MY=HX3U'3"E-E/-<7;]7*'2RO(T-)_@5+]/#*EW,7;/R1#'2:/\X@06H4X2+? -M`);^=S>ZPX(A-FAP#!KYMMM\W+;4D_I/>>`'+KI;G\$G;W7IKB3!)@6L?=9B -M8*,D]4:LO-(+-(:$GC_"'/22E/38XZ!EYB]IL#7&,F0SV+_9H#_L$NH_NN$; -M`YY;>`WRW)2(R_EGS0Y>4R/2%0UT!H>XOSJ#,5UEL#1:S819LJ2Y9YXR$;:* -M+2R9H5&H;4'TW\@&]O?C08ZIYG"M.?O$WF_L;$_+KZ/I@,;.8VO8-DAQLE_@ -M*F+&8>S(8K^[BR.2[.:J/%0B[B^IOZ/H"=7ELT(5Z3P-M%;0Y0'"PW0%B^-L -M^CHCB]9>CRF/0VMBJ084\S(]"?`EVGY&D]WJF)<7_849]9\T%NQU1^_WH&,_ -M5^:^K6L2FR(J\PH/W*3)P.C^9',6$)OO0-%D1.;GY>Z%(/[H^5!\IJCTY>TVV!=^XZ] -M/D?;R_(6)'WW?`>S2].TI:(%$?*%L3XD%Z`_[1*CVU3[S"EBV,S3O&V(D7C? -MCX7#((A-/5OOM."4.=)P3%-$'!ZQ;SBG8+&8(;Y]WO/QB!8>_ -M1`09PN#_L;#77^>^Z%CSS_RF*D%4_LM6Y\0W(7R&+SJ10?Z[!0X^R(2VMM<7 -MZ#@QIZ_ML697.F[D/>_WWC^,Z;,J'`[$<)J(QAJ.R^W['JQ@*YSF!LV#'(0G -MINP0WMHSPE6@)+;2#N0I#RQP\XZOY8'[VWX$,"E;-W,?+W,3.!;[=@838['X -MN'5^;;`/^,,G%+:5H+V&^EX>L`)7RZ=4\T.LI[4M4,2"M_G>?%I`_EHW'7=U -M+'\NP(?YXV&)GD&EZ'@@71ZH48<^!BD^E^U2EAOE3@"A4:9C6">_N/?-+AH: -MV$R>6I6S($%7H_C2_"R$&>,CKU`#E3X^\=.6!@_1^I.?=:Q_$04>S+1J?7[P -MOT8K<\G7.YV1#T(@W_3_Y[^,B6: -MEF)6-335TB(-Y'S(@B&TWK?H@"KS3:49A_AC%$T#$SB3$_&C7A%PGX%@U%E# -MH3OAQ,#V+C%%TJMF6WRU[G>I.+H?NE^<7ZO7[4$JNYWJ7W[J"60W_3]NLWF+ -MRZ7*TDY,V)/9C`GOL=[=+.]8$$0`E5TIH!H:),G*`Y\F'SZ6&"/IHYD84M7- -MB@SK9"-\W8^A%&3A-3T0L_8UBV6.(/_'+6Y_4<_W0:X/95G9K[]6,VW;)RW[BL&"4QI*+FQIL3-;]0MTG,P&5];4I-/<#MZ[$G6F\QXH3/S1?6PP?`?+Q$ -M]R*YE='TQ>X[,Z+H34N>&#L0FK==ON$!U>%8>&^_LQ7N:&03DMT_&/"P/5EL4ZUQPD"B_ -M&<%C2OQET?ZHSC`WFH*3S?D6R3B,6V'?[-W>B$Q@W>M,_N;\<`M2)=NG;C07 -M>9]X%OU`=]09"9P(UX,A^TM<,V7&O82A?MG/#`EKFD#9CS(HRZ_O6S(@.2:6 -M92'[SCA]-D@A0XX!P&6[(P'*M+1[4=/><0R]>^8MH)B>5ZXD?R9(8"OG#+]/ -MXU#^`[.XMGMC-!X*,,;J-L\ZJ[9JT&"-'.[P5%`A]1L53J-Z8O^1B&F(?/F? -MEZ6-.7H;)E,M&+ISG+`U?ZT)VCVXY'G]3\C'Y&&]UV(.+R!'\3#[M"',]^NSG/W!-`R+(=B;KN?>=B0!7YM]TGPN?R]6>&E? -M2\]9^5R5!!-?`^QG\F?HCEEH)^F(2RF_6)I0OS;,8,&8'4?ISN> -M4>5)YWW/\][[2T/#PW\^+!DC(RF'_+C\3NG0WN\FGH(:C?6_:G#U_-QO`]/L -MS0O9V;_2/OARD3*]*Q#?(@?>WP$_1TUJX%51#[8U%HU5L747&5+ST6H,!2 -M$X;-DZ;MV/:X!CJ#M-XM6U]D;/`Z@0PP% -MF8::)8Q5B+;K[!7`EGD7FR+Y68,^N&P?O`G.GY'PAY'?!EACMOFL9%XRW$LB -M2'AGMOZ+&XPU;+URN9\?W'D-6+ZHR5Y\[7_/)CNNL@J\UM&A5Q%+NN]]&.=% -M$U4\8`_>`>'`,HH/SN[`*'XE]#\?44AD&_N:@Q(@E("%]S%59Y!(SB/1:].4 -MW5K]Z+_CFN-\O"ZRF5<<61,*,QBBQXIKL0[ZB\?,S(&W)JZN4#'B-$WN"P)EZU%:7!\\_ -MG(CG+4Z09+L97)['"&1WNL:^#0DW7G*"RRF!3,OP,:)>2;LNA)RV"3ZU,^R* -M4.IG6(!CK#(+B8.'T2_W^NROX2A*1LH=*[VT&VU\\HRN/SG/#=KGH['/O<.# -M:MD,GO^/']`S!X]Q"]Y&MNP8FX^)U,5ME6[+T>)FM#Q2_S3_%VXB)5LUEX -M>+7;'D@[U-(:=6'&SD-&)[Z=DZAX<8/0;,9:/#^/J'9@J"U5#Z%&CSR(T0)V -MS.Y84,1>/W<3VO2T.].F:1;VG!XQH@Z)_,\(KV&\\PX%;;=Y/2.8S_ZS4_/=LX2 -MVN:NW,>H7RAPLCFW?KW"Q0#G0^A/!= -MP<([\FPL?J-D>"ZJB[,K_26\6@VQVD7L_`CR2IQ76S4JX\.6S6#&)2VE,7G+ -M3%:>?-AUK$ZV[*N&],3ZW.J+FV#:*#KV,^YD]6>2I*C$JJL2\7L&MZ:5Y\?> -MFZC=+!FI!PQTM68V@V7$888RN<*)`:TP=[R\]U$&_C;4F:,-':'75;7BZ?)[ -M:->K&P^#J_ZP.M(R$//!/IKX:D:#WJ/O*#T_!J)VF3#.,JZ\9GIRTY"\23IL -M[7GQWV+W#DZXJ?S*:M^Z^94<4.IJO:%]CN=[Q=&N1;J5O3Q6`BS@%]",K!&? -M;D]5YWW9KDY8FPV5)@E1M^=X="Z=95@N+B?B8A2[V.&;T3V!F^:R\7J"K&^5 -M>B4GI=!W*.@Q0$I:WC\K%/[R=-92FE"N;C72E0_U$DRCA%.MAXU7G#%G=*5W -MI'''Q@<"!KUFH=&EX?'G-2+BX\H72GD2#6;J3 -M[M!IO)0^%X\.1R"A\;JB^=/["Q?9"(*5_A_;RO;D:8MIG2$S]>8SN=@NGQZ!RY9'U7`WG;M>";K1[:9B$VB\<#)XCYV; -M=D8C`ZWY0NRS5^#$]6^RGZ#%!X6[A\IPI9-IA:KV)FG'(/%)6F0^4=H#ORE_ -M*0>K[,L;Z_OVL8YXT+^_I!BDS)"A]8R=)C$#HPW9[!%AT8K$*`W/?%^($=7/ -M/-ZT&8!)T'',A*Z_B'#V'B]3DQ^DB%LP^Q@P=[K[VNN&\-&V'3QK#)OQF7R\ -MFB_T=B?K>K6-_0.T;6*KK4E4X#0C.>C4:EL'),%X?6]^.;BY*,:3(RVI;K0V -MI[FDQ7J;,?GN#^M[3F%'KBU\L#)1LG0X1[*W:)RE3#6CW,.?@//J)#2\"S.7 -M\V1XS`6JQ\L>$'K==I'+F\KS.N7_RHPC6R$*9!3;CI.^%Q=1UM%9F-Q?P-S> -M(&DQZ8'4\=.>PAJ9Y&'[81 -MBU!XS]NLQK6PEH;8R@A[%F-;+C15JNUH\4:WSVWW3D58ZQC'T*'*;JUU&XJ] -M#N=&QG:27'&21/0F)\3F"IFV').61IE7[!M*A;^'0B$[B$\*?;3:B4PT!,MM -MV]HA%3>-R?[A1Y@YT&.I$4SEF+:OI;\2-Z= -ML]CLQ!48G=#\+[HFA=8$Z`M'\!.(#Y[H%J!SPR$VV6OSF^<;N#%^;%&+/.9X -M<1/#3.YW.`TMZ^`)[L%G??@EE0P*+I1[JR1HX-+>6VK/.YF!JF1=*7EX2< -M&\7:DPEVSXTW??#PV/G7),\&,=;;=K]5#?].'AT6,RM<:`P/@U)IC%WH198Q -MC8S]Z`=Z<\:7=5](-56M?`RKAS^Z6_U>.S9=BA> -M)FZ)9&HQ^$]0W`M`C@`MH[9.[]RRC`@'1U3UI.T)PQ?1`T>:%K'RVC:S61OF -M96XXV.DU^PY,-S60)MG3"YC3OQ1/0^5!`.$YAEIHL@@R(=G'A:'QT<;8&&6B0)61_[4IJ!K'%5).TB*[WJ(['O&K_"$ -MP$-C#YE/FZP?AHLWGK#.ZO)7=WF;NSUC]+%,.U^W9IENONCJG0L,UFK*QS+I -M%S&LUI;]C3FAE2]T<$T!A,?%YRAGK\H[/*_Q)?;TJN)Q11Z^0ZXM@CO`,Q7B1->Q(S2S3NE6Q,$\^N-[]M -M1#Z^YM_X?!J&J"7*?,7LP:X$1;"MH6LVCJPR95[HKIT&G2N8VCU_J>[:,:=I -MJ#/6K>VTNSHABWO(Z7/Y-";,/35L^NXO69)D49Q#L]CE5QHC(,4+Q,T.9E6@ -M:5,#D!PM!]1[$]'\A\OH^![X>_)[X(P_1H3YA^>2:6T0BP#\<`OX=I&,1(?2 -ML7WQ4]NC\&D])_,[`,]4^F]_R_(,!I-!(`.QYJ5Y<\^:0[1&>5F:=3<86763 -M!N/,2PEV>JAC'AO9<=`8_-=]Z#%(C&5/W9CQ+BE0`- -M.9S0/H5)3M.4S:$9%/._OL]QH;?'^,3RS')<,<\?MF9[#C7.+@:5Z]ZEO,KR -ME&C4<'I%0M]O&,0GL[;V9P,XS?P2[@;&REA!(_8PSB01DFHU7")L([$DQ&<\`-5A(EH'/YZ& -M=,[$\]=\SCN#4*CN^;=T#K3V883?\TMN,R.2\4'>;]@ZS_72Y[?)_"W>'L7< -M6S9N9LKFPQX5>+Q[H."G=U6,'0O>D]RQTDUN/$"'[M9/W[T+`N8A!'?APTSB -MUX-PK>+,MGQ&37<+7?8)Z6O:AA4LBV5&3&998%K7DR'LO32L%#.]P:9?V-WN -M5F"FOXC?#\V_(()7\#XSU)[\7J,M%BE,%9#(/;5&H!5ML6(*M/+*UHXU]<#U(GFTE* -MIAIAV7%BBJF6EJ'QU#M"4C4X343C7D\K6(DS]"^KIX/PIJ;[N]&0_;AO"[MW -M1YGT_YZW*_/\5:_R -M@.?#1+X.-.[U4RU-((0^J_)?%17?S*GO@H5/`-LFI3L]0&&\"&M>> -MK3+DQ&F*>4+\=]-4F,H*JJJBEFR,^VJH-*J&VQ55U?=10H7!N*"'0$E,@8?D -M0<]8&>G6D=/Z?+9K_1DT?J-A(F!@1WXT)R4QD1AT^U7G946<)I]*P]2=QG[4 -M?J*3?,"%^*QR;#>]SV6%A?:S4VEMRJA.W1CV!+^`G?']ZBKBM1MXM7@4U,X7 -M^:-=#C%L<>8VH1\Y*&+2%M12J_`ALFD'S9_^S,=]FY3N?\74R_+_6+D#0K`- -MT996(1ZC!"&>_NE(M;>W#?"*WR<\F;P<:,$==RB8?65C6S-",BY")BF^G<*: -M^01=&:?=^"];C^^CO_V)=K"JHI^[6K87'QF7-<+]9E -MCXU-JIP89K=QN6ZV+HZJ_%\\^ZQ7M^RFI@CRYG!])\`F+C>`TK]HQSK*WYW_ -M>S(4V@?L.P5IF"2+BJF^D/-8"SE.1BXW,+[-XL."9%:OKI%"RDF>VR>>GEH; -MJ-?AXUC\+B)TS7N7IZ#^P-1^*8PYL\([&0QD6L0FR7W80IY-&(ZM/`O,#(,4 -M6$\C/6FHI[\5ZAU=1J\#V.K?;26[DZ>H3IZAJEA3*FI@(S%>X"@T/W6W\/55 -M`'U`*B3[R1_OYH+QC?'/MQM2M -MQ]E>Y&()C1, -M\JZ-O^KYF1&Y,L$N+Z-X3L\`PK+H\0ZT.LH>'D]K/._PL&MQ<:^N;K`\:%B# -MTD?I(+1L#TB/'3T_.P$4R3L[AY8GZWWZ50??!-3]]JQ`@BB;PX*,5L-A_:I(TIALLN=V?KPE63I3Z#68#WDT#*0 -M""I&=IDJE4$?6:_-4$-UWUDY -M*LR^RI'^7TO'-RPH'381J9M:5V>Z9<8O,$<U!QB!YP79`\>/!3-*Q(*#Z09/T@DE/A&J@HD#Z26L< -MOI9`2@,:;2Y+2P6<1@FE7QM7:*,N'"&"P:9@Y8N_>Y[!6`,1X6X5Z>`?TE3R -MY1ZJN(Y7N3UKJF)57>OWMAGD^E4O_?+VRJ+/(,4H!@;)1&PSZRR(6S4(/UPV -M;NN+-;=)77]FW -M85FS>;!F.S)_5")LW'2CW'RZ+IT="*+5:Z.N.'/D1=]'H;B2'AN<37AXKL+T*Z_9KOR7,/I=-+1_+?NCBO&6NVI^-ITR6QVBZC:97@K&2^6_JV -MF(2A@,"Q3<7%_SXJ]:P2%4H0:7CG#')";RDM,^?+9U3#21D':*7=*RJD5"M# -MDON*3<,;#HE^;A9%@<$+2BA7Q_=E_-IH9B+CM%)'22X<(N=-F[]F?L[WOYX^ -MO?%_!^NE$>+PX_@TQ)T?7#W1=_=&I%:&,*DV$-(EQ.[TY7,RU-I&A+".'68<*R6U[G4 -M:5"4/:5=4B@_RNQWM>EV[4%*:3QRUOC+JW@I=MUU#N,:Q'I/Q/FNY@-'+Q_8 -MR6*,8YE^C@U[.O5SL)H='FT^/@HDZ,USGWLF+\^GYGM-#M&W)Y/:@;7M)W/) -M\EH6.PR'"TEJ\TE>8J,\T6"*(0L`QD/,0Q@8XX1YB!HX""!C0XCK0TJ\ON9Y -M\5(R-SU;YR3\Q]Y$JLKBM(_QAL[!@JXPGA2V[E=JERN_#Q'E;N+I]?/:]@6% -MAA1K*L;7+:TJ/M^##4LS[3&8#C4S\$V'J/!ZMGJLQO%\LE/<^6:M2?+JHHA/ -M?6UBQM&TG,"'$F`@EJ)MH;$_K-Y9]34,[\_V#^#G9M7H$N;ZVK=M6JKM3YJO -M!K?P@3RYE3#I+LIJ?3:K9]?8+;UL&UG%32(SZRQ'VE7_&3LJO -M]_Q^4\@4UA'UVW>L;TP*ZNKJR\KZC3+J1_7%PT^@K>'[+8F1;+%/4TVS'*LPR@H4,,L,PQCU0 -M/[63`H)YB@X!.SR@X!/3S+F=\.DWUABBNIU7.WE`4%W[QV(N_'T>2R*0?+4Q -M7AB5@(3UN?\ND$VJ3-H[MZS.LJ_^_[P#2N+JU[UI>>.N%5@A&1?782V0H>K\ -M[?:VO.OZS7J>I.KO+/30Z83I#NT5"=,!G2T+(`J`&(Q`!`1\!Z3!,8)CB/GP -M>ERR"9^?CGUN?*E\M#JG.R/YK_^4Y6WWV[5I+[QQF6NE&L07E;V/:A-($MF3 -M9[U)?V,DI+">K(3JDLIZB;Z0;YC&2-\$D)54AWP[]5$12!1$8I#OC&3X0=^3UCUL4UC;:C\Y,UE'G^ -MKGAV>S_PO?Q#-AO2[I3XQ__(=FP6?24:T(+8Y8(?"E)E:J*2@E*6=HR<[Z]C -M@]B/I0EK2Q19]?G:7RMI;7WAKMKLMA/OU>)K<>WYZD26[Z5M"]ZLHGC[_'QA -MY7:SZEFD_7S'S/BHNK*)5\?HYVAT>?XGC^1T?'[?17R-3'[O%6R`^3"-A,1B -M<@[LR=,[IQ5(^<"AH0\X$D>>!\^M:)="><^[/J8.=0Z#OL[N-4'2UY7;2)_: -MXWALJV0D`I0N^IUIW;-EI104$;71QVZ.34/"R'/J]-R.!94"2UYVVQ:'*;-,?2HT"5(>+SNAT/%Y_/. -MAT?]W.^?^J1]UZM[%B/44&QH$D8PY^/$C$F!\9WZQ#2$,5$@;!G9:T9"'H39 -MKOQ&0F,`F0B#)GF6XS^?]^^^59,<^4OO!UJ+GN_??DI,1+/0$:84$A`C.(D1 -M])26$[,^I]H^]>UR>;S3FY:.:C<:>8.8YN8G-(C!!('(![D&665K,E#220ON -M20_(`]S,Q/<`Z.X=CHX6P?%YX#OPLAJZ;.JM\?K*C3FU3W90Z58.0*7O4S*Z -M155T:O9/+-$/7D:GH6,.,,=]\)BAB/$Q0$V)H`03H8Q,"$(3,W>!)44#WMY\ -MPS%\^N]-FR'8?,_6?XV?Q9];Y!YOK<>LX$LX,YI#3_JX_^6)E.0AADV+C"-QT$ -M%OWF[P_3;0AL^+S. -M=[:MM[;<\+(K+6K*+53L[0$DDF"TP)`-@!B1233`1DS(LTG!14X(:=(L:SD( -M?@UOHG!'#1X":+-3?:_.8/5R>NIH3FM`CZB0R)--34;-"M#8X'!P;VV:R*A>@297S%1F!T4'F^"[C#R7W67;^\U\' -M^[_&=_]I^A_Y_V]G\WYW,SL^'@^=X;_VY:*BAKEEV03E0E2G3.#4C"$0E>0, -M30/,:/;UH-49*'B6CQ2E4F20;0]DL[:VW>VK1R6_?W-S[#_/K?@^1G?1T/MS -M0S_QO4S]@RJK+GZ)G,UK-3,BS@EJRM*'882TFTE(@R`[,A,%10AT/2FJI"F?9,_R_V!^Z-#SNU;^#[K*^)]E(N7B_X\"\7AKI -M>82&+PD-:S**:$.T*I8A3M&[;"(UCBA$AMQX`-%K+87$T/4R=]RCY-9A8W-( -MV^C..RYZNN43Z_P9HFJ+V?9B/@.SCG)X\.08E!R62-2,+,%`'GS_*R<]J(99 -M5*A0+D(SQ9AXU/5]5/6/'W_F?+_*_TN?]OKD/Q>E9SXWKBYL'9@O(/UG[ -MWJZS:-JYH.%LR6[0K;F>]M"4>.@]H?'X]:-9B&EO'K0&#!-`'Q%/#!P:VQ;: -MU;!%NVXY;A;A`M'@J%U;]^^7;PK8@5ZZG -M"\$"XBXAQKS`D$$Y6IZ+9L$(`BI4\H>5HI/+W';YO;_5GZWU]SXGW3IM6BV. -MA+X7,+JEAM>S%,+T#>J\ZJ(6`&"(K)#8DET*5D*EJHN@)@S%6'@LB<=Q-CV< -M9O[_\C?^M_@]A_DD(;W^'EX/3+=NWAJZ:LEE#52R+F9JHB!D!F(1@,51DF89 -ML*4$"@6`YE.:"0H0,O7,O7];OGP^Q8AN]3\DG.665-)DER23*"":#"&F=W:6 -M9IG=,.S$%E)MQ'@B:@RUC@!P'4AA4+A/#.@PY,3.+'!G,A`X:)Z.W1_:R?6^ -M/A^B.\.YAZ6&S245550/%G+'Q&.O$\XYQ)XEU?'UB!H#Q892FQ!*HA:#25(9 -M994J;^4XS)JIQYZ.[I/-JU>;L>F&3\;\3?7YKKQ/+U![MXNW++%PMW&>Y`0D -M)!<&=!:@SS41IV+0#L`+%).I(,0FD>P2LLV.>71:6I^AJB_![$F:+J]7:CDC -MD(H1R00.!([C.,))),&Y&J:!W`[H##+%<-UE,IC[EFM0$VI+"P:DPIG1@^T^ -MJ\=R.WL7$;"'!Y%$.I"*1VDGA_`?SFLUFSPKM3T-FD*@H;(4RA(;,#9 -M84BR%2,8I#9BJ39V:H*ZLX=DV=7PML>]_*YO1[1MF_A-S?Q*)B"K,8.+02B& -M+`&&*2HPE28I!I#%PQ5%](ZVBX7T3W#7WT^O^G^57L:].E*HY]O/ESNWFC'GS(RH<1H38!0$U`:8$I@FD<&=F+A5A,@8K1,AV+1%0AP:`Z%,#S -M7Y^ILH2HZB]QP^'\CR^]DEEDRS#K*G>>>=W=)IB8.`L,+P%FS,%X)$02/!R$ -MWE,PDTS2J9H;%81BG6OS=[?HW_.ZVK_6_\^O^5N^'=N]E];=WGV%>O":[2CR -M%>[=N)VAVE4O:">50F![4.-0:UA2NA[2(\C)'E[=9VGSK+#R'D\??]#P]_A] -M<0JB;8[=1FW!2;<@]5H#;(BC(;9%),=)CVZ`6>[MTNDZQ:*-%\0ZV3!?KOL' -MA[511Q6)&D,W1N#<;@I-U!1&W`=R153,4)B,SMC)3"D[-V9MUV'I]C[;[GN[ -M>GU_#AY'1FM:RCIZ;,/7Z8]>RI.D=`TA$"=*!0$2'3`DI3EC"=(=,Y4A@69E -M#;-S*80X(0ROV,]T@I0%F>8A\4^/['C\?UWQOOA\TX3J^=[GFR\<1XR]JS/' -MX\#Q^,\9XPU/V?C1R#QK3*2%B2S(:IJ2A)0"PU!JRF@\/9[>YMG5V?0*.J=4 -M39LU):+$9U06*;+5JD+2'50*!"&R0LBQHJ`5#9#9.(VN'A-.K5Y/KNYZ_Q#B -M_2?*]ST]I],XG&X''3@8\`<4XV;,30IQ6XXG&<4I]_,B!T''#%X\L -MG8-%#, -M:@?M$*-XN\"MX5O-V_?1ORW-JC[>'CO?28:=GOTWRNGVCZ6'T/5_#'R#L]CU?-/0:=QXG=F9NL@S=E@1 -MNS*#!;=@;A"J0P'=A@.)MW;C=J/B;MQN\7Z'T;SD-LW-L]_[C-@))YLF/+A$ -M*IREZ2D8B9A)(&I9AY`PD>:ERQ.99''2<9V!SN9AT'/P5R-\S9I9M2_$2)F% -MK(&1?4HI94AB6M(]\FDFA`F8UF.Q`B.!(PL0)P#=..L`X-$H::99XXTPE*3% -MZ_1J4G7U*L'=>UP8.N<%JBIBJ:A4.J'4/%"8#D)L@,I@I`Y#J=1J$*`2H"BA -MWH>!0034$RG)YY\M&KAK82(B%$6[DD,PW1%!NC]%%$=QV=D9G9J.S69V)V02G -ML&8)V`'7&0.)%I`-B7T6M*L+IOIT\^[W<,*VC:-J;2S:-H-DE#0GA$I\,F$# -M@>&$PDJE?CU[.SQ:K_3W^K\7)9[^SLFRK(6=NFI% -M44,I,D!@9-"LA1!9,F%,A02DPE\04AS&(.>S6/,\3WYZ.'?]C^5ZNF/>ZNH[ -MO27P1=YV=C2=G9F8TT=@/7AB!@!V9@&(TP10GL#[$=CAWSE[!EHVY>?WN_M\ -MW[?HHI34SO0]`4!0[NT[!0AJ&9D@*&`2!J&)T,)4.BB>=(WM -MC"074X>#'P1UU%%%?C:-1D<84FU`B#9`[5:VP$@;8)R"MI''?@)G:33:27@E -M,V*PF':/:[7F'5-_?V+$S[CS\.!Y_B5QQN/"XV&5)Q7A. -MR'B)PCC:8#H1JD8B,P324)QJ@Z*'C<>.LM;?Z'K'9[_/HT:+F*7:I#$PPHQM -M:J7"JA6%J,4(=63B/7!Z\]$;"I=B4]<&69@F`QG)TP5S2KK2R"LY2)6MK(?5 -M_`^%>EEM)I`DM(BE4JU!@&\[)#?&R'!**!6(7>"1B<8K`)DS2!+*[I,X26I2 -M5\`1YD2/U+>\<9=TWS;XLP-#H=`:`T(H"30P*40E%TFBIT2!@FNC,M5`8!9A -MG98Y=F7EA@THPCC2+I<-N]-BFVR;S_!W35*2B_1?TPI*54D.U"(XWB?$63B> -M*;,4P79(85`&(9#5!4BM!V(#4U.R9W03U4E)=IH[L_8KV+$5?%&8B!M#;Z^W -M&-N&+B-#M!:3:!6V*`(0D@SW42(V=KHDT1BED5V]!Y9I;LO%K<&_RX<.'-BS -M7;A=OJO-Z#ROC\KY4P"E\H^2!\MJ!Q/+)080F+,)L"O+EF$'EC3E'E\KY#T= -MN9XO%\O^/EC[IEUY"6/3FU-6,9HV&2`C9@2",8C3,($(-4&@N8'$>7L[7QO@ -M_!,WT,PS.JKF%06/H5*51(;,$8L1`L0ALDV4A20J.=0&;5JA0YT[66YGT8_> -M>UOF]OX8"WQ,;8VCB@ABLK9B'6E!U%UFL`-*Z)"=1T]4#MO"?O]S-KZNOB>FJFI%105"35`5#,Z!U0,B3*JIA%("`LG`JAP91][FYRW+N]PJ&R/W?N7?ZURY[OO79['RH._;M-M-=^6$;B(W.Z('=F#@!NS!,$HW5& -M29FW6C=`6XV?)WWHST7HS@=]&7.0YR'?W?#^IWO1M'+M7,=TLU6K>\D0$BV[ -MN6RVG3.>.D]KQZT&*Y!H#4^.1E/'!E11@!;3""TK:<=EC+@0>FYM4[NWL<(D -M19(H\.31EHPW&49CB[LQ<4H=PKN1R-VL!V2$FD2"0C"/$^.52CUL9R -M[\K\,_6V?8_A>7O;V"S9JWH6L].DJ.FDTR:4C!RHI-(&ED$!=A"4,"@AI0I) -M41%)IFEJJB+F<>>FDK/O>KZ?XO9YSW._.PW[]V[:;C=6Z"MSNB$-UNLD)"W8 -M@Z&D<2C<5N*=V;MV[N+=N[[W#O\_VWU?>UM8GIN[\**A5((D544,E0P]#IFH -M3"$:"!V8H#("S$<4Y60YPUF$$5'(Y&XWW:M^4XNL;'6S38,2DCEDDP2X1Y@4 -MT$TR$,3`),PTJE`G`:2DWA54[^&_/: -MM6IRW&_VN'M7O9GO\MG+T_8^GS\F_LH[#KZNO'*,&"NO,#$ZX**`E.N,D<%R -M7J'KDEZ]=.!U7P&CKT;5O9ZZ-$]/U]?P]8O2<1=DT[UYDB<=VG@B<0F2)F%) -MQAD*WYB&"4<;(,`B.)7;QCB4+65+TE_4LC\'A]SI7C(\=C1B'B,Z#Q$0T2<0 -M:#,R3J"%>P"D*0[$J@["*@[-=G1I"KZ)?1QUTFHTXZ#&[>U2K4 -M5+X5)0*"DPD610+`7O04142I=ED*+E8E#A=J] -M%WM%5O*&\19L4J@:0W4FV+,B1P3LW80&62XD1HD'=/&\CH)&DP/>O]G?J]?3 -M.#M12J5WE4I(T$ -MO+9Q=_:DX)!0;HJ<7/B=Z7SJ$J!S$4I@1R`.8%`IEX*;$:45@PQ1HVL]EAM%ITE+MC)'$*:-LA(I! -M&$8J[@\<5:Q'A>0>&O'N'F:NJ2;UV]J6DIQ5^J9(M..,C:.*-1NXY&$8Q2;5VSDY#`4+0F -MU`VP$!V"2C:VA*,MRJ.0P+=VL1W.6V1S3#S2RRJ4E4J3L*44YF.^2#?8VZ34 -M4++0IO"ET--.\WY8;H,WQ&ZV:]K*+A=![A[GCW?H.X][?>7K+MRXL,2XQ27( -MI%"%X"S%"Y%`4H0$)A>(+-P,>IJV^+7PGNGI]WDT7Y#DU<0\1Y3><.#OUAPW -M[*.`.`7#!]B5P%RR0Q8F3,E,X"9Y(3#JZ.IT(U\E*>Q`""`0,ZL/7.EB1?.EPYN+E+N_?[=Z]=)&E=Y -M;LG!X!PF#?OA#A++5)9B2IOA.`-2;\ZRQ0X3A/2[7A[S[>[X^4W>7><9BF+4 -M*Q#:MA:K$ZHZNO#0FO!K2NA"ET]5UR%`0U#&6F-<5!Q:#I$Z=WR^#OZL,W3A -M>Y>]ZHPJ@L799DHEV2#)%4;T>YR=RO/K0:S;ZVX< -M/%A2XTN.*8T&&-+#B=<9+@-'39`/6!J,@ZR$^U,S!:$H92D-0TLE'L!Z -MQ>MAJU)H(GUHD*%]8;9A\>U(&"GK#]F'K7K?:>MF9LQS#CQFPDEB.SAQ=KN; -MG%:M;F6Y;MA;II*6HH=J0$F'8I=V'&&*6!T,%*I!TU%-%-%#VF@$*JLK(JX> -MWR=B68FPSF&4$)*4G@Y,$PD$KIQD!,[H09`P$0+P1VPO`'@[,,.#T.\X%;22 -M7J[F%^0V_*E+$A'(6[DI+,TR221+,FE0$PR3$TP!2;YV0ZAQ#A-#&RM_#,R# -MR<=W#P[W6Y.R8F[C>L+LNWBW-QN1$EV,(WJ`A%D-@A>&+3>FE"]38*B51@'! -MCP8+PZ/#V.]YVOU>3DQ;>9[-ZBFJF#JH2*G14DJL^`[-4[L5)F@TR01L,819 -M"DC)E5`B!9(6)E64&$!`J80@NWK5IK0M;6N'%FB]MHM?B?I5])AW=QM&8>KI -MP<0H0^R"BCJ"Z>AUU9!J;/7^3TFP[AXCU.][7LNG2XUS&6C/&KV-CIS:O'[7'R<$\'!6OO^IISSZAQ -M]=R3(TLV(4AF&8"A,LZC+KV<0-@&0%`0>S,>SD'H[\##9KQZPU.KTLWIU:N] -MO[VO=Q*;IHN8J"PN!BA+)+DLP62)%-BJEF2\4QO+U11>]ZKJ8%SBUE^V>CV^ -MO?%QV\<>O2I4O30,<;V$)/.)"S")%DNQ:8%03:HC%+MS%P/1-M];GU\_N?=O -MI?)[?+]N.GEZ3@/!EGEV3,SS0SI,Z0I4S'IRST^]/5R\WAZ?2WC#6G5O,;I,1;-K0HA=NEF%D$A9DB!YU4I* -M%A<,871V+6O>[YV/%K^&?/_'[^G/+`PF$<4*(F-1),80Q0$`PM03%DL%("D2 -M8CAMEDW*J8XY<"Y2]]'9[7E^Y]S@WNX]SSAY_E<3E%RM-N\/3Y>I8-+1TC2$C11I#LD-I)+IM2FE>HLE3`(NDFD -MDHI.ANDH3!:VZW-O2,CM7<[?O=WE\L\E^SK;INO4561:]H. -M--.K5*SU1-0B:5`U*$4U)$FG502U.,(&@F$R06W1;M,ZP-KW,2(/6850&20<6RY'+9OX% -MW\.[._O*39R]/(9.UYOKU&GO;.S/+.\Z<<@E.)A,$Z9(81"R'&$9#C+D&)OB -M/?LGB\BX]%=V'9 -MDA)IYT(E,I)+,^7?Y>2[VXRN:1L5_=S6:?-GL9V-LS9&P'LF0NLUFA.Q#80& -M1*`NAH2%$4-"6==]!KW9T;V]T6X^@[AXGA-/3;3=V/7M=VLPW6X#H1W9C0%! -MB[BS=FY=34ZG4-4LX5EGIJLC-3,, -MZI2I)FD9#-(1A'@SL2E#.G'=#50(/!D69Z<.&K!O:I:Y)Y8XT16(E@>.-HU# -MMU@8.W;CJ-2]$CB)L@90VPP;5&F<3)\`21R.\F"(\/L6-B+>NO%92C(FC0B- -M((FZMNI=ILP3%-L(2!2&V!A?!F68B8TG=HV2(V49''H&1HZM:6S[SYE_!EQ9 -MB\KVQ*TJ!22N6(;Y,C!-X1OEP`S,6AR&@88)20)22,5C8BZ]:O>KV+%LM -MW'N$5B)E!X*P,Q8$ZO8]CLV"FAU(RQ;'LUFK3V9KQ^38;KQ^2.'!>[W_-\KI -MW[F.Z,N7#07`T--:**)*A-"+`$#&J4"F1DO12E!L-F:#`QNZ+%%]C1K5L^!B -M.38WEZ_ON]Z/GO/ZG:S;FYL[ES*9+H[O=+MVZ@97+KH,'QR0ODO+(4LIY81A -MU&&8$4>5"9U=:RPKCJU;M]-]DW;TDLFL9IL>:AZTY.MBB`XZH;D\GE$W)Y1` -M3R6!*Y%;7I=3KWJY=(BS:%(6;1-*TS5G9PD4Q -M!5H,X;))3?(4,!NM^8#(4#2&+OG$2J`SDC8732P@^&3"_%-Q=[W$]<.D:)HM -MHH0:+,:)*R'3(9#B'3"$O2GM)TDW5F=/KGAZ?:T'PZ6[BR9-6HJ:J-Q$1%&X -M[$97K0:`"591IDS1K*@<1VUF/L2AH#XL?%@,#;09S#=""NTBYKJ-Z:V"MPQ& -M]O6]0L11#Q(2NMHM$D$:9$8&ZD4!@*!NDEV$$#=9NL*8D-TW1&;NDOEUST=> -MX;2FV[4V6SM(J6VD&*;0&T)3(5`#902;(@A6U0L-FIM*;4KK:LY]&A$M[M9. -MQU/6Z??\GP>AEWZ>79M6K]J^)%M[5M-2BV-;9.G":8A%!A-40+,*"=29I$>I -M1J.!S-1J-<=8-A;'?-3NYI8S(5Y(FBC=AVC0FC`KI(83,[9R3HDU#"[0S$`P -M=GD)C?/`<)WQB/ -M`E"`T30,!P(,G@F:#.[RIB#30K.#LE-=N2%R@GVJ?7W\9TM)%P\?2'0=2'5& -MR-0Z'J"&1V0E)#U&8N2P@TDYI#FD8:XA>/O^Z]YV>3O[&S@X2XKUV%X=%UY& -MEEK6H-6\B"MY$AO@LUOV!L##AT7ICM?-K -MJ0()SBPWRK"C?/`4%_S-2FE3$LSN[*4F@F:-3(0VL*-D;5=Q`=&L4-">`LER -M$@=\P*5#(E2$I3`387=R,DCDPMYO&W7.P98R3+>DD16XRK<;G=MQU.D-T&2X -MH4[(6`(02$2DA)6@[OW)'7"OI.]<"#U=>)#C-($-' -MQH!A>N:2E)-%)W*Z"%=W:"1!(M6[<Y#DG.'+6LUNN4ZU02"ZXBJ"CY@FC+S0Z$,)-0Y+`'FD)\V92FLUJ<.OL' -MGZ\O;W>,\7:[FY?$QQQIF`LQIH2&*,2#)Z#%BA$)3),8&*.PF)CA,3`R6!TG -M?6T\AC@NW,Y>2X\^9AF6%+R -M8"$YSSD.4II71%`LO.B6'EG1HV0;-5S/0'EO0>^?H^]N]OHY./T=\IPQ2Z71 -M,=BB\ED278%"2B1$)C)<8L(R&-5+B4R47"_43CJY3=8'OZV;'P][T?4]3V-[ -M?T\<^/&U.)Z1ZG!-4#U.PBH"IE(P,A@)#)%)3(5"9"(U14C,N"IE:THR%4[O -M@^%VL=''HQ,3%QQQG->K72T+K5AL4+:`WIH:`2%UC)&!=A%(D+HI!`NA25+H -MP2]`\VM->LX=?I^GX?:Z.CWO[V;OT]+;-G%CVML@/=K.[7;;%UU=>Z7;HURZ -M"2'=V+KXX!Y925\L'VLC`%+28/EK,*P+B=0NU@NM=%L[5O3O*Z=;COKDS=VXAQJI@>)-`P(;UXYB&+Q>)QH]^"8G((U#9U#'U>M%BCQ0>*.,2L!%$XXS. -MS$43.DDPR8&<&$$-`D2*:$B;DT=GLF'P^/#V/,?<##`<,\7$QF>/4L6ES8D+ -ME502ZL(D"XJ0$A+@6$R$]F%@B51&T:(JI.KK]O\[S?>[GO:V;=TZJ=RBEJ6I -MH#EPUSV#L4YP%+*=%1$#('T^Q[ -M[T3;-AF*N:JD#/1`R`RF2Y5*A41F0Q@*"PR@+UTDR(4,4`23@.YG0AT63,TN -M?K<_1US]__O?7[5KXW/2-$T:)?1!00#0*D$DT(BB`P*ZB2(.SH9!$-62KQ.A -M%@Y%CBWCN8ML_E%KM]HY/T7RS/5YO5SN8#F_.W<):X:SVNYQ']XYEOO]4[-K8M54U,J2@*$U+` -M[)W&*44ZS"@)3G$0)"SQ\9Q>E^/II>3'&-DCTW1 -M*2A*DTJ$U9$H[EWQ2$`6_'(`P4W5OL6MELM!6R.XY#'D%,1[6/3VIINM\'M5 -M_PSSO<9#U=,T[74JM<\M-:69T)O&'M>T.>UEK,B!,CVB$H2!*4>:%I#(!U:+ -M6FF?4+E8S0<@)75;3U/4X>=UBH\&>?!DY=O/(>O#@!F3*`,F#"<" -M*!P6HI(%B!DL6,A$DL'`!E5%&67`=O-[QWN?7Z=[P_;'^MUR>?J4ST\F["BR -MZJ*K)G)&JK3LK36F23)K0!>T>UFM0L)HD-D!@'M&S$P/:G),]I&:1TG`?\B_ -M#?AG?^)NUO&]NM;SO;"7EZ2]Z2E%Q"7&"D$DO54R*`P+F#0*1DJ#N5Q)J]^Q -M=MG>][H'9Y9HIGZQ8W(BU%;MRRC2LTHA,2DDANB(20W;\I&`RI"6\>'`Q-I? -M%G)X(2XTA(*6_N;9M'5ZF_A]+V7O7Y9>;(T1&A$9&-'$XSC1IEE#1$04%*0O8 -M42$.V2VE$3*)U&W34FOP%92S;$^*CZ7USR.O\/L[7?T-G0VGWQ<4,HFI%@D.(03B8AQ4TJ'$CPTG8.QPZ?C?E3Z -M_ZDNSY_NFT]W;V.LVEM3LVA=ED&MJ[&0A=I020#M*)2E@=M[$N;8C069M#Y& -M2>.+36,\SX7F:_K=7R]AZ_JUO>OW.(ZGJ\5;X6Y#F&VC*9S(ZDT,H4F_O`-]V11)-$9`9"XBA$DT#'0,.6"P6$E8;>-D7)ZLG!*?5 -M^ELEGW?Z8K?[\_ZG#!<4%]QMYOX/1[//Q>0UTZYQ=R+PZ]8:Y#7$@L!8)#7$ -M#4&*^:(BD(1\R^;Y.:\&!I-AGF\W=LSY/G7'R6S!/*R]48IY8@A(3R20'ELC@9L;FX- -MP@QBH."A#CA!P2@1<)"RASENG2ON,!Q^AC(3W8&4A)^C//5EF,7M?:O/[LA\'@X.PFE2)=^932\V8'9E,Z9/F$?'D@#@Q10[)3%=Q&0F -M(%!,)G0.$Q,!O%A1R2%.WV.WER_47+!Q,BB>1WGH>>M8<]G/[CT'V_MF?/_4_OOW -M-]?/IY;MWR'>;]YO@S`WVYH#%=VLP8)`MV4TY(&#^/.ZU#O#1OMYM=>_PK>3 -M9%V3WZJF/M38F1(&9F/(PT6K9 -M)B&^Z(AY&N,4)$*U:?L^8N9O]R[Q=?M<>UMP16(GW6>/64 -MD<4@%4RNZAIDD:-U5&Z,7"6`D@FL($TC.[B3<+1+6#64%8DUMZ7XWRN/ZAC_ -M$K<_P_4^SSGYO.SNO]-?`Y_0_2^S[[P:]YB_>:^=&Z%Y)7B\RO.DF9KB$DDP -M23AMQ!9CR4=2T*).H(`S64AQ37SO/SEG`N=WSVOP_R?E_,A?SOZ?TK3\S.K5 -MN9S.IZONKO`6^FBU::S9W!QVM%2;2V&B66`78(Y,"I`J(Q",CG0B9`64BET6 -M0LJH[9NEE[6;=?=6X=KZ'T^]_M\D]SUU6K>A>YF;WOK=IWYS>)\;>P>,K^ZV -M&_@;!A@-?AA0L,`%A3NS&%DWF@<0\]LUK12,)L)/^F<3O)([I[PPG*`!@XF< -MS1Z>;9,S80K*?Y?)8UO+]U$RJ:+E(3(>8J-34IAI2DT,QYI/-#2"9)#H@,L0 -M/$5XLR3KG$#X\)L_#L`$,%E`BR9\'++.GLAN)6FS=Z7TZJH?SOW'X7S?Q=WY -MSZ&A^9\W._7_CZ-;@YU;0S_O?D^)H>=P8/.;"8,`L`Q@#!:08`>"9BZ24A`U -MTRLAY6"?)%Y/+!Y?T?J^Z/5W9]S_&][DY?]O=M7.'YGC^+^)E)20T:)#MCUO -MD9*T<3I%Q<0XPH1N0C*3T2![:VHQ3VX38&;,]NT)D21('MQ1[>&4TDJY,FJ/->7D7W>;F^B\BOE>`<[A7LU:R[O3-Z-%FD!O#F#3?N4DWL -M0JZ`^J,SUO&)79@XJKDY*SC%!R<`Y.0/'9#C(=6"*,`XT4C).L"*?BF%=#25 -MMB+=S30?'OM3BO?&;,H21HTG? -M$1G,@XF%HZ1I^-,Z!U/68=XP^[!V,:9I*W[I17!U1X9;3JN9'Y+:%\/\R_HO -M6V(0SNAT.9G\_Q.=@PX7\3R/6.)L38C2383$R98G0"1B=#RG?+1DAB!WQ7?+ -MDC"&40R.9@1@H/@]3ZC[2E]54!ZE]50DC[_JS/PMFE1(48;;30PGE%%"=?@PM -MU%@L!DIJQ3WL457XVUUGV:DI])L.PU&12:I2OU)R>OT8WI4YZ1=G=X?9LDO: -MWJXXS#_;.O,:18>$*LMKB:##2S,:RLLZ$*3>R;?HYGMT:O[+;^!_$?@?.!@SLME -ME:CC/#<\M9AQXQAYCX7:BS?J7/[1,R^P0"7P3.74$F&AU.\M<_P/=&PX\V%` -MYY56;R<0JMXU;+X)%QH94;'PCA4ZRJ:V2P5]$RQ+`IL3E`LS9L7K'E,KM/E`XYY"\H\IOA -MI^$'X:\D`9.14$2A\,I(_>990,0$H86IP.,>YZCSRJ@E!E"A1M%#GH,P^<]- -M]^NQN\BMKF>GUEI]YOD86)25S9RJK%S]]QZ^\8/S(SZ;%)?18KRVTJ21A4V+ -MJ3/#.64OG;6!D9T3FW,AP\(L/3.FJNF -MQT_&882=#.R$;SM@)JU/XF.+LAP&^<&?5C']/!]`Q]5F/S_G^%;U2"//6FI= -M#TBXF\S%[9UTQCN>U*0A;_R9^71"DS$SD(<(DJ53_YF7O6*VNVWO64NMAL!X -M[:+60#:TH#[7UD>;K'@-RZLKRVA95MR:E^+S+,X$KM=,&=SQXV3'#Q#-MIG7$GW'@F@NLF<8WD&RX/!SK\IJ'WWP.8+S>P9G'0[LLWQ<]GA"YO)2,B@T5E";(XDXC@^W\"ZA4= -M_*FR5:S3UC)*'N@U5%T6]*Y/H#%Z,:I+C`SKBVRJ3$P\)5R4Y`[-Y;&40[&2 -M`Y>18#,NMB6,=V)9:&IN;$BRP!I6&`^=GE\?C/5\1X8=92'B62>PB,1!).YX -M*+,I4D80\]@@HA$D\#3*$9X/!/D8>'U_#ZGK^`G]MFI/PH]O1J*!E8>]MY7< -M^;?2L5JM%M$` -MUIEBVI5O;M'1<5M*DADH\GW+-6Q)65H:EL-+HE=FI?6`Y+OSQ[';Z_/S^][W -MO>3+M^,^K[)PP\3Y)-;Y!&/DZA`5&**+!)/(J)^QK]8DM`\"##V5#V3OD\IY -M?9]XXS9IBCHB/]AFKP>(]T-C#(>-V=_#^R6#U0QGO,XY7L:NK\>A2[;]5]LY -MK'%L-3RJD,OVP]$N+0/SYS)F6C[+_<;F)F56U)--:PZ34&O-:^WN#>QI,TNH -MW=68'!J:41\,+EQ=GR>3C\?C\6Z3PU7AW=@GL69&54HD\"(BD8$?G8?/B8*$ -MA;,^59#`8_//G:_WOH?0=G#Y_Y7SC]KF%:V!J#N#%!M6^I$,=U-[MJP_ZS)S -M;=M'2=Z(^+3P$_<&ZNP/4&\5F^)F<5]TY9Y\;!*(4T*9*F^O1,OO01REU(M; -MGD$-I4@P?"BC3T*HJ(QDE==T*6GF4_@+[&TL"H_Z9NG"=CD4S?1)Y0QWQ?$:2NUZA0+'[Q -M2WE,5H[QJ-SV#H0KK1I(_!U>5\PC6JA;Z:NONJ@HCNL31S5E.VK//!>S43^^ -MR:G/V=^_ENZ.YXVV48/&K_>GP^B&AKU=?L[:#L]ANR;-9,=E*6^['Q`!3SWS -M*/FJI!`*9OI0L(OF&#-@^<>[)W]R*"%.-(VF@DS6!X'OZ:_W%KHAB:OA969S -M43C,9<4%@/VOPR9?>0.73_BPZJ<*RU'6/5:.F6N`O^-2-5.QYYEKO0*M\U):WF"?[[.^=I&L+ZP)EMG? -MLWAK<7Q7#4M1#$_C^$CLMGO,T%^!SOL]Z3I_4WL._N^-9D-?>U]K`W[?ZQT] -MDN7/(/Y/N3TDN%JU@(>@_F'H+5@?-^L?5UAB'WTS40A]68AOWN9!3(E2-T1` -M1!"I!HN\!%(-D&,\/$&(C^O$&MD/M\4'X3XG_16SOGH`=);1T?75?BY]_:6& -M+FT%^Z7W?9-_TK0D!];^AB(/R$=CHKZG26/T]%JW+P:6,Y;4V!Z9H".;EJ:?'Z((@VO%,U>X;6FAG:!56R'M;Z-1.7$=[KMNMM?QEYO]G -M.23COHYBZ8K$`\0'9#&B?I%>6P.^/OR^;@&6D7/T631$10L+]]'U/O=:#IC! -M?D=&!F&5[MEY(Q-@_4_A,^'9L#'\/9GT#][F4@2E(Q^+B#_N+0>),Y^3&RNR -MTEOQ!36APMM+HG37+@P^']\4WP-Q\M3*\%<:K60_' -MX&92+LOS&'>.-V;AT>LW.$9O,.=#??D*RGB_/JMQLG+2YH[&A,/>+7Y1,[M9\0-6^1R -M=\<18SVQ_.37F&$E#9OEL-/`!-=-9Y@^,BLSX6C4\8*6:F5]6+LNCM*+4O5+ -M-!1;X2L+,S([83MX-/ORULE>KRMN+@'R;*MM*JM2LK,B%H1B,=K-(D".BJJ" -MA`2D2E"*D%D9"(A&)`60(L)!@?+3\:C_%6+*[-!@2?&)#(^/!$9!A^0_^-_+ -M)^0EM+4\/&_6S!O;;[7!WNN!>*/;%10]_#V'\1AW2D5J,2S/.;^=,.1A"W2E/8#J -MU<+M<9^A7F3E:$+HXG7J9#2=3J0LK^'$6[*5[%\W_37+S4\TGP7=4;)Q2G!4 -M[H:@D;6!MZYW)/:/N.CKS'X^3<0OU/H=FT.E(=!X[36&2D71[KW@7KJ!/U,/ -MH%%!+43UF'D/=5]8QF:7PH%;RM<'V#K5RA:>6RZ&MBF"J/QNAT-7CIJN.@+8 -MP=DP8+AH8QF@,[57.7F?R/@6)BSPX?I/TVCX:0^]:H_.0/Y=4444"?EIA9?# -M!0$>(R(;J?H[?SS5'0VKOH-CZ$=;4H^*? -M"[MQL#Y9)--Y>*2_R6J21P'OI\#!W_AUJ;7-<5<'2A -M'99R]BXQ^PX;JA;M@*[+''S>!!B('((BA"E*-OZ4`/"X>AI(>M@8]3^9B(3[-?IA(ILD?>:: -MBTU0QTOE3ACA<3-X]WG,T5@84>:!41KR]1H:A"[/B65Y]) -MYA?BS'ZZ!*JD_6R!@CRB#]=GZ_64C/QHJE_SIUX,\%&K']I^PPT'V1)?"QHS -M#6\-%HC11X$-"RLRD7S?.M(?;XF)Q?`@J0L[?4H)>P4FM]7.)WW$*03=!N;& -MH.\SF62KS\5R.\L&6GG1U2KT2?6A-EFIS>HXVO@KWIM+?5&1G;MA.3_ -MKK%.P8PT^S^^"U[O&\.`D@WRQS]Y.Y_3UPXZY"JV1HU+Z;XL/K%_K81C&^KM -M\(-\_\W[Y[A->IF?X*G[C>^P;B(`D\?#86,8L_49PPR4+W<.:RTM!Y"0W;^Z -MKJH?`TSS%NUNX[G$G8@9]G%^K5&4?Y*&PJZ>EQ-9.:JIZ).3QYJ1\^6+2BI6 -MR8A1O)[5D`J)QBK":D8BB&;;H497&3G-9!2MVQFLA<:ZRD9Z/#[9/F.NUAI= -M89JD73,B4>S6E>H%***JG9%]R,!&9-J,=6Y'-`N4G,9P;GNT,5EE!H9$\6=! -M@8OHY^,+^4U1NE#\H*D)$_*JJ_)S*OU__5FF)R[;$3;2&CVW.UE97,#'JXX0 -M:D!6!PV9,;SR]F,&1WFK[,5,Q!C*.JEX1\BQ-W%K2XV5%2^+"]UE\5?Q@.1R -M7AMH?+G?LX#[#Z'RTG\Y0?6>!L?/1S:AJVAK[W^Q_W8&8:AU#:1JD;&=U6=C -M]^8.L[WM?U=@^VZVWMVF9?[([7+#0RR&(-.A'PY/B1LUK?C'+O]+\MS;UC$\ -MC"P9J'55NY$"%/R:-]XIA6)N+#[E\H9VKW/6S,YXQ_YC29"^>*,X:5N1)R?H.=D99V8:*BQ -M&1X$BSEJSC08#0^O&/7UFON42L(?^ESRY6[E)<; -MQ`\22F?CL?53^ZCZ@4VF8EL-DG.+=:F[8A1FIMB?=9J:CJ948&DL5H:."K'9 -MA?"TKWG8@*98\D%\HV?6ZT@%=RLFC/,<5;F9+7.G:CU"KM6>7+(+6.+J--FN -M@:'6[%W`7TT'LV>XUX!XXM9>2Z8I\^"&R5MG;H#^S*"E/Y_\S]9\0V3$`?&C -M]A\M-F@P1TWGD<$]:/RZB*G_LP,@_-_8I^QUAL_5;#7[+#_/VPPX1NCM;^O. -M./FQFA`\C#(/L[G<'I1^WV>P.U?--D5VQYJ!.G_:CNPOP9QHQ?Z!O[+S<%@W -MSR_\K>C>BD21,8<73+]&G9[W>>H+OXPP6'5H,!XQ.TEVW68%@LB9N.`*G'/7 -M',''2,O[HH]LOF3>YUE+>,4SG$!C!M@`J3*TP>F,WZU@5HT2UX#`7+OD%%1S -MGM&G3OJP4F[?#(MN]=GU#"V37 -M>@Y^KD/)A\V6ZC/;7N3@5FZY+/UQ]9M$D1>Z!/`HACQH),ZXT.GQE?`%M&)6*Q -MGB[K)O(/[7^B/1+>'\ORT(FI(X15F$)FJ&7ETPM:O`3(F[C7',=(OA4TU7O5 -M3A9E46C7^0UM%K\P+^V>[!MG*II`;MC^28+)M&_[LU[G+C);'%*-/N-?48%\ -MZ@+$,[T^PNE]K"^G#]27F;OHO1,>,#X6=XV5GS7^U.4M)HQ1A1E8N_M-F'?: -M'#`FF.DO`4:@"&U-96>9`BO^NAJ,^UV;"0Z]_#;K;N4@+SXQ!H"CB4&."_K( -MP4_;0.?W@8T_J8<5*#P2?N>N\A:UW$B/%HGX']HQZ^:8@!I'^8_"U:$A^NK?^FH3;_B$@',-)T7HUOJ -MR'OHLBT-NOL?QBZ* -M2\K*O]D?*2NH\EG+J_VO\,8N>SJMIQ7ZQ$L<*#W,E<<,:_]N?CCY`4SU@;]AZN!@#8 -MST"]\>`6B[#B1_&GND-DZEK[G?FIUOHH_,Y,P1#8>@4RKE7^RD*VPF^"(D^7 -MS2C(K#ZN7:X'D-!I@=ZVG/"X`6:K$^!M*,Z<2-9TJW#@'SA)Y\E;:U1HF`H^?J!4]X'N5?YPS@2Z:\&47!)R -M;`O'Q@BOUO"VV@%U]3LW$3PRK5K^\$!2$FO]U6QO#7#+X^\\:DN*R=\^0SF^K]!&)CR* -MJ9:0"%H8S"ES>QI*V.L'8K%<$@!(K^5?,CO_/@KJT1I7T/C/9]!5N98:,>O@&8L,K$% -MT;,6P14,DMM-#&!/YZ$^2SB?):D2?C$J'SS%A/YWLT?U7^'>H'VQA?H7R*.I -M5DD'O6?PB-NU@E&",KSPR)J,8>ZFO-D^*V]0@IA!R#L: -M=/2Q)OU,.<=Q)[3ES\%G\I00Y<'`O14"#2IKA1IPWLK^:2_O>KJ6,ZQPZN;A -M>\8L[8X[M]@>WDR5X-;MG74S_3FY\94&,;)R5S2Y%%1^[M;@6ERKAVJ3-=S8$MJDF!!N79% -MY;)^J\4OQ^_TU:TFFG/?6/UOU&-QE^-^0]K73^@ACQ&4S -M;U5T\D`Y(\(I4^??LG"[V(?O!:,]?=&@]^MI!- -M<5;CW_8;$X"`@!J#?W5P\N<'&N\PA?-FK+S6WWQ/0FOUL_%]RWOF9KC?39=C -M\4[VEL)C#P.9DEP,'?'UNI>.@6S=],^GF954%[U-%P]YE,KRS`Z;6F$DP+'[ -M]:]'DT?%&JG2:9#99+;O_JOMM9TN9WI\"G432$RQ^',Q+3LF`YR_]]J5#*M* -MCYIOXMDEZRX=.+ENC30F-'OI%BZV6G3(S`$F8BAH>AU6XLDD;;SA%V<&XYXJ -MG[CX\V,FM5N@#'J_W?2&D,.5/1&$W47ENY8^\#DU* -MW^7!6WE=H9KI;VRU>&TT,O0'"[>SQ*C[;T?H9+A9'L5@(]857IY"E -ME!+ZZ[L6P<+G%,F'R:]@=X=7I-Q*&1T^W(F';ZNA)A@+FY&A"Z8G:J6)MZER -M>6667-Y[#9#7=,[BE`:],6]^APSV;K17V8XQNT*!1$;0M2:-V1?J'Y5"Z;*1 -MW)Z*G)G%85!"-,/VYG`*22+'*W_Z9B-56GBC,*BU?EJG,5/17G,K%D.$I4NL -M'B]:5_BNA%-1SK&I>E_#KI!G(("'^^WZF2V=X!U%4Y/6%N37P%'AI*RA+CU1 -MSI7%F^O/G'233ENB&KG=[@TVDF$_Z=AE8YXHJSY&*?BE\@=TM"5`M_QQ*S97 -M)>O+:FMPE[SR52T'!:";XB\^1L?5W^2MWG\#E3VL#?O*YLQN=*'W.)V"[FPB -M"";-H\>8()>Y)$)4\!S,67%8P[WM5;]]?,5M>LGKBF,&9PR&%^A#!%%+3/<* -M+X0XX>.UL3=\6`HL7P06+OOIQ+K0'IX4W50$>0PV1-4#]6']SJP@G[V#/CM2 -M_JF/S?Q<#;L3N4#A98H\*TQ0_WN^>::P?R>Z)Y.ZXF$F[@":SV/;2B#M0\1G -M^S.$[LW1Z:`"AU#\?V_Y0@8[!/J4SF'YJ7M^KSVJM;_]T,,;`X?&M*6A(*.Z -M8_>S&2SWAL^:N[X\)#`J&8?8-(]G@R22Q&=Z-AF"-T<7$=MUENMN;%QX[3#Q!1X.;X?\CI_.SUND2BB2MH&VOM;Q!4MA$D&>E%S;?+"<+A4_H&H.6Y@L_6VO]T&AH?HE:3M$_QV.I -M7CD&A&FY09.`6:_CI!I&W9G@MC<_X@_HO\AKSYF\W85]A'&'\36-&)U -MN\.;4'`<"%XOX\C27J^^/-*^& -M1C9ZP>S(S57HHXR.W7Y%X4M;F2B/Z^ONZ.%)SOH_#]2UBT8$Q4P1AML^*(`P -M3?1#"T^C&/'OSK3_9Y1VRM>9XS>S_W]D-9C,^R]TPJ -MJ_U]_:'P\0@_77#*89PU,(.M^75TGODAXWKTL6( -M43O0)-!Q.UJ/8P6($A8#P&KUA,"XQ4Z(R8,EYJ^;'P2;#W?,_#V=O(@:OR;8 -MT(8?OA&>J%#)F1IG>Y&&ZF=-TKVG,6]I+X>R?!?I$?F:&&!XP(*%IMMUSSE> -M6:08]B85"[?]'_KU)->WH'(,"!I[[O.X++S$$Z(CA4.!Z!=?;TP'7?3*N%)_O!V-O2RY9OTYD]H(&8+B4.'[>/;$/(WR9XMG8"<,2B77@ -MNIH6E_BZ)7<#LR!6=&<@3?`Q-#H,?J2#E&.IKU=I6QY0600$A(=#!G+P=M.S -M*.77NX!J="T;<:)U._N6(OY@#APKYP."LPX`'?,F`D,Y[#`+W)B5`7779$!"8F=YFP]@5ZL\L" -M6(S/CAF"$Y=[;W_*Y'F^M!*?T>#L>F8COJ'O]G&0CQ^(T%FYF`^7Z8![7%TT -M%F?9`\7G8FM1<<7\/L!PJ6Y=_!=#2WR`5+#WB.TBI:7NC;,B]^L_)L40_-_; -M?\.A?!`%(00K7[*``7(II^+9$2`4A$BE115143,55%1(@%04P`T(20[K]`R! -ML*"?ZD_K-G7_9HGUNP?!BQ40156;A?)],0$@,6Y]!P)_9*LU-SVO,_^ -M(./;XT4O]EGOL_.;@DN4W2G\KL$=9A0X`E-LEVGHNYD`'W -M&/U;K3J21`0'%AU-C%?^\Y[=(YG2&2.`]4U\L;`D\IKY!S%;Q[@T,XY&*9"E -MN)*XGE5]]^2DAW_!P'%F#>9(,CD>,5NFJNQ7=![`4%KOW,/B?4AJM=Q-OBAZ,-*@!: -MK/QWF-@ZG'XXZX@VJ:1$038,#*I<](GB*(R&3`@(RVDRD=6.4>"9AW$JA3P)W6R?X(2+O=A -M@3`N0PJIXEW+$IWLL*B(.)!2_\>+;<"M9/-K+";R6&"QO5_"<#[`N- -M6CO$)`/:[\A"]R@Y3U1Y\M,C,@:M\D55@1$"R1'C:?,^=M@I -M@-TS`N%,RGR-E:=UU>*HE]AYM47(;-^>*CWOJJ2;XSFQ9\"4 -M((-2.U];6QH%(DR:I,`:;1#S]5?3#876*V=OK*,W8,@46MC<;5N'W(1QE/X@ -MXF)KS13VED"LJV1.&QO.6][>K'!X.;-%FH73.AHJZ-SLL*/Z\"KU1P"]7+Q: -MFS8&'F/^UIE(HM;;&(W^$.SER>O^WU=KD7J/$(2MLL*M+^"O,BGWO.H"]5OL -M5$V);;U8'([XHC07/E5[?*\O198X0RQ0[;KCV.Q6G/`EILZU[067?=S($/AS -M)@@#MT9!?3'LU)"UE_]#(W\-5F@1U0H\B+Z^,EV//:=I+SIHA'LSB,N9@>R_ -M.'&/`MQ+(%*R>>FSZ)2!>QLTET0C(BE:U7AH_M9WYXA&&YCP?$V3O@J?#B"]TM,Z'F'"#WVJ>\H3!4FP^$T,Z8W/H@XL -MR&*U42.(G[5)@[5+CM#Y8?OY+E:1G@TE#\2&>8^47]9#-G -M@,/[KE1+D/6]6[1>'"Y-3W0-'GFC\XR8Y%.?(0GK!K7^8T1#A9F*(2O+F/=2 -MNAWHF`'Z&YLJFQ)!?_?SXR5CSH%,I3X#:FZS9&R^34`P>T:!NLL<=`NE^,L! -M)4G[-FR&'O^#9-?7!NGUM4;+0.TX!=AXV!S$.!V:IK$G/P9+RIKRX$4=4>O. -M!GC:KP?.`]*(%;9&!S*\0WZ=M#1J=K1''-FX/)PAV_^Z-&N&B8X/REJL['>L -MV!`=O!V0&5F=*P'P'^YYA>%E.'[U>M`QN^OSP/Z,"5A<3^/'WD)6J81UNW+Y -ML%O?S\W^G#RP3RU=G`&/2`L27L=<]<`Z6G+AN@.!L.]XC9&J6"5"GS&HKRZ/Z.+2)R.D2FO%E -M[_4V!L3>[B@4HWOQHK)>CRS\354Z/@*IX#;KGAY@6<9RS0<_N2=%%8Q/=IUW -MN'2'8_%0!4;"YD.@<`ZRYP`.M.XBX;=YD@R1^.V!MP=]%S/FNZTR75+SRIG2 -MTQ"HJ7.U&F;3I4?:4(R)2O\`I,''>P%ONF5O=E[,IJI\V5#1RQ%[-DQ=5CSL -M^I%^63(O1ZN[Z4>3OU(3\L1/SMOO0?D,T!2^;$^Z.0#4C3P9TAZQ#&&1Y\-6 -M@3D&JZ4VJ9X5]GF\"=!>[[>>RFS@W'`F@`S?4(O,,W/+E0?`>-%>#%,AGO\L -M@"AUJU>GBVE[0@"WDD -MI[K)\Z2-\G88%LUR@AS8M:@IC6'31(SW)*XGKHT%Y%$D!L5'UZR4LSI2ZK?T -M:(E1CQR`(ZUT1KX`4 -M%WG30=OSMB&:S<33<\`=*DQKV;+H0440NM<99Y4OA8.>:FZ$'0/3C9D7AJ<<^;8N' -MX%KS;XA'QQPVS/[<&%`":VX.0H^..E2!$4SM;]QHK`I:YMJ-=OB'>.Y -MMR-TW*(O+Y,6H1D8=WQ#40F-WS\<'.]TR`L[=X;EZ*!.'9X$'0:!"7^?B16. -MXQ.,".%]>$7X8QX/`@M&(">,`W)XTA%8*GF&AL!/':@X&G)^X?X%4<=W:=?!"TNG?&TR#(PH`9X>!X\3OYH^QDQ^4; -ME9,Z=R=R`ZT@XY0WAPX`X$IIL(^+_'D4TRXT\.\V5N"`'?\,ZROLG!EZ,1_@ -M#]GL+8$\S3SE-%^-!:D7NMO-8<(#A:#PXKL#\BR?8)L`*JTGSTR>\,FI.GQ1 -M^8>$OG%D34U8K_M5/`$OFS0_3Y?)7L+^RLJ!KT5T0$\SQ[_HD'#I/&!5]];I -MC]KZ]:;,)0`"L3%VZ.XB$@1A::%Q:$&2:0EG6))&0K[>:/I -M1Q!UJ%^ZT9[A7J.@-NQ(ZUB=^@04'C931XJU$<$>A6^UL[[_GRI*`KO]_Y0_ -M4XR7I,[*7E]KJK_*%D0VVFV-L;8VBA;>D>AWVCO/EZ:S1<9R@E8?]_1[K.Q6 -M!6`;3?(LN#B;/].ET_D@F/^N,\CD[CDY^2A2YM-![A._OKRDS)+S- -M'I^FGGP0A%G>_'[=5)/73K][:X,'0"5-U8[EZJG/:I.\_/MN'SAZ9AS>00D1 -M(DR*[G9VT+@?*`^,!4Y.`S5>`7->J5=J55(>ZG8]N8-:2@\#KZ&>'K-] -MM[W2QEP>!!-3,XF\?FWDIV\#<;F*6'0QO>0=(" -M0ZSIW'^)X?!0?PQ\C@(*EET/SX-GS_?TD&*8E#XZSHH2(+:XTSTMP_MTT.JR -M.K;6Z"HY1``5#L7/PZ3'8]8?/8_,=/3'@"5]A+.*1CV?V;NIW&] -M*[2``8MS0:)O)__$>-^F-`MX%G]=ZC(%V:#/ED1QV/GPJPYT$<(!4!!N8QSF -MPI<*M:)_A_WIG@0TFU^W$?RVU)MF%LFTRP:K):V:0`4SW83`H-:3[&<^R -MN>!"'O_#OO-OA.063TC[^V3F]#QDUHB`$WT?.TO4T-$T)D%OO/)\L^`2_YHA -MVF0)''_)?TT?S%B"G7*)2"(..*V7^01SSEKZF;Z2\(A7??Y^*@97!K6):OL\4=E6)R:I0Z"CWG/M:UEI#\@D'(W^U^E@Z[AM]['T_4`&ZL^U9 -MN^HSR+W7#B[Q^!G.;?]NYX@'&Y7NUT]/%HP2Y,:H)VBL$YM/D0V26U_CM"SY -M[CQ1-J,!M.]O50`KE\>_,XUPO]+$Y'S)!@ZE$1#!^GQNOY`0Z0U!$;B]-7*0 -M`ZN9?%/RA(?W&?Y*1CAF)Y_0D"2(R_@U,AMFO+*LUE_G.9VRHD1`6+[@!*G8 -M-6LTG*'@!IVC`"`/NXH[?SG0`P8W<$WY;=S&4B>JH^NIQ:(@$=A3RFZSU3TR -MCI:N2XEODORF<="1#0)\1UBZ>&/W/)#[FYJO:4(`$&XZ3MV0':I[3>[R29DV -M3'M0D"W*.)P5,N'T9/?\#=)(@OL@(OUL]KS)HJSFFX/P0#\VGP`I^S>!S=Z# -M7?B\SG^`)H=X5!M.;O-MDIPZ>!#&T&'<5N(=(*_D?TB%@B&15G'?4FQW]2IH`!GN3>E -M=:J8DP3OOYW,MNW>+X^`K(/M*DLRJ#>[MHGQ$T:XA!!=4O2V$4!%><'SFR@0 -MXJP\.]1D07GJ5P$(`PN:;=/(74ROQ-P?W,)->)U`0'T[F$!'J2TH<6[G(2+S7F'ZNN7]C=[P\A221X"AWT -MY_U:0[1,-127"0=`"\UOL/##L^DOE[56D-EP82X\LP0&%UOSS_%U\@1JJN:B -M-G20`"TOC4BK\6N:%A/;ZGVQ;L,K]^JE)GP^YKO8S:>]2`%4SLQ,+)>[Q[K) -M\[M)PI`#:^M,S-W``BW+0QW6SC]E]NI@N!P03AD,U'5]I4;&#EK>S_*RE$0= -M75L*\X:O!2+L8.&WX\`.;4D)_SR2^A4,$\11U&!*4W%=Z8,?IUQKY("`QE0] -M+IF!"2Y;/09[,?&J/D7&NB+RUN'#]XS@92:5DV#1@#AP(+S>H3J:@1_*QM%, -M%EWCS@(ZT)W/8OFT]"(`/_TB5;[P!\/--HQ7O/)HDMN0@M!`@8/I;A1)Q\'0 -M7'A?."->7=[3'X*WA6R`#1>D%GCZ+(M10U]R]7!-'(Y/Q0$3E5?W -MM]H`9L-]33<1;SFQG=]Z>,D`#+=7CD5`.FNJ'(UQT"9<78`6GW0J"^G??IC( -M">4J=3.KJ4"$1A1`*!SSS'O>ZHG/R^+;6/Z^_H1@B8.)Z"#!#7*=J@]9@SWC -MY%9(\R"US[ZPVZ;63M)&NA!RA5B2A$8`'XYU002QX>;>>W)L!X$N>:>`_NBL -M.4B1BO.^!ZVW?W78TJ(\1*7( -MF>D012>Y;[XX+_JN6U!"P$XM[QI:F>/26/3+H^I]$DD78`%+DS@M>7":?Z/E -M0-;L60)=::9DLB)>QE\`L6#?33Z&=VNPW[=5)!$&:1Z!)76;M<-S-G2&S5/F -M14_\U?=_[8QB@?`@\S4$6%]GUL_<8)&65,01J(BSG.O""G_.]_LG;;')GP4% -M:J_E`N^#F*++HMMP>:Y;QRBQ[THB"7^M7/`#TW[E -MAM3?&42,-3EY$@`?2.E%7P$)U-#.:#-!R7F(1Z)(GM%.+DNE$`U0DHMLBP5.TUT;J'.II@!D(2A -M94I0T'JM<%"1/.[R9#^)\NZ5JD=*1PX_C$43SA:VF20O[Y!(""^922+\:=HV -M3J<+QUUQZ02+6XJ9R9S(R@)E@9,]NG7)W=]QXJ&2`!FH<`?50]2P.0C?JND? -MU=&188`PI,4DV_'>48+^[*!(!^_YB51V!T6[,-EEM7A(06,^0%+A(] -MJY[8Q1;JF2>\%ZX200V'8E`5O%6*6T,&KGCX&$]Z>.4_."$M2=OZ8B7>ME.@ -M*1(M%BNT>&B4V5E&4RCGOD@`51$HC-+45]:EED,?4(05K5Q:.>!<#,;)22%% -M^]I\$O^2EJ`!EWV47;\5-X*+)H`51)R&7\H'OKOHB"-D2/[1$7N;%:_(1+NQ -M/L9O*FHY"F"^='1D01[^DC<1F?L?1*8%O@W&](MWWW2D/4VBBLY`$,A[D9`N -MR`/QMQOA6A/R?.I!P_F_(!!AH05%,=4FMRB -MYGC#-'0,C?S`()(@OMJ:H;*4XKNW9@(B*AO"*FN8%(LOD=#YZ90@/WU;_RM_ -M8:%-_K)CHLNW2@4GJXN^QX`YZA(064OA.]*F#6A!:T@%KG4\G(0GPB( -M@S];2D30M_45-;R64'B'OA4[3D&O^:%O2]2MH@$N^2].0*$R,@'F*KO3UJE='8:(1)!?:-,0<'9$0 -MT'G?][N@NQZE;4<")2C206+O@4/JA#@*262!=[[5&K2%5 -MWVN59(CLOH:\KX'IG300X-!0@!E\]F3B_.Z2>)#D(\ARG:($`Z4#43J?!"?K -MFF:_J;SB(2VF=O#G]UD>3W4!"VR/5!#V\+\1@G>XAG3Y*%CY)SM\4B'6:G-G -MRW".WDY9_:+`#!4U>\X:YT*-Q;$)",BVC_HT@.K8^>SE*1+C-'C$UN6=`_(R -M`D(TB&LQB5J!$]7S_M83O,B+M>*ZX!%CKU$$2+9\\\7P?N#F^,"'EO?(O=56 -MW![SJ6W-$*N>(G=%QW->Y5HYLB`F#GZA)("EE1VMZE(TI^9('S(@5_S2(6'A -MS]FN#(]#O/'0HC"`BVO=G`0U6OBFW/Z.@JN;:2&B2`$+>"%- -MX)1A\239!5UT@JH@%TQ_2',7-?]HYW:[8?S\]-<<-B$O2.OP@!5,*1 -M;6,@7-FFK&-/E[=K_R/$96($!LL]D]#BMFYU^JZ#&>X'2SO?9T>\3""^\PP! -M8S$RMV\!03.LX.]DO7B802@"VEIMIX@6@1C/[:GS,TC>JM"!8ZX@&SC7GU8A -MN91JAI=)1`IN_Q.B0#7190>6/G$A>/E]\F"T3G7]CH=)K/#AO2H"8''))S?B -MG<)DBF0[)%KLORUMBC@A+F+-8=_I$+$_G(SMJV54@K7/H\J^"'5?*F_T*=^I -M'.]\,5OR(?3=/VW9#(2]'J9*MJ0B!0^(C^>.R9`3S=U!GWM>Y!T\!L%@@%I< -MG[Z[IGWJH@Q)[_UY8B#)45W18%;6Z#.UT5DQ4)0!,01B!+:Y<8]6@#E;'-%# -M$A64Z5*`,PSD0/JM7OY^&F4&0B#RF0S]>0*2Z.VVJ1J0\>MX;^1!]:S:#@JA -MUVSW">?Q^;-?D%@$`]1&+OQ`27&QKIC=&[,"2%R29X2*(DBX^N3Y#5ISL2?( -M:NQ<_UQ2(MJW.VP9J<[-KT?I@"XE)UHE4L,CZ-)VT(>-W%RBIHP1/7F>,?]@ -MF.,)N^5"9%(+^.I`>+H3"1M5_IK`D5!""W?LH(@@5?Z"^NFT_#D`P(BR&F[U -MB`*_V^:!O-C%A#LK93!02&:``K*"T8+9D;74T^./JD8Z$1_7^7O\T:X=!$MI -M]!IU77]E.-K.I,H0-E41\7787$.@ABM#':CU(K[-S#G#1Z07VHO\D*K^L60& -M_FOO^L$UR2D578:+-D06K*AN<.G1RM;&BOTJ0A$$2N[N]?$R*)J/EC9O.D1: -MK9X'5-1=ZI#JGQXZO+<\B+RR=?O9_PYJSV+[/&00#0XY^5C?'4?!I2W46D=$ -MX(MBV*OIZ?YS[[FX=4+2XKC44PQ@B;*%^_:,J&(;*/"F&$81P"K]^$"*$R'` -MNZ-)GC`RBR>0`9SHKOFX.,`)>2Z3`2H@PE+SH@#5):^HB;1:(`1HD7=0IDO= -M'3*8ZKJNB"B[`B=MOV4MYN^NA&75TU$0C-;[+.XPE$$!S6GC,*NCQC](^[+Q -M[C$*I-+>8B((?VA%."V6X6;$P8O#`N(9G(.*N"]G@I[_/^=>5TKZ7=,99KIW -MDHF,^QKSX)ZE_NR1J!W/XT@.WU44%G5IEWA\NW_4Y[VF!.9?)@` -MH/1?W^?@?/=E"(F=';L*D<O7,&Y2%2N.MM_)SWER%]2H@":=@QZSN-*%"*1OCY;ZJ-A7+-:J`B#( -M9U56UH,+TV=ZU%"'ZM$FJSD:0HI5GOK_QX`@R.%94^3^%)+;#Y9.JU"[?0:W -MX7M`""(O=553(ZNYT)+MG>P;(@0%&8!,!@`EXPO]'">>%47\GMYU:^+(!^%! -M]:[I_CI%/P8U=15T0?HVQIC;6P:X=3+\"CI\!\_&Y4L!!UK,#O0/%Q,SIU4_.H@" -M"B1%>=6T4D!P1)@B('T&8,>[-W6G/$"$*VFS00@=%Q-110A5WC(_OC'@,-E' -MVW'NTSLOD_+;:SMI6]Z-Y#544T4-3*X*C[F%'F:_:,?7>WK8]!)N]-F-M9+C -M'BE^OM:;$VFQV6$&6P80@7RT=JJ^)'>3'/L_>=7U;33 -M$PY[K;)#P-WI_,SKB=(@]L3WOIEVT=OU]_L@6*,%T$U9O(K`T`/``-FFZ?EO -M^W[*/LK-NG$N<:._G+1;K_1ROO=BD$`'9-V@]9]C\)A-$V*!>]:#WS^C\B'[TLBW0&38H``"*E\]\EL%DN5PAHV.P4H;]VD0Q- -M[>U.*60`YV^^;MT,/6C@37+I&L;4`LI.3J>)V*VR:";D4$0ZJ_%P1NCX(KRT[&SOUN"RY*SU.,6G[*)B<"! -M3]#\:?1&\U/?!J9\:D;D0`"2R[FR_:9RF:G0]V4E=9WZ^+XD`-+SW5V4"-GZ -M^26[/5SR(`57$Y-OWTXG:>LW8QLXW-+ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 10 07:16:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42625CD180A; Fri, 10 Feb 2017 07:16:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12216BAC; Fri, 10 Feb 2017 07:16:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7Gvkv018166; Fri, 10 Feb 2017 07:16:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7GvgU018165; Fri, 10 Feb 2017 07:16:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702100716.v1A7GvgU018165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 10 Feb 2017 07:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313536 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:16:58 -0000 Author: adrian Date: Fri Feb 10 07:16:56 2017 New Revision: 313536 URL: https://svnweb.freebsd.org/changeset/base/313536 Log: [ath] sigh, how'd I miss this. Modified: head/sys/dev/ath/if_ath_debug.h Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Fri Feb 10 07:13:16 2017 (r313535) +++ head/sys/dev/ath/if_ath_debug.h Fri Feb 10 07:16:56 2017 (r313536) @@ -70,6 +70,7 @@ enum { ATH_DEBUG_DIVERSITY = 0x1000000000ULL, /* Diversity logic */ ATH_DEBUG_PWRSAVE = 0x2000000000ULL, ATH_DEBUG_BTCOEX = 0x4000000000ULL, /* BT Coex */ + ATH_DEBUG_QUIETIE = 0x8000000000ULL, /* Quiet time handling */ ATH_DEBUG_ANY = 0xffffffffffffffffULL }; From owner-svn-src-all@freebsd.org Fri Feb 10 07:22:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2DD4CD1AE8; Fri, 10 Feb 2017 07:22:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 505DAFB7; Fri, 10 Feb 2017 07:22:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7MDne022244; Fri, 10 Feb 2017 07:22:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7MCKf022234; Fri, 10 Feb 2017 07:22:12 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702100722.v1A7MCKf022234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 07:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313537 - in stable/11: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:22:14 -0000 Author: glebius Date: Fri Feb 10 07:22:12 2017 New Revision: 313537 URL: https://svnweb.freebsd.org/changeset/base/313537 Log: Merge r309649, r313048, r313083, r313104: tcpdump 4.9.0 Added: stable/11/contrib/tcpdump/CONTRIBUTING - copied unchanged from r313048, head/contrib/tcpdump/CONTRIBUTING stable/11/contrib/tcpdump/PLATFORMS - copied unchanged from r313048, head/contrib/tcpdump/PLATFORMS stable/11/contrib/tcpdump/README - copied unchanged from r313048, head/contrib/tcpdump/README stable/11/contrib/tcpdump/addrtostr.c - copied unchanged from r313048, head/contrib/tcpdump/addrtostr.c stable/11/contrib/tcpdump/addrtostr.h - copied unchanged from r313048, head/contrib/tcpdump/addrtostr.h stable/11/contrib/tcpdump/ascii_strcasecmp.c - copied unchanged from r313048, head/contrib/tcpdump/ascii_strcasecmp.c stable/11/contrib/tcpdump/ascii_strcasecmp.h - copied unchanged from r313048, head/contrib/tcpdump/ascii_strcasecmp.h stable/11/contrib/tcpdump/netdissect-stdinc.h - copied unchanged from r313048, head/contrib/tcpdump/netdissect-stdinc.h stable/11/contrib/tcpdump/netdissect.c - copied unchanged from r313048, head/contrib/tcpdump/netdissect.c stable/11/contrib/tcpdump/print-hncp.c - copied unchanged from r313048, head/contrib/tcpdump/print-hncp.c stable/11/contrib/tcpdump/print-lisp.c - copied unchanged from r313048, head/contrib/tcpdump/print-lisp.c stable/11/contrib/tcpdump/print-medsa.c - copied unchanged from r313048, head/contrib/tcpdump/print-medsa.c stable/11/contrib/tcpdump/print-nsh.c - copied unchanged from r313048, head/contrib/tcpdump/print-nsh.c stable/11/contrib/tcpdump/print-resp.c - copied unchanged from r313048, head/contrib/tcpdump/print-resp.c stable/11/contrib/tcpdump/print-vxlan-gpe.c - copied unchanged from r313048, head/contrib/tcpdump/print-vxlan-gpe.c stable/11/contrib/tcpdump/print.c - copied unchanged from r313048, head/contrib/tcpdump/print.c stable/11/contrib/tcpdump/print.h - copied unchanged from r313048, head/contrib/tcpdump/print.h stable/11/contrib/tcpdump/strtoaddr.c - copied unchanged from r313048, head/contrib/tcpdump/strtoaddr.c stable/11/contrib/tcpdump/strtoaddr.h - copied unchanged from r313048, head/contrib/tcpdump/strtoaddr.h stable/11/contrib/tcpdump/timeval-operations.h - copied unchanged from r313048, head/contrib/tcpdump/timeval-operations.h stable/11/contrib/tcpdump/util-print.c - copied unchanged from r313048, head/contrib/tcpdump/util-print.c Deleted: stable/11/contrib/tcpdump/.cvsignore stable/11/contrib/tcpdump/atmuni31.h stable/11/contrib/tcpdump/missing/addrinfo.h stable/11/contrib/tcpdump/missing/getnameinfo.c stable/11/contrib/tcpdump/missing/inet_aton.c stable/11/contrib/tcpdump/missing/inet_ntop.c stable/11/contrib/tcpdump/missing/inet_pton.c stable/11/contrib/tcpdump/strcasecmp.c stable/11/contrib/tcpdump/tcpdump-stdinc.h stable/11/contrib/tcpdump/util.c Modified: stable/11/contrib/tcpdump/CHANGES (contents, props changed) stable/11/contrib/tcpdump/CREDITS (contents, props changed) stable/11/contrib/tcpdump/INSTALL.txt (contents, props changed) stable/11/contrib/tcpdump/Makefile.in (contents, props changed) stable/11/contrib/tcpdump/VERSION (contents, props changed) stable/11/contrib/tcpdump/addrtoname.c (contents, props changed) stable/11/contrib/tcpdump/addrtoname.h (contents, props changed) stable/11/contrib/tcpdump/af.c (contents, props changed) stable/11/contrib/tcpdump/af.h (contents, props changed) stable/11/contrib/tcpdump/bpf_dump.c (contents, props changed) stable/11/contrib/tcpdump/checksum.c (contents, props changed) stable/11/contrib/tcpdump/config.h.in (contents, props changed) stable/11/contrib/tcpdump/configure (contents, props changed) stable/11/contrib/tcpdump/configure.in (contents, props changed) stable/11/contrib/tcpdump/cpack.c (contents, props changed) stable/11/contrib/tcpdump/cpack.h (contents, props changed) stable/11/contrib/tcpdump/ether.h (contents, props changed) stable/11/contrib/tcpdump/ethertype.h (contents, props changed) stable/11/contrib/tcpdump/extract.h (contents, props changed) stable/11/contrib/tcpdump/getopt_long.h (contents, props changed) stable/11/contrib/tcpdump/gmpls.c (contents, props changed) stable/11/contrib/tcpdump/gmt2local.c (contents, props changed) stable/11/contrib/tcpdump/in_cksum.c (contents, props changed) stable/11/contrib/tcpdump/interface.h (contents, props changed) stable/11/contrib/tcpdump/ip.h (contents, props changed) stable/11/contrib/tcpdump/ip6.h (contents, props changed) stable/11/contrib/tcpdump/ipproto.c (contents, props changed) stable/11/contrib/tcpdump/ipproto.h (contents, props changed) stable/11/contrib/tcpdump/l2vpn.c (contents, props changed) stable/11/contrib/tcpdump/l2vpn.h (contents, props changed) stable/11/contrib/tcpdump/lbl/os-solaris2.h (contents, props changed) stable/11/contrib/tcpdump/lbl/os-sunos4.h (contents, props changed) stable/11/contrib/tcpdump/lbl/os-ultrix4.h (contents, props changed) stable/11/contrib/tcpdump/machdep.c (contents, props changed) stable/11/contrib/tcpdump/machdep.h (contents, props changed) stable/11/contrib/tcpdump/mib.h (contents, props changed) stable/11/contrib/tcpdump/missing/datalinks.c (contents, props changed) stable/11/contrib/tcpdump/missing/dlnames.c (contents, props changed) stable/11/contrib/tcpdump/missing/snprintf.c (contents, props changed) stable/11/contrib/tcpdump/missing/strdup.c (contents, props changed) stable/11/contrib/tcpdump/missing/strlcat.c (contents, props changed) stable/11/contrib/tcpdump/missing/strlcpy.c (contents, props changed) stable/11/contrib/tcpdump/missing/strsep.c (contents, props changed) stable/11/contrib/tcpdump/nameser.h (contents, props changed) stable/11/contrib/tcpdump/netdissect.h (contents, props changed) stable/11/contrib/tcpdump/nfs.h (contents, props changed) stable/11/contrib/tcpdump/nfsfh.h (contents, props changed) stable/11/contrib/tcpdump/nlpid.c (contents, props changed) stable/11/contrib/tcpdump/oui.c (contents, props changed) stable/11/contrib/tcpdump/oui.h (contents, props changed) stable/11/contrib/tcpdump/parsenfsfh.c (contents, props changed) stable/11/contrib/tcpdump/pcap-missing.h (contents, props changed) stable/11/contrib/tcpdump/ppp.h (contents, props changed) stable/11/contrib/tcpdump/print-802_11.c (contents, props changed) stable/11/contrib/tcpdump/print-802_15_4.c (contents, props changed) stable/11/contrib/tcpdump/print-ah.c (contents, props changed) stable/11/contrib/tcpdump/print-ahcp.c (contents, props changed) stable/11/contrib/tcpdump/print-aodv.c (contents, props changed) stable/11/contrib/tcpdump/print-aoe.c (contents, props changed) stable/11/contrib/tcpdump/print-ap1394.c (contents, props changed) stable/11/contrib/tcpdump/print-arcnet.c (contents, props changed) stable/11/contrib/tcpdump/print-arp.c (contents, props changed) stable/11/contrib/tcpdump/print-ascii.c (contents, props changed) stable/11/contrib/tcpdump/print-atalk.c (contents, props changed) stable/11/contrib/tcpdump/print-atm.c (contents, props changed) stable/11/contrib/tcpdump/print-babel.c (contents, props changed) stable/11/contrib/tcpdump/print-beep.c (contents, props changed) stable/11/contrib/tcpdump/print-bfd.c (contents, props changed) stable/11/contrib/tcpdump/print-bgp.c (contents, props changed) stable/11/contrib/tcpdump/print-bootp.c (contents, props changed) stable/11/contrib/tcpdump/print-bt.c (contents, props changed) stable/11/contrib/tcpdump/print-calm-fast.c (contents, props changed) stable/11/contrib/tcpdump/print-carp.c (contents, props changed) stable/11/contrib/tcpdump/print-cdp.c (contents, props changed) stable/11/contrib/tcpdump/print-cfm.c (contents, props changed) stable/11/contrib/tcpdump/print-chdlc.c (contents, props changed) stable/11/contrib/tcpdump/print-cip.c (contents, props changed) stable/11/contrib/tcpdump/print-cnfp.c (contents, props changed) stable/11/contrib/tcpdump/print-dccp.c (contents, props changed) stable/11/contrib/tcpdump/print-decnet.c (contents, props changed) stable/11/contrib/tcpdump/print-dhcp6.c (contents, props changed) stable/11/contrib/tcpdump/print-domain.c (contents, props changed) stable/11/contrib/tcpdump/print-dtp.c (contents, props changed) stable/11/contrib/tcpdump/print-dvmrp.c (contents, props changed) stable/11/contrib/tcpdump/print-eap.c (contents, props changed) stable/11/contrib/tcpdump/print-egp.c (contents, props changed) stable/11/contrib/tcpdump/print-eigrp.c (contents, props changed) stable/11/contrib/tcpdump/print-enc.c (contents, props changed) stable/11/contrib/tcpdump/print-esp.c (contents, props changed) stable/11/contrib/tcpdump/print-ether.c (contents, props changed) stable/11/contrib/tcpdump/print-fddi.c (contents, props changed) stable/11/contrib/tcpdump/print-forces.c (contents, props changed) stable/11/contrib/tcpdump/print-fr.c (contents, props changed) stable/11/contrib/tcpdump/print-frag6.c (contents, props changed) stable/11/contrib/tcpdump/print-ftp.c (contents, props changed) stable/11/contrib/tcpdump/print-geneve.c (contents, props changed) stable/11/contrib/tcpdump/print-geonet.c (contents, props changed) stable/11/contrib/tcpdump/print-gre.c (contents, props changed) stable/11/contrib/tcpdump/print-hsrp.c (contents, props changed) stable/11/contrib/tcpdump/print-http.c (contents, props changed) stable/11/contrib/tcpdump/print-icmp.c (contents, props changed) stable/11/contrib/tcpdump/print-icmp6.c (contents, props changed) stable/11/contrib/tcpdump/print-igmp.c (contents, props changed) stable/11/contrib/tcpdump/print-igrp.c (contents, props changed) stable/11/contrib/tcpdump/print-ip.c (contents, props changed) stable/11/contrib/tcpdump/print-ip6.c (contents, props changed) stable/11/contrib/tcpdump/print-ip6opts.c (contents, props changed) stable/11/contrib/tcpdump/print-ipcomp.c (contents, props changed) stable/11/contrib/tcpdump/print-ipfc.c (contents, props changed) stable/11/contrib/tcpdump/print-ipnet.c (contents, props changed) stable/11/contrib/tcpdump/print-ipx.c (contents, props changed) stable/11/contrib/tcpdump/print-isakmp.c (contents, props changed) stable/11/contrib/tcpdump/print-isoclns.c (contents, props changed) stable/11/contrib/tcpdump/print-juniper.c (contents, props changed) stable/11/contrib/tcpdump/print-krb.c (contents, props changed) stable/11/contrib/tcpdump/print-l2tp.c (contents, props changed) stable/11/contrib/tcpdump/print-lane.c (contents, props changed) stable/11/contrib/tcpdump/print-ldp.c (contents, props changed) stable/11/contrib/tcpdump/print-llc.c (contents, props changed) stable/11/contrib/tcpdump/print-lldp.c (contents, props changed) stable/11/contrib/tcpdump/print-lmp.c (contents, props changed) stable/11/contrib/tcpdump/print-loopback.c (contents, props changed) stable/11/contrib/tcpdump/print-lspping.c (contents, props changed) stable/11/contrib/tcpdump/print-lwapp.c (contents, props changed) stable/11/contrib/tcpdump/print-lwres.c (contents, props changed) stable/11/contrib/tcpdump/print-m3ua.c (contents, props changed) stable/11/contrib/tcpdump/print-mobile.c (contents, props changed) stable/11/contrib/tcpdump/print-mobility.c (contents, props changed) stable/11/contrib/tcpdump/print-mpcp.c (contents, props changed) stable/11/contrib/tcpdump/print-mpls.c (contents, props changed) stable/11/contrib/tcpdump/print-mptcp.c (contents, props changed) stable/11/contrib/tcpdump/print-msdp.c (contents, props changed) stable/11/contrib/tcpdump/print-msnlb.c stable/11/contrib/tcpdump/print-nflog.c (contents, props changed) stable/11/contrib/tcpdump/print-nfs.c (contents, props changed) stable/11/contrib/tcpdump/print-ntp.c (contents, props changed) stable/11/contrib/tcpdump/print-null.c (contents, props changed) stable/11/contrib/tcpdump/print-olsr.c (contents, props changed) stable/11/contrib/tcpdump/print-openflow-1.0.c (contents, props changed) stable/11/contrib/tcpdump/print-openflow.c (contents, props changed) stable/11/contrib/tcpdump/print-ospf.c (contents, props changed) stable/11/contrib/tcpdump/print-ospf6.c (contents, props changed) stable/11/contrib/tcpdump/print-otv.c stable/11/contrib/tcpdump/print-pflog.c (contents, props changed) stable/11/contrib/tcpdump/print-pfsync.c (contents, props changed) stable/11/contrib/tcpdump/print-pgm.c (contents, props changed) stable/11/contrib/tcpdump/print-pim.c (contents, props changed) stable/11/contrib/tcpdump/print-pktap.c (contents, props changed) stable/11/contrib/tcpdump/print-ppi.c (contents, props changed) stable/11/contrib/tcpdump/print-ppp.c (contents, props changed) stable/11/contrib/tcpdump/print-pppoe.c (contents, props changed) stable/11/contrib/tcpdump/print-pptp.c (contents, props changed) stable/11/contrib/tcpdump/print-radius.c (contents, props changed) stable/11/contrib/tcpdump/print-raw.c (contents, props changed) stable/11/contrib/tcpdump/print-rip.c (contents, props changed) stable/11/contrib/tcpdump/print-ripng.c (contents, props changed) stable/11/contrib/tcpdump/print-rpki-rtr.c (contents, props changed) stable/11/contrib/tcpdump/print-rrcp.c (contents, props changed) stable/11/contrib/tcpdump/print-rsvp.c (contents, props changed) stable/11/contrib/tcpdump/print-rt6.c (contents, props changed) stable/11/contrib/tcpdump/print-rtsp.c (contents, props changed) stable/11/contrib/tcpdump/print-rx.c (contents, props changed) stable/11/contrib/tcpdump/print-sctp.c (contents, props changed) stable/11/contrib/tcpdump/print-sflow.c (contents, props changed) stable/11/contrib/tcpdump/print-sip.c (contents, props changed) stable/11/contrib/tcpdump/print-sl.c (contents, props changed) stable/11/contrib/tcpdump/print-sll.c (contents, props changed) stable/11/contrib/tcpdump/print-slow.c (contents, props changed) stable/11/contrib/tcpdump/print-smb.c (contents, props changed) stable/11/contrib/tcpdump/print-smtp.c (contents, props changed) stable/11/contrib/tcpdump/print-snmp.c (contents, props changed) stable/11/contrib/tcpdump/print-stp.c (contents, props changed) stable/11/contrib/tcpdump/print-sunatm.c (contents, props changed) stable/11/contrib/tcpdump/print-sunrpc.c (contents, props changed) stable/11/contrib/tcpdump/print-symantec.c (contents, props changed) stable/11/contrib/tcpdump/print-syslog.c (contents, props changed) stable/11/contrib/tcpdump/print-tcp.c (contents, props changed) stable/11/contrib/tcpdump/print-telnet.c (contents, props changed) stable/11/contrib/tcpdump/print-tftp.c (contents, props changed) stable/11/contrib/tcpdump/print-timed.c (contents, props changed) stable/11/contrib/tcpdump/print-tipc.c stable/11/contrib/tcpdump/print-token.c (contents, props changed) stable/11/contrib/tcpdump/print-udld.c (contents, props changed) stable/11/contrib/tcpdump/print-udp.c (contents, props changed) stable/11/contrib/tcpdump/print-usb.c (contents, props changed) stable/11/contrib/tcpdump/print-vjc.c (contents, props changed) stable/11/contrib/tcpdump/print-vqp.c (contents, props changed) stable/11/contrib/tcpdump/print-vrrp.c (contents, props changed) stable/11/contrib/tcpdump/print-vtp.c (contents, props changed) stable/11/contrib/tcpdump/print-vxlan.c stable/11/contrib/tcpdump/print-wb.c (contents, props changed) stable/11/contrib/tcpdump/print-zephyr.c (contents, props changed) stable/11/contrib/tcpdump/print-zeromq.c stable/11/contrib/tcpdump/rpc_auth.h (contents, props changed) stable/11/contrib/tcpdump/rpc_msg.h (contents, props changed) stable/11/contrib/tcpdump/rpl.h (contents, props changed) stable/11/contrib/tcpdump/setsignal.c (contents, props changed) stable/11/contrib/tcpdump/signature.c (contents, props changed) stable/11/contrib/tcpdump/signature.h (contents, props changed) stable/11/contrib/tcpdump/smb.h (contents, props changed) stable/11/contrib/tcpdump/smbutil.c (contents, props changed) stable/11/contrib/tcpdump/tcp.h (contents, props changed) stable/11/contrib/tcpdump/tcpdump.1.in (contents, props changed) stable/11/contrib/tcpdump/tcpdump.c (contents, props changed) stable/11/contrib/tcpdump/udp.h (contents, props changed) stable/11/contrib/tcpdump/vfprintf.c (contents, props changed) stable/11/usr.sbin/tcpdump/tcpdump/Makefile stable/11/usr.sbin/tcpdump/tcpdump/config.h Directory Properties: stable/11/ (props changed) stable/11/contrib/tcpdump/LICENSE (props changed) stable/11/contrib/tcpdump/Makefile-devel-adds (props changed) stable/11/contrib/tcpdump/ah.h (props changed) stable/11/contrib/tcpdump/appletalk.h (props changed) stable/11/contrib/tcpdump/atime.awk (props changed) stable/11/contrib/tcpdump/atm.h (props changed) stable/11/contrib/tcpdump/chdlc.h (props changed) stable/11/contrib/tcpdump/config.guess (props changed) stable/11/contrib/tcpdump/config.sub (props changed) stable/11/contrib/tcpdump/gmpls.h (props changed) stable/11/contrib/tcpdump/gmt2local.h (props changed) stable/11/contrib/tcpdump/install-sh (props changed) stable/11/contrib/tcpdump/lbl/os-osf4.h (props changed) stable/11/contrib/tcpdump/llc.h (props changed) stable/11/contrib/tcpdump/makemib (props changed) stable/11/contrib/tcpdump/missing/getopt_long.c (props changed) stable/11/contrib/tcpdump/mkdep (props changed) stable/11/contrib/tcpdump/mpls.h (props changed) stable/11/contrib/tcpdump/nlpid.h (props changed) stable/11/contrib/tcpdump/openflow.h (props changed) stable/11/contrib/tcpdump/ospf.h (props changed) stable/11/contrib/tcpdump/packetdat.awk (props changed) stable/11/contrib/tcpdump/pcap_dump_ftell.c (props changed) stable/11/contrib/tcpdump/send-ack.awk (props changed) stable/11/contrib/tcpdump/setsignal.h (props changed) stable/11/contrib/tcpdump/slcompress.h (props changed) stable/11/contrib/tcpdump/stime.awk (props changed) Modified: stable/11/contrib/tcpdump/CHANGES ============================================================================== --- stable/11/contrib/tcpdump/CHANGES Fri Feb 10 07:16:56 2017 (r313536) +++ stable/11/contrib/tcpdump/CHANGES Fri Feb 10 07:22:12 2017 (r313537) @@ -1,3 +1,187 @@ +Wednesday January 18, 2017 devel.fx.lebail@orange.fr + Summary for 4.9.0 tcpdump release + General updates: + Improve separation frontend/backend (tcpdump/libnetdissect) + Don't require IPv6 library support in order to support IPv6 addresses + Introduce data types to use for integral values in packet structures + Fix display of timestamps with -tt, -ttt and -ttttt options + Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others + (More information in the log with CVE-2016-* and CVE-2017-*) + Change the way protocols print link-layer addresses (Fix heap overflows + in CALM-FAST and GeoNetworking printers) + Pass correct caplen value to ether_print() and some other functions + Fix lookup_nsap() to match what isonsap_string() expects + Clean up relative time stamp printing (Fix an array overflow) + Fix some alignment issues with GCC on Solaris 10 SPARC + Add some ND_TTEST_/ND_TCHECK_ macros to simplify writing bounds checks + Add a fn_printztn() which returns the number of bytes processed + Add nd_init() and nd_cleanup() functions. Improve libsmi support + Add CONTRIBUTING file + Add a summary comment in all printers + Compile with more warning options in devel mode if supported (-Wcast-qual, ...) + Fix some leaks found by Valgrind/Memcheck + Fix a bunch of de-constifications + Squelch some Coverity warnings and some compiler warnings + Update Coverity and Travis-CI setup + Update Visual Studio files + + Frontend: + Fix capsicum support to work with zerocopy buffers in bpf + Try opening interfaces by name first, then by name-as-index + Work around pcap_create() failures fetching time stamp type lists + Fix a segmentation fault with 'tcpdump -J' + Improve addrtostr6() bounds checking + Add exit_tcpdump() function + Don't drop CAP_SYS_CHROOT before chrooting + Fixes issue where statistics not reported when -G and -W options used + + New printers supporting: + Generic Protocol Extension for VXLAN (VXLAN-GPE) + Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 + Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets + Marvell Extended Distributed Switch Architecture header (MEDSA) + Network Service Header (NSH) + REdis Serialization Protocol (RESP) + + Updated printers: + 802.11: Beginnings of 11ac radiotap support + 802.11: Check the Protected bit for management frames + 802.11: Do bounds checking on last_presentp before dereferencing it (Fix a heap overflow) + 802.11: Fix the radiotap printer to handle the special bits correctly + 802.11: If we have the MCS field, it's 11n + 802.11: Only print unknown frame type or subtype messages once + 802.11: Radiotap dBm values get printed as dB; Update a test output accordingly + 802.11: Source and destination addresses were backwards + AH: Add a bounds check + AH: Report to our caller that dissection failed if a bounds check fails + AP1394: Print src > dst, not dst > src + ARP: Don't assume the target hardware address is <= 6 octets long (Fix a heap overflow) + ATALK: Add bounds and length checks (Fix heap overflows) + ATM: Add some bounds checks (Fix a heap overflow) + ATM: Fix an incorrect bounds check + BFD: Update specification from draft to RFC 5880 + BFD: Update to print optional authentication field + BGP: Add decoding of ADD-PATH capability + BGP: Add support for the AIGP attribute (RFC7311) + BGP: Print LARGE_COMMUNITY Path Attribute + BGP: Update BGP numbers from IANA; Print minor values for FSM notification + BOOTP: Add a bounds check + Babel: Add decoder for source-specific extension + CDP: Filter out non-printable characters + CFM: Fixes to match the IEEE standard, additional bounds and length checks + CSLIP: Add more bounds checks (Fix a heap overflow) + ClassicalIPoATM: Add a bounds check on LLC+SNAP header (Fix a heap overflow) + DHCP: Fix MUDURL and TZ options + DHCPv6: Process MUDURL and TZ options + DHCPv6: Update Status Codes with RFCs/IANA names + DNS: Represent the "DNSSEC OK" bit as "DO" instead of "OK". Add a test case + DTP: Improve packet integrity checks + EGP: Fix bounds checks + ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later + ESP: Handle OpenSSL 1.1.x + Ethernet: Add some bounds checking before calling isoclns_print (Fix a heap overflow) + Ethernet: Print the Length/Type field as length when needed + FDDI: Fix -e output for FDDI + FR: Add some packet-length checks and improve Q.933 printing (Fix heap overflows) + GRE: Add some bounds checks (Fix heap overflows) + Geneve: Fix error message with invalid option length; Update list option classes + HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes + ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS() + ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string + IGMP: Add a length check + IP: Add a bounds check (Fix a heap overflow) + IP: Check before fetching the protocol version (Fix a heap overflow) + IP: Don't try to dissect if IP version != 4 (Fix a heap overflow) + IP: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + IPComp: Check whether we have the CPI before we fetch it (Fix a heap overflow) + IPoFC: Fix -e output (IP-over-Fibre Channel) + IPv6: Don't overwrite the destination IPv6 address for routing headers + IPv6: Fix header printing + IPv6: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + ISAKMP: Clean up parsing of IKEv2 Security Associations + ISOCLNS/IS-IS: Add support for Purge Originator Identifier (RFC6232) and test cases + ISOCLNS/IS-IS: Don't overwrite packet data when checking the signature + ISOCLNS/IS-IS: Filter out non-printable characters + ISOCLNS/IS-IS: Fix segmentation faults + ISOCLNS/IS-IS: Have signature_verify() do the copying and clearing + ISOCLNS: Add some bounds checks + Juniper: Make sure a Juniper header TLV isn't bigger than what's left in the packet (Fix a heap overflow) + LLC/SNAP: With -e, print the LLC header before the SNAP header; without it, cut the SNAP header + LLC: Add a bounds check (Fix a heap overflow) + LLC: Clean up printing of LLC packets + LLC: Fix the printing of RFC 948-style IP packets + LLC: Skip the LLC and SNAP headers with -x for 802.11 and some other protocols + LLDP: Implement IANA OUI and LLDP MUD option + MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks + MPLS: "length" is now the *remaining* packet length + MPLS: Add bounds and length checks (Fix a heap overflow) + NFS: Add a test that makes unaligned accesses + NFS: Don't assume the ONC RPC header is nicely aligned + NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault) + NFS: Don't run past the end of an NFSv3 file handle + OLSR: Add a test to cover a HNA sgw case + OLSR: Fix 'Advertised networks' count + OLSR: Fix printing of smart-gateway HNAs in IPv4 + OSPF: Add a bounds check for the Hello packet options + OSPF: Do more bounds checking + OSPF: Fix a segmentation fault + OSPF: Fix printing 'ospf_topology_values' default + OTV: Add missing bounds checks + PGM: Print the formatted IP address, not the raw binary address, as a string + PIM: Add some bounds checking (Fix a heap overflow) + PIMv2: Fix checksumming of Register messages + PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer + PPP: Add some bounds checks (Fix a heap overflow) + PPP: Report invalid PAP AACK/ANAK packets + Q.933: Add a missing bounds check + RADIUS: Add Value 13 "VLAN" to Tunnel-Type attribute + RADIUS: Filter out non-printable characters + RADIUS: Translate UDP/1700 as RADIUS + RESP: Do better checking of RESP packets + RPKI-RTR: Add a return value check for "fn_printn" call + RPKI-RTR: Remove printing when truncated condition already detected + RPL: Fix 'Consistency Check' control code + RPL: Fix suboption print + RSVP: An INTEGRITY object in a submessage covers only the submessage + RSVP: Fix an infinite loop; Add bounds and length checks + RSVP: Fix some if statements missing brackets + RSVP: Have signature_verify() do the copying and clearing + RTCP: Add some bounds checks + RTP: Add some bounds checks, fix two segmentation faults + SCTP: Do more bounds checking + SFLOW: Fix bounds checking + SLOW: Fix bugs, add checks + SMB: Before fetching the flags2 field, make sure we have it + SMB: Do bounds checks on NBNS resource types and resource data lengths + SNMP: Clean up the "have libsmi but no modules loaded" case + SNMP: Clean up the object abbreviation list and fix the code to match them + SNMP: Do bounds checks when printing character and octet strings + SNMP: Improve ASN.1 bounds checks + SNMP: More bounds and length checks + STP: Add a bunch of bounds checks, and fix some printing (Fix heap overflows) + STP: Filter out non-printable characters + TCP: Add bounds and length checks for packets with TCP option 20 + TCP: Correct TCP option Kind value for TCP Auth and add SCPS-TP + TCP: Fix two bounds checks (Fix heap overflows) + TCP: Make sure we have the data offset field before fetching it (Fix a heap overflow) + TCP: Put TCP-AO option decoding right + TFTP: Don't use strchr() to scan packet data (Fix a heap overflow) + Telnet: Add some bounds checks + TokenRing: Fix -e output + UDLD: Fix an infinite loop + UDP: Add a bounds check (Fix a heap overflow) + UDP: Check against the packet length first + UDP: Don't do the DDP-over-UDP heuristic check up front + VAT: Add some bounds checks + VTP: Add a test on Mgmt Domain Name length + VTP: Add bounds checks and filter out non-printable characters + VXLAN: Add a bound check and a test case + ZeroMQ: Fix an infinite loop + +Tuesday April 14, 2015 guy@alum.mit.edu + Summary for 4.8.0 tcpdump release + Fix "-x" for Apple PKTAP and PPI packets + Friday April 10, 2015 guy@alum.mit.edu Summary for 4.7.4 tcpdump release RPKI to Router Protocol: Fix Segmentation Faults and other problems @@ -464,10 +648,10 @@ Wed. November 12, 2003. mcr@sandelman. Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release - Fixed infinite loop when parsing malformed isakmp packets. + Fixed infinite loop when parsing invalid isakmp packets. (reported by iDefense; already fixed in CVS) - Fixed infinite loop when parsing malformed BGP packets. - Fixed buffer overflow with certain malformed NFS packets. + Fixed infinite loop when parsing invalid BGP packets. + Fixed buffer overflow with certain invalid NFS packets. Pretty-print unprintable network names in 802.11 printer. Handle truncated nbp (appletalk) packets. Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt Copied: stable/11/contrib/tcpdump/CONTRIBUTING (from r313048, head/contrib/tcpdump/CONTRIBUTING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/tcpdump/CONTRIBUTING Fri Feb 10 07:22:12 2017 (r313537, copy of r313048, head/contrib/tcpdump/CONTRIBUTING) @@ -0,0 +1,103 @@ +Some Information for Contributors +--------------------------------- +You want to contribute to Tcpdump, Thanks! +Please, read these lines. + +1) Fork the Tcpdump repository on GitHub from + https://github.com/the-tcpdump-group/tcpdump + (See https://help.github.com/articles/fork-a-repo/) + +2) Setup an optional Travis-CI build + You can setup a travis build for your fork. So, you can test your changes + on Linux and OSX before sending pull requests. + (See http://docs.travis-ci.com/user/getting-started/) + +3) Clone your repository + git clone https://github.com//tcpdump.git + +4) Do a 'touch .devel' in your working directory. + Currently, the effect is + a) add (via configure, in Makefile) some warnings options ( -Wall + -Wmissing-prototypes -Wstrict-prototypes, ...) to the compiler if it + supports these options, + b) have the Makefile support "make depend" and the configure script run it. + +5) Configure and build + ./configure && make -s && make check + +6) Add/update sample.pcap files + We use tests directory to do regression tests on the dissection of captured + packets, by running tcpdump against a savefile sample.pcap, created with -w + option and comparing the results with a text file sample.out giving the + expected results. + + Any new/updated fields in a dissector must be present in a sample.pcap file + and the corresponding output file. + + Configuration is set in tests/TESTLIST. + Each line in this file has the following format: + test-name sample.pcap sample.out tcpdump-options + + the sample.out file can be build by: + (cd tests && ../tcpdump -n -r sample.pcap tcpdump-options > sample.out) + + It is often useful to have test outputs with different verbosity levels + (none, -v, -vv, -vvv, etc.) depending on the code. + +7) Test with 'make check' + Don't send a pull request if 'make check' gives failed tests. + +8) Rebase your commits against upstream/master + (To keep linearity) + +9) Initiate and send a pull request + (See https://help.github.com/articles/using-pull-requests/) + +Some remarks +------------ +a) A thorough reading of some other printers code is useful. + +b) Put the normative reference if any as comments (RFC, etc.). + +c) Put the format of packets/headers/options as comments. + +d) The printer may receive incomplete packet in the buffer, truncated at any + random position, for example by capturing with '-s size' option. + Thus use ND_TTEST, ND_TTEST2, ND_TCHECK or ND_TCHECK2 for bound checking. + For ND_TCHECK2: + Define : static const char tstr[] = " [|protocol]"; + Define a label: trunc + Print with: ND_PRINT((ndo, "%s", tstr)); + You can test the code via: + sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal + sudo tcpreplay -i lo sample.pcap # in another terminal + You should try several values for snaplen to do various truncation. + +e) Do invalid packet checks in code: Think that your code can receive in input + not only a valid packet but any arbitrary random sequence of octets (packet + - built malformed originally by the sender or by a fuzz tester, + - became corrupted in transit). + Print with: ND_PRINT((ndo, "%s", istr)); /* to print " (invalid)" */ + +f) Use 'struct tok' for indexed strings and print them with + tok2str() or bittok2str() (for flags). + +g) Avoid empty lines in output of printers. + +h) A commit message must have: + First line: Capitalized short summary in the imperative (70 chars or less) + + Body: Detailed explanatory text, if necessary. Fold it to approximately + 72 characters. There must be an empty line separating the summary from + the body. + +i) Avoid non-ASCII characters in code and commit messages. + +j) Use the style of the modified sources. + +k) Don't mix declarations and code + +l) Don't use // for comments + Not all C compilers accept C++/C99 comments by default. + +m) Avoid trailing tabs/spaces Modified: stable/11/contrib/tcpdump/CREDITS ============================================================================== --- stable/11/contrib/tcpdump/CREDITS Fri Feb 10 07:16:56 2017 (r313536) +++ stable/11/contrib/tcpdump/CREDITS Fri Feb 10 07:22:12 2017 (r313537) @@ -20,11 +20,13 @@ Additional people who have contributed p Andrea Bittau Andrew Brown Andrew Church + Andrew Darqui Andrew Hintz Andrew Nording Andrew Tridgell Andy Heffernan Anton Bernal + Antonin Décimo Arkadiusz Miskiewicz Armando L. Caro Jr. Arnaldo Carvalho de Melo @@ -33,6 +35,7 @@ Additional people who have contributed p Ben Byer Ben Smithurst Bert Vermeulen + Bill Parker Bjoern A. Zeeb Bram Brent L. Bates @@ -95,6 +98,7 @@ Additional people who have contributed p Jason R. Thorpe Jefferson Ogata Jeffrey Hutzelman + Jean-Raphaël Gaglione Jesper Peterson Jesse Gross Jim Hutchins @@ -119,7 +123,7 @@ Additional people who have contributed p Larry Lile Lennert Buytenhek Loganaden Velvindron - Longinus00 + Daniel Lee Loris Degioanni Love Hörnquist-Ã…strand Lucas C. Villa Real @@ -134,6 +138,7 @@ Additional people who have contributed p Markus Schöpflin Marshall Rose Martin Husemann + Matthieu Boutier Max Laier Michael A. Meffie III Michael Madore Modified: stable/11/contrib/tcpdump/INSTALL.txt ============================================================================== --- stable/11/contrib/tcpdump/INSTALL.txt Fri Feb 10 07:16:56 2017 (r313536) +++ stable/11/contrib/tcpdump/INSTALL.txt Fri Feb 10 07:22:12 2017 (r313537) @@ -49,9 +49,10 @@ addrtoname.c - address to hostname routi addrtoname.h - address to hostname definitions ah.h - IPSEC Authentication Header definitions appletalk.h - AppleTalk definitions +ascii_strcasecmp.c - locale-independent case-independent string comparison + routines atime.awk - TCP ack awk script atm.h - ATM traffic type definitions -atmuni31.h - ATM Q.2931 definitions bpf_dump.c - BPF program printing routines, in case libpcap doesn't have them chdlc.h - Cisco HDLC definitions @@ -100,100 +101,8 @@ pcap_dump_ftell.c - pcap_dump_ftell() im doesn't have it pcap-missing.h - declarations of functions possibly missing from libpcap ppp.h - Point to Point Protocol definitions -print-802_11.c - IEEE 802.11 printer routines -print-ap1394.c - Apple IP-over-IEEE 1394 printer routines -print-ah.c - IPSEC Authentication Header printer routines -print-aodv.c - AODV printer routines -print-arcnet.c - ARCNET printer routines -print-arp.c - Address Resolution Protocol printer routines -print-ascii.c - ASCII packet dump routines -print-atalk.c - AppleTalk printer routines -print-atm.c - ATM printer routines -print-beep.c - BEEP printer routines -print-bgp.c - Border Gateway Protocol printer routines -print-bootp.c - BOOTP and IPv4 DHCP printer routines -print-bt.c - Bluetooth printer routines -print-cdp.c - Cisco Discovery Protocol printer routines -print-chdlc.c - Cisco HDLC printer routines -print-cip.c - Classical-IP over ATM routines -print-cnfp.c - Cisco NetFlow printer routines -print-dccp.c - DCCP printer routines -print-decnet.c - DECnet printer routines -print-dhcp6.c - IPv6 DHCP printer routines -print-domain.c - Domain Name System printer routines -print-dvmrp.c - Distance Vector Multicast Routing Protocol printer routines -print-eap.c - EAP printer routines -print-enc.c - OpenBSD IPsec encapsulation BPF layer printer routines -print-egp.c - External Gateway Protocol printer routines -print-esp.c - IPSEC Encapsulating Security Payload printer routines -print-ether.c - Ethernet printer routines -print-fddi.c - Fiber Distributed Data Interface printer routines -print-fr.c - Frame Relay printer routines -print-frag6.c - IPv6 fragmentation header printer routines -print-gre.c - Generic Routing Encapsulation printer routines -print-hsrp.c - Cisco Hot Standby Router Protocol printer routines -print-icmp.c - Internet Control Message Protocol printer routines -print-icmp6.c - IPv6 Internet Control Message Protocol printer routines -print-igmp.c - Internet Group Management Protocol printer routines -print-igrp.c - Interior Gateway Routing Protocol printer routines -print-ip.c - IP printer routines -print-ip6.c - IPv6 printer routines -print-ip6opts.c - IPv6 header option printer routines -print-ipcomp.c - IP Payload Compression Protocol printer routines -print-ipx.c - IPX printer routines -print-isakmp.c - Internet Security Association and Key Management Protocol -print-isoclns.c - ISO CLNS, ESIS, and ISIS printer routines -print-krb.c - Kerberos printer routines -print-l2tp.c - Layer Two Tunneling Protocol printer routines -print-lane.c - ATM LANE printer routines -print-llc.c - IEEE 802.2 LLC printer routines -print-lspping.c - LSPPING printer routines -print-lwres.c - Lightweight Resolver protocol printer routines -print-mobile.c - IPv4 mobility printer routines -print-mobility.c - IPv6 mobility printer routines -print-mpls.c - Multi-Protocol Label Switching printer routines -print-msdp.c - Multicast Source Discovery Protocol printer routines -print-nfs.c - Network File System printer routines -print-ntp.c - Network Time Protocol printer routines -print-null.c - BSD loopback device printer routines -print-ospf.c - Open Shortest Path First printer routines -print-ospf6.c - IPv6 Open Shortest Path First printer routines -print-pflog.c - OpenBSD packet filter log file printer routines -print-pgm.c - Pragmatic General Multicast printer routines -print-pim.c - Protocol Independent Multicast printer routines -print-ppp.c - Point to Point Protocol printer routines -print-pppoe.c - PPP-over-Ethernet printer routines -print-pptp.c - Point-to-Point Tunnelling Protocol printer routines -print-radius.c - Radius protocol printer routines -print-raw.c - Raw IP printer routines -print-rip.c - Routing Information Protocol printer routines -print-ripng.c - IPv6 Routing Information Protocol printer routines -print-rrcp.c - Realtek Remote Control Protocol routines -print-rsvp.c - Resource reSerVation Protocol (RSVP) printer routines -print-rt6.c - IPv6 routing header printer routines -print-rx.c - AFS RX printer routines -print-sctp.c - Stream Control Transmission Protocol printer routines -print-sip.c - SIP printer routines -print-sl.c - Compressed Serial Line Internet Protocol printer routines -print-sll.c - Linux "cooked" capture printer routines -print-slow.c - IEEE "slow protocol" (802.3ad) printer routines -print-smb.c - SMB/CIFS printer routines -print-snmp.c - Simple Network Management Protocol printer routines -print-stp.c - IEEE 802.1d spanning tree protocol printer routines -print-sunatm.c - SunATM DLPI capture printer routines -print-sunrpc.c - Sun Remote Procedure Call printer routines -print-symantec.c - Symantec Enterprise Firewall printer routines -print-tcp.c - TCP printer routines -print-telnet.c - Telnet option printer routines -print-tftp.c - Trivial File Transfer Protocol printer routines -print-timed.c - BSD time daemon protocol printer routines -print-token.c - Token Ring printer routines -print-udp.c - UDP printer routines -print-usb.c - USB printer routines -print-vjc.c - PPP Van Jacobson compression (RFC1144) printer routines -print-vrrp.c - Virtual Router Redundancy Protocol -print-wb.c - White Board printer routines -print-zephyr.c - Zephyr printer routines +print.c - Top-level routines for protocol printing +print-*.c - The netdissect printers rpc_auth.h - definitions for ONC RPC authentication rpc_msg.h - definitions for ONC RPC messages send-ack.awk - unidirectional tcp send/ack awk script @@ -203,11 +112,11 @@ slcompress.h - SLIP/PPP Van Jacobson com smb.h - SMB/CIFS definitions smbutil.c - SMB/CIFS utility routines stime.awk - TCP send awk script -strcasecmp.c - missing routine tcp.h - TCP definitions tcpdump.1 - manual entry tcpdump.c - main program +timeval-operations.h - timeval operations macros udp.h - UDP definitions -util.c - utility routines +util-print.c - utility routines for protocol printers vfprintf.c - emulation routine win32 - headers and routines for building on Win32 systems Modified: stable/11/contrib/tcpdump/Makefile.in ============================================================================== --- stable/11/contrib/tcpdump/Makefile.in Fri Feb 10 07:16:56 2017 (r313536) +++ stable/11/contrib/tcpdump/Makefile.in Fri Feb 10 07:22:12 2017 (r313537) @@ -74,7 +74,9 @@ CSRC = setsignal.c tcpdump.c LIBNETDISSECT_SRC=\ addrtoname.c \ + addrtostr.c \ af.c \ + ascii_strcasecmp.c \ checksum.c \ cpack.c \ gmpls.c \ @@ -86,6 +88,7 @@ LIBNETDISSECT_SRC=\ nlpid.c \ oui.c \ parsenfsfh.c \ + print.c \ print-802_11.c \ print-802_15_4.c \ print-ah.c \ @@ -98,6 +101,7 @@ LIBNETDISSECT_SRC=\ print-ascii.c \ print-atalk.c \ print-atm.c \ + print-babel.c \ print-beep.c \ print-bfd.c \ print-bgp.c \ @@ -112,6 +116,7 @@ LIBNETDISSECT_SRC=\ print-cnfp.c \ print-dccp.c \ print-decnet.c \ + print-dhcp6.c \ print-domain.c \ print-dtp.c \ print-dvmrp.c \ @@ -124,17 +129,21 @@ LIBNETDISSECT_SRC=\ print-fddi.c \ print-forces.c \ print-fr.c \ + print-frag6.c \ print-ftp.c \ print-geneve.c \ print-geonet.c \ print-gre.c \ + print-hncp.c \ print-hsrp.c \ print-http.c \ print-icmp.c \ + print-icmp6.c \ print-igmp.c \ print-igrp.c \ print-ip.c \ print-ip6.c \ + print-ip6opts.c \ print-ipcomp.c \ print-ipfc.c \ print-ipnet.c \ @@ -146,6 +155,7 @@ LIBNETDISSECT_SRC=\ print-l2tp.c \ print-lane.c \ print-ldp.c \ + print-lisp.c \ print-llc.c \ print-lldp.c \ print-lmp.c \ @@ -154,7 +164,9 @@ LIBNETDISSECT_SRC=\ print-lwapp.c \ print-lwres.c \ print-m3ua.c \ + print-medsa.c \ print-mobile.c \ + print-mobility.c \ print-mpcp.c \ print-mpls.c \ print-mptcp.c \ @@ -162,12 +174,14 @@ LIBNETDISSECT_SRC=\ print-msnlb.c \ print-nflog.c \ print-nfs.c \ + print-nsh.c \ print-ntp.c \ print-null.c \ print-olsr.c \ print-openflow-1.0.c \ print-openflow.c \ print-ospf.c \ + print-ospf6.c \ print-otv.c \ print-pgm.c \ print-pim.c \ @@ -178,10 +192,13 @@ LIBNETDISSECT_SRC=\ print-pptp.c \ print-radius.c \ print-raw.c \ + print-resp.c \ print-rip.c \ + print-ripng.c \ print-rpki-rtr.c \ print-rrcp.c \ print-rsvp.c \ + print-rt6.c \ print-rtsp.c \ print-rx.c \ print-sctp.c \ @@ -211,11 +228,14 @@ LIBNETDISSECT_SRC=\ print-vrrp.c \ print-vtp.c \ print-vxlan.c \ + print-vxlan-gpe.c \ print-wb.c \ print-zephyr.c \ print-zeromq.c \ + netdissect.c \ signature.c \ - util.c + strtoaddr.c \ + util-print.c LOCALSRC = @LOCALSRC@ GENSRC = version.c @@ -232,11 +252,12 @@ SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LI OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ) HDR = \ addrtoname.h \ + addrtostr.h \ af.h \ ah.h \ appletalk.h \ + ascii_strcasecmp.h \ atm.h \ - atmuni31.h \ chdlc.h \ cpack.h \ ether.h \ @@ -264,6 +285,7 @@ HDR = \ oui.h \ pcap-missing.h \ ppp.h \ + print.h \ rpc_auth.h \ rpc_msg.h \ rpl.h \ @@ -271,14 +293,15 @@ HDR = \ signature.h \ slcompress.h \ smb.h \ + strtoaddr.h \ tcp.h \ - tcpdump-stdinc.h \ + netdissect-stdinc.h \ + timeval-operations.h \ udp.h TAGHDR = \ /usr/include/arpa/tftp.h \ /usr/include/net/if_arp.h \ - /usr/include/net/slip.h \ /usr/include/netinet/if_ether.h \ /usr/include/netinet/in.h \ /usr/include/netinet/ip_icmp.h \ @@ -292,11 +315,14 @@ CLEANFILES = $(PROG) $(OBJ) $(GENSRC) EXTRA_DIST = \ CHANGES \ + CONTRIBUTING \ CREDITS \ INSTALL.txt \ LICENSE \ Makefile.in \ Makefile-devel-adds \ + PLATFORMS \ + README \ README.md \ Readme.Win32 \ VERSION \ @@ -314,14 +340,9 @@ EXTRA_DIST = \ lbl/os-sunos4.h \ lbl/os-ultrix4.h \ makemib \ - missing/addrinfo.h \ missing/dlnames.c \ missing/datalinks.c \ - missing/getnameinfo.c \ missing/getopt_long.c \ - missing/inet_aton.c \ - missing/inet_ntop.c \ - missing/inet_pton.c \ missing/snprintf.c \ missing/strdup.c \ missing/strlcat.c \ @@ -330,27 +351,19 @@ EXTRA_DIST = \ mkdep \ packetdat.awk \ pcap_dump_ftell.c \ - print-babel.c \ - print-dhcp6.c \ - print-frag6.c \ - print-icmp6.c \ - print-ip6opts.c \ - print-mobility.c \ - print-ospf6.c \ print-pflog.c \ - print-ripng.c \ - print-rt6.c \ print-smb.c \ send-ack.awk \ smbutil.c \ stime.awk \ - strcasecmp.c \ tcpdump.1.in \ vfprintf.c \ - win32/Include/w32_fzs.h \ win32/prj/GNUmakefile \ win32/prj/WinDump.dsp \ - win32/prj/WinDump.dsw + win32/prj/WinDump.dsw \ + win32/prj/WinDump.sln \ + win32/prj/WinDump.vcproj \ + win32/src/ether_ntohost.c TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print` @@ -362,23 +375,15 @@ $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) @rm -f $@ - $(AR) $(ARFLAGS) $@ $(LIBNETDISSECT_OBJ) + $(AR) cr $@ $(LIBNETDISSECT_OBJ) $(RANLIB) $@ datalinks.o: $(srcdir)/missing/datalinks.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c dlnames.o: $(srcdir)/missing/dlnames.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c -getnameinfo.o: $(srcdir)/missing/getnameinfo.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c getopt_long.o: $(srcdir)/missing/getopt_long.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c -inet_pton.o: $(srcdir)/missing/inet_pton.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c -inet_ntop.o: $(srcdir)/missing/inet_ntop.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c -inet_aton.o: $(srcdir)/missing/inet_aton.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c snprintf.o: $(srcdir)/missing/snprintf.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c strdup.o: $(srcdir)/missing/strdup.c @@ -434,6 +439,9 @@ distclean: check: tcpdump (cd tests && ./TESTrun.sh) +extags: $(TAGFILES) + ctags $(TAGFILES) + tags: $(TAGFILES) ctags -wtd $(TAGFILES) Copied: stable/11/contrib/tcpdump/PLATFORMS (from r313048, head/contrib/tcpdump/PLATFORMS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/tcpdump/PLATFORMS Fri Feb 10 07:22:12 2017 (r313537, copy of r313048, head/contrib/tcpdump/PLATFORMS) @@ -0,0 +1,9 @@ +== Tested platforms == +NetBSD 5.1/i386 (mcr - 2012/4/1) +Debian Linux (squeeze/i386) (mcr - 2012/4/1) + +--- +RedHat Linux 6.1/i386 (assar) +FreeBSD 2.2.8/i386 (itojun) + + Copied: stable/11/contrib/tcpdump/README (from r313048, head/contrib/tcpdump/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/tcpdump/README Fri Feb 10 07:22:12 2017 (r313537, copy of r313048, head/contrib/tcpdump/README) @@ -0,0 +1 @@ +link README.md \ No newline at end of file Modified: stable/11/contrib/tcpdump/VERSION ============================================================================== --- stable/11/contrib/tcpdump/VERSION Fri Feb 10 07:16:56 2017 (r313536) +++ stable/11/contrib/tcpdump/VERSION Fri Feb 10 07:22:12 2017 (r313537) @@ -1 +1 @@ -4.7.4 +4.9.0 Modified: stable/11/contrib/tcpdump/addrtoname.c ============================================================================== --- stable/11/contrib/tcpdump/addrtoname.c Fri Feb 10 07:16:56 2017 (r313536) +++ stable/11/contrib/tcpdump/addrtoname.c Fri Feb 10 07:22:12 2017 (r313537) @@ -20,11 +20,8 @@ * * Internet, ethernet, port, and protocol string to address * and address to string conversion routines - * - * $FreeBSD$ */ -#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -33,7 +30,8 @@ #include #include #endif /* HAVE_CASPER */ -#include + +#include #ifdef USE_ETHER_NTOHOST #ifdef HAVE_NETINET_IF_ETHER_H @@ -64,8 +62,10 @@ extern int ether_ntohost(char *, const s #include #include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" +#include "addrtostr.h" +#include "ethertype.h" #include "llc.h" #include "setsignal.h" #include "extract.h" @@ -78,7 +78,7 @@ extern int ether_ntohost(char *, const s /* * hash tables for whatever-to-name translations * - * XXX there has to be error checks against strdup(3) failure + * ndo_error() called on strdup(3) failure */ #define HASHNAMESIZE 4096 @@ -96,7 +96,7 @@ static struct hnamemem eprototable[HASHN static struct hnamemem dnaddrtable[HASHNAMESIZE]; static struct hnamemem ipxsaptable[HASHNAMESIZE]; -#if defined(INET6) && defined(WIN32) +#ifdef _WIN32 /* * fake gethostbyaddr for Win2k/XP * gethostbyaddr() returns incorrect value when AF_INET6 is passed @@ -134,9 +134,8 @@ win32_gethostbyaddr(const char *addr, in } } #define gethostbyaddr win32_gethostbyaddr -#endif /* INET6 & WIN32 */ +#endif /* _WIN32 */ -#ifdef INET6 struct h6namemem { struct in6_addr addr; char *name; @@ -144,7 +143,6 @@ struct h6namemem { }; static struct h6namemem h6nametable[HASHNAMESIZE]; -#endif /* INET6 */ struct enamemem { u_short e_addr0; @@ -214,7 +212,7 @@ extern cap_channel_t *capdns; * * NOTE: ap is *NOT* necessarily part of the packet data (not even if * this is being called with the "ipaddr_string()" macro), so you - * *CANNOT* use the TCHECK{2}/TTEST{2} macros on it. Furthermore, + * *CANNOT* use the ND_TCHECK{2}/ND_TTEST{2} macros on it. Furthermore, * even in cases where it *is* part of the packet data, the caller * would still have to check for a null return value, even if it's * just printing the return value with "%s" - not all versions of @@ -232,7 +230,7 @@ getname(netdissect_options *ndo, const u { register struct hostent *hp; uint32_t addr; - static struct hnamemem *p; /* static for longjmp() */ + struct hnamemem *p; memcpy(&addr, ap, sizeof(addr)); p = &hnametable[addr & (HASHNAMESIZE-1)]; @@ -241,7 +239,7 @@ getname(netdissect_options *ndo, const u return (p->name); } p->addr = addr; - p->nxt = newhnamemem(); + p->nxt = newhnamemem(ndo); /* * Print names unless: @@ -263,6 +261,9 @@ getname(netdissect_options *ndo, const u char *dotp; p->name = strdup(hp->h_name); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, + "getname: strdup(hp->h_name)"); if (ndo->ndo_Nflag) { /* Remove domain qualifications */ dotp = strchr(p->name, '.'); @@ -273,10 +274,11 @@ getname(netdissect_options *ndo, const u } } p->name = strdup(intoa(addr)); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, "getname: strdup(intoa(addr))"); return (p->name); } -#ifdef INET6 /* * Return a name for the IP6 address pointed to by ap. This address * is assumed to be in network byte order. @@ -292,7 +294,7 @@ getname6(netdissect_options *ndo, const uint16_t d; } addra; } addr; - static struct h6namemem *p; /* static for longjmp() */ + struct h6namemem *p; register const char *cp; char ntop_buf[INET6_ADDRSTRLEN]; @@ -303,7 +305,7 @@ getname6(netdissect_options *ndo, const return (p->name); } p->addr = addr.addr; - p->nxt = newh6namemem(); + p->nxt = newh6namemem(ndo); /* * Do not print names if -n was given. @@ -315,11 +317,15 @@ getname6(netdissect_options *ndo, const sizeof(addr), AF_INET6); } else #endif - hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6); + hp = gethostbyaddr((char *)&addr, sizeof(addr), + AF_INET6); if (hp) { char *dotp; p->name = strdup(hp->h_name); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, + "getname6: strdup(hp->h_name)"); if (ndo->ndo_Nflag) { /* Remove domain qualifications */ dotp = strchr(p->name, '.'); @@ -329,11 +335,12 @@ getname6(netdissect_options *ndo, const return (p->name); } } - cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf)); + cp = addrtostr6(ap, ntop_buf, sizeof(ntop_buf)); p->name = strdup(cp); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, "getname6: strdup(cp)"); return (p->name); } -#endif /* INET6 */ static const char hex[] = "0123456789abcdef"; @@ -341,7 +348,7 @@ static const char hex[] = "0123456789abc /* Find the hash node that corresponds the ether address 'ep' */ static inline struct enamemem * -lookup_emem(const u_char *ep) +lookup_emem(netdissect_options *ndo, const u_char *ep) { register u_int i, j, k; struct enamemem *tp; @@ -363,7 +370,7 @@ lookup_emem(const u_char *ep) tp->e_addr2 = k; tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) - error("lookup_emem: calloc"); + (*ndo->ndo_error)(ndo, "lookup_emem: calloc"); return tp; } @@ -374,7 +381,8 @@ lookup_emem(const u_char *ep) */ static inline struct enamemem * -lookup_bytestring(register const u_char *bs, const unsigned int nlen) +lookup_bytestring(netdissect_options *ndo, register const u_char *bs, + const unsigned int nlen) { struct enamemem *tp; register u_int i, j, k; @@ -406,12 +414,12 @@ lookup_bytestring(register const u_char tp->e_bs = (u_char *) calloc(1, nlen + 1); if (tp->e_bs == NULL) - error("lookup_bytestring: calloc"); + (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); memcpy(tp->e_bs, bs, nlen); tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) - error("lookup_bytestring: calloc"); + (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); return tp; } @@ -419,14 +427,15 @@ lookup_bytestring(register const u_char /* Find the hash node that corresponds the NSAP 'nsap' */ static inline struct enamemem * -lookup_nsap(register const u_char *nsap) +lookup_nsap(netdissect_options *ndo, register const u_char *nsap, + register u_int nsap_length) { register u_int i, j, k; - unsigned int nlen = *nsap; struct enamemem *tp; - const u_char *ensap = nsap + nlen - 6; + const u_char *ensap; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 10 07:32:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AE56CD1D6D; Fri, 10 Feb 2017 07:32:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C150155E; Fri, 10 Feb 2017 07:32:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7WmX2026521; Fri, 10 Feb 2017 07:32:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7Wej8026447; Fri, 10 Feb 2017 07:32:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100732.v1A7Wej8026447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313538 - in stable/11/lib: csu/aarch64 csu/amd64 csu/arm csu/i386 csu/mips csu/powerpc csu/powerpc64 csu/riscv csu/sparc64 libalias/libalias libalias/modules libarchive libauditd libbe... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:32:49 -0000 Author: ngie Date: Fri Feb 10 07:32:40 2017 New Revision: 313538 URL: https://svnweb.freebsd.org/changeset/base/313538 Log: MFC r312452-r312512: r312452-r312512: - Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output - Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc Modified: stable/11/lib/csu/aarch64/Makefile stable/11/lib/csu/amd64/Makefile stable/11/lib/csu/arm/Makefile stable/11/lib/csu/i386/Makefile stable/11/lib/csu/mips/Makefile stable/11/lib/csu/powerpc/Makefile stable/11/lib/csu/powerpc64/Makefile stable/11/lib/csu/riscv/Makefile stable/11/lib/csu/sparc64/Makefile stable/11/lib/libalias/libalias/Makefile stable/11/lib/libalias/modules/Makefile stable/11/lib/libalias/modules/Makefile.inc stable/11/lib/libarchive/Makefile stable/11/lib/libauditd/Makefile stable/11/lib/libbegemot/Makefile stable/11/lib/libblocksruntime/Makefile stable/11/lib/libbluetooth/Makefile stable/11/lib/libbsm/Makefile stable/11/lib/libbsnmp/libbsnmp/Makefile stable/11/lib/libbz2/Makefile stable/11/lib/libc++/Makefile stable/11/lib/libc_nonshared/Makefile stable/11/lib/libcam/Makefile stable/11/lib/libcom_err/Makefile stable/11/lib/libcompat/Makefile stable/11/lib/libcrypt/Makefile stable/11/lib/libcxxrt/Makefile stable/11/lib/libdevdctl/tests/Makefile stable/11/lib/libdwarf/Makefile stable/11/lib/libelf/Makefile stable/11/lib/libevent/Makefile stable/11/lib/libexecinfo/Makefile stable/11/lib/libexpat/Makefile stable/11/lib/libgssapi/Makefile stable/11/lib/libiconv_modules/Makefile.inc stable/11/lib/libiconv_modules/mapper_parallel/Makefile stable/11/lib/libkiconv/Makefile stable/11/lib/libldns/Makefile stable/11/lib/liblzma/Makefile stable/11/lib/libmagic/Makefile stable/11/lib/libmd/Makefile stable/11/lib/libmilter/Makefile stable/11/lib/libmp/Makefile stable/11/lib/libngatm/Makefile stable/11/lib/libnv/Makefile stable/11/lib/libopie/Makefile stable/11/lib/libpam/libpam/Makefile stable/11/lib/libpam/modules/Makefile.inc stable/11/lib/libpam/modules/pam_passwdqc/Makefile stable/11/lib/libpam/modules/pam_ssh/Makefile stable/11/lib/libpam/static_libpam/Makefile stable/11/lib/libpcap/Makefile stable/11/lib/libpe/Makefile stable/11/lib/libproc/Makefile stable/11/lib/libprocstat/zfs/Makefile stable/11/lib/librpcsec_gss/Makefile stable/11/lib/librpcsvc/Makefile stable/11/lib/librt/Makefile stable/11/lib/libsbuf/Makefile stable/11/lib/libsm/Makefile stable/11/lib/libsmb/Makefile stable/11/lib/libsmdb/Makefile stable/11/lib/libsmutil/Makefile stable/11/lib/libsqlite3/Makefile stable/11/lib/libstdthreads/Makefile stable/11/lib/libsysdecode/Makefile stable/11/lib/libtelnet/Makefile stable/11/lib/libthr/Makefile stable/11/lib/libthr/support/Makefile.inc stable/11/lib/libthread_db/Makefile stable/11/lib/libufs/Makefile stable/11/lib/libulog/Makefile stable/11/lib/libunbound/Makefile stable/11/lib/libutil/Makefile stable/11/lib/libypclnt/Makefile stable/11/lib/ncurses/config.mk stable/11/lib/ncurses/form/Makefile stable/11/lib/ncurses/formw/Makefile stable/11/lib/ncurses/menu/Makefile stable/11/lib/ncurses/menuw/Makefile stable/11/lib/ncurses/ncurses/Makefile stable/11/lib/ncurses/ncursesw/Makefile stable/11/lib/ncurses/panel/Makefile stable/11/lib/ncurses/panelw/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/csu/aarch64/Makefile ============================================================================== --- stable/11/lib/csu/aarch64/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/aarch64/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: stable/11/lib/csu/amd64/Makefile ============================================================================== --- stable/11/lib/csu/amd64/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/amd64/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include CFLAGS+= -fno-omit-frame-pointer FILES= ${OBJS} Modified: stable/11/lib/csu/arm/Makefile ============================================================================== --- stable/11/lib/csu/arm/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/arm/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include STATIC_CFLAGS+= -mlong-calls FILES= ${OBJS} Modified: stable/11/lib/csu/i386/Makefile ============================================================================== --- stable/11/lib/csu/i386/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/i386/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= gcrt1.o crt1.o Scrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: stable/11/lib/csu/mips/Makefile ============================================================================== --- stable/11/lib/csu/mips/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/mips/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: stable/11/lib/csu/powerpc/Makefile ============================================================================== --- stable/11/lib/csu/powerpc/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/powerpc/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: stable/11/lib/csu/powerpc64/Makefile ============================================================================== --- stable/11/lib/csu/powerpc64/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/powerpc64/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include \ +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include \ -mlongcall # XXX: See the log for r232932 as to why the above -mlongcall is needed. Since Modified: stable/11/lib/csu/riscv/Makefile ============================================================================== --- stable/11/lib/csu/riscv/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/riscv/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: stable/11/lib/csu/sparc64/Makefile ============================================================================== --- stable/11/lib/csu/sparc64/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/csu/sparc64/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,11 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: stable/11/lib/libalias/libalias/Makefile ============================================================================== --- stable/11/lib/libalias/libalias/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libalias/libalias/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../sys/netinet/libalias +.PATH: ${SRCTOP}/sys/netinet/libalias PACKAGE=lib${LIB} LIB= alias Modified: stable/11/lib/libalias/modules/Makefile ============================================================================== --- stable/11/lib/libalias/modules/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libalias/modules/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../../../sys/modules/libalias/modules/modules.inc" +.include "${SRCTOP}/sys/modules/libalias/modules/modules.inc" SUBDIR= ${MODULES} Modified: stable/11/lib/libalias/modules/Makefile.inc ============================================================================== --- stable/11/lib/libalias/modules/Makefile.inc Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libalias/modules/Makefile.inc Fri Feb 10 07:32:40 2017 (r313538) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../sys/netinet/libalias +.PATH: ${SRCTOP}/sys/netinet/libalias SHLIBDIR?= /lib LIB?= alias_${NAME} Modified: stable/11/lib/libarchive/Makefile ============================================================================== --- stable/11/lib/libarchive/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libarchive/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -2,7 +2,7 @@ .include PACKAGE=lib${LIB} -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive LIB= archive Modified: stable/11/lib/libauditd/Makefile ============================================================================== --- stable/11/lib/libauditd/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libauditd/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ # PACKAGE=lib${LIB} -OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm _LIBAUDITDDIR= ${OPENBSMDIR}/libauditd _LIBBSMDIR= ${OPENBSMDIR}/libbsm Modified: stable/11/lib/libbegemot/Makefile ============================================================================== --- stable/11/lib/libbegemot/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libbegemot/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBBEGEMOT_DIR=${.CURDIR}/../../contrib/libbegemot +LIBBEGEMOT_DIR=${SRCTOP}/contrib/libbegemot PACKAGE=lib${LIB} .PATH: ${LIBBEGEMOT_DIR} Modified: stable/11/lib/libblocksruntime/Makefile ============================================================================== --- stable/11/lib/libblocksruntime/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libblocksruntime/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -6,7 +6,7 @@ SHLIB_MAJOR=0 CFLAGS+=-I${.CURDIR} WARNS?= 2 -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/BlocksRuntime +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/BlocksRuntime INCS= Block.h Block_private.h SRCS= data.c runtime.c Modified: stable/11/lib/libbluetooth/Makefile ============================================================================== --- stable/11/lib/libbluetooth/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libbluetooth/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -6,7 +6,7 @@ LIB= bluetooth MAN= bluetooth.3 WARNS?= 2 -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 4 Modified: stable/11/lib/libbsm/Makefile ============================================================================== --- stable/11/lib/libbsm/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libbsm/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ # PACKAGE= lib${LIB} -OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm _LIBBSMDIR= ${OPENBSMDIR}/libbsm LIB= bsm Modified: stable/11/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- stable/11/lib/libbsnmp/libbsnmp/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libbsnmp/libbsnmp/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -4,7 +4,7 @@ .include -CONTRIB= ${.CURDIR}/../../../contrib/bsnmp/lib +CONTRIB= ${SRCTOP}/contrib/bsnmp/lib .PATH: ${CONTRIB} LIB= bsnmp Modified: stable/11/lib/libbz2/Makefile ============================================================================== --- stable/11/lib/libbz2/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libbz2/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE= lib${LIB} -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} LIB= bz2 Modified: stable/11/lib/libc++/Makefile ============================================================================== --- stable/11/lib/libc++/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libc++/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,9 +3,9 @@ .include PACKAGE= clibs -_LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt -HDRDIR= ${.CURDIR}/../../contrib/libc++/include -SRCDIR= ${.CURDIR}/../../contrib/libc++/src +_LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt +HDRDIR= ${SRCTOP}/contrib/libc++/include +SRCDIR= ${SRCTOP}/contrib/libc++/src CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} .if ${MACHINE_CPUARCH} == "arm" STATIC_CXXFLAGS+= -mlong-calls Modified: stable/11/lib/libc_nonshared/Makefile ============================================================================== --- stable/11/lib/libc_nonshared/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libc_nonshared/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -6,7 +6,7 @@ # bsd.lib.mk doesn't have an easy way to express that. MK_PROFILE?=no .include -NO_PIC= +NO_PIC= # -fpic on some platforms, -fPIC on others. CFLAGS+=${PICFLAG} -DPIC -fvisibility=hidden @@ -18,9 +18,9 @@ LIBC_NONSHARED_SRCS= SRCS= __stub.c .if ${MK_ICONV} == "yes" -.PATH: ${.CURDIR}/../libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv .include "Makefile.iconv" -CFLAGS+=-I${.CURDIR}/../libc/iconv +CFLAGS+=-I${SRCTOP}/lib/libc/iconv .endif SRCS+= ${LIBC_NONSHARED_SRCS} Modified: stable/11/lib/libcam/Makefile ============================================================================== --- stable/11/lib/libcam/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libcam/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -36,11 +36,10 @@ MLINKS+= cam.3 cam_open_device.3 \ cam_cdbparse.3 csio_encode_visit.3 \ cam_cdbparse.3 buff_encode_visit.3 -.PATH: ${.CURDIR}/../../sys/cam/scsi ${.CURDIR}/../../sys/cam/ata \ - ${.CURDIR}/../../sys/cam +.PATH: ${SRCTOP}/sys/cam/scsi ${SRCTOP}/sys/cam/ata \ + ${SRCTOP}/sys/cam -SDIR= ${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR} -I${SDIR} +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 7 Modified: stable/11/lib/libcom_err/Makefile ============================================================================== --- stable/11/lib/libcom_err/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libcom_err/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -5,7 +5,7 @@ LIB= com_err SRCS= com_err.c error.c INCS= ${COM_ERRDIR}/com_err.h ${COM_ERRDIR}/com_right.h MAN= com_err.3 -COM_ERRDIR= ${.CURDIR}/../../contrib/com_err +COM_ERRDIR= ${SRCTOP}/contrib/com_err CFLAGS+= -I${COM_ERRDIR} LDFLAGS= -Wl,--no-undefined Modified: stable/11/lib/libcompat/Makefile ============================================================================== --- stable/11/lib/libcompat/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libcompat/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ PACKAGE=lib${LIB} LIB= compat -CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale +CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${SRCTOP}/lib/libc/locale NO_PIC= WARNS?= 0 Modified: stable/11/lib/libcrypt/Makefile ============================================================================== --- stable/11/lib/libcrypt/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libcrypt/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -10,7 +10,7 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 5 LIB= crypt -.PATH: ${.CURDIR}/../libmd ${.CURDIR}/../../sys/crypto/sha2 +.PATH: ${SRCTOP}/lib/libmd ${SRCTOP}/sys/crypto/sha2 SRCS= crypt.c misc.c \ crypt-md5.c md5c.c \ crypt-nthash.c md4c.c \ @@ -18,12 +18,12 @@ SRCS= crypt.c misc.c \ crypt-sha512.c sha512c.c MAN= crypt.3 MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3 -CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \ - -I${.CURDIR}/../../sys/crypto/sha2 +CFLAGS+= -I${SRCTOP}/lib/libmd -I${SRCTOP}/lib/libutil \ + -I${SRCTOP}/sys/crypto/sha2 # Pull in the strong crypto, if it is present. -.if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no" -.PATH: ${.CURDIR}/../../secure/lib/libcrypt +.if exists(${SRCTOP}/secure/lib/libcrypt) && ${MK_CRYPT} != "no" +.PATH: ${SRCTOP}/secure/lib/libcrypt SRCS+= crypt-des.c crypt-blowfish.c blowfish.c CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH .endif Modified: stable/11/lib/libcxxrt/Makefile ============================================================================== --- stable/11/lib/libcxxrt/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libcxxrt/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE= clibs -SRCDIR= ${.CURDIR}/../../contrib/libcxxrt +SRCDIR= ${SRCTOP}/contrib/libcxxrt SHLIB_MAJOR= 1 SHLIBDIR?= /lib Modified: stable/11/lib/libdevdctl/tests/Makefile ============================================================================== --- stable/11/lib/libdevdctl/tests/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libdevdctl/tests/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -2,7 +2,7 @@ TESTSDIR= ${TESTSBASE}/lib/libdevdctl -.PATH: ${.CURDIR}/.. +.PATH: ${.CURDIR:H} PLAIN_TESTS_CXX= libdevdctl_unittest Modified: stable/11/lib/libdwarf/Makefile ============================================================================== --- stable/11/lib/libdwarf/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libdwarf/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -94,7 +94,7 @@ CLEANFILES= ${GENSRCS} CLEANDIRS= sys CFLAGS+= -I. -I${SRCDIR} -I${ELFTCDIR}/common -I${ELFTCDIR}/libelf -sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} .NOMETA +sys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA mkdir -p ${.OBJDIR}/sys ln -sf ${.ALLSRC} ${.TARGET} Modified: stable/11/lib/libelf/Makefile ============================================================================== --- stable/11/lib/libelf/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libelf/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -82,7 +82,7 @@ CLEANFILES= ${GENSRCS} CLEANDIRS= sys CFLAGS+= -I. -I${SRCDIR} -I${ELFTCDIR}/common -sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} .NOMETA +sys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA mkdir -p ${.OBJDIR}/sys ln -sf ${.ALLSRC} ${.TARGET} Modified: stable/11/lib/libevent/Makefile ============================================================================== --- stable/11/lib/libevent/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libevent/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -.PATH: ${.CURDIR}/../../contrib/pf/libevent +.PATH: ${SRCTOP}/contrib/pf/libevent .include Modified: stable/11/lib/libexecinfo/Makefile ============================================================================== --- stable/11/lib/libexecinfo/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libexecinfo/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -LIBEXECINFO= ${.CURDIR}/../../contrib/libexecinfo +LIBEXECINFO= ${SRCTOP}/contrib/libexecinfo LIB= execinfo SHLIB_MAJOR= 1 Modified: stable/11/lib/libexpat/Makefile ============================================================================== --- stable/11/lib/libexpat/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libexpat/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -EXPAT= ${.CURDIR}/../../contrib/expat +EXPAT= ${SRCTOP}/contrib/expat LIB= bsdxml SHLIBDIR?= /lib Modified: stable/11/lib/libgssapi/Makefile ============================================================================== --- stable/11/lib/libgssapi/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libgssapi/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ PACKAGE=lib${LIB} LIB= gssapi SHLIB_MAJOR= 10 -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map SRCS= Modified: stable/11/lib/libiconv_modules/Makefile.inc ============================================================================== --- stable/11/lib/libiconv_modules/Makefile.inc Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libiconv_modules/Makefile.inc Fri Feb 10 07:32:40 2017 (r313538) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv SHLIB_MAJOR= 4 WARNS?= 6 -CFLAGS+= -I${.CURDIR}/../../libc/iconv +CFLAGS+= -I${SRCTOP}/lib/libc/iconv CFLAGS+= -Dbool=_Bool Modified: stable/11/lib/libiconv_modules/mapper_parallel/Makefile ============================================================================== --- stable/11/lib/libiconv_modules/mapper_parallel/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libiconv_modules/mapper_parallel/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../mapper_serial +.PATH: ${.CURDIR:H}/mapper_serial SHLIB= mapper_parallel SRCS+= citrus_mapper_serial.c Modified: stable/11/lib/libkiconv/Makefile ============================================================================== --- stable/11/lib/libkiconv/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libkiconv/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -17,7 +17,7 @@ MLINKS+= kiconv.3 kiconv_add_xlat16_cspa kiconv.3 kiconv_add_xlat16_cspairs.3 \ kiconv.3 kiconv_add_xlat16_table.3 -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys WARNS?= 1 Modified: stable/11/lib/libldns/Makefile ============================================================================== --- stable/11/lib/libldns/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libldns/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR = ${.CURDIR}/../../contrib/ldns +LDNSDIR = ${SRCTOP}/contrib/ldns PACKAGE=lib${LIB} .PATH: ${LDNSDIR} ${LDNSDIR}/compat Modified: stable/11/lib/liblzma/Makefile ============================================================================== --- stable/11/lib/liblzma/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/liblzma/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -2,9 +2,9 @@ PACKAGE=lib${LIB} LIB= lzma -LZMADIR= ${.CURDIR}/../../contrib/xz/src/liblzma +LZMADIR= ${SRCTOP}/contrib/xz/src/liblzma -.PATH: ${LZMADIR}/../common +.PATH: ${LZMADIR:H}/common SRCS+= tuklib_physmem.c tuklib_cpucores.c .PATH: ${LZMADIR}/api/lzma @@ -145,7 +145,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/lzma \ -I${LZMADIR}/delta \ -I${LZMADIR}/simple \ - -I${LZMADIR}/../common + -I${LZMADIR:H}/common LIBADD+= pthread Modified: stable/11/lib/libmagic/Makefile ============================================================================== --- stable/11/lib/libmagic/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libmagic/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -2,7 +2,7 @@ # Copyright (c) David E. O'Brien, 2000-2004, 2006, 2009 PACKAGE=lib${LIB} -CONTRDIR= ${.CURDIR}/../../contrib/file +CONTRDIR= ${SRCTOP}/contrib/file .PATH: ${CONTRDIR}/src .PATH: ${CONTRDIR}/doc Modified: stable/11/lib/libmd/Makefile ============================================================================== --- stable/11/lib/libmd/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libmd/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -78,11 +78,11 @@ CLEANFILES+= md[245]hl.c md[245].ref md[ # in which case: # * macros are used to rename symbols to libcrypt internal names # * no weak aliases are generated -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys/crypto/sha2 -CFLAGS+= -I${.CURDIR}/../../sys/crypto/skein +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2 +CFLAGS+= -I${SRCTOP}/sys/crypto/skein CFLAGS+= -DWEAK_REFS -.PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 -.PATH: ${.CURDIR}/../../sys/crypto/skein ${.CURDIR}/../../sys/crypto/skein/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 +.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} .if exists(${MACHINE_ARCH}/sha.S) SRCS+= sha.S Modified: stable/11/lib/libmilter/Makefile ============================================================================== --- stable/11/lib/libmilter/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libmilter/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ .include PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libmilter ${SENDMAIL_DIR}/libsm CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. Modified: stable/11/lib/libmp/Makefile ============================================================================== --- stable/11/lib/libmp/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libmp/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -10,9 +10,9 @@ MAN= libmp.3 INCS= mp.h SRCS= mpasbn.c -CFLAGS+= -I${.CURDIR}/../../crypto +CFLAGS+= -I${SRCTOP}/crypto -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" Modified: stable/11/lib/libngatm/Makefile ============================================================================== --- stable/11/lib/libngatm/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libngatm/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -8,8 +8,8 @@ SHLIB_MAJOR= 4 MAN= libngatm.3 uniaddr.3 unifunc.3 unimsg.3 unisap.3 unistruct.3 # source of the library lives in contrib -SDIR= ${.CURDIR}/../../sys -CTRB= ${.CURDIR}/../../contrib/ngatm +SDIR= ${SRCTOP}/sys +CTRB= ${SRCTOP}/contrib/ngatm LIBBASE= ${SDIR}/contrib/ngatm CFLAGS+= -I${LIBBASE} -I${.OBJDIR} -I${CTRB}/libngatm Modified: stable/11/lib/libnv/Makefile ============================================================================== --- stable/11/lib/libnv/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libnv/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -8,8 +8,8 @@ SHLIBDIR?= /lib LIB= nv SHLIB_MAJOR= 0 -.PATH: ${.CURDIR}/../../sys/contrib/libnv ${.CURDIR}/../../sys/sys -CFLAGS+=-I${.CURDIR}/../../sys -I${.CURDIR} +.PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys +CFLAGS+=-I${SRCTOP}/sys -I${.CURDIR} SRCS= dnvlist.c SRCS+= msgio.c Modified: stable/11/lib/libopie/Makefile ============================================================================== --- stable/11/lib/libopie/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libopie/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ # $FreeBSD$ # PACKAGE=lib${LIB} -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie DIST_DIR= ${OPIE_DIST}/${.CURDIR:T} SHLIB_MAJOR= 8 Modified: stable/11/lib/libpam/libpam/Makefile ============================================================================== --- stable/11/lib/libpam/libpam/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpam/libpam/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -36,7 +36,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -OPENPAM= ${.CURDIR}/../../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man # static_libpam will build libpam.a Modified: stable/11/lib/libpam/modules/Makefile.inc ============================================================================== --- stable/11/lib/libpam/modules/Makefile.inc Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpam/modules/Makefile.inc Fri Feb 10 07:32:40 2017 (r313538) @@ -1,11 +1,11 @@ # $FreeBSD$ -PAMDIR= ${.CURDIR}/../../../../contrib/openpam +PAMDIR= ${SRCTOP}/contrib/openpam MK_INSTALLLIB= no MK_PROFILE= no -CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam +CFLAGS+= -I${PAMDIR}/include -I${SRCTOP}/lib/libpam SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR} LIBADD+= pam Modified: stable/11/lib/libpam/modules/pam_passwdqc/Makefile ============================================================================== --- stable/11/lib/libpam/modules/pam_passwdqc/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpam/modules/pam_passwdqc/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../../../contrib/pam_modules/pam_passwdqc +SRCDIR= ${SRCTOP}/contrib/pam_modules/pam_passwdqc .PATH: ${SRCDIR} LIB= pam_passwdqc Modified: stable/11/lib/libpam/modules/pam_ssh/Makefile ============================================================================== --- stable/11/lib/libpam/modules/pam_ssh/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpam/modules/pam_ssh/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # PAM module for SSH # $FreeBSD$ -SSHDIR= ${.CURDIR}/../../../../crypto/openssh +SSHDIR= ${SRCTOP}/crypto/openssh LIB= pam_ssh MAN= pam_ssh.8 Modified: stable/11/lib/libpam/static_libpam/Makefile ============================================================================== --- stable/11/lib/libpam/static_libpam/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpam/static_libpam/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -35,7 +35,7 @@ # # $FreeBSD$ -.PATH: ${.CURDIR}/../libpam +.PATH: ${SRCTOP}/lib/libpam # Only build the static library. LIB= pam @@ -66,4 +66,4 @@ CLEANFILES+= openpam_static.o \ openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} -.include "${.CURDIR}/../libpam/Makefile" +.include "${.CURDIR:H}/libpam/Makefile" Modified: stable/11/lib/libpcap/Makefile ============================================================================== --- stable/11/lib/libpcap/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpcap/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -114,7 +114,7 @@ SHLIB_MAJOR= 8 # # Magic to grab sources out of src/contrib # -PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap +PCAP_DISTDIR?=${SRCTOP}/contrib/libpcap CFLAGS+=-I${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR}/bpf/net Modified: stable/11/lib/libpe/Makefile ============================================================================== --- stable/11/lib/libpe/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libpe/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ INTERNALLIB= -ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain +ELFTCDIR= ${SRCTOP}/contrib/elftoolchain .PATH: ${ELFTCDIR}/libpe Modified: stable/11/lib/libproc/Makefile ============================================================================== --- stable/11/lib/libproc/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libproc/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -29,9 +29,9 @@ LIBADD+= elf rtld_db util .if ${MK_CDDL} != "no" LIBADD+= ctf IGNORE_PRAGMA= YES -CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \ - -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \ - -I${.CURDIR}/../../sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common \ + -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common \ + -I${SRCTOP}/sys/cddl/compat/opensolaris .else CFLAGS+= -DNO_CTF .endif Modified: stable/11/lib/libprocstat/zfs/Makefile ============================================================================== --- stable/11/lib/libprocstat/zfs/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libprocstat/zfs/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,21 +1,21 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/.. +.PATH: ${.CURDIR:H} SRCS= zfs.c OBJS= zfs.o WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/.. +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${.CURDIR:H} CFLAGS+= -DNEED_SOLARIS_BOOLEAN all: ${OBJS} Modified: stable/11/lib/librpcsec_gss/Makefile ============================================================================== --- stable/11/lib/librpcsec_gss/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/librpcsec_gss/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -8,11 +8,11 @@ SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rp LIBADD= gssapi -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -I${.CURDIR}/../../include -CFLAGS+= -I${.CURDIR}/../../libc_rpc +CFLAGS+= -I${SRCTOP}/include +CFLAGS+= -I${SRCTOP}/lib/libc_rpc MK_PROFILE= no MAN= rpcsec_gss.3 Modified: stable/11/lib/librpcsvc/Makefile ============================================================================== --- stable/11/lib/librpcsvc/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/librpcsvc/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../include/rpcsvc +.PATH: ${SRCTOP}/include/rpcsvc PACKAGE=lib${LIB} LIB= rpcsvc Modified: stable/11/lib/librt/Makefile ============================================================================== --- stable/11/lib/librt/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/librt/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -5,7 +5,7 @@ PACKAGE=lib${LIB} LIB=rt SHLIB_MAJOR= 1 -CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR} +CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND CFLAGS+=-fexceptions .endif @@ -18,7 +18,7 @@ SRCS+= aio.c mq.c sigev_thread.c timer.c PRECIOUSLIB= -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" Modified: stable/11/lib/libsbuf/Makefile ============================================================================== --- stable/11/lib/libsbuf/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsbuf/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -10,6 +10,6 @@ SHLIB_MAJOR = 6 SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_DEF= ${.CURDIR}/Version.def -.PATH: ${.CURDIR}/../../sys/kern +.PATH: ${SRCTOP}/sys/kern .include Modified: stable/11/lib/libsm/Makefile ============================================================================== --- stable/11/lib/libsm/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsm/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ .include PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsm CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. Modified: stable/11/lib/libsmb/Makefile ============================================================================== --- stable/11/lib/libsmb/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsmb/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -3,7 +3,7 @@ .include PACKAGE=lib${LIB} -CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs +CONTRIBDIR= ${SRCTOP}/contrib/smbfs .PATH: ${CONTRIBDIR}/lib/smb LIB= smb Modified: stable/11/lib/libsmdb/Makefile ============================================================================== --- stable/11/lib/libsmdb/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsmdb/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmdb CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. Modified: stable/11/lib/libsmutil/Makefile ============================================================================== --- stable/11/lib/libsmutil/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsmutil/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=lib${LIB} -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmutil CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. Modified: stable/11/lib/libsqlite3/Makefile ============================================================================== --- stable/11/lib/libsqlite3/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsqlite3/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -8,7 +8,7 @@ LIBADD+= pthread SRCS= sqlite3.c -SQLITE= ${.CURDIR}/../../contrib/sqlite3 +SQLITE= ${SRCTOP}/contrib/sqlite3 .PATH: ${SQLITE} WARNS= 3 Modified: stable/11/lib/libstdthreads/Makefile ============================================================================== --- stable/11/lib/libstdthreads/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libstdthreads/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -35,7 +35,7 @@ MLINKS= thrd_create.3 call_once.3 \ LIBADD= pthread -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .include Modified: stable/11/lib/libsysdecode/Makefile ============================================================================== --- stable/11/lib/libsysdecode/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libsysdecode/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -9,8 +9,8 @@ SRCS= errno.c flags.c ioctl.c signal.c s INCS= sysdecode.h CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR}/../../libexec/rtld-elf +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/libexec/rtld-elf MAN= sysdecode.3 \ sysdecode_abi_to_freebsd_errno.3 \ Modified: stable/11/lib/libtelnet/Makefile ============================================================================== --- stable/11/lib/libtelnet/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libtelnet/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -4,7 +4,7 @@ .include PACKAGE=lib${LIB} -TELNETDIR= ${.CURDIR}/../../contrib/telnet +TELNETDIR= ${SRCTOP}/contrib/telnet .PATH: ${TELNETDIR}/libtelnet LIB= telnet Modified: stable/11/lib/libthr/Makefile ============================================================================== --- stable/11/lib/libthr/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libthr/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -18,13 +18,13 @@ LIB=thr SHLIB_MAJOR= 3 WARNS?= 3 CFLAGS+=-DPTHREAD_KERNEL -CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ - -I${.CURDIR}/../../include +CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ + -I${SRCTOP}/include CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} -CFLAGS+=-I${.CURDIR}/../libthread_db +CFLAGS+=-I${SRCTOP}/libexec/rtld-elf +CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH} +CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS+=-Winline .ifndef NO_THREAD_UNWIND_STACK @@ -34,7 +34,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND LDFLAGS+=-Wl,-znodelete -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map MAN= libthr.3 Modified: stable/11/lib/libthr/support/Makefile.inc ============================================================================== --- stable/11/lib/libthr/support/Makefile.inc Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libthr/support/Makefile.inc Fri Feb 10 07:32:40 2017 (r313538) @@ -1,15 +1,15 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string +.PATH: ${.CURDIR}/support ${SRCTOP}/lib/libc/gen ${SRCTOP}/lib/libc/string # libc must search machine_arch, then machine_cpuarch, but libthr has all its # code implemented in machine_cpuarch. Cope. -.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys) -.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} +.if exists(${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys) +.PATH: ${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys +CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_ARCH} .else -.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} +.PATH: ${SRCTOP}/lib/libc/${MACHINE_CPUARCH}/sys +CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_CPUARCH} .endif SYSCALLS= thr_new Modified: stable/11/lib/libthread_db/Makefile ============================================================================== --- stable/11/lib/libthread_db/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libthread_db/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -15,7 +15,7 @@ CFLAGS+=-I. -I${.CURDIR} SYM_MAPS+=${.CURDIR}/Symbol.map SYMBOL_MAPS=${SYM_MAPS} -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def # Unfortunately, clang gives an incorrect warning about alignment in # arch/i386/libpthread_md.c, so turn that off for now. Modified: stable/11/lib/libufs/Makefile ============================================================================== --- stable/11/lib/libufs/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libufs/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -18,7 +18,7 @@ MLINKS+= ufs_disk_close.3 ufs_disk_fillo MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3 MLINKS+= ufs_disk_close.3 ufs_disk_write.3 -.PATH: ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCTOP}/sys/ufs/ffs WARNS?= 2 Modified: stable/11/lib/libulog/Makefile ============================================================================== --- stable/11/lib/libulog/Makefile Fri Feb 10 07:22:12 2017 (r313537) +++ stable/11/lib/libulog/Makefile Fri Feb 10 07:32:40 2017 (r313538) @@ -22,7 +22,7 @@ MLINKS+=ulog_login.3 ulog_login_pseudo.3 LIBADD= md -VERSION_DEF= ${.CURDIR}/../libc/Versions.def *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 10 07:38:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BCDBCD1E7E; Fri, 10 Feb 2017 07:38:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 478901778; Fri, 10 Feb 2017 07:38:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7cdiH026915; Fri, 10 Feb 2017 07:38:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7cdjJ026914; Fri, 10 Feb 2017 07:38:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100738.v1A7cdjJ026914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313539 - stable/11/lib/libc/x86/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:38:40 -0000 Author: ngie Date: Fri Feb 10 07:38:39 2017 New Revision: 313539 URL: https://svnweb.freebsd.org/changeset/base/313539 Log: MFC r312418,r312422: r312418: Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV The effect at runtime is negligible as the hyperv timer isn't available except when hyperv is loaded. This is a prerequisite for conditionalizing the header build/install out of the build r312422: Only conditionally add in hyperv support if we're building amd64 This unbreaks the build because the assembly is written for x64. Pointyhat to: ngie Modified: stable/11/lib/libc/x86/sys/Makefile.inc stable/11/lib/libc/x86/sys/__vdso_gettc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/x86/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/x86/sys/Makefile.inc Fri Feb 10 07:32:40 2017 (r313538) +++ stable/11/lib/libc/x86/sys/Makefile.inc Fri Feb 10 07:38:39 2017 (r313539) @@ -4,3 +4,7 @@ SRCS+= \ __vdso_gettc.c + +.if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" +CFLAGS+= -DWANT_HYPERV +.endif Modified: stable/11/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- stable/11/lib/libc/x86/sys/__vdso_gettc.c Fri Feb 10 07:32:40 2017 (r313538) +++ stable/11/lib/libc/x86/sys/__vdso_gettc.c Fri Feb 10 07:38:39 2017 (r313539) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __amd64__ +#ifdef WANT_HYPERV #include #endif #include "libc_private.h" @@ -158,7 +158,7 @@ __vdso_init_hpet(uint32_t u) munmap((void *)new_map, PAGE_SIZE); } -#ifdef __amd64__ +#ifdef WANT_HYPERV #define HYPERV_REFTSC_DEVPATH "/dev/" HYPERV_REFTSC_DEVNAME @@ -217,7 +217,7 @@ __vdso_hyperv_tsc(struct hyperv_reftsc * return (ENOSYS); } -#endif /* __amd64__ */ +#endif /* WANT_HYPERV */ #pragma weak __vdso_gettc int @@ -246,7 +246,7 @@ __vdso_gettc(const struct vdso_timehands return (ENOSYS); *tc = *(volatile uint32_t *)(map + HPET_MAIN_COUNTER); return (0); -#ifdef __amd64__ +#ifdef WANT_HYPERV case VDSO_TH_ALGO_X86_HVTSC: if (hyperv_ref_tsc == NULL) __vdso_init_hyperv_tsc(); From owner-svn-src-all@freebsd.org Fri Feb 10 07:42:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8232CCD82A0; Fri, 10 Feb 2017 07:42:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DCD41C53; Fri, 10 Feb 2017 07:42:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id e4so2033987pfg.0; Thu, 09 Feb 2017 23:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=k5Qgtx6U9qCVK/z6JDhMiryqiEdXrUdhvqxLo1Y/pOk=; b=syItRYAx6V2+gtbY9Y5PreRUetvGaY94W/CQNiWIx2awuozfOzkRfl72u4FJrnzLcB 5wSuE+iv7r/5iOdY0Na/txD1oOgeKsAPPiFUmOy8jYorcoJi4rZjVDDgua3LjTglghr6 CN2ghnku9PIcVOd3Ii4yQEaAemV+yW1MGkUV3/SB+kwTqTWXC0d1Jnz1vdccXj2fZfwK ZRNl9LipyT3FvzlpH1cmQs40z782DmVTcrlLBa57rMnN9i4M3IYOe45OdThAZWCT8rcc sT2b4m26+TZHiuL08mA7osR9UryL5A0ebOnqPc1Az5WAKEyJvo8rQEPsB0kFfJUpv1De /MGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=k5Qgtx6U9qCVK/z6JDhMiryqiEdXrUdhvqxLo1Y/pOk=; b=qQYFPsco5vWVpqquvCk+Ni+hYYsDgwYRDSlrxFkA/rD3+Xg9JvDxqDsW+9GrBcX/8v 1Neo4aZ0QPisDdw+rMFlbDl593J6RN5WZwJoZcsX/yOS9P1sdpqPJe6xixMdpV6v9Xn4 7e0c7ykA+7mbxUNpTm0BI7mM6syLdaEbbXK/oxJ4FWncuIpNMXGCwxh9jz93Zu7CosjG 0W2VVdYTDqIEwzM/WvGJKPCuBRis0XGuGpUlWGs2nUWVWRrd7oywEwDv7KblI0VRzgWI c2ANWVSe3HtxssCb3GYQCfR+bgLyqkBfrjX4/HfPaIV3CuyP1XRusODE8Vu7zWnDcb1u zp6A== X-Gm-Message-State: AMke39lfSm9bOoN43RbXT2EnxRaYAXxp08k25Bepe1G0akqMT9DJpgxZlIKvgsb9wmY56w== X-Received: by 10.84.217.202 with SMTP id d10mr9583416plj.53.1486712558639; Thu, 09 Feb 2017 23:42:38 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e127sm2651255pfh.89.2017.02.09.23.42.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Feb 2017 23:42:38 -0800 (PST) Subject: Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201609300823.u8U8N7ff043558@repo.freebsd.org> Date: Thu, 9 Feb 2017 23:42:36 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0AFF68F4-3304-4953-906A-DE1158CF35DC@gmail.com> References: <201609300823.u8U8N7ff043558@repo.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:42:39 -0000 --Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 30, 2016, at 01:23, Hans Petter Selasky = wrote: >=20 > Author: hselasky > Date: Fri Sep 30 08:23:06 2016 > New Revision: 306486 > URL: https://svnweb.freebsd.org/changeset/base/306486 >=20 > Log: > Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into = sys/dev/mlx4 > like other PCI network drivers. The sys/ofed directory is now mainly > reserved for generic infiniband code, with exception of the mthca = driver. >=20 > - Add new manual page, mlx4en(4), describing how to configure and = load > mlx4en. >=20 > - All relevant driver C-files are now prefixed mlx4, mlx4_en and > mlx4_ib respectivly to avoid object filename collisions when = compiling > the kernel. This also fixes an issue with proper dependency file > generation for the C-files in question. >=20 > - Device mlxen is now device mlx4en and depends on device mlx4, see > mlx4en(4). Only the network device name remains unchanged. >=20 > - The mlx4 and mlx4en modules are now built by default on i386 and > amd64 targets. Only building the mlx4ib module depends on > WITH_OFED=3DYES . >=20 > Sponsored by: Mellanox Technologies Hi Hans! I was wondering if there was a reason why this change hasn=E2=80=99= t been MFCed =E2=80=A6 I noticed this because the mlx4en(4) manpage is = tied to this commit. Thanks! -Ngie --Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D 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 iQIcBAEBCgAGBQJYnW7tAAoJEPWDqSZpMIYViU4P/iy91ZdEEy0P5RnhO9Inht3f EgX+yDOvyFWl4VfZeCDchmjBFQh2yQlVKDNhNn47INSWlo7rtVKZ+KdOXt8q6QfK gBJFu0jCF1qI/8jeoZ2UFM3mwh+n4nnaL4pS45yRJFhtCxdC6EMAk1HkCtWVk9c/ iFSWtTPmOlxI9b7jgpj72hCqgFOXk0m3xpwhLVTlQSEVJIMNIzBf25agQHr4AqMs KmxQitwlpPhniANirgO/h7SubLaJjGFsMd8oeVmirrDpnOmURPiylugSdwP4rAQO o4ACprVHGBMV4xHw45hcu2bnrJ0+M29LlHMGXxQYaXggZRfn0iP7Decz3W/3fPEs I7T8EliebbybN5UBkWwysI1bErL1d8aGmhoHdF24jdsKxVeSVVTnvlmORhMfWkOU cGLV9GpZrAldxoXGq0axyesft57QEAo72uP6DFiw2toB1BEFaVDpazPuDHZ0lRTU aykdgRaUr3sTzlNs6JfnZc0p1HD5C/Yz2RcEE4yfd2XCqax7gpZZPWWq0TN4Pg36 TZLO8FJh1tNoghb8kkHjKzXIwHDDfB8L3fLc0tpR3zAOackI7j7YxDAV8SP9UqOR nMJgxg8YAgFkm/Kstk6yptMtSqbm4TEH5Zj/tS79CuT0E1mjz9CLPaOOducmAXQz Fqdf9+IPqcTmssQ1ztZ4 =3DJ5 -----END PGP SIGNATURE----- --Apple-Mail=_CCD8119E-A0BE-4F4E-91E6-5F4FFDF1711D-- From owner-svn-src-all@freebsd.org Fri Feb 10 07:55:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6944BCD84FA; Fri, 10 Feb 2017 07:55:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27BC612D; Fri, 10 Feb 2017 07:55:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7teAL035354; Fri, 10 Feb 2017 07:55:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7teb0035352; Fri, 10 Feb 2017 07:55:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100755.v1A7teb0035352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313540 - stable/11/usr.bin/cut/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:55:41 -0000 Author: ngie Date: Fri Feb 10 07:55:39 2017 New Revision: 313540 URL: https://svnweb.freebsd.org/changeset/base/313540 Log: MFC r312523: Add some basic -s flag testcases for cut(1) The remaining functionality seems to be covered in one form or another via the NetBSD ATF testcase. Added: stable/11/usr.bin/cut/tests/cut2_test.sh - copied unchanged from r312523, head/usr.bin/cut/tests/cut2_test.sh Modified: stable/11/usr.bin/cut/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/cut/tests/Makefile ============================================================================== --- stable/11/usr.bin/cut/tests/Makefile Fri Feb 10 07:38:39 2017 (r313539) +++ stable/11/usr.bin/cut/tests/Makefile Fri Feb 10 07:55:39 2017 (r313540) @@ -2,6 +2,7 @@ PACKAGE= tests +ATF_TESTS_SH+= cut2_test NETBSD_ATF_TESTS_SH= cut_test ${PACKAGE}FILES= d_basic.out Copied: stable/11/usr.bin/cut/tests/cut2_test.sh (from r312523, head/usr.bin/cut/tests/cut2_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/cut/tests/cut2_test.sh Fri Feb 10 07:55:39 2017 (r313540, copy of r312523, head/usr.bin/cut/tests/cut2_test.sh) @@ -0,0 +1,51 @@ +# +# Copyright (c) 2017 Dell EMC +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Check -s flag" +} + +s_flag_body() +{ + cat >input< Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF7E1CD85D0; Fri, 10 Feb 2017 07:57:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01042D5; Fri, 10 Feb 2017 07:57:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7vEjA035576; Fri, 10 Feb 2017 07:57:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7vESI035575; Fri, 10 Feb 2017 07:57:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100757.v1A7vESI035575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313541 - stable/11/sys/modules/ath X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:57:16 -0000 Author: ngie Date: Fri Feb 10 07:57:14 2017 New Revision: 313541 URL: https://svnweb.freebsd.org/changeset/base/313541 Log: MFC r312513: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/11/sys/modules/ath/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/ath/Makefile ============================================================================== --- stable/11/sys/modules/ath/Makefile Fri Feb 10 07:55:39 2017 (r313540) +++ stable/11/sys/modules/ath/Makefile Fri Feb 10 07:57:14 2017 (r313541) @@ -31,8 +31,8 @@ ATH_RATE?= sample # tx rate control algorithm -.PATH: ${.CURDIR}/../../dev/ath -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal KMOD= if_ath SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c @@ -46,7 +46,7 @@ SRCS+= device_if.h bus_if.h pci_if.h opt # # AR5210 support; these are first generation 11a-only devices. # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5210 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5210 SRCS+= ah_eeprom_v1.c \ ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \ ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \ @@ -56,7 +56,7 @@ SRCS+= ah_eeprom_v1.c \ # AR5211 support; these are second generation 11b/g/a devices # (but 11g was OFDM only and is not supported). # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5211 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5211 SRCS+= ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ ar5211_keycache.c ar5211_misc.c ar5211_phy.c ar5211_power.c \ ar5211_recv.c ar5211_reset.c ar5211_xmit.c @@ -64,7 +64,7 @@ SRCS+= ar5211_attach.c ar5211_beacon.c a # # AR5212 support; this covers all other pci/cardbus legacy parts. # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5212 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5212 SRCS+= ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \ ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \ @@ -85,7 +85,7 @@ SRCS+= ar5413.c # NB: 9160 depends on 5416 but 5416 does not require 9160 # # + 5416 (Owl) -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5416 SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \ ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ @@ -97,7 +97,7 @@ SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ SRCS+= ar2133.c # + AR9160 (Sowl) -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9001 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9001 SRCS+= ar9160_attach.c # + AR9130 - (Sowl) - Embedded (AR913x SoC) @@ -111,7 +111,7 @@ SRCS+= ar9130_attach.c ar9130_eeprom.c a # AR9002 series chips # + AR9220/AR9280 - Merlin -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9002 SRCS+= ar9280.c ar9280_attach.c ar9280_olc.c # + AR9285 - Kite @@ -119,13 +119,13 @@ SRCS+= ar9285.c ar9285_reset.c ar9285_at SRCS+= ar9285_diversity.c ar9285_btcoex.c # + AR9287 - Kiwi -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal SRCS+= ah_eeprom_9287.c -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9002 SRCS+= ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c # + AR9300 HAL -.PATH: ${.CURDIR}/../../contrib/dev/ath/ath_hal/ar9300 +.PATH: ${SRCTOP}/sys/contrib/dev/ath/ath_hal/ar9300 SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c @@ -135,22 +135,22 @@ SRCS+= ar9300_power.c ar9300_timer.c ar9 # NB: rate control is bound to the driver by symbol names so only pick one .if ${ATH_RATE} == "sample" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/sample +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/sample SRCS+= sample.c .elif ${ATH_RATE} == "onoe" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/onoe +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/onoe SRCS+= onoe.c .elif ${ATH_RATE} == "amrr" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/amrr +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/amrr SRCS+= amrr.c .endif # DFS -.PATH: ${.CURDIR}/../../dev/ath/ath_dfs/null +.PATH: ${SRCTOP}/sys/dev/ath/ath_dfs/null SRCS+= dfs_null.c -CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal -CFLAGS+= -I. -I${.CURDIR}/../../contrib/dev/ath/ath_hal/ +CFLAGS+= -I. -I${SRCTOP}/sys/dev/ath -I${SRCTOP}/sys/dev/ath/ath_hal +CFLAGS+= -I. -I${SRCTOP}/sys/contrib/dev/ath/ath_hal/ .if !defined(KERNBUILDDIR) opt_ah.h: From owner-svn-src-all@freebsd.org Fri Feb 10 07:58:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C7B5CD86DB; Fri, 10 Feb 2017 07:58:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BA9B6BF; Fri, 10 Feb 2017 07:58:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7wjL8035777; Fri, 10 Feb 2017 07:58:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7wjxl035776; Fri, 10 Feb 2017 07:58:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100758.v1A7wjxl035776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313542 - stable/11/gnu/usr.bin/gdb/gdbserver X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:58:46 -0000 Author: ngie Date: Fri Feb 10 07:58:45 2017 New Revision: 313542 URL: https://svnweb.freebsd.org/changeset/base/313542 Log: MFC r312514: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/11/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/11/gnu/usr.bin/gdb/gdbserver/Makefile Fri Feb 10 07:57:14 2017 (r313541) +++ stable/11/gnu/usr.bin/gdb/gdbserver/Makefile Fri Feb 10 07:58:45 2017 (r313542) @@ -3,7 +3,7 @@ # Not elf specific so don't install in /usr/libexec/elf BINDIR=/usr/bin -GDBDIR= ${.CURDIR}/../../../../contrib/gdb +GDBDIR= ${SRCTOP}/contrib/gdb .PATH: ${GDBDIR}/gdb/signals .PATH: ${GDBDIR}/gdb/gdbserver .PATH: ${GDBDIR}/gdb From owner-svn-src-all@freebsd.org Fri Feb 10 07:59:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5D03CD87CA; Fri, 10 Feb 2017 07:59:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82743862; Fri, 10 Feb 2017 07:59:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7xfJG035873; Fri, 10 Feb 2017 07:59:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7xf94035872; Fri, 10 Feb 2017 07:59:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100759.v1A7xf94035872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313543 - stable/11/usr.bin/sed/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 07:59:42 -0000 Author: ngie Date: Fri Feb 10 07:59:41 2017 New Revision: 313543 URL: https://svnweb.freebsd.org/changeset/base/313543 Log: MFC r312520: Integrate contrib/netbsd-tests/usr.bin/sed/t_sed.sh into the FreeBSD test suite as usr.bin/sed/sed_test Don't expect :emptybackref to fail -- it succeeds on FreeBSD Modified: stable/11/usr.bin/sed/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sed/tests/Makefile ============================================================================== --- stable/11/usr.bin/sed/tests/Makefile Fri Feb 10 07:58:45 2017 (r313542) +++ stable/11/usr.bin/sed/tests/Makefile Fri Feb 10 07:59:41 2017 (r313543) @@ -2,11 +2,15 @@ PACKAGE= tests +NETBSD_ATF_TESTS_SH+= sed_test TAP_TESTS_SH= legacy_test TAP_TESTS_SH+= multi_test TEST_METADATA.multi_test+= required_files="/usr/share/dict/words" TAP_TESTS_SH+= inplace_race_test +ATF_TESTS_SH_SED_sed_test+= -e 's,atf_expect_fail "PR bin/28126",,g' +${PACKAGE}FILES+= d_c2048.in + ${PACKAGE}FILES+= hanoi.sed ${PACKAGE}FILES+= math.sed ${PACKAGE}FILES+= regress.G.out @@ -35,4 +39,5 @@ ${PACKAGE}FILES+= regress.y.out SUBDIR= regress.multitest.out +.include .include From owner-svn-src-all@freebsd.org Fri Feb 10 08:51:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1661CD969E; Fri, 10 Feb 2017 08:51:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E1351F9A; Fri, 10 Feb 2017 08:51:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7AD9E1FE104; Fri, 10 Feb 2017 09:50:59 +0100 (CET) Subject: Re: svn commit: r306486 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/mlx4 sys/dev/mlx4/mlx4_core sys/dev/mlx4/mlx4_en sys/dev/mlx4/mlx4_ib sys/i386/conf sys/modules sys/modules/mlx4 sys/mo... To: "Ngie Cooper (yaneurabeya)" References: <201609300823.u8U8N7ff043558@repo.freebsd.org> <0AFF68F4-3304-4953-906A-DE1158CF35DC@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <8d3dc85f-dfbf-97c6-3169-29dc53364b18@selasky.org> Date: Fri, 10 Feb 2017 09:50:24 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <0AFF68F4-3304-4953-906A-DE1158CF35DC@gmail.com> 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 08:51:06 -0000 On 02/10/17 08:42, Ngie Cooper (yaneurabeya) wrote: > >> On Sep 30, 2016, at 01:23, Hans Petter Selasky wrote: >> >> Author: hselasky >> Date: Fri Sep 30 08:23:06 2016 >> New Revision: 306486 >> URL: https://svnweb.freebsd.org/changeset/base/306486 >> >> Log: >> Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 >> like other PCI network drivers. The sys/ofed directory is now mainly >> reserved for generic infiniband code, with exception of the mthca driver. >> >> - Add new manual page, mlx4en(4), describing how to configure and load >> mlx4en. >> >> - All relevant driver C-files are now prefixed mlx4, mlx4_en and >> mlx4_ib respectivly to avoid object filename collisions when compiling >> the kernel. This also fixes an issue with proper dependency file >> generation for the C-files in question. >> >> - Device mlxen is now device mlx4en and depends on device mlx4, see >> mlx4en(4). Only the network device name remains unchanged. >> >> - The mlx4 and mlx4en modules are now built by default on i386 and >> amd64 targets. Only building the mlx4ib module depends on >> WITH_OFED=YES . >> >> Sponsored by: Mellanox Technologies > > Hi Hans! > I was wondering if there was a reason why this change hasn’t been MFCed … I noticed this because the mlx4en(4) manpage is tied to this commit. No, except for making integration more difficult for people that use SVN. Which branches do you wish this MFC'ed to? --HPS From owner-svn-src-all@freebsd.org Fri Feb 10 09:31:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A58A2CD8344; Fri, 10 Feb 2017 09:31:43 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7416515F0; Fri, 10 Feb 2017 09:31:43 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A9VgaG077269; Fri, 10 Feb 2017 09:31:42 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A9VdHH077236; Fri, 10 Feb 2017 09:31:39 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201702100931.v1A9VdHH077236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Fri, 10 Feb 2017 09:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313544 - head/usr.bin/indent/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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 09:31:43 -0000 Author: pstef Date: Fri Feb 10 09:31:39 2017 New Revision: 313544 URL: https://svnweb.freebsd.org/changeset/base/313544 Log: indent(1): add regression test cases These examples show expected behavior of indent(1). They are meant to be used together with a regression test mechanism, either Kyua, a Makefile or perhaps something else. The mechanism should in essence do this: indent -P${test}.pro < ${test}.0 > ${test}.0.run and compare ${test}.0.stdout to ${test}.0.run. If the files differ or the exit status isn't 0, the test failed. * ${test}.pro is an indent(1) profile: a list of options passed through a file. The program doesn't complain if the file doesn't exist. * ${test}.0 is a C source file which acts as input for indent(1). It doesn't have to have any particular formatting, since it's the output that matters. * ${test}.0.stdout contains expected output. It doesn't have to be formatted in Kernel Normal Form as the point of the tests is to check for regressions in the program and not to check that it always produces KNF. Reviewed by: ngie Approved by: pfg (mentor) Differential Revision: https://reviews.freebsd.org/D9007 Added: head/usr.bin/indent/tests/ head/usr.bin/indent/tests/comments.0 (contents, props changed) head/usr.bin/indent/tests/comments.0.stdout (contents, props changed) head/usr.bin/indent/tests/declarations.0 (contents, props changed) head/usr.bin/indent/tests/declarations.0.stdout (contents, props changed) head/usr.bin/indent/tests/elsecomment.0 (contents, props changed) head/usr.bin/indent/tests/elsecomment.0.stdout (contents, props changed) head/usr.bin/indent/tests/elsecomment.pro (contents, props changed) head/usr.bin/indent/tests/float.0 (contents, props changed) head/usr.bin/indent/tests/float.0.stdout (contents, props changed) head/usr.bin/indent/tests/label.0 (contents, props changed) head/usr.bin/indent/tests/label.0.stdout (contents, props changed) head/usr.bin/indent/tests/label.pro (contents, props changed) head/usr.bin/indent/tests/list_head.0 (contents, props changed) head/usr.bin/indent/tests/list_head.0.stdout (contents, props changed) head/usr.bin/indent/tests/nsac.0 (contents, props changed) head/usr.bin/indent/tests/nsac.0.stdout (contents, props changed) head/usr.bin/indent/tests/nsac.pro (contents, props changed) head/usr.bin/indent/tests/offsetof.0 (contents, props changed) head/usr.bin/indent/tests/offsetof.0.stdout (contents, props changed) head/usr.bin/indent/tests/sac.0 (contents, props changed) head/usr.bin/indent/tests/sac.0.stdout (contents, props changed) head/usr.bin/indent/tests/sac.pro (contents, props changed) head/usr.bin/indent/tests/struct.0 (contents, props changed) head/usr.bin/indent/tests/struct.0.stdout (contents, props changed) head/usr.bin/indent/tests/surplusbad.0 (contents, props changed) head/usr.bin/indent/tests/surplusbad.0.stdout (contents, props changed) head/usr.bin/indent/tests/surplusbad.pro (contents, props changed) head/usr.bin/indent/tests/types_from_file.0 (contents, props changed) head/usr.bin/indent/tests/types_from_file.0.stdout (contents, props changed) head/usr.bin/indent/tests/types_from_file.list (contents, props changed) head/usr.bin/indent/tests/types_from_file.pro (contents, props changed) head/usr.bin/indent/tests/wchar.0 (contents, props changed) head/usr.bin/indent/tests/wchar.0.stdout (contents, props changed) Added: head/usr.bin/indent/tests/comments.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/comments.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,25 @@ +/* $FreeBSD$ */ +/* See r303597, r303598, r309219, and r309343 */ +void t(void) { + /* + * Old indent wrapped the URL near where this sentence ends. + * + * https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html + */ + + /* + * Old indent did not wrap to column 78 + * + * aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj kk + */ + + /* + * Old indent unnecessarily removed the star comment continuation on the next line. + * + * *test* + */ + + /* r309219 Go through linked list, freeing from the malloced (t[-1]) address. */ + + /* r309343 */ +} Added: head/usr.bin/indent/tests/comments.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/comments.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,32 @@ +/* $FreeBSD$ */ +/* See r303597, r303598, r309219, and r309343 */ +void +t(void) +{ + /* + * Old indent wrapped the URL near where this sentence ends. + * + * https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html + */ + + /* + * Old indent did not wrap to column 78 + * + * aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj + * kk + */ + + /* + * Old indent unnecessarily removed the star comment continuation on + * the next line. + * + * *test* + */ + + /* + * r309219 Go through linked list, freeing from the malloced (t[-1]) + * address. + */ + + /* r309343 */ +} Added: head/usr.bin/indent/tests/declarations.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/declarations.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,21 @@ +/* $FreeBSD$ */ +/* See r303570 */ +void t(void) { + int a, + b, + c; + int + *d, + *e, + *f; + int (*g)(), + (*h)(), + (*i)(); + int j, + k, + l; + int m + ,n + ,o + ; +} Added: head/usr.bin/indent/tests/declarations.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/declarations.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,15 @@ +/* $FreeBSD$ */ +/* See r303570 */ +void +t(void) +{ + int a, b, c; + int + *d, *e, *f; + int (*g) (), (*h) (), (*i) (); + int j, k, l; + int m + ,n + ,o + ; +} Added: head/usr.bin/indent/tests/elsecomment.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/elsecomment.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,18 @@ +/* $FreeBSD$ */ +/* See r303484 and r309342 */ +void t(void) { + if (0) { + + } /* Old indent would remove the following blank line */ + + /* + * test + */ + + if (1) + ; + else /* Old indent would get very confused here */ + { + + } +} Added: head/usr.bin/indent/tests/elsecomment.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/elsecomment.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,22 @@ +/* $FreeBSD$ */ +/* See r303484 and r309342 */ +void +t(void) +{ + if (0) + { + + } /* Old indent would remove the following + * blank line */ + + /* + * test + */ + + if (1) + ; + else /* Old indent would get very confused here */ + { + + } +} Added: head/usr.bin/indent/tests/elsecomment.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/elsecomment.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-bl Added: head/usr.bin/indent/tests/float.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/float.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +/* See r303499 */ +void t(void) { + unsigned long x = 314UL; + float y = 3.14f; +} Added: head/usr.bin/indent/tests/float.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/float.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ +/* See r303499 */ +void +t(void) +{ + unsigned long x = 314UL; + float y = 3.14f; +} Added: head/usr.bin/indent/tests/label.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/label.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,13 @@ +/* $FreeBSD$ */ +/* See r303489 */ +void t(void) { + switch (1) + { + case 1: /* test */ + case 2: /* test */ + } +CLEANUP: + ; +V: ; +U: ; +} Added: head/usr.bin/indent/tests/label.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/label.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,14 @@ +/* $FreeBSD$ */ +/* See r303489 */ +void +t(void) +{ + switch (1) { + case 1: /* test */ + case 2: /* test */ + } +CLEANUP: + ; +V: ; +U: ; +} Added: head/usr.bin/indent/tests/label.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/label.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-nut Added: head/usr.bin/indent/tests/list_head.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/list_head.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,16 @@ +/* $FreeBSD$ */ +/* See r309380 */ +static int +do_execve(td, args, mac_p) + struct thread *td; + struct image_args *args; + struct mac *mac_p; +{ + +} + +static LIST_HEAD(, alq) ald_active; +static int ald_shuttingdown = 0; +struct thread *ald_thread; + + Added: head/usr.bin/indent/tests/list_head.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/list_head.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,14 @@ +/* $FreeBSD$ */ +/* See r309380 */ +static int +do_execve(td, args, mac_p) + struct thread *td; + struct image_args *args; + struct mac *mac_p; +{ + +} + +static LIST_HEAD(, alq) ald_active; +static int ald_shuttingdown = 0; +struct thread *ald_thread; Added: head/usr.bin/indent/tests/nsac.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/nsac.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +void t(void) { + int a = (double) 8; +} Added: head/usr.bin/indent/tests/nsac.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/nsac.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +void +t(void) +{ + int a = (double)8; +} Added: head/usr.bin/indent/tests/nsac.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/nsac.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-nsac Added: head/usr.bin/indent/tests/offsetof.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/offsetof.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,5 @@ +/* $FreeBSD$ */ +/* See r303718 */ +void t(void) { + int n = malloc(offsetof(struct s, f) + 1); +} Added: head/usr.bin/indent/tests/offsetof.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/offsetof.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +/* See r303718 */ +void +t(void) +{ + int n = malloc(offsetof(struct s, f) + 1); +} Added: head/usr.bin/indent/tests/sac.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/sac.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +void t(void) { + int a = (double) 8; +} Added: head/usr.bin/indent/tests/sac.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/sac.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +void +t(void) +{ + int a = (double) 8; +} Added: head/usr.bin/indent/tests/sac.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/sac.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-sac Added: head/usr.bin/indent/tests/struct.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/struct.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,13 @@ +/* $FreeBSD$ */ +/* See r303485 */ +void +t(void) +{ + static const struct { + int a; + int b; + } c[] = { + { D, E }, + { F, G } + }; +} Added: head/usr.bin/indent/tests/struct.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/struct.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,13 @@ +/* $FreeBSD$ */ +/* See r303485 */ +void +t(void) +{ + static const struct { + int a; + int b; + } c[] = { + {D, E}, + {F, G} + }; +} Added: head/usr.bin/indent/tests/surplusbad.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/surplusbad.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,9 @@ +/* $FreeBSD$ */ +/* See r303599 */ +#if defined(__i386__) +int a; +#elif defined(__amd64__) +int b; +#else +#error "Port me" +#endif Added: head/usr.bin/indent/tests/surplusbad.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/surplusbad.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,9 @@ +/* $FreeBSD$ */ +/* See r303599 */ +#if defined(__i386__) +int a; +#elif defined(__amd64__) +int b; +#else +#error "Port me" +#endif Added: head/usr.bin/indent/tests/surplusbad.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/surplusbad.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-bad Added: head/usr.bin/indent/tests/types_from_file.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ +/* See r303735 */ +void t(a *x, b *y, c *z); Added: head/usr.bin/indent/tests/types_from_file.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ +/* See r303735 */ +void t(a *x, b *y, c * z); Added: head/usr.bin/indent/tests/types_from_file.list ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.list Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +b +a \ No newline at end of file Added: head/usr.bin/indent/tests/types_from_file.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/types_from_file.pro Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +-Utypes_from_file.list Added: head/usr.bin/indent/tests/wchar.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/wchar.0 Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +/* See r309220 */ +#include + +wchar_t *x = L"test"; +wchar_t y = L't'; Added: head/usr.bin/indent/tests/wchar.0.stdout ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/wchar.0.stdout Fri Feb 10 09:31:39 2017 (r313544) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +/* See r309220 */ +#include + +wchar_t *x = L"test"; +wchar_t y = L't'; From owner-svn-src-all@freebsd.org Fri Feb 10 13:28:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 583C8CD8129; Fri, 10 Feb 2017 13:28:32 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6DFAA6; Fri, 10 Feb 2017 13:28:31 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1ADSVDa071985; Fri, 10 Feb 2017 13:28:31 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1ADSVDV071984; Fri, 10 Feb 2017 13:28:31 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201702101328.v1ADSVDV071984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 10 Feb 2017 13:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313547 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 13:28:32 -0000 Author: ray Date: Fri Feb 10 13:28:30 2017 New Revision: 313547 URL: https://svnweb.freebsd.org/changeset/base/313547 Log: o Reset mouse selection when new lines reach selection lines. o Fix how selection handled on display. Submitted by: hselasky Reviewed by: hselasky, emaste(previous version) Todo: track mouse select direction. Modified: head/sys/dev/vt/vt_buf.c Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Fri Feb 10 11:17:45 2017 (r313546) +++ head/sys/dev/vt/vt_buf.c Fri Feb 10 13:28:30 2017 (r313547) @@ -54,6 +54,11 @@ static MALLOC_DEFINE(M_VTBUF, "vtbuf", " (d).tp_row = (s).tp_row; \ } while (0) +#ifndef SC_NO_CUTPASTE +static int vtbuf_wth(const struct vt_buf *vb, int row); +static int vtbuf_in_this_range(int begin, int test, int end, int sz); +#endif +static int vtbuf_htw(const struct vt_buf *vb, int row); /* * line4 @@ -122,6 +127,9 @@ vthistory_seek(struct vt_buf *vb, int of void vthistory_addlines(struct vt_buf *vb, int offset) { +#ifndef SC_NO_CUTPASTE + int cur, sz; +#endif vb->vb_curroffset += offset; if (vb->vb_curroffset < 0) @@ -132,6 +140,17 @@ vthistory_addlines(struct vt_buf *vb, in if ((vb->vb_flags & VBF_SCROLL) == 0) { vb->vb_roffset = vb->vb_curroffset; } + +#ifndef SC_NO_CUTPASTE + sz = vb->vb_history_size; + cur = vb->vb_roffset + vb->vb_scr_size.tp_row + sz - 1; + if (vtbuf_in_this_range(cur, vb->vb_mark_start.tp_row, cur + offset, sz) || + vtbuf_in_this_range(cur, vb->vb_mark_end.tp_row, cur + offset, sz)) { + /* clear screen selection */ + vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row; + vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; + } +#endif } void @@ -144,11 +163,33 @@ vthistory_getpos(const struct vt_buf *vb #ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */ /* Translate current view row number to history row. */ static int -vtbuf_wth(struct vt_buf *vb, int row) +vtbuf_wth(const struct vt_buf *vb, int row) { return ((vb->vb_roffset + row) % vb->vb_history_size); } + +/* + * Test if an index in a circular buffer is within a range. + * + * begin - start index + * end - end index + * test - test index + * sz - size of circular buffer when it turns over + */ +static int +vtbuf_in_this_range(int begin, int test, int end, int sz) +{ + + begin %= sz; + end %= sz; + + /* check for inversion */ + if (begin > end) + return (test >= begin || test < end); + else + return (test >= begin && test < end); +} #endif /* Translate history row to current view row number. */ @@ -169,33 +210,44 @@ vtbuf_htw(const struct vt_buf *vb, int r int vtbuf_iscursor(const struct vt_buf *vb, int row, int col) { - int sc, sr, ec, er, tmp; +#ifndef SC_NO_CUTPASTE + int sc, sr, sz, ec, er, tmp; +#endif if ((vb->vb_flags & (VBF_CURSOR|VBF_SCROLL)) == VBF_CURSOR && (vb->vb_cursor.tp_row == row) && (vb->vb_cursor.tp_col == col)) return (1); +#ifndef SC_NO_CUTPASTE /* Mark cut/paste region. */ + if (vb->vb_mark_start.tp_col == vb->vb_mark_end.tp_col && + vb->vb_mark_start.tp_row == vb->vb_mark_end.tp_row) + return (0); - /* - * Luckily screen view is not like circular buffer, so we will - * calculate in screen coordinates. Translate first. - */ sc = vb->vb_mark_start.tp_col; - sr = vtbuf_htw(vb, vb->vb_mark_start.tp_row); + sr = vb->vb_mark_start.tp_row; ec = vb->vb_mark_end.tp_col; - er = vtbuf_htw(vb, vb->vb_mark_end.tp_row); + er = vb->vb_mark_end.tp_row; + /* + * Information about if the selection was made bottom-top or + * top-bottom is lost due to modulo arithmetics and needs to + * be recovered: + */ + sz = vb->vb_history_size; + tmp = (sz + er - sr) % sz; + row = vtbuf_wth(vb, row); - /* Swap start and end if start > end. */ - if (POS_INDEX(sc, sr) > POS_INDEX(ec, er)) { + /* Swap start and end if start > end */ + if ((2 * tmp) > sz || (tmp == 0 && sc > ec)) { tmp = sc; sc = ec; ec = tmp; tmp = sr; sr = er; er = tmp; } - if ((POS_INDEX(sc, sr) <= POS_INDEX(col, row)) && - (POS_INDEX(col, row) < POS_INDEX(ec, er))) + if (vtbuf_in_this_range(POS_INDEX(sc, sr), POS_INDEX(col, row), + POS_INDEX(ec, er), POS_INDEX(0, sz))) return (1); +#endif return (0); } @@ -627,8 +679,8 @@ vtbuf_flush_mark(struct vt_buf *vb) int s, e; /* Notify renderer to update marked region. */ - if (vb->vb_mark_start.tp_col || vb->vb_mark_end.tp_col || - vb->vb_mark_start.tp_row || vb->vb_mark_end.tp_row) { + if ((vb->vb_mark_start.tp_col != vb->vb_mark_end.tp_col) || + (vb->vb_mark_start.tp_row != vb->vb_mark_end.tp_row)) { s = vtbuf_htw(vb, vb->vb_mark_start.tp_row); e = vtbuf_htw(vb, vb->vb_mark_end.tp_row); From owner-svn-src-all@freebsd.org Fri Feb 10 14:24:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B182CD85DB; Fri, 10 Feb 2017 14:24:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 056EAF36; Fri, 10 Feb 2017 14:24:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id j18so50656061ioe.2; Fri, 10 Feb 2017 06:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5zyPGf5OP5Y0ZYTYRqPXvcRRxwtmosdPF7C941pwH4U=; b=gWg+yhB+2Z59AIrZ5VmkJbOnXyANsu6niWZOFlz9mlBlrn49iWezjTAO6XjJ0Rlw4C p+6gz9+l7YxK1abOVTlVycthn0MLlyaogr/KYgAeYdRc02XkXU79+R33Zq0bRNK+YPK6 4LGQTH/uGwLwFM6fxFfMc5poz777ZZ46F9goHQRZDwOGCT+2hqzrcEBfdd/TrFpNc6E5 Q+0jSOgoHI9tKhSqLoA01IqtEBTBkpAs4eJGiB37KeAzz7AsR1I+YnXZvXcnb+yO/48I MUNX4EtXzwXkHy8X5aqfde3KxpvYgNVWyHhdHTbcWStzR0mko24qvAxpdyWOGM+tN3+V FbSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5zyPGf5OP5Y0ZYTYRqPXvcRRxwtmosdPF7C941pwH4U=; b=r37GP5r9m+I/tu166ixezTUqOyG2I9E2QBPM+uaKgaXNOlzQgqMwC3AsxbGhIV8QAf Y2BP8JXIExgGYvmL+COSaLgFJB/2dPd38DVBgQLEbuY1GFYBr6kBYUXyANyUwwHnfruw gUvKsn//pMqo/mHZlMRZyQLX0KXvXXP8nMfO3ATgcD6o2A76lyd8IfxED6H2fLXBsbnX hGFrN0XNB/vItjib83X9INTEdMUUYiB2bJIHXiNxZ7EQjxhS/4HBBNNh9QLL3Xse2ANp zJWCzVzHKG2IOWqogONRlZK9kgJxbRiFBh7lZ6gDPXr+JFAE35sC/DDAhxIN+7GA7rta IueQ== X-Gm-Message-State: AMke39kVJ//KQqSRkYGwvYX0+M984Zm5JTNlKCeMCI5FfclWUHqcYd9QAOce6EOUa1Q877BuW8v+a6IXp/YZGg== X-Received: by 10.107.18.12 with SMTP id a12mr9602590ioj.155.1486736692309; Fri, 10 Feb 2017 06:24:52 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Fri, 10 Feb 2017 06:24:31 -0800 (PST) In-Reply-To: <201702101328.v1ADSVDV071984@repo.freebsd.org> References: <201702101328.v1ADSVDV071984@repo.freebsd.org> From: Ed Maste Date: Fri, 10 Feb 2017 09:24:31 -0500 X-Google-Sender-Auth: _uXHGCWZLoJa_FMNORK81e32yyc Message-ID: Subject: Re: svn commit: r313547 - head/sys/dev/vt To: Aleksandr Rybalko Cc: "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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 14:24:53 -0000 On 10 February 2017 at 08:28, Aleksandr Rybalko wrote: > Author: ray > Date: Fri Feb 10 13:28:30 2017 > New Revision: 313547 > URL: https://svnweb.freebsd.org/changeset/base/313547 > > Log: > o Reset mouse selection when new lines reach selection lines. > o Fix how selection handled on display. PR: 211922 From owner-svn-src-all@freebsd.org Fri Feb 10 14:27:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1EDECD880D for ; Fri, 10 Feb 2017 14:27:39 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-yw0-x236.google.com (mail-yw0-x236.google.com [IPv6:2607:f8b0:4002:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CCC613C6 for ; Fri, 10 Feb 2017 14:27:39 +0000 (UTC) (envelope-from ray@ddteam.net) Received: by mail-yw0-x236.google.com with SMTP id w75so21852321ywg.1 for ; Fri, 10 Feb 2017 06:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddteam-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=E5HsxsuUnYeY44KM45llR51s9oFM5dtgKZ7ksVGsNro=; b=CU/JP+JXrkdJ79D6umY1krCqEY6k/YQ8grnkE5vKOSge7v3J5jaWtU1/qnh2E4GJbe L3XH6f6O9+d3WLgXhAfDgrjcCil5KCvQYgmeUrdreRJ7KeAeHsaLNHBkuv3juSBKZICU OPB1BxLxqwR+STy8dqbYayhecacMuG+GzVgkAAQuVnAM82vCW6xhNVvmi8eo1L1lOtga LOAybsjx7PSs5pR5dKs1Wt+Pvm3KE+/SWN5o/d2ieUIaw7jXOD8pOfLuj9qnOn/fqB37 XfmUOeQlgx+GU046b8CcFkK3hYFsrc1FBvZOcsIS8L45dV7oTN3jJmKEDlO0mYftE4Op NCGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=E5HsxsuUnYeY44KM45llR51s9oFM5dtgKZ7ksVGsNro=; b=OfiP9xODNyPrvs0gaVToyNN3/ETOufEJx8tGVUVOf43ezhOtUkpbIOKJLsiZpxI5Rb jMAcRlxLch+/rxkchLUXgQ6xd2FkguLl6U8UjtDUvPautxCxH736AJlhNwVOg5F1W5ZJ IoOfFmehodZwD+JPi8uQZGhXv02WcNXQPa/3Ufw2XuhGNv8N0mTX4EFks+PKzVWjMjYr SL2fnQbwymkKHkI3sS8GZVvwBpXwWWV8+j3WR4ZTyMnX+WhuzMxaJEezpP6orxhBA8a+ 9e23nTGz8Ru0Aq8a6rJnMx5UFzXl8RMGH2dCWdGCl5yEn3fanDP4FhQtN3hlhQarJ1K/ b66g== X-Gm-Message-State: AMke39mYlXHRcU2T/vS1EBF93zqPdguP7mJBBzjHzJgHmjToUQ5TcmnpckHoKaCRc4je2xDImiefucIq8mu6gg== X-Received: by 10.13.227.65 with SMTP id m62mr6400429ywe.188.1486736858575; Fri, 10 Feb 2017 06:27:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.219.10 with HTTP; Fri, 10 Feb 2017 06:27:38 -0800 (PST) In-Reply-To: References: <201702101328.v1ADSVDV071984@repo.freebsd.org> From: Aleksandr Rybalko Date: Fri, 10 Feb 2017 16:27:38 +0200 Message-ID: Subject: Re: svn commit: r313547 - head/sys/dev/vt To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 14:27:39 -0000 Ed, thanks, I will define PR on planned fix 2017-02-10 16:24 GMT+02:00 Ed Maste : > On 10 February 2017 at 08:28, Aleksandr Rybalko wrote: > > Author: ray > > Date: Fri Feb 10 13:28:30 2017 > > New Revision: 313547 > > URL: https://svnweb.freebsd.org/changeset/base/313547 > > > > Log: > > o Reset mouse selection when new lines reach selection lines. > > o Fix how selection handled on display. > > PR: 211922 > -- WBW ------- Rybalko Aleksandr From owner-svn-src-all@freebsd.org Fri Feb 10 14:38:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AB77CD8C0D; Fri, 10 Feb 2017 14:38:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1CD1B9F; Fri, 10 Feb 2017 14:38:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AEcShP000559; Fri, 10 Feb 2017 14:38:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AEcSq5000558; Fri, 10 Feb 2017 14:38:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702101438.v1AEcSq5000558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Feb 2017 14:38: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: r313548 - stable/10/sys/i386/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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 14:38:30 -0000 Author: kib Date: Fri Feb 10 14:38:28 2017 New Revision: 313548 URL: https://svnweb.freebsd.org/changeset/base/313548 Log: MFC r290101 (by hselasky): Build fix for i386/XBOX and pc98/GENERIC. Reported by: ngie Modified: stable/10/sys/i386/i386/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Fri Feb 10 13:28:30 2017 (r313547) +++ stable/10/sys/i386/i386/pmap.c Fri Feb 10 14:38:28 2017 (r313548) @@ -1257,8 +1257,10 @@ pmap_invalidate_cache_range(vm_offset_t sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { +#ifdef DEV_APIC if (pmap_kextract(sva) == lapic_paddr) return; +#endif /* * Writes are ordered by CLFLUSH on Intel CPUs. */ From owner-svn-src-all@freebsd.org Fri Feb 10 14:49:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F0A6CD8210; Fri, 10 Feb 2017 14:49:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0ECB6354; Fri, 10 Feb 2017 14:49:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AEn5An004756; Fri, 10 Feb 2017 14:49:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AEn5XX004753; Fri, 10 Feb 2017 14:49:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702101449.v1AEn5XX004753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Feb 2017 14:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313549 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 14:49:06 -0000 Author: kib Date: Fri Feb 10 14:49:04 2017 New Revision: 313549 URL: https://svnweb.freebsd.org/changeset/base/313549 Log: Fix r313495. The file type DTYPE_VNODE can be assigned as a fallback if VOP_OPEN() did not initialized file type. This is a typical code path used by normal file systems. Also, change error returned for inappropriate file type used for O_EXLOCK to EOPNOTSUPP, as declared in the open(2) man page. Reported by: cy, dhw, Iblis Lin Tested by: dhw Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/sys/kern/vfs_vnops.c head/sys/sys/file.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Feb 10 14:38:28 2017 (r313548) +++ head/sys/kern/vfs_vnops.c Fri Feb 10 14:49:04 2017 (r313549) @@ -351,8 +351,8 @@ vn_open_vnode(struct vnode *vp, int fmod while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { KASSERT(fp != NULL, ("open with flock requires fp")); - if (fp->f_type != DTYPE_VNODE) { - error = EBADF; + if (fp->f_type != DTYPE_NONE && fp->f_type != DTYPE_VNODE) { + error = EOPNOTSUPP; break; } lock_flags = VOP_ISLOCKED(vp); Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Fri Feb 10 14:38:28 2017 (r313548) +++ head/sys/sys/file.h Fri Feb 10 14:49:04 2017 (r313549) @@ -53,6 +53,7 @@ struct vnode; #endif /* _KERNEL */ +#define DTYPE_NONE 0 /* not yet initialized */ #define DTYPE_VNODE 1 /* file */ #define DTYPE_SOCKET 2 /* communications endpoint */ #define DTYPE_PIPE 3 /* pipe */ From owner-svn-src-all@freebsd.org Fri Feb 10 14:54:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3055DCD8516; Fri, 10 Feb 2017 14:54:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F38DEB50; Fri, 10 Feb 2017 14:54:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AEsL32008705; Fri, 10 Feb 2017 14:54:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AEsLRR008704; Fri, 10 Feb 2017 14:54:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101454.v1AEsLRR008704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 14:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313550 - stable/11/sys/dev/vt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 14:54:22 -0000 Author: emaste Date: Fri Feb 10 14:54:20 2017 New Revision: 313550 URL: https://svnweb.freebsd.org/changeset/base/313550 Log: MFC r304430: vt: fix old keyboard release in CONS_SETKBD On the first switch we previously released the newly allocated keyboard instead of the old one. Keyboard state was very confused afterwards for further keyboard switches. Submitted by: bde Modified: stable/11/sys/dev/vt/vt_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Fri Feb 10 14:49:04 2017 (r313549) +++ stable/11/sys/dev/vt/vt_core.c Fri Feb 10 14:54:20 2017 (r313550) @@ -2359,6 +2359,7 @@ skip_thunk: (void *)vd, vt_kbdevent, vd); if (i >= 0) { if (vd->vd_keyboard != -1) { + kbd = kbd_get_keyboard(vd->vd_keyboard); vt_save_kbd_state(vd->vd_curwindow, kbd); kbd_release(kbd, (void *)vd); } From owner-svn-src-all@freebsd.org Fri Feb 10 14:58:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 055B5CD8660; Fri, 10 Feb 2017 14:58:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF06AE05; Fri, 10 Feb 2017 14:58:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AEwONw009055; Fri, 10 Feb 2017 14:58:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AEwOn9009054; Fri, 10 Feb 2017 14:58:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101458.v1AEwOn9009054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 14:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313551 - stable/11/usr.sbin/vidcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 14:58:26 -0000 Author: emaste Date: Fri Feb 10 14:58:24 2017 New Revision: 313551 URL: https://svnweb.freebsd.org/changeset/base/313551 Log: MFC r308312: vidcontrol: improve error handling in vt(4) font loading PR: 209078 Modified: stable/11/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- stable/11/usr.sbin/vidcontrol/vidcontrol.c Fri Feb 10 14:54:20 2017 (r313550) +++ stable/11/usr.sbin/vidcontrol/vidcontrol.c Fri Feb 10 14:58:24 2017 (r313551) @@ -393,11 +393,15 @@ load_vt4mappingtable(unsigned int nmappi if (nmappings == 0) return (NULL); - t = malloc(sizeof *t * nmappings); + if ((t = malloc(sizeof *t * nmappings)) == NULL) { + warn("malloc"); + return (NULL); + } if (fread(t, sizeof *t * nmappings, 1, f) != 1) { - perror("mappings"); - exit(1); + warn("read mappings"); + free(t); + return (NULL); } for (i = 0; i < nmappings; i++) { @@ -422,7 +426,7 @@ load_default_vt4font(void) } } -static int +static void load_vt4font(FILE *f) { struct vt4font_header fh; @@ -431,13 +435,13 @@ load_vt4font(FILE *f) unsigned int i; if (fread(&fh, sizeof fh, 1, f) != 1) { - perror("file_header"); - return (1); + warn("read file_header"); + return; } if (memcmp(fh.magic, "VFNT0002", 8) != 0) { - fprintf(stderr, "Bad magic\n"); - return (1); + warnx("bad magic in font file\n"); + return; } for (i = 0; i < VFNT_MAPS; i++) @@ -447,21 +451,26 @@ load_vt4font(FILE *f) vfnt.height = fh.height; glyphsize = howmany(vfnt.width, 8) * vfnt.height * vfnt.glyph_count; - vfnt.glyphs = malloc(glyphsize); + if ((vfnt.glyphs = malloc(glyphsize)) == NULL) { + warn("malloc"); + return; + } if (fread(vfnt.glyphs, glyphsize, 1, f) != 1) { - perror("glyphs"); - return (1); + warn("read glyphs"); + free(vfnt.glyphs); + return; } for (i = 0; i < VFNT_MAPS; i++) vfnt.map[i] = load_vt4mappingtable(vfnt.map_count[i], f); - if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) { - perror("PIO_VFONT"); - return (1); - } - return (0); + if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) + warn("PIO_VFONT"); + + for (i = 0; i < VFNT_MAPS; i++) + free(vfnt.map[i]); + free(vfnt.glyphs); } /* @@ -511,8 +520,7 @@ load_font(const char *type, const char * } if (vt4_mode) { - if(load_vt4font(fd)) - warn("failed to load font \"%s\"", filename); + load_vt4font(fd); fclose(fd); return; } From owner-svn-src-all@freebsd.org Fri Feb 10 15:02:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8D26CD8922; Fri, 10 Feb 2017 15:02:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C85C1396; Fri, 10 Feb 2017 15:02:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AF2uL7012834; Fri, 10 Feb 2017 15:02:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AF2urd012833; Fri, 10 Feb 2017 15:02:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101502.v1AF2urd012833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 15:02: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: r313552 - stable/10/usr.sbin/vidcontrol 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 15:02:58 -0000 Author: emaste Date: Fri Feb 10 15:02:56 2017 New Revision: 313552 URL: https://svnweb.freebsd.org/changeset/base/313552 Log: MFC r308312: vidcontrol: improve error handling in vt(4) font loading PR: 209078 Modified: stable/10/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- stable/10/usr.sbin/vidcontrol/vidcontrol.c Fri Feb 10 14:58:24 2017 (r313551) +++ stable/10/usr.sbin/vidcontrol/vidcontrol.c Fri Feb 10 15:02:56 2017 (r313552) @@ -393,11 +393,15 @@ load_vt4mappingtable(unsigned int nmappi if (nmappings == 0) return (NULL); - t = malloc(sizeof *t * nmappings); + if ((t = malloc(sizeof *t * nmappings)) == NULL) { + warn("malloc"); + return (NULL); + } if (fread(t, sizeof *t * nmappings, 1, f) != 1) { - perror("mappings"); - exit(1); + warn("read mappings"); + free(t); + return (NULL); } for (i = 0; i < nmappings; i++) { @@ -422,7 +426,7 @@ load_default_vt4font(void) } } -static int +static void load_vt4font(FILE *f) { struct vt4font_header fh; @@ -431,13 +435,13 @@ load_vt4font(FILE *f) unsigned int i; if (fread(&fh, sizeof fh, 1, f) != 1) { - perror("file_header"); - return (1); + warn("read file_header"); + return; } if (memcmp(fh.magic, "VFNT0002", 8) != 0) { - fprintf(stderr, "Bad magic\n"); - return (1); + warnx("bad magic in font file\n"); + return; } for (i = 0; i < VFNT_MAPS; i++) @@ -447,21 +451,26 @@ load_vt4font(FILE *f) vfnt.height = fh.height; glyphsize = howmany(vfnt.width, 8) * vfnt.height * vfnt.glyph_count; - vfnt.glyphs = malloc(glyphsize); + if ((vfnt.glyphs = malloc(glyphsize)) == NULL) { + warn("malloc"); + return; + } if (fread(vfnt.glyphs, glyphsize, 1, f) != 1) { - perror("glyphs"); - return (1); + warn("read glyphs"); + free(vfnt.glyphs); + return; } for (i = 0; i < VFNT_MAPS; i++) vfnt.map[i] = load_vt4mappingtable(vfnt.map_count[i], f); - if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) { - perror("PIO_VFONT"); - return (1); - } - return (0); + if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) + warn("PIO_VFONT"); + + for (i = 0; i < VFNT_MAPS; i++) + free(vfnt.map[i]); + free(vfnt.glyphs); } /* @@ -511,8 +520,7 @@ load_font(const char *type, const char * } if (vt4_mode) { - if(load_vt4font(fd)) - warn("failed to load font \"%s\"", filename); + load_vt4font(fd); fclose(fd); return; } From owner-svn-src-all@freebsd.org Fri Feb 10 15:03:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5856CD8A4B; Fri, 10 Feb 2017 15:03:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7E81669; Fri, 10 Feb 2017 15:03:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AF3s9T012928; Fri, 10 Feb 2017 15:03:54 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AF3s7W012926; Fri, 10 Feb 2017 15:03:54 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201702101503.v1AF3s7W012926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 10 Feb 2017 15:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313553 - in stable/11: lib/libc/sys share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 15:03:55 -0000 Author: jilles Date: Fri Feb 10 15:03:54 2017 New Revision: 313553 URL: https://svnweb.freebsd.org/changeset/base/313553 Log: MFC r313174: Clean up documentation of AF_UNIX control messages. Document AF_UNIX control messages in unix(4) only, not split between unix(4) and recv(2). Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could be from a setuid or setgid program (with the explicit SCM_CREDS and LOCAL_PEERCRED, the credentials are read at such a time that it can be assumed that the process intends for them to be used in this context). Modified: stable/11/lib/libc/sys/recv.2 stable/11/share/man/man4/unix.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/recv.2 ============================================================================== --- stable/11/lib/libc/sys/recv.2 Fri Feb 10 15:02:56 2017 (r313552) +++ stable/11/lib/libc/sys/recv.2 Fri Feb 10 15:03:54 2017 (r313553) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd January 29, 2016 +.Dd February 3, 2017 .Dt RECV 2 .Os .Sh NAME @@ -267,57 +267,10 @@ with no data buffer provided immediately .Fn accept system call. .Pp -Open file descriptors are now passed as ancillary data for +With .Dv AF_UNIX -domain sockets, with -.Fa cmsg_level -set to -.Dv SOL_SOCKET -and -.Fa cmsg_type -set to -.Dv SCM_RIGHTS . -The close-on-exec flag on received descriptors is set according to the -.Dv MSG_CMSG_CLOEXEC -flag passed to -.Fn recvmsg . -.Pp -Process credentials can also be passed as ancillary data for -.Dv AF_UNIX -domain sockets using a -.Fa cmsg_type -of -.Dv SCM_CREDS . -In this case, -.Fa cmsg_data -should be a structure of type -.Fa cmsgcred , -which is defined in -.In sys/socket.h -as follows: -.Bd -literal -struct cmsgcred { - pid_t cmcred_pid; /* PID of sending process */ - uid_t cmcred_uid; /* real UID of sending process */ - uid_t cmcred_euid; /* effective UID of sending process */ - gid_t cmcred_gid; /* real GID of sending process */ - short cmcred_ngroups; /* number or groups */ - gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ -}; -.Ed -.Pp -If a sender supplies ancillary data with enough space for the above struct -tagged as -.Dv SCM_CREDS -control message type to the -.Fn sendmsg -system call, then kernel will fill in the credential information of the -sending process and deliver it to the receiver. -Since receiver usually has no control over a sender, this method of retrieving -credential information isn't reliable. -For reliable retrieval of remote side credentials it is advised to use the -.Dv LOCAL_CREDS -socket option on the receiving socket. +domain sockets, ancillary data can be used to pass file descriptors and +process credentials. See .Xr unix 4 for details. Modified: stable/11/share/man/man4/unix.4 ============================================================================== --- stable/11/share/man/man4/unix.4 Fri Feb 10 15:02:56 2017 (r313552) +++ stable/11/share/man/man4/unix.4 Fri Feb 10 15:03:54 2017 (r313553) @@ -28,7 +28,7 @@ .\" @(#)unix.4 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd February 3, 2017 .Dt UNIX 4 .Os .Sh NAME @@ -119,12 +119,12 @@ of a or .Xr sendto 2 must be writable. -.Sh PASSING FILE DESCRIPTORS +.Sh CONTROL MESSAGES The .Ux Ns -domain sockets support the communication of .Ux -file descriptors through the use of the +file descriptors and process credentials through the use of the .Va msg_control field in the .Fa msg @@ -132,13 +132,12 @@ argument to .Xr sendmsg 2 and .Xr recvmsg 2 . -.Pp -Any valid descriptor may be sent in a message. -The file descriptor(s) to be passed are described using a +The items to be passed are described using a .Vt "struct cmsghdr" that is defined in the include file .In sys/socket.h . -The type of the message is +.Pp +To send file descriptors, the type of the message is .Dv SCM_RIGHTS , and the data portion of the messages is an array of integers representing the file descriptors to be passed. @@ -161,6 +160,39 @@ call. Descriptors that are awaiting delivery, or that are purposely not received, are automatically closed by the system when the destination socket is closed. +.Pp +Credentials of the sending process can be transmitted explicitly using a +control message of type +.Dv SCM_CREDS +with a data portion of type +.Vt "struct cmsgcred" , +defined in +.In sys/socket.h +as follows: +.Bd -literal +struct cmsgcred { + pid_t cmcred_pid; /* PID of sending process */ + uid_t cmcred_uid; /* real UID of sending process */ + uid_t cmcred_euid; /* effective UID of sending process */ + gid_t cmcred_gid; /* real GID of sending process */ + short cmcred_ngroups; /* number of groups */ + gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ +}; +.Ed +.Pp +The sender should pass a zeroed buffer which will be filled in by the system. +.Pp +The group list is truncated to at most +.Dv CMGROUP_MAX +GIDs. +.Pp +The process ID +.Fa cmcred_pid +should not be looked up (such as via the +.Dv KERN_PROC_PID +sysctl) for making security decisions. +The sending process could have exited and its process ID already been +reused for a new process. .Sh SOCKET OPTIONS .Tn UNIX domain sockets support a number of socket options which can be set with @@ -176,7 +208,13 @@ or a .Dv SOCK_STREAM socket. This option provides a mechanism for the receiver to -receive the credentials of the process as a +receive the credentials of the process calling +.Xr write 2 , +.Xr send 2 , +.Xr sendto 2 +or +.Xr sendmsg 2 +as a .Xr recvmsg 2 control message. The @@ -201,6 +239,10 @@ struct sockcred { }; .Ed .Pp +The current implementation truncates the group list to at most +.Dv CMGROUP_MAX +groups. +.Pp The .Fn SOCKCREDSIZE macro computes the size of the @@ -221,7 +263,28 @@ On and .Dv SOCK_SEQPACKET sockets credentials are passed only on the first read from a socket, -then system clears the option on socket. +then the system clears the option on the socket. +.Pp +This option and the above explicit +.Vt "struct cmsgcred" +both use the same value +.Dv SCM_CREDS +but incompatible control messages. +If this option is enabled and the sender attached a +.Dv SCM_CREDS +control message with a +.Vt "struct cmsgcred" , +it will be discarded and a +.Vt "struct sockcred" +will be included. +.Pp +Many setuid programs will +.Xr write 2 +data at least partially controlled by the invoker, +such as error messages. +Therefore, a message accompanied by a particular +.Fa sc_euid +value should not be trusted as being from that user. .It Dv LOCAL_CONNWAIT Used with .Dv SOCK_STREAM From owner-svn-src-all@freebsd.org Fri Feb 10 15:18:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D259ACD9034; Fri, 10 Feb 2017 15:18:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA7E0375; Fri, 10 Feb 2017 15:18:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AFIgYH018104; Fri, 10 Feb 2017 15:18:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AFIgM6018098; Fri, 10 Feb 2017 15:18:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702101518.v1AFIgM6018098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 10 Feb 2017 15:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313554 - in head/sys/dev: hpt27xx hptnr hptrr 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 15:18:43 -0000 Author: pfg Date: Fri Feb 10 15:18:41 2017 New Revision: 313554 URL: https://svnweb.freebsd.org/changeset/base/313554 Log: Clean redundant MIN/MAX declarations in some HighPoint drivers. The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX() internally which match the macros from sys/param.h. MIN() is not used, MAX is only used once and can be replaced with the max() version in libkern.h which operates on u_ints. MFC after: 2 weeks Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c head/sys/dev/hpt27xx/ldm.h head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/ldm.h head/sys/dev/hptrr/hptrr_osm_bsd.c head/sys/dev/hptrr/ldm.h Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 10 15:18:41 2017 (r313554) @@ -297,7 +297,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus hpt_lock_vbus(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) - count = MAX(vd->u.array.transform->source->cmds_per_request, + count = max(vd->u.array.transform->source->cmds_per_request, vd->u.array.transform->target->cmds_per_request); else count = vd->cmds_per_request; Modified: head/sys/dev/hpt27xx/ldm.h ============================================================================== --- head/sys/dev/hpt27xx/ldm.h Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hpt27xx/ldm.h Fri Feb 10 15:18:41 2017 (r313554) @@ -59,10 +59,6 @@ extern "C" { #error "Please redefine MAX_PARTITIONS_PER_DISK!!!" #endif -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) - - typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ]; #define hpt_time_after_eq(a, b) ((int)(a) - (int)(b) >= 0) Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 10 15:18:41 2017 (r313554) @@ -294,7 +294,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus hpt_assert_vbus_locked(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) - count = MAX(vd->u.array.transform->source->cmds_per_request, + count = max(vd->u.array.transform->source->cmds_per_request, vd->u.array.transform->target->cmds_per_request); else count = vd->cmds_per_request; Modified: head/sys/dev/hptnr/ldm.h ============================================================================== --- head/sys/dev/hptnr/ldm.h Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptnr/ldm.h Fri Feb 10 15:18:41 2017 (r313554) @@ -58,9 +58,6 @@ extern "C" { #error "Please redefine MAX_PARTITIONS_PER_DISK!!!" #endif -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) - typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ]; Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 10 15:18:41 2017 (r313554) @@ -300,7 +300,7 @@ static int hpt_flush_vdev(PVBUS_EXT vbus hpt_assert_vbus_locked(vbus_ext); if (mIsArray(vd->type) && vd->u.array.transform) - count = MAX(vd->u.array.transform->source->cmds_per_request, + count = max(vd->u.array.transform->source->cmds_per_request, vd->u.array.transform->target->cmds_per_request); else count = vd->cmds_per_request; Modified: head/sys/dev/hptrr/ldm.h ============================================================================== --- head/sys/dev/hptrr/ldm.h Fri Feb 10 15:03:54 2017 (r313553) +++ head/sys/dev/hptrr/ldm.h Fri Feb 10 15:18:41 2017 (r313554) @@ -58,10 +58,6 @@ extern "C" { #error "Please redefine MAX_PARTITIONS_PER_DISK!!!" #endif -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) - - typedef char check_HPT_TIME_is_unsigned[ (HPT_TIME)(-1) > 0 ? 1 : -1 ]; #define hpt_time_after_eq(a, b) ((long)(a) - (long)(b) >= 0) From owner-svn-src-all@freebsd.org Fri Feb 10 15:22:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D578CCD92C0; Fri, 10 Feb 2017 15:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A559D2B; Fri, 10 Feb 2017 15:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AFMLx0022285; Fri, 10 Feb 2017 15:22:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AFMLG7022279; Fri, 10 Feb 2017 15:22:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702101522.v1AFMLG7022279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 10 Feb 2017 15:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313555 - in head/sys/dev/mlx4: . mlx4_core 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 15:22:22 -0000 Author: hselasky Date: Fri Feb 10 15:22:21 2017 New Revision: 313555 URL: https://svnweb.freebsd.org/changeset/base/313555 Log: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 MFC after: 2 weeks Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/device.h head/sys/dev/mlx4/mlx4_core/fw.h head/sys/dev/mlx4/mlx4_core/mlx4_eq.c head/sys/dev/mlx4/mlx4_core/mlx4_fw.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_core/mlx4_profile.c Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/device.h Fri Feb 10 15:22:21 2017 (r313555) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -473,6 +474,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; Modified: head/sys/dev/mlx4/mlx4_core/fw.h ============================================================================== --- head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:22:21 2017 (r313555) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -146,6 +147,16 @@ struct mlx4_func_cap { u8 def_counter_index; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -173,6 +184,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -225,6 +237,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: head/sys/dev/mlx4/mlx4_core/mlx4_eq.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_eq.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_eq.c Fri Feb 10 15:22:21 2017 (r313555) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: head/sys/dev/mlx4/mlx4_core/mlx4_fw.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:22:21 2017 (r313555) @@ -179,6 +179,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -189,6 +243,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -231,6 +286,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -293,11 +349,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -327,14 +396,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -504,6 +576,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -601,6 +674,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -827,8 +902,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -838,8 +916,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1341,6 +1420,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1449,6 +1529,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1555,6 +1636,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:22:21 2017 (r313555) @@ -590,6 +590,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -623,7 +646,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1465,8 +1491,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1528,8 +1553,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2065,6 +2089,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2905,13 +2941,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_profile.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_profile.c Fri Feb 10 15:18:41 2017 (r313554) +++ head/sys/dev/mlx4/mlx4_core/mlx4_profile.c Fri Feb 10 15:22:21 2017 (r313555) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; From owner-svn-src-all@freebsd.org Fri Feb 10 15:28:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA379CD93D7; Fri, 10 Feb 2017 15:28:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8069F114F; Fri, 10 Feb 2017 15:28:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AFSJ1p022567; Fri, 10 Feb 2017 15:28:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AFSJUm022561; Fri, 10 Feb 2017 15:28:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702101528.v1AFSJUm022561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 10 Feb 2017 15:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313556 - in head/sys/dev/mlx4: . mlx4_core 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 15:28:20 -0000 Author: hselasky Date: Fri Feb 10 15:28:18 2017 New Revision: 313556 URL: https://svnweb.freebsd.org/changeset/base/313556 Log: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 MFC after: 2 weeks Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/device.h head/sys/dev/mlx4/mlx4_core/fw.h head/sys/dev/mlx4/mlx4_core/mlx4_fw.c head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_core/mlx4_qp.c head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/device.h Fri Feb 10 15:28:18 2017 (r313556) @@ -219,6 +219,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -533,6 +550,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { Modified: head/sys/dev/mlx4/mlx4_core/fw.h ============================================================================== --- head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/fw.h Fri Feb 10 15:28:18 2017 (r313556) @@ -145,6 +145,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_func { Modified: head/sys/dev/mlx4/mlx4_core/mlx4_fw.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_fw.c Fri Feb 10 15:28:18 2017 (r313556) @@ -265,10 +265,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -322,7 +327,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -382,6 +387,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -474,6 +481,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Fri Feb 10 15:28:18 2017 (r313556) @@ -849,6 +849,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1114,6 +1119,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: head/sys/dev/mlx4/mlx4_core/mlx4_qp.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_qp.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_qp.c Fri Feb 10 15:28:18 2017 (r313556) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c Fri Feb 10 15:22:21 2017 (r313555) +++ head/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c Fri Feb 10 15:28:18 2017 (r313556) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) From owner-svn-src-all@freebsd.org Fri Feb 10 16:06:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A2BCD94CF; Fri, 10 Feb 2017 16:06:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86DF2109; Fri, 10 Feb 2017 16:06:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AG6EQH040002; Fri, 10 Feb 2017 16:06:14 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AG6EEh040001; Fri, 10 Feb 2017 16:06:14 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201702101606.v1AG6EEh040001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 10 Feb 2017 16:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313557 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 16:06:15 -0000 Author: bz Date: Fri Feb 10 16:06:14 2017 New Revision: 313557 URL: https://svnweb.freebsd.org/changeset/base/313557 Log: Allow Dtrace to be compiled into the kernel again after r313177. MFC after: 1 week Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 10 15:28:18 2017 (r313556) +++ head/sys/conf/files Fri Feb 10 16:06:14 2017 (r313557) @@ -268,6 +268,7 @@ cddl/contrib/opensolaris/uts/common/zmod # dtrace specific cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ warning "kernel contains CDDL licensed DTRACE" +cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" From owner-svn-src-all@freebsd.org Fri Feb 10 16:10:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 433B4CD9609 for ; Fri, 10 Feb 2017 16:10:06 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21C836A7 for ; Fri, 10 Feb 2017 16:10:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6a55985f-efab-11e6-ba57-8bc134ee460a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 6a55985f-efab-11e6-ba57-8bc134ee460a; Fri, 10 Feb 2017 16:10:18 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1AGA3Nb016922; Fri, 10 Feb 2017 09:10:03 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1486743003.10020.242.camel@freebsd.org> Subject: Re: svn commit: r313533 - stable/10/usr.sbin/watchdogd From: Ian Lepore To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Date: Fri, 10 Feb 2017 09:10:03 -0700 In-Reply-To: <201702100653.v1A6rmL9009347@repo.freebsd.org> References: <201702100653.v1A6rmL9009347@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 16:10:06 -0000 On Fri, 2017-02-10 at 06:53 +0000, Xin LI wrote: > Author: delphij > Date: Fri Feb 10 06:53:48 2017 > New Revision: 313533 > URL: https://svnweb.freebsd.org/changeset/base/313533 > > Log: >   MFC r274583: Default to use 10 seconds as nap interval instead of > 1. > > Modified: >   stable/10/usr.sbin/watchdogd/watchdogd.8 >   stable/10/usr.sbin/watchdogd/watchdogd.c > I didn't see this change when it happened on -current, but my burning question now is:  how will this work when the timeout is set to values less than 10 seconds, which is the only option on some hardware? -- Ian > Modified: stable/10/usr.sbin/watchdogd/watchdogd.8 > ===================================================================== > ========= > --- stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 > 06:34:52 2017 (r313532) > +++ stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 > 06:53:48 2017 (r313533) > @@ -80,7 +80,7 @@ reboot if there are problems with the sc >  The >  .Fl s Ar sleep >  argument can be used to control the sleep period between each > execution > -of the check and defaults to one second. > +of the check and defaults to 10 seconds. >  .Pp >  The >  .Fl t Ar timeout > > Modified: stable/10/usr.sbin/watchdogd/watchdogd.c > ===================================================================== > ========= > --- stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 > 06:34:52 2017 (r313532) > +++ stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 > 06:53:48 2017 (r313533) > @@ -80,7 +80,7 @@ static u_int timeout = WD_TO_128SEC; >  static u_int exit_timeout = WD_TO_NEVER; >  static u_int pretimeout = 0; >  static u_int timeout_sec; > -static u_int nap = 1; > +static u_int nap = 10; >  static int passive = 0; >  static int is_daemon = 0; >  static int is_dry_run = 0;  /* do not arm the watchdog, only > From owner-svn-src-all@freebsd.org Fri Feb 10 16:11:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F01DBCD9672; Fri, 10 Feb 2017 16:11:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF2918B9; Fri, 10 Feb 2017 16:11:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AGBBcb040431; Fri, 10 Feb 2017 16:11:11 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AGBB7S040430; Fri, 10 Feb 2017 16:11:11 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702101611.v1AGBB7S040430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 10 Feb 2017 16:11:11 +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: r313558 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 16:11:13 -0000 Author: vangyzen Date: Fri Feb 10 16:11:11 2017 New Revision: 313558 URL: https://svnweb.freebsd.org/changeset/base/313558 Log: MFC r313401 Fix garbage IP addresses in UDP log_in_vain messages If multiple threads emit a UDP log_in_vain message concurrently, or indeed call inet_ntoa() for any other reason, the IP addresses could be garbage due to concurrent usage of a single string buffer inside inet_ntoa(). Use inet_ntoa_r() with two stack buffers instead. Relnotes: yes Sponsored by: Dell EMC Modified: stable/10/sys/netinet/udp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Fri Feb 10 16:06:14 2017 (r313557) +++ stable/10/sys/netinet/udp_usrreq.c Fri Feb 10 16:11:11 2017 (r313558) @@ -647,13 +647,13 @@ udp_input(struct mbuf *m, int off) INPLOOKUP_RLOCKPCB, ifp, m); if (inp == NULL) { if (udp_log_in_vain) { - char buf[4*sizeof "123"]; + char src[INET_ADDRSTRLEN]; + char dst[INET_ADDRSTRLEN]; - strcpy(buf, inet_ntoa(ip->ip_dst)); log(LOG_INFO, "Connection attempt to UDP %s:%d from %s:%d\n", - buf, ntohs(uh->uh_dport), inet_ntoa(ip->ip_src), - ntohs(uh->uh_sport)); + inet_ntoa_r(ip->ip_dst, dst), ntohs(uh->uh_dport), + inet_ntoa_r(ip->ip_src, src), ntohs(uh->uh_sport)); } UDPSTAT_INC(udps_noport); if (m->m_flags & (M_BCAST | M_MCAST)) { From owner-svn-src-all@freebsd.org Fri Feb 10 16:33:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF93BCD904A; Fri, 10 Feb 2017 16:33:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9C01C5C; Fri, 10 Feb 2017 16:33:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA19145; Fri, 10 Feb 2017 18:33:20 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ccE8O-0007L1-4v; Fri, 10 Feb 2017 18:33:20 +0200 Subject: Re: svn commit: r313533 - stable/10/usr.sbin/watchdogd To: Ian Lepore , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org References: <201702100653.v1A6rmL9009347@repo.freebsd.org> <1486743003.10020.242.camel@freebsd.org> From: Andriy Gapon Message-ID: <6930dc08-d5b3-5383-eb30-54d92767d43e@FreeBSD.org> Date: Fri, 10 Feb 2017 18:32:18 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1486743003.10020.242.camel@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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 16:33:29 -0000 On 10/02/2017 18:10, Ian Lepore wrote: > On Fri, 2017-02-10 at 06:53 +0000, Xin LI wrote: >> Author: delphij >> Date: Fri Feb 10 06:53:48 2017 >> New Revision: 313533 >> URL: https://svnweb.freebsd.org/changeset/base/313533 >> >> Log: >> MFC r274583: Default to use 10 seconds as nap interval instead of >> 1. >> >> Modified: >> stable/10/usr.sbin/watchdogd/watchdogd.8 >> stable/10/usr.sbin/watchdogd/watchdogd.c >> > > I didn't see this change when it happened on -current, but my burning > question now is: how will this work when the timeout is set to values > less than 10 seconds, which is the only option on some hardware? Please see r308040 and r308479. I don't recall right now if I MFC-ed them to stable/10. > >> Modified: stable/10/usr.sbin/watchdogd/watchdogd.8 >> ===================================================================== >> ========= >> --- stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 >> 06:34:52 2017 (r313532) >> +++ stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 >> 06:53:48 2017 (r313533) >> @@ -80,7 +80,7 @@ reboot if there are problems with the sc >> The >> .Fl s Ar sleep >> argument can be used to control the sleep period between each >> execution >> -of the check and defaults to one second. >> +of the check and defaults to 10 seconds. >> .Pp >> The >> .Fl t Ar timeout >> >> Modified: stable/10/usr.sbin/watchdogd/watchdogd.c >> ===================================================================== >> ========= >> --- stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 >> 06:34:52 2017 (r313532) >> +++ stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 >> 06:53:48 2017 (r313533) >> @@ -80,7 +80,7 @@ static u_int timeout = WD_TO_128SEC; >> static u_int exit_timeout = WD_TO_NEVER; >> static u_int pretimeout = 0; >> static u_int timeout_sec; >> -static u_int nap = 1; >> +static u_int nap = 10; >> static int passive = 0; >> static int is_daemon = 0; >> static int is_dry_run = 0; /* do not arm the watchdog, only >> > -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Feb 10 17:16:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EF9CCD9E26 for ; Fri, 10 Feb 2017 17:16:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06A031638 for ; Fri, 10 Feb 2017 17:16:39 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: b689ce99-efb4-11e6-ba57-8bc134ee460a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id b689ce99-efb4-11e6-ba57-8bc134ee460a; Fri, 10 Feb 2017 17:16:52 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1AHGaT1017045; Fri, 10 Feb 2017 10:16:36 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1486746996.10020.245.camel@freebsd.org> Subject: Re: svn commit: r313533 - stable/10/usr.sbin/watchdogd From: Ian Lepore To: Andriy Gapon , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org Date: Fri, 10 Feb 2017 10:16:36 -0700 In-Reply-To: <6930dc08-d5b3-5383-eb30-54d92767d43e@FreeBSD.org> References: <201702100653.v1A6rmL9009347@repo.freebsd.org> <1486743003.10020.242.camel@freebsd.org> <6930dc08-d5b3-5383-eb30-54d92767d43e@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 17:16:40 -0000 On Fri, 2017-02-10 at 18:32 +0200, Andriy Gapon wrote: > On 10/02/2017 18:10, Ian Lepore wrote: > > > > On Fri, 2017-02-10 at 06:53 +0000, Xin LI wrote: > > > > > > Author: delphij > > > Date: Fri Feb 10 06:53:48 2017 > > > New Revision: 313533 > > > URL: https://svnweb.freebsd.org/changeset/base/313533 > > > > > > Log: > > >   MFC r274583: Default to use 10 seconds as nap interval instead > > > of > > > 1. > > > > > > Modified: > > >   stable/10/usr.sbin/watchdogd/watchdogd.8 > > >   stable/10/usr.sbin/watchdogd/watchdogd.c > > > > > I didn't see this change when it happened on -current, but my > > burning > > question now is:  how will this work when the timeout is set to > > values > > less than 10 seconds, which is the only option on some hardware? > Please see r308040 and r308479. > I don't recall right now if I MFC-ed them to stable/10. > Yep, that looks a little better.  Those should probably be MFC'd to prevent problems with modern embedded systems (which really hate our inflexible power-of-two way of setting the timeout, since they often max at 16 seconds, making 8 the biggest number that actually works). -- Ian > > > > > > > > > > Modified: stable/10/usr.sbin/watchdogd/watchdogd.8 > > > ================================================================= > > > ==== > > > ========= > > > --- stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 > > > 06:34:52 2017 (r313532) > > > +++ stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 > > > 06:53:48 2017 (r313533) > > > @@ -80,7 +80,7 @@ reboot if there are problems with the sc > > >  The > > >  .Fl s Ar sleep > > >  argument can be used to control the sleep period between each > > > execution > > > -of the check and defaults to one second. > > > +of the check and defaults to 10 seconds. > > >  .Pp > > >  The > > >  .Fl t Ar timeout > > > > > > Modified: stable/10/usr.sbin/watchdogd/watchdogd.c > > > ================================================================= > > > ==== > > > ========= > > > --- stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 > > > 06:34:52 2017 (r313532) > > > +++ stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 > > > 06:53:48 2017 (r313533) > > > @@ -80,7 +80,7 @@ static u_int timeout = WD_TO_128SEC; > > >  static u_int exit_timeout = WD_TO_NEVER; > > >  static u_int pretimeout = 0; > > >  static u_int timeout_sec; > > > -static u_int nap = 1; > > > +static u_int nap = 10; > > >  static int passive = 0; > > >  static int is_daemon = 0; > > >  static int is_dry_run = 0;  /* do not arm the watchdog, only > > > > From owner-svn-src-all@freebsd.org Fri Feb 10 17:34:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6D89CD83C6; Fri, 10 Feb 2017 17:34:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B35037A; Fri, 10 Feb 2017 17:34:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AHYmPJ077448; Fri, 10 Feb 2017 17:34:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AHYmxC077447; Fri, 10 Feb 2017 17:34:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702101734.v1AHYmxC077447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 17:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313559 - head/contrib/compiler-rt/lib/sanitizer_common 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 17:34:49 -0000 Author: glebius Date: Fri Feb 10 17:34:48 2017 New Revision: 313559 URL: https://svnweb.freebsd.org/changeset/base/313559 Log: Don't check struct rtentry on FreeBSD, it is an internal kernel structure. On other systems it may be API structure for SIOCADDRT/SIOCDELRT. Reviewed by: emaste, dim Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Feb 10 16:11:11 2017 (r313558) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Feb 10 17:34:48 2017 (r313559) @@ -23,11 +23,6 @@ #ifdef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS #endif -#if SANITIZER_FREEBSD -#define _WANT_RTENTRY -#include -#include -#endif #include #include #include @@ -422,6 +417,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El unsigned struct_input_absinfo_sz = sizeof(struct input_absinfo); unsigned struct_input_id_sz = sizeof(struct input_id); unsigned struct_mtpos_sz = sizeof(struct mtpos); + unsigned struct_rtentry_sz = sizeof(struct rtentry); unsigned struct_termio_sz = sizeof(struct termio); unsigned struct_vt_consize_sz = sizeof(struct vt_consize); unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes); @@ -441,7 +437,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El unsigned struct_midi_info_sz = sizeof(struct midi_info); unsigned struct_mtget_sz = sizeof(struct mtget); unsigned struct_mtop_sz = sizeof(struct mtop); - unsigned struct_rtentry_sz = sizeof(struct rtentry); unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument); unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec); unsigned struct_synth_info_sz = sizeof(struct synth_info); From owner-svn-src-all@freebsd.org Fri Feb 10 17:37:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5B2BCD8492; Fri, 10 Feb 2017 17:37:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2D8878A; Fri, 10 Feb 2017 17:37:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AHb4a2077599; Fri, 10 Feb 2017 17:37:04 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AHb4Qg077598; Fri, 10 Feb 2017 17:37:04 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702101737.v1AHb4Qg077598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 17:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313560 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 17:37:06 -0000 Author: glebius Date: Fri Feb 10 17:37:04 2017 New Revision: 313560 URL: https://svnweb.freebsd.org/changeset/base/313560 Log: Last consumer of _WANT_RTENTRY gone. Modified: head/sys/net/route.h Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Fri Feb 10 17:34:48 2017 (r313559) +++ head/sys/net/route.h Fri Feb 10 17:37:04 2017 (r313560) @@ -135,7 +135,7 @@ VNET_DECLARE(u_int, rt_add_addr_allfibs) #endif #endif -#if defined(_KERNEL) || defined(_WANT_RTENTRY) +#if defined(_KERNEL) struct rtentry { struct radix_node rt_nodes[2]; /* tree glue, and other values */ /* @@ -159,7 +159,7 @@ struct rtentry { struct mtx rt_mtx; /* mutex for routing entry */ struct rtentry *rt_chain; /* pointer to next rtentry to delete */ }; -#endif /* _KERNEL || _WANT_RTENTRY */ +#endif /* _KERNEL */ #define RTF_UP 0x1 /* route usable */ #define RTF_GATEWAY 0x2 /* destination is a gateway */ From owner-svn-src-all@freebsd.org Fri Feb 10 17:46:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD134CD8859; Fri, 10 Feb 2017 17:46:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA25BD98; Fri, 10 Feb 2017 17:46:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AHkQJG081792; Fri, 10 Feb 2017 17:46:26 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AHkQLs081790; Fri, 10 Feb 2017 17:46:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702101746.v1AHkQLs081790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Feb 2017 17:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313561 - in head/sys: netinet netipsec 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 17:46:28 -0000 Author: glebius Date: Fri Feb 10 17:46:26 2017 New Revision: 313561 URL: https://svnweb.freebsd.org/changeset/base/313561 Log: Move tcp_fields_to_net() static inline into tcp_var.h, just below its friend tcp_fields_to_host(). There is third party code that also uses this inline. Reviewed by: ae Modified: head/sys/netinet/tcp_var.h head/sys/netipsec/xform_tcp.c Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Fri Feb 10 17:37:04 2017 (r313560) +++ head/sys/netinet/tcp_var.h Fri Feb 10 17:46:26 2017 (r313561) @@ -863,6 +863,15 @@ tcp_fields_to_host(struct tcphdr *th) th->th_urp = ntohs(th->th_urp); } +static inline void +tcp_fields_to_net(struct tcphdr *th) +{ + + th->th_seq = htonl(th->th_seq); + th->th_ack = htonl(th->th_ack); + th->th_win = htons(th->th_win); + th->th_urp = htons(th->th_urp); +} #endif /* _KERNEL */ #endif /* _NETINET_TCP_VAR_H_ */ Modified: head/sys/netipsec/xform_tcp.c ============================================================================== --- head/sys/netipsec/xform_tcp.c Fri Feb 10 17:37:04 2017 (r313560) +++ head/sys/netipsec/xform_tcp.c Fri Feb 10 17:46:26 2017 (r313561) @@ -72,16 +72,6 @@ __FBSDID("$FreeBSD$"); #define TCP_KEYLEN_MIN 1 /* minimum length of TCP-MD5 key */ #define TCP_KEYLEN_MAX 80 /* maximum length of TCP-MD5 key */ -static inline void -tcp_fields_to_net(struct tcphdr *th) -{ - - th->th_seq = htonl(th->th_seq); - th->th_ack = htonl(th->th_ack); - th->th_win = htons(th->th_win); - th->th_urp = htons(th->th_urp); -} - static int tcp_ipsec_pcbctl(struct inpcb *inp, struct sockopt *sopt) { From owner-svn-src-all@freebsd.org Fri Feb 10 17:47:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2721CD88ED; Fri, 10 Feb 2017 17:47:48 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58D23F6E; Fri, 10 Feb 2017 17:47:48 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id r18so8447035wmd.3; Fri, 10 Feb 2017 09:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3Uad6M1MqMRQ19t7dLuBwWA6ajDWei43CrDJRz575yI=; b=ZzTknZOhMD1CmcDP4PbDJdSoQ0CeIN8Buv/7GTNzf3GGe7LYRxhyjZ55kGQjKoPH74 pG4t1ldFKS/92AgwoWVsSAZsJOLbNSW/+sFY3/EeMRcPB14Qb9VqRU6w/oWWLSNjA1/i aT98f8hr85qxIUL0X7umQ1iqBA0n0+o0mUeFhiWvy2x+56GILvuJSRdHXt2G6xgbIEdh xnsYilekOUqDbGQxB7gfE6HU24GpC8ZiwpadmynQl36E+zs6QFYntVcTkY8/XcbH+5rT XWELwctdgwTsIVm0Lj/kq/CXqx+zUplVQzZmPbUGYJXklpt+sGMDKV56wKw/Nhvnal8D +Sag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3Uad6M1MqMRQ19t7dLuBwWA6ajDWei43CrDJRz575yI=; b=JADrjI7vPMpXw+3a/ulqEUaqTncsc0X8ud/LY2QkOFNyulPPnAoJbgqnC7fCbDHlB9 lryhYeE/N+cdwk6HENuce6iK8R7s7VNWs4B6mX6IW1HOJSK0s3JHbaLTcWf+1BXMklY8 y3cmM6Wa6Wf2+0PZMq86JHdbSWTOG4intgKuFt3FrrvAbfYU7RF8OTKXSbwPgB3dDOI7 /xotK5efqb8b2qq1AMPfEqppxFXCvL7Gg5Qvgcw66NpcX571R8L6osLe/mgmdU/7iqMs IeXtLidGf0VJp4g8IZR1eQPADHJZE5Sva3dP7DvX5GmPKvWKDfBSoQ7zqapgw/R91tq1 HL3g== X-Gm-Message-State: AMke39lx7ji7J9ioTFyUb20VZ8sQlgEY8FFkWa+1Wu6pUG8Ek/rGZbge5KQE6ALBsy6nmpAeKd3CgFE2k7XCJw== X-Received: by 10.28.158.213 with SMTP id h204mr5169454wme.0.1486748866447; Fri, 10 Feb 2017 09:47:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.68.67 with HTTP; Fri, 10 Feb 2017 09:47:45 -0800 (PST) In-Reply-To: <6930dc08-d5b3-5383-eb30-54d92767d43e@FreeBSD.org> References: <201702100653.v1A6rmL9009347@repo.freebsd.org> <1486743003.10020.242.camel@freebsd.org> <6930dc08-d5b3-5383-eb30-54d92767d43e@FreeBSD.org> From: Xin LI Date: Fri, 10 Feb 2017 09:47:45 -0800 Message-ID: Subject: Re: svn commit: r313533 - stable/10/usr.sbin/watchdogd To: Andriy Gapon Cc: Ian Lepore , Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 17:47:48 -0000 Hi, Andriy, Yes you did MFC'ed the changes. The original change was intended for stable/10 but I probably have been disrupted when the MFC notification come in. Cheers, On Fri, Feb 10, 2017 at 8:32 AM, Andriy Gapon wrote: > On 10/02/2017 18:10, Ian Lepore wrote: >> On Fri, 2017-02-10 at 06:53 +0000, Xin LI wrote: >>> Author: delphij >>> Date: Fri Feb 10 06:53:48 2017 >>> New Revision: 313533 >>> URL: https://svnweb.freebsd.org/changeset/base/313533 >>> >>> Log: >>> MFC r274583: Default to use 10 seconds as nap interval instead of >>> 1. >>> >>> Modified: >>> stable/10/usr.sbin/watchdogd/watchdogd.8 >>> stable/10/usr.sbin/watchdogd/watchdogd.c >>> >> >> I didn't see this change when it happened on -current, but my burning >> question now is: how will this work when the timeout is set to values >> less than 10 seconds, which is the only option on some hardware? > > Please see r308040 and r308479. > I don't recall right now if I MFC-ed them to stable/10. > >> >>> Modified: stable/10/usr.sbin/watchdogd/watchdogd.8 >>> ===================================================================== >>> ========= >>> --- stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 >>> 06:34:52 2017 (r313532) >>> +++ stable/10/usr.sbin/watchdogd/watchdogd.8 Fri Feb 10 >>> 06:53:48 2017 (r313533) >>> @@ -80,7 +80,7 @@ reboot if there are problems with the sc >>> The >>> .Fl s Ar sleep >>> argument can be used to control the sleep period between each >>> execution >>> -of the check and defaults to one second. >>> +of the check and defaults to 10 seconds. >>> .Pp >>> The >>> .Fl t Ar timeout >>> >>> Modified: stable/10/usr.sbin/watchdogd/watchdogd.c >>> ===================================================================== >>> ========= >>> --- stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 >>> 06:34:52 2017 (r313532) >>> +++ stable/10/usr.sbin/watchdogd/watchdogd.c Fri Feb 10 >>> 06:53:48 2017 (r313533) >>> @@ -80,7 +80,7 @@ static u_int timeout = WD_TO_128SEC; >>> static u_int exit_timeout = WD_TO_NEVER; >>> static u_int pretimeout = 0; >>> static u_int timeout_sec; >>> -static u_int nap = 1; >>> +static u_int nap = 10; >>> static int passive = 0; >>> static int is_daemon = 0; >>> static int is_dry_run = 0; /* do not arm the watchdog, only >>> >> > > > -- > Andriy Gapon From owner-svn-src-all@freebsd.org Fri Feb 10 17:56:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 535F9CD8B9A; Fri, 10 Feb 2017 17:56:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D87514B4; Fri, 10 Feb 2017 17:56:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v1AHuABp027789 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Feb 2017 09:56:10 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1AHuAup027788; Fri, 10 Feb 2017 09:56:10 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Feb 2017 09:56:10 -0800 From: Gleb Smirnoff To: Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313174 - in head: lib/libc/sys share/man/man4 Message-ID: <20170210175610.GF1973@FreeBSD.org> References: <201702032033.v13KXNhI072385@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702032033.v13KXNhI072385@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 17:56:12 -0000 On Fri, Feb 03, 2017 at 08:33:23PM +0000, Jilles Tjoelker wrote: J> Author: jilles J> Date: Fri Feb 3 20:33:23 2017 J> New Revision: 313174 J> URL: https://svnweb.freebsd.org/changeset/base/313174 J> J> Log: J> Clean up documentation of AF_UNIX control messages. J> J> Document AF_UNIX control messages in unix(4) only, not split between unix(4) J> and recv(2). Thanks a lot! This split was always irritating. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Feb 10 19:11:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CF4CCD9E89; Fri, 10 Feb 2017 19:11:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01B291E42; Fri, 10 Feb 2017 19:11:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJBYfp017084; Fri, 10 Feb 2017 19:11:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJBYOt017083; Fri, 10 Feb 2017 19:11:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101911.v1AJBYOt017083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 19:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313562 - head/usr.sbin/kldxref 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:11:35 -0000 Author: emaste Date: Fri Feb 10 19:11:33 2017 New Revision: 313562 URL: https://svnweb.freebsd.org/changeset/base/313562 Log: kldxref: s/sections/segments/ in warning message The message refers to program header segments, not sections. PR: 216975 Modified: head/usr.sbin/kldxref/ef.c Modified: head/usr.sbin/kldxref/ef.c ============================================================================== --- head/usr.sbin/kldxref/ef.c Fri Feb 10 17:46:26 2017 (r313561) +++ head/usr.sbin/kldxref/ef.c Fri Feb 10 19:11:33 2017 (r313562) @@ -600,7 +600,7 @@ ef_open(const char *filename, struct elf filename); break; } else if (nsegs > MAXSEGS) { - warnx("%s: too many sections", filename); + warnx("%s: too many segments", filename); break; } ef->ef_nsegs = nsegs; From owner-svn-src-all@freebsd.org Fri Feb 10 19:17:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7031DCD90A4; Fri, 10 Feb 2017 19:17:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC302DF; Fri, 10 Feb 2017 19:17:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJHA7N018757; Fri, 10 Feb 2017 19:17:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJHAYt018756; Fri, 10 Feb 2017 19:17:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702101917.v1AJHAYt018756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Feb 2017 19:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313563 - head/usr.sbin/kldxref 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:17:11 -0000 Author: emaste Date: Fri Feb 10 19:17:10 2017 New Revision: 313563 URL: https://svnweb.freebsd.org/changeset/base/313563 Log: kldxref: bump MAXSEGS to 3 ld.bfd generates two PT_LOAD segments, but certain linkers or linker configurations generate three PT_LOAD segments (one additional for RELRO). PR: 216975 Reported by: Shawn Webb MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/kldxref/ef.c Modified: head/usr.sbin/kldxref/ef.c ============================================================================== --- head/usr.sbin/kldxref/ef.c Fri Feb 10 19:11:33 2017 (r313562) +++ head/usr.sbin/kldxref/ef.c Fri Feb 10 19:17:10 2017 (r313563) @@ -47,7 +47,7 @@ #include "ef.h" -#define MAXSEGS 2 +#define MAXSEGS 3 struct ef_file { char* ef_name; struct elf_file *ef_efile; From owner-svn-src-all@freebsd.org Fri Feb 10 19:25:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D7D7CD96FF; Fri, 10 Feb 2017 19:25:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BA9BC58; Fri, 10 Feb 2017 19:25:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJPqOj022903; Fri, 10 Feb 2017 19:25:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJPqhR022902; Fri, 10 Feb 2017 19:25:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702101925.v1AJPqhR022902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 10 Feb 2017 19:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313564 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:25:53 -0000 Author: jhb Date: Fri Feb 10 19:25:52 2017 New Revision: 313564 URL: https://svnweb.freebsd.org/changeset/base/313564 Log: Drop the "created from" line from files generated by makesyscalls.sh. This information is less useful when the generated files are included in source control along with the source. If needed it can be reconstructed from the $FreeBSD$ tag in the generated file. Removing this information from the generated output permits committing the generated files along with the change to the system call master list without having inconsistent metadata in the generated files. Reviewed by: emaste, kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9497 Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Fri Feb 10 19:17:10 2017 (r313563) +++ head/sys/kern/makesyscalls.sh Fri Feb 10 19:25:52 2017 (r313564) @@ -119,10 +119,12 @@ sed -e ' printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw + printf " */\n\n" > syssw printf "/*\n * System call prototypes.\n *\n" > sysarg printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg + printf " */\n\n" > sysarg printf "\n#ifdef %s\n\n", compat > syscompat printf "\n#ifdef %s\n\n", compat4 > syscompat4 @@ -133,10 +135,13 @@ sed -e ' printf "/*\n * System call names.\n *\n" > sysnames printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "/*\n * System call numbers.\n *\n" > syshdr printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr printf " * $%s$\n", "FreeBSD" > syshdr + printf " */\n\n" > syshdr + printf "# FreeBSD system call object files.\n" > sysmk printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk printf "# $%s$\n", "FreeBSD" > sysmk @@ -146,15 +151,9 @@ sed -e ' printf " * $%s$\n", "FreeBSD" > systrace } NR == 1 { - gsub("[$]FreeBSD: ", "FreeBSD: ", $0) - gsub(" [$]", "", $0) - - printf " * created from%s\n */\n\n", $0 > syssw - printf "\n/* The casts are bogus but will do for now. */\n" > sysent printf "struct sysent %s[] = {\n",switchname > sysent - printf " * created from%s\n */\n\n", $0 > sysarg printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -177,12 +176,9 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg - printf " * created from%s\n */\n\n", $0 > sysnames printf "const char *%s[] = {\n", namesname > sysnames - printf " * created from%s\n */\n\n", $0 > syshdr - - printf "# created from%s\nMIASM = ", $0 > sysmk + printf "MIASM = " > sysmk printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace From owner-svn-src-all@freebsd.org Fri Feb 10 19:31:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA278CD9819; Fri, 10 Feb 2017 19:31:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87607F0C; Fri, 10 Feb 2017 19:31:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJV9VT024016; Fri, 10 Feb 2017 19:31:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJV9Z1024015; Fri, 10 Feb 2017 19:31:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702101931.v1AJV9Z1024015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 19:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313565 - head/tests/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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:31:10 -0000 Author: ngie Date: Fri Feb 10 19:31:09 2017 New Revision: 313565 URL: https://svnweb.freebsd.org/changeset/base/313565 Log: Expect :mmap__bad_arguments to fail Some recent changes to vm related to mmap(2) have broken the prot checks that would result with an EINVAL with this case I suspect r313352 is the root-cause the issue PR: 216976 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/vm/mmap_test.c Modified: head/tests/sys/vm/mmap_test.c ============================================================================== --- head/tests/sys/vm/mmap_test.c Fri Feb 10 19:25:52 2017 (r313564) +++ head/tests/sys/vm/mmap_test.c Fri Feb 10 19:31:09 2017 (r313565) @@ -134,6 +134,8 @@ ATF_TC_BODY(mmap__bad_arguments, tc) checked_mmap(PROT_READ, MAP_SHARED, devstatfd, 0, "simple /dev/devstat shared"); + atf_tc_expect_fail("extra PROT flags check fails due to recent mmap(2) changes; bug # 216976"); + /* Extra PROT flags. */ checked_mmap(PROT_READ | PROT_WRITE | 0x100000, MAP_ANON, -1, EINVAL, "MAP_ANON with extra PROT flags"); From owner-svn-src-all@freebsd.org Fri Feb 10 19:36:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3CFBCD9AD1; Fri, 10 Feb 2017 19:36:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA1A15C4; Fri, 10 Feb 2017 19:36:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 194so3780850pgd.0; Fri, 10 Feb 2017 11:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=/DRwD5+Hdsr5+qCfNi9FmT6xfMxOJNrnJOFGZCdoaAg=; b=YMPnhRUqF9zqq29Oyv42EQwtMadnRTAVmvzZ1F0iFb1zl9j2sJmDtMiyWgis5fwAt4 efrdAs7ZdGJsgST/P4xd6jVEOXxq90TTOqzji02kXSFbve4FiiRJ906EJ7oxCgaQ6Y7u SLsihOSqKXlv3vEplMJGnW4HlzfVqYkblUgB8BJMF6Gqe6aunfahB6rZd7ICiByiCaJ8 JUzNwJ+loYFJxSxd/92G0b8+5nthuGyQg1XE0tizCEUGysNqfD+K/K8s3iJGQRa80omg t07bBP/d4YXOu98Pp+OE9ejCxT+K9NAfkxihcdnCjvlplc5p3dRrcgdt6opRef6AMEeu ex8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=/DRwD5+Hdsr5+qCfNi9FmT6xfMxOJNrnJOFGZCdoaAg=; b=GUXzDqbCzUko9P6GypGQ9n825KtUM6+5v5qP2OP4xdwFCoJHsevNVvmwVj+N9lxupK rU7KFE8R+LZHHHsZkk6uEQcTQYaOnTKdtcHNA1oe2jssxw5lZjRtjtWrJSt745mAlcFF RwRqGtI35mmQBXtzTpkLvDOS2E9IUFRi9SBTLFxA/0s3L+h1D7xjHPkgkrk/5lQccraT 7gdnYHAVX1b0g5HvXiVlALvYw1299I+OwXGuP6w3icSs61vCHVVSjfFuyU2WUikAwjI7 9Q0CJ81j4s0QriCEIG1FJXMBmT6l6DQiQsBNWI54RhjcOKVf0iEK9ARZ4fydLyQehTmr vMrw== X-Gm-Message-State: AMke39kKnki/JlrnOMjf4YfdJVfLPAdacntvHjHoYuLoqRDDst7Bf16qynsoTSkXYRZV/Q== X-Received: by 10.84.133.1 with SMTP id 1mr13492907plf.151.1486755387860; Fri, 10 Feb 2017 11:36:27 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p4sm864608pgd.50.2017.02.10.11.36.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 11:36:27 -0800 (PST) Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702062057.v16KvCtI069664@repo.freebsd.org> Date: Fri, 10 Feb 2017 11:36:25 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2ACAB759-1162-4401-9B29-EE5A33F13AD6@gmail.com> References: <201702062057.v16KvCtI069664@repo.freebsd.org> To: Edward Tomasz Napierala X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:36:28 -0000 --Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 6, 2017, at 12:57, Edward Tomasz Napierala = wrote: >=20 > Author: trasz > Date: Mon Feb 6 20:57:12 2017 > New Revision: 313352 > URL: https://svnweb.freebsd.org/changeset/base/313352 >=20 > Log: > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), = kern_vm_munlock(), > kern_vm_munmap(), and kern_vm_madvise(), and use them in various = compats > instead of their sys_*() counterparts. >=20 > Reviewed by: ed, dchagin, kib > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D9378 >=20 > Modified: > head/sys/compat/cloudabi/cloudabi_mem.c > head/sys/compat/freebsd32/freebsd32_misc.c > head/sys/compat/linux/linux_misc.c > head/sys/compat/linux/linux_mmap.c > head/sys/vm/vm_extern.h > head/sys/vm/vm_mmap.c Please see = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216976 . I believe = this causes an issue with validating the prot argument which in turn is = causing failures on ci.freebsd.org when it runs the kyua tests. Thank you, -Ngie --Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C 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 iQIcBAEBCgAGBQJYnhY6AAoJEPWDqSZpMIYVFikQAKztg3r8Z9K2+6mSb3CdFHtW ACaHZr2yjrD20EDQfL0N+vwBM7oCDcaU2mpOq4wD9m2Xo87zbj4X/gMgiopqBmEG o1kEWKIVF4SwSFPZsJR2e9i++6B1osHepiS3mi2cHpofXEAwovr5xY+TTnE1ar9w fVDtCS13aHo618fS7Wc2rrruV5SoM5g8LRvV5rv+qOpRAFnEdVIVzqaFeseqFhPb utBPfW+CR4q7y4Kh8+GYDkBtYqlWTh5sGT2pZ7TzK0N427mFM7Psd7FkIezXB1to nmwBqxvgkAGUblvEa5SetTQNErzc6+i6UNm0PjN5bTt2LqrKdZWqaSJsi9lLJoE1 p7/guR2zS3vI0AJocxCMg6SeHtgImQoSiy34Ag1Vo902KXVWhsugtf6X2kxzeuBw Ht3UzGDQN9SNSwtHdx1RgTFpe9aK7QikUD5JDyOY5cNXeRPBdLmkGC4YXdXBn41V Fnscep0n3RzWdaXuL/rn/pzsOkrtFOJG0IuWXji4byLr+U3YDEy8tuGtY8ZhyNT5 xXKMyqsugN9Vx3nTaBxwmXtgb6dgMp2fbwShltFDInEg4x4sedwWduAEgnSVjwL9 2kdofkpLT+3QO8W4YognKsUPB5d+PcR7slUq9L6adVo55Jkyb1Uscp93RnCoJSwK eT3PM4UOhHXlutrL1pNG =bvUQ -----END PGP SIGNATURE----- --Apple-Mail=_7FEF837F-493B-4404-BAE6-A6BB2776FC4C-- From owner-svn-src-all@freebsd.org Fri Feb 10 19:38:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3147CD9C20; Fri, 10 Feb 2017 19:38:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C238B18C6; Fri, 10 Feb 2017 19:38:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 09C8A10A791; Fri, 10 Feb 2017 14:38:44 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313564 - head/sys/kern Date: Fri, 10 Feb 2017 11:38:38 -0800 Message-ID: <2023305.EdEEquGYxm@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702101925.v1AJPqhR022902@repo.freebsd.org> References: <201702101925.v1AJPqhR022902@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 10 Feb 2017 14:38:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:38:46 -0000 On Friday, February 10, 2017 07:25:52 PM John Baldwin wrote: > Author: jhb > Date: Fri Feb 10 19:25:52 2017 > New Revision: 313564 > URL: https://svnweb.freebsd.org/changeset/base/313564 > > Log: > Drop the "created from" line from files generated by makesyscalls.sh. > > This information is less useful when the generated files are included in > source control along with the source. If needed it can be reconstructed > from the $FreeBSD$ tag in the generated file. Removing this information > from the generated output permits committing the generated files along > with the change to the system call master list without having inconsistent > metadata in the generated files. There is a tradeoff of course. Having the generated files mixed in the commits does make the diff more noisy, and it can be more of a pain in reviews. One can still just not include the generated files when posting reviews (we already have to do that because you have to generate the files to do testing). However, I do think that at least for MFCs we should include the generated files in the merge so that on stable branches we don't have known-broken commits once this change is merged back to stable branches. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Feb 10 19:45:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54BEECD9EB4; Fri, 10 Feb 2017 19:45:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 225881F73; Fri, 10 Feb 2017 19:45:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJj6iL031472; Fri, 10 Feb 2017 19:45:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJj24H031436; Fri, 10 Feb 2017 19:45:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702101945.v1AJj24H031436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 10 Feb 2017 19:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313566 - in head/sys: amd64/linux amd64/linux32 compat/cloudabi32 compat/cloudabi64 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:45:07 -0000 Author: jhb Date: Fri Feb 10 19:45:02 2017 New Revision: 313566 URL: https://svnweb.freebsd.org/changeset/base/313566 Log: Regenerate all the system call tables to drop "created from" lines. One of the ibcs2 files contains some actual changes (new headers) as it hasn't been regenerated after older changes to makesyscalls.sh. Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_syscall.h head/sys/amd64/linux/linux_syscalls.c head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/compat/cloudabi32/cloudabi32_proto.h head/sys/compat/cloudabi32/cloudabi32_syscall.h head/sys/compat/cloudabi32/cloudabi32_syscalls.c head/sys/compat/cloudabi32/cloudabi32_sysent.c head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/cloudabi64/cloudabi64_syscalls.c head/sys/compat/cloudabi64/cloudabi64_sysent.c head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/svr4/svr4_proto.h head/sys/compat/svr4/svr4_syscall.h head/sys/compat/svr4/svr4_syscallnames.c head/sys/compat/svr4/svr4_sysent.c head/sys/i386/ibcs2/ibcs2_proto.h head/sys/i386/ibcs2/ibcs2_syscall.h head/sys/i386/ibcs2/ibcs2_sysent.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: head/sys/amd64/linux/linux_syscall.h ============================================================================== --- head/sys/amd64/linux/linux_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX_SYS_read 0 Modified: head/sys/amd64/linux/linux_syscalls.c ============================================================================== --- head/sys/amd64/linux/linux_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux/linux_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX32_SYSPROTO_H_ Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX32_SYS_linux_exit 1 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux32_syscallnames[] = { Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/amd64/linux32/linux32_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include "opt_compat.h" Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI32_SYSPROTO_H_ Modified: head/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI32_SYS_cloudabi_sys_clock_res_get 0 Modified: head/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi32_syscallnames[] = { Modified: head/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi32/cloudabi32_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI64_SYSPROTO_H_ Modified: head/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI64_SYS_cloudabi_sys_clock_res_get 0 Modified: head/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi64_syscallnames[] = { Modified: head/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/cloudabi64/cloudabi64_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #define FREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #include "opt_compat.h" Modified: head/sys/compat/svr4/svr4_proto.h ============================================================================== --- head/sys/compat/svr4/svr4_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #ifndef _SVR4_SYSPROTO_H_ Modified: head/sys/compat/svr4/svr4_syscall.h ============================================================================== --- head/sys/compat/svr4/svr4_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #define SVR4_SYS_exit 1 Modified: head/sys/compat/svr4/svr4_syscallnames.c ============================================================================== --- head/sys/compat/svr4/svr4_syscallnames.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_syscallnames.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ const char *svr4_syscallnames[] = { Modified: head/sys/compat/svr4/svr4_sysent.c ============================================================================== --- head/sys/compat/svr4/svr4_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/compat/svr4/svr4_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #include Modified: head/sys/i386/ibcs2/ibcs2_proto.h ============================================================================== --- head/sys/i386/ibcs2/ibcs2_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/ibcs2/ibcs2_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #ifndef _IBCS2_SYSPROTO_H_ @@ -12,8 +11,10 @@ #include #include #include +#include #include #include +#include #include @@ -351,6 +352,12 @@ int ibcs2_isc(struct thread *, struct ib #endif /* COMPAT_FREEBSD7 */ + +#ifdef COMPAT_FREEBSD10 + + +#endif /* COMPAT_FREEBSD10 */ + #define IBCS2_SYS_AUE_ibcs2_read AUE_NULL #define IBCS2_SYS_AUE_ibcs2_open AUE_OPEN_RWTC #define IBCS2_SYS_AUE_ibcs2_wait AUE_WAIT4 Modified: head/sys/i386/ibcs2/ibcs2_syscall.h ============================================================================== --- head/sys/i386/ibcs2/ibcs2_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/ibcs2/ibcs2_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #define IBCS2_SYS_syscall 0 Modified: head/sys/i386/ibcs2/ibcs2_sysent.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/ibcs2/ibcs2_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #include Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_proto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #define LINUX_SYS_linux_exit 1 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ const char *linux_syscallnames[] = { Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/i386/linux/linux_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 313284 2017-02-05 14:17:09Z dchagin */ #include Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/kern/init_sysent.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/kern/syscalls.c Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ const char *syscallnames[] = { Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/sys/syscall.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/sys/syscall.mk Fri Feb 10 19:45:02 2017 (r313566) @@ -1,7 +1,6 @@ # FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Fri Feb 10 19:31:09 2017 (r313565) +++ head/sys/sys/sysproto.h Fri Feb 10 19:45:02 2017 (r313566) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@freebsd.org Fri Feb 10 19:49:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AE1CCD9F29; Fri, 10 Feb 2017 19:49:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 556D21B2; Fri, 10 Feb 2017 19:49:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AJnhoo031691; Fri, 10 Feb 2017 19:49:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AJnhHG031687; Fri, 10 Feb 2017 19:49:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702101949.v1AJnhHG031687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 10 Feb 2017 19:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313567 - in stable/11: lib/libsysdecode sys/kern sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 19:49:44 -0000 Author: jhb Date: Fri Feb 10 19:49:42 2017 New Revision: 313567 URL: https://svnweb.freebsd.org/changeset/base/313567 Log: MFC 311568,311584,312387: Set MORETOCOME for AIO write requests on a socket. 311568: Set MORETOCOME for AIO write requests on a socket. Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend* set PRUS_MOREOTOCOME when invoking the protocol send method. The aio worker tasks for sending on a socket set this flag when there are additional write jobs waiting on the socket buffer. 311584: Unbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag in msgflags (Actually, this change excludes MSG_MORETOCOME from being decoded) 312387: Fix regression from r311568: collision of MSG_NOSIGNAL with MSG_MORETOCOME lead to delayed send of data sent with sendto(MSG_NOSIGNAL). Sponsored by: Chelsio Communications Modified: stable/11/lib/libsysdecode/mktables stable/11/sys/kern/sys_socket.c stable/11/sys/kern/uipc_socket.c stable/11/sys/sys/socket.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/mktables ============================================================================== --- stable/11/lib/libsysdecode/mktables Fri Feb 10 19:45:02 2017 (r313566) +++ stable/11/lib/libsysdecode/mktables Fri Feb 10 19:49:42 2017 (r313567) @@ -142,7 +142,7 @@ gen_table "seekwhence" "SEEK_[A-Z]+ gen_table "fcntlcmd" "F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]+" "sys/fcntl.h" "F_CANCEL|F_..LCK" gen_table "mmapflags" "MAP_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" gen_table "rtpriofuncs" "RTP_[A-Z]+[[:space:]]+[0-9]+" "sys/rtprio.h" -gen_table "msgflags" "MSG_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" "MSG_SOCALLBCK" +gen_table "msgflags" "MSG_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" "MSG_SOCALLBCK|MSG_MORETOCOME" gen_table "sigcode" "SI_[A-Z]+[[:space:]]+0(x[0-9abcdef]+)?" "sys/signal.h" gen_table "umtxcvwaitflags" "CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/umtx.h" gen_table "umtxrwlockflags" "URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+" "sys/umtx.h" Modified: stable/11/sys/kern/sys_socket.c ============================================================================== --- stable/11/sys/kern/sys_socket.c Fri Feb 10 19:45:02 2017 (r313566) +++ stable/11/sys/kern/sys_socket.c Fri Feb 10 19:49:42 2017 (r313567) @@ -604,6 +604,8 @@ retry: if (td->td_ru.ru_msgrcv != ru_before) job->msgrcv = 1; } else { + if (!TAILQ_EMPTY(&sb->sb_aiojobq)) + flags |= MSG_MORETOCOME; uio.uio_rw = UIO_WRITE; ru_before = td->td_ru.ru_msgsnd; #ifdef MAC Modified: stable/11/sys/kern/uipc_socket.c ============================================================================== --- stable/11/sys/kern/uipc_socket.c Fri Feb 10 19:45:02 2017 (r313566) +++ stable/11/sys/kern/uipc_socket.c Fri Feb 10 19:49:42 2017 (r313567) @@ -1182,6 +1182,7 @@ sosend_dgram(struct socket *so, struct s (resid <= 0)) ? PRUS_EOF : /* If there is more to send set PRUS_MORETOCOME */ + (flags & MSG_MORETOCOME) || (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, top, addr, control, td); if (dontroute) { @@ -1368,6 +1369,7 @@ restart: (resid <= 0)) ? PRUS_EOF : /* If there is more to send set PRUS_MORETOCOME. */ + (flags & MSG_MORETOCOME) || (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, top, addr, control, td); if (dontroute) { Modified: stable/11/sys/sys/socket.h ============================================================================== --- stable/11/sys/sys/socket.h Fri Feb 10 19:45:02 2017 (r313566) +++ stable/11/sys/sys/socket.h Fri Feb 10 19:49:42 2017 (r313567) @@ -435,6 +435,7 @@ struct msghdr { #endif #ifdef _KERNEL #define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */ +#define MSG_MORETOCOME 0x100000 /* additional data pending */ #endif /* From owner-svn-src-all@freebsd.org Fri Feb 10 20:10:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D039CD9320; Fri, 10 Feb 2017 20:10:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B73C31; Fri, 10 Feb 2017 20:10:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v1AKA9NA028597 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Feb 2017 12:10:09 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1AKA9Gb028596; Fri, 10 Feb 2017 12:10:09 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Feb 2017 12:10:08 -0800 From: Gleb Smirnoff To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313401 - head/sys/netinet Message-ID: <20170210201008.GG1973@FreeBSD.org> References: <201702071857.v17Ivvn1018291@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702071857.v17Ivvn1018291@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 20:10:11 -0000 On Tue, Feb 07, 2017 at 06:57:57PM +0000, Eric van Gyzen wrote: E> Author: vangyzen E> Date: Tue Feb 7 18:57:57 2017 E> New Revision: 313401 E> URL: https://svnweb.freebsd.org/changeset/base/313401 E> E> Log: E> Fix garbage IP addresses in UDP log_in_vain messages E> E> If multiple threads emit a UDP log_in_vain message concurrently, E> the IP addresses could be garbage due to concurrent usage of a E> single string buffer inside inet_ntoa(). Use inet_ntoa_r() with E> two stack buffers instead. E> E> Reported by: Mark Martinec E> MFC after: 3 days E> Relnotes: yes E> Sponsored by: Dell EMC Thanks. I think inet_ntoa() and anything that uses static buffer should just be removed from libkern. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Feb 10 20:19:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EAE9CD9543; Fri, 10 Feb 2017 20:19:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF991077; Fri, 10 Feb 2017 20:19:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id v184so3840688pgv.1; Fri, 10 Feb 2017 12:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=fZd32r44ucI2OhQTLIl4YdJuWb1S8YU/ehjGETGuzOc=; b=fLE7FmX+LO30zJ3tRsbopmXA9NpcewjMPdgK+mxem4yapvG8kENCA9wCLP0J50AhJ3 foFhXOjhf0E0v0wHcXoIvwHluwutl9Bm9/feMldkvXUqelhUCwvfk8aebQqY6iW3CxCr YU9gmOJrKcAvw2CR0xTYsCiML8mKq94iyXOHvt203fEjcTh5fzbz607paO0QpDo/Uz8b 31JiRn7fbEijfbMsO9BInCHgbSdLZVv/J7fiTOe9CiVEB4Ovw+vqGAyrgIePMm74OKDe iaVJNMcU3Ei5d1eCbx+hkwn5rR73nQcpAi6tYU3iXus31peAnx4tURgsB9G+PrIpUf0Y wrag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=fZd32r44ucI2OhQTLIl4YdJuWb1S8YU/ehjGETGuzOc=; b=uHMZ4nXGoERSHZSp3AaQAmrAlJipkAwf0V+Z2NW9Ow/5msvZDf/Ii8RzS/Eht182qU FdWZJNVWEBYTBp9nnYNv7pGAt8phtNx1JVDUCOaDkBjay61l2XaQpXrUHu3zuTdqWCdu Dd6GgEIa5N6ZsbUuxAeJerWSLjorn0giem/XbwGJZwTiTCb9Zj4IeIEgyF0SO2LT2dRN O4GT3trWGtElb/3A4QcC2ncUQ7mMC/pl6x8RWxgXHIsgKJyW71Zqm8OBTsrZYijKY2GP L1COQDsVnEdLNpofRtk3UI2h1HvNaesqvGqpYfapmFWYuQsJq2qkMRFUblL++gXHeYD0 QvoQ== X-Gm-Message-State: AMke39mn5iVhqIoty45i8ssnTyiUnVpchBnBZyrNHZecnDzruVR2TTpdSLUh4N1HUKrnnA== X-Received: by 10.98.8.11 with SMTP id c11mr12255744pfd.135.1486757977654; Fri, 10 Feb 2017 12:19:37 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id z74sm7227461pfd.70.2017.02.10.12.19.36 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 12:19:37 -0800 (PST) Subject: Re: svn commit: r313564 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <2023305.EdEEquGYxm@ralph.baldwin.cx> Date: Fri, 10 Feb 2017 12:19:35 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702101925.v1AJPqhR022902@repo.freebsd.org> <2023305.EdEEquGYxm@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 20:19:38 -0000 --Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 10, 2017, at 11:38, John Baldwin wrote: >=20 > On Friday, February 10, 2017 07:25:52 PM John Baldwin wrote: >> Author: jhb >> Date: Fri Feb 10 19:25:52 2017 >> New Revision: 313564 >> URL: https://svnweb.freebsd.org/changeset/base/313564 >>=20 >> Log: >> Drop the "created from" line from files generated by = makesyscalls.sh. >>=20 >> This information is less useful when the generated files are = included in >> source control along with the source. If needed it can be = reconstructed >> from the $FreeBSD$ tag in the generated file. Removing this = information >> from the generated output permits committing the generated files = along >> with the change to the system call master list without having = inconsistent >> metadata in the generated files. >=20 > There is a tradeoff of course. Having the generated files mixed in = the > commits does make the diff more noisy, and it can be more of a pain in = reviews. > One can still just not include the generated files when posting = reviews (we > already have to do that because you have to generate the files to do = testing). >=20 > However, I do think that at least for MFCs we should include the = generated > files in the merge so that on stable branches we don't have = known-broken > commits once this change is merged back to stable branches. Uhh=E2=80=A6. $FreeBSD$ isn=E2=80=99t being expanded in some of these = files=E2=80=A6 $ svn pg svn:keywords sys/sys/syscall.mk FreeBSD=3D%H $ grep '$FreeBSD' sys/sys/syscall.mk # $FreeBSD$ -Ngie --Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472 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 iQIcBAEBCgAGBQJYniBYAAoJEPWDqSZpMIYVqLYQAMB/6hAbu9FVU/fLJgicXo6m QcartWGIky1OdN/7swg3pA9nSQZGsRnN+HZtxxYIx7aHfFwREQA3yKRSeO4Fz8mk AU+yJC/1BJtONBXse3iaVG9jZRYMYdMCaWF9r5beaZ1IOuQ0VTXj0Njlq/YibYl7 Yp3Yd+WglQXeYVHNWM8+uxA2nvEwKjeujakEcrqtCXf3z5PIL/M4tvPyJxzigS9m qhNMgtJGbur0dQ/k7RK+CIeB2Djt5sa5m68RNo4UiLoKk2t896sN8Vo+B67bkKLQ DU8E7CBJceOFVOrvZT35MWXt/F+c6jRMmWRebxtKRRA2qGJaVOyXEbO7+ay3LJq0 Ovb0AUDJTMZuULp7E25aD14kZLfxSfzuMGnLafPO/CxQLgfO2L2EZoqUtmVhKtEA AI56bQmvIgmAHWjCJuXs1LGY7QHwT8hbgibbmTIHqhN+m+KrxqSfce2Fz0jcaLwK n7lFTe7Z2zFB6p7TMhHo69BlHYRWLZZp6zEYxWKGSClXqVRAfiCVJTr6qquvTf+6 zZW/aXYBX5g7Uo1xU3x05+48bqoCNF8Wmk+Cq7M/+usvcmK5NjiudDndMgDrJ1C3 GgwMFWk8hIuYLrBug74FLCEqaAYyhJiJ6BOjUhmquPQVWeHSV1N5pRX/josRWRq/ FupAO/5eRHZiKTWlnd/5 =5tI3 -----END PGP SIGNATURE----- --Apple-Mail=_4489DBB5-19C5-4F22-839F-1F2B56FCB472-- From owner-svn-src-all@freebsd.org Fri Feb 10 21:05:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 076C6CD94F7; Fri, 10 Feb 2017 21:05:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4A8DA72; Fri, 10 Feb 2017 21:05:05 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x241.google.com with SMTP id 101so6948318iom.0; Fri, 10 Feb 2017 13:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=UFAHL2rYpnNYqP/+VTaHBQiHy5RTfvvDbcRrpQjhf6I=; b=Ks+DNeU2oUsoWIPCLBcj/ONhoVYATvXDhI5V7qOHG5RUPiyw7mVCsUy5q89k8puPTU GnT9eEjvVfm2kzx1xu9jclJwN6nIbEV9to2qj48fSSuGucwEKyjlr5b8qKnLHA+6I6j0 spAFrh2RPAjpNzDqH9utMt7hASzzuSi+dtzvF1l7liVJoAYVDJ/1T7FLXCxWxIzcU0qi utqqbUy9v1qG7zmrWNyvB+NcWPVflY2EX7GO4yvg4RpW9eL/ccmcLztfocoTMZ7xAB2Y qH/rCXJM4j6jRaIPbouanB6aWdNAnxe3WWrLF48xc4zy1u2X8EzMs5knSeqZ2o6oO47j HDWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UFAHL2rYpnNYqP/+VTaHBQiHy5RTfvvDbcRrpQjhf6I=; b=mROPOIxxVedGGAbRL6E8IWChC/5Eg0JrZEGYgLdpf1R3HgF9xZ6fU3ucHhRTuVeTpv tEP65ThijUII5tTYtf9IldCu1NT8aOfGLMYJqtnI6qpSekTyRQ6HsUolxC+OPu9gtlmb CCyPLc5LS+Jw/l3DjjlPJJW1aTM1W/AdhbpMF+ZqEzZ0St5mdioLxj4hI0cEDUl1kbol KBkz7VUHpyAGR9GQuslmxQ03/gzt44lzU9UKo8hKXU3LFTCWEpf16MDT3DvjopIKlkg7 aPzv8mQOIj+dWYKHzz+abBihnD6JTSFoMsCQ0GgV9Jz0j1oIADLCWhdBWEtcwJXCSkal VV2g== X-Gm-Message-State: AMke39ndpl0Cigi6t4qrzfHA4DlGYS/t3VUGMXGG1yYiQ+Njf7N+gaA9MutoXw+8TeS8zbLNE+01NsHzXdfICQ== X-Received: by 10.107.142.195 with SMTP id q186mr4841580iod.169.1486760705099; Fri, 10 Feb 2017 13:05:05 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Fri, 10 Feb 2017 13:04:44 -0800 (PST) In-Reply-To: <20170210201008.GG1973@FreeBSD.org> References: <201702071857.v17Ivvn1018291@repo.freebsd.org> <20170210201008.GG1973@FreeBSD.org> From: Ed Maste Date: Fri, 10 Feb 2017 16:04:44 -0500 X-Google-Sender-Auth: NFHBEXyQlGc8OgFGVOa3KgbRYlY Message-ID: Subject: Re: svn commit: r313401 - head/sys/netinet To: Gleb Smirnoff Cc: Eric van Gyzen , "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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 21:05:06 -0000 On 10 February 2017 at 15:10, Gleb Smirnoff wrote: > > Thanks. I think inet_ntoa() and anything that uses static buffer > should just be removed from libkern. Agreed. A quick grep found inet_ntoa used in: netpfil/pf/pf_osfp.c netpfil/ipfw/ip_fw_log.c kern/kern_jail.c fs/nfsserver/nfs_nfsdkrpc.c netinet/ip_icmp.c netinet/tcp_hostcache.c netinet/ip_options.c netinet/in_mcast.c netinet/igmp.c netinet/libalias/alias_nbt.c netinet/libalias/alias_proxy.c netinet/libalias/alias_sctp.c netinet/ip_mroute.c netinet/in.c netinet/if_ether.c dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c From owner-svn-src-all@freebsd.org Fri Feb 10 22:02:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F681CD94DF; Fri, 10 Feb 2017 22:02:47 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 276AC643; Fri, 10 Feb 2017 22:02:47 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1AM2kt1088476; Fri, 10 Feb 2017 22:02:46 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1AM2kVV088475; Fri, 10 Feb 2017 22:02:46 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201702102202.v1AM2kVV088475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 10 Feb 2017 22:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313568 - head/sys/dev/isp 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 22:02:47 -0000 Author: ken Date: Fri Feb 10 22:02:45 2017 New Revision: 313568 URL: https://svnweb.freebsd.org/changeset/base/313568 Log: Change the isp(4) driver to not adjust the tag type for REQUEST SENSE. The isp(4) driver was changing the tag type for REQUEST SENSE commands to Head of Queue, when the CAM CCB flag CAM_TAG_ACTION_VALID was NOT set. CAM_TAG_ACTION_VALID is set when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE and when the target has tagged queueing turned on. In most cases when CAM_TAG_ACTION_VALID is not set, it is because the target is not doing tagged queueing. In those cases, trying to send a Head of Queue tag may cause problems. Instead, default to sending a simple tag. IBM tape drives claim to support tagged queueing in their standard Inquiry data, but have the DQue bit set in the control mode page (mode page 10). CAM correctly detects that these drives do not support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag on CCBs sent down to the drives. This caused the isp(4) driver to go down the path of setting the tag action to a default value, and for Request Sense commands only, set the tag action to Head of Queue. If an IBM tape drive does get a Head of Queue tag, it rejects it with Invalid Message Error (0x49,0x00). (The Qlogic firmware translates that to a Transport Error, which the driver translates to an Unrecoverable HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible to get a good response from a REQUEST SENSE to an FC-attached IBM tape drive with the isp(4) driver. IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150 with 4470 firmware) also have a bug in that sending a command with a non-simple tag attribute breaks the tape drive's Command Reference Number (CRN) accounting and causes it to ignore all subsequent commands because it and the initiator disagree about the next expected CRN. The drives do reject the initial command with a head of queue tag with an Invalid Message Error (0x49,0x00), but after that they ignore any subsequent commands. IBM confirmed that it is a bug, and sent me test firmware that fixes the bug. However tape drives in the field will still exhibit the bug until they are upgraded. Request Sense is not often sent to targets because most errors are reported automatically through autosense in Fibre Channel and other modern transports. ("Modern" meaning post SCSI-2.) So this is not an error that would crop up frequently. But Request Sense is useful on tape devices to report status information, aside from error reporting. This problem is less serious without FC-Tape features turned on, specifically precise delivery of commands (which enables Command Reference Numbers), enabled on the target and initiator. Without FC-Tape features turned on, the target would return an error and things would continue on. And it also does not cause problems for targets that do tagged queueing, because in those cases the isp(4) driver just uses the tag type that is specified in the CCB, assuming the CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple tag action if it isn't an ordered or head of queue tag. sys/dev/isp/isp.c: In isp_start(), don't try to send Request Sense commands with the Head of Queue tag attribute if the CCB doesn't have a valid tag action. The tag action likely isn't valid because the target doesn't support tagged queueing. Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Fri Feb 10 19:49:42 2017 (r313567) +++ head/sys/dev/isp/isp.c Fri Feb 10 22:02:45 2017 (r313568) @@ -4451,11 +4451,7 @@ isp_start(XS_T *xs) if (XS_TAG_P(xs)) { ttype = XS_TAG_TYPE(xs); } else { - if (XS_CDBP(xs)[0] == 0x3) { - ttype = REQFLAG_HTAG; - } else { - ttype = REQFLAG_STAG; - } + ttype = REQFLAG_STAG; } if (ttype == REQFLAG_OTAG) { ttype = FCP_CMND_TASK_ATTR_ORDERED; @@ -4479,14 +4475,7 @@ isp_start(XS_T *xs) if (XS_TAG_P(xs)) { ((ispreqt2_t *)reqp)->req_flags = XS_TAG_TYPE(xs); } else { - /* - * If we don't know what tag to use, use HEAD OF QUEUE - * for Request Sense or Simple. - */ - if (XS_CDBP(xs)[0] == 0x3) /* REQUEST SENSE */ - ((ispreqt2_t *)reqp)->req_flags = REQFLAG_HTAG; - else - ((ispreqt2_t *)reqp)->req_flags = REQFLAG_STAG; + ((ispreqt2_t *)reqp)->req_flags = REQFLAG_STAG; } } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); From owner-svn-src-all@freebsd.org Fri Feb 10 23:12:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78FECCD9A02; Fri, 10 Feb 2017 23:12:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DA19A38; Fri, 10 Feb 2017 23:12:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1ANCdq7017255; Fri, 10 Feb 2017 23:12:39 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1ANCcn5017250; Fri, 10 Feb 2017 23:12:38 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702102312.v1ANCcn5017250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Fri, 10 Feb 2017 23:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313569 - in vendor/libarchive/dist: . libarchive 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.23 Precedence: list List-Id: "SVN commit messages 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, 10 Feb 2017 23:12:40 -0000 Author: mm Date: Fri Feb 10 23:12:38 2017 New Revision: 313569 URL: https://svnweb.freebsd.org/changeset/base/313569 Log: Update vendor/libarchive to git b3bd0b81a1a06909f766dea8be4072ef81de62b8 Vendor bugfixes: cpio reader sanity fix (OSS-Fuzz 504) WARC reader sanity fixes (OSS-Fuzz 511, 526, 532, 552) mtree reader time parsing fix (OSS-Fuzz 538) XAR reader memleak fix (OSS-Fuzz 551) Modified: vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Fri Feb 10 22:02:45 2017 (r313568) +++ vendor/libarchive/dist/Makefile.am Fri Feb 10 23:12:38 2017 (r313569) @@ -634,7 +634,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_compat_mac-2.tar.Z.uu \ libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu \ libarchive/test/test_compat_perl_archive_tar.tar.uu \ - libarchive/test/test_compat_plexus_archiver_tar.uu \ + libarchive/test/test_compat_plexus_archiver_tar.tar.uu \ libarchive/test/test_compat_solaris_pax_sparse_1.pax.Z.uu \ libarchive/test/test_compat_solaris_pax_sparse_2.pax.Z.uu \ libarchive/test/test_compat_solaris_tar_acl.tar.uu \ @@ -830,6 +830,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_large_splitted_rar_ac.uu \ libarchive/test/test_read_large_splitted_rar_ad.uu \ libarchive/test/test_read_large_splitted_rar_ae.uu \ + libarchive/test/test_read_pax_schily_xattr.tar.uu \ libarchive/test/test_read_splitted_rar_aa.uu \ libarchive/test/test_read_splitted_rar_ab.uu \ libarchive/test/test_read_splitted_rar_ac.uu \ Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Fri Feb 10 22:02:45 2017 (r313568) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Fri Feb 10 23:12:38 2017 (r313569) @@ -356,7 +356,7 @@ archive_read_format_cpio_read_header(str struct archive_entry *entry) { struct cpio *cpio; - const void *h; + const void *h, *hl; struct archive_string_conv *sconv; size_t namelength; size_t name_pad; @@ -406,11 +406,11 @@ archive_read_format_cpio_read_header(str "Rejecting malformed cpio archive: symlink contents exceed 1 megabyte"); return (ARCHIVE_FATAL); } - h = __archive_read_ahead(a, + hl = __archive_read_ahead(a, (size_t)cpio->entry_bytes_remaining, NULL); - if (h == NULL) + if (hl == NULL) return (ARCHIVE_FATAL); - if (archive_entry_copy_symlink_l(entry, (const char *)h, + if (archive_entry_copy_symlink_l(entry, (const char *)hl, (size_t)cpio->entry_bytes_remaining, sconv) != 0) { if (errno == ENOMEM) { archive_set_error(&a->archive, ENOMEM, @@ -434,7 +434,7 @@ archive_read_format_cpio_read_header(str * header. XXX */ /* Compare name to "TRAILER!!!" to test for end-of-archive. */ - if (namelength == 11 && memcmp((const char *)h, "TRAILER!!!", + if (namelength == 11 && strncmp((const char *)h, "TRAILER!!!", 11) == 0) { /* TODO: Store file location of start of block. */ archive_clear_error(&a->archive); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c Fri Feb 10 22:02:45 2017 (r313568) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c Fri Feb 10 23:12:38 2017 (r313569) @@ -1608,8 +1608,11 @@ parse_keyword(struct archive_read *a, st if (*val == '.') { ++val; ns = (long)mtree_atol10(&val); - } else - ns = 0; + if (ns < 0) + ns = 0; + else if (ns > 999999999) + ns = 999999999; + } if (m > my_time_t_max) m = my_time_t_max; else if (m < my_time_t_min) Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Fri Feb 10 22:02:45 2017 (r313568) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Fri Feb 10 23:12:38 2017 (r313569) @@ -134,8 +134,8 @@ static ssize_t _warc_rdlen(const char *b static time_t _warc_rdrtm(const char *buf, size_t bsz); static time_t _warc_rdmtm(const char *buf, size_t bsz); static const char *_warc_find_eoh(const char *buf, size_t bsz); +static const char *_warc_find_eol(const char *buf, size_t bsz); - int archive_read_support_format_warc(struct archive *_a) { @@ -198,8 +198,8 @@ _warc_bid(struct archive_read *a, int be /* otherwise snarf the record's version number */ ver = _warc_rdver(hdr, nrd); - if (ver == 0U || ver > 10000U) { - /* oh oh oh, best not to wager ... */ + if (ver < 1200U || ver > 10000U) { + /* we only support WARC 0.12 to 1.0 */ return -1; } @@ -254,23 +254,32 @@ start_over: &a->archive, ARCHIVE_ERRNO_MISC, "Bad record header"); return (ARCHIVE_FATAL); - } else if ((ver = _warc_rdver(buf, eoh - buf)) > 10000U) { - /* nawww, I wish they promised backward compatibility - * anyhoo, in their infinite wisdom the 28500 guys might - * come up with something we can't possibly handle so - * best end things here */ + } + ver = _warc_rdver(buf, eoh - buf); + /* we currently support WARC 0.12 to 1.0 */ + if (ver == 0U) { archive_set_error( &a->archive, ARCHIVE_ERRNO_MISC, - "Unsupported record version"); + "Invalid record version"); return (ARCHIVE_FATAL); - } else if ((cntlen = _warc_rdlen(buf, eoh - buf)) < 0) { + } else if (ver < 1200U || ver > 10000U) { + archive_set_error( + &a->archive, ARCHIVE_ERRNO_MISC, + "Unsupported record version: %u.%u", + ver / 10000, (ver % 10000) / 100); + return (ARCHIVE_FATAL); + } + cntlen = _warc_rdlen(buf, eoh - buf); + if (cntlen < 0) { /* nightmare! the specs say content-length is mandatory * so I don't feel overly bad stopping the reader here */ archive_set_error( &a->archive, EINVAL, "Bad content length"); return (ARCHIVE_FATAL); - } else if ((rtime = _warc_rdrtm(buf, eoh - buf)) == (time_t)-1) { + } + rtime = _warc_rdrtm(buf, eoh - buf); + if (rtime == (time_t)-1) { /* record time is mandatory as per WARC/1.0, * so just barf here, fast and loud */ archive_set_error( @@ -284,7 +293,7 @@ start_over: if (ver != w->pver) { /* stringify this entry's version */ archive_string_sprintf(&w->sver, - "WARC/%u.%u", ver / 10000, ver % 10000); + "WARC/%u.%u", ver / 10000, (ver % 10000) / 100); /* remember the version */ w->pver = ver; } @@ -577,51 +586,41 @@ out: } static unsigned int -_warc_rdver(const char buf[10], size_t bsz) +_warc_rdver(const char *buf, size_t bsz) { static const char magic[] = "WARC/"; - unsigned int ver; - - (void)bsz; /* UNUSED */ + unsigned int ver = 0U; + unsigned int end = 0U; - if (memcmp(buf, magic, sizeof(magic) - 1U) != 0) { - /* nope */ - return 99999U; + if (bsz < 12 || memcmp(buf, magic, sizeof(magic) - 1U) != 0) { + /* buffer too small or invalid magic */ + return ver; } /* looks good so far, read the version number for a laugh */ buf += sizeof(magic) - 1U; - /* most common case gets a quick-check here */ - if (memcmp(buf, "1.0\r\n", 5U) == 0) { - ver = 10000U; - } else { - switch (*buf) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - if (buf[1U] == '.') { - char *on; - - /* set up major version */ - ver = (buf[0U] - '0') * 10000U; - /* minor version, anyone? */ - ver += (strtol(buf + 2U, &on, 10)) * 100U; - /* don't parse anything else */ - if (on > buf + 2U) { - break; - } - } - /* FALLTHROUGH */ - case '9': - default: - /* just make the version ridiculously high */ - ver = 999999U; - break; + + if (isdigit(buf[0U]) && (buf[1U] == '.') && isdigit(buf[2U])) { + /* we support a maximum of 2 digits in the minor version */ + if (isdigit(buf[3U])) + end = 1U; + /* set up major version */ + ver = (buf[0U] - '0') * 10000U; + /* set up minor version */ + if (end == 1U) { + ver += (buf[2U] - '0') * 1000U; + ver += (buf[3U] - '0') * 100U; + } else + ver += (buf[2U] - '0') * 100U; + /* + * WARC below version 0.12 has a space-separated header + * WARC 0.12 and above terminates the version with a CRLF + */ + if (ver >= 1200U) { + if (memcmp(buf + 3U + end, "\r\n", 2U) != 0) + ver = 0U; + } else if (ver < 1200U) { + if (!isblank(*(buf + 3U + end))) + ver = 0U; } } return ver; @@ -631,34 +630,27 @@ static unsigned int _warc_rdtyp(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Type:"; - const char *const eob = buf + bsz; - const char *val; + const char *val, *eol; if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) { /* no bother */ return WT_NONE; } - /* overread whitespace */ val += sizeof(_key) - 1U; - while (val < eob && isspace((unsigned char)*val)) + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return WT_NONE; + } + + /* overread whitespace */ + while (val < eol && isblank((unsigned char)*val)) ++val; - if (val + 8U > eob) { - ; - } else if (memcmp(val, "resource", 8U) == 0) { - return WT_RSRC; - } else if (memcmp(val, "warcinfo", 8U) == 0) { - return WT_INFO; - } else if (memcmp(val, "metadata", 8U) == 0) { - return WT_META; - } else if (memcmp(val, "request", 7U) == 0) { - return WT_REQ; - } else if (memcmp(val, "response", 8U) == 0) { - return WT_RSP; - } else if (memcmp(val, "conversi", 8U) == 0) { - return WT_CONV; - } else if (memcmp(val, "continua", 8U) == 0) { - return WT_CONT; + if (val + 8U == eol) { + if (memcmp(val, "resource", 8U) == 0) + return WT_RSRC; + else if (memcmp(val, "response", 8U) == 0) + return WT_RSP; } return WT_NONE; } @@ -667,10 +659,7 @@ static warc_string_t _warc_rduri(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Target-URI:"; - const char *const eob = buf + bsz; - const char *val; - const char *uri; - const char *eol; + const char *val, *uri, *eol, *p; warc_string_t res = {0U, NULL}; if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) { @@ -679,25 +668,32 @@ _warc_rduri(const char *buf, size_t bsz) } /* overread whitespace */ val += sizeof(_key) - 1U; - while (val < eob && isspace((unsigned char)*val)) + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return res; + } + + while (val < eol && isblank((unsigned char)*val)) ++val; /* overread URL designators */ - if ((uri = xmemmem(val, eob - val, "://", 3U)) == NULL) { + if ((uri = xmemmem(val, eol - val, "://", 3U)) == NULL) { /* not touching that! */ return res; - } else if ((eol = memchr(uri, '\n', eob - uri)) == NULL) { - /* no end of line? :O */ - return res; } - /* massage uri to point to after :// */ + /* spaces inside uri are not allowed, CRLF should follow */ + for (p = val; p < eol; p++) { + if (isspace(*p)) + return res; + } + + /* there must be at least space for ftp */ + if (uri < (val + 3U)) + return res; + + /* move uri to point to after :// */ uri += 3U; - /* also massage eol to point to the first whitespace - * after the last non-whitespace character before - * the end of the line */ - while (eol > uri && isspace((unsigned char)eol[-1])) - --eol; /* now then, inspect the URI */ if (memcmp(val, "file", 4U) == 0) { @@ -720,7 +716,7 @@ static ssize_t _warc_rdlen(const char *buf, size_t bsz) { static const char _key[] = "\r\nContent-Length:"; - const char *val; + const char *val, *eol; char *on = NULL; long int len; @@ -728,14 +724,24 @@ _warc_rdlen(const char *buf, size_t bsz) /* no bother */ return -1; } - - /* strtol kindly overreads whitespace for us, so use that */ val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return -1; + } + + /* skip leading whitespace */ + while (val < eol && isblank(*val)) + val++; + /* there must be at least one digit */ + if (!isdigit(*val)) + return -1; len = strtol(val, &on, 10); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ + if (on != eol) { + /* line must end here */ return -1; } + return (size_t)len; } @@ -743,7 +749,7 @@ static time_t _warc_rdrtm(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Date:"; - const char *val; + const char *val, *eol; char *on = NULL; time_t res; @@ -751,13 +757,17 @@ _warc_rdrtm(const char *buf, size_t bsz) /* no bother */ return (time_t)-1; } + val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL ) { + /* no end of line */ + return -1; + } /* xstrpisotime() kindly overreads whitespace for us, so use that */ - val += sizeof(_key) - 1U; res = xstrpisotime(val, &on); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ - return (time_t)-1; + if (on != eol) { + /* line must end here */ + return -1; } return res; } @@ -766,7 +776,7 @@ static time_t _warc_rdmtm(const char *buf, size_t bsz) { static const char _key[] = "\r\nLast-Modified:"; - const char *val; + const char *val, *eol; char *on = NULL; time_t res; @@ -774,13 +784,17 @@ _warc_rdmtm(const char *buf, size_t bsz) /* no bother */ return (time_t)-1; } + val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL ) { + /* no end of line */ + return -1; + } /* xstrpisotime() kindly overreads whitespace for us, so use that */ - val += sizeof(_key) - 1U; res = xstrpisotime(val, &on); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ - return (time_t)-1; + if (on != eol) { + /* line must end here */ + return -1; } return res; } @@ -797,4 +811,12 @@ _warc_find_eoh(const char *buf, size_t b return hit; } +static const char* +_warc_find_eol(const char *buf, size_t bsz) +{ + static const char _marker[] = "\r\n"; + const char *hit = xmemmem(buf, bsz, _marker, sizeof(_marker) - 1U); + + return hit; +} /* archive_read_support_format_warc.c ends here */ Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c Fri Feb 10 22:02:45 2017 (r313568) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c Fri Feb 10 23:12:38 2017 (r313569) @@ -394,6 +394,7 @@ static void checksum_update(struct archi size_t, const void *, size_t); static int checksum_final(struct archive_read *, const void *, size_t, const void *, size_t); +static void checksum_cleanup(struct archive_read *); static int decompression_init(struct archive_read *, enum enctype); static int decompress(struct archive_read *, const void **, size_t *, const void *, size_t *); @@ -923,6 +924,7 @@ xar_cleanup(struct archive_read *a) int r; xar = (struct xar *)(a->format->data); + checksum_cleanup(a); r = decompression_cleanup(a); hdlink = xar->hdlink_list; while (hdlink != NULL) { @@ -1720,6 +1722,16 @@ decompression_cleanup(struct archive_rea } static void +checksum_cleanup(struct archive_read *a) { + struct xar *xar; + + xar = (struct xar *)(a->format->data); + + _checksum_final(&(xar->a_sumwrk), NULL, 0); + _checksum_final(&(xar->e_sumwrk), NULL, 0); +} + +static void xmlattr_cleanup(struct xmlattr_list *list) { struct xmlattr *attr, *next; From owner-svn-src-all@freebsd.org Sat Feb 11 00:34:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C74CDAE2F; Sat, 11 Feb 2017 00:34:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4C521311; Sat, 11 Feb 2017 00:34:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6C96D10A7B9; Fri, 10 Feb 2017 19:34:49 -0500 (EST) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313564 - head/sys/kern Date: Fri, 10 Feb 2017 16:34:35 -0800 Message-ID: <123901029.nPdTysnfLg@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201702101925.v1AJPqhR022902@repo.freebsd.org> <2023305.EdEEquGYxm@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 10 Feb 2017 19:34:49 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 00:34:52 -0000 On Friday, February 10, 2017 12:19:35 PM Ngie Cooper wrote: >=20 > > On Feb 10, 2017, at 11:38, John Baldwin wrote: > >=20 > > On Friday, February 10, 2017 07:25:52 PM John Baldwin wrote: > >> Author: jhb > >> Date: Fri Feb 10 19:25:52 2017 > >> New Revision: 313564 > >> URL: https://svnweb.freebsd.org/changeset/base/313564 > >>=20 > >> Log: > >> Drop the "created from" line from files generated by makesyscalls= .sh. > >>=20 > >> This information is less useful when the generated files are incl= uded in > >> source control along with the source. If needed it can be recons= tructed > >> from the $FreeBSD$ tag in the generated file. Removing this info= rmation > >> from the generated output permits committing the generated files = along > >> with the change to the system call master list without having inc= onsistent > >> metadata in the generated files. > >=20 > > There is a tradeoff of course. Having the generated files mixed in= the > > commits does make the diff more noisy, and it can be more of a pain= in reviews. > > One can still just not include the generated files when posting rev= iews (we > > already have to do that because you have to generate the files to d= o testing). > >=20 > > However, I do think that at least for MFCs we should include the ge= nerated > > files in the merge so that on stable branches we don't have known-b= roken > > commits once this change is merged back to stable branches. >=20 > Uhh=E2=80=A6. $FreeBSD$ isn=E2=80=99t being expanded in some of these= files=E2=80=A6 >=20 > $ svn pg svn:keywords sys/sys/syscall.mk > FreeBSD=3D%H > $ grep '$FreeBSD' sys/sys/syscall.mk > # $FreeBSD$ Which client are you using? This is what I see on the clean checkout of head I comitted this from: % grep FreeBSD sys/sys/syscall.mk # FreeBSD system call object files. # $FreeBSD: head/sys/sys/syscall.mk 313566 2017-02-10 19:45:02Z jhb $ --=20 John Baldwin From owner-svn-src-all@freebsd.org Sat Feb 11 00:41:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D2F1CDAECE; Sat, 11 Feb 2017 00:41:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 493FE17AE; Sat, 11 Feb 2017 00:41:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id e1so7224585qkh.1; Fri, 10 Feb 2017 16:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yKNWpT6TMar+z2vhOQl3jsArBjTUOTjgGnbcro6qxnY=; b=PyBA+sohiAI5iKQ5J/z08gB/E0DpY7UuE5CS6ru7DNrOGzKrMVtET3mQDin2p2nIpa Y6AizsYjZDkQKEqwDlWPpRCwtBfTrpesGIjz5IomNKGBFDvf28NJgKe6n8vMbPakSy2U 69tBwHNsWU2TE7G8LoypojFbQFPfJy78ULkZTKOlcYlqN68JL/N+1zCeMXZ/QZFCnkKN vryi9/Gcb/bRA8MrZpbb9ijDt+fJDSiANHLir3pVtKVnrsTufHlEbFvtdQbIzaA2RgJD ZlUQ4fKcKlKXhYIeenX7Jk5Hgfr6fjJnDfpdGXLKS5hCke2TycnwRXc/0IGRK7TTGrf2 eR2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yKNWpT6TMar+z2vhOQl3jsArBjTUOTjgGnbcro6qxnY=; b=HApQTAJE/+GpD096BQ8NmTQaBM4RZL+zqZTuWVBLKJZTMJZM+f/ClDNtc0mS+Nl8H9 pQrr3JB5zKmCPKPb4MsxwZMtVHybqSPW+jLO8FYye0uCulwAeM0KebXa0Cs08IWQtbVP P2bc+kKm3OF9tXXJveLij0KSVpkCwSxs0zzt1W2uL5Apv/KB5xo8POygAUB+RnIt7StB TPOZRBsJ00ketuf82FLYAk7FMJdRWcrfdBYe0cPgNHTJntmQ77dilfe6/0Th74mewfea afzRODYSNpiSZ13v11xPHtzWqpne5u3NS8LP+I9iPSrDf3qMu71Hh9KW/y5ZzqwwPx+N FnNA== X-Gm-Message-State: AMke39knC7w3KYGDbMn5HpByhr8RtQ0EO4+eBle2eLQfMqOwHgMhBxERirSSjyc9THY8uWLzcjM3I1kGW+FBcQ== X-Received: by 10.55.67.135 with SMTP id q129mr11622814qka.98.1486773690430; Fri, 10 Feb 2017 16:41:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Fri, 10 Feb 2017 16:41:30 -0800 (PST) In-Reply-To: <123901029.nPdTysnfLg@ralph.baldwin.cx> References: <201702101925.v1AJPqhR022902@repo.freebsd.org> <2023305.EdEEquGYxm@ralph.baldwin.cx> <123901029.nPdTysnfLg@ralph.baldwin.cx> From: Ngie Cooper Date: Fri, 10 Feb 2017 16:41:30 -0800 Message-ID: Subject: Re: svn commit: r313564 - head/sys/kern To: John Baldwin Cc: "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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 00:41:31 -0000 On Fri, Feb 10, 2017 at 4:34 PM, John Baldwin wrote: ... > Which client are you using? I'll have to doublecheck, but IIRC I'm using the latest copy of devel/subversion . > This is what I see on the clean checkout of head I comitted this from: > > % grep FreeBSD sys/sys/syscall.mk > # FreeBSD system call object files. > # $FreeBSD: head/sys/sys/syscall.mk 313566 2017-02-10 19:45:02Z jhb $ Ok! Thanks for the reply :). -Ngie From owner-svn-src-all@freebsd.org Sat Feb 11 00:54:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE5AFCD8167; Sat, 11 Feb 2017 00:54:18 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 383971E2C; Sat, 11 Feb 2017 00:54:18 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B0sH0Z058220; Sat, 11 Feb 2017 00:54:17 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B0sHXS058214; Sat, 11 Feb 2017 00:54:17 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702110054.v1B0sHXS058214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 11 Feb 2017 00:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313570 - in stable/11: . contrib/libarchive contrib/libarchive/cpio contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test ... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 00:54:18 -0000 Author: mm Date: Sat Feb 11 00:54:16 2017 New Revision: 313570 URL: https://svnweb.freebsd.org/changeset/base/313570 Log: MFC r310866,310868,310870,311903,313074: Sync libarchive with vendor. MFC r310866: PR #771: Add NFSv4 ACL support to pax and restricted pax NFSv4 ACL information may now be stored to and restored from tar archives. ACL must be non-trivial and supported by the underlying filesystem, e.g. natively by ZFS or by UFS with the NFSv4 ACL enable flag set. MFC r310868: PR #843: Fix memory leak of struct archive_entry in cpio/cpio.c PR #851: Spelling fixes Fix two protoypes in manual page archive_read_disk.3 MFC r310870: Use __LA_DEPRECATED macro with functions deprecated in 379867e MFC r311903: #691: Support for SCHILY.xattr extended attributes #854: Spelling fixes Multiple fixes in ACL code: - prefer acl_set_fd_np() to acl_set_fd() - if acl_set_fd_np() fails, do no fallback to acl_set_file() - do not warn if trying to write ACLs to a filesystem without ACL support - fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs MFC r313074: - support extracting NFSv4 ACLs from Solaris tar archives - bugfixes and optimizations in the ACL code - multiple fixes in the test suite - typo and other small bugfixes Security fixes: - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335) - LHA reader: heap-buffer-overflow in lha_read_file_header_1() (CVE-2017-5601) - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream() (OSS-Fuzz 453) - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443) - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458) Memory leak fixes: - ACL support: free memory allocated by acl_get_qualifier() - disk writer: missing free in create_filesystem_object() - file reader: fd leak (Coverity 1016755) - gnutar writer: fix free in archive_write_gnutar_header() (Coverity 101675) - iso 9660 reader: missing free in parse_file_info() (partial Coverity 1016754) - program reader: missing free in __archive_read_program() - program writer: missing free in __archive_write_program_free() - xar reader: missing free in xar_cleanup() - xar reader: missing frees in expat_xmlattr_setup() (Coverity 1229979-1229981) - xar writer: missing free in file_free() - zip reader: missing free in zip_read_local_file_header() List of all libarchive issues at OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=libarchive Security: CVE-2017-5601 Added: stable/11/contrib/libarchive/libarchive/test/test_acl_pax_nfs4.tar.uu - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_acl_pax_nfs4.tar.uu stable/11/contrib/libarchive/libarchive/test/test_acl_pax_posix1e.tar.uu - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_acl_pax_posix1e.tar.uu stable/11/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c - copied unchanged from r313074, head/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c stable/11/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c - copied unchanged from r313074, head/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c stable/11/contrib/libarchive/libarchive/test/test_acl_text.c - copied, changed from r310866, head/contrib/libarchive/libarchive/test/test_acl_text.c stable/11/contrib/libarchive/libarchive/test/test_compat_star_acl.c - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_compat_star_acl.c stable/11/contrib/libarchive/libarchive/test/test_compat_star_acl_nfs4.tar.uu - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_compat_star_acl_nfs4.tar.uu stable/11/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c - copied unchanged from r311903, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c stable/11/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu - copied unchanged from r311903, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu Deleted: stable/11/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c stable/11/contrib/libarchive/libarchive/test/test_acl_freebsd_posix1e.c stable/11/contrib/libarchive/libarchive/test/test_acl_pax.tar.uu stable/11/contrib/libarchive/libarchive/test/test_compat_star_acl_posix1e.c Modified: stable/11/ObsoleteFiles.inc stable/11/contrib/libarchive/NEWS stable/11/contrib/libarchive/cpio/cpio.c stable/11/contrib/libarchive/libarchive/archive_acl.c stable/11/contrib/libarchive/libarchive/archive_acl_private.h stable/11/contrib/libarchive/libarchive/archive_entry.c stable/11/contrib/libarchive/libarchive/archive_entry.h stable/11/contrib/libarchive/libarchive/archive_entry_acl.3 stable/11/contrib/libarchive/libarchive/archive_entry_locale.h stable/11/contrib/libarchive/libarchive/archive_entry_strmode.c stable/11/contrib/libarchive/libarchive/archive_match.c stable/11/contrib/libarchive/libarchive/archive_platform.h stable/11/contrib/libarchive/libarchive/archive_random.c stable/11/contrib/libarchive/libarchive/archive_rb.c stable/11/contrib/libarchive/libarchive/archive_read_disk.3 stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_read_open_filename.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_program.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_7zip.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_lha.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_xar.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_zip.c stable/11/contrib/libarchive/libarchive/archive_string.c stable/11/contrib/libarchive/libarchive/archive_string.h stable/11/contrib/libarchive/libarchive/archive_string_composition.h stable/11/contrib/libarchive/libarchive/archive_write.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_program.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_xz.c stable/11/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_write_open.3 stable/11/contrib/libarchive/libarchive/archive_write_set_format_7zip.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_warc.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_xar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_zip.c stable/11/contrib/libarchive/libarchive/libarchive-formats.5 stable/11/contrib/libarchive/libarchive/tar.5 stable/11/contrib/libarchive/libarchive/test/main.c stable/11/contrib/libarchive/libarchive/test/test.h stable/11/contrib/libarchive/libarchive/test/test_acl_nfs4.c stable/11/contrib/libarchive/libarchive/test/test_acl_pax.c stable/11/contrib/libarchive/libarchive/test/test_acl_posix1e.c stable/11/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c stable/11/contrib/libarchive/libarchive/test/test_archive_string.c stable/11/contrib/libarchive/libarchive/test/test_compat_gtar.c stable/11/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c stable/11/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu stable/11/contrib/libarchive/libarchive/test/test_compat_uudecode.c stable/11/contrib/libarchive/libarchive/test/test_fuzz.c stable/11/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c stable/11/contrib/libarchive/libarchive/test/test_read_filter_lzop.c stable/11/contrib/libarchive/libarchive/test/test_read_filter_lzop_multiple_parts.c stable/11/contrib/libarchive/libarchive/test/test_read_format_7zip.c stable/11/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c stable/11/contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_comment_stored.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_filename.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_mac_metadata.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_malformed.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_nested.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_padded.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_sfx.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c stable/11/contrib/libarchive/libarchive/test/test_sparse_basic.c stable/11/contrib/libarchive/libarchive/test/test_write_disk_secure746.c stable/11/contrib/libarchive/libarchive/test/test_write_filter_lz4.c stable/11/contrib/libarchive/libarchive/test/test_write_filter_lzop.c stable/11/contrib/libarchive/libarchive/test/test_write_format_iso9660.c stable/11/contrib/libarchive/libarchive/test/test_write_format_iso9660_zisofs.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_large.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_zip64.c stable/11/contrib/libarchive/libarchive/xxhash.c stable/11/contrib/libarchive/tar/test/test_option_uid_uname.c stable/11/contrib/libarchive/tar/util.c stable/11/lib/libarchive/config_freebsd.h stable/11/lib/libarchive/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Fri Feb 10 23:12:38 2017 (r313569) +++ stable/11/ObsoleteFiles.inc Sat Feb 11 00:54:16 2017 (r313570) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170211: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu +OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu # 20170103: libbsnmptools.so made into an INTERNALLIB OLD_FILES+=usr/lib/libbsnmptools.a OLD_FILES+=usr/lib/libbsnmptools_p.a Modified: stable/11/contrib/libarchive/NEWS ============================================================================== --- stable/11/contrib/libarchive/NEWS Fri Feb 10 23:12:38 2017 (r313569) +++ stable/11/contrib/libarchive/NEWS Sat Feb 11 00:54:16 2017 (r313570) @@ -1,3 +1,10 @@ +Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin) + +Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates + +Dec 27, 2016: NFSv4 ACL read and write support for pax + Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() + Oct 26, 2016: Remove liblzmadec support Oct 23, 2016: libarchive 3.2.2 released Modified: stable/11/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/11/contrib/libarchive/cpio/cpio.c Fri Feb 10 23:12:38 2017 (r313569) +++ stable/11/contrib/libarchive/cpio/cpio.c Sat Feb 11 00:54:16 2017 (r313570) @@ -703,6 +703,7 @@ file_to_archive(struct cpio *cpio, const lafe_warnc(0, "%s", archive_error_string(cpio->archive_read_disk)); if (r <= ARCHIVE_FAILED) { + archive_entry_free(entry); cpio->return_value = 1; return (r); } Modified: stable/11/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_acl.c Fri Feb 10 23:12:38 2017 (r313569) +++ stable/11/contrib/libarchive/libarchive/archive_acl.c Sat Feb 11 00:54:16 2017 (r313570) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003-2010 Tim Kientzle + * Copyright (c) 2016 Martin Matuska * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,23 +56,31 @@ static struct archive_acl_entry *acl_new static int archive_acl_add_entry_len_l(struct archive_acl *acl, int type, int permset, int tag, int id, const char *name, size_t len, struct archive_string_conv *sc); +static int archive_acl_text_want_type(struct archive_acl *acl, int flags); +static ssize_t archive_acl_text_len(struct archive_acl *acl, int want_type, + int flags, int wide, struct archive *a, + struct archive_string_conv *sc); static int isint_w(const wchar_t *start, const wchar_t *end, int *result); static int ismode_w(const wchar_t *start, const wchar_t *end, int *result); +static int is_nfs4_flags_w(const wchar_t *start, const wchar_t *end, + int *result); +static int is_nfs4_perms_w(const wchar_t *start, const wchar_t *end, + int *result); static void next_field_w(const wchar_t **wp, const wchar_t **start, const wchar_t **end, wchar_t *sep); -static int prefix_w(const wchar_t *start, const wchar_t *end, - const wchar_t *test); -static void append_entry_w(wchar_t **wp, const wchar_t *prefix, int tag, - const wchar_t *wname, int perm, int id); +static void append_entry_w(wchar_t **wp, const wchar_t *prefix, int type, + int tag, int flags, const wchar_t *wname, int perm, int id); static void append_id_w(wchar_t **wp, int id); static int isint(const char *start, const char *end, int *result); static int ismode(const char *start, const char *end, int *result); +static int is_nfs4_flags(const char *start, const char *end, + int *result); +static int is_nfs4_perms(const char *start, const char *end, + int *result); static void next_field(const char **p, const char **start, const char **end, char *sep); -static int prefix_c(const char *start, const char *end, - const char *test); -static void append_entry(char **p, const char *prefix, int tag, - const char *name, int perm, int id); +static void append_entry(char **p, const char *prefix, int type, + int tag, int flags, const char *name, int perm, int id); static void append_id(char **p, int id); void @@ -340,6 +349,15 @@ archive_acl_count(struct archive_acl *ac } /* + * Return a bitmask of stored ACL types in an ACL list + */ +int +archive_acl_types(struct archive_acl *acl) +{ + return (acl->acl_types); +} + +/* * Prepare for reading entries from the ACL data. Returns a count * of entries matching "want_type", or zero if there are no * non-extended ACL entries of that type. @@ -375,8 +393,8 @@ archive_acl_reset(struct archive_acl *ac * standard permissions and include them in the returned list. */ int -archive_acl_next(struct archive *a, struct archive_acl *acl, int want_type, int *type, - int *permset, int *tag, int *id, const char **name) +archive_acl_next(struct archive *a, struct archive_acl *acl, int want_type, + int *type, int *permset, int *tag, int *id, const char **name) { *name = NULL; *id = -1; @@ -441,130 +459,273 @@ archive_acl_next(struct archive *a, stru } /* - * Generate a text version of the ACL. The flags parameter controls - * the style of the generated ACL. + * Determine what type of ACL do we want */ -const wchar_t * -archive_acl_text_w(struct archive *a, struct archive_acl *acl, int flags) +static int +archive_acl_text_want_type(struct archive_acl *acl, int flags) { - int count; - size_t length; - const wchar_t *wname; - const wchar_t *prefix; - wchar_t separator; - struct archive_acl_entry *ap; - int id, r; - wchar_t *wp; + int want_type; - if (acl->acl_text_w != NULL) { - free (acl->acl_text_w); - acl->acl_text_w = NULL; + /* Check if ACL is NFSv4 */ + if ((acl->acl_types & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + /* NFSv4 should never mix with POSIX.1e */ + if ((acl->acl_types & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) + return (0); + else + return (ARCHIVE_ENTRY_ACL_TYPE_NFS4); } - separator = L','; + /* Now deal with POSIX.1e ACLs */ + + want_type = 0; + if ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) + want_type |= ARCHIVE_ENTRY_ACL_TYPE_ACCESS; + if ((flags & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) + want_type |= ARCHIVE_ENTRY_ACL_TYPE_DEFAULT; + + /* By default we want both access and default ACLs */ + if (want_type == 0) + return (ARCHIVE_ENTRY_ACL_TYPE_POSIX1E); + + return (want_type); +} + +/* + * Calculate ACL text string length + */ +static ssize_t +archive_acl_text_len(struct archive_acl *acl, int want_type, int flags, + int wide, struct archive *a, struct archive_string_conv *sc) { + struct archive_acl_entry *ap; + const char *name; + const wchar_t *wname; + int count, idlen, tmp, r; + ssize_t length; + size_t len; + count = 0; length = 0; - ap = acl->acl_head; - while (ap != NULL) { - if ((ap->type & flags) != 0) { - count++; - if ((flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) && - (ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT)) - length += 8; /* "default:" */ - length += 5; /* tag name */ - length += 1; /* colon */ - r = archive_mstring_get_wcs(a, &ap->name, &wname); - if (r == 0 && wname != NULL) - length += wcslen(wname); - else if (r < 0 && errno == ENOMEM) - return (NULL); - else - length += sizeof(uid_t) * 3 + 1; - length ++; /* colon */ + for (ap = acl->acl_head; ap != NULL; ap = ap->next) { + if ((ap->type & want_type) == 0) + continue; + /* + * Filemode-mapping ACL entries are stored exclusively in + * ap->mode so they should not be in the list + */ + if ((ap->type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) + && (ap->tag == ARCHIVE_ENTRY_ACL_USER_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_OTHER)) + continue; + count++; + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0 + && (ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) + length += 8; /* "default:" */ + switch (ap->tag) { + case ARCHIVE_ENTRY_ACL_USER_OBJ: + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + length += 6; /* "owner@" */ + break; + } + /* FALLTHROUGH */ + case ARCHIVE_ENTRY_ACL_USER: + case ARCHIVE_ENTRY_ACL_MASK: + length += 4; /* "user", "mask" */ + break; + case ARCHIVE_ENTRY_ACL_GROUP_OBJ: + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + length += 6; /* "group@" */ + break; + } + /* FALLTHROUGH */ + case ARCHIVE_ENTRY_ACL_GROUP: + case ARCHIVE_ENTRY_ACL_OTHER: + length += 5; /* "group", "other" */ + break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + length += 9; /* "everyone@" */ + break; + } + length += 1; /* colon after tag */ + if (ap->tag == ARCHIVE_ENTRY_ACL_USER || + ap->tag == ARCHIVE_ENTRY_ACL_GROUP) { + if (wide) { + r = archive_mstring_get_wcs(a, &ap->name, + &wname); + if (r == 0 && wname != NULL) + length += wcslen(wname); + else if (r < 0 && errno == ENOMEM) + return (0); + else + length += sizeof(uid_t) * 3 + 1; + } else { + r = archive_mstring_get_mbs_l(&ap->name, &name, + &len, sc); + if (r != 0) + return (0); + if (len > 0 && name != NULL) + length += len; + else + length += sizeof(uid_t) * 3 + 1; + } + length += 1; /* colon after user or group name */ + } else if (want_type != ARCHIVE_ENTRY_ACL_TYPE_NFS4) + length += 1; /* 2nd colon empty user,group or other */ + + if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) != 0) + && ((want_type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) + && (ap->tag == ARCHIVE_ENTRY_ACL_OTHER + || ap->tag == ARCHIVE_ENTRY_ACL_MASK)) { + /* Solaris has no colon after other: and mask: */ + length = length - 1; + } + + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* rwxpdDaARWcCos:fdinSFI:deny */ + length += 27; + if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_DENY) == 0) + length += 1; /* allow, alarm, audit */ + } else length += 3; /* rwx */ + + if ((ap->tag == ARCHIVE_ENTRY_ACL_USER || + ap->tag == ARCHIVE_ENTRY_ACL_GROUP) && + (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) != 0) { length += 1; /* colon */ - length += max(sizeof(uid_t), sizeof(gid_t)) * 3 + 1; - length ++; /* newline */ + /* ID digit count */ + idlen = 1; + tmp = ap->id; + while (tmp > 9) { + tmp = tmp / 10; + idlen++; + } + length += idlen; } - ap = ap->next; + length ++; /* entry separator */ } - if (count > 0 && ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0)) { - length += 10; /* "user::rwx\n" */ - length += 11; /* "group::rwx\n" */ - length += 11; /* "other::rwx\n" */ - } + /* Add filemode-mapping access entries to the length */ + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + if ((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) != 0) { + /* "user::rwx\ngroup::rwx\nother:rwx\n" */ + length += 31; + } else { + /* "user::rwx\ngroup::rwx\nother::rwx\n" */ + length += 32; + } + } else if (count == 0) + return (0); - if (count == 0) + /* The terminating character is included in count */ + return (length); +} + +/* + * Generate a wide text version of the ACL. The flags parameter controls + * the type and style of the generated ACL. + */ +wchar_t * +archive_acl_to_text_w(struct archive_acl *acl, ssize_t *text_len, int flags, + struct archive *a) +{ + int count; + ssize_t length; + size_t len; + const wchar_t *wname; + const wchar_t *prefix; + wchar_t separator; + struct archive_acl_entry *ap; + int id, r, want_type; + wchar_t *wp, *ws; + + want_type = archive_acl_text_want_type(acl, flags); + + /* Both NFSv4 and POSIX.1 types found */ + if (want_type == 0) + return (NULL); + + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) + flags |= ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT; + + length = archive_acl_text_len(acl, want_type, flags, 1, a, NULL); + + if (length == 0) return (NULL); + if (flags & ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA) + separator = L','; + else + separator = L'\n'; + /* Now, allocate the string and actually populate it. */ - wp = acl->acl_text_w = (wchar_t *)malloc(length * sizeof(wchar_t)); - if (wp == NULL) + wp = ws = (wchar_t *)malloc(length * sizeof(wchar_t)); + if (wp == NULL) { + if (errno == ENOMEM) + __archive_errx(1, "No memory"); return (NULL); + } count = 0; - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { - append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_USER_OBJ, NULL, + + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_USER_OBJ, flags, NULL, acl->mode & 0700, -1); - *wp++ = ','; - append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_GROUP_OBJ, NULL, + *wp++ = separator; + append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_GROUP_OBJ, flags, NULL, acl->mode & 0070, -1); - *wp++ = ','; - append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_OTHER, NULL, + *wp++ = separator; + append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_OTHER, flags, NULL, acl->mode & 0007, -1); count += 3; - - ap = acl->acl_head; - while (ap != NULL) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { - r = archive_mstring_get_wcs(a, &ap->name, &wname); - if (r == 0) { - *wp++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) - id = ap->id; - else - id = -1; - append_entry_w(&wp, NULL, ap->tag, wname, - ap->permset, id); - count++; - } else if (r < 0 && errno == ENOMEM) - return (NULL); - } - ap = ap->next; - } } - - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) { - if (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) + for (ap = acl->acl_head; ap != NULL; ap = ap->next) { + if ((ap->type & want_type) == 0) + continue; + /* + * Filemode-mapping ACL entries are stored exclusively in + * ap->mode so they should not be in the list + */ + if ((ap->type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) + && (ap->tag == ARCHIVE_ENTRY_ACL_USER_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_OTHER)) + continue; + if (ap->type == ARCHIVE_ENTRY_ACL_TYPE_DEFAULT && + (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) != 0) prefix = L"default:"; else prefix = NULL; - ap = acl->acl_head; - count = 0; - while (ap != NULL) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) { - r = archive_mstring_get_wcs(a, &ap->name, &wname); - if (r == 0) { - if (count > 0) - *wp++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) - id = ap->id; - else - id = -1; - append_entry_w(&wp, prefix, ap->tag, - wname, ap->permset, id); - count ++; - } else if (r < 0 && errno == ENOMEM) - return (NULL); - } - ap = ap->next; - } + r = archive_mstring_get_wcs(a, &ap->name, &wname); + if (r == 0) { + if (count > 0) + *wp++ = separator; + if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) + id = ap->id; + else + id = -1; + append_entry_w(&wp, prefix, ap->type, ap->tag, flags, + wname, ap->permset, id); + count++; + } else if (r < 0 && errno == ENOMEM) + return (NULL); } - return (acl->acl_text_w); -} + /* Add terminating character */ + *wp++ = L'\0'; + + len = wcslen(ws); + if ((ssize_t)len > (length - 1)) + __archive_errx(1, "Buffer overrun"); + + if (text_len != NULL) + *text_len = len; + + return (ws); +} static void append_id_w(wchar_t **wp, int id) @@ -577,8 +738,8 @@ append_id_w(wchar_t **wp, int id) } static void -append_entry_w(wchar_t **wp, const wchar_t *prefix, int tag, - const wchar_t *wname, int perm, int id) +append_entry_w(wchar_t **wp, const wchar_t *prefix, int type, + int tag, int flags, const wchar_t *wname, int perm, int id) { if (prefix != NULL) { wcscpy(*wp, prefix); @@ -588,6 +749,10 @@ append_entry_w(wchar_t **wp, const wchar case ARCHIVE_ENTRY_ACL_USER_OBJ: wname = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + wcscpy(*wp, L"owner@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_USER: wcscpy(*wp, L"user"); @@ -595,6 +760,10 @@ append_entry_w(wchar_t **wp, const wchar case ARCHIVE_ENTRY_ACL_GROUP_OBJ: wname = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + wcscpy(*wp, L"group@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_GROUP: wcscpy(*wp, L"group"); @@ -609,154 +778,210 @@ append_entry_w(wchar_t **wp, const wchar wname = NULL; id = -1; break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + wcscpy(*wp, L"everyone@"); + wname = NULL; + id = -1; + break; } *wp += wcslen(*wp); *(*wp)++ = L':'; - if (wname != NULL) { - wcscpy(*wp, wname); + if (((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) || + tag == ARCHIVE_ENTRY_ACL_USER || + tag == ARCHIVE_ENTRY_ACL_GROUP) { + if (wname != NULL) { + wcscpy(*wp, wname); + *wp += wcslen(*wp); + } else if (tag == ARCHIVE_ENTRY_ACL_USER + || tag == ARCHIVE_ENTRY_ACL_GROUP) { + append_id_w(wp, id); + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; + } + /* Solaris style has no second colon after other and mask */ + if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) + || (tag != ARCHIVE_ENTRY_ACL_OTHER + && tag != ARCHIVE_ENTRY_ACL_MASK)) + *(*wp)++ = L':'; + } + if ((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { + /* POSIX.1e ACL perms */ + *(*wp)++ = (perm & 0444) ? L'r' : L'-'; + *(*wp)++ = (perm & 0222) ? L'w' : L'-'; + *(*wp)++ = (perm & 0111) ? L'x' : L'-'; + } else { + /* NFS4 ACL perms */ + *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA | + ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? L'r' : L'-'; + *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA | + ARCHIVE_ENTRY_ACL_ADD_FILE)) ? L'w' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_EXECUTE) ? L'x' : L'-'; + *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA | + ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? L'p' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? L'd' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? L'D' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? L'a' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? L'A' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? L'R' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS) ? L'W' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_READ_ACL) ? L'c' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_WRITE_ACL) ? L'C' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_OWNER) ? L'o' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_SYNCHRONIZE) ? L's' : L'-'; + *(*wp)++ = L':'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT) ? L'f' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT) ? L'd' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY) ? L'i' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT) ? L'n' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS) ? L'S' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS) ? L'F' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) ? L'I' : L'-'; + *(*wp)++ = L':'; + switch (type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + wcscpy(*wp, L"allow"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + wcscpy(*wp, L"deny"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + wcscpy(*wp, L"audit"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + wcscpy(*wp, L"alarm"); + break; + default: + break; + } *wp += wcslen(*wp); - } else if (tag == ARCHIVE_ENTRY_ACL_USER - || tag == ARCHIVE_ENTRY_ACL_GROUP) { - append_id_w(wp, id); - id = -1; } - *(*wp)++ = L':'; - *(*wp)++ = (perm & 0444) ? L'r' : L'-'; - *(*wp)++ = (perm & 0222) ? L'w' : L'-'; - *(*wp)++ = (perm & 0111) ? L'x' : L'-'; if (id != -1) { *(*wp)++ = L':'; append_id_w(wp, id); } - **wp = L'\0'; } -int -archive_acl_text_l(struct archive_acl *acl, int flags, - const char **acl_text, size_t *acl_text_len, +/* + * Generate a text version of the ACL. The flags parameter controls + * the type and style of the generated ACL. + */ +char * +archive_acl_to_text_l(struct archive_acl *acl, ssize_t *text_len, int flags, struct archive_string_conv *sc) { int count; - size_t length; + ssize_t length; + size_t len; const char *name; const char *prefix; char separator; struct archive_acl_entry *ap; - size_t len; - int id, r; - char *p; + int id, r, want_type; + char *p, *s; - if (acl->acl_text != NULL) { - free (acl->acl_text); - acl->acl_text = NULL; - } + want_type = archive_acl_text_want_type(acl, flags); - *acl_text = NULL; - if (acl_text_len != NULL) - *acl_text_len = 0; - separator = ','; - count = 0; - length = 0; - ap = acl->acl_head; - while (ap != NULL) { - if ((ap->type & flags) != 0) { - count++; - if ((flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) && - (ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT)) - length += 8; /* "default:" */ - length += 5; /* tag name */ - length += 1; /* colon */ - r = archive_mstring_get_mbs_l( - &ap->name, &name, &len, sc); - if (r != 0) - return (-1); - if (len > 0 && name != NULL) - length += len; - else - length += sizeof(uid_t) * 3 + 1; - length ++; /* colon */ - length += 3; /* rwx */ - length += 1; /* colon */ - length += max(sizeof(uid_t), sizeof(gid_t)) * 3 + 1; - length ++; /* newline */ - } - ap = ap->next; - } + /* Both NFSv4 and POSIX.1 types found */ + if (want_type == 0) + return (NULL); - if (count > 0 && ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0)) { - length += 10; /* "user::rwx\n" */ - length += 11; /* "group::rwx\n" */ - length += 11; /* "other::rwx\n" */ - } + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) + flags |= ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT; - if (count == 0) - return (0); + length = archive_acl_text_len(acl, want_type, flags, 0, NULL, sc); + + if (length == 0) + return (NULL); + + if (flags & ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA) + separator = ','; + else + separator = '\n'; /* Now, allocate the string and actually populate it. */ - p = acl->acl_text = (char *)malloc(length); - if (p == NULL) - return (-1); + p = s = (char *)malloc(length * sizeof(char)); + if (p == NULL) { + if (errno == ENOMEM) + __archive_errx(1, "No memory"); + return (NULL); + } count = 0; - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { - append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_USER_OBJ, NULL, + + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_USER_OBJ, flags, NULL, acl->mode & 0700, -1); - *p++ = ','; - append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_GROUP_OBJ, NULL, + *p++ = separator; + append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_GROUP_OBJ, flags, NULL, acl->mode & 0070, -1); - *p++ = ','; - append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_OTHER, NULL, + *p++ = separator; + append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_OTHER, flags, NULL, acl->mode & 0007, -1); count += 3; - - for (ap = acl->acl_head; ap != NULL; ap = ap->next) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) == 0) - continue; - r = archive_mstring_get_mbs_l( - &ap->name, &name, &len, sc); - if (r != 0) - return (-1); - *p++ = separator; - if (name == NULL || (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID)) { - id = ap->id; - } else { - id = -1; - } - append_entry(&p, NULL, ap->tag, name, - ap->permset, id); - count++; - } } - - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) { - if (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) + for (ap = acl->acl_head; ap != NULL; ap = ap->next) { + if ((ap->type & want_type) == 0) + continue; + /* + * Filemode-mapping ACL entries are stored exclusively in + * ap->mode so they should not be in the list + */ + if ((ap->type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) + && (ap->tag == ARCHIVE_ENTRY_ACL_USER_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_OTHER)) + continue; + if (ap->type == ARCHIVE_ENTRY_ACL_TYPE_DEFAULT && + (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) != 0) prefix = "default:"; else prefix = NULL; - count = 0; - for (ap = acl->acl_head; ap != NULL; ap = ap->next) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) == 0) - continue; - r = archive_mstring_get_mbs_l( - &ap->name, &name, &len, sc); - if (r != 0) - return (-1); - if (count > 0) - *p++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) - id = ap->id; - else - id = -1; - append_entry(&p, prefix, ap->tag, - name, ap->permset, id); - count ++; + r = archive_mstring_get_mbs_l( + &ap->name, &name, &len, sc); + if (r != 0) + return (NULL); + if (count > 0) + *p++ = separator; + if (name == NULL || + (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID)) { + id = ap->id; + } else { + id = -1; } + append_entry(&p, prefix, ap->type, ap->tag, flags, name, + ap->permset, id); + count++; } - *acl_text = acl->acl_text; - if (acl_text_len != NULL) - *acl_text_len = strlen(acl->acl_text); - return (0); + /* Add terminating character */ + *p++ = '\0'; + + len = strlen(s); + + if ((ssize_t)len > (length - 1)) + __archive_errx(1, "Buffer overrun"); + + if (text_len != NULL) + *text_len = len; + + return (s); } static void @@ -770,8 +995,8 @@ append_id(char **p, int id) } static void -append_entry(char **p, const char *prefix, int tag, - const char *name, int perm, int id) +append_entry(char **p, const char *prefix, int type, + int tag, int flags, const char *name, int perm, int id) { if (prefix != NULL) { strcpy(*p, prefix); @@ -781,6 +1006,10 @@ append_entry(char **p, const char *prefi case ARCHIVE_ENTRY_ACL_USER_OBJ: name = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + strcpy(*p, "owner@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_USER: strcpy(*p, "user"); @@ -788,6 +1017,10 @@ append_entry(char **p, const char *prefi case ARCHIVE_ENTRY_ACL_GROUP_OBJ: name = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + strcpy(*p, "group@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_GROUP: strcpy(*p, "group"); @@ -802,48 +1035,147 @@ append_entry(char **p, const char *prefi name = NULL; id = -1; break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + strcpy(*p, "everyone@"); + name = NULL; + id = -1; + break; } *p += strlen(*p); *(*p)++ = ':'; - if (name != NULL) { - strcpy(*p, name); + if (((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) || + tag == ARCHIVE_ENTRY_ACL_USER || + tag == ARCHIVE_ENTRY_ACL_GROUP) { + if (name != NULL) { + strcpy(*p, name); + *p += strlen(*p); + } else if (tag == ARCHIVE_ENTRY_ACL_USER + || tag == ARCHIVE_ENTRY_ACL_GROUP) { + append_id(p, id); + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; + } + /* Solaris style has no second colon after other and mask */ + if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) + || (tag != ARCHIVE_ENTRY_ACL_OTHER + && tag != ARCHIVE_ENTRY_ACL_MASK)) + *(*p)++ = ':'; + } + if ((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { + /* POSIX.1e ACL perms */ + *(*p)++ = (perm & 0444) ? 'r' : '-'; + *(*p)++ = (perm & 0222) ? 'w' : '-'; + *(*p)++ = (perm & 0111) ? 'x' : '-'; + } else { + /* NFS4 ACL perms */ + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA | + ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? 'r' : '-'; + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA | + ARCHIVE_ENTRY_ACL_ADD_FILE)) ? 'w' : '-'; + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_EXECUTE)) ? 'x' : '-'; + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA | + ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? 'p' : '-'; + *(*p)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? 'd' : '-'; + *(*p)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? 'D' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? 'a' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? 'A' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? 'R' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS) ? 'W' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_ACL) ? 'c' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_ACL) ? 'C' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_OWNER) ? 'o' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_SYNCHRONIZE) ? 's' : '-'; + *(*p)++ = ':'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT) ? 'f' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT) ? 'd' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY) ? 'i' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT) ? 'n' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS) ? 'S' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS) ? 'F' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) ? 'I' : '-'; + *(*p)++ = ':'; + switch (type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + strcpy(*p, "allow"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + strcpy(*p, "deny"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + strcpy(*p, "audit"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + strcpy(*p, "alarm"); + break; + } *p += strlen(*p); - } else if (tag == ARCHIVE_ENTRY_ACL_USER - || tag == ARCHIVE_ENTRY_ACL_GROUP) { - append_id(p, id); - id = -1; } - *(*p)++ = ':'; - *(*p)++ = (perm & 0444) ? 'r' : '-'; - *(*p)++ = (perm & 0222) ? 'w' : '-'; - *(*p)++ = (perm & 0111) ? 'x' : '-'; if (id != -1) { *(*p)++ = ':'; append_id(p, id); } - **p = '\0'; } /* - * Parse a textual ACL. This automatically recognizes and supports - * extensions described above. The 'type' argument is used to - * indicate the type that should be used for any entries not - * explicitly marked as "default:". + * Parse a wide ACL text string. + * + * The want_type argument may be one of the following: + * ARCHIVE_ENTRY_ACL_TYPE_ACCESS - text is a POSIX.1e ACL of type ACCESS + * ARCHIVE_ENTRY_ACL_TYPE_DEFAULT - text is a POSIX.1e ACL of type DEFAULT + * ARCHIVE_ENTRY_ACL_TYPE_NFS4 - text is as a NFSv4 ACL + * + * POSIX.1e ACL entries prefixed with "default:" are treated as + * ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4 */ int -archive_acl_parse_w(struct archive_acl *acl, - const wchar_t *text, int default_type) +archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text, + int want_type) { struct { const wchar_t *start; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 11 00:56:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5D30CD8217; Sat, 11 Feb 2017 00:56:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CE881F80; Sat, 11 Feb 2017 00:56:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B0uJGQ058389; Sat, 11 Feb 2017 00:56:19 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B0uJeI058384; Sat, 11 Feb 2017 00:56:19 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702110056.v1B0uJeI058384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 11 Feb 2017 00:56: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: r313571 - in stable/10: . contrib/libarchive contrib/libarchive/cpio contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test ... 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 00:56:20 -0000 Author: mm Date: Sat Feb 11 00:56:18 2017 New Revision: 313571 URL: https://svnweb.freebsd.org/changeset/base/313571 Log: MFC r310866,310868,310870,311903,313074: Sync libarchive with vendor. MFC r310866: PR #771: Add NFSv4 ACL support to pax and restricted pax NFSv4 ACL information may now be stored to and restored from tar archives. ACL must be non-trivial and supported by the underlying filesystem, e.g. natively by ZFS or by UFS with the NFSv4 ACL enable flag set. MFC r310868: PR #843: Fix memory leak of struct archive_entry in cpio/cpio.c PR #851: Spelling fixes Fix two protoypes in manual page archive_read_disk.3 MFC r310870: Use __LA_DEPRECATED macro with functions deprecated in 379867e MFC r311903: #691: Support for SCHILY.xattr extended attributes #854: Spelling fixes Multiple fixes in ACL code: - prefer acl_set_fd_np() to acl_set_fd() - if acl_set_fd_np() fails, do no fallback to acl_set_file() - do not warn if trying to write ACLs to a filesystem without ACL support - fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs MFC r313074: - support extracting NFSv4 ACLs from Solaris tar archives - bugfixes and optimizations in the ACL code - multiple fixes in the test suite - typo and other small bugfixes Security fixes: - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335) - LHA reader: heap-buffer-overflow in lha_read_file_header_1() (CVE-2017-5601) - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream() (OSS-Fuzz 453) - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443) - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458) Memory leak fixes: - ACL support: free memory allocated by acl_get_qualifier() - disk writer: missing free in create_filesystem_object() - file reader: fd leak (Coverity 1016755) - gnutar writer: fix free in archive_write_gnutar_header() (Coverity 101675) - iso 9660 reader: missing free in parse_file_info() (partial Coverity 1016754) - program reader: missing free in __archive_read_program() - program writer: missing free in __archive_write_program_free() - xar reader: missing free in xar_cleanup() - xar reader: missing frees in expat_xmlattr_setup() (Coverity 1229979-1229981) - xar writer: missing free in file_free() - zip reader: missing free in zip_read_local_file_header() List of all libarchive issues at OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=libarchive Security: CVE-2017-5601 Added: stable/10/contrib/libarchive/libarchive/test/test_acl_pax_nfs4.tar.uu - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_acl_pax_nfs4.tar.uu stable/10/contrib/libarchive/libarchive/test/test_acl_pax_posix1e.tar.uu - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_acl_pax_posix1e.tar.uu stable/10/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c - copied unchanged from r313074, head/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c stable/10/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c - copied unchanged from r313074, head/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c stable/10/contrib/libarchive/libarchive/test/test_acl_text.c - copied, changed from r310866, head/contrib/libarchive/libarchive/test/test_acl_text.c stable/10/contrib/libarchive/libarchive/test/test_compat_star_acl.c - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_compat_star_acl.c stable/10/contrib/libarchive/libarchive/test/test_compat_star_acl_nfs4.tar.uu - copied unchanged from r310866, head/contrib/libarchive/libarchive/test/test_compat_star_acl_nfs4.tar.uu stable/10/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c - copied unchanged from r311903, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c stable/10/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu - copied unchanged from r311903, head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu Deleted: stable/10/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c stable/10/contrib/libarchive/libarchive/test/test_acl_freebsd_posix1e.c stable/10/contrib/libarchive/libarchive/test/test_acl_pax.tar.uu stable/10/contrib/libarchive/libarchive/test/test_compat_star_acl_posix1e.c Modified: stable/10/ObsoleteFiles.inc stable/10/contrib/libarchive/NEWS stable/10/contrib/libarchive/cpio/cpio.c stable/10/contrib/libarchive/libarchive/archive_acl.c stable/10/contrib/libarchive/libarchive/archive_acl_private.h stable/10/contrib/libarchive/libarchive/archive_entry.c stable/10/contrib/libarchive/libarchive/archive_entry.h stable/10/contrib/libarchive/libarchive/archive_entry_acl.3 stable/10/contrib/libarchive/libarchive/archive_entry_locale.h stable/10/contrib/libarchive/libarchive/archive_entry_strmode.c stable/10/contrib/libarchive/libarchive/archive_match.c stable/10/contrib/libarchive/libarchive/archive_platform.h stable/10/contrib/libarchive/libarchive/archive_random.c stable/10/contrib/libarchive/libarchive/archive_rb.c stable/10/contrib/libarchive/libarchive/archive_read_disk.3 stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_read_open_filename.c stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c stable/10/contrib/libarchive/libarchive/archive_read_support_filter_program.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_7zip.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_lha.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_xar.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_zip.c stable/10/contrib/libarchive/libarchive/archive_string.c stable/10/contrib/libarchive/libarchive/archive_string.h stable/10/contrib/libarchive/libarchive/archive_string_composition.h stable/10/contrib/libarchive/libarchive/archive_write.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter_program.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter_xz.c stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_write_open.3 stable/10/contrib/libarchive/libarchive/archive_write_set_format_7zip.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_warc.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_xar.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_zip.c stable/10/contrib/libarchive/libarchive/libarchive-formats.5 stable/10/contrib/libarchive/libarchive/tar.5 stable/10/contrib/libarchive/libarchive/test/main.c stable/10/contrib/libarchive/libarchive/test/test.h stable/10/contrib/libarchive/libarchive/test/test_acl_nfs4.c stable/10/contrib/libarchive/libarchive/test/test_acl_pax.c stable/10/contrib/libarchive/libarchive/test/test_acl_posix1e.c stable/10/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c stable/10/contrib/libarchive/libarchive/test/test_archive_string.c stable/10/contrib/libarchive/libarchive/test/test_compat_gtar.c stable/10/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c stable/10/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu stable/10/contrib/libarchive/libarchive/test/test_compat_uudecode.c stable/10/contrib/libarchive/libarchive/test/test_fuzz.c stable/10/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c stable/10/contrib/libarchive/libarchive/test/test_read_filter_lzop.c stable/10/contrib/libarchive/libarchive/test/test_read_filter_lzop_multiple_parts.c stable/10/contrib/libarchive/libarchive/test/test_read_format_7zip.c stable/10/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c stable/10/contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_comment_stored.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_filename.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_mac_metadata.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_malformed.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_nested.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_padded.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_sfx.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c stable/10/contrib/libarchive/libarchive/test/test_sparse_basic.c stable/10/contrib/libarchive/libarchive/test/test_write_disk_secure746.c stable/10/contrib/libarchive/libarchive/test/test_write_filter_lz4.c stable/10/contrib/libarchive/libarchive/test/test_write_filter_lzop.c stable/10/contrib/libarchive/libarchive/test/test_write_format_iso9660.c stable/10/contrib/libarchive/libarchive/test/test_write_format_iso9660_zisofs.c stable/10/contrib/libarchive/libarchive/test/test_write_format_zip_large.c stable/10/contrib/libarchive/libarchive/test/test_write_format_zip_zip64.c stable/10/contrib/libarchive/libarchive/xxhash.c stable/10/contrib/libarchive/tar/test/test_option_uid_uname.c stable/10/contrib/libarchive/tar/util.c stable/10/lib/libarchive/config_freebsd.h stable/10/lib/libarchive/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sat Feb 11 00:54:16 2017 (r313570) +++ stable/10/ObsoleteFiles.inc Sat Feb 11 00:56:18 2017 (r313571) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170211: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu +OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu # 20161229: Three files from gnop tests consolidated into one OLD_FILES+=usr/tests/sys/geom/class/nop/1_test OLD_FILES+=usr/tests/sys/geom/class/nop/2_test Modified: stable/10/contrib/libarchive/NEWS ============================================================================== --- stable/10/contrib/libarchive/NEWS Sat Feb 11 00:54:16 2017 (r313570) +++ stable/10/contrib/libarchive/NEWS Sat Feb 11 00:56:18 2017 (r313571) @@ -1,3 +1,10 @@ +Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin) + +Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates + +Dec 27, 2016: NFSv4 ACL read and write support for pax + Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() + Oct 26, 2016: Remove liblzmadec support Oct 23, 2016: libarchive 3.2.2 released Modified: stable/10/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.c Sat Feb 11 00:54:16 2017 (r313570) +++ stable/10/contrib/libarchive/cpio/cpio.c Sat Feb 11 00:56:18 2017 (r313571) @@ -703,6 +703,7 @@ file_to_archive(struct cpio *cpio, const lafe_warnc(0, "%s", archive_error_string(cpio->archive_read_disk)); if (r <= ARCHIVE_FAILED) { + archive_entry_free(entry); cpio->return_value = 1; return (r); } Modified: stable/10/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_acl.c Sat Feb 11 00:54:16 2017 (r313570) +++ stable/10/contrib/libarchive/libarchive/archive_acl.c Sat Feb 11 00:56:18 2017 (r313571) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003-2010 Tim Kientzle + * Copyright (c) 2016 Martin Matuska * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,23 +56,31 @@ static struct archive_acl_entry *acl_new static int archive_acl_add_entry_len_l(struct archive_acl *acl, int type, int permset, int tag, int id, const char *name, size_t len, struct archive_string_conv *sc); +static int archive_acl_text_want_type(struct archive_acl *acl, int flags); +static ssize_t archive_acl_text_len(struct archive_acl *acl, int want_type, + int flags, int wide, struct archive *a, + struct archive_string_conv *sc); static int isint_w(const wchar_t *start, const wchar_t *end, int *result); static int ismode_w(const wchar_t *start, const wchar_t *end, int *result); +static int is_nfs4_flags_w(const wchar_t *start, const wchar_t *end, + int *result); +static int is_nfs4_perms_w(const wchar_t *start, const wchar_t *end, + int *result); static void next_field_w(const wchar_t **wp, const wchar_t **start, const wchar_t **end, wchar_t *sep); -static int prefix_w(const wchar_t *start, const wchar_t *end, - const wchar_t *test); -static void append_entry_w(wchar_t **wp, const wchar_t *prefix, int tag, - const wchar_t *wname, int perm, int id); +static void append_entry_w(wchar_t **wp, const wchar_t *prefix, int type, + int tag, int flags, const wchar_t *wname, int perm, int id); static void append_id_w(wchar_t **wp, int id); static int isint(const char *start, const char *end, int *result); static int ismode(const char *start, const char *end, int *result); +static int is_nfs4_flags(const char *start, const char *end, + int *result); +static int is_nfs4_perms(const char *start, const char *end, + int *result); static void next_field(const char **p, const char **start, const char **end, char *sep); -static int prefix_c(const char *start, const char *end, - const char *test); -static void append_entry(char **p, const char *prefix, int tag, - const char *name, int perm, int id); +static void append_entry(char **p, const char *prefix, int type, + int tag, int flags, const char *name, int perm, int id); static void append_id(char **p, int id); void @@ -340,6 +349,15 @@ archive_acl_count(struct archive_acl *ac } /* + * Return a bitmask of stored ACL types in an ACL list + */ +int +archive_acl_types(struct archive_acl *acl) +{ + return (acl->acl_types); +} + +/* * Prepare for reading entries from the ACL data. Returns a count * of entries matching "want_type", or zero if there are no * non-extended ACL entries of that type. @@ -375,8 +393,8 @@ archive_acl_reset(struct archive_acl *ac * standard permissions and include them in the returned list. */ int -archive_acl_next(struct archive *a, struct archive_acl *acl, int want_type, int *type, - int *permset, int *tag, int *id, const char **name) +archive_acl_next(struct archive *a, struct archive_acl *acl, int want_type, + int *type, int *permset, int *tag, int *id, const char **name) { *name = NULL; *id = -1; @@ -441,130 +459,273 @@ archive_acl_next(struct archive *a, stru } /* - * Generate a text version of the ACL. The flags parameter controls - * the style of the generated ACL. + * Determine what type of ACL do we want */ -const wchar_t * -archive_acl_text_w(struct archive *a, struct archive_acl *acl, int flags) +static int +archive_acl_text_want_type(struct archive_acl *acl, int flags) { - int count; - size_t length; - const wchar_t *wname; - const wchar_t *prefix; - wchar_t separator; - struct archive_acl_entry *ap; - int id, r; - wchar_t *wp; + int want_type; - if (acl->acl_text_w != NULL) { - free (acl->acl_text_w); - acl->acl_text_w = NULL; + /* Check if ACL is NFSv4 */ + if ((acl->acl_types & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + /* NFSv4 should never mix with POSIX.1e */ + if ((acl->acl_types & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) + return (0); + else + return (ARCHIVE_ENTRY_ACL_TYPE_NFS4); } - separator = L','; + /* Now deal with POSIX.1e ACLs */ + + want_type = 0; + if ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) + want_type |= ARCHIVE_ENTRY_ACL_TYPE_ACCESS; + if ((flags & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) + want_type |= ARCHIVE_ENTRY_ACL_TYPE_DEFAULT; + + /* By default we want both access and default ACLs */ + if (want_type == 0) + return (ARCHIVE_ENTRY_ACL_TYPE_POSIX1E); + + return (want_type); +} + +/* + * Calculate ACL text string length + */ +static ssize_t +archive_acl_text_len(struct archive_acl *acl, int want_type, int flags, + int wide, struct archive *a, struct archive_string_conv *sc) { + struct archive_acl_entry *ap; + const char *name; + const wchar_t *wname; + int count, idlen, tmp, r; + ssize_t length; + size_t len; + count = 0; length = 0; - ap = acl->acl_head; - while (ap != NULL) { - if ((ap->type & flags) != 0) { - count++; - if ((flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) && - (ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT)) - length += 8; /* "default:" */ - length += 5; /* tag name */ - length += 1; /* colon */ - r = archive_mstring_get_wcs(a, &ap->name, &wname); - if (r == 0 && wname != NULL) - length += wcslen(wname); - else if (r < 0 && errno == ENOMEM) - return (NULL); - else - length += sizeof(uid_t) * 3 + 1; - length ++; /* colon */ + for (ap = acl->acl_head; ap != NULL; ap = ap->next) { + if ((ap->type & want_type) == 0) + continue; + /* + * Filemode-mapping ACL entries are stored exclusively in + * ap->mode so they should not be in the list + */ + if ((ap->type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) + && (ap->tag == ARCHIVE_ENTRY_ACL_USER_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_OTHER)) + continue; + count++; + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0 + && (ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) + length += 8; /* "default:" */ + switch (ap->tag) { + case ARCHIVE_ENTRY_ACL_USER_OBJ: + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + length += 6; /* "owner@" */ + break; + } + /* FALLTHROUGH */ + case ARCHIVE_ENTRY_ACL_USER: + case ARCHIVE_ENTRY_ACL_MASK: + length += 4; /* "user", "mask" */ + break; + case ARCHIVE_ENTRY_ACL_GROUP_OBJ: + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + length += 6; /* "group@" */ + break; + } + /* FALLTHROUGH */ + case ARCHIVE_ENTRY_ACL_GROUP: + case ARCHIVE_ENTRY_ACL_OTHER: + length += 5; /* "group", "other" */ + break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + length += 9; /* "everyone@" */ + break; + } + length += 1; /* colon after tag */ + if (ap->tag == ARCHIVE_ENTRY_ACL_USER || + ap->tag == ARCHIVE_ENTRY_ACL_GROUP) { + if (wide) { + r = archive_mstring_get_wcs(a, &ap->name, + &wname); + if (r == 0 && wname != NULL) + length += wcslen(wname); + else if (r < 0 && errno == ENOMEM) + return (0); + else + length += sizeof(uid_t) * 3 + 1; + } else { + r = archive_mstring_get_mbs_l(&ap->name, &name, + &len, sc); + if (r != 0) + return (0); + if (len > 0 && name != NULL) + length += len; + else + length += sizeof(uid_t) * 3 + 1; + } + length += 1; /* colon after user or group name */ + } else if (want_type != ARCHIVE_ENTRY_ACL_TYPE_NFS4) + length += 1; /* 2nd colon empty user,group or other */ + + if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) != 0) + && ((want_type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) + && (ap->tag == ARCHIVE_ENTRY_ACL_OTHER + || ap->tag == ARCHIVE_ENTRY_ACL_MASK)) { + /* Solaris has no colon after other: and mask: */ + length = length - 1; + } + + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* rwxpdDaARWcCos:fdinSFI:deny */ + length += 27; + if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_DENY) == 0) + length += 1; /* allow, alarm, audit */ + } else length += 3; /* rwx */ + + if ((ap->tag == ARCHIVE_ENTRY_ACL_USER || + ap->tag == ARCHIVE_ENTRY_ACL_GROUP) && + (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) != 0) { length += 1; /* colon */ - length += max(sizeof(uid_t), sizeof(gid_t)) * 3 + 1; - length ++; /* newline */ + /* ID digit count */ + idlen = 1; + tmp = ap->id; + while (tmp > 9) { + tmp = tmp / 10; + idlen++; + } + length += idlen; } - ap = ap->next; + length ++; /* entry separator */ } - if (count > 0 && ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0)) { - length += 10; /* "user::rwx\n" */ - length += 11; /* "group::rwx\n" */ - length += 11; /* "other::rwx\n" */ - } + /* Add filemode-mapping access entries to the length */ + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + if ((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) != 0) { + /* "user::rwx\ngroup::rwx\nother:rwx\n" */ + length += 31; + } else { + /* "user::rwx\ngroup::rwx\nother::rwx\n" */ + length += 32; + } + } else if (count == 0) + return (0); - if (count == 0) + /* The terminating character is included in count */ + return (length); +} + +/* + * Generate a wide text version of the ACL. The flags parameter controls + * the type and style of the generated ACL. + */ +wchar_t * +archive_acl_to_text_w(struct archive_acl *acl, ssize_t *text_len, int flags, + struct archive *a) +{ + int count; + ssize_t length; + size_t len; + const wchar_t *wname; + const wchar_t *prefix; + wchar_t separator; + struct archive_acl_entry *ap; + int id, r, want_type; + wchar_t *wp, *ws; + + want_type = archive_acl_text_want_type(acl, flags); + + /* Both NFSv4 and POSIX.1 types found */ + if (want_type == 0) + return (NULL); + + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) + flags |= ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT; + + length = archive_acl_text_len(acl, want_type, flags, 1, a, NULL); + + if (length == 0) return (NULL); + if (flags & ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA) + separator = L','; + else + separator = L'\n'; + /* Now, allocate the string and actually populate it. */ - wp = acl->acl_text_w = (wchar_t *)malloc(length * sizeof(wchar_t)); - if (wp == NULL) + wp = ws = (wchar_t *)malloc(length * sizeof(wchar_t)); + if (wp == NULL) { + if (errno == ENOMEM) + __archive_errx(1, "No memory"); return (NULL); + } count = 0; - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { - append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_USER_OBJ, NULL, + + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_USER_OBJ, flags, NULL, acl->mode & 0700, -1); - *wp++ = ','; - append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_GROUP_OBJ, NULL, + *wp++ = separator; + append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_GROUP_OBJ, flags, NULL, acl->mode & 0070, -1); - *wp++ = ','; - append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_OTHER, NULL, + *wp++ = separator; + append_entry_w(&wp, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_OTHER, flags, NULL, acl->mode & 0007, -1); count += 3; - - ap = acl->acl_head; - while (ap != NULL) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { - r = archive_mstring_get_wcs(a, &ap->name, &wname); - if (r == 0) { - *wp++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) - id = ap->id; - else - id = -1; - append_entry_w(&wp, NULL, ap->tag, wname, - ap->permset, id); - count++; - } else if (r < 0 && errno == ENOMEM) - return (NULL); - } - ap = ap->next; - } } - - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) { - if (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) + for (ap = acl->acl_head; ap != NULL; ap = ap->next) { + if ((ap->type & want_type) == 0) + continue; + /* + * Filemode-mapping ACL entries are stored exclusively in + * ap->mode so they should not be in the list + */ + if ((ap->type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) + && (ap->tag == ARCHIVE_ENTRY_ACL_USER_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_OTHER)) + continue; + if (ap->type == ARCHIVE_ENTRY_ACL_TYPE_DEFAULT && + (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) != 0) prefix = L"default:"; else prefix = NULL; - ap = acl->acl_head; - count = 0; - while (ap != NULL) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) { - r = archive_mstring_get_wcs(a, &ap->name, &wname); - if (r == 0) { - if (count > 0) - *wp++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) - id = ap->id; - else - id = -1; - append_entry_w(&wp, prefix, ap->tag, - wname, ap->permset, id); - count ++; - } else if (r < 0 && errno == ENOMEM) - return (NULL); - } - ap = ap->next; - } + r = archive_mstring_get_wcs(a, &ap->name, &wname); + if (r == 0) { + if (count > 0) + *wp++ = separator; + if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) + id = ap->id; + else + id = -1; + append_entry_w(&wp, prefix, ap->type, ap->tag, flags, + wname, ap->permset, id); + count++; + } else if (r < 0 && errno == ENOMEM) + return (NULL); } - return (acl->acl_text_w); -} + /* Add terminating character */ + *wp++ = L'\0'; + + len = wcslen(ws); + if ((ssize_t)len > (length - 1)) + __archive_errx(1, "Buffer overrun"); + + if (text_len != NULL) + *text_len = len; + + return (ws); +} static void append_id_w(wchar_t **wp, int id) @@ -577,8 +738,8 @@ append_id_w(wchar_t **wp, int id) } static void -append_entry_w(wchar_t **wp, const wchar_t *prefix, int tag, - const wchar_t *wname, int perm, int id) +append_entry_w(wchar_t **wp, const wchar_t *prefix, int type, + int tag, int flags, const wchar_t *wname, int perm, int id) { if (prefix != NULL) { wcscpy(*wp, prefix); @@ -588,6 +749,10 @@ append_entry_w(wchar_t **wp, const wchar case ARCHIVE_ENTRY_ACL_USER_OBJ: wname = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + wcscpy(*wp, L"owner@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_USER: wcscpy(*wp, L"user"); @@ -595,6 +760,10 @@ append_entry_w(wchar_t **wp, const wchar case ARCHIVE_ENTRY_ACL_GROUP_OBJ: wname = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + wcscpy(*wp, L"group@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_GROUP: wcscpy(*wp, L"group"); @@ -609,154 +778,210 @@ append_entry_w(wchar_t **wp, const wchar wname = NULL; id = -1; break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + wcscpy(*wp, L"everyone@"); + wname = NULL; + id = -1; + break; } *wp += wcslen(*wp); *(*wp)++ = L':'; - if (wname != NULL) { - wcscpy(*wp, wname); + if (((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) || + tag == ARCHIVE_ENTRY_ACL_USER || + tag == ARCHIVE_ENTRY_ACL_GROUP) { + if (wname != NULL) { + wcscpy(*wp, wname); + *wp += wcslen(*wp); + } else if (tag == ARCHIVE_ENTRY_ACL_USER + || tag == ARCHIVE_ENTRY_ACL_GROUP) { + append_id_w(wp, id); + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; + } + /* Solaris style has no second colon after other and mask */ + if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) + || (tag != ARCHIVE_ENTRY_ACL_OTHER + && tag != ARCHIVE_ENTRY_ACL_MASK)) + *(*wp)++ = L':'; + } + if ((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { + /* POSIX.1e ACL perms */ + *(*wp)++ = (perm & 0444) ? L'r' : L'-'; + *(*wp)++ = (perm & 0222) ? L'w' : L'-'; + *(*wp)++ = (perm & 0111) ? L'x' : L'-'; + } else { + /* NFS4 ACL perms */ + *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA | + ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? L'r' : L'-'; + *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA | + ARCHIVE_ENTRY_ACL_ADD_FILE)) ? L'w' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_EXECUTE) ? L'x' : L'-'; + *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA | + ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? L'p' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? L'd' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? L'D' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? L'a' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? L'A' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? L'R' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS) ? L'W' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_READ_ACL) ? L'c' : L'-'; + *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_WRITE_ACL) ? L'C' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_OWNER) ? L'o' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_SYNCHRONIZE) ? L's' : L'-'; + *(*wp)++ = L':'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT) ? L'f' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT) ? L'd' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY) ? L'i' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT) ? L'n' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS) ? L'S' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS) ? L'F' : L'-'; + *(*wp)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) ? L'I' : L'-'; + *(*wp)++ = L':'; + switch (type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + wcscpy(*wp, L"allow"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + wcscpy(*wp, L"deny"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + wcscpy(*wp, L"audit"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + wcscpy(*wp, L"alarm"); + break; + default: + break; + } *wp += wcslen(*wp); - } else if (tag == ARCHIVE_ENTRY_ACL_USER - || tag == ARCHIVE_ENTRY_ACL_GROUP) { - append_id_w(wp, id); - id = -1; } - *(*wp)++ = L':'; - *(*wp)++ = (perm & 0444) ? L'r' : L'-'; - *(*wp)++ = (perm & 0222) ? L'w' : L'-'; - *(*wp)++ = (perm & 0111) ? L'x' : L'-'; if (id != -1) { *(*wp)++ = L':'; append_id_w(wp, id); } - **wp = L'\0'; } -int -archive_acl_text_l(struct archive_acl *acl, int flags, - const char **acl_text, size_t *acl_text_len, +/* + * Generate a text version of the ACL. The flags parameter controls + * the type and style of the generated ACL. + */ +char * +archive_acl_to_text_l(struct archive_acl *acl, ssize_t *text_len, int flags, struct archive_string_conv *sc) { int count; - size_t length; + ssize_t length; + size_t len; const char *name; const char *prefix; char separator; struct archive_acl_entry *ap; - size_t len; - int id, r; - char *p; + int id, r, want_type; + char *p, *s; - if (acl->acl_text != NULL) { - free (acl->acl_text); - acl->acl_text = NULL; - } + want_type = archive_acl_text_want_type(acl, flags); - *acl_text = NULL; - if (acl_text_len != NULL) - *acl_text_len = 0; - separator = ','; - count = 0; - length = 0; - ap = acl->acl_head; - while (ap != NULL) { - if ((ap->type & flags) != 0) { - count++; - if ((flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) && - (ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT)) - length += 8; /* "default:" */ - length += 5; /* tag name */ - length += 1; /* colon */ - r = archive_mstring_get_mbs_l( - &ap->name, &name, &len, sc); - if (r != 0) - return (-1); - if (len > 0 && name != NULL) - length += len; - else - length += sizeof(uid_t) * 3 + 1; - length ++; /* colon */ - length += 3; /* rwx */ - length += 1; /* colon */ - length += max(sizeof(uid_t), sizeof(gid_t)) * 3 + 1; - length ++; /* newline */ - } - ap = ap->next; - } + /* Both NFSv4 and POSIX.1 types found */ + if (want_type == 0) + return (NULL); - if (count > 0 && ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0)) { - length += 10; /* "user::rwx\n" */ - length += 11; /* "group::rwx\n" */ - length += 11; /* "other::rwx\n" */ - } + if (want_type == ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) + flags |= ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT; - if (count == 0) - return (0); + length = archive_acl_text_len(acl, want_type, flags, 0, NULL, sc); + + if (length == 0) + return (NULL); + + if (flags & ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA) + separator = ','; + else + separator = '\n'; /* Now, allocate the string and actually populate it. */ - p = acl->acl_text = (char *)malloc(length); - if (p == NULL) - return (-1); + p = s = (char *)malloc(length * sizeof(char)); + if (p == NULL) { + if (errno == ENOMEM) + __archive_errx(1, "No memory"); + return (NULL); + } count = 0; - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { - append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_USER_OBJ, NULL, + + if ((want_type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_USER_OBJ, flags, NULL, acl->mode & 0700, -1); - *p++ = ','; - append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_GROUP_OBJ, NULL, + *p++ = separator; + append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_GROUP_OBJ, flags, NULL, acl->mode & 0070, -1); - *p++ = ','; - append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_OTHER, NULL, + *p++ = separator; + append_entry(&p, NULL, ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_OTHER, flags, NULL, acl->mode & 0007, -1); count += 3; - - for (ap = acl->acl_head; ap != NULL; ap = ap->next) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) == 0) - continue; - r = archive_mstring_get_mbs_l( - &ap->name, &name, &len, sc); - if (r != 0) - return (-1); - *p++ = separator; - if (name == NULL || (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID)) { - id = ap->id; - } else { - id = -1; - } - append_entry(&p, NULL, ap->tag, name, - ap->permset, id); - count++; - } } - - if ((flags & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) { - if (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) + for (ap = acl->acl_head; ap != NULL; ap = ap->next) { + if ((ap->type & want_type) == 0) + continue; + /* + * Filemode-mapping ACL entries are stored exclusively in + * ap->mode so they should not be in the list + */ + if ((ap->type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) + && (ap->tag == ARCHIVE_ENTRY_ACL_USER_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_GROUP_OBJ + || ap->tag == ARCHIVE_ENTRY_ACL_OTHER)) + continue; + if (ap->type == ARCHIVE_ENTRY_ACL_TYPE_DEFAULT && + (flags & ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT) != 0) prefix = "default:"; else prefix = NULL; - count = 0; - for (ap = acl->acl_head; ap != NULL; ap = ap->next) { - if ((ap->type & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) == 0) - continue; - r = archive_mstring_get_mbs_l( - &ap->name, &name, &len, sc); - if (r != 0) - return (-1); - if (count > 0) - *p++ = separator; - if (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID) - id = ap->id; - else - id = -1; - append_entry(&p, prefix, ap->tag, - name, ap->permset, id); - count ++; + r = archive_mstring_get_mbs_l( + &ap->name, &name, &len, sc); + if (r != 0) + return (NULL); + if (count > 0) + *p++ = separator; + if (name == NULL || + (flags & ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID)) { + id = ap->id; + } else { + id = -1; } + append_entry(&p, prefix, ap->type, ap->tag, flags, name, + ap->permset, id); + count++; } - *acl_text = acl->acl_text; - if (acl_text_len != NULL) - *acl_text_len = strlen(acl->acl_text); - return (0); + /* Add terminating character */ + *p++ = '\0'; + + len = strlen(s); + + if ((ssize_t)len > (length - 1)) + __archive_errx(1, "Buffer overrun"); + + if (text_len != NULL) + *text_len = len; + + return (s); } static void @@ -770,8 +995,8 @@ append_id(char **p, int id) } static void -append_entry(char **p, const char *prefix, int tag, - const char *name, int perm, int id) +append_entry(char **p, const char *prefix, int type, + int tag, int flags, const char *name, int perm, int id) { if (prefix != NULL) { strcpy(*p, prefix); @@ -781,6 +1006,10 @@ append_entry(char **p, const char *prefi case ARCHIVE_ENTRY_ACL_USER_OBJ: name = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + strcpy(*p, "owner@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_USER: strcpy(*p, "user"); @@ -788,6 +1017,10 @@ append_entry(char **p, const char *prefi case ARCHIVE_ENTRY_ACL_GROUP_OBJ: name = NULL; id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + strcpy(*p, "group@"); + break; + } /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_GROUP: strcpy(*p, "group"); @@ -802,48 +1035,147 @@ append_entry(char **p, const char *prefi name = NULL; id = -1; break; + case ARCHIVE_ENTRY_ACL_EVERYONE: + strcpy(*p, "everyone@"); + name = NULL; + id = -1; + break; } *p += strlen(*p); *(*p)++ = ':'; - if (name != NULL) { - strcpy(*p, name); + if (((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) || + tag == ARCHIVE_ENTRY_ACL_USER || + tag == ARCHIVE_ENTRY_ACL_GROUP) { + if (name != NULL) { + strcpy(*p, name); + *p += strlen(*p); + } else if (tag == ARCHIVE_ENTRY_ACL_USER + || tag == ARCHIVE_ENTRY_ACL_GROUP) { + append_id(p, id); + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; + } + /* Solaris style has no second colon after other and mask */ + if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) + || (tag != ARCHIVE_ENTRY_ACL_OTHER + && tag != ARCHIVE_ENTRY_ACL_MASK)) + *(*p)++ = ':'; + } + if ((type & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { + /* POSIX.1e ACL perms */ + *(*p)++ = (perm & 0444) ? 'r' : '-'; + *(*p)++ = (perm & 0222) ? 'w' : '-'; + *(*p)++ = (perm & 0111) ? 'x' : '-'; + } else { + /* NFS4 ACL perms */ + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA | + ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? 'r' : '-'; + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA | + ARCHIVE_ENTRY_ACL_ADD_FILE)) ? 'w' : '-'; + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_EXECUTE)) ? 'x' : '-'; + *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA | + ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? 'p' : '-'; + *(*p)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? 'd' : '-'; + *(*p)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? 'D' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? 'a' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? 'A' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? 'R' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS) ? 'W' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_READ_ACL) ? 'c' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_ACL) ? 'C' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_WRITE_OWNER) ? 'o' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_SYNCHRONIZE) ? 's' : '-'; + *(*p)++ = ':'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT) ? 'f' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT) ? 'd' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY) ? 'i' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT) ? 'n' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS) ? 'S' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS) ? 'F' : '-'; + *(*p)++ = (perm & + ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) ? 'I' : '-'; + *(*p)++ = ':'; + switch (type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + strcpy(*p, "allow"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + strcpy(*p, "deny"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + strcpy(*p, "audit"); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + strcpy(*p, "alarm"); + break; + } *p += strlen(*p); - } else if (tag == ARCHIVE_ENTRY_ACL_USER - || tag == ARCHIVE_ENTRY_ACL_GROUP) { - append_id(p, id); - id = -1; } - *(*p)++ = ':'; - *(*p)++ = (perm & 0444) ? 'r' : '-'; - *(*p)++ = (perm & 0222) ? 'w' : '-'; - *(*p)++ = (perm & 0111) ? 'x' : '-'; if (id != -1) { *(*p)++ = ':'; append_id(p, id); } - **p = '\0'; } /* - * Parse a textual ACL. This automatically recognizes and supports - * extensions described above. The 'type' argument is used to - * indicate the type that should be used for any entries not - * explicitly marked as "default:". + * Parse a wide ACL text string. + * + * The want_type argument may be one of the following: + * ARCHIVE_ENTRY_ACL_TYPE_ACCESS - text is a POSIX.1e ACL of type ACCESS + * ARCHIVE_ENTRY_ACL_TYPE_DEFAULT - text is a POSIX.1e ACL of type DEFAULT + * ARCHIVE_ENTRY_ACL_TYPE_NFS4 - text is as a NFSv4 ACL + * + * POSIX.1e ACL entries prefixed with "default:" are treated as + * ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4 */ int -archive_acl_parse_w(struct archive_acl *acl, - const wchar_t *text, int default_type) +archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text, + int want_type) { struct { const wchar_t *start; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 11 01:01:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9377ACD8437; Sat, 11 Feb 2017 01:01:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C566ED; Sat, 11 Feb 2017 01:01:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B10xg8059541; Sat, 11 Feb 2017 01:00:59 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B10x85059537; Sat, 11 Feb 2017 01:00:59 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702110100.v1B10x85059537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 11 Feb 2017 01:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313572 - head/contrib/libarchive/libarchive 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 01:01:00 -0000 Author: mm Date: Sat Feb 11 01:00:58 2017 New Revision: 313572 URL: https://svnweb.freebsd.org/changeset/base/313572 Log: MFV r313569:313569:313569: Sync libarchive with vendor Vendor bugfixes: cpio reader sanity fix (OSS-Fuzz 504) WARC reader sanity fixes (OSS-Fuzz 511, 526, 532, 552) mtree reader time parsing fix (OSS-Fuzz 538) XAR reader memleak fix (OSS-Fuzz 551) MFC after: 1 week Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Sat Feb 11 01:00:58 2017 (r313572) @@ -356,7 +356,7 @@ archive_read_format_cpio_read_header(str struct archive_entry *entry) { struct cpio *cpio; - const void *h; + const void *h, *hl; struct archive_string_conv *sconv; size_t namelength; size_t name_pad; @@ -406,11 +406,11 @@ archive_read_format_cpio_read_header(str "Rejecting malformed cpio archive: symlink contents exceed 1 megabyte"); return (ARCHIVE_FATAL); } - h = __archive_read_ahead(a, + hl = __archive_read_ahead(a, (size_t)cpio->entry_bytes_remaining, NULL); - if (h == NULL) + if (hl == NULL) return (ARCHIVE_FATAL); - if (archive_entry_copy_symlink_l(entry, (const char *)h, + if (archive_entry_copy_symlink_l(entry, (const char *)hl, (size_t)cpio->entry_bytes_remaining, sconv) != 0) { if (errno == ENOMEM) { archive_set_error(&a->archive, ENOMEM, @@ -434,7 +434,7 @@ archive_read_format_cpio_read_header(str * header. XXX */ /* Compare name to "TRAILER!!!" to test for end-of-archive. */ - if (namelength == 11 && memcmp((const char *)h, "TRAILER!!!", + if (namelength == 11 && strncmp((const char *)h, "TRAILER!!!", 11) == 0) { /* TODO: Store file location of start of block. */ archive_clear_error(&a->archive); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sat Feb 11 01:00:58 2017 (r313572) @@ -1608,8 +1608,11 @@ parse_keyword(struct archive_read *a, st if (*val == '.') { ++val; ns = (long)mtree_atol10(&val); - } else - ns = 0; + if (ns < 0) + ns = 0; + else if (ns > 999999999) + ns = 999999999; + } if (m > my_time_t_max) m = my_time_t_max; else if (m < my_time_t_min) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_warc.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Sat Feb 11 01:00:58 2017 (r313572) @@ -134,8 +134,8 @@ static ssize_t _warc_rdlen(const char *b static time_t _warc_rdrtm(const char *buf, size_t bsz); static time_t _warc_rdmtm(const char *buf, size_t bsz); static const char *_warc_find_eoh(const char *buf, size_t bsz); +static const char *_warc_find_eol(const char *buf, size_t bsz); - int archive_read_support_format_warc(struct archive *_a) { @@ -198,8 +198,8 @@ _warc_bid(struct archive_read *a, int be /* otherwise snarf the record's version number */ ver = _warc_rdver(hdr, nrd); - if (ver == 0U || ver > 10000U) { - /* oh oh oh, best not to wager ... */ + if (ver < 1200U || ver > 10000U) { + /* we only support WARC 0.12 to 1.0 */ return -1; } @@ -254,23 +254,32 @@ start_over: &a->archive, ARCHIVE_ERRNO_MISC, "Bad record header"); return (ARCHIVE_FATAL); - } else if ((ver = _warc_rdver(buf, eoh - buf)) > 10000U) { - /* nawww, I wish they promised backward compatibility - * anyhoo, in their infinite wisdom the 28500 guys might - * come up with something we can't possibly handle so - * best end things here */ + } + ver = _warc_rdver(buf, eoh - buf); + /* we currently support WARC 0.12 to 1.0 */ + if (ver == 0U) { archive_set_error( &a->archive, ARCHIVE_ERRNO_MISC, - "Unsupported record version"); + "Invalid record version"); return (ARCHIVE_FATAL); - } else if ((cntlen = _warc_rdlen(buf, eoh - buf)) < 0) { + } else if (ver < 1200U || ver > 10000U) { + archive_set_error( + &a->archive, ARCHIVE_ERRNO_MISC, + "Unsupported record version: %u.%u", + ver / 10000, (ver % 10000) / 100); + return (ARCHIVE_FATAL); + } + cntlen = _warc_rdlen(buf, eoh - buf); + if (cntlen < 0) { /* nightmare! the specs say content-length is mandatory * so I don't feel overly bad stopping the reader here */ archive_set_error( &a->archive, EINVAL, "Bad content length"); return (ARCHIVE_FATAL); - } else if ((rtime = _warc_rdrtm(buf, eoh - buf)) == (time_t)-1) { + } + rtime = _warc_rdrtm(buf, eoh - buf); + if (rtime == (time_t)-1) { /* record time is mandatory as per WARC/1.0, * so just barf here, fast and loud */ archive_set_error( @@ -284,7 +293,7 @@ start_over: if (ver != w->pver) { /* stringify this entry's version */ archive_string_sprintf(&w->sver, - "WARC/%u.%u", ver / 10000, ver % 10000); + "WARC/%u.%u", ver / 10000, (ver % 10000) / 100); /* remember the version */ w->pver = ver; } @@ -577,51 +586,41 @@ out: } static unsigned int -_warc_rdver(const char buf[10], size_t bsz) +_warc_rdver(const char *buf, size_t bsz) { static const char magic[] = "WARC/"; - unsigned int ver; - - (void)bsz; /* UNUSED */ + unsigned int ver = 0U; + unsigned int end = 0U; - if (memcmp(buf, magic, sizeof(magic) - 1U) != 0) { - /* nope */ - return 99999U; + if (bsz < 12 || memcmp(buf, magic, sizeof(magic) - 1U) != 0) { + /* buffer too small or invalid magic */ + return ver; } /* looks good so far, read the version number for a laugh */ buf += sizeof(magic) - 1U; - /* most common case gets a quick-check here */ - if (memcmp(buf, "1.0\r\n", 5U) == 0) { - ver = 10000U; - } else { - switch (*buf) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - if (buf[1U] == '.') { - char *on; - - /* set up major version */ - ver = (buf[0U] - '0') * 10000U; - /* minor version, anyone? */ - ver += (strtol(buf + 2U, &on, 10)) * 100U; - /* don't parse anything else */ - if (on > buf + 2U) { - break; - } - } - /* FALLTHROUGH */ - case '9': - default: - /* just make the version ridiculously high */ - ver = 999999U; - break; + + if (isdigit(buf[0U]) && (buf[1U] == '.') && isdigit(buf[2U])) { + /* we support a maximum of 2 digits in the minor version */ + if (isdigit(buf[3U])) + end = 1U; + /* set up major version */ + ver = (buf[0U] - '0') * 10000U; + /* set up minor version */ + if (end == 1U) { + ver += (buf[2U] - '0') * 1000U; + ver += (buf[3U] - '0') * 100U; + } else + ver += (buf[2U] - '0') * 100U; + /* + * WARC below version 0.12 has a space-separated header + * WARC 0.12 and above terminates the version with a CRLF + */ + if (ver >= 1200U) { + if (memcmp(buf + 3U + end, "\r\n", 2U) != 0) + ver = 0U; + } else if (ver < 1200U) { + if (!isblank(*(buf + 3U + end))) + ver = 0U; } } return ver; @@ -631,34 +630,27 @@ static unsigned int _warc_rdtyp(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Type:"; - const char *const eob = buf + bsz; - const char *val; + const char *val, *eol; if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) { /* no bother */ return WT_NONE; } - /* overread whitespace */ val += sizeof(_key) - 1U; - while (val < eob && isspace((unsigned char)*val)) + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return WT_NONE; + } + + /* overread whitespace */ + while (val < eol && isblank((unsigned char)*val)) ++val; - if (val + 8U > eob) { - ; - } else if (memcmp(val, "resource", 8U) == 0) { - return WT_RSRC; - } else if (memcmp(val, "warcinfo", 8U) == 0) { - return WT_INFO; - } else if (memcmp(val, "metadata", 8U) == 0) { - return WT_META; - } else if (memcmp(val, "request", 7U) == 0) { - return WT_REQ; - } else if (memcmp(val, "response", 8U) == 0) { - return WT_RSP; - } else if (memcmp(val, "conversi", 8U) == 0) { - return WT_CONV; - } else if (memcmp(val, "continua", 8U) == 0) { - return WT_CONT; + if (val + 8U == eol) { + if (memcmp(val, "resource", 8U) == 0) + return WT_RSRC; + else if (memcmp(val, "response", 8U) == 0) + return WT_RSP; } return WT_NONE; } @@ -667,10 +659,7 @@ static warc_string_t _warc_rduri(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Target-URI:"; - const char *const eob = buf + bsz; - const char *val; - const char *uri; - const char *eol; + const char *val, *uri, *eol, *p; warc_string_t res = {0U, NULL}; if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) { @@ -679,25 +668,32 @@ _warc_rduri(const char *buf, size_t bsz) } /* overread whitespace */ val += sizeof(_key) - 1U; - while (val < eob && isspace((unsigned char)*val)) + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return res; + } + + while (val < eol && isblank((unsigned char)*val)) ++val; /* overread URL designators */ - if ((uri = xmemmem(val, eob - val, "://", 3U)) == NULL) { + if ((uri = xmemmem(val, eol - val, "://", 3U)) == NULL) { /* not touching that! */ return res; - } else if ((eol = memchr(uri, '\n', eob - uri)) == NULL) { - /* no end of line? :O */ - return res; } - /* massage uri to point to after :// */ + /* spaces inside uri are not allowed, CRLF should follow */ + for (p = val; p < eol; p++) { + if (isspace(*p)) + return res; + } + + /* there must be at least space for ftp */ + if (uri < (val + 3U)) + return res; + + /* move uri to point to after :// */ uri += 3U; - /* also massage eol to point to the first whitespace - * after the last non-whitespace character before - * the end of the line */ - while (eol > uri && isspace((unsigned char)eol[-1])) - --eol; /* now then, inspect the URI */ if (memcmp(val, "file", 4U) == 0) { @@ -720,7 +716,7 @@ static ssize_t _warc_rdlen(const char *buf, size_t bsz) { static const char _key[] = "\r\nContent-Length:"; - const char *val; + const char *val, *eol; char *on = NULL; long int len; @@ -728,14 +724,24 @@ _warc_rdlen(const char *buf, size_t bsz) /* no bother */ return -1; } - - /* strtol kindly overreads whitespace for us, so use that */ val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL) { + /* no end of line */ + return -1; + } + + /* skip leading whitespace */ + while (val < eol && isblank(*val)) + val++; + /* there must be at least one digit */ + if (!isdigit(*val)) + return -1; len = strtol(val, &on, 10); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ + if (on != eol) { + /* line must end here */ return -1; } + return (size_t)len; } @@ -743,7 +749,7 @@ static time_t _warc_rdrtm(const char *buf, size_t bsz) { static const char _key[] = "\r\nWARC-Date:"; - const char *val; + const char *val, *eol; char *on = NULL; time_t res; @@ -751,13 +757,17 @@ _warc_rdrtm(const char *buf, size_t bsz) /* no bother */ return (time_t)-1; } + val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL ) { + /* no end of line */ + return -1; + } /* xstrpisotime() kindly overreads whitespace for us, so use that */ - val += sizeof(_key) - 1U; res = xstrpisotime(val, &on); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ - return (time_t)-1; + if (on != eol) { + /* line must end here */ + return -1; } return res; } @@ -766,7 +776,7 @@ static time_t _warc_rdmtm(const char *buf, size_t bsz) { static const char _key[] = "\r\nLast-Modified:"; - const char *val; + const char *val, *eol; char *on = NULL; time_t res; @@ -774,13 +784,17 @@ _warc_rdmtm(const char *buf, size_t bsz) /* no bother */ return (time_t)-1; } + val += sizeof(_key) - 1U; + if ((eol = _warc_find_eol(val, buf + bsz - val)) == NULL ) { + /* no end of line */ + return -1; + } /* xstrpisotime() kindly overreads whitespace for us, so use that */ - val += sizeof(_key) - 1U; res = xstrpisotime(val, &on); - if (on == NULL || !isspace((unsigned char)*on)) { - /* hm, can we trust that number? Best not. */ - return (time_t)-1; + if (on != eol) { + /* line must end here */ + return -1; } return res; } @@ -797,4 +811,12 @@ _warc_find_eoh(const char *buf, size_t b return hit; } +static const char* +_warc_find_eol(const char *buf, size_t bsz) +{ + static const char _marker[] = "\r\n"; + const char *hit = xmemmem(buf, bsz, _marker, sizeof(_marker) - 1U); + + return hit; +} /* archive_read_support_format_warc.c ends here */ Modified: head/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Sat Feb 11 00:56:18 2017 (r313571) +++ head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Sat Feb 11 01:00:58 2017 (r313572) @@ -394,6 +394,7 @@ static void checksum_update(struct archi size_t, const void *, size_t); static int checksum_final(struct archive_read *, const void *, size_t, const void *, size_t); +static void checksum_cleanup(struct archive_read *); static int decompression_init(struct archive_read *, enum enctype); static int decompress(struct archive_read *, const void **, size_t *, const void *, size_t *); @@ -923,6 +924,7 @@ xar_cleanup(struct archive_read *a) int r; xar = (struct xar *)(a->format->data); + checksum_cleanup(a); r = decompression_cleanup(a); hdlink = xar->hdlink_list; while (hdlink != NULL) { @@ -1720,6 +1722,16 @@ decompression_cleanup(struct archive_rea } static void +checksum_cleanup(struct archive_read *a) { + struct xar *xar; + + xar = (struct xar *)(a->format->data); + + _checksum_final(&(xar->a_sumwrk), NULL, 0); + _checksum_final(&(xar->e_sumwrk), NULL, 0); +} + +static void xmlattr_cleanup(struct xmlattr_list *list) { struct xmlattr *attr, *next; From owner-svn-src-all@freebsd.org Sat Feb 11 01:07:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C011FCD86AE; Sat, 11 Feb 2017 01:07:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75F97A93; Sat, 11 Feb 2017 01:07:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B17l4Z062662; Sat, 11 Feb 2017 01:07:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B17loM062657; Sat, 11 Feb 2017 01:07:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702110107.v1B17loM062657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 11 Feb 2017 01:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313573 - in head/sys: arm/arm arm/include contrib/vchiq/interface/compat 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 01:07:48 -0000 Author: ian Date: Sat Feb 11 01:07:46 2017 New Revision: 313573 URL: https://svnweb.freebsd.org/changeset/base/313573 Log: Stop including sys/types.h from arm's machine/atomic.h, fix the places where atomic.h was being included without ensuring that types.h (via param.h) was included first, as required by atomic(9). Modified: head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/identcpu-v6.c head/sys/arm/arm/stack_machdep.c head/sys/arm/include/atomic.h head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/arm/identcpu-v4.c Sat Feb 11 01:07:46 2017 (r313573) @@ -43,8 +43,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/sys/arm/arm/identcpu-v6.c ============================================================================== --- head/sys/arm/arm/identcpu-v6.c Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/arm/identcpu-v6.c Sat Feb 11 01:07:46 2017 (r313573) @@ -43,8 +43,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/sys/arm/arm/stack_machdep.c ============================================================================== --- head/sys/arm/arm/stack_machdep.c Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/arm/stack_machdep.c Sat Feb 11 01:07:46 2017 (r313573) @@ -27,8 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/arm/include/atomic.h Sat Feb 11 01:07:46 2017 (r313573) @@ -39,7 +39,6 @@ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ -#include #include #ifndef _KERNEL Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.h ============================================================================== --- head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Sat Feb 11 01:00:58 2017 (r313572) +++ head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Sat Feb 11 01:07:46 2017 (r313573) @@ -28,8 +28,8 @@ #ifndef __VCHI_BSD_H__ #define __VCHI_BSD_H__ -#include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Sat Feb 11 02:00:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213FDCD9F97; Sat, 11 Feb 2017 02:00:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D394BE0C; Sat, 11 Feb 2017 02:00:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B20vsP087017; Sat, 11 Feb 2017 02:00:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B20vwK087009; Sat, 11 Feb 2017 02:00:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702110200.v1B20vwK087009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Feb 2017 02:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313574 - in stable/11/sys: arm/include arm64/include mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 02:00:59 -0000 Author: kib Date: Sat Feb 11 02:00:56 2017 New Revision: 313574 URL: https://svnweb.freebsd.org/changeset/base/313574 Log: MFC r313194: Define the vm_ooffset_t and vm_pindex_t types as machine-independend. Modified: stable/11/sys/arm/include/_types.h stable/11/sys/arm64/include/_types.h stable/11/sys/mips/include/_types.h stable/11/sys/powerpc/include/_types.h stable/11/sys/riscv/include/_types.h stable/11/sys/sparc64/include/_types.h stable/11/sys/sys/types.h stable/11/sys/x86/include/_types.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/_types.h ============================================================================== --- stable/11/sys/arm/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/arm/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -100,9 +100,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint32_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; typedef unsigned int ___wchar_t; Modified: stable/11/sys/arm64/include/_types.h ============================================================================== --- stable/11/sys/arm64/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/arm64/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -88,9 +88,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef unsigned int ___wchar_t; Modified: stable/11/sys/mips/include/_types.h ============================================================================== --- stable/11/sys/mips/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/mips/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -143,8 +143,6 @@ typedef __uint64_t __vm_paddr_t; typedef __uint32_t __vm_paddr_t; #endif -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_pindex_t; typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ Modified: stable/11/sys/powerpc/include/_types.h ============================================================================== --- stable/11/sys/powerpc/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/powerpc/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -135,8 +135,6 @@ typedef __uint32_t __vm_paddr_t; #endif typedef __uint32_t __vm_size_t; #endif -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_pindex_t; typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ Modified: stable/11/sys/riscv/include/_types.h ============================================================================== --- stable/11/sys/riscv/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/riscv/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -88,9 +88,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef int ___wchar_t; Modified: stable/11/sys/sparc64/include/_types.h ============================================================================== --- stable/11/sys/sparc64/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/sparc64/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -88,9 +88,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef int ___wchar_t; Modified: stable/11/sys/sys/types.h ============================================================================== --- stable/11/sys/sys/types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/sys/types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -250,9 +250,9 @@ typedef struct cap_rights cap_rights_t; #endif typedef __vm_offset_t vm_offset_t; -typedef __vm_ooffset_t vm_ooffset_t; +typedef __int64_t vm_ooffset_t; typedef __vm_paddr_t vm_paddr_t; -typedef __vm_pindex_t vm_pindex_t; +typedef __uint64_t vm_pindex_t; typedef __vm_size_t vm_size_t; typedef __rman_res_t rman_res_t; Modified: stable/11/sys/x86/include/_types.h ============================================================================== --- stable/11/sys/x86/include/_types.h Sat Feb 11 01:07:46 2017 (r313573) +++ stable/11/sys/x86/include/_types.h Sat Feb 11 02:00:56 2017 (r313574) @@ -142,8 +142,6 @@ typedef __uint32_t __vm_paddr_t; #endif typedef __uint32_t __vm_size_t; #endif -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_pindex_t; typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ From owner-svn-src-all@freebsd.org Sat Feb 11 02:33:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E3E3CDAF8D; Sat, 11 Feb 2017 02:33:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1134376; Sat, 11 Feb 2017 02:33:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B2Xn88000524; Sat, 11 Feb 2017 02:33:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B2XmH7000519; Sat, 11 Feb 2017 02:33:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702110233.v1B2XmH7000519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Feb 2017 02:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313575 - in head: sys/boot/pc98 usr.sbin/makefs usr.sbin/makefs/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 02:33:50 -0000 Author: emaste Date: Sat Feb 11 02:33:48 2017 New Revision: 313575 URL: https://svnweb.freebsd.org/changeset/base/313575 Log: makefs: make the buffer functions look exactly like the kernel ones From NetBSD christos Sat Jan 26 00:19:39 2013 +0000 make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile. ffs.c 1.54 ffs/buf.c 1.13 ffs/buf.h 1.3 ffs/ffs_alloc.c 1.21 ffs/ffs_balloc.c 1.15 Reviewed by: marcel, ngie Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8404 Added: head/sys/boot/pc98/ - copied from r312897, head/sys/boot/pc98/ Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/buf.h head/usr.sbin/makefs/ffs/ffs_alloc.c head/usr.sbin/makefs/ffs/ffs_balloc.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs.c Sat Feb 11 02:33:48 2017 (r313575) @@ -973,7 +973,7 @@ ffs_write_file(union dinode *din, uint32 errno = bwrite(bp); if (errno != 0) goto bad_ffs_write_file; - brelse(bp); + brelse(bp, 0); if (!isfile) p += chunk; } Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/buf.c Sat Feb 11 02:33:48 2017 (r313575) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.12 2004/06/20 22:20:18 jmc Exp $ */ +/* $NetBSD: buf.c,v 1.13 2004/06/20 22:20:18 jmc Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -60,10 +60,12 @@ extern int sectorsize; /* XXX: from ffs TAILQ_HEAD(buftailhead,buf) buftail; int -bread(int fd, struct fs *fs, daddr_t blkno, int size, struct buf **bpp) +bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused, + struct buf **bpp) { off_t offset; ssize_t rv; + struct fs *fs = vp->fs; assert (fs != NULL); assert (bpp != NULL); @@ -71,7 +73,7 @@ bread(int fd, struct fs *fs, daddr_t blk if (debug & DEBUG_BUF_BREAD) printf("bread: fs %p blkno %lld size %d\n", fs, (long long)blkno, size); - *bpp = getblk(fd, fs, blkno, size); + *bpp = getblk(vp, blkno, size, 0, 0, 0); offset = (*bpp)->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BREAD) printf("bread: bp %p blkno %lld offset %lld bcount %ld\n", @@ -95,7 +97,7 @@ bread(int fd, struct fs *fs, daddr_t blk } void -brelse(struct buf *bp) +brelse(struct buf *bp, int u1 __unused) { assert (bp != NULL); @@ -174,12 +176,16 @@ bcleanup(void) } struct buf * -getblk(int fd, struct fs *fs, daddr_t blkno, int size) +getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused, + int u2 __unused, int u3 __unused) { static int buftailinitted; struct buf *bp; void *n; + int fd = vp->fd; + struct fs *fs = vp->fs; + blkno += vp->offset; assert (fs != NULL); if (debug & DEBUG_BUF_GETBLK) printf("getblk: fs %p blkno %lld size %d\n", fs, Modified: head/usr.sbin/makefs/ffs/buf.h ============================================================================== --- head/usr.sbin/makefs/ffs/buf.h Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/buf.h Sat Feb 11 02:33:48 2017 (r313575) @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.2 2001/11/02 03:12:49 lukem Exp $ */ +/* $NetBSD: buf.h,v 1.3 2001/11/02 03:12:49 lukem Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -43,6 +43,15 @@ #include #include +struct ucred; + +struct vnode { + int fd; + void *fs; + void *v_data; + int offset; +}; + struct buf { void * b_data; long b_bufsize; @@ -56,10 +65,11 @@ struct buf { }; void bcleanup(void); -int bread(int, struct fs *, daddr_t, int, struct buf **); -void brelse(struct buf *); +int bread(struct vnode *, daddr_t, int, struct ucred *, + struct buf **); +void brelse(struct buf *, int); int bwrite(struct buf *); -struct buf * getblk(int, struct fs *, daddr_t, int); +struct buf * getblk(struct vnode *, daddr_t, int, int, int, int); #define bdwrite(bp) bwrite(bp) #define clrbuf(bp) memset((bp)->b_data, 0, (u_int)(bp)->b_bcount) Modified: head/usr.sbin/makefs/ffs/ffs_alloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_alloc.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/ffs_alloc.c Sat Feb 11 02:33:48 2017 (r313575) @@ -297,19 +297,20 @@ ffs_alloccg(struct inode *ip, int cg, da int error, frags, allocsiz, i; struct fs *fs = ip->i_fs; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize) return (0); - error = bread(ip->i_fd, ip->i_fs, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, &bp); + error = bread(&vp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return (0); } cgp = (struct cg *)bp->b_data; if (!cg_chkmagic_swap(cgp, needswap) || (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) { - brelse(bp); + brelse(bp, 0); return (0); } if (size == fs->fs_bsize) { @@ -332,7 +333,7 @@ ffs_alloccg(struct inode *ip, int cg, da * allocated, and hacked up */ if (cgp->cg_cs.cs_nbfree == 0) { - brelse(bp); + brelse(bp, 0); return (0); } bno = ffs_alloccgblk(ip, bp, bpref); @@ -432,6 +433,7 @@ ffs_blkfree(struct inode *ip, daddr_t bn int i, error, cg, blk, frags, bbase; struct fs *fs = ip->i_fs; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; if (size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -444,15 +446,15 @@ ffs_blkfree(struct inode *ip, daddr_t bn (uintmax_t)ip->i_number); return; } - error = bread(ip->i_fd, ip->i_fs, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, &bp); + error = bread(&vp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, + NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return; } cgp = (struct cg *)bp->b_data; if (!cg_chkmagic_swap(cgp, needswap)) { - brelse(bp); + brelse(bp, 0); return; } cgbno = dtogd(fs, bno); Modified: head/usr.sbin/makefs/ffs/ffs_balloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_balloc.c Sat Feb 11 02:00:56 2017 (r313574) +++ head/usr.sbin/makefs/ffs/ffs_balloc.c Sat Feb 11 02:33:48 2017 (r313575) @@ -89,6 +89,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t int32_t *allocblk, allociblk[NIADDR + 1]; int32_t *allocib; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; lbn = lblkno(fs, offset); size = blkoff(fs, offset) + bufsize; @@ -132,10 +133,10 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - fs->fs_bsize, bpp); + error = bread(&vp, lbn, fs->fs_bsize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -158,10 +159,10 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - osize, bpp); + error = bread(&vp, lbn, osize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -188,7 +189,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t if (error) return (error); if (bpp != NULL) { - bp = getblk(ip->i_fd, ip->i_fs, lbn, nsize); + bp = getblk(&vp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -226,7 +227,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t return error; nb = newb; *allocblk++ = nb; - bp = getblk(ip->i_fd, ip->i_fs, indirs[1].in_lbn, fs->fs_bsize); + bp = getblk(&vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -244,10 +245,9 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ for (i = 1;;) { - error = bread(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize, &bp); + error = bread(&vp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return error; } bap = (int32_t *)bp->b_data; @@ -256,20 +256,19 @@ ffs_balloc_ufs1(struct inode *ip, off_t break; i++; if (nb != 0) { - brelse(bp); + brelse(bp, 0); continue; } if (pref == 0) pref = ffs_blkpref_ufs1(ip, lbn, 0, (int32_t *)0); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; - nbp = getblk(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize); + nbp = getblk(&vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -278,7 +277,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t */ if ((error = bwrite(nbp)) != 0) { - brelse(bp); + brelse(bp, 0); return error; } bap[indirs[i - 1].in_off] = ufs_rw32(nb, needswap); @@ -294,13 +293,13 @@ ffs_balloc_ufs1(struct inode *ip, off_t pref = ffs_blkpref_ufs1(ip, lbn, indirs[num].in_off, &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(ip->i_fd, ip->i_fs, lbn, fs->fs_bsize); + nbp = getblk(&vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -314,11 +313,11 @@ ffs_balloc_ufs1(struct inode *ip, off_t bwrite(bp); return (0); } - brelse(bp); + brelse(bp, 0); if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, (int)fs->fs_bsize, &nbp); + error = bread(&vp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { - brelse(nbp); + brelse(nbp, 0); return error; } *bpp = nbp; @@ -340,6 +339,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t int64_t *allocblk, allociblk[NIADDR + 1]; int64_t *allocib; const int needswap = UFS_FSNEEDSWAP(fs); + struct vnode vp = { ip->i_fd, ip->i_fs, NULL, 0 }; lbn = lblkno(fs, offset); size = blkoff(fs, offset) + bufsize; @@ -383,10 +383,10 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - fs->fs_bsize, bpp); + error = bread(&vp, lbn, fs->fs_bsize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -409,10 +409,10 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, - osize, bpp); + error = bread(&vp, lbn, osize, NULL, + bpp); if (error) { - brelse(*bpp); + brelse(*bpp, 0); return (error); } } @@ -439,7 +439,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t if (error) return (error); if (bpp != NULL) { - bp = getblk(ip->i_fd, ip->i_fs, lbn, nsize); + bp = getblk(&vp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -477,7 +477,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t return error; nb = newb; *allocblk++ = nb; - bp = getblk(ip->i_fd, ip->i_fs, indirs[1].in_lbn, fs->fs_bsize); + bp = getblk(&vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -495,10 +495,9 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ for (i = 1;;) { - error = bread(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize, &bp); + error = bread(&vp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); if (error) { - brelse(bp); + brelse(bp, 0); return error; } bap = (int64_t *)bp->b_data; @@ -507,20 +506,19 @@ ffs_balloc_ufs2(struct inode *ip, off_t break; i++; if (nb != 0) { - brelse(bp); + brelse(bp, 0); continue; } if (pref == 0) pref = ffs_blkpref_ufs2(ip, lbn, 0, (int64_t *)0); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; - nbp = getblk(ip->i_fd, ip->i_fs, indirs[i].in_lbn, - fs->fs_bsize); + nbp = getblk(&vp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -529,7 +527,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t */ if ((error = bwrite(nbp)) != 0) { - brelse(bp); + brelse(bp, 0); return error; } bap[indirs[i - 1].in_off] = ufs_rw64(nb, needswap); @@ -545,13 +543,13 @@ ffs_balloc_ufs2(struct inode *ip, off_t pref = ffs_blkpref_ufs2(ip, lbn, indirs[num].in_off, &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp); + brelse(bp, 0); return error; } nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(ip->i_fd, ip->i_fs, lbn, fs->fs_bsize); + nbp = getblk(&vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -565,11 +563,11 @@ ffs_balloc_ufs2(struct inode *ip, off_t bwrite(bp); return (0); } - brelse(bp); + brelse(bp, 0); if (bpp != NULL) { - error = bread(ip->i_fd, ip->i_fs, lbn, (int)fs->fs_bsize, &nbp); + error = bread(&vp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { - brelse(nbp); + brelse(nbp, 0); return error; } *bpp = nbp; From owner-svn-src-all@freebsd.org Sat Feb 11 02:45:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9EC0CDA448; Sat, 11 Feb 2017 02:45:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D4C1C91; Sat, 11 Feb 2017 02:45:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B2jsiW004497; Sat, 11 Feb 2017 02:45:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B2jsic004496; Sat, 11 Feb 2017 02:45:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702110245.v1B2jsic004496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Feb 2017 02:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313576 - head/sys/boot/pc98 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 02:45:55 -0000 Author: emaste Date: Sat Feb 11 02:45:54 2017 New Revision: 313576 URL: https://svnweb.freebsd.org/changeset/base/313576 Log: Remove sys/boot/pc98 accidentally restored in r313575 Reported by: rpokala Deleted: head/sys/boot/pc98/ From owner-svn-src-all@freebsd.org Sat Feb 11 05:19:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE710CDA1F3; Sat, 11 Feb 2017 05:19:46 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58940671; Sat, 11 Feb 2017 05:19:46 +0000 (UTC) (envelope-from mmokhi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5JjGO067261; Sat, 11 Feb 2017 05:19:45 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5Jjm5067259; Sat, 11 Feb 2017 05:19:45 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201702110519.v1B5Jjm5067259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Sat, 11 Feb 2017 05:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313577 - in head: share/misc usr.bin/calendar/calendars 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:19:46 -0000 Author: mmokhi (ports committer) Date: Sat Feb 11 05:19:45 2017 New Revision: 313577 URL: https://svnweb.freebsd.org/changeset/base/313577 Log: Adding myself to committers-ports.dot and calendar.freebsd Submitted by: mmokhi Approved by: feld, mat (mentors) Differential Revision: https://reviews.freebsd.org/D9528 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sat Feb 11 02:45:54 2017 (r313576) +++ head/share/misc/committers-ports.dot Sat Feb 11 05:19:45 2017 (r313577) @@ -173,6 +173,7 @@ milki [label="Jonathan Chu\nmilki@FreeBS misha [label="Mikhail Pchelin\nmisha@FreeBSD.org\n2016/11/15"] miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2006/06/04"] mm [label="Martin Matuska\nmm@FreeBSD.org\n2007/04/04"] +mmokhi [label="Mahdi Mokhtari\nmmokhi@FreeBSD.org\n2017/02/09"] mnag [label="Marcus Alves Grando\nmnag@FreeBSD.org\n2005/09/15"] mva [label="Marcus von Appen\nmva@FreeBSD.org\n2009/02/16"] nemysis [label="Rusmir Dusko\nnemysis@FreeBSD.org\n2013/07/31"] @@ -372,6 +373,7 @@ erwin -> simon feld -> brnrd feld -> junovitch +feld -> mmokhi feld -> rezny fjoe -> danfe @@ -481,6 +483,7 @@ makc -> rakuco mat -> bmah mat -> dvl mat -> gordon +mat -> mmokhi mat -> tcberner mat -> thierry mat -> woodsb02 Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Feb 11 02:45:54 2017 (r313576) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Feb 11 05:19:45 2017 (r313577) @@ -28,6 +28,7 @@ 01/19 Ruslan Ermilov born in Simferopol, USSR, 1974 01/19 Marcelo S. Araujo born in Joinville, Santa Catarina, Brazil, 1981 01/20 Poul-Henning Kamp born in Korsoer, Denmark, 1966 +01/21 Mahdi Mokhtari born in Tehran, Iran, 1995 01/22 Johann Visagie born in Cape Town, South Africa, 1970 01/23 Hideyuki KURASHINA born in Niigata, Japan, 1982 01/24 Fabien Thomas born in Avignon, France, 1971 From owner-svn-src-all@freebsd.org Sat Feb 11 05:33:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A907CDA9FE; Sat, 11 Feb 2017 05:33:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5788310B0; Sat, 11 Feb 2017 05:33:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5XncF075493; Sat, 11 Feb 2017 05:33:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5XnxI075492; Sat, 11 Feb 2017 05:33:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702110533.v1B5XnxI075492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Feb 2017 05:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313578 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:33:50 -0000 Author: adrian Date: Sat Feb 11 05:33:49 2017 New Revision: 313578 URL: https://svnweb.freebsd.org/changeset/base/313578 Log: [net80211] add a sysctl that forces a vap restart. Well, vap restart really does "all restart" for now, which will be a good way of debugging firmware restart issues. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Sat Feb 11 05:19:45 2017 (r313577) +++ head/sys/net80211/ieee80211_freebsd.c Sat Feb 11 05:33:49 2017 (r313578) @@ -180,6 +180,26 @@ ieee80211_sysctl_radar(SYSCTL_HANDLER_AR return 0; } +/* + * For now, just restart everything. + * + * Later on, it'd be nice to have a separate VAP restart to + * full-device restart. + */ +static int +ieee80211_sysctl_vap_restart(SYSCTL_HANDLER_ARGS) +{ + struct ieee80211vap *vap = arg1; + int t = 0, error; + + error = sysctl_handle_int(oidp, &t, 0, req); + if (error || !req->newptr) + return error; + + ieee80211_restart_all(vap->iv_ic); + return 0; +} + void ieee80211_sysctl_attach(struct ieee80211com *ic) { @@ -259,6 +279,12 @@ ieee80211_sysctl_vattach(struct ieee8021 &vap->iv_ampdu_mintraffic[WME_AC_VI], 0, "VI traffic tx aggr threshold (pps)"); } + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "force_restart", CTLTYPE_INT | CTLFLAG_RW, vap, 0, + ieee80211_sysctl_vap_restart, "I", + "force a VAP restart"); + if (vap->iv_caps & IEEE80211_C_DFS) { SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "radar", CTLTYPE_INT | CTLFLAG_RW, vap->iv_ic, 0, From owner-svn-src-all@freebsd.org Sat Feb 11 05:41:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34C80CDACE2; Sat, 11 Feb 2017 05:41:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA0414C4; Sat, 11 Feb 2017 05:41:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5frWv078677; Sat, 11 Feb 2017 05:41:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5frLi078674; Sat, 11 Feb 2017 05:41:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110541.v1B5frLi078674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:41: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: r313579 - in stable/10/lib/libpam/modules: . pam_passwdqc pam_ssh 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:41:55 -0000 Author: ngie Date: Sat Feb 11 05:41:53 2017 New Revision: 313579 URL: https://svnweb.freebsd.org/changeset/base/313579 Log: MFC r312452: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libpam/modules/Makefile.inc stable/10/lib/libpam/modules/pam_passwdqc/Makefile stable/10/lib/libpam/modules/pam_ssh/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/Makefile.inc ============================================================================== --- stable/10/lib/libpam/modules/Makefile.inc Sat Feb 11 05:33:49 2017 (r313578) +++ stable/10/lib/libpam/modules/Makefile.inc Sat Feb 11 05:41:53 2017 (r313579) @@ -1,11 +1,11 @@ # $FreeBSD$ -PAMDIR= ${.CURDIR}/../../../../contrib/openpam +PAMDIR= ${SRCTOP}/contrib/openpam NO_INSTALLLIB= NO_PROFILE= -CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam +CFLAGS+= -I${PAMDIR}/include -I${SRCTOP}/lib/libpam # This is nasty. # For the static case, libpam.a depends on the modules. Modified: stable/10/lib/libpam/modules/pam_passwdqc/Makefile ============================================================================== --- stable/10/lib/libpam/modules/pam_passwdqc/Makefile Sat Feb 11 05:33:49 2017 (r313578) +++ stable/10/lib/libpam/modules/pam_passwdqc/Makefile Sat Feb 11 05:41:53 2017 (r313579) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../../../contrib/pam_modules/pam_passwdqc +SRCDIR= ${SRCTOP}/contrib/pam_modules/pam_passwdqc .PATH: ${SRCDIR} LIB= pam_passwdqc Modified: stable/10/lib/libpam/modules/pam_ssh/Makefile ============================================================================== --- stable/10/lib/libpam/modules/pam_ssh/Makefile Sat Feb 11 05:33:49 2017 (r313578) +++ stable/10/lib/libpam/modules/pam_ssh/Makefile Sat Feb 11 05:41:53 2017 (r313579) @@ -1,7 +1,7 @@ # PAM module for SSH # $FreeBSD$ -SSHDIR= ${.CURDIR}/../../../../crypto/openssh +SSHDIR= ${SRCTOP}/crypto/openssh LIB= pam_ssh MAN= pam_ssh.8 From owner-svn-src-all@freebsd.org Sat Feb 11 05:43:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6779BCDAD74; Sat, 11 Feb 2017 05:43:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 341A516B6; Sat, 11 Feb 2017 05:43:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5hY7Z079638; Sat, 11 Feb 2017 05:43:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5hYq5079637; Sat, 11 Feb 2017 05:43:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110543.v1B5hYq5079637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:43: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: r313580 - stable/10/lib/libpam/libpam 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:43:35 -0000 Author: ngie Date: Sat Feb 11 05:43:34 2017 New Revision: 313580 URL: https://svnweb.freebsd.org/changeset/base/313580 Log: MFC r312453: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libpam/libpam/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/libpam/Makefile ============================================================================== --- stable/10/lib/libpam/libpam/Makefile Sat Feb 11 05:41:53 2017 (r313579) +++ stable/10/lib/libpam/libpam/Makefile Sat Feb 11 05:43:34 2017 (r313580) @@ -35,7 +35,7 @@ # # $FreeBSD$ -OPENPAM= ${.CURDIR}/../../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man LIB= pam From owner-svn-src-all@freebsd.org Sat Feb 11 05:45:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6BA5CDAE00; Sat, 11 Feb 2017 05:45:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75C4F1812; Sat, 11 Feb 2017 05:45:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5j0kk079785; Sat, 11 Feb 2017 05:45:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5j0M5079782; Sat, 11 Feb 2017 05:45:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110545.v1B5j0M5079782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:45: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: r313581 - in stable/10/lib/libalias: libalias modules 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:45:01 -0000 Author: ngie Date: Sat Feb 11 05:45:00 2017 New Revision: 313581 URL: https://svnweb.freebsd.org/changeset/base/313581 Log: MFC r312454: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libalias/libalias/Makefile stable/10/lib/libalias/modules/Makefile stable/10/lib/libalias/modules/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libalias/libalias/Makefile ============================================================================== --- stable/10/lib/libalias/libalias/Makefile Sat Feb 11 05:43:34 2017 (r313580) +++ stable/10/lib/libalias/libalias/Makefile Sat Feb 11 05:45:00 2017 (r313581) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../sys/netinet/libalias +.PATH: ${SRCTOP}/sys/netinet/libalias LIB= alias SHLIBDIR?= /lib Modified: stable/10/lib/libalias/modules/Makefile ============================================================================== --- stable/10/lib/libalias/modules/Makefile Sat Feb 11 05:43:34 2017 (r313580) +++ stable/10/lib/libalias/modules/Makefile Sat Feb 11 05:45:00 2017 (r313581) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../../../sys/modules/libalias/modules/modules.inc" +.include "${SRCTOP}/sys/modules/libalias/modules/modules.inc" SUBDIR= ${MODULES} Modified: stable/10/lib/libalias/modules/Makefile.inc ============================================================================== --- stable/10/lib/libalias/modules/Makefile.inc Sat Feb 11 05:43:34 2017 (r313580) +++ stable/10/lib/libalias/modules/Makefile.inc Sat Feb 11 05:45:00 2017 (r313581) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../sys/netinet/libalias +.PATH: ${SRCTOP}/sys/netinet/libalias SHLIBDIR?= /lib LIB?= alias_${NAME} From owner-svn-src-all@freebsd.org Sat Feb 11 05:47:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06CB7CDAEBB; Sat, 11 Feb 2017 05:47:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD101980; Sat, 11 Feb 2017 05:47:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5lupp079963; Sat, 11 Feb 2017 05:47:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5luNh079956; Sat, 11 Feb 2017 05:47:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110547.v1B5luNh079956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:47: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: r313582 - in stable/10/lib/csu: amd64 arm i386-elf mips powerpc powerpc64 sparc64 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:47:58 -0000 Author: ngie Date: Sat Feb 11 05:47:56 2017 New Revision: 313582 URL: https://svnweb.freebsd.org/changeset/base/313582 Log: MFC r312455: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This implifies pathing in make/displayed output Modified: stable/10/lib/csu/amd64/Makefile stable/10/lib/csu/arm/Makefile stable/10/lib/csu/i386-elf/Makefile stable/10/lib/csu/mips/Makefile stable/10/lib/csu/powerpc/Makefile stable/10/lib/csu/powerpc64/Makefile stable/10/lib/csu/sparc64/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/csu/amd64/Makefile ============================================================================== --- stable/10/lib/csu/amd64/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/amd64/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include CFLAGS+= -fno-omit-frame-pointer all: ${OBJS} Modified: stable/10/lib/csu/arm/Makefile ============================================================================== --- stable/10/lib/csu/arm/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/arm/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include all: ${OBJS} Modified: stable/10/lib/csu/i386-elf/Makefile ============================================================================== --- stable/10/lib/csu/i386-elf/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/i386-elf/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crti.S crtn.S FILES= ${SRCS:N*.h:R:S/$/.o/g} gcrt1.o crt1.o Scrt1.o @@ -8,8 +8,8 @@ FILESOWN= ${LIBOWN} FILESGRP= ${LIBGRP} FILESMODE= ${LIBMODE} FILESDIR= ${LIBDIR} -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/libc/include CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s Modified: stable/10/lib/csu/mips/Makefile ============================================================================== --- stable/10/lib/csu/mips/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/mips/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include all: ${OBJS} Modified: stable/10/lib/csu/powerpc/Makefile ============================================================================== --- stable/10/lib/csu/powerpc/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/powerpc/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include all: ${OBJS} Modified: stable/10/lib/csu/powerpc64/Makefile ============================================================================== --- stable/10/lib/csu/powerpc64/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/powerpc64/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include \ +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include \ -mlongcall all: ${OBJS} Modified: stable/10/lib/csu/sparc64/Makefile ============================================================================== --- stable/10/lib/csu/sparc64/Makefile Sat Feb 11 05:45:00 2017 (r313581) +++ stable/10/lib/csu/sparc64/Makefile Sat Feb 11 05:47:56 2017 (r313582) @@ -1,11 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common +.PATH: ${.CURDIR:H}/common SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../../libc/include +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include all: ${OBJS} From owner-svn-src-all@freebsd.org Sat Feb 11 05:52:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B454CDA06C; Sat, 11 Feb 2017 05:52:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B8171D4B; Sat, 11 Feb 2017 05:52:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5qDeQ083701; Sat, 11 Feb 2017 05:52:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5qDgw083700; Sat, 11 Feb 2017 05:52:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110552.v1B5qDgw083700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:52: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: r313583 - stable/10/lib/libarchive 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:52:14 -0000 Author: ngie Date: Sat Feb 11 05:52:13 2017 New Revision: 313583 URL: https://svnweb.freebsd.org/changeset/base/313583 Log: MFC r312456: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libarchive/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libarchive/Makefile ============================================================================== --- stable/10/lib/libarchive/Makefile Sat Feb 11 05:47:56 2017 (r313582) +++ stable/10/lib/libarchive/Makefile Sat Feb 11 05:52:13 2017 (r313583) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive LIB= archive DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} ${LIBPTHREAD} ${LIBBSDXML} From owner-svn-src-all@freebsd.org Sat Feb 11 05:53:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9C1CDA0F5; Sat, 11 Feb 2017 05:53:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C3AD1EDE; Sat, 11 Feb 2017 05:53:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5rDeU083801; Sat, 11 Feb 2017 05:53:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5rDOc083800; Sat, 11 Feb 2017 05:53:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110553.v1B5rDOc083800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:53: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: r313584 - stable/10/lib/libauditd 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:53:14 -0000 Author: ngie Date: Sat Feb 11 05:53:13 2017 New Revision: 313584 URL: https://svnweb.freebsd.org/changeset/base/313584 Log: MFC r312457: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libauditd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libauditd/Makefile ============================================================================== --- stable/10/lib/libauditd/Makefile Sat Feb 11 05:52:13 2017 (r313583) +++ stable/10/lib/libauditd/Makefile Sat Feb 11 05:53:13 2017 (r313584) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm LIBAUDITDDIR= ${OPENBSMDIR}/libauditd LIBBSMDIR= ${OPENBSMDIR}/libbsm From owner-svn-src-all@freebsd.org Sat Feb 11 05:55:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B44BCDA1A1; Sat, 11 Feb 2017 05:55:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A84E9C; Sat, 11 Feb 2017 05:55:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5tPfq083971; Sat, 11 Feb 2017 05:55:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5tPO1083970; Sat, 11 Feb 2017 05:55:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110555.v1B5tPO1083970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:55: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: r313585 - stable/10/lib/libbegemot 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:55:26 -0000 Author: ngie Date: Sat Feb 11 05:55:25 2017 New Revision: 313585 URL: https://svnweb.freebsd.org/changeset/base/313585 Log: MFC r312458: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libbegemot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libbegemot/Makefile ============================================================================== --- stable/10/lib/libbegemot/Makefile Sat Feb 11 05:53:13 2017 (r313584) +++ stable/10/lib/libbegemot/Makefile Sat Feb 11 05:55:25 2017 (r313585) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBBEGEMOT_DIR=${.CURDIR}/../../contrib/libbegemot +LIBBEGEMOT_DIR=${SRCTOP}/contrib/libbegemot .PATH: ${LIBBEGEMOT_DIR} From owner-svn-src-all@freebsd.org Sat Feb 11 05:56:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09277CDA23B; Sat, 11 Feb 2017 05:56:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA08323C; Sat, 11 Feb 2017 05:56:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5umST084097; Sat, 11 Feb 2017 05:56:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5um35084096; Sat, 11 Feb 2017 05:56:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110556.v1B5um35084096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:56: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: r313586 - stable/10/lib/libblocksruntime 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:56:50 -0000 Author: ngie Date: Sat Feb 11 05:56:48 2017 New Revision: 313586 URL: https://svnweb.freebsd.org/changeset/base/313586 Log: MFC r312459: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libblocksruntime/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libblocksruntime/Makefile ============================================================================== --- stable/10/lib/libblocksruntime/Makefile Sat Feb 11 05:55:25 2017 (r313585) +++ stable/10/lib/libblocksruntime/Makefile Sat Feb 11 05:56:48 2017 (r313586) @@ -5,7 +5,7 @@ SHLIB_MAJOR=0 CFLAGS+=-I${.CURDIR} WARNS?= 2 -.PATH: ${.CURDIR}/../../contrib/compiler-rt/BlocksRuntime +.PATH: ${SRCTOP}/contrib/compiler-rt/BlocksRuntime INCS= Block.h Block_private.h SRCS= data.c runtime.c From owner-svn-src-all@freebsd.org Sat Feb 11 05:57:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED4B6CDA2BB; Sat, 11 Feb 2017 05:57:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA0BC3C7; Sat, 11 Feb 2017 05:57:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5vZko084198; Sat, 11 Feb 2017 05:57:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5vZ2i084197; Sat, 11 Feb 2017 05:57:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110557.v1B5vZ2i084197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:57: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: r313587 - stable/10/lib/libbluetooth 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:57:37 -0000 Author: ngie Date: Sat Feb 11 05:57:35 2017 New Revision: 313587 URL: https://svnweb.freebsd.org/changeset/base/313587 Log: MFC r312460: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libbluetooth/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libbluetooth/Makefile ============================================================================== --- stable/10/lib/libbluetooth/Makefile Sat Feb 11 05:56:48 2017 (r313586) +++ stable/10/lib/libbluetooth/Makefile Sat Feb 11 05:57:35 2017 (r313587) @@ -5,7 +5,7 @@ LIB= bluetooth MAN= bluetooth.3 WARNS?= 2 -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 4 From owner-svn-src-all@freebsd.org Sat Feb 11 05:58:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A8C8CDA319; Sat, 11 Feb 2017 05:58:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39D66760; Sat, 11 Feb 2017 05:58:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5wKTm084292; Sat, 11 Feb 2017 05:58:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5wK3u084291; Sat, 11 Feb 2017 05:58:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110558.v1B5wK3u084291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:58: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: r313588 - stable/10/lib/libbsm 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:58:21 -0000 Author: ngie Date: Sat Feb 11 05:58:20 2017 New Revision: 313588 URL: https://svnweb.freebsd.org/changeset/base/313588 Log: MFC r312461: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libbsm/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libbsm/Makefile ============================================================================== --- stable/10/lib/libbsm/Makefile Sat Feb 11 05:57:35 2017 (r313587) +++ stable/10/lib/libbsm/Makefile Sat Feb 11 05:58:20 2017 (r313588) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm LIBBSMDIR= ${OPENBSMDIR}/libbsm LIB= bsm From owner-svn-src-all@freebsd.org Sat Feb 11 05:59:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0C00CDA3F1; Sat, 11 Feb 2017 05:59:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D5E68C7; Sat, 11 Feb 2017 05:59:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B5xdIp084400; Sat, 11 Feb 2017 05:59:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B5xdEL084399; Sat, 11 Feb 2017 05:59:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110559.v1B5xdEL084399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 05:59: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: r313589 - stable/10/lib/libbsnmp/libbsnmp 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 05:59:40 -0000 Author: ngie Date: Sat Feb 11 05:59:39 2017 New Revision: 313589 URL: https://svnweb.freebsd.org/changeset/base/313589 Log: MFC r312462: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libbsnmp/libbsnmp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- stable/10/lib/libbsnmp/libbsnmp/Makefile Sat Feb 11 05:58:20 2017 (r313588) +++ stable/10/lib/libbsnmp/libbsnmp/Makefile Sat Feb 11 05:59:39 2017 (r313589) @@ -4,7 +4,7 @@ .include -CONTRIB= ${.CURDIR}/../../../contrib/bsnmp/lib +CONTRIB= ${SRCTOP}/contrib/bsnmp/lib .PATH: ${CONTRIB} LIB= bsnmp From owner-svn-src-all@freebsd.org Sat Feb 11 06:17:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C263CDAA44; Sat, 11 Feb 2017 06:17:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3091A1076; Sat, 11 Feb 2017 06:17:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6HAn0092690; Sat, 11 Feb 2017 06:17:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6HAOe092689; Sat, 11 Feb 2017 06:17:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110617.v1B6HAOe092689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:17: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: r313590 - stable/10/lib/libarchive/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:17:11 -0000 Author: ngie Date: Sat Feb 11 06:17:10 2017 New Revision: 313590 URL: https://svnweb.freebsd.org/changeset/base/313590 Log: Unbreak the build after ^/stable/10@r313571 Update FILES per tests removed in beforementioned commit, which were accidentally overlooked, no doubt due to conflicts after base packaging work. This is a direct commit to ^/stable/10 Reported by: Jenkins (FreeBSD-stable-10-amd64-build job) Modified: stable/10/lib/libarchive/tests/Makefile Modified: stable/10/lib/libarchive/tests/Makefile ============================================================================== --- stable/10/lib/libarchive/tests/Makefile Sat Feb 11 05:59:39 2017 (r313589) +++ stable/10/lib/libarchive/tests/Makefile Sat Feb 11 06:17:10 2017 (r313590) @@ -320,7 +320,8 @@ list.h: ${TESTS_SRCS} Makefile CLEANFILES+= list.h list.h.tmp FILES+= README -FILES+= test_acl_pax.tar.uu +FILES+= test_acl_pax_posix1e.tar.uu +FILES+= test_acl_pax_nfs4.tar.uu FILES+= test_archive_string_conversion.txt.Z.uu FILES+= test_compat_bzip2_1.tbz.uu FILES+= test_compat_bzip2_2.tbz.uu @@ -357,6 +358,7 @@ FILES+= test_compat_plexus_archiver_tar. FILES+= test_compat_solaris_pax_sparse_1.pax.Z.uu FILES+= test_compat_solaris_pax_sparse_2.pax.Z.uu FILES+= test_compat_solaris_tar_acl.tar.uu +FILES+= test_compat_star_acl_nfs4.tar.uu FILES+= test_compat_star_acl_posix1e.tar.uu FILES+= test_compat_tar_hardlink_1.tar.uu FILES+= test_compat_uudecode_large.tar.Z.uu @@ -548,6 +550,7 @@ FILES+= test_read_large_splitted_rar_ab. FILES+= test_read_large_splitted_rar_ac.uu FILES+= test_read_large_splitted_rar_ad.uu FILES+= test_read_large_splitted_rar_ae.uu +FILES+= test_read_pax_schily_xattr.tar.uu FILES+= test_read_splitted_rar_aa.uu FILES+= test_read_splitted_rar_ab.uu FILES+= test_read_splitted_rar_ac.uu From owner-svn-src-all@freebsd.org Sat Feb 11 06:19:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD66DCDAADD; Sat, 11 Feb 2017 06:19:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CCDF11C4; Sat, 11 Feb 2017 06:19:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6JPNN092849; Sat, 11 Feb 2017 06:19:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6JPWB092848; Sat, 11 Feb 2017 06:19:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110619.v1B6JPWB092848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:19: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: r313591 - stable/10/lib/libbz2 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:19:26 -0000 Author: ngie Date: Sat Feb 11 06:19:25 2017 New Revision: 313591 URL: https://svnweb.freebsd.org/changeset/base/313591 Log: MFC r312463: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libbz2/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libbz2/Makefile ============================================================================== --- stable/10/lib/libbz2/Makefile Sat Feb 11 06:17:10 2017 (r313590) +++ stable/10/lib/libbz2/Makefile Sat Feb 11 06:19:25 2017 (r313591) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} LIB= bz2 From owner-svn-src-all@freebsd.org Sat Feb 11 06:21:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8034ACDABBC; Sat, 11 Feb 2017 06:21:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FAA71434; Sat, 11 Feb 2017 06:21:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6LckZ095772; Sat, 11 Feb 2017 06:21:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6Lcd8095771; Sat, 11 Feb 2017 06:21:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110621.v1B6Lcd8095771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:21: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: r313592 - stable/10/lib/libc++ 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:21:39 -0000 Author: ngie Date: Sat Feb 11 06:21:38 2017 New Revision: 313592 URL: https://svnweb.freebsd.org/changeset/base/313592 Log: MFC r312464: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libc++/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc++/Makefile ============================================================================== --- stable/10/lib/libc++/Makefile Sat Feb 11 06:19:25 2017 (r313591) +++ stable/10/lib/libc++/Makefile Sat Feb 11 06:21:38 2017 (r313592) @@ -2,9 +2,9 @@ .include -LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt -HDRDIR= ${.CURDIR}/../../contrib/libc++/include -SRCDIR= ${.CURDIR}/../../contrib/libc++/src +LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt +HDRDIR= ${SRCTOP}/contrib/libc++/include +SRCDIR= ${SRCTOP}/contrib/libc++/src CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} .PATH: ${SRCDIR} From owner-svn-src-all@freebsd.org Sat Feb 11 06:22:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F412DCDAD53; Sat, 11 Feb 2017 06:22:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C37041755; Sat, 11 Feb 2017 06:22:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6MTv4096724; Sat, 11 Feb 2017 06:22:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6MTtB096723; Sat, 11 Feb 2017 06:22:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110622.v1B6MTtB096723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:22: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: r313593 - stable/10/lib/libcam 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:22:31 -0000 Author: ngie Date: Sat Feb 11 06:22:29 2017 New Revision: 313593 URL: https://svnweb.freebsd.org/changeset/base/313593 Log: MFC r312465: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libcam/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/Makefile ============================================================================== --- stable/10/lib/libcam/Makefile Sat Feb 11 06:21:38 2017 (r313592) +++ stable/10/lib/libcam/Makefile Sat Feb 11 06:22:29 2017 (r313593) @@ -36,11 +36,10 @@ MLINKS+= cam.3 cam_open_device.3 \ cam_cdbparse.3 csio_encode_visit.3 \ cam_cdbparse.3 buff_encode_visit.3 -.PATH: ${.CURDIR}/../../sys/cam/scsi ${.CURDIR}/../../sys/cam/ata \ - ${.CURDIR}/../../sys/cam +.PATH: ${SRCTOP}/sys/cam/scsi ${SRCTOP}/sys/cam/ata \ + ${SRCTOP}/sys/cam -SDIR= ${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR} -I${SDIR} +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys SHLIB_MAJOR= 6 From owner-svn-src-all@freebsd.org Sat Feb 11 06:23:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC7B8CDAE12; Sat, 11 Feb 2017 06:23:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB3E18CF; Sat, 11 Feb 2017 06:23:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6N7os096816; Sat, 11 Feb 2017 06:23:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6N7cv096815; Sat, 11 Feb 2017 06:23:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110623.v1B6N7cv096815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:23: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: r313594 - stable/10/lib/libc_nonshared 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:23:09 -0000 Author: ngie Date: Sat Feb 11 06:23:07 2017 New Revision: 313594 URL: https://svnweb.freebsd.org/changeset/base/313594 Log: MFC r312466: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libc_nonshared/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc_nonshared/Makefile ============================================================================== --- stable/10/lib/libc_nonshared/Makefile Sat Feb 11 06:22:29 2017 (r313593) +++ stable/10/lib/libc_nonshared/Makefile Sat Feb 11 06:23:07 2017 (r313594) @@ -6,7 +6,7 @@ # bsd.lib.mk doesn't have an easy way to express that. NO_PROFILE?= .include -NO_PIC= +NO_PIC= # -fpic on some platforms, -fPIC on others. CFLAGS+=${PICFLAG} -DPIC -fvisibility=hidden @@ -18,9 +18,9 @@ LIBC_NONSHARED_SRCS= SRCS= __stub.c .if ${MK_ICONV} == "yes" -.PATH: ${.CURDIR}/../libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv .include "Makefile.iconv" -CFLAGS+=-I${.CURDIR}/../libc/iconv +CFLAGS+=-I${SRCTOP}/lib/libc/iconv .endif SRCS+= ${LIBC_NONSHARED_SRCS} From owner-svn-src-all@freebsd.org Sat Feb 11 06:25:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CAB4CDAEA7; Sat, 11 Feb 2017 06:25:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C95881A18; Sat, 11 Feb 2017 06:25:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6PmKj096992; Sat, 11 Feb 2017 06:25:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6Pmta096983; Sat, 11 Feb 2017 06:25:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110625.v1B6Pmta096983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:25: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: r313595 - in stable/10/lib/ncurses: . form formw menu menuw ncurses ncursesw panel panelw 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:25:50 -0000 Author: ngie Date: Sat Feb 11 06:25:47 2017 New Revision: 313595 URL: https://svnweb.freebsd.org/changeset/base/313595 Log: MFC r312467: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This implifies pathing in make/displayed output Modified: stable/10/lib/ncurses/config.mk stable/10/lib/ncurses/form/Makefile stable/10/lib/ncurses/formw/Makefile stable/10/lib/ncurses/menu/Makefile stable/10/lib/ncurses/menuw/Makefile stable/10/lib/ncurses/ncurses/Makefile stable/10/lib/ncurses/ncursesw/Makefile stable/10/lib/ncurses/panel/Makefile stable/10/lib/ncurses/panelw/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/ncurses/config.mk ============================================================================== --- stable/10/lib/ncurses/config.mk Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/config.mk Sat Feb 11 06:25:47 2017 (r313595) @@ -2,25 +2,25 @@ # This Makefile is shared by libncurses, libform, libmenu, libpanel. -NCURSES_DIR= ${.CURDIR}/../../../contrib/ncurses +NCURSES_DIR= ${SRCTOP}/contrib/ncurses .if defined(ENABLE_WIDEC) LIB_SUFFIX= w CFLAGS+= -D_XOPEN_SOURCE_EXTENDED -DENABLE_WIDEC -NCURSES_CFG_H= ${.CURDIR}/../ncurses/ncurses_cfg.h +NCURSES_CFG_H= ${.CURDIR:H}/ncurses/ncurses_cfg.h .else LIB_SUFFIX= NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h .endif CFLAGS+= -I. -.if exists(${.OBJDIR}/../ncurses${LIB_SUFFIX}) -CFLAGS+= -I${.OBJDIR}/../ncurses${LIB_SUFFIX} +.if exists(${.OBJDIR:H}/ncurses${LIB_SUFFIX}) +CFLAGS+= -I${.OBJDIR:H}/ncurses${LIB_SUFFIX} .endif -CFLAGS+= -I${.CURDIR}/../ncurses${LIB_SUFFIX} +CFLAGS+= -I${.CURDIR:H}/ncurses${LIB_SUFFIX} # for ${NCURSES_CFG_H} -CFLAGS+= -I${.CURDIR}/../ncurses +CFLAGS+= -I${.CURDIR:H}/ncurses CFLAGS+= -I${NCURSES_DIR}/include CFLAGS+= -I${NCURSES_DIR}/ncurses Modified: stable/10/lib/ncurses/form/Makefile ============================================================================== --- stable/10/lib/ncurses/form/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/form/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" SRCDIR= ${NCURSES_DIR}/form Modified: stable/10/lib/ncurses/formw/Makefile ============================================================================== --- stable/10/lib/ncurses/formw/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/formw/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -2,4 +2,4 @@ ENABLE_WIDEC= -.include "${.CURDIR}/../form/Makefile" +.include "${.CURDIR:H}/form/Makefile" Modified: stable/10/lib/ncurses/menu/Makefile ============================================================================== --- stable/10/lib/ncurses/menu/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/menu/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" SRCDIR= ${NCURSES_DIR}/menu Modified: stable/10/lib/ncurses/menuw/Makefile ============================================================================== --- stable/10/lib/ncurses/menuw/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/menuw/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -2,4 +2,4 @@ ENABLE_WIDEC= -.include "${.CURDIR}/../menu/Makefile" +.include "${.CURDIR:H}/menu/Makefile" Modified: stable/10/lib/ncurses/ncurses/Makefile ============================================================================== --- stable/10/lib/ncurses/ncurses/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/ncurses/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -8,7 +8,7 @@ NO_MAN= .include -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" LIB= ncurses${LIB_SUFFIX} SHLIB_MAJOR= 8 Modified: stable/10/lib/ncurses/ncursesw/Makefile ============================================================================== --- stable/10/lib/ncurses/ncursesw/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/ncursesw/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -2,6 +2,6 @@ ENABLE_WIDEC= -.PATH: ${.CURDIR}/../ncurses +.PATH: ${.CURDIR:H}/ncurses -.include "${.CURDIR}/../ncurses/Makefile" +.include "${.CURDIR:H}/ncurses/Makefile" Modified: stable/10/lib/ncurses/panel/Makefile ============================================================================== --- stable/10/lib/ncurses/panel/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/panel/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../config.mk" +.include "${.CURDIR:H}/config.mk" SRCDIR= ${NCURSES_DIR}/panel Modified: stable/10/lib/ncurses/panelw/Makefile ============================================================================== --- stable/10/lib/ncurses/panelw/Makefile Sat Feb 11 06:23:07 2017 (r313594) +++ stable/10/lib/ncurses/panelw/Makefile Sat Feb 11 06:25:47 2017 (r313595) @@ -2,4 +2,4 @@ ENABLE_WIDEC= -.include "${.CURDIR}/../panel/Makefile" +.include "${.CURDIR:H}/panel/Makefile" From owner-svn-src-all@freebsd.org Sat Feb 11 06:27:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60901CDAF31; Sat, 11 Feb 2017 06:27:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FEA51B86; Sat, 11 Feb 2017 06:27:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6Rgw5097138; Sat, 11 Feb 2017 06:27:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6RgcT097137; Sat, 11 Feb 2017 06:27:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110627.v1B6RgcT097137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:27: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: r313596 - stable/10/lib/libthread_db 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:27:43 -0000 Author: ngie Date: Sat Feb 11 06:27:42 2017 New Revision: 313596 URL: https://svnweb.freebsd.org/changeset/base/313596 Log: MFC r312468: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libthread_db/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthread_db/Makefile ============================================================================== --- stable/10/lib/libthread_db/Makefile Sat Feb 11 06:25:47 2017 (r313595) +++ stable/10/lib/libthread_db/Makefile Sat Feb 11 06:27:42 2017 (r313596) @@ -14,7 +14,7 @@ CFLAGS+=-I. -I${.CURDIR} SYM_MAPS+=${.CURDIR}/Symbol.map SYMBOL_MAPS=${SYM_MAPS} -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def # Unfortunately, clang gives an incorrect warning about alignment in # arch/i386/libpthread_md.c, so turn that off for now. From owner-svn-src-all@freebsd.org Sat Feb 11 06:30:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35EAACDAFD7; Sat, 11 Feb 2017 06:30:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F08801CFC; Sat, 11 Feb 2017 06:30:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6UQbY097333; Sat, 11 Feb 2017 06:30:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6UQn8097332; Sat, 11 Feb 2017 06:30:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110630.v1B6UQn8097332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:30: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: r313597 - stable/10/lib/libypclnt 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:30:27 -0000 Author: ngie Date: Sat Feb 11 06:30:25 2017 New Revision: 313597 URL: https://svnweb.freebsd.org/changeset/base/313597 Log: MFC r312469: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libypclnt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libypclnt/Makefile ============================================================================== --- stable/10/lib/libypclnt/Makefile Sat Feb 11 06:27:42 2017 (r313596) +++ stable/10/lib/libypclnt/Makefile Sat Feb 11 06:30:25 2017 (r313597) @@ -23,9 +23,9 @@ GENSRCS=yp.h \ yppasswd_private_xdr.c RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C -RPCSRC= ${.CURDIR}/../../include/rpcsvc/yp.x -RPCSRC_PW= ${.CURDIR}/../../include/rpcsvc/yppasswd.x -RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x +RPCSRC= ${SRCTOP}/include/rpcsvc/yp.x +RPCSRC_PW= ${SRCTOP}/include/rpcsvc/yppasswd.x +RPCSRC_PRIV= ${SRCTOP}/usr.sbin/rpc.yppasswdd/yppasswd_private.x yp.h: ${RPCSRC} ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} From owner-svn-src-all@freebsd.org Sat Feb 11 06:31:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E313DCDA205; Sat, 11 Feb 2017 06:31:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB7EB71; Sat, 11 Feb 2017 06:31:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6VQqf001225; Sat, 11 Feb 2017 06:31:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6VQLN001224; Sat, 11 Feb 2017 06:31:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110631.v1B6VQLN001224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:31: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: r313598 - stable/10/lib/libutil 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:31:28 -0000 Author: ngie Date: Sat Feb 11 06:31:26 2017 New Revision: 313598 URL: https://svnweb.freebsd.org/changeset/base/313598 Log: MFC r312470: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libutil/Makefile ============================================================================== --- stable/10/lib/libutil/Makefile Sat Feb 11 06:30:25 2017 (r313597) +++ stable/10/lib/libutil/Makefile Sat Feb 11 06:31:26 2017 (r313598) @@ -24,7 +24,7 @@ CFLAGS+= -DLIBC_SCCS CFLAGS+= -DINET6 .endif -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../libc/gen/ +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libc/gen/ MAN+= expand_number.3 flopen.3 fparseln.3 hexdump.3 \ humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ From owner-svn-src-all@freebsd.org Sat Feb 11 06:32:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37A43CDA2B9; Sat, 11 Feb 2017 06:32:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 035ED271; Sat, 11 Feb 2017 06:32:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6W6Ie001318; Sat, 11 Feb 2017 06:32:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6W6Hd001317; Sat, 11 Feb 2017 06:32:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110632.v1B6W6Hd001317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06: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: r313599 - stable/10/lib/libulog 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:32:07 -0000 Author: ngie Date: Sat Feb 11 06:32:05 2017 New Revision: 313599 URL: https://svnweb.freebsd.org/changeset/base/313599 Log: MFC r312471: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libulog/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libulog/Makefile ============================================================================== --- stable/10/lib/libulog/Makefile Sat Feb 11 06:31:26 2017 (r313598) +++ stable/10/lib/libulog/Makefile Sat Feb 11 06:32:05 2017 (r313599) @@ -22,7 +22,7 @@ MLINKS+=ulog_login.3 ulog_login_pseudo.3 DPADD= ${LIBMD} LDADD= -lmd -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_INSTALLLIB} != "no" From owner-svn-src-all@freebsd.org Sat Feb 11 06:32:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11645CDA32A; Sat, 11 Feb 2017 06:32:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4ED9636; Sat, 11 Feb 2017 06:32:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6WmsI001411; Sat, 11 Feb 2017 06:32:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6WmWH001410; Sat, 11 Feb 2017 06:32:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110632.v1B6WmWH001410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:32: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: r313600 - stable/10/lib/libufs 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:32:50 -0000 Author: ngie Date: Sat Feb 11 06:32:48 2017 New Revision: 313600 URL: https://svnweb.freebsd.org/changeset/base/313600 Log: MFC r312472: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libufs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libufs/Makefile ============================================================================== --- stable/10/lib/libufs/Makefile Sat Feb 11 06:32:05 2017 (r313599) +++ stable/10/lib/libufs/Makefile Sat Feb 11 06:32:48 2017 (r313600) @@ -17,7 +17,7 @@ MLINKS+= ufs_disk_close.3 ufs_disk_fillo MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3 MLINKS+= ufs_disk_close.3 ufs_disk_write.3 -.PATH: ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCTOP}/sys/ufs/ffs WARNS?= 2 From owner-svn-src-all@freebsd.org Sat Feb 11 06:33:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62C42CDA3C5; Sat, 11 Feb 2017 06:33:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F72C7DB; Sat, 11 Feb 2017 06:33:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6XkYS001542; Sat, 11 Feb 2017 06:33:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6Xkcj001541; Sat, 11 Feb 2017 06:33:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110633.v1B6Xkcj001541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:33: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: r313601 - stable/10/lib/libunbound 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:33:47 -0000 Author: ngie Date: Sat Feb 11 06:33:46 2017 New Revision: 313601 URL: https://svnweb.freebsd.org/changeset/base/313601 Log: MFC r312473: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libunbound/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libunbound/Makefile ============================================================================== --- stable/10/lib/libunbound/Makefile Sat Feb 11 06:32:48 2017 (r313600) +++ stable/10/lib/libunbound/Makefile Sat Feb 11 06:33:46 2017 (r313601) @@ -1,8 +1,8 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../contrib/ldns -UNBOUNDDIR= ${.CURDIR}/../../contrib/unbound +LDNSDIR= ${SRCTOP}/contrib/ldns +UNBOUNDDIR= ${SRCTOP}/contrib/unbound # Hold my beer and watch this .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/compat ${UNBOUNDDIR}/dns64 ${UNBOUNDDIR}/iterator ${UNBOUNDDIR}/sldns ${UNBOUNDDIR}/libunbound ${UNBOUNDDIR}/services ${UNBOUNDDIR}/services/cache ${UNBOUNDDIR}/util ${UNBOUNDDIR}/util/data ${UNBOUNDDIR}/util/storage ${UNBOUNDDIR}/validator From owner-svn-src-all@freebsd.org Sat Feb 11 06:35:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B99CCDA4AC; Sat, 11 Feb 2017 06:35:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51D6893F; Sat, 11 Feb 2017 06:35:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6ZThT001681; Sat, 11 Feb 2017 06:35:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6ZTT8001680; Sat, 11 Feb 2017 06:35:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110635.v1B6ZTT8001680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:35: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: r313602 - in stable/10/lib/libthr: . support 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:35:30 -0000 Author: ngie Date: Sat Feb 11 06:35:29 2017 New Revision: 313602 URL: https://svnweb.freebsd.org/changeset/base/313602 Log: MFC r312474: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libthr/Makefile stable/10/lib/libthr/support/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/Makefile ============================================================================== --- stable/10/lib/libthr/Makefile Sat Feb 11 06:33:46 2017 (r313601) +++ stable/10/lib/libthr/Makefile Sat Feb 11 06:35:29 2017 (r313602) @@ -17,13 +17,13 @@ LIB=thr SHLIB_MAJOR= 3 WARNS?= 3 CFLAGS+=-DPTHREAD_KERNEL -CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ - -I${.CURDIR}/../../include +CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ + -I${SRCTOP}/include CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} -CFLAGS+=-I${.CURDIR}/../libthread_db +CFLAGS+=-I${SRCTOP}/libexec/rtld-elf +CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH} +CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS+=-Winline .ifndef NO_THREAD_UNWIND_STACK @@ -33,7 +33,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND LDFLAGS+=-Wl,-znodelete -VERSION_DEF=${.CURDIR}/../libc/Versions.def +VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map MAN= libthr.3 Modified: stable/10/lib/libthr/support/Makefile.inc ============================================================================== --- stable/10/lib/libthr/support/Makefile.inc Sat Feb 11 06:33:46 2017 (r313601) +++ stable/10/lib/libthr/support/Makefile.inc Sat Feb 11 06:35:29 2017 (r313602) @@ -1,15 +1,15 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string +.PATH: ${.CURDIR}/support ${SRCTOP}/lib/libc/gen ${SRCTOP}/lib/libc/string # libc must search machine_arch, then machine_cpuarch, but libthr has all its # code implemented in machine_cpuarch. Cope. -.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys) -.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} +.if exists(${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys) +.PATH: ${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys +CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_ARCH} .else -.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} +.PATH: ${SRCTOP}/lib/libc/${MACHINE_CPUARCH}/sys +CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_CPUARCH} .endif SYSCALLS= thr_new From owner-svn-src-all@freebsd.org Sat Feb 11 06:36:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 246D1CDA58E; Sat, 11 Feb 2017 06:36:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E564AA83; Sat, 11 Feb 2017 06:36:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6aCWX001779; Sat, 11 Feb 2017 06:36:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6aCiO001778; Sat, 11 Feb 2017 06:36:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110636.v1B6aCiO001778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:36: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: r313603 - stable/10/lib/libtelnet 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:36:14 -0000 Author: ngie Date: Sat Feb 11 06:36:12 2017 New Revision: 313603 URL: https://svnweb.freebsd.org/changeset/base/313603 Log: MFC r312475: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libtelnet/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libtelnet/Makefile ============================================================================== --- stable/10/lib/libtelnet/Makefile Sat Feb 11 06:35:29 2017 (r313602) +++ stable/10/lib/libtelnet/Makefile Sat Feb 11 06:36:12 2017 (r313603) @@ -3,7 +3,7 @@ .include -TELNETDIR= ${.CURDIR}/../../contrib/telnet +TELNETDIR= ${SRCTOP}/contrib/telnet .PATH: ${TELNETDIR}/libtelnet LIB= telnet From owner-svn-src-all@freebsd.org Sat Feb 11 06:37:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD081CDA660; Sat, 11 Feb 2017 06:37:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9D30BD0; Sat, 11 Feb 2017 06:37:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6bOag001908; Sat, 11 Feb 2017 06:37:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6bOQR001907; Sat, 11 Feb 2017 06:37:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110637.v1B6bOQR001907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:37: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: r313604 - stable/10/lib/libstdthreads 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:37:26 -0000 Author: ngie Date: Sat Feb 11 06:37:24 2017 New Revision: 313604 URL: https://svnweb.freebsd.org/changeset/base/313604 Log: MFC r312477: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libstdthreads/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstdthreads/Makefile ============================================================================== --- stable/10/lib/libstdthreads/Makefile Sat Feb 11 06:36:12 2017 (r313603) +++ stable/10/lib/libstdthreads/Makefile Sat Feb 11 06:37:24 2017 (r313604) @@ -35,7 +35,7 @@ MLINKS= thrd_create.3 call_once.3 \ DPADD= ${LIBPTHREAD} LDADD= -lpthread -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .include From owner-svn-src-all@freebsd.org Sat Feb 11 06:38:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2194CCDA6EF; Sat, 11 Feb 2017 06:38:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2736CFE; Sat, 11 Feb 2017 06:38:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6cMGQ002019; Sat, 11 Feb 2017 06:38:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6cMER002018; Sat, 11 Feb 2017 06:38:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110638.v1B6cMER002018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:38: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: r313605 - stable/10/lib/libsmutil 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:38:24 -0000 Author: ngie Date: Sat Feb 11 06:38:22 2017 New Revision: 313605 URL: https://svnweb.freebsd.org/changeset/base/313605 Log: MFC r312479: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libsmutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsmutil/Makefile ============================================================================== --- stable/10/lib/libsmutil/Makefile Sat Feb 11 06:37:24 2017 (r313604) +++ stable/10/lib/libsmutil/Makefile Sat Feb 11 06:38:22 2017 (r313605) @@ -1,6 +1,6 @@ # $FreeBSD$ -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmutil CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-all@freebsd.org Sat Feb 11 06:39:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C415CDA766; Sat, 11 Feb 2017 06:39:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFB60E36; Sat, 11 Feb 2017 06:39:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6d4Q0002115; Sat, 11 Feb 2017 06:39:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6d4Dt002114; Sat, 11 Feb 2017 06:39:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110639.v1B6d4Dt002114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:39: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: r313606 - stable/10/lib/libsmb 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:39:06 -0000 Author: ngie Date: Sat Feb 11 06:39:04 2017 New Revision: 313606 URL: https://svnweb.freebsd.org/changeset/base/313606 Log: MFC r312480: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libsmb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsmb/Makefile ============================================================================== --- stable/10/lib/libsmb/Makefile Sat Feb 11 06:38:22 2017 (r313605) +++ stable/10/lib/libsmb/Makefile Sat Feb 11 06:39:04 2017 (r313606) @@ -2,7 +2,7 @@ .include -CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs +CONTRIBDIR= ${SRCTOP}/contrib/smbfs .PATH: ${CONTRIBDIR}/lib/smb LIB= smb From owner-svn-src-all@freebsd.org Sat Feb 11 06:39:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2B91CDA7DC; Sat, 11 Feb 2017 06:39:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5DCF6A; Sat, 11 Feb 2017 06:39:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6dl9K002207; Sat, 11 Feb 2017 06:39:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6dl9J002206; Sat, 11 Feb 2017 06:39:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110639.v1B6dl9J002206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:39: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: r313607 - stable/10/lib/libsmdb 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:39:49 -0000 Author: ngie Date: Sat Feb 11 06:39:47 2017 New Revision: 313607 URL: https://svnweb.freebsd.org/changeset/base/313607 Log: MFC r312481: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libsmdb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsmdb/Makefile ============================================================================== --- stable/10/lib/libsmdb/Makefile Sat Feb 11 06:39:04 2017 (r313606) +++ stable/10/lib/libsmdb/Makefile Sat Feb 11 06:39:47 2017 (r313607) @@ -1,6 +1,6 @@ # $FreeBSD$ -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmdb CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-all@freebsd.org Sat Feb 11 06:40:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A28A7CDA8B9; Sat, 11 Feb 2017 06:40:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F41D10B9; Sat, 11 Feb 2017 06:40:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6eRsA002325; Sat, 11 Feb 2017 06:40:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6eRl0002324; Sat, 11 Feb 2017 06:40:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110640.v1B6eRl0002324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:40: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: r313608 - stable/10/lib/libsm 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:40:28 -0000 Author: ngie Date: Sat Feb 11 06:40:27 2017 New Revision: 313608 URL: https://svnweb.freebsd.org/changeset/base/313608 Log: MFC r312482: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libsm/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsm/Makefile ============================================================================== --- stable/10/lib/libsm/Makefile Sat Feb 11 06:39:47 2017 (r313607) +++ stable/10/lib/libsm/Makefile Sat Feb 11 06:40:27 2017 (r313608) @@ -2,7 +2,7 @@ .include -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsm CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-all@freebsd.org Sat Feb 11 06:41:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5837DCDA956; Sat, 11 Feb 2017 06:41:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AE81271; Sat, 11 Feb 2017 06:41:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6f7nl004508; Sat, 11 Feb 2017 06:41:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6f7hG004507; Sat, 11 Feb 2017 06:41:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110641.v1B6f7hG004507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:41: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: r313609 - stable/10/lib/libsbuf 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:41:08 -0000 Author: ngie Date: Sat Feb 11 06:41:07 2017 New Revision: 313609 URL: https://svnweb.freebsd.org/changeset/base/313609 Log: MFC r312483: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libsbuf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsbuf/Makefile ============================================================================== --- stable/10/lib/libsbuf/Makefile Sat Feb 11 06:40:27 2017 (r313608) +++ stable/10/lib/libsbuf/Makefile Sat Feb 11 06:41:07 2017 (r313609) @@ -9,6 +9,6 @@ SHLIB_MAJOR = 6 SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_DEF= ${.CURDIR}/Version.def -.PATH: ${.CURDIR}/../../sys/kern +.PATH: ${SRCTOP}/sys/kern .include From owner-svn-src-all@freebsd.org Sat Feb 11 06:42:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 009C1CDAB5F; Sat, 11 Feb 2017 06:42:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39B11647; Sat, 11 Feb 2017 06:42:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6guYe006275; Sat, 11 Feb 2017 06:42:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6guXs006274; Sat, 11 Feb 2017 06:42:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110642.v1B6guXs006274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:42: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: r313610 - stable/10/lib/librpcsvc 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:42:58 -0000 Author: ngie Date: Sat Feb 11 06:42:56 2017 New Revision: 313610 URL: https://svnweb.freebsd.org/changeset/base/313610 Log: MFC r312485: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/librpcsvc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/librpcsvc/Makefile ============================================================================== --- stable/10/lib/librpcsvc/Makefile Sat Feb 11 06:41:07 2017 (r313609) +++ stable/10/lib/librpcsvc/Makefile Sat Feb 11 06:42:56 2017 (r313610) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../include/rpcsvc +.PATH: ${SRCTOP}/include/rpcsvc LIB= rpcsvc From owner-svn-src-all@freebsd.org Sat Feb 11 06:44:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C18ACDABEF; Sat, 11 Feb 2017 06:44:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF7FB178D; Sat, 11 Feb 2017 06:44:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6iHmF006407; Sat, 11 Feb 2017 06:44:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6iHhn006406; Sat, 11 Feb 2017 06:44:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110644.v1B6iHhn006406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:44: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: r313611 - stable/10/lib/librpcsec_gss 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:44:18 -0000 Author: ngie Date: Sat Feb 11 06:44:16 2017 New Revision: 313611 URL: https://svnweb.freebsd.org/changeset/base/313611 Log: MFC r312486: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/librpcsec_gss/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/librpcsec_gss/Makefile ============================================================================== --- stable/10/lib/librpcsec_gss/Makefile Sat Feb 11 06:42:56 2017 (r313610) +++ stable/10/lib/librpcsec_gss/Makefile Sat Feb 11 06:44:16 2017 (r313611) @@ -8,11 +8,11 @@ SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rp DPADD+= ${LIBGSSAPI} LDADD+= -lgssapi -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -I${.CURDIR}/../../include -CFLAGS+= -I${.CURDIR}/../../libc_rpc +CFLAGS+= -I${SRCTOP}/include +CFLAGS+= -I${SRCTOP}/lib/libc_rpc NO_PROFILE= MAN= rpcsec_gss.3 From owner-svn-src-all@freebsd.org Sat Feb 11 06:46:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22916CDACF2; Sat, 11 Feb 2017 06:46:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAF3019C5; Sat, 11 Feb 2017 06:46:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6kG48006593; Sat, 11 Feb 2017 06:46:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6kGne006592; Sat, 11 Feb 2017 06:46:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110646.v1B6kGne006592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:46: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: r313612 - stable/10/lib/libprocstat/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:46:18 -0000 Author: ngie Date: Sat Feb 11 06:46:16 2017 New Revision: 313612 URL: https://svnweb.freebsd.org/changeset/base/313612 Log: MFC r312489: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This implifies pathing in make/displayed output Modified: stable/10/lib/libprocstat/zfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libprocstat/zfs/Makefile ============================================================================== --- stable/10/lib/libprocstat/zfs/Makefile Sat Feb 11 06:44:16 2017 (r313611) +++ stable/10/lib/libprocstat/zfs/Makefile Sat Feb 11 06:46:16 2017 (r313612) @@ -1,21 +1,21 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/.. +.PATH: ${.CURDIR:H} SRCS= zfs.c OBJS= zfs.o WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/.. +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${.CURDIR:H} CFLAGS+= -DNEED_SOLARIS_BOOLEAN all: ${OBJS} From owner-svn-src-all@freebsd.org Sat Feb 11 06:47:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D92CDADE5; Sat, 11 Feb 2017 06:47:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FC361B84; Sat, 11 Feb 2017 06:47:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6l77M006695; Sat, 11 Feb 2017 06:47:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6l702006694; Sat, 11 Feb 2017 06:47:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110647.v1B6l702006694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:47: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: r313613 - stable/10/lib/libpcap 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:47:08 -0000 Author: ngie Date: Sat Feb 11 06:47:07 2017 New Revision: 313613 URL: https://svnweb.freebsd.org/changeset/base/313613 Log: MFC r312490: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libpcap/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpcap/Makefile ============================================================================== --- stable/10/lib/libpcap/Makefile Sat Feb 11 06:46:16 2017 (r313612) +++ stable/10/lib/libpcap/Makefile Sat Feb 11 06:47:07 2017 (r313613) @@ -110,7 +110,7 @@ SHLIB_MAJOR= 8 # # Magic to grab sources out of src/contrib # -PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap +PCAP_DISTDIR?=${SRCTOP}/contrib/libpcap CFLAGS+=-I${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR} .PATH: ${PCAP_DISTDIR}/bpf/net From owner-svn-src-all@freebsd.org Sat Feb 11 06:47:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1F07CDAE99; Sat, 11 Feb 2017 06:47:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EE8D1CDE; Sat, 11 Feb 2017 06:47:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6lu3t006790; Sat, 11 Feb 2017 06:47:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6lu7O006789; Sat, 11 Feb 2017 06:47:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110647.v1B6lu7O006789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:47: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: r313614 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:47:57 -0000 Author: ngie Date: Sat Feb 11 06:47:56 2017 New Revision: 313614 URL: https://svnweb.freebsd.org/changeset/base/313614 Log: MFC r312491: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This implifies pathing in make/displayed output Modified: stable/10/lib/libopie/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libopie/Makefile ============================================================================== --- stable/10/lib/libopie/Makefile Sat Feb 11 06:47:07 2017 (r313613) +++ stable/10/lib/libopie/Makefile Sat Feb 11 06:47:56 2017 (r313614) @@ -2,7 +2,7 @@ # # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie DIST_DIR= ${OPIE_DIST}/${.CURDIR:T} SHLIB_MAJOR= 7 From owner-svn-src-all@freebsd.org Sat Feb 11 06:50:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A3C5CDAFFE; Sat, 11 Feb 2017 06:50:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 598051EA3; Sat, 11 Feb 2017 06:50:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6oP8p006979; Sat, 11 Feb 2017 06:50:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6oPmI006978; Sat, 11 Feb 2017 06:50:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110650.v1B6oPmI006978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:50: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: r313615 - stable/10/lib/libngatm 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:50:26 -0000 Author: ngie Date: Sat Feb 11 06:50:25 2017 New Revision: 313615 URL: https://svnweb.freebsd.org/changeset/base/313615 Log: MFC r312493: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libngatm/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libngatm/Makefile ============================================================================== --- stable/10/lib/libngatm/Makefile Sat Feb 11 06:47:56 2017 (r313614) +++ stable/10/lib/libngatm/Makefile Sat Feb 11 06:50:25 2017 (r313615) @@ -7,8 +7,8 @@ SHLIB_MAJOR= 4 MAN= libngatm.3 uniaddr.3 unifunc.3 unimsg.3 unisap.3 unistruct.3 # source of the library lives in contrib -SDIR= ${.CURDIR}/../../sys -CTRB= ${.CURDIR}/../../contrib/ngatm +SDIR= ${SRCTOP}/sys +CTRB= ${SRCTOP}/contrib/ngatm LIBBASE= ${SDIR}/contrib/ngatm CFLAGS+= -I${LIBBASE} -I${.OBJDIR} -I${CTRB}/libngatm From owner-svn-src-all@freebsd.org Sat Feb 11 06:51:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D89C2CDA0CF; Sat, 11 Feb 2017 06:51:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5489237; Sat, 11 Feb 2017 06:51:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6p9X7008548; Sat, 11 Feb 2017 06:51:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6p9k2008531; Sat, 11 Feb 2017 06:51:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110651.v1B6p9k2008531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:51: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: r313616 - stable/10/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:51:11 -0000 Author: ngie Date: Sat Feb 11 06:51:09 2017 New Revision: 313616 URL: https://svnweb.freebsd.org/changeset/base/313616 Log: MFC r312494: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libmp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmp/Makefile ============================================================================== --- stable/10/lib/libmp/Makefile Sat Feb 11 06:50:25 2017 (r313615) +++ stable/10/lib/libmp/Makefile Sat Feb 11 06:51:09 2017 (r313616) @@ -10,9 +10,9 @@ MAN= libmp.3 INCS= mp.h SRCS= mpasbn.c -CFLAGS+= -I${.CURDIR}/../../crypto +CFLAGS+= -I${SRCTOP}/crypto -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" From owner-svn-src-all@freebsd.org Sat Feb 11 06:51:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6B0BCDA293; Sat, 11 Feb 2017 06:51:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73608638; Sat, 11 Feb 2017 06:51:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6prhh009985; Sat, 11 Feb 2017 06:51:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6prHA009984; Sat, 11 Feb 2017 06:51:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110651.v1B6prHA009984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:51: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: r313617 - stable/10/lib/libmilter 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:51:54 -0000 Author: ngie Date: Sat Feb 11 06:51:53 2017 New Revision: 313617 URL: https://svnweb.freebsd.org/changeset/base/313617 Log: MFC r312495: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libmilter/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmilter/Makefile ============================================================================== --- stable/10/lib/libmilter/Makefile Sat Feb 11 06:51:09 2017 (r313616) +++ stable/10/lib/libmilter/Makefile Sat Feb 11 06:51:53 2017 (r313617) @@ -2,7 +2,7 @@ .include -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libmilter ${SENDMAIL_DIR}/libsm CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. From owner-svn-src-all@freebsd.org Sat Feb 11 06:54:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD7B5CDA373; Sat, 11 Feb 2017 06:54:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACC3588D; Sat, 11 Feb 2017 06:54:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6sggN010834; Sat, 11 Feb 2017 06:54:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6sgEM010833; Sat, 11 Feb 2017 06:54:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110654.v1B6sgEM010833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:54: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: r313618 - stable/10/lib/libmagic 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:54:44 -0000 Author: ngie Date: Sat Feb 11 06:54:42 2017 New Revision: 313618 URL: https://svnweb.freebsd.org/changeset/base/313618 Log: MFC r312497: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libmagic/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmagic/Makefile ============================================================================== --- stable/10/lib/libmagic/Makefile Sat Feb 11 06:51:53 2017 (r313617) +++ stable/10/lib/libmagic/Makefile Sat Feb 11 06:54:42 2017 (r313618) @@ -1,7 +1,7 @@ # $FreeBSD$ # Copyright (c) David E. O'Brien, 2000-2004, 2006, 2009 -CONTRDIR= ${.CURDIR}/../../contrib/file +CONTRDIR= ${SRCTOP}/contrib/file .PATH: ${CONTRDIR}/src .PATH: ${CONTRDIR}/doc From owner-svn-src-all@freebsd.org Sat Feb 11 06:55:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 390FCCDA3F5; Sat, 11 Feb 2017 06:55:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0855A9BD; Sat, 11 Feb 2017 06:55:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6tabd010957; Sat, 11 Feb 2017 06:55:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6ta0O010956; Sat, 11 Feb 2017 06:55:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110655.v1B6ta0O010956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:55: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: r313619 - stable/10/lib/liblzma 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:55:37 -0000 Author: ngie Date: Sat Feb 11 06:55:35 2017 New Revision: 313619 URL: https://svnweb.freebsd.org/changeset/base/313619 Log: MFC r312498: Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths This simplifies pathing in make/displayed output Modified: stable/10/lib/liblzma/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/liblzma/Makefile ============================================================================== --- stable/10/lib/liblzma/Makefile Sat Feb 11 06:54:42 2017 (r313618) +++ stable/10/lib/liblzma/Makefile Sat Feb 11 06:55:35 2017 (r313619) @@ -1,9 +1,9 @@ # $FreeBSD$ LIB= lzma -LZMADIR= ${.CURDIR}/../../contrib/xz/src/liblzma +LZMADIR= ${SRCTOP}/contrib/xz/src/liblzma -.PATH: ${LZMADIR}/../common +.PATH: ${LZMADIR:H}/common SRCS+= tuklib_physmem.c tuklib_cpucores.c .PATH: ${LZMADIR}/api/lzma @@ -144,7 +144,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/lzma \ -I${LZMADIR}/delta \ -I${LZMADIR}/simple \ - -I${LZMADIR}/../common + -I${LZMADIR:H}/common DPADD+= ${LIBPTHREAD} LDADD+= -lpthread From owner-svn-src-all@freebsd.org Sat Feb 11 06:56:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C0A5CDA49B; Sat, 11 Feb 2017 06:56:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF3A4B04; Sat, 11 Feb 2017 06:56:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6udUI011071; Sat, 11 Feb 2017 06:56:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6udoi011070; Sat, 11 Feb 2017 06:56:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110656.v1B6udoi011070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:56: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: r313620 - stable/10/lib/libldns 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:56:40 -0000 Author: ngie Date: Sat Feb 11 06:56:38 2017 New Revision: 313620 URL: https://svnweb.freebsd.org/changeset/base/313620 Log: MFC r312499: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libldns/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libldns/Makefile ============================================================================== --- stable/10/lib/libldns/Makefile Sat Feb 11 06:55:35 2017 (r313619) +++ stable/10/lib/libldns/Makefile Sat Feb 11 06:56:38 2017 (r313620) @@ -1,7 +1,7 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR = ${.CURDIR}/../../contrib/ldns +LDNSDIR = ${SRCTOP}/contrib/ldns .PATH: ${LDNSDIR} ${LDNSDIR}/compat From owner-svn-src-all@freebsd.org Sat Feb 11 06:57:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 943F6CDA53C; Sat, 11 Feb 2017 06:57:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60EB9C50; Sat, 11 Feb 2017 06:57:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6vMdR011163; Sat, 11 Feb 2017 06:57:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6vMS0011162; Sat, 11 Feb 2017 06:57:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110657.v1B6vMS0011162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:57: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: r313621 - stable/10/lib/libkiconv 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:57:23 -0000 Author: ngie Date: Sat Feb 11 06:57:22 2017 New Revision: 313621 URL: https://svnweb.freebsd.org/changeset/base/313621 Log: MFC r312500: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libkiconv/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libkiconv/Makefile ============================================================================== --- stable/10/lib/libkiconv/Makefile Sat Feb 11 06:56:38 2017 (r313620) +++ stable/10/lib/libkiconv/Makefile Sat Feb 11 06:57:22 2017 (r313621) @@ -16,7 +16,7 @@ MLINKS+= kiconv.3 kiconv_add_xlat16_cspa kiconv.3 kiconv_add_xlat16_cspairs.3 \ kiconv.3 kiconv_add_xlat16_table.3 -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys WARNS?= 1 From owner-svn-src-all@freebsd.org Sat Feb 11 06:58:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD128CDA64D; Sat, 11 Feb 2017 06:58:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7C1D8F; Sat, 11 Feb 2017 06:58:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6wOSX011266; Sat, 11 Feb 2017 06:58:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6wOLA011265; Sat, 11 Feb 2017 06:58:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110658.v1B6wOLA011265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:58: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: r313622 - stable/10/lib/libcom_err 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:58:25 -0000 Author: ngie Date: Sat Feb 11 06:58:24 2017 New Revision: 313622 URL: https://svnweb.freebsd.org/changeset/base/313622 Log: MFC r312501: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libcom_err/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcom_err/Makefile ============================================================================== --- stable/10/lib/libcom_err/Makefile Sat Feb 11 06:57:22 2017 (r313621) +++ stable/10/lib/libcom_err/Makefile Sat Feb 11 06:58:24 2017 (r313622) @@ -4,7 +4,7 @@ LIB= com_err SRCS= com_err.c error.c INCS= ${COM_ERRDIR}/com_err.h ${COM_ERRDIR}/com_right.h MAN= com_err.3 -COM_ERRDIR= ${.CURDIR}/../../contrib/com_err +COM_ERRDIR= ${SRCTOP}/contrib/com_err CFLAGS+= -I${COM_ERRDIR} LDFLAGS= -Wl,--no-undefined From owner-svn-src-all@freebsd.org Sat Feb 11 06:59:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7409CDA6F1; Sat, 11 Feb 2017 06:59:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96AE2EC3; Sat, 11 Feb 2017 06:59:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B6x3p4011358; Sat, 11 Feb 2017 06:59:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B6x3DD011357; Sat, 11 Feb 2017 06:59:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110659.v1B6x3DD011357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 06:59: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: r313623 - stable/10/lib/libcompat 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 06:59:04 -0000 Author: ngie Date: Sat Feb 11 06:59:03 2017 New Revision: 313623 URL: https://svnweb.freebsd.org/changeset/base/313623 Log: MFC r312502: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libcompat/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcompat/Makefile ============================================================================== --- stable/10/lib/libcompat/Makefile Sat Feb 11 06:58:24 2017 (r313622) +++ stable/10/lib/libcompat/Makefile Sat Feb 11 06:59:03 2017 (r313623) @@ -2,7 +2,7 @@ # $FreeBSD$ LIB= compat -CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale +CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${SRCTOP}/lib/libc/locale NO_PIC= WARNS?= 0 From owner-svn-src-all@freebsd.org Sat Feb 11 07:00:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62A8FCDA78F; Sat, 11 Feb 2017 07:00:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2168C16; Sat, 11 Feb 2017 07:00:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B70WbX011535; Sat, 11 Feb 2017 07:00:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B70WvP011534; Sat, 11 Feb 2017 07:00:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110700.v1B70WvP011534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:00: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: r313624 - stable/10/lib/libcxxrt 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:00:33 -0000 Author: ngie Date: Sat Feb 11 07:00:31 2017 New Revision: 313624 URL: https://svnweb.freebsd.org/changeset/base/313624 Log: MFC r312504: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libcxxrt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcxxrt/Makefile ============================================================================== --- stable/10/lib/libcxxrt/Makefile Sat Feb 11 06:59:03 2017 (r313623) +++ stable/10/lib/libcxxrt/Makefile Sat Feb 11 07:00:31 2017 (r313624) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../contrib/libcxxrt +SRCDIR= ${SRCTOP}/contrib/libcxxrt SHLIB_MAJOR= 1 SHLIBDIR?= /lib From owner-svn-src-all@freebsd.org Sat Feb 11 07:01:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7264CCDA80A; Sat, 11 Feb 2017 07:01:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41B463C5; Sat, 11 Feb 2017 07:01:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B71Hxw014569; Sat, 11 Feb 2017 07:01:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B71Hrj014568; Sat, 11 Feb 2017 07:01:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110701.v1B71Hrj014568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:01: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: r313625 - stable/10/lib/libgssapi 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:01:18 -0000 Author: ngie Date: Sat Feb 11 07:01:17 2017 New Revision: 313625 URL: https://svnweb.freebsd.org/changeset/base/313625 Log: MFC r312505: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libgssapi/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgssapi/Makefile ============================================================================== --- stable/10/lib/libgssapi/Makefile Sat Feb 11 07:00:31 2017 (r313624) +++ stable/10/lib/libgssapi/Makefile Sat Feb 11 07:01:17 2017 (r313625) @@ -2,7 +2,7 @@ LIB= gssapi SHLIB_MAJOR= 10 -VERSION_DEF= ${.CURDIR}/../libc/Versions.def +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map SRCS= From owner-svn-src-all@freebsd.org Sat Feb 11 07:02:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38BBDCDA9B1; Sat, 11 Feb 2017 07:02:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 055C37F5; Sat, 11 Feb 2017 07:02:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B725G6014666; Sat, 11 Feb 2017 07:02:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B724F6014664; Sat, 11 Feb 2017 07:02:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110702.v1B724F6014664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:02: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: r313626 - in stable/10/lib/libiconv_modules: . mapper_parallel 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:02:06 -0000 Author: ngie Date: Sat Feb 11 07:02:04 2017 New Revision: 313626 URL: https://svnweb.freebsd.org/changeset/base/313626 Log: MFC r312506: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libiconv_modules/Makefile.inc stable/10/lib/libiconv_modules/mapper_parallel/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libiconv_modules/Makefile.inc ============================================================================== --- stable/10/lib/libiconv_modules/Makefile.inc Sat Feb 11 07:01:17 2017 (r313625) +++ stable/10/lib/libiconv_modules/Makefile.inc Sat Feb 11 07:02:04 2017 (r313626) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv SHLIB_MAJOR= 4 WARNS?= 6 -CFLAGS+= -I${.CURDIR}/../../libc/iconv +CFLAGS+= -I${SRCTOP}/lib/libc/iconv CFLAGS+= -Dbool=_Bool Modified: stable/10/lib/libiconv_modules/mapper_parallel/Makefile ============================================================================== --- stable/10/lib/libiconv_modules/mapper_parallel/Makefile Sat Feb 11 07:01:17 2017 (r313625) +++ stable/10/lib/libiconv_modules/mapper_parallel/Makefile Sat Feb 11 07:02:04 2017 (r313626) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../mapper_serial +.PATH: ${.CURDIR:H}/mapper_serial SHLIB= mapper_parallel SRCS+= citrus_mapper_serial.c From owner-svn-src-all@freebsd.org Sat Feb 11 07:03:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EA35CDAA27; Sat, 11 Feb 2017 07:03:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B598990; Sat, 11 Feb 2017 07:03:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B73BAe015611; Sat, 11 Feb 2017 07:03:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B73BrG015610; Sat, 11 Feb 2017 07:03:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110703.v1B73BrG015610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:03:11 +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: r313627 - stable/10/lib/libexecinfo 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:03:12 -0000 Author: ngie Date: Sat Feb 11 07:03:10 2017 New Revision: 313627 URL: https://svnweb.freebsd.org/changeset/base/313627 Log: MFC r312507: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libexecinfo/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libexecinfo/Makefile ============================================================================== --- stable/10/lib/libexecinfo/Makefile Sat Feb 11 07:02:04 2017 (r313626) +++ stable/10/lib/libexecinfo/Makefile Sat Feb 11 07:03:10 2017 (r313627) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBEXECINFO= ${.CURDIR}/../../contrib/libexecinfo +LIBEXECINFO= ${SRCTOP}/contrib/libexecinfo LIB= execinfo SHLIB_MAJOR= 1 From owner-svn-src-all@freebsd.org Sat Feb 11 07:03:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2991DCDAA90; Sat, 11 Feb 2017 07:03:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA84CABA; Sat, 11 Feb 2017 07:03:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B73tsG015702; Sat, 11 Feb 2017 07:03:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B73sXp015701; Sat, 11 Feb 2017 07:03:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110703.v1B73sXp015701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:03: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: r313628 - stable/10/lib/libexpat 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:03:56 -0000 Author: ngie Date: Sat Feb 11 07:03:54 2017 New Revision: 313628 URL: https://svnweb.freebsd.org/changeset/base/313628 Log: MFC r312508: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/lib/libexpat/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libexpat/Makefile ============================================================================== --- stable/10/lib/libexpat/Makefile Sat Feb 11 07:03:10 2017 (r313627) +++ stable/10/lib/libexpat/Makefile Sat Feb 11 07:03:54 2017 (r313628) @@ -1,6 +1,6 @@ # $FreeBSD$ -EXPAT= ${.CURDIR}/../../contrib/expat +EXPAT= ${SRCTOP}/contrib/expat LIB= bsdxml SHLIBDIR?= /lib From owner-svn-src-all@freebsd.org Sat Feb 11 07:11:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C80DCDAD34; Sat, 11 Feb 2017 07:11:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 151CDE50; Sat, 11 Feb 2017 07:11:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B7Bis9016362; Sat, 11 Feb 2017 07:11:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B7BilV016360; Sat, 11 Feb 2017 07:11:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110711.v1B7BilV016360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:11: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: r313629 - stable/10/usr.bin/cut/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:11:45 -0000 Author: ngie Date: Sat Feb 11 07:11:43 2017 New Revision: 313629 URL: https://svnweb.freebsd.org/changeset/base/313629 Log: MFC r312523: Add some basic -s flag testcases for cut(1) The remaining functionality seems to be covered in one form or another via the NetBSD ATF testcase. Added: stable/10/usr.bin/cut/tests/cut2_test.sh - copied unchanged from r312523, head/usr.bin/cut/tests/cut2_test.sh Modified: stable/10/usr.bin/cut/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/cut/tests/Makefile ============================================================================== --- stable/10/usr.bin/cut/tests/Makefile Sat Feb 11 07:03:54 2017 (r313628) +++ stable/10/usr.bin/cut/tests/Makefile Sat Feb 11 07:11:43 2017 (r313629) @@ -2,6 +2,7 @@ .include +ATF_TESTS_SH+= cut2_test NETBSD_ATF_TESTS_SH= cut_test FILESDIR= ${TESTSDIR} Copied: stable/10/usr.bin/cut/tests/cut2_test.sh (from r312523, head/usr.bin/cut/tests/cut2_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/cut/tests/cut2_test.sh Sat Feb 11 07:11:43 2017 (r313629, copy of r312523, head/usr.bin/cut/tests/cut2_test.sh) @@ -0,0 +1,51 @@ +# +# Copyright (c) 2017 Dell EMC +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Check -s flag" +} + +s_flag_body() +{ + cat >input< Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82003CDAE16; Sat, 11 Feb 2017 07:13:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 512441126; Sat, 11 Feb 2017 07:13:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B7DCD8019967; Sat, 11 Feb 2017 07:13:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B7DCsb019966; Sat, 11 Feb 2017 07:13:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110713.v1B7DCsb019966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:13: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: r313630 - stable/10/gnu/usr.bin/gdb/gdbserver 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:13:13 -0000 Author: ngie Date: Sat Feb 11 07:13:12 2017 New Revision: 313630 URL: https://svnweb.freebsd.org/changeset/base/313630 Log: MFC r312514: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/10/gnu/usr.bin/gdb/gdbserver/Makefile Sat Feb 11 07:11:43 2017 (r313629) +++ stable/10/gnu/usr.bin/gdb/gdbserver/Makefile Sat Feb 11 07:13:12 2017 (r313630) @@ -3,7 +3,7 @@ # Not elf specific so don't install in /usr/libexec/elf BINDIR=/usr/bin -GDBDIR= ${.CURDIR}/../../../../contrib/gdb +GDBDIR= ${SRCTOP}/contrib/gdb .PATH: ${GDBDIR}/gdb/signals .PATH: ${GDBDIR}/gdb/gdbserver .PATH: ${GDBDIR}/gdb From owner-svn-src-all@freebsd.org Sat Feb 11 07:14:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DCADCDAEAB; Sat, 11 Feb 2017 07:14:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E32AB1286; Sat, 11 Feb 2017 07:14:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B7EkuS020086; Sat, 11 Feb 2017 07:14:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B7EkIY020085; Sat, 11 Feb 2017 07:14:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110714.v1B7EkIY020085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:14: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: r313631 - stable/10/sys/modules/ath 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:14:47 -0000 Author: ngie Date: Sat Feb 11 07:14:45 2017 New Revision: 313631 URL: https://svnweb.freebsd.org/changeset/base/313631 Log: MFC r312513: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output Modified: stable/10/sys/modules/ath/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/ath/Makefile ============================================================================== --- stable/10/sys/modules/ath/Makefile Sat Feb 11 07:13:12 2017 (r313630) +++ stable/10/sys/modules/ath/Makefile Sat Feb 11 07:14:45 2017 (r313631) @@ -31,8 +31,8 @@ ATH_RATE?= sample # tx rate control algorithm -.PATH: ${.CURDIR}/../../dev/ath -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal KMOD= if_ath SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c @@ -46,7 +46,7 @@ SRCS+= device_if.h bus_if.h pci_if.h opt # # AR5210 support; these are first generation 11a-only devices. # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5210 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5210 SRCS+= ah_eeprom_v1.c \ ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \ ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \ @@ -56,7 +56,7 @@ SRCS+= ah_eeprom_v1.c \ # AR5211 support; these are second generation 11b/g/a devices # (but 11g was OFDM only and is not supported). # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5211 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5211 SRCS+= ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \ ar5211_keycache.c ar5211_misc.c ar5211_phy.c ar5211_power.c \ ar5211_recv.c ar5211_reset.c ar5211_xmit.c @@ -64,7 +64,7 @@ SRCS+= ar5211_attach.c ar5211_beacon.c a # # AR5212 support; this covers all other pci/cardbus legacy parts. # -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5212 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5212 SRCS+= ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \ ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \ ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \ @@ -85,7 +85,7 @@ SRCS+= ar5413.c # NB: 9160 depends on 5416 but 5416 does not require 9160 # # + 5416 (Owl) -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar5416 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar5416 SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \ ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ @@ -97,7 +97,7 @@ SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \ SRCS+= ar2133.c # + AR9160 (Sowl) -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9001 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9001 SRCS+= ar9160_attach.c # + AR9130 - (Sowl) - Embedded (AR913x SoC) @@ -111,7 +111,7 @@ SRCS+= ar9130_attach.c ar9130_eeprom.c a # AR9002 series chips # + AR9220/AR9280 - Merlin -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9002 SRCS+= ar9280.c ar9280_attach.c ar9280_olc.c # + AR9285 - Kite @@ -119,13 +119,13 @@ SRCS+= ar9285.c ar9285_reset.c ar9285_at SRCS+= ar9285_diversity.c ar9285_btcoex.c # + AR9287 - Kiwi -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal SRCS+= ah_eeprom_9287.c -.PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9002 +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal/ar9002 SRCS+= ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c # + AR9300 HAL -.PATH: ${.CURDIR}/../../contrib/dev/ath/ath_hal/ar9300 +.PATH: ${SRCTOP}/sys/contrib/dev/ath/ath_hal/ar9300 SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c @@ -135,22 +135,22 @@ SRCS+= ar9300_power.c ar9300_timer.c # NB: rate control is bound to the driver by symbol names so only pick one .if ${ATH_RATE} == "sample" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/sample +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/sample SRCS+= sample.c .elif ${ATH_RATE} == "onoe" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/onoe +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/onoe SRCS+= onoe.c .elif ${ATH_RATE} == "amrr" -.PATH: ${.CURDIR}/../../dev/ath/ath_rate/amrr +.PATH: ${SRCTOP}/sys/dev/ath/ath_rate/amrr SRCS+= amrr.c .endif # DFS -.PATH: ${.CURDIR}/../../dev/ath/ath_dfs/null +.PATH: ${SRCTOP}/sys/dev/ath/ath_dfs/null SRCS+= dfs_null.c -CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal -CFLAGS+= -I. -I${.CURDIR}/../../contrib/dev/ath/ath_hal/ +CFLAGS+= -I. -I${SRCTOP}/sys/dev/ath -I${SRCTOP}/sys/dev/ath/ath_hal +CFLAGS+= -I. -I${SRCTOP}/sys/contrib/dev/ath/ath_hal/ .if !defined(KERNBUILDDIR) opt_ah.h: From owner-svn-src-all@freebsd.org Sat Feb 11 07:35:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27B43CDB3BA; Sat, 11 Feb 2017 07:35:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82C61C8F; Sat, 11 Feb 2017 07:35:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B7ZRCF028650; Sat, 11 Feb 2017 07:35:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B7ZROH028648; Sat, 11 Feb 2017 07:35:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110735.v1B7ZROH028648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:35: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: r313632 - in stable/10/contrib/netbsd-tests/lib/libc/gen: . posix_spawn 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 07:35:29 -0000 Author: ngie Date: Sat Feb 11 07:35:27 2017 New Revision: 313632 URL: https://svnweb.freebsd.org/changeset/base/313632 Log: MFC r312102,r312108: r312102: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD r312108: Delete trailing whitespace and use __arraycount instead of nitems in contrib code Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 11 07:14:45 2017 (r313631) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 11 07:35:27 2017 (r313632) @@ -60,16 +60,16 @@ get_different_scheduler(void) /* get current schedule policy */ scheduler = sched_getscheduler(0); - for (i = 0; i < nitems(schedulers); i++) { + for (i = 0; i < __arraycount(schedulers); i++) { if (schedulers[i] == scheduler) break; } - ATF_REQUIRE_MSG(i < nitems(schedulers), + ATF_REQUIRE_MSG(i < __arraycount(schedulers), "Unknown current scheduler %d", scheduler); - + /* new scheduler */ i++; - if (i >= nitems(schedulers)) + if (i >= __arraycount(schedulers)) i = 0; return schedulers[i]; } @@ -85,7 +85,7 @@ get_different_priority(int scheduler) sched_getparam(0, ¶m); priority = param.sched_priority; - + /* * Change numerical value of the priority, to ensure that it * was set for the spawned child. @@ -127,7 +127,7 @@ ATF_TC_BODY(t_spawnattr, tc) scheduler = get_different_scheduler(); priority = get_different_priority(scheduler); sp.sched_priority = priority; - + sigemptyset(&sig); sigaddset(&sig, SIGUSR1); Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 11 07:14:45 2017 (r313631) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 11 07:35:27 2017 (r313632) @@ -27,6 +27,7 @@ */ #ifdef __FreeBSD__ +/* kqueue(2) on FreeBSD requires sys/types.h for uintptr_t; NetBSD doesn't. */ #include #endif #include From owner-svn-src-all@freebsd.org Sat Feb 11 09:12:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0FB7CD92DA for ; Sat, 11 Feb 2017 09:12:39 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69E331ECF for ; Sat, 11 Feb 2017 09:12:39 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x234.google.com with SMTP id v200so32805599ywc.3 for ; Sat, 11 Feb 2017 01:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4J2QlmLzazBmZcxVLkQQorgHoGK8tv8Oq5lflTYEGRU=; b=DI08FbVJ6xWSkJwOgACMSe6WYH2/CtJGhKqg1swEbE7mIII7Lp2h2eAfy0+fCITOtx fzarB0SK7vnq3MwiCIWAnuEjVY4g6HeDA1L6adoraAHfNBjQ7wdSnxchl8BaDbc3ZNk/ CZY8NGVXN6hyUPdHerwnL9l21eo+JnlQhE4GhLg5VMukXMydZ2vMbC11OvtJGh/wr4kC 6dqxkgKyI6eRfKqOBHuY5SawVNU+gdXCj8XsykeqwfbHO0pJv9v+RwJ3k48S13nsJtAh PmZAgzlaCdihQjnEpTAALqcoQ22lZzf2j7UnIffFbXKpmqWkKd+Zn9FEmXeQRSxVWC2u es9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4J2QlmLzazBmZcxVLkQQorgHoGK8tv8Oq5lflTYEGRU=; b=tcdzYSy2RdU0VuUw1n9mc5Vy/UQ4+AJk8cV9gNdojHoKYL7OqIiM1zTm0xEDGoLv9U 29qmXbWHPDEwsmOzBrUDaGiFJ6g4vTQc/ocdecmWg5hSYJB/REIXw4i11bzasHgbtips vUGZrdIPMYfDar6by5w2EMZFjBx0tYq5yT6PKsIgFVi9cbHTBF40T5/Et41ZQtw3ieoK GpmuVbXkI7+fL0JbWMvMk2lPXWSHq41+zBM/GvE2WIUYJRYczsmqvMXdkVz0GZUJlwXT ochTMNjaU/g7EFDMHaphn4pSZfel8BN6+Nj8ZytJmudSY7HNEBKg0iH+GyPdSjyrYEV5 z9nA== X-Gm-Message-State: AMke39mKWWmYHgxuOrUBJQoNZ/z2vQ8rWTDNai0hoIYudWNfV7AtZIkdXZVoekHp9+4R0q1m/hN6nAjvHC9cOA== X-Received: by 10.129.110.133 with SMTP id j127mr9442105ywc.214.1486804358278; Sat, 11 Feb 2017 01:12:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.76 with HTTP; Sat, 11 Feb 2017 01:12:07 -0800 (PST) In-Reply-To: <201702110735.v1B7ZROH028648@repo.freebsd.org> References: <201702110735.v1B7ZROH028648@repo.freebsd.org> From: Ed Schouten Date: Sat, 11 Feb 2017 10:12:07 +0100 Message-ID: Subject: Re: svn commit: r313632 - in stable/10/contrib/netbsd-tests/lib/libc/gen: . posix_spawn To: Ngie Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 09:12:39 -0000 2017-02-11 8:35 GMT+01:00 Ngie Cooper : > Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD Which is a bug on its own in my opinion. What do you think of this patch? Index: sys/sys/event.h =================================================================== --- sys/sys/event.h (revision 313335) +++ sys/sys/event.h (working copy) @@ -29,7 +29,8 @@ #ifndef _SYS_EVENT_H_ #define _SYS_EVENT_H_ -#include +#include +#include #define EVFILT_READ (-1) #define EVFILT_WRITE (-2) @@ -57,11 +58,11 @@ } while(0) struct kevent { - uintptr_t ident; /* identifier for this event */ + __uintptr_t ident; /* identifier for this event */ short filter; /* filter for event */ - u_short flags; - u_int fflags; - intptr_t data; + unsigned short flags; + unsigned int fflags; + __intptr_t data; void *udata; /* opaque user data identifier */ }; -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Sat Feb 11 09:57:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D1B0CD9DD2; Sat, 11 Feb 2017 09:57:33 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47C9E1249; Sat, 11 Feb 2017 09:57:33 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-io0-x244.google.com with SMTP id c80so7937762iod.1; Sat, 11 Feb 2017 01:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ERQR8bGmWHZgDY/QtaahA40WhJLOZMk6Rugg2hvvqiM=; b=KHpoOwDQ92wznrvjEONvJctafe3VS6500XdoLXhb994CzbQzmkPnKMqh2TlULUKyGj R6eLU3B2Tbjr2t1juMUP/npHE3dnkyh39haD5sxk29zr15GgxCLBM6HWZjiXoobhiWNq iMm4UZF48JbQn/sJTDtXnaq2T4+mu+upKTuzgpPNspYe+LL7XmS03+MOkLKRuHYFeJJ/ 2u5gsEMZsS7kkwYoyO6a+avAh/Odw+9wCA2pPE619Cuv7x4gGHEm37rxYk5EVCEwGJsM 9SK2SqdZVh1B8OUwbsEUgWyVkJk0T24eKDvWsX43g68aR0ME97BHsZv9Qfll8xkv91rV suJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ERQR8bGmWHZgDY/QtaahA40WhJLOZMk6Rugg2hvvqiM=; b=GIew9m98Q1z66cGZLJsFhucU6EIDnhpmQIZ/lLOgjizt1eg643BGKArBqF2IpAdO36 atGYk0Q93DKmJa+uFpOh04bC7qx7OBNMJGrgoboVgAv/TPmIEHdl0xL2HQAqtW6dIj9i owInkFgaG7WYLg24l1MgyXYZvz3NPv2SF1T0s0OBkrJTi4VWDIR9kJUx+UmKJO/3V7I4 AwclymsLTuheFDnD7RJaIWqB7NDej4AKbSviV6r1hY6ITLvfCFmNOfxYES13uSf4k9aB gRXo659GGqZdPX+xBAAan/6aFsFcys649PetdRs/Jhznq0hxflFLmdz9VaDHy0DRS9qh GvZA== X-Gm-Message-State: AMke39nTfSkq+qLXRTg+16X9dsfDaEgvojwFf90zW8g+hPXI/y+11mpotw+IUKHSx5j1035WasEpTbKZCM77UA== X-Received: by 10.107.135.42 with SMTP id j42mr12819930iod.171.1486807052536; Sat, 11 Feb 2017 01:57:32 -0800 (PST) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.205.142 with HTTP; Sat, 11 Feb 2017 01:57:32 -0800 (PST) In-Reply-To: <201702101737.v1AHb4Qg077598@repo.freebsd.org> References: <201702101737.v1AHb4Qg077598@repo.freebsd.org> From: Antoine Brodin Date: Sat, 11 Feb 2017 10:57:32 +0100 X-Google-Sender-Auth: TEw2OsQL2He3X3dvcz1oTV3erCg Message-ID: Subject: Re: svn commit: r313560 - head/sys/net To: Gleb Smirnoff Cc: src-committers , 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 09:57:33 -0000 On Fri, Feb 10, 2017 at 6:37 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Feb 10 17:37:04 2017 > New Revision: 313560 > URL: https://svnweb.freebsd.org/changeset/base/313560 > > Log: > Last consumer of _WANT_RTENTRY gone. > > Modified: > head/sys/net/route.h Hi, This change seems to break devel/llvm37 : http://beefy11.nyi.freebsd.org/data/head-i386-default/p433828_s313572/logs/errors/llvm37-3.7.1_4.log http://beefy12.nyi.freebsd.org/data/head-amd64-default/p433828_s313572/logs/errors/llvm37-3.7.1_4.log More than 6000 are skipped due to this failure. Cheers, Antoine (with hat: portmgr) From owner-svn-src-all@freebsd.org Sat Feb 11 12:55:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C00D5CDA73A; Sat, 11 Feb 2017 12:55:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63C7D1509; Sat, 11 Feb 2017 12:55:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id 89so17836649wrr.1; Sat, 11 Feb 2017 04:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=mSwsK/SiE5o3n7++BPDV70GUCKlWK2XUhScQr1vW6DU=; b=i+K27P2js46wNzzzaaBk9LFuSc0OCaLG32Fe4jcyBI3u0yFpIOtBkfFW0tszvRg1gn PJjOikOVTuBhDmK3alJVlCnl+cSQvRncxxupIvQ5x0GHOUUhlrEu2x6ujzBm/Oly/Row PYKffX3uaukb+BrG5lI+3NWTaj73EIRjVgiqJp2dJ7RlOJ4idrtj3rfoF3ZMU6qJP7eS 5s6APBFZaha4j1n+YWyUHaFe9NXE1B2VibUxHONUEBizc/r39hh3lPuUblBP0UyFBycy lU9qNQo/c8ueQPoCHvCZchcnn5i414CUczQphinCqBk+tOYrgzT9LRLAEQxGVB5By/fg lSlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=mSwsK/SiE5o3n7++BPDV70GUCKlWK2XUhScQr1vW6DU=; b=NJpxJ+wkRfwUS3stzP75gxADKBjlLR2/LHp5h8WAy63KDH3M1Q9tUZQwN3KDZZXXVa IxwSv9h2AmjaJYB+yJWYhCVMk9gMPIKxvCrGd3LTIBDBTZCeh05nuThgQ3avbiMiorQD wnCHMYDdG7MHmWNBlv30DhPrCb1dOd0tRl4kZW9q/eoY8WKCbZI5BN+2vbz5dvSBkMei vmEpTS6AuwaZ0M99fAIHS4t6IlmjRuKYia+obfhAJTQTb0cY/f7dyPV1o6I+khv7wrII XiTG71t1RniPGgcEtmGRAPH+tnp48Uqpw5xPggHNRMHX1wEiEZoMkxzzmomhylYMjbHq e/gA== X-Gm-Message-State: AMke39kevxcyQ4qHeYn0bWUpZ54UGjxt3LLsxQUCEUXxtGnOkA+7PKgPv8LaSLExeOQlbg== X-Received: by 10.223.131.193 with SMTP id 59mr11470470wre.186.1486817751286; Sat, 11 Feb 2017 04:55:51 -0800 (PST) Received: from brick (gbh5.clarehall.cam.ac.uk. [131.111.224.37]) by smtp.gmail.com with ESMTPSA id w30sm6342892wrb.5.2017.02.11.04.55.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 04:55:50 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 11 Feb 2017 12:55:48 +0000 From: Edward Tomasz Napierala To: John Baldwin Cc: Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Message-ID: <20170211125548.GB3574@brick> Mail-Followup-To: John Baldwin , Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <3349880.lYJPXOWCO7@ralph.baldwin.cx> <20170201182337.GG3334@FreeBSD.org> <148601396.h8ndg2hV6R@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <148601396.h8ndg2hV6R@ralph.baldwin.cx> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 12:55:53 -0000 On 0201T1236, John Baldwin wrote: > On Wednesday, February 01, 2017 10:23:37 AM Gleb Smirnoff wrote: > > On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote: > > J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: > > J> > Author: trasz > > J> > Date: Mon Jan 30 12:57:22 2017 > > J> > New Revision: 312988 > > J> > URL: https://svnweb.freebsd.org/changeset/base/312988 > > J> > > > J> > Log: > > J> > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them > > J> > instead of their sys_*() counterparts in various compats. The svr4 > > J> > is left untouched, because there's no point. > > J> > > J> Note that you can compile test svr4 since it is still in the tree. > > J> If we want to remove svr4, then we should remove it. However, we > > J> should maintain code that is in the tree if it is still there. > > > > All we can do right now is maintain it as compilable. My example with > > COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody > > complains. > > > > Okay, what if I say on freebsd-arch/freebsd-current that I am going > > to remove it and wait for any objections for a month, and then do it? > > I would rather remove it than start skipping it in tree sweeps. We should > strive to maintain code that is in our tree. If you can't get things tested, > then we are better off removing the code instead of having it rot in the > tree (cf the discussion on old ISA drivers). On one hand you're right. On the other - in this particular case including svr4 (which I have no way of testing) in this sweep could break it, while not touching it couldn't, as the old method continues to work. Removing it is not a bad idea, though. Gleb, would you? From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25D38CDB13A; Sat, 11 Feb 2017 13:25:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7F2892B; Sat, 11 Feb 2017 13:25:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPQNF075295; Sat, 11 Feb 2017 13:25:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPOx4075273; Sat, 11 Feb 2017 13:25:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPOx4075273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313633 - in vendor/llvm/dist: docs include/llvm/ADT include/llvm/CodeGen include/llvm/IR include/llvm/Target lib/Bitcode/Reader lib/CodeGen lib/MC lib/Target/AArch64 lib/Target/X86 tes... 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:28 -0000 Author: dim Date: Sat Feb 11 13:25:24 2017 New Revision: 313633 URL: https://svnweb.freebsd.org/changeset/base/313633 Log: Vendor import of llvm release_40 branch r294803: https://llvm.org/svn/llvm-project/llvm/branches/release_40@294803 Added: vendor/llvm/dist/test/CodeGen/AArch64/ldst-zero.ll vendor/llvm/dist/test/CodeGen/AArch64/misched-stp.ll vendor/llvm/dist/test/CodeGen/ARM/machine-copyprop.mir Deleted: vendor/llvm/dist/test/CodeGen/X86/conditional-tailcall.ll vendor/llvm/dist/test/CodeGen/X86/tail-call-conditional.mir Modified: vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/docs/conf.py vendor/llvm/dist/include/llvm/ADT/ilist_iterator.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h vendor/llvm/dist/include/llvm/IR/PassManager.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/MC/MCCodeView.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ExpandPseudo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrControl.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp vendor/llvm/dist/test/Bitcode/DIGlobalVariableExpression.ll vendor/llvm/dist/test/Bitcode/DIGlobalVariableExpression.ll.bc vendor/llvm/dist/test/Bitcode/dityperefs-3.8.ll vendor/llvm/dist/test/CodeGen/AArch64/regcoal-physreg.mir vendor/llvm/dist/test/CodeGen/X86/shrink-compare.ll vendor/llvm/dist/test/MC/COFF/cv-def-range-gap.s vendor/llvm/dist/unittests/ADT/IListIteratorTest.cpp vendor/llvm/dist/unittests/CodeGen/MachineInstrBundleIteratorTest.cpp vendor/llvm/dist/utils/release/build_llvm_package.bat Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 11 13:25:24 2017 (r313633) @@ -55,6 +55,12 @@ Non-comprehensive list of changes in thi * LLVM now handles invariant.group across different basic blocks, which makes it possible to devirtualize virtual calls inside loops. +* The aggressive dead code elimination phase ("adce") now remove + branches which do not effect program behavior. Loops are retained by + default since they may be infinite but these can also be removed + with LLVM option -adce-remove-loops when the loop body otherwise has + no live operations. + * ... next change ... .. NOTE @@ -75,6 +81,95 @@ Non-comprehensive list of changes in thi * Significant build-time and binary-size improvements when compiling with debug info (-g). +Code Generation Testing +----------------------- + +Passes that work on the machine instruction representation can be tested with +the .mir serialization format. ``llc`` supports the ``-run-pass``, +``-stop-after``, ``-stop-before``, ``-start-after``, ``-start-before`` to to +run a single pass of the code generation pipeline, or to stop or start the code +generation pipeline at a given point. + +Additional information can be found in the :doc:`MIRLangRef`. The format is +used by the tests ending in ``.mir`` in the ``test/CodeGen`` directory. + +This feature is available since 2015. It is used more often lately and was not +mentioned in the release notes yet. + +Intrusive list API overhaul +--------------------------- + +The intrusive list infrastructure was substantially rewritten over the last +couple of releases, primarily to excise undefined behaviour. The biggest +changes landed in this release. + +* ``simple_ilist`` is a lower-level intrusive list that never takes + ownership of its nodes. New intrusive-list clients should consider using it + instead of ``ilist``. + + * ``ilist_tag`` allows a single data type to be inserted into two + parallel intrusive lists. A type can inherit twice from ``ilist_node``, + first using ``ilist_node>`` (enabling insertion into + ``simple_ilist>``) and second using + ``ilist_node>`` (enabling insertion into + ``simple_ilist>``), where ``A`` and ``B`` are arbitrary + types. + + * ``ilist_sentinel_tracking`` controls whether an iterator knows + whether it's pointing at the sentinel (``end()``). By default, sentinel + tracking is on when ABI-breaking checks are enabled, and off otherwise; + this is used for an assertion when dereferencing ``end()`` (this assertion + triggered often in practice, and many backend bugs were fixed). Explicitly + turning on sentinel tracking also enables ``iterator::isEnd()``. This is + used by ``MachineInstrBundleIterator`` to iterate over bundles. + +* ``ilist`` is built on top of ``simple_ilist``, and supports the same + configuration options. As before (and unlike ``simple_ilist``), + ``ilist`` takes ownership of its nodes. However, it no longer supports + *allocating* nodes, and is now equivalent to ``iplist``. ``iplist`` + will likely be removed in the future. + + * ``ilist`` now always uses ``ilist_traits``. Instead of passing a + custom traits class in via a template parameter, clients that want to + customize the traits should specialize ``ilist_traits``. Clients that + want to avoid ownership can specialize ``ilist_alloc_traits`` to inherit + from ``ilist_noalloc_traits`` (or to do something funky); clients that + need callbacks can specialize ``ilist_callback_traits`` directly. + +* The underlying data structure is now a simple recursive linked list. The + sentinel node contains only a "next" (``begin()``) and "prev" (``rbegin()``) + pointer and is stored in the same allocation as ``simple_ilist``. + Previously, it was malloc-allocated on-demand by default, although the + now-defunct ``ilist_sentinel_traits`` was sometimes specialized to avoid + this. + +* The ``reverse_iterator`` class no longer uses ``std::reverse_iterator``. + Instead, it now has a handle to the same node that it dereferences to. + Reverse iterators now have the same iterator invalidation semantics as + forward iterators. + + * ``iterator`` and ``reverse_iterator`` have explicit conversion constructors + that match ``std::reverse_iterator``'s off-by-one semantics, so that + reversing the end points of an iterator range results in the same range + (albeit in reverse). I.e., ``reverse_iterator(begin())`` equals + ``rend()``. + + * ``iterator::getReverse()`` and ``reverse_iterator::getReverse()`` return an + iterator that dereferences to the *same* node. I.e., + ``begin().getReverse()`` equals ``--rend()``. + + * ``ilist_node::getIterator()`` and + ``ilist_node::getReverseIterator()`` return the forward and reverse + iterators that dereference to the current node. I.e., + ``begin()->getIterator()`` equals ``begin()`` and + ``rbegin()->getReverseIterator()`` equals ``rbegin()``. + +* ``iterator`` now stores an ``ilist_node_base*`` instead of a ``T*``. The + implicit conversions between ``ilist::iterator`` and ``T*`` have been + removed. Clients may use ``N->getIterator()`` (if not ``nullptr``) or + ``&*I`` (if not ``end()``); alternatively, clients may refactor to use + references for known-good nodes. + Changes to the LLVM IR ---------------------- @@ -133,9 +228,23 @@ Changes to the AMDGPU Target Changes to the AVR Target ----------------------------- -* The entire backend has been merged in-tree with all tests passing. All of - the instruction selection code and the machine code backend has landed - recently and is fully usable. +This marks the first release where the AVR backend has been completely merged +from a fork into LLVM trunk. The backend is still marked experimental, but +is generally quite usable. All downstream development has halted on +`GitHub `_, and changes now go directly into +LLVM trunk. + +* Instruction selector and pseudo instruction expansion pass landed +* `read_register` and `write_register` intrinsics are now supported +* Support stack stores greater than 63-bytes from the bottom of the stack +* A number of assertion errors have been fixed +* Support stores to `undef` locations +* Very basic support for the target has been added to clang +* Small optimizations to some 16-bit boolean expressions + +Most of the work behind the scenes has been on correctness of generated +assembly, and also fixing some assertions we would hit on some well-formed +inputs. Changes to the OCaml bindings ----------------------------- Modified: vendor/llvm/dist/docs/conf.py ============================================================================== --- vendor/llvm/dist/docs/conf.py Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/docs/conf.py Sat Feb 11 13:25:24 2017 (r313633) @@ -48,9 +48,9 @@ copyright = u'2003-%d, LLVM Project' % d # built documents. # # The short X.Y version. -version = '4.0' +version = '4' # The full version, including alpha/beta/rc tags. -release = '4.0' +release = '4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. Modified: vendor/llvm/dist/include/llvm/ADT/ilist_iterator.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/ilist_iterator.h Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/include/llvm/ADT/ilist_iterator.h Sat Feb 11 13:25:24 2017 (r313633) @@ -102,10 +102,23 @@ public: return *this; } - /// Convert from an iterator to its reverse. + /// Explicit conversion between forward/reverse iterators. /// - /// TODO: Roll this into the implicit constructor once we're sure that no one - /// is relying on the std::reverse_iterator off-by-one semantics. + /// Translate between forward and reverse iterators without changing range + /// boundaries. The resulting iterator will dereference (and have a handle) + /// to the previous node, which is somewhat unexpected; but converting the + /// two endpoints in a range will give the same range in reverse. + /// + /// This matches std::reverse_iterator conversions. + explicit ilist_iterator( + const ilist_iterator &RHS) + : ilist_iterator(++RHS.getReverse()) {} + + /// Get a reverse iterator to the same node. + /// + /// Gives a reverse iterator that will dereference (and have a handle) to the + /// same node. Converting the endpoint iterators in a range will give a + /// different range; for range operations, use the explicit conversions. ilist_iterator getReverse() const { if (NodePtr) return ilist_iterator(*NodePtr); Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h Sat Feb 11 13:25:24 2017 (r313633) @@ -153,6 +153,18 @@ public: : MII(I.getInstrIterator()) {} MachineInstrBundleIterator() : MII(nullptr) {} + /// Explicit conversion between forward/reverse iterators. + /// + /// Translate between forward and reverse iterators without changing range + /// boundaries. The resulting iterator will dereference (and have a handle) + /// to the previous node, which is somewhat unexpected; but converting the + /// two endpoints in a range will give the same range in reverse. + /// + /// This matches std::reverse_iterator conversions. + explicit MachineInstrBundleIterator( + const MachineInstrBundleIterator &I) + : MachineInstrBundleIterator(++I.getReverse()) {} + /// Get the bundle iterator for the given instruction's bundle. static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) { return MachineInstrBundleIteratorHelper::getBundleBegin(MI); @@ -258,6 +270,11 @@ public: nonconst_iterator getNonConstIterator() const { return MII.getNonConst(); } + /// Get a reverse iterator to the same node. + /// + /// Gives a reverse iterator that will dereference (and have a handle) to the + /// same node. Converting the endpoint iterators in a range will give a + /// different range; for range operations, use the explicit conversions. reverse_iterator getReverse() const { return MII.getReverse(); } }; Modified: vendor/llvm/dist/include/llvm/IR/PassManager.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/PassManager.h Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/include/llvm/IR/PassManager.h Sat Feb 11 13:25:24 2017 (r313633) @@ -311,6 +311,8 @@ template struct PassInfoMixin { /// Gets the name of the pass we are mixed into. static StringRef name() { + static_assert(std::is_base_of::value, + "Must pass the derived type as the template argument!"); StringRef Name = getTypeName(); if (Name.startswith("llvm::")) Name = Name.drop_front(strlen("llvm::")); @@ -339,7 +341,11 @@ struct AnalysisInfoMixin : PassInfoMixin /// known platform with this limitation is Windows DLL builds, specifically /// building each part of LLVM as a DLL. If we ever remove that build /// configuration, this mixin can provide the static key as well. - static AnalysisKey *ID() { return &DerivedT::Key; } + static AnalysisKey *ID() { + static_assert(std::is_base_of::value, + "Must pass the derived type as the template argument!"); + return &DerivedT::Key; + } }; /// This templated class represents "all analyses that operate over \ class OuterAnalysisManagerProxy : public AnalysisInfoMixin< - OuterAnalysisManagerProxy> { + OuterAnalysisManagerProxy> { public: /// \brief Result proxy object for \c OuterAnalysisManagerProxy. class Result { @@ -1072,7 +1078,7 @@ public: private: friend AnalysisInfoMixin< - OuterAnalysisManagerProxy>; + OuterAnalysisManagerProxy>; static AnalysisKey Key; const AnalysisManagerT *AM; Modified: vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h Sat Feb 11 13:25:24 2017 (r313633) @@ -1108,25 +1108,6 @@ public: /// terminator instruction that has not been predicated. virtual bool isUnpredicatedTerminator(const MachineInstr &MI) const; - /// Returns true if MI is an unconditional tail call. - virtual bool isUnconditionalTailCall(const MachineInstr &MI) const { - return false; - } - - /// Returns true if the tail call can be made conditional on BranchCond. - virtual bool - canMakeTailCallConditional(SmallVectorImpl &Cond, - const MachineInstr &TailCall) const { - return false; - } - - /// Replace the conditional branch in MBB with a conditional tail call. - virtual void replaceBranchWithTailCall(MachineBasicBlock &MBB, - SmallVectorImpl &Cond, - const MachineInstr &TailCall) const { - llvm_unreachable("Target didn't implement replaceBranchWithTailCall!"); - } - /// Convert the instruction into a predicated instruction. /// It returns true if the operation was successful. virtual bool PredicateInstruction(MachineInstr &MI, Modified: vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -448,6 +448,7 @@ class MetadataLoader::MetadataLoaderImpl bool StripTBAA = false; bool HasSeenOldLoopTags = false; + bool NeedUpgradeToDIGlobalVariableExpression = false; /// True if metadata is being parsed for a module being ThinLTO imported. bool IsImporting = false; @@ -473,6 +474,45 @@ class MetadataLoader::MetadataLoaderImpl CUSubprograms.clear(); } + /// Upgrade old-style bare DIGlobalVariables to DIGlobalVariableExpressions. + void upgradeCUVariables() { + if (!NeedUpgradeToDIGlobalVariableExpression) + return; + + // Upgrade list of variables attached to the CUs. + if (NamedMDNode *CUNodes = TheModule.getNamedMetadata("llvm.dbg.cu")) + for (unsigned I = 0, E = CUNodes->getNumOperands(); I != E; ++I) { + auto *CU = cast(CUNodes->getOperand(I)); + if (auto *GVs = dyn_cast_or_null(CU->getRawGlobalVariables())) + for (unsigned I = 0; I < GVs->getNumOperands(); I++) + if (auto *GV = + dyn_cast_or_null(GVs->getOperand(I))) { + auto *DGVE = + DIGlobalVariableExpression::getDistinct(Context, GV, nullptr); + GVs->replaceOperandWith(I, DGVE); + } + } + + // Upgrade variables attached to globals. + for (auto &GV : TheModule.globals()) { + SmallVector MDs, NewMDs; + GV.getMetadata(LLVMContext::MD_dbg, MDs); + GV.eraseMetadata(LLVMContext::MD_dbg); + for (auto *MD : MDs) + if (auto *DGV = dyn_cast_or_null(MD)) { + auto *DGVE = + DIGlobalVariableExpression::getDistinct(Context, DGV, nullptr); + GV.addMetadata(LLVMContext::MD_dbg, *DGVE); + } else + GV.addMetadata(LLVMContext::MD_dbg, *MD); + } + } + + void upgradeDebugInfo() { + upgradeCUSubprograms(); + upgradeCUVariables(); + } + public: MetadataLoaderImpl(BitstreamCursor &Stream, Module &TheModule, BitcodeReaderValueList &ValueList, @@ -726,7 +766,7 @@ Error MetadataLoader::MetadataLoaderImpl // Reading the named metadata created forward references and/or // placeholders, that we flush here. resolveForwardRefsAndPlaceholders(Placeholders); - upgradeCUSubprograms(); + upgradeDebugInfo(); // Return at the beginning of the block, since it is easy to skip it // entirely from there. Stream.ReadBlockEnd(); // Pop the abbrev block context. @@ -750,7 +790,7 @@ Error MetadataLoader::MetadataLoaderImpl return error("Malformed block"); case BitstreamEntry::EndBlock: resolveForwardRefsAndPlaceholders(Placeholders); - upgradeCUSubprograms(); + upgradeDebugInfo(); return Error::success(); case BitstreamEntry::Record: // The interesting case. @@ -1420,11 +1460,17 @@ Error MetadataLoader::MetadataLoaderImpl getDITypeRefOrNull(Record[6]), Record[7], Record[8], getMDOrNull(Record[10]), AlignInBits)); - auto *DGVE = DIGlobalVariableExpression::getDistinct(Context, DGV, Expr); - MetadataList.assignValue(DGVE, NextMetadataNo); - NextMetadataNo++; + DIGlobalVariableExpression *DGVE = nullptr; + if (Attach || Expr) + DGVE = DIGlobalVariableExpression::getDistinct(Context, DGV, Expr); + else + NeedUpgradeToDIGlobalVariableExpression = true; if (Attach) Attach->addDebugInfo(DGVE); + + auto *MDNode = Expr ? cast(DGVE) : cast(DGV); + MetadataList.assignValue(MDNode, NextMetadataNo); + NextMetadataNo++; } else return error("Invalid record"); Modified: vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -49,7 +49,6 @@ STATISTIC(NumDeadBlocks, "Number of dead STATISTIC(NumBranchOpts, "Number of branches optimized"); STATISTIC(NumTailMerge , "Number of block tails merged"); STATISTIC(NumHoist , "Number of times common instructions are hoisted"); -STATISTIC(NumTailCalls, "Number of tail calls optimized"); static cl::opt FlagEnableTailMerge("enable-tail-merge", cl::init(cl::BOU_UNSET), cl::Hidden); @@ -1387,42 +1386,6 @@ ReoptimizeBlock: } } - if (!IsEmptyBlock(MBB) && MBB->pred_size() == 1 && - MF.getFunction()->optForSize()) { - // Changing "Jcc foo; foo: jmp bar;" into "Jcc bar;" might change the branch - // direction, thereby defeating careful block placement and regressing - // performance. Therefore, only consider this for optsize functions. - MachineInstr &TailCall = *MBB->getFirstNonDebugInstr(); - if (TII->isUnconditionalTailCall(TailCall)) { - MachineBasicBlock *Pred = *MBB->pred_begin(); - MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr; - SmallVector PredCond; - bool PredAnalyzable = - !TII->analyzeBranch(*Pred, PredTBB, PredFBB, PredCond, true); - - if (PredAnalyzable && !PredCond.empty() && PredTBB == MBB) { - // The predecessor has a conditional branch to this block which consists - // of only a tail call. Try to fold the tail call into the conditional - // branch. - if (TII->canMakeTailCallConditional(PredCond, TailCall)) { - // TODO: It would be nice if analyzeBranch() could provide a pointer - // to the branch insturction so replaceBranchWithTailCall() doesn't - // have to search for it. - TII->replaceBranchWithTailCall(*Pred, PredCond, TailCall); - ++NumTailCalls; - Pred->removeSuccessor(MBB); - MadeChange = true; - return MadeChange; - } - } - // If the predecessor is falling through to this block, we could reverse - // the branch condition and fold the tail call into that. However, after - // that we might have to re-arrange the CFG to fall through to the other - // block and there is a high risk of regressing code size rather than - // improving it. - } - } - // Analyze the branch in the current block. MachineBasicBlock *CurTBB = nullptr, *CurFBB = nullptr; SmallVector CurCond; Modified: vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -61,6 +61,7 @@ namespace { private: void ClobberRegister(unsigned Reg); + void ReadRegister(unsigned Reg); void CopyPropagateBlock(MachineBasicBlock &MBB); bool eraseIfRedundant(MachineInstr &Copy, unsigned Src, unsigned Def); @@ -120,6 +121,18 @@ void MachineCopyPropagation::ClobberRegi } } +void MachineCopyPropagation::ReadRegister(unsigned Reg) { + // If 'Reg' is defined by a copy, the copy is no longer a candidate + // for elimination. + for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { + Reg2MIMap::iterator CI = CopyMap.find(*AI); + if (CI != CopyMap.end()) { + DEBUG(dbgs() << "MCP: Copy is used - not dead: "; CI->second->dump()); + MaybeDeadCopies.remove(CI->second); + } + } +} + /// Return true if \p PreviousCopy did copy register \p Src to register \p Def. /// This fact may have been obscured by sub register usage or may not be true at /// all even though Src and Def are subregisters of the registers used in @@ -212,12 +225,14 @@ void MachineCopyPropagation::CopyPropaga // If Src is defined by a previous copy, the previous copy cannot be // eliminated. - for (MCRegAliasIterator AI(Src, TRI, true); AI.isValid(); ++AI) { - Reg2MIMap::iterator CI = CopyMap.find(*AI); - if (CI != CopyMap.end()) { - DEBUG(dbgs() << "MCP: Copy is no longer dead: "; CI->second->dump()); - MaybeDeadCopies.remove(CI->second); - } + ReadRegister(Src); + for (const MachineOperand &MO : MI->implicit_operands()) { + if (!MO.isReg() || !MO.readsReg()) + continue; + unsigned Reg = MO.getReg(); + if (!Reg) + continue; + ReadRegister(Reg); } DEBUG(dbgs() << "MCP: Copy is a deletion candidate: "; MI->dump()); @@ -234,6 +249,14 @@ void MachineCopyPropagation::CopyPropaga // ... // %xmm2 = copy %xmm9 ClobberRegister(Def); + for (const MachineOperand &MO : MI->implicit_operands()) { + if (!MO.isReg() || !MO.isDef()) + continue; + unsigned Reg = MO.getReg(); + if (!Reg) + continue; + ClobberRegister(Reg); + } // Remember Def is defined by the copy. for (MCSubRegIterator SR(Def, TRI, /*IncludeSelf=*/true); SR.isValid(); @@ -268,17 +291,8 @@ void MachineCopyPropagation::CopyPropaga if (MO.isDef()) { Defs.push_back(Reg); - continue; - } - - // If 'Reg' is defined by a copy, the copy is no longer a candidate - // for elimination. - for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { - Reg2MIMap::iterator CI = CopyMap.find(*AI); - if (CI != CopyMap.end()) { - DEBUG(dbgs() << "MCP: Copy is used - not dead: "; CI->second->dump()); - MaybeDeadCopies.remove(CI->second); - } + } else { + ReadRegister(Reg); } // Treat undef use like defs for copy propagation but not for // dead copy. We would need to do a liveness check to be sure the copy Modified: vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -1556,9 +1556,10 @@ bool RegisterCoalescer::joinCopy(Machine bool RegisterCoalescer::joinReservedPhysReg(CoalescerPair &CP) { unsigned DstReg = CP.getDstReg(); + unsigned SrcReg = CP.getSrcReg(); assert(CP.isPhys() && "Must be a physreg copy"); assert(MRI->isReserved(DstReg) && "Not a reserved register"); - LiveInterval &RHS = LIS->getInterval(CP.getSrcReg()); + LiveInterval &RHS = LIS->getInterval(SrcReg); DEBUG(dbgs() << "\t\tRHS = " << RHS << '\n'); assert(RHS.containsOneValue() && "Invalid join with reserved register"); @@ -1592,17 +1593,36 @@ bool RegisterCoalescer::joinReservedPhys // Delete the identity copy. MachineInstr *CopyMI; if (CP.isFlipped()) { - CopyMI = MRI->getVRegDef(RHS.reg); + // Physreg is copied into vreg + // %vregY = COPY %X + // ... //< no other def of %X here + // use %vregY + // => + // ... + // use %X + CopyMI = MRI->getVRegDef(SrcReg); } else { - if (!MRI->hasOneNonDBGUse(RHS.reg)) { + // VReg is copied into physreg: + // %vregX = def + // ... //< no other def or use of %Y here + // %Y = COPY %vregX + // => + // %Y = def + // ... + if (!MRI->hasOneNonDBGUse(SrcReg)) { DEBUG(dbgs() << "\t\tMultiple vreg uses!\n"); return false; } - MachineInstr *DestMI = MRI->getVRegDef(RHS.reg); - CopyMI = &*MRI->use_instr_nodbg_begin(RHS.reg); - const SlotIndex CopyRegIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot(); - const SlotIndex DestRegIdx = LIS->getInstructionIndex(*DestMI).getRegSlot(); + if (!LIS->intervalIsInOneMBB(RHS)) { + DEBUG(dbgs() << "\t\tComplex control flow!\n"); + return false; + } + + MachineInstr &DestMI = *MRI->getVRegDef(SrcReg); + CopyMI = &*MRI->use_instr_nodbg_begin(SrcReg); + SlotIndex CopyRegIdx = LIS->getInstructionIndex(*CopyMI).getRegSlot(); + SlotIndex DestRegIdx = LIS->getInstructionIndex(DestMI).getRegSlot(); if (!MRI->isConstantPhysReg(DstReg)) { // We checked above that there are no interfering defs of the physical @@ -1629,8 +1649,8 @@ bool RegisterCoalescer::joinReservedPhys // We're going to remove the copy which defines a physical reserved // register, so remove its valno, etc. - DEBUG(dbgs() << "\t\tRemoving phys reg def of " << DstReg << " at " - << CopyRegIdx << "\n"); + DEBUG(dbgs() << "\t\tRemoving phys reg def of " << PrintReg(DstReg, TRI) + << " at " << CopyRegIdx << "\n"); LIS->removePhysRegDefAt(DstReg, CopyRegIdx); // Create a new dead def at the new def location. Modified: vendor/llvm/dist/lib/MC/MCCodeView.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCCodeView.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/MC/MCCodeView.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -509,17 +509,17 @@ void CodeViewContext::encodeDefRange(MCA // are artificially constructing. size_t RecordSize = FixedSizePortion.size() + sizeof(LocalVariableAddrRange) + 4 * NumGaps; - // Write out the recrod size. - support::endian::Writer(OS).write(RecordSize); + // Write out the record size. + LEWriter.write(RecordSize); // Write out the fixed size prefix. OS << FixedSizePortion; // Make space for a fixup that will eventually have a section relative // relocation pointing at the offset where the variable becomes live. Fixups.push_back(MCFixup::create(Contents.size(), BE, FK_SecRel_4)); - Contents.resize(Contents.size() + 4); // Fixup for code start. + LEWriter.write(0); // Fixup for code start. // Make space for a fixup that will record the section index for the code. Fixups.push_back(MCFixup::create(Contents.size(), BE, FK_SecRel_2)); - Contents.resize(Contents.size() + 2); // Fixup for section index. + LEWriter.write(0); // Fixup for section index. // Write down the range's extent. LEWriter.write(Chunk); @@ -529,7 +529,7 @@ void CodeViewContext::encodeDefRange(MCA } while (RangeSize > 0); // Emit the gaps afterwards. - assert((NumGaps == 0 || Bias < MaxDefRange) && + assert((NumGaps == 0 || Bias <= MaxDefRange) && "large ranges should not have gaps"); unsigned GapStartOffset = GapAndRangeSizes[I].second; for (++I; I != J; ++I) { @@ -537,7 +537,7 @@ void CodeViewContext::encodeDefRange(MCA assert(I < GapAndRangeSizes.size()); std::tie(GapSize, RangeSize) = GapAndRangeSizes[I]; LEWriter.write(GapStartOffset); - LEWriter.write(RangeSize); + LEWriter.write(GapSize); GapStartOffset += GapSize + RangeSize; } } Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -8934,8 +8934,9 @@ static SDValue splitStoreSplat(Selection // instructions (stp). SDLoc DL(&St); SDValue BasePtr = St.getBasePtr(); + const MachinePointerInfo &PtrInfo = St.getPointerInfo(); SDValue NewST1 = - DAG.getStore(St.getChain(), DL, SplatVal, BasePtr, St.getPointerInfo(), + DAG.getStore(St.getChain(), DL, SplatVal, BasePtr, PtrInfo, OrigAlignment, St.getMemOperand()->getFlags()); unsigned Offset = EltOffset; @@ -8944,7 +8945,7 @@ static SDValue splitStoreSplat(Selection SDValue OffsetPtr = DAG.getNode(ISD::ADD, DL, MVT::i64, BasePtr, DAG.getConstant(Offset, DL, MVT::i64)); NewST1 = DAG.getStore(NewST1.getValue(0), DL, SplatVal, OffsetPtr, - St.getPointerInfo(), Alignment, + PtrInfo.getWithOffset(Offset), Alignment, St.getMemOperand()->getFlags()); Offset += EltOffset; } Modified: vendor/llvm/dist/lib/Target/X86/X86ExpandPseudo.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86ExpandPseudo.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Target/X86/X86ExpandPseudo.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -77,11 +77,9 @@ bool X86ExpandPseudo::ExpandMI(MachineBa default: return false; case X86::TCRETURNdi: - case X86::TCRETURNdicc: case X86::TCRETURNri: case X86::TCRETURNmi: case X86::TCRETURNdi64: - case X86::TCRETURNdi64cc: case X86::TCRETURNri64: case X86::TCRETURNmi64: { bool isMem = Opcode == X86::TCRETURNmi || Opcode == X86::TCRETURNmi64; @@ -99,10 +97,6 @@ bool X86ExpandPseudo::ExpandMI(MachineBa Offset = StackAdj - MaxTCDelta; assert(Offset >= 0 && "Offset should never be negative"); - if (Opcode == X86::TCRETURNdicc || Opcode == X86::TCRETURNdi64cc) { - assert(Offset == 0 && "Conditional tail call cannot adjust the stack."); - } - if (Offset) { // Check for possible merge with preceding ADD instruction. Offset += X86FL->mergeSPUpdates(MBB, MBBI, true); @@ -111,21 +105,12 @@ bool X86ExpandPseudo::ExpandMI(MachineBa // Jump to label or value in register. bool IsWin64 = STI->isTargetWin64(); - if (Opcode == X86::TCRETURNdi || Opcode == X86::TCRETURNdicc || - Opcode == X86::TCRETURNdi64 || Opcode == X86::TCRETURNdi64cc) { + if (Opcode == X86::TCRETURNdi || Opcode == X86::TCRETURNdi64) { unsigned Op; switch (Opcode) { case X86::TCRETURNdi: Op = X86::TAILJMPd; break; - case X86::TCRETURNdicc: - Op = X86::TAILJMPd_CC; - break; - case X86::TCRETURNdi64cc: - assert(!IsWin64 && "Conditional tail calls confuse the Win64 unwinder."); - // TODO: We could do it for Win64 "leaf" functions though; PR30337. - Op = X86::TAILJMPd64_CC; - break; default: // Note: Win64 uses REX prefixes indirect jumps out of functions, but // not direct ones. @@ -141,10 +126,6 @@ bool X86ExpandPseudo::ExpandMI(MachineBa MIB.addExternalSymbol(JumpTarget.getSymbolName(), JumpTarget.getTargetFlags()); } - if (Op == X86::TAILJMPd_CC || Op == X86::TAILJMPd64_CC) { - MIB.addImm(MBBI->getOperand(2).getImm()); - } - } else if (Opcode == X86::TCRETURNmi || Opcode == X86::TCRETURNmi64) { unsigned Op = (Opcode == X86::TCRETURNmi) ? X86::TAILJMPm Modified: vendor/llvm/dist/lib/Target/X86/X86InstrControl.td ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86InstrControl.td Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Target/X86/X86InstrControl.td Sat Feb 11 13:25:24 2017 (r313633) @@ -264,21 +264,6 @@ let isCall = 1, isTerminator = 1, isRetu "jmp{l}\t{*}$dst", [], IIC_JMP_MEM>; } -// Conditional tail calls are similar to the above, but they are branches -// rather than barriers, and they use EFLAGS. -let isCall = 1, isTerminator = 1, isReturn = 1, isBranch = 1, - isCodeGenOnly = 1, SchedRW = [WriteJumpLd] in - let Uses = [ESP, EFLAGS] in { - def TCRETURNdicc : PseudoI<(outs), - (ins i32imm_pcrel:$dst, i32imm:$offset, i32imm:$cond), []>; - - // This gets substituted to a conditional jump instruction in MC lowering. - def TAILJMPd_CC : Ii32PCRel<0x80, RawFrm, (outs), - (ins i32imm_pcrel:$dst, i32imm:$cond), - "", - [], IIC_JMP_REL>; -} - //===----------------------------------------------------------------------===// // Call Instructions... @@ -340,19 +325,3 @@ let isCall = 1, isTerminator = 1, isRetu "rex64 jmp{q}\t{*}$dst", [], IIC_JMP_MEM>; } } - -// Conditional tail calls are similar to the above, but they are branches -// rather than barriers, and they use EFLAGS. -let isCall = 1, isTerminator = 1, isReturn = 1, isBranch = 1, - isCodeGenOnly = 1, SchedRW = [WriteJumpLd] in - let Uses = [RSP, EFLAGS] in { - def TCRETURNdi64cc : PseudoI<(outs), - (ins i64i32imm_pcrel:$dst, i32imm:$offset, - i32imm:$cond), []>; - - // This gets substituted to a conditional jump instruction in MC lowering. - def TAILJMPd64_CC : Ii32PCRel<0x80, RawFrm, (outs), - (ins i64i32imm_pcrel:$dst, i32imm:$cond), - "", - [], IIC_JMP_REL>; -} Modified: vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -5108,85 +5108,6 @@ bool X86InstrInfo::isUnpredicatedTermina return !isPredicated(MI); } -bool X86InstrInfo::isUnconditionalTailCall(const MachineInstr &MI) const { - switch (MI.getOpcode()) { - case X86::TCRETURNdi: - case X86::TCRETURNri: - case X86::TCRETURNmi: - case X86::TCRETURNdi64: - case X86::TCRETURNri64: - case X86::TCRETURNmi64: - return true; - default: - return false; - } -} - -bool X86InstrInfo::canMakeTailCallConditional( - SmallVectorImpl &BranchCond, - const MachineInstr &TailCall) const { - if (TailCall.getOpcode() != X86::TCRETURNdi && - TailCall.getOpcode() != X86::TCRETURNdi64) { - // Only direct calls can be done with a conditional branch. - return false; - } - - if (Subtarget.isTargetWin64()) { - // Conditional tail calls confuse the Win64 unwinder. - // TODO: Allow them for "leaf" functions; PR30337. - return false; - } - - assert(BranchCond.size() == 1); - if (BranchCond[0].getImm() > X86::LAST_VALID_COND) { - // Can't make a conditional tail call with this condition. - return false; - } - - const X86MachineFunctionInfo *X86FI = - TailCall.getParent()->getParent()->getInfo(); - if (X86FI->getTCReturnAddrDelta() != 0 || - TailCall.getOperand(1).getImm() != 0) { - // A conditional tail call cannot do any stack adjustment. - return false; - } - - return true; -} - -void X86InstrInfo::replaceBranchWithTailCall( - MachineBasicBlock &MBB, SmallVectorImpl &BranchCond, - const MachineInstr &TailCall) const { - assert(canMakeTailCallConditional(BranchCond, TailCall)); - - MachineBasicBlock::iterator I = MBB.end(); - while (I != MBB.begin()) { - --I; - if (I->isDebugValue()) - continue; - if (!I->isBranch()) - assert(0 && "Can't find the branch to replace!"); - - X86::CondCode CC = getCondFromBranchOpc(I->getOpcode()); - assert(BranchCond.size() == 1); - if (CC != BranchCond[0].getImm()) - continue; - - break; - } - - unsigned Opc = TailCall.getOpcode() == X86::TCRETURNdi ? X86::TCRETURNdicc - : X86::TCRETURNdi64cc; - - auto MIB = BuildMI(MBB, I, MBB.findDebugLoc(I), get(Opc)); - MIB->addOperand(TailCall.getOperand(0)); // Destination. - MIB.addImm(0); // Stack offset (not used). - MIB->addOperand(BranchCond[0]); // Condition. - MIB.copyImplicitOps(TailCall); // Regmask and (imp-used) parameters. - - I->eraseFromParent(); -} - // Given a MBB and its TBB, find the FBB which was a fallthrough MBB (it may // not be a fallthrough MBB now due to layout changes). Return nullptr if the // fallthrough MBB cannot be identified. Modified: vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h Sat Feb 11 13:25:24 2017 (r313633) @@ -316,13 +316,6 @@ public: // Branch analysis. bool isUnpredicatedTerminator(const MachineInstr &MI) const override; - bool isUnconditionalTailCall(const MachineInstr &MI) const override; - bool canMakeTailCallConditional(SmallVectorImpl &Cond, - const MachineInstr &TailCall) const override; - void replaceBranchWithTailCall(MachineBasicBlock &MBB, - SmallVectorImpl &Cond, - const MachineInstr &TailCall) const override; - bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, Modified: vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp Sat Feb 11 13:25:24 2017 (r313633) @@ -498,16 +498,11 @@ ReSimplify: break; } - // TAILJMPd, TAILJMPd64, TailJMPd_cc - Lower to the correct jump instruction. + // TAILJMPd, TAILJMPd64 - Lower to the correct jump instruction. { unsigned Opcode; case X86::TAILJMPr: Opcode = X86::JMP32r; goto SetTailJmpOpcode; case X86::TAILJMPd: case X86::TAILJMPd64: Opcode = X86::JMP_1; goto SetTailJmpOpcode; - case X86::TAILJMPd_CC: - case X86::TAILJMPd64_CC: - Opcode = X86::GetCondBranchFromCond( - static_cast(MI->getOperand(1).getImm())); - goto SetTailJmpOpcode; SetTailJmpOpcode: MCOperand Saved = OutMI.getOperand(0); @@ -1281,11 +1276,9 @@ void X86AsmPrinter::EmitInstruction(cons case X86::TAILJMPr: case X86::TAILJMPm: case X86::TAILJMPd: - case X86::TAILJMPd_CC: case X86::TAILJMPr64: case X86::TAILJMPm64: case X86::TAILJMPd64: - case X86::TAILJMPd64_CC: case X86::TAILJMPr64_REX: case X86::TAILJMPm64_REX: // Lower these as normal, but add some comments. Modified: vendor/llvm/dist/test/Bitcode/DIGlobalVariableExpression.ll ============================================================================== --- vendor/llvm/dist/test/Bitcode/DIGlobalVariableExpression.ll Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/test/Bitcode/DIGlobalVariableExpression.ll Sat Feb 11 13:25:24 2017 (r313633) @@ -7,12 +7,16 @@ ; CHECK: @h = common global i32 0, align 4, !dbg ![[H:[0-9]+]] ; CHECK: ![[G]] = {{.*}}!DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]], expr: ![[GEXPR:[0-9]+]]) ; CHECK: ![[GVAR]] = distinct !DIGlobalVariable(name: "g", +; CHECK: DICompileUnit({{.*}}, imports: ![[IMPORTS:[0-9]+]] ; CHECK: !DIGlobalVariableExpression(var: ![[CVAR:[0-9]+]], expr: ![[CEXPR:[0-9]+]]) ; CHECK: ![[CVAR]] = distinct !DIGlobalVariable(name: "c", ; CHECK: ![[CEXPR]] = !DIExpression(DW_OP_constu, 23, DW_OP_stack_value) -; CHECK: ![[H]] = {{.*}}!DIGlobalVariableExpression(var: ![[HVAR:[0-9]+]]) -; CHECK: ![[HVAR]] = distinct !DIGlobalVariable(name: "h", +; CHECK: ![[HVAR:[0-9]+]] = distinct !DIGlobalVariable(name: "h", +; CHECK: ![[IMPORTS]] = !{![[CIMPORT:[0-9]+]]} +; CHECK: ![[CIMPORT]] = !DIImportedEntity({{.*}}entity: ![[HVAR]] ; CHECK: ![[GEXPR]] = !DIExpression(DW_OP_plus, 1) +; CHECK: ![[H]] = {{.*}}!DIGlobalVariableExpression(var: ![[HVAR]]) + @g = common global i32 0, align 4, !dbg !0 @h = common global i32 0, align 4, !dbg !11 @@ -21,9 +25,9 @@ !llvm.ident = !{!9} !0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !DIExpression(DW_OP_plus, 1)) -!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, imports: !3) !2 = !DIFile(filename: "a.c", directory: "/") -!3 = !{} +!3 = !{!12} !4 = !{!0, !10, !11} !5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) !6 = !{i32 2, !"Dwarf Version", i32 4} @@ -32,3 +36,4 @@ !9 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"} !10 = distinct !DIGlobalVariable(name: "c", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, expr: !DIExpression(DW_OP_constu, 23, DW_OP_stack_value)) !11 = distinct !DIGlobalVariable(name: "h", scope: !1, file: !2, line: 2, type: !5, isLocal: false, isDefinition: true) +!12 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 1, scope: !1, entity: !11) Modified: vendor/llvm/dist/test/Bitcode/DIGlobalVariableExpression.ll.bc ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/llvm/dist/test/Bitcode/dityperefs-3.8.ll ============================================================================== --- vendor/llvm/dist/test/Bitcode/dityperefs-3.8.ll Sat Feb 11 07:35:27 2017 (r313632) +++ vendor/llvm/dist/test/Bitcode/dityperefs-3.8.ll Sat Feb 11 13:25:24 2017 (r313633) @@ -18,14 +18,13 @@ ; CHECK-NEXT: !7 = !DILocalVariable(name: "V1", scope: !6, type: !2) ; CHECK-NEXT: !8 = !DIObjCProperty(name: "P1", type: !1) ; CHECK-NEXT: !9 = !DITemplateTypeParameter(type: !1) -; CHECK-NEXT: !10 = distinct !DIGlobalVariableExpression(var: !11) -; CHECK-NEXT: !11 = !DIGlobalVariable(name: "G",{{.*}} type: !1, -; CHECK-NEXT: !12 = !DITemplateValueParameter(type: !1, value: i32* @G1) -; CHECK-NEXT: !13 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1) -; CHECK-NEXT: !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !15, identifier: "T3") -; CHECK-NEXT: !15 = !{!16} -; CHECK-NEXT: !16 = !DISubprogram(scope: !14, -; CHECK-NEXT: !17 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type,{{.*}} extraData: !14) +; CHECK-NEXT: !10 = !DIGlobalVariable(name: "G",{{.*}} type: !1, +; CHECK-NEXT: !11 = !DITemplateValueParameter(type: !1, value: i32* @G1) +; CHECK-NEXT: !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1) +; CHECK-NEXT: !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !14, identifier: "T3") +; CHECK-NEXT: !14 = !{!15} +; CHECK-NEXT: !15 = !DISubprogram(scope: !13, +; CHECK-NEXT: !16 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type,{{.*}} extraData: !13) !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1", file: !0, identifier: "T1") Added: vendor/llvm/dist/test/CodeGen/AArch64/ldst-zero.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/AArch64/ldst-zero.ll Sat Feb 11 13:25:24 2017 (r313633) @@ -0,0 +1,74 @@ +; RUN: llc -mtriple=aarch64 -mcpu=cortex-a53 < %s | FileCheck %s + +; Tests to check that zero stores which are generated as STP xzr, xzr aren't +; scheduled incorrectly due to incorrect alias information + +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) +%struct.tree_common = type { i8*, i8*, i32 } + +; Original test case which exhibited the bug +define void @test1(%struct.tree_common* %t, i32 %code, i8* %type) { +; CHECK-LABEL: test1: +; CHECK: stp xzr, xzr, [x0, #8] +; CHECK: stp xzr, x2, [x0] +; CHECK: str w1, [x0, #16] +entry: + %0 = bitcast %struct.tree_common* %t to i8* + tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 24, i32 8, i1 false) + %code1 = getelementptr inbounds %struct.tree_common, %struct.tree_common* %t, i64 0, i32 2 + store i32 %code, i32* %code1, align 8 + %type2 = getelementptr inbounds %struct.tree_common, %struct.tree_common* %t, i64 0, i32 1 + store i8* %type, i8** %type2, align 8 + ret void +} + +; Store to each struct element instead of using memset +define void @test2(%struct.tree_common* %t, i32 %code, i8* %type) { +; CHECK-LABEL: test2: +; CHECK: stp xzr, xzr, [x0] +; CHECK: str wzr, [x0, #16] +; CHECK: str w1, [x0, #16] +; CHECK: str x2, [x0, #8] +entry: + %0 = getelementptr inbounds %struct.tree_common, %struct.tree_common* %t, i64 0, i32 0 + %1 = getelementptr inbounds %struct.tree_common, %struct.tree_common* %t, i64 0, i32 1 + %2 = getelementptr inbounds %struct.tree_common, %struct.tree_common* %t, i64 0, i32 2 + store i8* zeroinitializer, i8** %0, align 8 + store i8* zeroinitializer, i8** %1, align 8 + store i32 zeroinitializer, i32* %2, align 8 + store i32 %code, i32* %2, align 8 + store i8* %type, i8** %1, align 8 + ret void +} + +; Vector store instead of memset +define void @test3(%struct.tree_common* %t, i32 %code, i8* %type) { +; CHECK-LABEL: test3: +; CHECK: stp xzr, xzr, [x0, #8] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDC2ECDB144; Sat, 11 Feb 2017 13:25:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 829C492E; Sat, 11 Feb 2017 13:25:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPT1f075343; Sat, 11 Feb 2017 13:25:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPTht075342; Sat, 11 Feb 2017 13:25:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPTht075342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313634 - vendor/llvm/llvm-release_40-r294803 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:30 -0000 Author: dim Date: Sat Feb 11 13:25:29 2017 New Revision: 313634 URL: https://svnweb.freebsd.org/changeset/base/313634 Log: Tag llvm release_40 branch r294803. Added: vendor/llvm/llvm-release_40-r294803/ - copied from r313633, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 475BCCDB19A; Sat, 11 Feb 2017 13:25:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFEEC9AD; Sat, 11 Feb 2017 13:25:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPaEZ075439; Sat, 11 Feb 2017 13:25:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPa3K075437; Sat, 11 Feb 2017 13:25:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPa3K075437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313636 - vendor/clang/clang-release_40-r294803 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:38 -0000 Author: dim Date: Sat Feb 11 13:25:36 2017 New Revision: 313636 URL: https://svnweb.freebsd.org/changeset/base/313636 Log: Tag clang release_40 branch r294803. Added: vendor/clang/clang-release_40-r294803/ - copied from r313635, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 600ADCDB178; Sat, 11 Feb 2017 13:25:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E5BE959; Sat, 11 Feb 2017 13:25:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPYQU075392; Sat, 11 Feb 2017 13:25:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPYoE075391; Sat, 11 Feb 2017 13:25:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPYoE075391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313635 - vendor/clang/dist/docs 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:35 -0000 Author: dim Date: Sat Feb 11 13:25:34 2017 New Revision: 313635 URL: https://svnweb.freebsd.org/changeset/base/313635 Log: Vendor import of clang release_40 branch r294803: https://llvm.org/svn/llvm-project/cfe/branches/release_40@294803 Modified: vendor/clang/dist/docs/conf.py Modified: vendor/clang/dist/docs/conf.py ============================================================================== --- vendor/clang/dist/docs/conf.py Sat Feb 11 13:25:29 2017 (r313634) +++ vendor/clang/dist/docs/conf.py Sat Feb 11 13:25:34 2017 (r313635) @@ -49,9 +49,9 @@ copyright = u'2007-%d, The Clang Team' % # built documents. # # The short X.Y version. -version = '4.0' +version = '4' # The full version, including alpha/beta/rc tags. -release = '4.0' +release = '4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11D67CDB22C; Sat, 11 Feb 2017 13:25:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B095DAF8; Sat, 11 Feb 2017 13:25:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPlH3075594; Sat, 11 Feb 2017 13:25:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPlit075593; Sat, 11 Feb 2017 13:25:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPlit075593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313639 - vendor/libc++/libc++-release_40-r294803 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:49 -0000 Author: dim Date: Sat Feb 11 13:25:47 2017 New Revision: 313639 URL: https://svnweb.freebsd.org/changeset/base/313639 Log: Tag libc++ release_40 branch r294803. Added: vendor/libc++/libc++-release_40-r294803/ - copied from r313638, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8661CDB1ED; Sat, 11 Feb 2017 13:25:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A83F1A8D; Sat, 11 Feb 2017 13:25:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPhxC075545; Sat, 11 Feb 2017 13:25:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPhX9075539; Sat, 11 Feb 2017 13:25:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPhX9075539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313638 - in vendor/libc++/dist: docs include src test/std/utilities/optional/optional.bad_optional_access test/std/utilities/variant/variant.visit 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:45 -0000 Author: dim Date: Sat Feb 11 13:25:42 2017 New Revision: 313638 URL: https://svnweb.freebsd.org/changeset/base/313638 Log: Vendor import of libc++ release_40 branch r294803: https://llvm.org/svn/llvm-project/libcxx/branches/release_40@294803 Modified: vendor/libc++/dist/docs/conf.py vendor/libc++/dist/include/optional vendor/libc++/dist/include/variant vendor/libc++/dist/src/optional.cpp vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp Modified: vendor/libc++/dist/docs/conf.py ============================================================================== --- vendor/libc++/dist/docs/conf.py Sat Feb 11 13:25:39 2017 (r313637) +++ vendor/libc++/dist/docs/conf.py Sat Feb 11 13:25:42 2017 (r313638) @@ -47,9 +47,9 @@ copyright = u'2011-2017, LLVM Project' # built documents. # # The short X.Y version. -version = '4.0' +version = '4' # The full version, including alpha/beta/rc tags. -release = '4.0' +release = '4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. Modified: vendor/libc++/dist/include/optional ============================================================================== --- vendor/libc++/dist/include/optional Sat Feb 11 13:25:39 2017 (r313637) +++ vendor/libc++/dist/include/optional Sat Feb 11 13:25:42 2017 (r313638) @@ -160,14 +160,12 @@ namespace std // purposefully not using { class _LIBCPP_EXCEPTION_ABI bad_optional_access - : public logic_error + : public exception { public: - _LIBCPP_INLINE_VISIBILITY - bad_optional_access() : logic_error("bad optional access") {} - // Get the key function ~bad_optional_access() into the dylib virtual ~bad_optional_access() _NOEXCEPT; + virtual const char* what() const _NOEXCEPT; }; } // std Modified: vendor/libc++/dist/include/variant ============================================================================== --- vendor/libc++/dist/include/variant Sat Feb 11 13:25:39 2017 (r313637) +++ vendor/libc++/dist/include/variant Sat Feb 11 13:25:42 2017 (r313638) @@ -574,7 +574,7 @@ private: constexpr decltype(auto) operator()(_Alts&&... __alts) const { __std_visit_exhaustive_visitor_check< _Visitor, - decltype(_VSTD::forward<_Alts>(__alts).__value)...>(); + decltype((_VSTD::forward<_Alts>(__alts).__value))...>(); return __invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), _VSTD::forward<_Alts>(__alts).__value...); } Modified: vendor/libc++/dist/src/optional.cpp ============================================================================== --- vendor/libc++/dist/src/optional.cpp Sat Feb 11 13:25:39 2017 (r313637) +++ vendor/libc++/dist/src/optional.cpp Sat Feb 11 13:25:42 2017 (r313638) @@ -15,6 +15,10 @@ namespace std bad_optional_access::~bad_optional_access() _NOEXCEPT = default; +const char* bad_optional_access::what() const _NOEXCEPT { + return "bad_optional_access"; + } + } // std _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL Modified: vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp Sat Feb 11 13:25:39 2017 (r313637) +++ vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp Sat Feb 11 13:25:42 2017 (r313638) @@ -11,7 +11,7 @@ // -// class bad_optional_access : public logic_error +// class bad_optional_access : public exception #include #include @@ -20,6 +20,6 @@ int main() { using std::bad_optional_access; - static_assert(std::is_base_of::value, ""); - static_assert(std::is_convertible::value, ""); + static_assert(std::is_base_of::value, ""); + static_assert(std::is_convertible::value, ""); } Modified: vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp Sat Feb 11 13:25:39 2017 (r313637) +++ vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp Sat Feb 11 13:25:42 2017 (r313638) @@ -283,9 +283,20 @@ void test_exceptions() { #endif } +// See http://llvm.org/PR31916 +void test_caller_accepts_nonconst() { + struct A {}; + struct Visitor { + void operator()(A&) {} + }; + std::variant v; + std::visit(Visitor{}, v); +} + int main() { test_call_operator_forwarding(); test_argument_forwarding(); test_constexpr(); test_exceptions(); + test_caller_accepts_nonconst(); } From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EE3CCDB1B8; Sat, 11 Feb 2017 13:25:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2FA6A14; Sat, 11 Feb 2017 13:25:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPd63075487; Sat, 11 Feb 2017 13:25:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPdxO075486; Sat, 11 Feb 2017 13:25:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPdxO075486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313637 - vendor/compiler-rt/compiler-rt-release_40-r294803 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:41 -0000 Author: dim Date: Sat Feb 11 13:25:39 2017 New Revision: 313637 URL: https://svnweb.freebsd.org/changeset/base/313637 Log: Tag compiler-rt release_40 branch r294803. Added: vendor/compiler-rt/compiler-rt-release_40-r294803/ - copied from r313636, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D8A2CDB255; Sat, 11 Feb 2017 13:25:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F61B59; Sat, 11 Feb 2017 13:25:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPo26075641; Sat, 11 Feb 2017 13:25:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPoOr075640; Sat, 11 Feb 2017 13:25:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPoOr075640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313640 - vendor/lld/dist/docs 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:51 -0000 Author: dim Date: Sat Feb 11 13:25:50 2017 New Revision: 313640 URL: https://svnweb.freebsd.org/changeset/base/313640 Log: Vendor import of lld release_40 branch r294803: https://llvm.org/svn/llvm-project/lld/branches/release_40@294803 Modified: vendor/lld/dist/docs/conf.py Modified: vendor/lld/dist/docs/conf.py ============================================================================== --- vendor/lld/dist/docs/conf.py Sat Feb 11 13:25:47 2017 (r313639) +++ vendor/lld/dist/docs/conf.py Sat Feb 11 13:25:50 2017 (r313640) @@ -48,9 +48,9 @@ copyright = u'2011-%d, LLVM Project' % d # built documents. # # The short X.Y version. -version = '4.0' +version = '4' # The full version, including alpha/beta/rc tags. -release = '4.0' +release = '4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BD98CDB2A1; Sat, 11 Feb 2017 13:25:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A809EBFD; Sat, 11 Feb 2017 13:25:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPsGP075689; Sat, 11 Feb 2017 13:25:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPsHo075688; Sat, 11 Feb 2017 13:25:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPsHo075688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313641 - vendor/lld/lld-release_40-r294803 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:56 -0000 Author: dim Date: Sat Feb 11 13:25:54 2017 New Revision: 313641 URL: https://svnweb.freebsd.org/changeset/base/313641 Log: Tag lld release_40 branch r294803. Added: vendor/lld/lld-release_40-r294803/ - copied from r313640, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sat Feb 11 13:25:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61D36CDB2EB; Sat, 11 Feb 2017 13:25:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13F5DC5F; Sat, 11 Feb 2017 13:25:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BDPwk5075736; Sat, 11 Feb 2017 13:25:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BDPwKL075735; Sat, 11 Feb 2017 13:25:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702111325.v1BDPwKL075735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Feb 2017 13:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313642 - vendor/lldb/lldb-release_40-r294803 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:25:59 -0000 Author: dim Date: Sat Feb 11 13:25:57 2017 New Revision: 313642 URL: https://svnweb.freebsd.org/changeset/base/313642 Log: Tag lldb release_40 branch r294803. Added: vendor/lldb/lldb-release_40-r294803/ - copied from r313641, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sat Feb 11 13:57:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3A3BCDBD5D; Sat, 11 Feb 2017 13:57:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from springbank.echomania.com (springbank.echomania.com [IPv6:2a01:7c8:aab2:81::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "springbank.echomania.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD8E6D6; Sat, 11 Feb 2017 13:57:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) X-Virus-Scanned: Debian amavisd-new at springbank.echomania.com Received: from [IPv6:2001:7b8:3a7::ec1c:8b58:8931:41f2] (unknown [IPv6:2001:7b8:3a7:0:ec1c:8b58:8931:41f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by springbank.echomania.com (Postfix) with ESMTPSA id 8E125580108; Sat, 11 Feb 2017 14:57:03 +0100 (CET) From: Dimitry Andric Message-Id: <58334877-F513-4FFC-B2D2-62E9BD5EE3D2@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313560 - head/sys/net Date: Sat, 11 Feb 2017 14:56:52 +0100 In-Reply-To: Cc: Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Antoine Brodin References: <201702101737.v1AHb4Qg077598@repo.freebsd.org> X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 13:57:07 -0000 --Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 Feb 2017, at 10:57, Antoine Brodin wrote: >=20 > On Fri, Feb 10, 2017 at 6:37 PM, Gleb Smirnoff = wrote: >> Author: glebius >> Date: Fri Feb 10 17:37:04 2017 >> New Revision: 313560 >> URL: https://svnweb.freebsd.org/changeset/base/313560 >>=20 >> Log: >> Last consumer of _WANT_RTENTRY gone. >>=20 >> Modified: >> head/sys/net/route.h >=20 > Hi, >=20 > This change seems to break devel/llvm37 : > = http://beefy11.nyi.freebsd.org/data/head-i386-default/p433828_s313572/logs= /errors/llvm37-3.7.1_4.log > = http://beefy12.nyi.freebsd.org/data/head-amd64-default/p433828_s313572/log= s/errors/llvm37-3.7.1_4.log >=20 > More than 6000 are skipped due to this failure. Oof, I didn't think about that, sorry. Can we just apply this upstream fix: https://reviews.llvm.org/rL294806 to all llvm ports, please? -DImitry --Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlifGC8ACgkQsF6jCi4glqMLqQCfQNbOb1Q5NVMcb/mtRUdwzm0I Ws0AoOyxtK+eiGwITH208e/1qnioDTdk =gi7Y -----END PGP SIGNATURE----- --Apple-Mail=_CE5B491D-E4D6-43EA-8492-D96E6805BE37-- From owner-svn-src-all@freebsd.org Sat Feb 11 14:28:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A63AECDA879; Sat, 11 Feb 2017 14:28:31 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1BA134D; Sat, 11 Feb 2017 14:28:31 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from ford.home.vangyzen.net (unknown [76.164.15.242]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 2F1F6564DF; Sat, 11 Feb 2017 08:28:24 -0600 (CST) Subject: Re: svn commit: r313632 - in stable/10/contrib/netbsd-tests/lib/libc/gen: . posix_spawn To: Ed Schouten , Ngie Cooper References: <201702110735.v1B7ZROH028648@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: Eric van Gyzen Message-ID: <65538136-4b19-bc06-f3e0-302ef2fc2359@vangyzen.net> Date: Sat, 11 Feb 2017 08:28:21 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 14:28:31 -0000 On 02/11/2017 03:12, Ed Schouten wrote: > 2017-02-11 8:35 GMT+01:00 Ngie Cooper : >> Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD > > Which is a bug on its own in my opinion. What do you think of this patch? > > Index: sys/sys/event.h > =================================================================== > --- sys/sys/event.h (revision 313335) > +++ sys/sys/event.h (working copy) > @@ -29,7 +29,8 @@ > #ifndef _SYS_EVENT_H_ > #define _SYS_EVENT_H_ > > -#include > +#include > +#include > > #define EVFILT_READ (-1) > #define EVFILT_WRITE (-2) > @@ -57,11 +58,11 @@ > } while(0) > > struct kevent { > - uintptr_t ident; /* identifier for this event */ > + __uintptr_t ident; /* identifier for this event */ > short filter; /* filter for event */ > - u_short flags; > - u_int fflags; > - intptr_t data; > + unsigned short flags; > + unsigned int fflags; > + __intptr_t data; > void *udata; /* opaque user data identifier */ > }; I would be concerned that app developers would read this definition, ignore the one in the man page, and use the __-prefixed types in their apps. Maybe could be included instead? Otherwise, I think a comment about the __ prefix would be wise. Eric From owner-svn-src-all@freebsd.org Sat Feb 11 14:36:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1217CDAAFB; Sat, 11 Feb 2017 14:36:18 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 8A08E1804; Sat, 11 Feb 2017 14:36:17 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from ford.home.vangyzen.net (unknown [76.164.15.242]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 4F1C2564DF; Sat, 11 Feb 2017 08:36:17 -0600 (CST) Subject: Re: svn commit: r313401 - head/sys/netinet To: Ed Maste , Gleb Smirnoff References: <201702071857.v17Ivvn1018291@repo.freebsd.org> <20170210201008.GG1973@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Eric van Gyzen Message-ID: <5f3b4a86-7ca0-e823-346c-b035c0d5390b@FreeBSD.org> Date: Sat, 11 Feb 2017 08:36:15 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 14:36:18 -0000 On 02/10/2017 15:04, Ed Maste wrote: > On 10 February 2017 at 15:10, Gleb Smirnoff wrote: >> >> Thanks. I think inet_ntoa() and anything that uses static buffer >> should just be removed from libkern. > > Agreed. A quick grep found inet_ntoa used in: Also agreed. I had already started on it. ;-) Eric From owner-svn-src-all@freebsd.org Sat Feb 11 14:38:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF7B3CDAB6F for ; Sat, 11 Feb 2017 14:38:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm2-vm5.bullet.mail.ne1.yahoo.com (nm2-vm5.bullet.mail.ne1.yahoo.com [98.138.91.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3091986 for ; Sat, 11 Feb 2017 14:38:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1486823872; bh=pmwmhvHllt2wW4PZHsbNcfXWuEwSVLkjQHVUudm6M5Y=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=R4JlBdpzl8Puo9twrF1vSVwCO3JUL2BvDVAZugy4ryTdgriLnzo2Dq/pn2Caralv43CtT2huTn3ojw0PoWtbm0XXvWqZhv4tgEogH1P8IbDKbSJN80dBsT4+biPZPcD/eGAMZQrNJuEe/0VJNWBIgf0T35gVZKalfmf1epBWckUJaT/FSVx3K8lKbktTEnB/PcC9LnSDsRG2EdNORgd9GO3BNtjfPjkgOn6/kIfbnQlvu5+0AaPLBQuWoMizZyznw8Kash5Ps5suvtZg9+7nzW0MKg07oHCvbrOvcb2Ss4BGR+9xX20/UQSQHE30T76uTVgAfVBZcUhECkRBhQuK1Q== Received: from [98.138.101.128] by nm2.bullet.mail.ne1.yahoo.com with NNFMP; 11 Feb 2017 14:37:52 -0000 Received: from [98.138.104.113] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 11 Feb 2017 14:37:52 -0000 Received: from [127.0.0.1] by smtp222.mail.ne1.yahoo.com with NNFMP; 11 Feb 2017 14:37:52 -0000 X-Yahoo-Newman-Id: 937608.1512.bm@smtp222.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: iuNIW4UVM1mYVOp1NnniA_IPVcR7FGBfh.flO4DqchiBtn6 qgjkqBq1v8.OoawL5Y8zd4yVoYuK7A4R.U5kmkYPIlL05wq27k.za_6QiBkR fao4o.L0Fj4a430UlhuUB7tQhXxOlzL7XRbvp.t8A1j6eMhrcJ9afiTsAK3f nFMihp835KUkTwpEelUB8Pmof2wYVgl4PV3R79sYKXL3vnzb5VrNU4X5I093 UuLZbFTEAvxK3h_gXXEz_.4.tCD54ZC7w4I3YM5FPAFduI5gmtqEOlO5.o7j s_39XDCcFK6OR565QZEeAOT4VRSNNn3DJYp7k_iey3D_a.xsaqNjcvSWBgv6 pfAh0dJPoVVj0Fsj6BXl9fN7.uB.jV0pwKOQIqpAtBTXLj1Vz6hsaiZ3lGZV yR83InuWiSfbOieZFx2GaYes00I7YrwNadE7jAuMxxJ4ytUWAK9Jz.EKIPS4 VKiBb33kaUxlYBBAyuHujkrfG0H.XZNj1iqWTFUXjfKx5.o1sH8w45U.HK1m Bp7CqMryP3Pyf22rC7iKOHj3XZJaqDyhK1lKggbHsVBJqwMw- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys To: John Baldwin , Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <3349880.lYJPXOWCO7@ralph.baldwin.cx> <20170201182337.GG3334@FreeBSD.org> <148601396.h8ndg2hV6R@ralph.baldwin.cx> <20170211125548.GB3574@brick> From: Pedro Giffuni Message-ID: <7cd316b7-acd1-c2ac-2ea0-1e81635aba91@FreeBSD.org> Date: Sat, 11 Feb 2017 09:40:19 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170211125548.GB3574@brick> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 14:38:00 -0000 On 2/11/2017 7:55 AM, Edward Tomasz Napierala wrote: > On 0201T1236, John Baldwin wrote: >> On Wednesday, February 01, 2017 10:23:37 AM Gleb Smirnoff wrote: >>> On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote: >>> J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: >>> J> > Author: trasz >>> J> > Date: Mon Jan 30 12:57:22 2017 >>> J> > New Revision: 312988 >>> J> > URL: https://svnweb.freebsd.org/changeset/base/312988 >>> J> > >>> J> > Log: >>> J> > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them >>> J> > instead of their sys_*() counterparts in various compats. The svr4 >>> J> > is left untouched, because there's no point. >>> J> >>> J> Note that you can compile test svr4 since it is still in the tree. >>> J> If we want to remove svr4, then we should remove it. However, we >>> J> should maintain code that is in the tree if it is still there. >>> >>> All we can do right now is maintain it as compilable. My example with >>> COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody >>> complains. >>> >>> Okay, what if I say on freebsd-arch/freebsd-current that I am going >>> to remove it and wait for any objections for a month, and then do it? >> I would rather remove it than start skipping it in tree sweeps. We should >> strive to maintain code that is in our tree. If you can't get things tested, >> then we are better off removing the code instead of having it rot in the >> tree (cf the discussion on old ISA drivers). > On one hand you're right. On the other - in this particular case including > svr4 (which I have no way of testing) in this sweep could break it, while > not touching it couldn't, as the old method continues to work. > > Removing it is not a bad idea, though. Gleb, would you? > > FWIW, the SVR4 emulator was never completely ported from NetBSD and no one seems to have any interest in bringing it to amd64. I'd say kill it, if someone ever needs it back we have subversion. Pedro. From owner-svn-src-all@freebsd.org Sat Feb 11 15:25:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81574CDB83F; Sat, 11 Feb 2017 15:25:50 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504D711D2; Sat, 11 Feb 2017 15:25:50 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BFPnLU028763; Sat, 11 Feb 2017 15:25:49 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BFPnP0028762; Sat, 11 Feb 2017 15:25:49 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702111525.v1BFPnP0028762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 11 Feb 2017 15:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313645 - head/sys/boot/efi/libefi 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 15:25:50 -0000 Author: tsoome Date: Sat Feb 11 15:25:49 2017 New Revision: 313645 URL: https://svnweb.freebsd.org/changeset/base/313645 Log: loader: implement MEDIA_FILEPATH_DP support in efipart The efipart rework did break the ARM systems as the new code is using more exact filters to sort the devices and we need to add support for MEDIA_FILEPATH_DP device paths. PR: 216940 Reported by: karl@denninger.net Reviewed by: allanjude, manu Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9520 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Sat Feb 11 14:04:18 2017 (r313644) +++ head/sys/boot/efi/libefi/efipart.c Sat Feb 11 15:25:49 2017 (r313645) @@ -417,6 +417,89 @@ efipart_hdinfo_add(EFI_HANDLE disk_handl return (0); } +/* + * The MEDIA_FILEPATH_DP has device name. + * From U-Boot sources it looks like names are in the form + * of typeN:M, where type is interface type, N is disk id + * and M is partition id. + */ +static int +efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) +{ + EFI_DEVICE_PATH *devpath; + FILEPATH_DEVICE_PATH *node; + char *pathname, *p; + int unit, len; + pdinfo_t *pd, *last; + + /* First collect and verify all the data */ + if ((devpath = efi_lookup_devpath(disk_handle)) == NULL) + return (ENOENT); + node = (FILEPATH_DEVICE_PATH *)efi_devpath_last_node(devpath); + if (node == NULL) + return (ENOENT); /* This should not happen. */ + + pd = malloc(sizeof(pdinfo_t)); + if (pd == NULL) { + printf("Failed to add disk, out of memory\n"); + return (ENOMEM); + } + memset(pd, 0, sizeof(pdinfo_t)); + STAILQ_INIT(&pd->pd_part); + last = STAILQ_LAST(&hdinfo, pdinfo, pd_link); + if (last != NULL) + unit = last->pd_unit + 1; + else + unit = 0; + + /* FILEPATH_DEVICE_PATH has 0 terminated string */ + for (len = 0; node->PathName[len] != 0; len++) + ; + if ((pathname = malloc(len + 1)) == NULL) { + printf("Failed to add disk, out of memory\n"); + free(pd); + return (ENOMEM); + } + cpy16to8(node->PathName, pathname, len + 1); + p = strchr(pathname, ':'); + + /* + * Assume we are receiving handles in order, first disk handle, + * then partitions for this disk. If this assumption proves + * false, this code would need update. + */ + if (p == NULL) { /* no colon, add the disk */ + pd->pd_handle = disk_handle; + pd->pd_unit = unit; + pd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&hdinfo, pd, pd_link); + free(pathname); + return (0); + } + p++; /* skip the colon */ + unit = (int)strtol(p, NULL, 0); + + /* + * We should have disk registered, if not, we are receiving + * handles out of order, and this code should be reworked + * to create "blank" disk for partition, and to find the + * disk based on PathName compares. + */ + if (last == NULL) { + printf("BUG: No disk for partition \"%s\"\n", pathname); + free(pathname); + free(pd); + return (EINVAL); + } + /* Add the partition. */ + pd->pd_handle = disk_handle; + pd->pd_unit = unit; + pd->pd_devpath = devpath; + STAILQ_INSERT_TAIL(&last->pd_part, pd, pd_link); + free(pathname); + return (0); +} + static void efipart_updatehd(void) { @@ -467,6 +550,12 @@ efipart_updatehd(void) efipart_hdinfo_add(handle, efipart_handles[i]); continue; } + + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_FILEPATH_DP) { + efipart_hdinfo_add_filepath(efipart_handles[i]); + continue; + } } } From owner-svn-src-all@freebsd.org Sat Feb 11 17:02:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0E58CCD332; Sat, 11 Feb 2017 17:02:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76C551D33; Sat, 11 Feb 2017 17:02:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id c85so11428375wmi.1; Sat, 11 Feb 2017 09:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HZ8hUruQdjhDhmBNFZJhUUHAWVppNTX2lmd8Vbk4YXw=; b=G3D28o5nD6VmMTMzxRY2A7dGLtrnzSTlaPNdyGpCmuDyG/OVLxPAMrDC9PAVwuqoYP SY4IxzWDg4VeOPvGnNUq5vF1ajh/s2JKKzjhNziy6wk3YsharCskNG2KqwO3dmuZSMPR nLXHlOP6R/bbb/M9oyS/3x6xNX0wuZctw6lcF5LnrakkXnvG1Wos86vdbPAtv43KCG0G f0OZPP+P9OvYh0bGtxtUoFr05mLBymSxIkcgY5+sgTHgs6XtB/G8K6hccAwPV/Ek8evT yD/gsf7Chx4fYgVUFqPKXDevpbZToATjOsUcMf9qzRp9liHrx/ktc9YZ+B2Ncrh/6ZsA YTFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HZ8hUruQdjhDhmBNFZJhUUHAWVppNTX2lmd8Vbk4YXw=; b=PFkiaBasKUYupxZ2tthMTj5HOIXjEk4budFWbL17SBBf+jG2UwlrRC4XF8SN0YTge1 9ctMHTlxi4FipZQln2hLhaTzzh/qcnjY4ltqWdE2bF6Os3NGxqdFiFLyMOWCkuMUflhT 2Hy86c9gNFJi9IOiY9pbOsD4nCVgZ4SHgPFXMcZi+JpXBJuFOZ0IfYRcJq3wY31F0SKo bsco/aBKMBoP0S/PfrDPHqTgLUp3XUKM1+D01tl00qXJ+2FckpHGUakQMTxBgw9SCgoo BtjESV9Z3eab8mo1OxOAUbxWIXhM5J+n/G/iTJew/ea+TD/7TIKFL2yYvgwcJ2sMlLyO HvwA== X-Gm-Message-State: AMke39lZa9GhDKp9qWOhjC8B4zawbVNs2V8BNpCHMJa4eLHZRuCHHtBzP87Mfi0lOwp+TNhSdKl9aL5al4z0+g== X-Received: by 10.28.47.7 with SMTP id v7mr27176582wmv.138.1486832553720; Sat, 11 Feb 2017 09:02:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.135 with HTTP; Sat, 11 Feb 2017 09:02:33 -0800 (PST) In-Reply-To: <5f3b4a86-7ca0-e823-346c-b035c0d5390b@FreeBSD.org> References: <201702071857.v17Ivvn1018291@repo.freebsd.org> <20170210201008.GG1973@FreeBSD.org> <5f3b4a86-7ca0-e823-346c-b035c0d5390b@FreeBSD.org> From: Adrian Chadd Date: Sat, 11 Feb 2017 09:02:33 -0800 Message-ID: Subject: Re: svn commit: r313401 - head/sys/netinet To: Eric van Gyzen Cc: Ed Maste , Gleb Smirnoff , "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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 17:02:36 -0000 Can we do the same with ether_ntoa too? -adrian From owner-svn-src-all@freebsd.org Sat Feb 11 17:05:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3310FCCD44D; Sat, 11 Feb 2017 17:05:10 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B3531F12; Sat, 11 Feb 2017 17:05:09 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BH59ql071552; Sat, 11 Feb 2017 17:05:09 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BH58OE071548; Sat, 11 Feb 2017 17:05:08 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201702111705.v1BH58OE071548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sat, 11 Feb 2017 17:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313646 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 17:05:10 -0000 Author: rstone Date: Sat Feb 11 17:05:08 2017 New Revision: 313646 URL: https://svnweb.freebsd.org/changeset/base/313646 Log: Don't zero out srtt after excess retransmits If the TCP stack has retransmitted more than 1/4 of the total number of retransmits before a connection drop, it decides that its current RTT estimate is hopelessly out of date and decides to recalculate it from scratch starting with the next ACK. Unfortunately, it implements this by zeroing out the current RTT estimate. Drop this hack entirely, as it makes it significantly more difficult to debug connection issues. Instead check for excessive retransmits at the point where srtt is updated from an ACK being received. If we've exceeded 1/4 of the maximum retransmits, discard the previous srtt estimate and replace it with the latest rtt measurement. Differential Revision: https://reviews.freebsd.org/D9519 Reviewed by: gnn Sponsored by: Dell EMC Isilon Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sat Feb 11 15:25:49 2017 (r313645) +++ head/sys/netinet/tcp_input.c Sat Feb 11 17:05:08 2017 (r313646) @@ -3494,7 +3494,7 @@ tcp_xmit_timer(struct tcpcb *tp, int rtt TCPSTAT_INC(tcps_rttupdated); tp->t_rttupdated++; - if (tp->t_srtt != 0) { + if ((tp->t_srtt != 0) && (tp->t_rxtshift <= TCP_RTT_INVALIDATE)) { /* * srtt is stored as fixed point with 5 bits after the * binary point (i.e., scaled by 8). The following magic Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Sat Feb 11 15:25:49 2017 (r313645) +++ head/sys/netinet/tcp_timer.c Sat Feb 11 17:05:08 2017 (r313646) @@ -845,20 +845,16 @@ tcp_timer_rexmt(void * xtp) (tp->t_rxtshift == 3)) tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP|TF_SACK_PERMIT); /* - * If we backed off this far, our srtt estimate is probably bogus. - * Clobber it so we'll take the next rtt measurement as our srtt; - * move the current srtt into rttvar to keep the current - * retransmit times until then. + * If we backed off this far, notify the L3 protocol that we're having + * connection problems. */ - if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) { + if (tp->t_rxtshift > TCP_RTT_INVALIDATE) { #ifdef INET6 if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0) in6_losing(tp->t_inpcb); else #endif in_losing(tp->t_inpcb); - tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT); - tp->t_srtt = 0; } tp->snd_nxt = tp->snd_una; tp->snd_recover = tp->snd_max; Modified: head/sys/netinet/tcp_timer.h ============================================================================== --- head/sys/netinet/tcp_timer.h Sat Feb 11 15:25:49 2017 (r313645) +++ head/sys/netinet/tcp_timer.h Sat Feb 11 17:05:08 2017 (r313646) @@ -119,6 +119,13 @@ #define TCPTV_DELACK ( hz/10 ) /* 100ms timeout */ +/* + * If we exceed this number of retransmits for a single segment, we'll consider + * the current srtt measurement no longer valid and will recalculate from + * scratch starting with the next ACK. + */ +#define TCP_RTT_INVALIDATE (TCP_MAXRXTSHIFT / 4) + #ifdef TCPTIMERS static const char *tcptimers[] = { "REXMT", "PERSIST", "KEEP", "2MSL", "DELACK" }; From owner-svn-src-all@freebsd.org Sat Feb 11 18:04:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D659CD83D7; Sat, 11 Feb 2017 18:04:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D15011FEC; Sat, 11 Feb 2017 18:04:44 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BI4hni096547; Sat, 11 Feb 2017 18:04:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BI4h4g096546; Sat, 11 Feb 2017 18:04:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201702111804.v1BI4h4g096546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 11 Feb 2017 18:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313647 - head/usr.sbin/pciconf 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 18:04:45 -0000 Author: cem Date: Sat Feb 11 18:04:43 2017 New Revision: 313647 URL: https://svnweb.freebsd.org/changeset/base/313647 Log: pciconf(8): Replace an assert with errx The condition can be hit with simple user input, so it isn't an invariant. Just error out. PR: 217003 Reported by: Vladislav V. Prodan Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Sat Feb 11 17:05:08 2017 (r313646) +++ head/usr.sbin/pciconf/pciconf.c Sat Feb 11 18:04:43 2017 (r313647) @@ -879,7 +879,8 @@ getdevice(const char *name) errx(1, "Device name is too long"); memcpy(patterns[0].pd_name, name, cp - name); patterns[0].pd_unit = strtol(cp, &cp, 10); - assert(*cp == '\0'); + if (*cp != '\0') + errx(1, "Invalid device name"); patterns[0].flags = PCI_GETCONF_MATCH_NAME | PCI_GETCONF_MATCH_UNIT; pc.num_patterns = 1; pc.pat_buf_len = sizeof(patterns); From owner-svn-src-all@freebsd.org Sat Feb 11 18:10:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61344CD8811; Sat, 11 Feb 2017 18:10:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DD533FD; Sat, 11 Feb 2017 18:10:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BIAtZN098943; Sat, 11 Feb 2017 18:10:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BIAtHZ098942; Sat, 11 Feb 2017 18:10:55 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702111810.v1BIAtHZ098942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 11 Feb 2017 18:10: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: r313648 - stable/10/sys/contrib/ipfilter/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 18:10:56 -0000 Author: cy Date: Sat Feb 11 18:10:55 2017 New Revision: 313648 URL: https://svnweb.freebsd.org/changeset/base/313648 Log: MFC r311950 (by bz): Get rid of a compiler warning which I saw too often. Include netinet/in.h before ip_compat.t which will then check if IPPROTO_IPIP is defined or not. Doing it the other way round, ip_compat.h would not find it defined and netinet/in.h then redefine it. Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Sat Feb 11 18:04:43 2017 (r313647) +++ stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Sat Feb 11 18:10:55 2017 (r313648) @@ -11,6 +11,10 @@ #ifndef __IP_FIL_H__ #define __IP_FIL_H__ +#if !defined(linux) || !defined(_KERNEL) +# include +#endif + #include "netinet/ip_compat.h" #include "netinet/ipf_rb.h" #if NETBSD_GE_REV(104040000) @@ -24,10 +28,6 @@ # endif #endif -#if !defined(linux) || !defined(_KERNEL) -# include -#endif - #ifndef SOLARIS # if defined(sun) && (defined(__svr4__) || defined(__SVR4)) # define SOLARIS 1 From owner-svn-src-all@freebsd.org Sat Feb 11 19:12:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6798CCDB7DA; Sat, 11 Feb 2017 19:12:15 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45BD62AA; Sat, 11 Feb 2017 19:12:15 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 72D695A9F27; Sat, 11 Feb 2017 19:12:08 +0000 (UTC) Date: Sat, 11 Feb 2017 19:12:08 +0000 From: Brooks Davis To: Dimitry Andric Cc: Antoine Brodin , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313560 - head/sys/net Message-ID: <20170211191208.GB90269@spindle.one-eyed-alien.net> References: <201702101737.v1AHb4Qg077598@repo.freebsd.org> <58334877-F513-4FFC-B2D2-62E9BD5EE3D2@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <58334877-F513-4FFC-B2D2-62E9BD5EE3D2@FreeBSD.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 19:12:15 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 11, 2017 at 02:56:52PM +0100, Dimitry Andric wrote: > On 11 Feb 2017, at 10:57, Antoine Brodin wrote: > >=20 > > On Fri, Feb 10, 2017 at 6:37 PM, Gleb Smirnoff wr= ote: > >> Author: glebius > >> Date: Fri Feb 10 17:37:04 2017 > >> New Revision: 313560 > >> URL: https://svnweb.freebsd.org/changeset/base/313560 > >>=20 > >> Log: > >> Last consumer of _WANT_RTENTRY gone. > >>=20 > >> Modified: > >> head/sys/net/route.h > >=20 > > Hi, > >=20 > > This change seems to break devel/llvm37 : > > http://beefy11.nyi.freebsd.org/data/head-i386-default/p433828_s313572/l= ogs/errors/llvm37-3.7.1_4.log > > http://beefy12.nyi.freebsd.org/data/head-amd64-default/p433828_s313572/= logs/errors/llvm37-3.7.1_4.log > >=20 > > More than 6000 are skipped due to this failure. >=20 > Oof, I didn't think about that, sorry. Can we just apply this upstream > fix: https://reviews.llvm.org/rL294806 to all llvm ports, please? I'll apply this and commit it soon. -- Brooks --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYn2IHAAoJEKzQXbSebgfAPF4H/1i2tZdoALdHngIj+JGhRcMg 2EGGo5ZV0HJ8+sjVKgHdse7/DP0jrsn53YnRUdzPkPXS+qBOr8UbwKdtDLp3oyCO 2/sHdbgmr+RPpRMDTpk1tU7HvPritpsRL6qEM3NBWj+hzTS69jNKPPURHdvRWdEt cEAD/+ocINr52Bc2yqEncf6mFDPVVqJwf0/s249Rt7GLUma9yOb4C7DR8mi4bDOy z/jFw0RZoON6WwBrkRCnqHQjMPebVHlYMjG4YJogZf9yFg10wh1un4DDQfLZVGmE OisdUElivA/7Rsy/bvmgHeyKxRpIZIl4JoN5fynbr3fIxHWByY05yEf3jHaZP5A= =8pJ1 -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From owner-svn-src-all@freebsd.org Sat Feb 11 20:02:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52DF5CDB987; Sat, 11 Feb 2017 20:02:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA1F7F8; Sat, 11 Feb 2017 20:02:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BK2exB045936; Sat, 11 Feb 2017 20:02:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BK2eAs045935; Sat, 11 Feb 2017 20:02:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702112002.v1BK2eAs045935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 11 Feb 2017 20:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313649 - stable/11/sys/dev/usb/controller X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:02:41 -0000 Author: ian Date: Sat Feb 11 20:02:39 2017 New Revision: 313649 URL: https://svnweb.freebsd.org/changeset/base/313649 Log: MFC r311850: Use the post-reset hook to force the controller to host mode. This will make both usb ports work on imx6 systems (the OTG port of course will only work in host mode). Modified: stable/11/sys/dev/usb/controller/ehci_imx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/ehci_imx.c ============================================================================== --- stable/11/sys/dev/usb/controller/ehci_imx.c Sat Feb 11 18:10:55 2017 (r313648) +++ stable/11/sys/dev/usb/controller/ehci_imx.c Sat Feb 11 20:02:39 2017 (r313649) @@ -157,6 +157,18 @@ struct imx_ehci_softc { struct resource *ehci_irq_res; /* EHCI core IRQ. */ }; +static void +imx_ehci_post_reset(struct ehci_softc *ehci_softc) +{ + uint32_t usbmode; + + /* Force HOST mode */ + usbmode = EOREAD4(ehci_softc, EHCI_USBMODE_NOLPM); + usbmode &= ~EHCI_UM_CM; + usbmode |= EHCI_UM_CM_HOST; + EOWRITE4(ehci_softc, EHCI_USBMODE_NOLPM, usbmode); +} + static int imx_ehci_probe(device_t dev) { @@ -282,8 +294,13 @@ imx_ehci_attach(device_t dev) esc->sc_id_vendor = USB_VENDOR_FREESCALE; strlcpy(esc->sc_vendor, "Freescale", sizeof(esc->sc_vendor)); - /* Set flags that affect ehci_init() behavior. */ - esc->sc_flags |= EHCI_SCFLG_DONTRESET | EHCI_SCFLG_NORESTERM; + /* + * Set flags that affect ehci_init() behavior, and hook our post-reset + * code into the standard controller code. + */ + esc->sc_flags |= EHCI_SCFLG_NORESTERM; + esc->sc_vendor_post_reset = imx_ehci_post_reset; + err = ehci_init(esc); if (err != 0) { device_printf(dev, "USB init failed, usb_err_t=%d\n", From owner-svn-src-all@freebsd.org Sat Feb 11 20:12:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84B72CDBCFD; Sat, 11 Feb 2017 20:12:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54159E8D; Sat, 11 Feb 2017 20:12:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKCs1V050010; Sat, 11 Feb 2017 20:12:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKCsmp050009; Sat, 11 Feb 2017 20:12:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112012.v1BKCsmp050009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313650 - head/gnu/usr.bin/gdb 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:12:55 -0000 Author: ngie Date: Sat Feb 11 20:12:54 2017 New Revision: 313650 URL: https://svnweb.freebsd.org/changeset/base/313650 Log: Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directory entries This simplifies pathing in make/displayed output MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/gnu/usr.bin/gdb/Makefile.inc Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sat Feb 11 20:02:39 2017 (r313649) +++ head/gnu/usr.bin/gdb/Makefile.inc Sat Feb 11 20:12:54 2017 (r313650) @@ -5,19 +5,17 @@ VENDOR= marcel PACKAGE= gdb -BMAKE_GDB= ${.CURDIR}/.. -BMAKE_ROOT= ${BMAKE_GDB}/.. +BMAKE_GDB= ${.CURDIR:H} +BMAKE_ROOT= ${BMAKE_GDB:H} BMAKE_BU= ${BMAKE_ROOT}/binutils -CNTRB_ROOT= ${BMAKE_ROOT}/../../contrib -CNTRB_BU= ${CNTRB_ROOT}/binutils -CNTRB_GDB= ${CNTRB_ROOT}/gdb -CNTRB_RL= ${CNTRB_ROOT}/libreadline - -OBJ_ROOT= ${.OBJDIR}/../.. -OBJ_BU= ${OBJ_ROOT}/binutils -OBJ_GDB= ${OBJ_ROOT}/gdb -OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/readline +CNTRB_BU= ${SRCTOP}/contrib/binutils +CNTRB_GDB= ${SRCTOP}/contrib/gdb +CNTRB_RL= ${SRCTOP}/contrib/libreadline + +OBJ_BU= ${OBJTOP}/gnu/usr.bin/binutils +OBJ_GDB= ${OBJTOP}/gnu/usr.bin/gdb +OBJ_RL= ${OBJTOP}/gnu/lib/libreadline/readline # These assignments duplicate much of the functionality of # MACHINE_CPUARCH, but there's no easy way to export make functions... @@ -47,12 +45,12 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd -CFLAGS+= -I${OBJ_RL}/.. +CFLAGS+= -I${OBJ_RL:H} GENSRCS+= nm.h tm.h .if defined(GDB_CROSS_DEBUGGER) -CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT}/../.. +CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= .endif From owner-svn-src-all@freebsd.org Sat Feb 11 20:14:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90986CDBD94; Sat, 11 Feb 2017 20:14:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60266FE1; Sat, 11 Feb 2017 20:14:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKEowR050117; Sat, 11 Feb 2017 20:14:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKEoW2050116; Sat, 11 Feb 2017 20:14:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112014.v1BKEoW2050116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313651 - head/lib/libc/tests/tls 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:14:51 -0000 Author: ngie Date: Sat Feb 11 20:14:50 2017 New Revision: 313651 URL: https://svnweb.freebsd.org/changeset/base/313651 Log: Manipulate OBJDIR with :H when referencing dso directory This reduces path lengths, etc in memory with make by a minimal value Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/tls/Makefile Modified: head/lib/libc/tests/tls/Makefile ============================================================================== --- head/lib/libc/tests/tls/Makefile Sat Feb 11 20:12:54 2017 (r313650) +++ head/lib/libc/tests/tls/Makefile Sat Feb 11 20:14:50 2017 (r313651) @@ -16,7 +16,7 @@ NETBSD_ATF_TESTS_C+= tls_dynamic_test .include "../Makefile.netbsd-tests" -DSODIR= ${.OBJDIR}/../tls_dso +DSODIR= ${.OBJDIR:H}/tls_dso LIBADD.tls_static_test+= pthread LDFLAGS.tls_static_test+= -static From owner-svn-src-all@freebsd.org Sat Feb 11 20:18:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07E28CDBEB8; Sat, 11 Feb 2017 20:18:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C92341260; Sat, 11 Feb 2017 20:18:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKIOMk050392; Sat, 11 Feb 2017 20:18:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKIO3I050391; Sat, 11 Feb 2017 20:18:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112018.v1BKIO3I050391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313652 - head/usr.bin/bsdcat 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:18:26 -0000 Author: ngie Date: Sat Feb 11 20:18:24 2017 New Revision: 313652 URL: https://svnweb.freebsd.org/changeset/base/313652 Log: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/bsdcat/Makefile Modified: head/usr.bin/bsdcat/Makefile ============================================================================== --- head/usr.bin/bsdcat/Makefile Sat Feb 11 20:14:50 2017 (r313651) +++ head/usr.bin/bsdcat/Makefile Sat Feb 11 20:18:24 2017 (r313652) @@ -2,10 +2,10 @@ .include -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive -_LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive -PROG= bsdcat +PROG= bsdcat BSDCAT_VERSION_STRING= 3.2.2 .PATH: ${_LIBARCHIVEDIR}/cat From owner-svn-src-all@freebsd.org Sat Feb 11 20:19:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40366CDBF1B; Sat, 11 Feb 2017 20:19:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F65A13A0; Sat, 11 Feb 2017 20:19:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKJ5TJ050464; Sat, 11 Feb 2017 20:19:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKJ5HA050463; Sat, 11 Feb 2017 20:19:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112019.v1BKJ5HA050463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313653 - head/usr.bin/atm/sscop 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:19:06 -0000 Author: ngie Date: Sat Feb 11 20:19:04 2017 New Revision: 313653 URL: https://svnweb.freebsd.org/changeset/base/313653 Log: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/atm/sscop/Makefile Modified: head/usr.bin/atm/sscop/Makefile ============================================================================== --- head/usr.bin/atm/sscop/Makefile Sat Feb 11 20:18:24 2017 (r313652) +++ head/usr.bin/atm/sscop/Makefile Sat Feb 11 20:19:04 2017 (r313653) @@ -1,6 +1,6 @@ # $FreeBSD$ -CONTRIB= ${.CURDIR}/../../../contrib/ngatm/sscop +CONTRIB= ${SRCTOP}/contrib/ngatm/sscop .PATH: ${CONTRIB} From owner-svn-src-all@freebsd.org Sat Feb 11 20:27:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79DB9CDB105; Sat, 11 Feb 2017 20:27:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C0411840; Sat, 11 Feb 2017 20:27:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKR6gx054515; Sat, 11 Feb 2017 20:27:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKR6qj054514; Sat, 11 Feb 2017 20:27:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112027.v1BKR6qj054514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313654 - head/usr.bin/awk 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:27:07 -0000 Author: ngie Date: Sat Feb 11 20:27:06 2017 New Revision: 313654 URL: https://svnweb.freebsd.org/changeset/base/313654 Log: Use SRCTOP to refer to awk source in contrib/awk and remove unnecessary AWKSRC prefix for maketab.c The former simplifies pathing in make/displayed output, whereas the latter was just unnecessarily superfluous since .PATH referenced the path to maketab.c earlier on in the Makefile. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/awk/Makefile Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Sat Feb 11 20:19:04 2017 (r313653) +++ head/usr.bin/awk/Makefile Sat Feb 11 20:27:06 2017 (r313654) @@ -1,6 +1,6 @@ # $FreeBSD$ -AWKSRC= ${.CURDIR}/../../contrib/one-true-awk +AWKSRC= ${SRCTOP}/contrib/one-true-awk .PATH: ${AWKSRC} PROG= awk @@ -26,6 +26,6 @@ proctab.c: maketab ${BTOOLSPATH:U.}/maketab > proctab.c build-tools: maketab -maketab: ytab.h ${AWKSRC}/maketab.c ${BUILD_TOOLS_META} +maketab: ytab.h maketab.c ${BUILD_TOOLS_META} .include From owner-svn-src-all@freebsd.org Sat Feb 11 20:27:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49AE8CDB17C; Sat, 11 Feb 2017 20:27:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1999419D9; Sat, 11 Feb 2017 20:27:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKReHe054576; Sat, 11 Feb 2017 20:27:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKRe7Z054574; Sat, 11 Feb 2017 20:27:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702112027.v1BKRe7Z054574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Feb 2017 20:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313655 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:27:41 -0000 Author: kib Date: Sat Feb 11 20:27:39 2017 New Revision: 313655 URL: https://svnweb.freebsd.org/changeset/base/313655 Log: Change type of the prot parameter for kern_vm_mmap() from vm_prot_t to int. This makes the code to pass whole word of the mmap(2) syscall argument prot to the syscall helper kern_vm_mmap(), which can validate all bits. The change provides temporal fix for sys/vm/mmap_test mmap__bad_arguments, which was broken after r313352. PR: 216976 Reported and tested by: ngie Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_extern.h head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Sat Feb 11 20:27:06 2017 (r313654) +++ head/sys/vm/vm_extern.h Sat Feb 11 20:27:39 2017 (r313655) @@ -72,7 +72,7 @@ void kmem_init_zero_region(void); void kmeminit(void); int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, - vm_prot_t prot, int flags, int fd, off_t pos); + int prot, int flags, int fd, off_t pos); int kern_vm_mprotect(struct thread *td, vm_offset_t addr, vm_size_t size, vm_prot_t prot); int kern_vm_msync(struct thread *td, vm_offset_t addr, vm_size_t size, Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 11 20:27:06 2017 (r313654) +++ head/sys/vm/vm_mmap.c Sat Feb 11 20:27:39 2017 (r313655) @@ -196,7 +196,7 @@ sys_mmap(struct thread *td, struct mmap_ int kern_vm_mmap(struct thread *td, vm_offset_t addr, vm_size_t size, - vm_prot_t prot, int flags, int fd, off_t pos) + int prot, int flags, int fd, off_t pos) { struct file *fp; vm_size_t pageoff; From owner-svn-src-all@freebsd.org Sat Feb 11 20:27:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28B21CDB1BD; Sat, 11 Feb 2017 20:27:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9EBE1ADD; Sat, 11 Feb 2017 20:27:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKRs3q054641; Sat, 11 Feb 2017 20:27:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKRr6H054640; Sat, 11 Feb 2017 20:27:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112027.v1BKRr6H054640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313656 - head/usr.bin/bluetooth 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:27:55 -0000 Author: ngie Date: Sat Feb 11 20:27:53 2017 New Revision: 313656 URL: https://svnweb.freebsd.org/changeset/base/313656 Log: Use SRCTOP to define .include with usr.bin/Makefile.inc MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/bluetooth/Makefile.inc Modified: head/usr.bin/bluetooth/Makefile.inc ============================================================================== --- head/usr.bin/bluetooth/Makefile.inc Sat Feb 11 20:27:39 2017 (r313655) +++ head/usr.bin/bluetooth/Makefile.inc Sat Feb 11 20:27:53 2017 (r313656) @@ -1,4 +1,4 @@ # $FreeBSD$ -.include "${.CURDIR}/../../Makefile.inc" +.include "${SRCTOP}/usr.bin/Makefile.inc" From owner-svn-src-all@freebsd.org Sat Feb 11 20:31:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 808CDCDB562; Sat, 11 Feb 2017 20:31:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504E21FB8; Sat, 11 Feb 2017 20:31:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKVvKn058330; Sat, 11 Feb 2017 20:31:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKVv8b058329; Sat, 11 Feb 2017 20:31:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112031.v1BKVv8b058329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313657 - head/tests/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:31:58 -0000 Author: ngie Date: Sat Feb 11 20:31:57 2017 New Revision: 313657 URL: https://svnweb.freebsd.org/changeset/base/313657 Log: Revert r313565 -- :mmap__bad_arguments passes again after r313655 PR: 216976 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/vm/mmap_test.c Modified: head/tests/sys/vm/mmap_test.c ============================================================================== --- head/tests/sys/vm/mmap_test.c Sat Feb 11 20:27:53 2017 (r313656) +++ head/tests/sys/vm/mmap_test.c Sat Feb 11 20:31:57 2017 (r313657) @@ -134,8 +134,6 @@ ATF_TC_BODY(mmap__bad_arguments, tc) checked_mmap(PROT_READ, MAP_SHARED, devstatfd, 0, "simple /dev/devstat shared"); - atf_tc_expect_fail("extra PROT flags check fails due to recent mmap(2) changes; bug # 216976"); - /* Extra PROT flags. */ checked_mmap(PROT_READ | PROT_WRITE | 0x100000, MAP_ANON, -1, EINVAL, "MAP_ANON with extra PROT flags"); From owner-svn-src-all@freebsd.org Sat Feb 11 20:46:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5EDCDBA23; Sat, 11 Feb 2017 20:46:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDAB8184D; Sat, 11 Feb 2017 20:46:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BKkowJ062705; Sat, 11 Feb 2017 20:46:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BKkntC062704; Sat, 11 Feb 2017 20:46:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702112046.v1BKkntC062704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 20:46: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: r313658 - stable/10/lib/csu/i386-elf 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:46:51 -0000 Author: ngie Date: Sat Feb 11 20:46:49 2017 New Revision: 313658 URL: https://svnweb.freebsd.org/changeset/base/313658 Log: Unbreak lib/csu for i386 and amd64 (MK_LIB32 == yes) after r313582 I accidentally goofed up the directory for lib/libc in the CFLAGS This is a direct commit to this branch Pointyhat to: ngie Modified: stable/10/lib/csu/i386-elf/Makefile Modified: stable/10/lib/csu/i386-elf/Makefile ============================================================================== --- stable/10/lib/csu/i386-elf/Makefile Sat Feb 11 20:31:57 2017 (r313657) +++ stable/10/lib/csu/i386-elf/Makefile Sat Feb 11 20:46:49 2017 (r313658) @@ -9,7 +9,7 @@ FILESGRP= ${LIBGRP} FILESMODE= ${LIBMODE} FILESDIR= ${LIBDIR} CFLAGS+= -I${.CURDIR:H}/common \ - -I${SRCTOP}/libc/include + -I${SRCTOP}/lib/libc/include CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s From owner-svn-src-all@freebsd.org Sat Feb 11 20:49:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B961CDBBD1; Sat, 11 Feb 2017 20:49:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68B641B17; Sat, 11 Feb 2017 20:49:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id 19so4353620pfo.3; Sat, 11 Feb 2017 12:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=xfE57fSVrAtakYWjXQl7N6JjYz6+qscdJrCLlzsWz18=; b=b9XkNRf5qfMdu/VSywbImCWO9ubpMkR8kq/jR54eco8kNq9AK3/lG26lNZVXs+mcKL yoTqw1YKHoHHDBh4rshVy6QHw3Rnh6Kp6bpAT5V5ZzTXMRJVqN1TIX67EvNdynYyVm0M YnY+P88eZX/swv+0oLNqgmjT449XVNrba02ICv8E3MoGucpg6YcWNUtxO+zEaHsvuvcD tueNvZ/DGioKU/m+VnVc1Qr9TawvrytNquj2EfScyNn87nS4pGWRvNvo/4oc1MwTq0YB dwwfuCfpsjRKkjWJzrKXIUd7KoX02UvGeKgT6mOCK2kA85OhogAJikh+VyQZP7pu+3o/ g8+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=xfE57fSVrAtakYWjXQl7N6JjYz6+qscdJrCLlzsWz18=; b=q90UN/DtYe4vODqjxq6bTTxaNJYVCAai1zBG7o/bjjf/isreid8C7bK+ogIyEl+68w Q+X0qIKtlTsM1EJkXl7ZIrnHwl1eMApqE96Hol+MmH3hH1Fxi/CbqxETXVUBFkGEoAc1 /2AR5iE8f4OWPq/pZ/aPgAdJjHnLWDHk/zfK8xAtJZ8p75NK+l5KH3JpVd1h5AivK6JX fDfFp9WItI3dsEdxBmPaQxQ6GKUl7efKbfESZTTaenTjMr9rDMzILMBRYwWWAMC/hYbK rnY82U3BZ3Wm5V1ADEvgmV6fbuMoEgijKnjFXmYqoUYmwl+gzx/YrGe1NeZnBDGaMnjw JTQg== X-Gm-Message-State: AMke39nGr2K0VRdwFhdrU1JKBkmzjMcpN6f3SNWWWSKAAvBCFZsxScHiv6p35Y1BEqrEYQ== X-Received: by 10.98.10.69 with SMTP id s66mr17602631pfi.146.1486846162791; Sat, 11 Feb 2017 12:49:22 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p25sm12551945pfd.0.2017.02.11.12.49.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Feb 2017 12:49:22 -0800 (PST) Subject: Re: svn commit: r313658 - stable/10/lib/csu/i386-elf Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_563BBC34-52D0-425A-864C-FCFCC124B795"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702112046.v1BKkntC062704@repo.freebsd.org> Date: Sat, 11 Feb 2017 12:49:20 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <2EECEB47-558F-4C24-89B0-8E0A1019FE5E@gmail.com> References: <201702112046.v1BKkntC062704@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 20:49:23 -0000 --Apple-Mail=_563BBC34-52D0-425A-864C-FCFCC124B795 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Feb 11, 2017, at 12:46, Ngie Cooper wrote: > > Author: ngie > Date: Sat Feb 11 20:46:49 2017 > New Revision: 313658 > URL: https://svnweb.freebsd.org/changeset/base/313658 > > Log: > Unbreak lib/csu for i386 and amd64 (MK_LIB32 == yes) after r313582 > > I accidentally goofed up the directory for lib/libc in the CFLAGS > > This is a direct commit to this branch > > Pointyhat to: ngie I forgot to mention... Reported by: Jenkins (FreeBSD-stable-10-amd64-build job) --Apple-Mail=_563BBC34-52D0-425A-864C-FCFCC124B795 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 iQIcBAEBCgAGBQJYn3jRAAoJEPWDqSZpMIYVHm4QALIFdpcoU0ub1jK1Bbjy78Ca 58U6LceK1Kx2vC7v6XsmlP34Yr32rSnL16Au9U+ebdARXYHDU0rTULBp3sd3UHwy 44SbYeyMR6LFjkfNMcSb8iIgwB8yRBBH+5IfUHLPRmlLa08DHWWEGOOuyqzHWkhO QDMn+dDlWVSsXBB4RSTmK5WylDjAF6mLozRsC8DTavHdzpSkLo2mFMtprizDVscK h1qTo7ROX3/OAspD8okc5a7Fn/4S78trH86Z/m7klIVtFbs2/xyjUAEIrbObyEnt nqVnvnwYZOGdETgygnHoXMCooKCGNofPbIAtqca0VoNrvy3b2tcbdGQkNhvAg687 B42jl9WEexKpexDHjmXOOo/zM4DaBmTrdWBrs/j7gKe6CytYbt7IEP9k3CNa8oxC u9MHwztJUpd+/gYDGVApz/3mk+Ab5Ls9P7IdNwhSVFGIyNly8OoCYYuiR6zQHS0+ uHaqXZdgvR1azk1pdy1CF6ffvdcGpIAVgHS30R23CibbLnJi+14DeJn77uBVmFwg vG7cLQC6oikOJ5DCyi7cKfmAA7WO0FpiWyPHU1Z9mgyJmPRFtJ7q1Foo7iOnouVp e7BVMN4UQCiAFggg2v0d+ltdPOF6ZEFYIcgSWFb0kAiwyU4g20Oj6KIK679dhE1P YX6eZ3HKmq7yh/WmoGLM =nsFP -----END PGP SIGNATURE----- --Apple-Mail=_563BBC34-52D0-425A-864C-FCFCC124B795-- From owner-svn-src-all@freebsd.org Sat Feb 11 21:31:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 172EACDA8EB; Sat, 11 Feb 2017 21:31:07 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9DE1730; Sat, 11 Feb 2017 21:31:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id o16so18884649wra.2; Sat, 11 Feb 2017 13:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=At4WyT2Cvwuz4974gH7pG9ycO5Z152orTfaDzck/MIk=; b=aQHAMebWSw7dVyBB4Cr8mFfsyuIWZ6nK06g1zAliNmjuN5QW7dMYtiH+KeNrlw7K0D I1hAxjdYAZFIvhA6KjUzZFCX4x1rHkQ6sVB4sPeg/+T7g62sHc9cfv4w+8Gt6/XDkYRY uZMVxrJcq/T8WVVR242Y67lSi+MoOtBn1Iw0Q3JmP5Yox4RmeafHGJBEnHnA83rEF2Hh 1FMsQr585I32TWx+hrzVImWuQtJaKoy4HC+7dH8G6lC9ecPcLhe6E/Zuzu+OgLHm0vjc k61ww0O6scmzGmf3Ptk20wJIMGFp0VVZSIFukBzFZGQbJIN88OT0P6GDk/a/jVrvdrnB rThQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=At4WyT2Cvwuz4974gH7pG9ycO5Z152orTfaDzck/MIk=; b=PqVyFUmSGj3S91ogXoGZQ7Sjf1h34ffdOfry/Ky/8uvLzqiBVqxYNxq9mbOyODoq6Y 0La6XXG5wDJHE4P/j0IlWyTHCD8uWtgw2UBETyCMpGiCgnz83DhXf1dxcF5LyF1SIccH XOutkmpEB3nkp6CbitH+15ocJFSRULRu7Dq/syptReJWfKvZwVsqvJTV/UNK5A+1pB+F +XUoS+wNoW3IER47nOdfe9fcA2jAPXkfJxj/xkMnX8CVVsnNMOaaOFD+aLaVACE5zV8D pDPFmxrHDMPgM5yajbYtO/cxt8W0iPcl78IpvBH4dpoF6a6fUYKHRYxUtUghkS3SCanZ 0Bfg== X-Gm-Message-State: AMke39nJ3guc/48OTyd2gmxVZRsOQDmA5Qvj/9ATToXqzGPGbPb1wOoTIRtJysE1ky8k0w== X-Received: by 10.223.160.206 with SMTP id n14mr13221880wrn.31.1486848664839; Sat, 11 Feb 2017 13:31:04 -0800 (PST) Received: from brick (gbh5.clarehall.cam.ac.uk. [131.111.224.37]) by smtp.gmail.com with ESMTPSA id i29sm7698664wrc.25.2017.02.11.13.31.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 13:31:03 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 11 Feb 2017 21:31:02 +0000 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313655 - head/sys/vm Message-ID: <20170211213102.GA65541@brick> Mail-Followup-To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702112027.v1BKRe7Z054574@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702112027.v1BKRe7Z054574@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 21:31:07 -0000 On 0211T2027, Konstantin Belousov wrote: > Author: kib > Date: Sat Feb 11 20:27:39 2017 > New Revision: 313655 > URL: https://svnweb.freebsd.org/changeset/base/313655 > > Log: > Change type of the prot parameter for kern_vm_mmap() from vm_prot_t to int. > > This makes the code to pass whole word of the mmap(2) syscall argument > prot to the syscall helper kern_vm_mmap(), which can validate all > bits. The change provides temporal fix for sys/vm/mmap_test > mmap__bad_arguments, which was broken after r313352. Thanks, and sorry for the breakage. From owner-svn-src-all@freebsd.org Sat Feb 11 23:06:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569E4CDB615; Sat, 11 Feb 2017 23:06:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23C38DE4; Sat, 11 Feb 2017 23:06:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BN6s2D019971; Sat, 11 Feb 2017 23:06:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BN6sXc019970; Sat, 11 Feb 2017 23:06:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112306.v1BN6sXc019970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313659 - head/bin/pwd 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:06:55 -0000 Author: bapt Date: Sat Feb 11 23:06:53 2017 New Revision: 313659 URL: https://svnweb.freebsd.org/changeset/base/313659 Log: Remove space at and of line Reported by: make manlint MFC after: 2 days Modified: head/bin/pwd/pwd.1 Modified: head/bin/pwd/pwd.1 ============================================================================== --- head/bin/pwd/pwd.1 Sat Feb 11 20:46:49 2017 (r313658) +++ head/bin/pwd/pwd.1 Sat Feb 11 23:06:53 2017 (r313659) @@ -87,7 +87,7 @@ utility conforms to .St -p1003.1-2001 . .Sh HISTORY The -.Nm +.Nm command appeared in .At v5 . .Sh BUGS From owner-svn-src-all@freebsd.org Sat Feb 11 23:09:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75E54CDB702; Sat, 11 Feb 2017 23:09:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45C25FE1; Sat, 11 Feb 2017 23:09:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BN9oQd020103; Sat, 11 Feb 2017 23:09:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BN9olR020102; Sat, 11 Feb 2017 23:09:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112309.v1BN9olR020102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313660 - 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:09:51 -0000 Author: bapt Date: Sat Feb 11 23:09:50 2017 New Revision: 313660 URL: https://svnweb.freebsd.org/changeset/base/313660 Log: Remove empty Li Reported by: make manlint MFC after: 2 days Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Feb 11 23:06:53 2017 (r313659) +++ head/bin/sh/sh.1 Sat Feb 11 23:09:50 2017 (r313660) @@ -1033,7 +1033,7 @@ The syntax of the command is: .Bd -unfilled -offset indent -compact .Ic case Ar word Ic in -.Ar pattern Ns Li ) Ar list Li ;; +.Ar pattern Ns ) Ar list Li ;; .Ar ... .Ic esac .Ed From owner-svn-src-all@freebsd.org Sat Feb 11 23:14:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 669EECDB8B7; Sat, 11 Feb 2017 23:14:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3634113C9; Sat, 11 Feb 2017 23:14:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNESbL023929; Sat, 11 Feb 2017 23:14:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNESNS023928; Sat, 11 Feb 2017 23:14:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112314.v1BNESNS023928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313661 - head/usr.bin/env 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:14:29 -0000 Author: bapt Date: Sat Feb 11 23:14:28 2017 New Revision: 313661 URL: https://svnweb.freebsd.org/changeset/base/313661 Log: Escape Ss to avoid confusion by mdoc parser with the Ss macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/env/env.1 Modified: head/usr.bin/env/env.1 ============================================================================== --- head/usr.bin/env/env.1 Sat Feb 11 23:09:50 2017 (r313660) +++ head/usr.bin/env/env.1 Sat Feb 11 23:14:28 2017 (r313661) @@ -133,7 +133,7 @@ is specified, prints out the names and values of the variables in the environment, with one name/value pair per line. .\" -.Ss Details of Fl S Ss (split-string) processing +.Ss Details of Fl S \&Ss (split-string) processing The processing of the .Fl S option will split the given From owner-svn-src-all@freebsd.org Sat Feb 11 23:36:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F4C1CDBE4C; Sat, 11 Feb 2017 23:36:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F05711D82; Sat, 11 Feb 2017 23:36:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNarjB032090; Sat, 11 Feb 2017 23:36:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNaraJ032089; Sat, 11 Feb 2017 23:36:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112336.v1BNaraJ032089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313662 - head/usr.bin/whois 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:36:54 -0000 Author: bapt Date: Sat Feb 11 23:36:52 2017 New Revision: 313662 URL: https://svnweb.freebsd.org/changeset/base/313662 Log: Add missing -width after -Bl -tag Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/whois/whois.1 Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Sat Feb 11 23:14:28 2017 (r313661) +++ head/usr.bin/whois/whois.1 Sat Feb 11 23:36:52 2017 (r313662) @@ -206,7 +206,7 @@ The operands specified to are treated independently and may be used as queries on different whois servers. .Sh ENVIRONMENT -.Bl -tag +.Bl -tag -width WHOIS_SERVER .It Ev WHOIS_SERVER The primary default whois server. If this is unset, From owner-svn-src-all@freebsd.org Sat Feb 11 23:37:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10E27CDBED6; Sat, 11 Feb 2017 23:37:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4B241EDD; Sat, 11 Feb 2017 23:37:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNbmQQ032163; Sat, 11 Feb 2017 23:37:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNbmp5032162; Sat, 11 Feb 2017 23:37:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112337.v1BNbmp5032162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313663 - head/usr.bin/unzip 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:37:50 -0000 Author: bapt Date: Sat Feb 11 23:37:48 2017 New Revision: 313663 URL: https://svnweb.freebsd.org/changeset/base/313663 Log: Add missing section after .Xr reference Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/unzip/unzip.1 Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Sat Feb 11 23:36:52 2017 (r313662) +++ head/usr.bin/unzip/unzip.1 Sat Feb 11 23:37:48 2017 (r313663) @@ -171,7 +171,7 @@ The utility is only able to process ZIP archives handled by .Xr libarchive 3 . Depending on the installed version of -.Xr libarchive , +.Xr libarchive 3 , this may or may not include self-extracting archives. .Sh SEE ALSO .Xr libarchive 3 From owner-svn-src-all@freebsd.org Sat Feb 11 23:38:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA696CDBF39; Sat, 11 Feb 2017 23:38:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA73102F; Sat, 11 Feb 2017 23:38:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNcSFg032229; Sat, 11 Feb 2017 23:38:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNcSCY032228; Sat, 11 Feb 2017 23:38:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112338.v1BNcSCY032228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313664 - head/usr.bin/units 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:38:29 -0000 Author: bapt Date: Sat Feb 11 23:38:28 2017 New Revision: 313664 URL: https://svnweb.freebsd.org/changeset/base/313664 Log: Escape No to avoid confusion with the No macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/units/units.1 Modified: head/usr.bin/units/units.1 ============================================================================== --- head/usr.bin/units/units.1 Sat Feb 11 23:37:48 2017 (r313663) +++ head/usr.bin/units/units.1 Sat Feb 11 23:38:28 2017 (r313664) @@ -14,33 +14,33 @@ .Sh OPTIONS The following options are available: .Bl -tag -width indent -.It Fl h No , Fl -help +.It Fl h \&No , Fl -help Show an overview of options -.It Fl f Ar filename No , Fl -file Ar filename +.It Fl f Ar filename \&No , Fl -file Ar filename Specify the name of the units data file to load. -.It Fl H Ar filename No , Fl -historyfile Ar filename +.It Fl H Ar filename \&No , Fl -historyfile Ar filename Ignored, for compatibility with GNU units. .It Fl e , Fl -exponential Behave as if -o '%6e' was typed. -.It Fl q No , Fl -quiet +.It Fl q \&No , Fl -quiet Suppress prompting of the user for units and the display of statistics about the number of units loaded. -.It Fl U No , Fl -unitsfile +.It Fl U \&No , Fl -unitsfile If the default unit file exists prints its location. If not, print .Qo Units data file not found .Qc -.It Fl t No , Fl -terse +.It Fl t \&No , Fl -terse Only print the result. This is used when calling .Nm from other programs for easy to parse results. -.It Fl v No , Fl -verbose +.It Fl v \&No , Fl -verbose Print the units in the conversion output. Be more verbose in general. -.It Fl o Ar format No , Fl -output-format Ar format +.It Fl o Ar format \&No , Fl -output-format Ar format Select the output format string by which numbers are printed. -.It Fl V No , Fl -version +.It Fl V \&No , Fl -version Print the version number, usage, and then exit. .It Ar from-unit to-unit Allow a single unit conversion to be done directly from the command From owner-svn-src-all@freebsd.org Sat Feb 11 23:39:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77932CDBF9B; Sat, 11 Feb 2017 23:39:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44C561189; Sat, 11 Feb 2017 23:39:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNdEnb032301; Sat, 11 Feb 2017 23:39:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNdEpQ032300; Sat, 11 Feb 2017 23:39:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112339.v1BNdEpQ032300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313665 - head/usr.bin/sdiff 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:39:15 -0000 Author: bapt Date: Sat Feb 11 23:39:14 2017 New Revision: 313665 URL: https://svnweb.freebsd.org/changeset/base/313665 Log: Remove useless .Pp after the .Sh macro and remove empty line Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/sdiff/sdiff.1 Modified: head/usr.bin/sdiff/sdiff.1 ============================================================================== --- head/usr.bin/sdiff/sdiff.1 Sat Feb 11 23:38:28 2017 (r313664) +++ head/usr.bin/sdiff/sdiff.1 Sat Feb 11 23:39:14 2017 (r313665) @@ -167,8 +167,6 @@ The default is was written from scratch for the public domain by .An Ray Lai Aq ray@cyth.net . .Sh CAVEATS -.Pp Tabs are treated as anywhere from one to eight characters wide, depending on the current column. Terminals that treat tabs as eight characters wide will look best. - From owner-svn-src-all@freebsd.org Sat Feb 11 23:39:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0E40CDBFF1; Sat, 11 Feb 2017 23:39:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DED112E1; Sat, 11 Feb 2017 23:39:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNdu5X032363; Sat, 11 Feb 2017 23:39:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNduJV032362; Sat, 11 Feb 2017 23:39:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112339.v1BNduJV032362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313666 - head/usr.bin/revoke 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:39:57 -0000 Author: bapt Date: Sat Feb 11 23:39:56 2017 New Revision: 313666 URL: https://svnweb.freebsd.org/changeset/base/313666 Log: Remove empty space at EOL and escept Ed Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/revoke/revoke.1 Modified: head/usr.bin/revoke/revoke.1 ============================================================================== --- head/usr.bin/revoke/revoke.1 Sat Feb 11 23:39:14 2017 (r313665) +++ head/usr.bin/revoke/revoke.1 Sat Feb 11 23:39:56 2017 (r313666) @@ -1,6 +1,6 @@ .\" Copyright (c) 2009 Ed Schouten .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -9,7 +9,7 @@ .\" 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 @@ -21,7 +21,7 @@ .\" 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 June 15, 2009 @@ -53,4 +53,4 @@ The program first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org From owner-svn-src-all@freebsd.org Sat Feb 11 23:40:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25ED0CDB08C; Sat, 11 Feb 2017 23:40:59 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72D514D2; Sat, 11 Feb 2017 23:40:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNev54032461; Sat, 11 Feb 2017 23:40:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNevdl032460; Sat, 11 Feb 2017 23:40:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112340.v1BNevdl032460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313667 - head/usr.bin/mkuzip 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:40:59 -0000 Author: bapt Date: Sat Feb 11 23:40:57 2017 New Revision: 313667 URL: https://svnweb.freebsd.org/changeset/base/313667 Log: Remove spaces at EOL and sort correctly the SEE ALSO section Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/mkuzip/mkuzip.8 Modified: head/usr.bin/mkuzip/mkuzip.8 ============================================================================== --- head/usr.bin/mkuzip/mkuzip.8 Sat Feb 11 23:39:56 2017 (r313666) +++ head/usr.bin/mkuzip/mkuzip.8 Sat Feb 11 23:40:57 2017 (r313667) @@ -58,7 +58,7 @@ works in two phases: An .Ar infile image is split into clusters; each cluster is compressed using -.Xr zlib 3 +.Xr zlib 3 or .Xr lzma 3 . .It @@ -72,7 +72,7 @@ The options are: Name of the output file .Ar outfile . The default is to use the input name with the suffix -.Pa .uzip +.Pa .uzip for the .Xr zlib 3 compression or @@ -174,8 +174,8 @@ to handle resulting images correctly. .Sh SEE ALSO .Xr gzip 1 , .Xr xz 1 , -.Xr zlib 3 , .Xr lzma 3 , +.Xr zlib 3 , .Xr geom 4 , .Xr geom_uzip 4 , .Xr md 4 , From owner-svn-src-all@freebsd.org Sat Feb 11 23:41:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34DE2CDB0EF; Sat, 11 Feb 2017 23:41:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0202017F5; Sat, 11 Feb 2017 23:41:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNfdhT033263; Sat, 11 Feb 2017 23:41:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNfdUp033262; Sat, 11 Feb 2017 23:41:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112341.v1BNfdUp033262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313668 - head/usr.bin/mkimg 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:41:40 -0000 Author: bapt Date: Sat Feb 11 23:41:38 2017 New Revision: 313668 URL: https://svnweb.freebsd.org/changeset/base/313668 Log: Add missing section in manpage reference Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/mkimg/mkimg.1 Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Sat Feb 11 23:40:57 2017 (r313667) +++ head/usr.bin/mkimg/mkimg.1 Sat Feb 11 23:41:38 2017 (r313668) @@ -274,7 +274,7 @@ Directory to put temporary files in; def .Sh EXAMPLES To create a bootable disk image that is partitioned using the GPT scheme and containing a root file system that was previously created using -.Xr makefs +.Xr makefs 8 and also containing a swap partition, run the .Nm utility as follows: From owner-svn-src-all@freebsd.org Sat Feb 11 23:42:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B10CDB28D; Sat, 11 Feb 2017 23:42:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5287E1A01; Sat, 11 Feb 2017 23:42:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNgXra036096; Sat, 11 Feb 2017 23:42:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNgX9O036095; Sat, 11 Feb 2017 23:42:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112342.v1BNgX9O036095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313669 - head/usr.bin/ipcrm 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:42:34 -0000 Author: bapt Date: Sat Feb 11 23:42:33 2017 New Revision: 313669 URL: https://svnweb.freebsd.org/changeset/base/313669 Log: Properly use .An macro before Authors name Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/ipcrm/ipcrm.1 Modified: head/usr.bin/ipcrm/ipcrm.1 ============================================================================== --- head/usr.bin/ipcrm/ipcrm.1 Sat Feb 11 23:41:38 2017 (r313668) +++ head/usr.bin/ipcrm/ipcrm.1 Sat Feb 11 23:42:33 2017 (r313669) @@ -114,6 +114,9 @@ If the identifier or the key is -1, it w The wiping of all System V IPC objects was first implemented in .Fx 6.4 No and 7.1. .Sh AUTHORS -The original author was Adam Glass. -The wiping of all System V IPC objects was thought up by Callum -Gibson and extended and implemented by Edwin Groothuis. +The original author was +.An Adam Glass . +The wiping of all System V IPC objects was thought up by +.An Callum Gibson +and extended and implemented by +.An Edwin Groothuis . From owner-svn-src-all@freebsd.org Sat Feb 11 23:43:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CDA4CDB2FC; Sat, 11 Feb 2017 23:43:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CA621B8B; Sat, 11 Feb 2017 23:43:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNhCGF036163; Sat, 11 Feb 2017 23:43:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNhCf3036162; Sat, 11 Feb 2017 23:43:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112343.v1BNhCf3036162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313670 - head/usr.bin/expand 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:43:13 -0000 Author: bapt Date: Sat Feb 11 23:43:12 2017 New Revision: 313670 URL: https://svnweb.freebsd.org/changeset/base/313670 Log: Escape Sm to avoid confusion with Sm macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/expand/expand.1 Modified: head/usr.bin/expand/expand.1 ============================================================================== --- head/usr.bin/expand/expand.1 Sat Feb 11 23:42:33 2017 (r313669) +++ head/usr.bin/expand/expand.1 Sat Feb 11 23:43:12 2017 (r313670) @@ -81,7 +81,7 @@ If the .Fl a option is given, then tabs are inserted whenever they would compress the resultant file by replacing two or more characters. -.It Fl t Sm Ar tab1 , tab2 , ... , tabn Sm +.It Fl t \&Sm Ar tab1 , tab2 , ... , tabn \&Sm Set tab stops at column positions .Ar tab1 , tab2 , ... , tabn . If only a single number is given, tab stops are set that number of From owner-svn-src-all@freebsd.org Sat Feb 11 23:44:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764B3CDB36B; Sat, 11 Feb 2017 23:44:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 460F61CF7; Sat, 11 Feb 2017 23:44:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNibjO036269; Sat, 11 Feb 2017 23:44:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNibpF036268; Sat, 11 Feb 2017 23:44:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112344.v1BNibpF036268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313671 - head/usr.bin/bc 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:44:38 -0000 Author: bapt Date: Sat Feb 11 23:44:37 2017 New Revision: 313671 URL: https://svnweb.freebsd.org/changeset/base/313671 Log: Use correct date format Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/bc/bc.1 Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Sat Feb 11 23:43:12 2017 (r313670) +++ head/usr.bin/bc/bc.1 Sat Feb 11 23:44:37 2017 (r313671) @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd November 21 2015 +.Dd November 21, 2015 .Dt BC 1 .Os .Sh NAME From owner-svn-src-all@freebsd.org Sat Feb 11 23:45:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30C7DCDB3CF; Sat, 11 Feb 2017 23:45:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1FCA1E36; Sat, 11 Feb 2017 23:45:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNjBLq036338; Sat, 11 Feb 2017 23:45:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNjBb1036337; Sat, 11 Feb 2017 23:45:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112345.v1BNjBb1036337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313672 - head/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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:45:12 -0000 Author: bapt Date: Sat Feb 11 23:45:10 2017 New Revision: 313672 URL: https://svnweb.freebsd.org/changeset/base/313672 Log: Remove useless Li macro Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/mail/mail.1 Modified: head/usr.bin/mail/mail.1 ============================================================================== --- head/usr.bin/mail/mail.1 Sat Feb 11 23:44:37 2017 (r313671) +++ head/usr.bin/mail/mail.1 Sat Feb 11 23:45:10 2017 (r313672) @@ -1094,7 +1094,7 @@ Default is .Va save . .It Va searchheaders If this option is set, then a message-list specifier in the form -.Dq Li / Ns Ar x Ns Li : Ns Ar y +.Dq Li / Ns Ar x Ns : Ns Ar y will expand to all messages containing the substring .Ar y in the header field From owner-svn-src-all@freebsd.org Sat Feb 11 23:45:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52732CDB42D; Sat, 11 Feb 2017 23:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1261F8F; Sat, 11 Feb 2017 23:45:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1BNjpna036403; Sat, 11 Feb 2017 23:45:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1BNjohr036400; Sat, 11 Feb 2017 23:45:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702112345.v1BNjohr036400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 11 Feb 2017 23:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313673 - in head/usr.bin: ctlstat mt perror uuencode 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.23 Precedence: list List-Id: "SVN commit messages 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, 11 Feb 2017 23:45:52 -0000 Author: bapt Date: Sat Feb 11 23:45:50 2017 New Revision: 313673 URL: https://svnweb.freebsd.org/changeset/base/313673 Log: Remove spaces at end of line Reported by: make manlint MFC after: 2 days Modified: head/usr.bin/ctlstat/ctlstat.8 head/usr.bin/mt/mt.1 head/usr.bin/perror/perror.1 head/usr.bin/uuencode/uuencode.1 Modified: head/usr.bin/ctlstat/ctlstat.8 ============================================================================== --- head/usr.bin/ctlstat/ctlstat.8 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/ctlstat/ctlstat.8 Sat Feb 11 23:45:50 2017 (r313673) @@ -1,7 +1,7 @@ -.\" +.\" .\" Copyright (c) 2010 Silicon Graphics International Corp. .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -13,7 +13,7 @@ .\" ("Disclaimer") and any redistribution must be conditioned upon .\" including a substantially similar Disclaimer requirement for further .\" binary redistribution. -.\" +.\" .\" NO WARRANTY .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ .\" 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 DAMAGES. -.\" +.\" .\" ctlstat utility man page. .\" .\" Author: Ken Merry Modified: head/usr.bin/mt/mt.1 ============================================================================== --- head/usr.bin/mt/mt.1 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/mt/mt.1 Sat Feb 11 23:45:50 2017 (r313673) @@ -273,12 +273,12 @@ status command, this will be the same XM .Do .Nm status -.Fl x +.Fl x .Dc .El .It Cm param Display or set parameters. -One of +One of .Fl l , .Fl s , or @@ -293,7 +293,7 @@ To display a specific parameter, specify .It Fl p Ar name Specify the parameter name to list (with .Fl l ) -or set (with +or set (with .Fl s ) . .It Fl q Enable quiet mode for parameter listing. @@ -361,11 +361,11 @@ The drive will verify the checksum befor .El .It Cm locate Set the tape drive's logical position. -One of +One of .Fl b , .Fl e , .Fl f , -or +or .Fl s must be specified to indicate the type of position. If the partition number is specified, the drive will first relocate to the Modified: head/usr.bin/perror/perror.1 ============================================================================== --- head/usr.bin/perror/perror.1 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/perror/perror.1 Sat Feb 11 23:45:50 2017 (r313673) @@ -1,8 +1,8 @@ -.\" +.\" .\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -11,7 +11,7 @@ .\" 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 @@ -23,7 +23,7 @@ .\" 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 May 12, 2009 Modified: head/usr.bin/uuencode/uuencode.1 ============================================================================== --- head/usr.bin/uuencode/uuencode.1 Sat Feb 11 23:45:10 2017 (r313672) +++ head/usr.bin/uuencode/uuencode.1 Sat Feb 11 23:45:50 2017 (r313673) @@ -40,7 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl m -.Op Fl r +.Op Fl r .Op Fl o Ar output_file .Op Ar file .Ar name