From owner-svn-src-all@freebsd.org Sun Feb 19 02: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 04B68CDBC9B; Sun, 19 Feb 2017 02:03:12 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3F56B8E; Sun, 19 Feb 2017 02:03:11 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1J23Ad9030143; Sun, 19 Feb 2017 02:03:10 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J23Ap8030134; Sun, 19 Feb 2017 02:03:10 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201702190203.v1J23Ap8030134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sun, 19 Feb 2017 02:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313930 - in head/sys: amd64/include kern mips/include mips/mips net powerpc/include sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 02:03:12 -0000 Author: jah Date: Sun Feb 19 02:03:09 2017 New Revision: 313930 URL: https://svnweb.freebsd.org/changeset/base/313930 Log: Bring back r313037, with fixes for mips: Implement get_pcpu() for amd64/sparc64/mips/powerpc, and use it to replace pcpu_find(curcpu) in MI code. Reviewed by: andreast, kan, lidl Tested by: lidl(mips, sparc64), andreast(powerpc) Differential Revision: https://reviews.freebsd.org/D9587 Modified: head/sys/amd64/include/pcpu.h head/sys/kern/kern_rmlock.c head/sys/mips/include/pcpu.h head/sys/mips/mips/machdep.c head/sys/net/netisr.c head/sys/powerpc/include/cpufunc.h head/sys/powerpc/include/pcpu.h head/sys/sparc64/include/pcpu.h Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/amd64/include/pcpu.h Sun Feb 19 02:03:09 2017 (r313930) @@ -78,6 +78,7 @@ extern struct pcpu *pcpup; +#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) #define PCPU_ADD(member, val) (pcpup->pc_ ## member += (val)) #define PCPU_INC(member) PCPU_ADD(member, 1) @@ -203,6 +204,15 @@ extern struct pcpu *pcpup; } \ } +#define get_pcpu() __extension__ ({ \ + struct pcpu *__pc; \ + \ + __asm __volatile("movq %%gs:%1,%0" \ + : "=r" (__pc) \ + : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ + __pc; \ +}) + #define PCPU_GET(member) __PCPU_GET(pc_ ## member) #define PCPU_ADD(member, val) __PCPU_ADD(pc_ ## member, val) #define PCPU_INC(member) __PCPU_INC(pc_ ## member) Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/kern/kern_rmlock.c Sun Feb 19 02:03:09 2017 (r313930) @@ -156,7 +156,7 @@ unlock_rm(struct lock_object *lock) */ critical_enter(); td = curthread; - pc = pcpu_find(curcpu); + pc = get_pcpu(); for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; queue = queue->rmq_next) { tracker = (struct rm_priotracker *)queue; @@ -258,7 +258,7 @@ rm_cleanIPI(void *arg) struct rmlock *rm = arg; struct rm_priotracker *tracker; struct rm_queue *queue; - pc = pcpu_find(curcpu); + pc = get_pcpu(); for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; queue = queue->rmq_next) { @@ -355,7 +355,7 @@ _rm_rlock_hard(struct rmlock *rm, struct struct pcpu *pc; critical_enter(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); /* Check if we just need to do a proper critical_exit. */ if (!CPU_ISSET(pc->pc_cpuid, &rm->rm_writecpus)) { @@ -416,7 +416,7 @@ _rm_rlock_hard(struct rmlock *rm, struct } critical_enter(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); CPU_CLR(pc->pc_cpuid, &rm->rm_writecpus); rm_tracker_add(pc, tracker); sched_pin(); @@ -641,7 +641,7 @@ _rm_rlock_debug(struct rmlock *rm, struc #ifdef INVARIANTS if (!(rm->lock_object.lo_flags & LO_RECURSABLE) && !trylock) { critical_enter(); - KASSERT(rm_trackers_present(pcpu_find(curcpu), rm, + KASSERT(rm_trackers_present(get_pcpu(), rm, curthread) == 0, ("rm_rlock: recursed on non-recursive rmlock %s @ %s:%d\n", rm->lock_object.lo_name, file, line)); @@ -771,7 +771,7 @@ _rm_assert(const struct rmlock *rm, int } critical_enter(); - count = rm_trackers_present(pcpu_find(curcpu), rm, curthread); + count = rm_trackers_present(get_pcpu(), rm, curthread); critical_exit(); if (count == 0) @@ -797,7 +797,7 @@ _rm_assert(const struct rmlock *rm, int rm->lock_object.lo_name, file, line); critical_enter(); - count = rm_trackers_present(pcpu_find(curcpu), rm, curthread); + count = rm_trackers_present(get_pcpu(), rm, curthread); critical_exit(); if (count != 0) Modified: head/sys/mips/include/pcpu.h ============================================================================== --- head/sys/mips/include/pcpu.h Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/mips/include/pcpu.h Sun Feb 19 02:03:09 2017 (r313930) @@ -39,16 +39,17 @@ struct pmap *pc_curpmap; /* pmap of curthread */ \ u_int32_t pc_next_asid; /* next ASID to alloc */ \ u_int32_t pc_asid_generation; /* current ASID generation */ \ - u_int pc_pending_ipis; /* IPIs pending to this CPU */ + u_int pc_pending_ipis; /* IPIs pending to this CPU */ \ + struct pcpu *pc_self; /* globally-uniqe self pointer */ #ifdef __mips_n64 #define PCPU_MD_MIPS64_FIELDS \ PCPU_MD_COMMON_FIELDS \ - char __pad[61] + char __pad[53] #else #define PCPU_MD_MIPS32_FIELDS \ PCPU_MD_COMMON_FIELDS \ - char __pad[193] + char __pad[189] #endif #ifdef __mips_n64 @@ -65,6 +66,13 @@ extern char pcpu_space[MAXCPU][PAGE_SIZE extern struct pcpu *pcpup; #define PCPUP pcpup +/* + * Since we use a wired TLB entry to map the same VA to a different + * physical page for each CPU, get_pcpu() must use the pc_self + * field to obtain a globally-unique pointer. + */ +#define get_pcpu() (PCPUP->pc_self) + #define PCPU_ADD(member, value) (PCPUP->pc_ ## member += (value)) #define PCPU_GET(member) (PCPUP->pc_ ## member) #define PCPU_INC(member) PCPU_ADD(member, 1) Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/mips/mips/machdep.c Sun Feb 19 02:03:09 2017 (r313930) @@ -475,6 +475,7 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu pcpu->pc_next_asid = 1; pcpu->pc_asid_generation = 1; + pcpu->pc_self = pcpu; #ifdef SMP if ((vm_offset_t)pcpup >= VM_MIN_KERNEL_ADDRESS && (vm_offset_t)pcpup <= VM_MAX_KERNEL_ADDRESS) { Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/net/netisr.c Sun Feb 19 02:03:09 2017 (r313930) @@ -1268,9 +1268,7 @@ netisr_start_swi(u_int cpuid, struct pcp static void netisr_init(void *arg) { -#ifdef EARLY_AP_STARTUP struct pcpu *pc; -#endif NETISR_LOCK_INIT(); if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) @@ -1308,7 +1306,8 @@ netisr_init(void *arg) netisr_start_swi(pc->pc_cpuid, pc); } #else - netisr_start_swi(curcpu, pcpu_find(curcpu)); + pc = get_pcpu(); + netisr_start_swi(pc->pc_cpuid, pc); #endif } SYSINIT(netisr_init, SI_SUB_SOFTINTR, SI_ORDER_FIRST, netisr_init, NULL); Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/powerpc/include/cpufunc.h Sun Feb 19 02:03:09 2017 (r313930) @@ -201,7 +201,7 @@ intr_restore(register_t msr) } static __inline struct pcpu * -powerpc_get_pcpup(void) +get_pcpu(void) { struct pcpu *ret; Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/powerpc/include/pcpu.h Sun Feb 19 02:03:09 2017 (r313930) @@ -142,7 +142,7 @@ struct pvo_entry; #ifdef _KERNEL -#define pcpup ((struct pcpu *) powerpc_get_pcpup()) +#define pcpup (get_pcpu()) static __inline __pure2 struct thread * __curthread(void) Modified: head/sys/sparc64/include/pcpu.h ============================================================================== --- head/sys/sparc64/include/pcpu.h Sat Feb 18 22:13:28 2017 (r313929) +++ head/sys/sparc64/include/pcpu.h Sun Feb 19 02:03:09 2017 (r313930) @@ -74,6 +74,7 @@ struct pcpu; register struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); +#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) static __inline __pure2 struct thread * From owner-svn-src-all@freebsd.org Sun Feb 19 03:11: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 D97BCCE39F0; Sun, 19 Feb 2017 03:11:15 +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 A8B2A1A19; Sun, 19 Feb 2017 03:11:15 +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 v1J3BE0w056014; Sun, 19 Feb 2017 03:11:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J3BEL4056013; Sun, 19 Feb 2017 03:11:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702190311.v1J3BEL4056013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Feb 2017 03:11: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: r313931 - stable/11/sys/fs/devfs 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, 19 Feb 2017 03:11:16 -0000 Author: kib Date: Sun Feb 19 03:11:14 2017 New Revision: 313931 URL: https://svnweb.freebsd.org/changeset/base/313931 Log: MFC r313797: Minor style fixes. Modified: stable/11/sys/fs/devfs/devfs_devs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/11/sys/fs/devfs/devfs_devs.c Sun Feb 19 02:03:09 2017 (r313930) +++ stable/11/sys/fs/devfs/devfs_devs.c Sun Feb 19 03:11:14 2017 (r313931) @@ -208,7 +208,7 @@ devfs_newdirent(char *name, int namelen) struct dirent d; d.d_namlen = namelen; - i = sizeof (*de) + GENERIC_DIRSIZ(&d); + i = sizeof(*de) + GENERIC_DIRSIZ(&d); de = malloc(i, M_DEVFS3, M_WAITOK | M_ZERO); de->de_dirent = (struct dirent *)(de + 1); de->de_dirent->d_namlen = namelen; @@ -246,7 +246,8 @@ devfs_parent_dirent(struct devfs_dirent } struct devfs_dirent * -devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen, struct devfs_dirent *dotdot, u_int inode) +devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen, + struct devfs_dirent *dotdot, u_int inode) { struct devfs_dirent *dd; struct devfs_dirent *de; From owner-svn-src-all@freebsd.org Sun Feb 19 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 BAD4ACE3BCC; Sun, 19 Feb 2017 03:17:12 +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 86C661D21; Sun, 19 Feb 2017 03:17:12 +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 v1J3HB1S059754; Sun, 19 Feb 2017 03:17:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J3HBCm059753; Sun, 19 Feb 2017 03:17:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702190317.v1J3HBCm059753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 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: r313932 - stable/10/sys/fs/devfs 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, 19 Feb 2017 03:17:12 -0000 Author: kib Date: Sun Feb 19 03:17:11 2017 New Revision: 313932 URL: https://svnweb.freebsd.org/changeset/base/313932 Log: MFC r313797: Minor style fixes. Modified: stable/10/sys/fs/devfs/devfs_devs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_devs.c Sun Feb 19 03:11:14 2017 (r313931) +++ stable/10/sys/fs/devfs/devfs_devs.c Sun Feb 19 03:17:11 2017 (r313932) @@ -208,7 +208,7 @@ devfs_newdirent(char *name, int namelen) struct dirent d; d.d_namlen = namelen; - i = sizeof (*de) + GENERIC_DIRSIZ(&d); + i = sizeof(*de) + GENERIC_DIRSIZ(&d); de = malloc(i, M_DEVFS3, M_WAITOK | M_ZERO); de->de_dirent = (struct dirent *)(de + 1); de->de_dirent->d_namlen = namelen; @@ -246,7 +246,8 @@ devfs_parent_dirent(struct devfs_dirent } struct devfs_dirent * -devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen, struct devfs_dirent *dotdot, u_int inode) +devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen, + struct devfs_dirent *dotdot, u_int inode) { struct devfs_dirent *dd; struct devfs_dirent *de; From owner-svn-src-all@freebsd.org Sun Feb 19 03:33: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 BD9A3CE5108; Sun, 19 Feb 2017 03:33:21 +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 8D41C8A2; Sun, 19 Feb 2017 03:33:21 +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 v1J3XKl3067947; Sun, 19 Feb 2017 03:33:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J3XKQB067946; Sun, 19 Feb 2017 03:33:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702190333.v1J3XKQB067946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Feb 2017 03:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313933 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 03:33:21 -0000 Author: kib Date: Sun Feb 19 03:33:20 2017 New Revision: 313933 URL: https://svnweb.freebsd.org/changeset/base/313933 Log: Microoptimize amd64/pmap.c pmap_protect_pde(). For the loop that dirties vm_pages in case superpage was written to, check the complete condition before the loop. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Feb 19 03:17:11 2017 (r313932) +++ head/sys/amd64/amd64/pmap.c Sun Feb 19 03:33:20 2017 (r313933) @@ -3998,12 +3998,12 @@ pmap_protect_pde(pmap_t pmap, pd_entry_t anychanged = FALSE; retry: oldpde = newpde = *pde; - if (oldpde & PG_MANAGED) { + if ((oldpde & (PG_MANAGED | PG_M | PG_RW)) == + (PG_MANAGED | PG_M | PG_RW)) { eva = sva + NBPDR; for (va = sva, m = PHYS_TO_VM_PAGE(oldpde & PG_PS_FRAME); va < eva; va += PAGE_SIZE, m++) - if ((oldpde & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); + vm_page_dirty(m); } if ((prot & VM_PROT_WRITE) == 0) newpde &= ~(PG_RW | PG_M); From owner-svn-src-all@freebsd.org Sun Feb 19 03: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 341B5CE5501; Sun, 19 Feb 2017 03:57:43 +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 F2D5910EA; Sun, 19 Feb 2017 03:57:42 +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 v1J3vgX6076042; Sun, 19 Feb 2017 03:57:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J3vgnL076041; Sun, 19 Feb 2017 03:57:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702190357.v1J3vgnL076041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Feb 2017 03:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313934 - head/sys/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: Sun, 19 Feb 2017 03:57:43 -0000 Author: kib Date: Sun Feb 19 03:57:41 2017 New Revision: 313934 URL: https://svnweb.freebsd.org/changeset/base/313934 Log: Fix regression in r313898 on i386. Use large enough type for calculation of mtrr physmask. Typical cpu_maxphyaddr is 36 or larger. Reported and tested by: sbruno Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/sys/x86/x86/x86_mem.c Modified: head/sys/x86/x86/x86_mem.c ============================================================================== --- head/sys/x86/x86/x86_mem.c Sun Feb 19 03:33:20 2017 (r313933) +++ head/sys/x86/x86/x86_mem.c Sun Feb 19 03:57:41 2017 (r313934) @@ -638,7 +638,7 @@ x86_mrinit(struct mem_range_softc *sc) * Determine the size of the PhysMask and PhysBase fields in * the variable range MTRRs. */ - mtrr_physmask = ((1UL << cpu_maxphyaddr) - 1) & ~0xfffUL; + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffUL; /* If fixed MTRRs supported and enabled. */ if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { From owner-svn-src-all@freebsd.org Sun Feb 19 05:06: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 676EFCDB0F0; Sun, 19 Feb 2017 05:06:30 +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 2806FAFE; Sun, 19 Feb 2017 05:06:30 +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 v1J56TAa003989; Sun, 19 Feb 2017 05:06:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J56Thb003988; Sun, 19 Feb 2017 05:06:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201702190506.v1J56Thb003988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 19 Feb 2017 05:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313935 - 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: Sun, 19 Feb 2017 05:06:30 -0000 Author: sbruno Date: Sun Feb 19 05:06:29 2017 New Revision: 313935 URL: https://svnweb.freebsd.org/changeset/base/313935 Log: Restore PBA setup for igb(4) class devices. Do no write to PBA register on igb(4) devices unless we need to make adjustments for the 82575 and jumbo frames. Remove redundant LPE/~LPE assignments. Move e1000_lv_jumbo_workaround_ich8lan() invokcation into a block so that its not executed in the igb case. Move em(4) class assignments of RCTL values to its own code block. Adjust a few direct accesses of ifp->mtu to use accessor functions. PR: 216734 Submitted by: Kaho Toshikazu Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Feb 19 03:57:41 2017 (r313934) +++ head/sys/dev/e1000/if_em.c Sun Feb 19 05:06:29 2017 (r313935) @@ -2238,13 +2238,62 @@ em_reset(if_ctx_t ctx) case e1000_pch_spt: pba = E1000_PBA_26K; break; + case e1000_82575: + pba = E1000_PBA_32K; + break; + case e1000_82576: + case e1000_vfadapt: + pba = E1000_READ_REG(hw, E1000_RXPBS); + pba &= E1000_RXPBS_SIZE_MASK_82576; + break; + case e1000_82580: + case e1000_i350: + case e1000_i354: + case e1000_vfadapt_i350: + pba = E1000_READ_REG(hw, E1000_RXPBS); + pba = e1000_rxpbs_adjust_82580(pba); + break; + case e1000_i210: + case e1000_i211: + pba = E1000_PBA_34K; + break; default: if (adapter->hw.mac.max_frame_size > 8192) pba = E1000_PBA_40K; /* 40K for Rx, 24K for Tx */ else pba = E1000_PBA_48K; /* 48K for Rx, 16K for Tx */ } - E1000_WRITE_REG(&adapter->hw, E1000_PBA, pba); + + /* Special needs in case of Jumbo frames */ + if ((hw->mac.type == e1000_82575) && (ifp->if_mtu > ETHERMTU)) { + u32 tx_space, min_tx, min_rx; + pba = E1000_READ_REG(hw, E1000_PBA); + tx_space = pba >> 16; + pba &= 0xffff; + min_tx = (adapter->hw.mac.max_frame_size + + sizeof(struct e1000_tx_desc) - ETHERNET_FCS_SIZE) * 2; + min_tx = roundup2(min_tx, 1024); + min_tx >>= 10; + min_rx = adapter->hw.mac.max_frame_size; + min_rx = roundup2(min_rx, 1024); + min_rx >>= 10; + if (tx_space < min_tx && + ((min_tx - tx_space) < pba)) { + pba = pba - (min_tx - tx_space); + /* + * if short on rx space, rx wins + * and must trump tx adjustment + */ + if (pba < min_rx) + pba = min_rx; + } + E1000_WRITE_REG(hw, E1000_PBA, pba); + } + + if (hw->mac.type < igb_mac_min) + E1000_WRITE_REG(&adapter->hw, E1000_PBA, pba); + + INIT_DEBUGOUT1("em_reset: pba=%dK",pba); /* * These parameters control the automatic generation (Tx) and @@ -2260,7 +2309,7 @@ em_reset(if_ctx_t ctx) * by 1500. * - The pause time is fairly large at 1000 x 512ns = 512 usec. */ - rx_buffer_size = ((E1000_READ_REG(hw, E1000_PBA) & 0xffff) << 10 ); + rx_buffer_size = (pba & 0xffff) << 10; hw->fc.high_water = rx_buffer_size - roundup2(adapter->hw.mac.max_frame_size, 1024); hw->fc.low_water = hw->fc.high_water - 1500; @@ -2305,6 +2354,21 @@ em_reset(if_ctx_t ctx) else E1000_WRITE_REG(hw, E1000_PBA, 26); break; + case e1000_82575: + case e1000_82576: + /* 8-byte granularity */ + hw->fc.low_water = hw->fc.high_water - 8; + break; + case e1000_82580: + case e1000_i350: + case e1000_i354: + case e1000_i210: + case e1000_i211: + case e1000_vfadapt: + case e1000_vfadapt_i350: + /* 16-byte granularity */ + hw->fc.low_water = hw->fc.high_water - 16; + break; case e1000_ich9lan: case e1000_ich10lan: if (if_getmtu(ifp) > ETHERMTU) { @@ -2975,9 +3039,7 @@ em_initialize_receive_unit(if_ctx_t ctx) } else if (adapter->hw.mac.type >= igb_mac_min) { u32 psize, srrctl = 0; - if (ifp->if_mtu > ETHERMTU) { - rctl |= E1000_RCTL_LPE; - + if (if_getmtu(ifp) > ETHERMTU) { /* Set maximum packet len */ psize = scctx->isc_max_frame_size; if (psize <= 4096) { @@ -2993,7 +3055,6 @@ em_initialize_receive_unit(if_ctx_t ctx) psize += VLAN_TAG_SIZE; E1000_WRITE_REG(&adapter->hw, E1000_RLPML, psize); } else { - rctl &= ~E1000_RCTL_LPE; srrctl |= 2048 >> E1000_SRRCTL_BSIZEPKT_SHIFT; rctl |= E1000_RCTL_SZ_2048; } @@ -3039,8 +3100,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= IGB_RX_WTHRESH << 16; E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } - if (adapter->hw.mac.type >= e1000_pch2lan) { + } else if (adapter->hw.mac.type >= e1000_pch2lan) { if (if_getmtu(ifp) > ETHERMTU) e1000_lv_jumbo_workaround_ich8lan(hw, TRUE); else @@ -3050,15 +3110,18 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; - if (adapter->rx_mbuf_sz == MCLBYTES) - rctl |= E1000_RCTL_SZ_2048; - else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) - rctl |= E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX; - else if (adapter->rx_mbuf_sz > MJUMPAGESIZE) - rctl |= E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX; + if (adapter->hw.mac.type < igb_mac_min) { + if (adapter->rx_mbuf_sz == MCLBYTES) + rctl |= E1000_RCTL_SZ_2048; + else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) + rctl |= E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX; + else if (adapter->rx_mbuf_sz > MJUMPAGESIZE) + rctl |= E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX; + + /* ensure we clear use DTYPE of 00 here */ + rctl &= ~0x00000C00; + } - /* ensure we clear use DTYPE of 00 here */ - rctl &= ~0x00000C00; /* Write out the settings */ E1000_WRITE_REG(hw, E1000_RCTL, rctl); From owner-svn-src-all@freebsd.org Sun Feb 19 05:07: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 ADDACCDB14A; Sun, 19 Feb 2017 05:07:03 +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 6EA34C4C; Sun, 19 Feb 2017 05:07: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 v1J572nC004070; Sun, 19 Feb 2017 05:07:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J5725T004068; Sun, 19 Feb 2017 05:07:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702190507.v1J5725T004068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Feb 2017 05:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313936 - 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: Sun, 19 Feb 2017 05:07:03 -0000 Author: mav Date: Sun Feb 19 05:07:02 2017 New Revision: 313936 URL: https://svnweb.freebsd.org/changeset/base/313936 Log: Move CTIO waitq from per-LUN to per-channel. All resources lack of which may put CTIO into the queue are either per-channel or potentially per-queue, but none of them are per-LUN. This is a first step to fix live LUN disabling. Before this change any CTIOs held in a queue in time of disabling were just leaked. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Feb 19 05:06:29 2017 (r313935) +++ head/sys/dev/isp/isp_freebsd.c Sun Feb 19 05:07:02 2017 (r313936) @@ -153,6 +153,7 @@ isp_attach_chan(ispsoftc_t *isp, struct struct isp_spi *spi = ISP_SPI_PC(isp, chan); spi->sim = sim; spi->path = path; + TAILQ_INIT(&spi->waitq); } else { fcparam *fcp = FCPARAM(isp, chan); struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -168,6 +169,7 @@ isp_attach_chan(ispsoftc_t *isp, struct callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0); TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); + TAILQ_INIT(&fc->waitq); isp_loop_changed(isp, chan); ISP_UNLOCK(isp); if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { @@ -976,6 +978,7 @@ isp_tmcmd_restart(ispsoftc_t *isp) tstate_t *tptr; union ccb *ccb; struct tslist *lhp; + struct isp_ccbq *waitq; int bus, i; for (bus = 0; bus < isp->isp_nchan; bus++) { @@ -1005,16 +1008,18 @@ isp_tmcmd_restart(ispsoftc_t *isp) break; } } - /* - * We only need to do this once per tptr - */ - if (!TAILQ_EMPTY(&tptr->waitq)) { - ccb = (union ccb *)TAILQ_LAST(&tptr->waitq, isp_ccbq); - TAILQ_REMOVE(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); - isp_target_start_ctio(isp, ccb, FROM_TIMER); - } } } + + /* + * We only need to do this once per channel. + */ + ISP_GET_PC_ADDR(isp, bus, waitq, waitq); + ccb = (union ccb *)TAILQ_FIRST(waitq); + if (ccb != NULL) { + TAILQ_REMOVE(waitq, &ccb->ccb_h, periph_links.tqe); + isp_target_start_ctio(isp, ccb, FROM_TIMER); + } } } @@ -1129,7 +1134,6 @@ create_lun_state(ispsoftc_t *isp, int bu } SLIST_INIT(&tptr->atios); SLIST_INIT(&tptr->inots); - TAILQ_INIT(&tptr->waitq); LIST_INIT(&tptr->atfree); for (i = ATPDPSIZE-1; i >= 0; i--) LIST_INSERT_HEAD(&tptr->atfree, &tptr->atpool[i], next); @@ -1264,6 +1268,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u fcparam *fcp; atio_private_data_t *atp; struct ccb_scsiio *cso; + struct isp_ccbq *waitq; uint32_t dmaresult, handle, xfrlen, sense_length, tmp; uint8_t local[QENTRY_LEN]; @@ -1280,23 +1285,23 @@ isp_target_start_ctio(ispsoftc_t *isp, u isp_prt(isp, ISP_LOGTDEBUG0, "%s: ENTRY[0x%x] how %u xfrlen %u sendstatus %d sense_len %u", __func__, ccb->csio.tag_id, how, ccb->csio.dxfer_len, (ccb->ccb_h.flags & CAM_SEND_STATUS) != 0, ((ccb->ccb_h.flags & CAM_SEND_SENSE)? ccb->csio.sense_len : 0)); + ISP_GET_PC_ADDR(isp, XS_CHANNEL(ccb), waitq, waitq); switch (how) { - case FROM_TIMER: case FROM_CAM: /* * Insert at the tail of the list, if any, waiting CTIO CCBs */ - TAILQ_INSERT_TAIL(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_TAIL(waitq, &ccb->ccb_h, periph_links.tqe); break; + case FROM_TIMER: case FROM_SRR: case FROM_CTIO_DONE: - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); break; } - while (TAILQ_FIRST(&tptr->waitq) != NULL) { - ccb = (union ccb *) TAILQ_FIRST(&tptr->waitq); - TAILQ_REMOVE(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + while ((ccb = (union ccb *) TAILQ_FIRST(waitq)) != NULL) { + TAILQ_REMOVE(waitq, &ccb->ccb_h, periph_links.tqe); cso = &ccb->csio; xfrlen = cso->dxfer_len; @@ -1345,7 +1350,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u */ if (atp->ctcnt >= ATPD_CCB_OUTSTANDING) { isp_prt(isp, ISP_LOGTINFO, "[0x%x] handling only %d CCBs at a time (flags for this ccb: 0x%x)", cso->tag_id, ATPD_CCB_OUTSTANDING, ccb->ccb_h.flags); - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); break; } @@ -1462,7 +1467,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u if (atp->ests == NULL) { atp->ests = isp_get_ecmd(isp); if (atp->ests == NULL) { - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); break; } } @@ -1617,7 +1622,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u if (atp->ests == NULL) { atp->ests = isp_get_ecmd(isp); if (atp->ests == NULL) { - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); break; } } @@ -1706,13 +1711,13 @@ isp_target_start_ctio(ispsoftc_t *isp, u if (isp_get_pcmd(isp, ccb)) { ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "out of PCMDs\n"); - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); break; } handle = isp_allocate_handle(isp, ccb, ISP_HANDLE_TARGET); if (handle == 0) { ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "No XFLIST pointers for %s\n", __func__); - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); isp_free_pcmd(isp, ccb); break; } @@ -1742,7 +1747,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u isp_destroy_handle(isp, handle); isp_free_pcmd(isp, ccb); if (dmaresult == CMD_EAGAIN) { - TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + TAILQ_INSERT_HEAD(waitq, &ccb->ccb_h, periph_links.tqe); break; } ccb->ccb_h.status = CAM_REQ_CMP_ERR; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Feb 19 05:06:29 2017 (r313935) +++ head/sys/dev/isp/isp_freebsd.h Sun Feb 19 05:07:02 2017 (r313936) @@ -163,12 +163,10 @@ typedef struct isp_timed_notify_ack { struct callout timer; } isp_tna_t; -TAILQ_HEAD(isp_ccbq, ccb_hdr); typedef struct tstate { SLIST_ENTRY(tstate) next; lun_id_t ts_lun; struct cam_path *owner; - struct isp_ccbq waitq; /* waiting CCBs */ struct ccb_hdr_slist atios; struct ccb_hdr_slist inots; uint32_t hold; @@ -220,6 +218,7 @@ struct isp_nexus { * Per channel information */ SLIST_HEAD(tslist, tstate); +TAILQ_HEAD(isp_ccbq, ccb_hdr); struct isp_fc { struct cam_sim *sim; @@ -249,7 +248,8 @@ struct isp_fc { struct callout gdt; /* gone device timer */ struct task gtask; #ifdef ISP_TARGET_MODE - struct tslist lun_hash[LUN_HASH_SIZE]; + struct tslist lun_hash[LUN_HASH_SIZE]; + struct isp_ccbq waitq; /* waiting CCBs */ #if defined(DEBUG) unsigned int inject_lost_data_frame; #endif @@ -264,7 +264,8 @@ struct isp_spi { simqfrozen : 3, iid : 4; #ifdef ISP_TARGET_MODE - struct tslist lun_hash[LUN_HASH_SIZE]; + struct tslist lun_hash[LUN_HASH_SIZE]; + struct isp_ccbq waitq; /* waiting CCBs */ #endif int num_threads; }; From owner-svn-src-all@freebsd.org Sun Feb 19 05:29: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 9F2D5CDB837; Sun, 19 Feb 2017 05:29:07 +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 6C10A14BE; Sun, 19 Feb 2017 05:29:07 +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 v1J5T6dg011945; Sun, 19 Feb 2017 05:29:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J5T6SY011944; Sun, 19 Feb 2017 05:29:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702190529.v1J5T6SY011944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Feb 2017 05:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313937 - 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: Sun, 19 Feb 2017 05:29:07 -0000 Author: mav Date: Sun Feb 19 05:29:06 2017 New Revision: 313937 URL: https://svnweb.freebsd.org/changeset/base/313937 Log: Missed addition to r313936. CTIO waitq present only in ISP_TARGET_MODE. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Feb 19 05:07:02 2017 (r313936) +++ head/sys/dev/isp/isp_freebsd.c Sun Feb 19 05:29:06 2017 (r313937) @@ -153,7 +153,9 @@ isp_attach_chan(ispsoftc_t *isp, struct struct isp_spi *spi = ISP_SPI_PC(isp, chan); spi->sim = sim; spi->path = path; +#ifdef ISP_TARGET_MODE TAILQ_INIT(&spi->waitq); +#endif } else { fcparam *fcp = FCPARAM(isp, chan); struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -169,7 +171,9 @@ isp_attach_chan(ispsoftc_t *isp, struct callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0); TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); +#ifdef ISP_TARGET_MODE TAILQ_INIT(&fc->waitq); +#endif isp_loop_changed(isp, chan); ISP_UNLOCK(isp); if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { From owner-svn-src-all@freebsd.org Sun Feb 19 06: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 BEBFFCDBFC5; Sun, 19 Feb 2017 06:02:42 +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 6D3A821C; Sun, 19 Feb 2017 06:02:42 +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 v1J62f0Y027654; Sun, 19 Feb 2017 06:02:41 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J62fPd027653; Sun, 19 Feb 2017 06:02:41 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702190602.v1J62fPd027653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 19 Feb 2017 06:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313938 - head/usr.bin/lam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 06:02:42 -0000 Author: allanjude Date: Sun Feb 19 06:02:41 2017 New Revision: 313938 URL: https://svnweb.freebsd.org/changeset/base/313938 Log: Capsicum-ize lam(1) lam(1) is used in portsnap(8), so lock it down Reviewed by: emaste, cem, jonathan Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D8076 Modified: head/usr.bin/lam/lam.c Modified: head/usr.bin/lam/lam.c ============================================================================== --- head/usr.bin/lam/lam.c Sun Feb 19 05:29:06 2017 (r313937) +++ head/usr.bin/lam/lam.c Sun Feb 19 06:02:41 2017 (r313938) @@ -46,11 +46,16 @@ __FBSDID("$FreeBSD$"); * Author: John Kunze, UCB */ +#include + +#include #include #include +#include #include #include #include +#include #define MAXOFILES 20 #define BIGBUFSIZ 5 * BUFSIZ @@ -84,6 +89,17 @@ main(int argc, char *argv[]) getargs(argv); if (!morefiles) usage(); + + /* + * Cache NLS data, for strerror, for err(3), before entering capability + * mode. + */ + caph_cache_catpages(); + if (caph_limit_stdio() == -1) + err(1, "unable to limit stdio"); + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + for (;;) { linep = line; for (ip = input; ip->fp != NULL; ip++) @@ -105,7 +121,9 @@ getargs(char *av[]) static char fmtbuf[BUFSIZ]; char *fmtp = fmtbuf; int P, S, F, T; + cap_rights_t rights_ro; + cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT); P = S = F = T = 0; /* capitalized options */ while ((p = *++av) != NULL) { if (*p != '-' || !p[1]) { @@ -116,6 +134,8 @@ getargs(char *av[]) else if ((ip->fp = fopen(p, "r")) == NULL) { err(1, "%s", p); } + if (cap_rights_limit(fileno(ip->fp), &rights_ro) < 0) + err(1, "unable to limit rights on: %s", p); ip->pad = P; if (!ip->sepstring) ip->sepstring = (S ? (ip-1)->sepstring : ""); From owner-svn-src-all@freebsd.org Sun Feb 19 06: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 37826CE533A; Sun, 19 Feb 2017 06:14:35 +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 04BACCE5; Sun, 19 Feb 2017 06:14:34 +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 v1J6EYS9031986; Sun, 19 Feb 2017 06:14:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J6EYnD031985; Sun, 19 Feb 2017 06:14:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702190614.v1J6EYnD031985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Feb 2017 06:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313939 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 06:14:35 -0000 Author: kib Date: Sun Feb 19 06:14:33 2017 New Revision: 313939 URL: https://svnweb.freebsd.org/changeset/base/313939 Log: MFamd64 r313933: microoptimize pmap_protect_pde(). Noted by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Feb 19 06:02:41 2017 (r313938) +++ head/sys/i386/i386/pmap.c Sun Feb 19 06:14:33 2017 (r313939) @@ -3129,12 +3129,12 @@ pmap_protect_pde(pmap_t pmap, pd_entry_t anychanged = FALSE; retry: oldpde = newpde = *pde; - if (oldpde & PG_MANAGED) { + if ((oldpde & (PG_MANAGED | PG_M | PG_RW)) == + (PG_MANAGED | PG_M | PG_RW)) { eva = sva + NBPDR; for (va = sva, m = PHYS_TO_VM_PAGE(oldpde & PG_PS_FRAME); va < eva; va += PAGE_SIZE, m++) - if ((oldpde & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); + vm_page_dirty(m); } if ((prot & VM_PROT_WRITE) == 0) newpde &= ~(PG_RW | PG_M); From owner-svn-src-all@freebsd.org Sun Feb 19 07:38: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 5A7AECE512B; Sun, 19 Feb 2017 07:38:13 +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 0C6C8E0E; Sun, 19 Feb 2017 07:38:12 +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 v1J7cC7F064129; Sun, 19 Feb 2017 07:38:12 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1J7cB9c064124; Sun, 19 Feb 2017 07:38:11 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702190738.v1J7cB9c064124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 19 Feb 2017 07:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313940 - 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, 19 Feb 2017 07:38:13 -0000 Author: dchagin Date: Sun Feb 19 07:38:11 2017 New Revision: 313940 URL: https://svnweb.freebsd.org/changeset/base/313940 Log: Implement rt_tgsigqueueinfo system call used by glibc for pthread_sigqueue(3). MFC after: 2 week Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/compat/linux/linux_signal.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sun Feb 19 06:14:33 2017 (r313939) +++ head/sys/amd64/linux/linux_dummy.c Sun Feb 19 07:38:11 2017 (r313940) @@ -114,7 +114,6 @@ DUMMY(inotify_init1); DUMMY(preadv); DUMMY(pwritev); /* linux 2.6.31: */ -DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.38: */ DUMMY(fanotify_init); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sun Feb 19 06:14:33 2017 (r313939) +++ head/sys/amd64/linux32/linux32_dummy.c Sun Feb 19 07:38:11 2017 (r313940) @@ -114,7 +114,6 @@ DUMMY(inotify_init1); DUMMY(preadv); DUMMY(pwritev); /* linux 2.6.31: */ -DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); Modified: head/sys/compat/linux/linux_signal.c ============================================================================== --- head/sys/compat/linux/linux_signal.c Sun Feb 19 06:14:33 2017 (r313939) +++ head/sys/compat/linux/linux_signal.c Sun Feb 19 07:38:11 2017 (r313940) @@ -764,3 +764,32 @@ linux_rt_sigqueueinfo(struct thread *td, return (error); } + +int +linux_rt_tgsigqueueinfo(struct thread *td, struct linux_rt_tgsigqueueinfo_args *args) +{ + l_siginfo_t linfo; + struct thread *tds; + ksiginfo_t ksi; + int error; + int sig; + + if (!LINUX_SIG_VALID(args->sig)) + return (EINVAL); + + error = copyin(args->uinfo, &linfo, sizeof(linfo)); + if (error != 0) + return (error); + + if (linfo.lsi_code >= 0) + return (EPERM); + + tds = linux_tdfind(td, args->tid, args->tgid); + if (tds == NULL) + return (ESRCH); + + sig = linux_to_bsd_signal(args->sig); + ksiginfo_init(&ksi); + lsiginfo_to_ksiginfo(&linfo, &ksi, sig); + return (linux_do_tkill(td, tds, &ksi)); +} Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sun Feb 19 06:14:33 2017 (r313939) +++ head/sys/i386/linux/linux_dummy.c Sun Feb 19 07:38:11 2017 (r313940) @@ -110,7 +110,6 @@ DUMMY(inotify_init1); DUMMY(preadv); DUMMY(pwritev); /* linux 2.6.31: */ -DUMMY(rt_tgsigqueueinfo); DUMMY(perf_event_open); /* linux 2.6.33: */ DUMMY(fanotify_init); From owner-svn-src-all@freebsd.org Sun Feb 19 08:30: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 03F8ECE5BA0; Sun, 19 Feb 2017 08:30:46 +0000 (UTC) (envelope-from melounmichal@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 A39181F82; Sun, 19 Feb 2017 08:30:45 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id c85so9233355wmi.1; Sun, 19 Feb 2017 00:30:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:references:to:reply-to:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=ADJ+w4uo5u+O9aTTsuq2eUsiWcLUQUeshIKDXwolof0=; b=a644W+brPwN+/IW4pi9K1NGe03JX+mh6t9yfMA3yHw5Ro8Q6z7QG62uWGDJG7gpGMV NieeTv5daEi4qQIcyAygDe3FK+JRY9sDf102niMlzUFuV/7IP7QNF81Ww7HOa9Dp7GSx KSOUImN5ymgmmSiODPaHL9KDmW9ToTircIjXHWpKELGccaLRiSz8wJaw66gDdaHMYU07 diMvN17UGP9i8XzOBphJI3FfsHXF4f9JuZC6Gevz7rDWMv39j3FTj9Mn5tJY/To1+I4b OLApEsNHnxcUnun/jmQGvTIjuvY0pamRw9tCGlVA4A2hgtBRdmnWpI8yrQ+8LhJmHX/k 99zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:references:to:reply-to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ADJ+w4uo5u+O9aTTsuq2eUsiWcLUQUeshIKDXwolof0=; b=Nv5p7Riw79wDUg2I/onX6SLABApURtMTjWHsVJ34Y3qq139sXAGyFpRqcArjsjzMuL 0zMOFkuW8yUizPJY0buOLFWcQaIOdvq/5sPjBLxspZdwqGsAeIZBemDNjlEj3m0HOp3W CjN1JlHCWBh2dVPCzt83j4LNvP+yxUGE8ZaI4DGkOd3DVLPL2zugWkowkzHj9cIyZH+0 zUA1z8kjO4esyozb63kk+DJ15vWkDjuiin3+tjW64iD14euPxGngCzDgbykhZvuhQfVJ jltRW76ndc0CLLeddpS0/jCQszGqN1xaWj2NDvi06gL9vjn5Y0cGD+Cp/nB4efg8SsOV ioIg== X-Gm-Message-State: AMke39l1VyRJLWjOQJzCnD6WSGxrnHo2nzOwYEge6phWlZngyXQysqdWCsefaBTElx65DQ== X-Received: by 10.28.188.9 with SMTP id m9mr6879643wmf.79.1487493040732; Sun, 19 Feb 2017 00:30:40 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id 191sm8655201wmo.21.2017.02.19.00.30.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Feb 2017 00:30:40 -0800 (PST) From: Michal Meloun X-Google-Original-From: Michal Meloun Subject: Re: svn commit: r313928 - head/sys/kern References: <201702182206.v1IM64it034226@repo.freebsd.org> To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: mmel@freebsd.org Message-ID: <562d8e7b-f81d-65cc-9806-a074e08b96d5@freebsd.org> Date: Sun, 19 Feb 2017 09:30:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201702182206.v1IM64it034226@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 08:30:46 -0000 On 18.02.2017 23:06, Mateusz Guzik wrote: > Author: mjg > Date: Sat Feb 18 22:06:03 2017 > New Revision: 313928 > URL: https://svnweb.freebsd.org/changeset/base/313928 > > Log: > locks: clean up trylock primitives > > In particular thius reduces accesses of the lock itself. > > Modified: > head/sys/kern/kern_mutex.c > head/sys/kern/kern_rwlock.c > head/sys/kern/kern_sx.c > This commit broke (at least) sx_try_xlock_(). Michal FreeBSD/arm (tegra124) (ttyu0) login: panic: vmspace_fork: lock failed cpuid = 2 KDB: stack backtrace: db_trace_self() at db_trace_self pc = 0xc0728e60 lr = 0xc025ad04 (db_fetch_ksymtab+0x16c) sp = 0xf3578b48 fp = 0xf3578c60 db_fetch_ksymtab() at db_fetch_ksymtab+0x16c pc = 0xc025ad04 lr = 0xc0460a14 (vpanic+0x13c) sp = 0xf3578c68 fp = 0xf3578c88 r4 = 0x00000100 r5 = 0xc66f8a80 r6 = 0xc0819663 r7 = 0x00000001 vpanic() at vpanic+0x13c pc = 0xc0460a14 lr = 0xc04608d8 (vpanic) sp = 0xf3578c90 fp = 0xf3578ca4 r4 = 0xc0819663 r5 = 0xf3578cac r6 = 0x00000000 r7 = 0x00000000 r8 = 0x00000014 r9 = 0xf3578d5c r10 = 0xc69f8ba0 vpanic() at vpanic pc = 0xc04608d8 lr = 0xc07055e4 (vmspace_fork+0x104) sp = 0xf3578cac fp = 0xf3578ce8 r4 = 0xf3578ca4 r5 = 0xc04608d8 r6 = 0xf3578cac r7 = 0xc6c51c98 r8 = 0x00000000 r9 = 0x00000000 r10 = 0xc69f8ba0 vmspace_fork() at vmspace_fork+0x104 pc = 0xc07055e4 lr = 0xc0428928 (fork1+0x590) sp = 0xf3578cf0 fp = 0xf3578d50 r4 = 0xc0907f90 r5 = 0xc66f8a84 r6 = 0x00000000 r7 = 0x00000000 r8 = 0x00000014 r9 = 0xf3578d5c r10 = 0xc4eda710 fork1() at fork1+0x590 pc = 0xc0428928 lr = 0xc0428378 (sys_fork+0x3c) sp = 0xf3578d58 fp = 0xf3578d80 r4 = 0xc66f8a80 r5 = 0xf3578d5c r6 = 0x00000000 r7 = 0xc66ea388 r8 = 0x00000000 r9 = 0xf3578da0 r10 = 0x00033f5c sys_fork() at sys_fork+0x3c pc = 0xc0428378 lr = 0xc0748a68 (swi_handler+0x330) sp = 0xf3578d88 fp = 0xf3578e40 r4 = 0xc0ade110 r5 = 0xc66f8a80 swi_handler() at swi_handler+0x330 pc = 0xc0748a68 lr = 0xc072b83c (swi_exit) sp = 0xf3578e48 fp = 0xbfbfdb70 r4 = 0x20618000 r5 = 0x20618000 r6 = 0x00000000 r7 = 0x00000002 r8 = 0x2062cb10 r9 = 0x00033f54 r10 = 0x00033f5c swi_exit() at swi_exit pc = 0xc072b83c lr = 0xc072b83c (swi_exit) sp = 0xf3578e48 fp = 0xbfbfdb70 KDB: enter: panic [ thread pid 702 tid 100099 ] Stopped at kdb_enter+0x58: ldrb r15, [r15, r15, ror r15]! db> reboot > Modified: head/sys/kern/kern_mutex.c > ============================================================================== > --- head/sys/kern/kern_mutex.c Sat Feb 18 21:59:19 2017 (r313927) > +++ head/sys/kern/kern_mutex.c Sat Feb 18 22:06:03 2017 (r313928) > @@ -374,13 +374,18 @@ int > _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line) > { > struct mtx *m; > + struct thread *td; > + uintptr_t tid, v; > #ifdef LOCK_PROFILING > uint64_t waittime = 0; > int contested = 0; > #endif > int rval; > + bool recursed; > > - if (SCHEDULER_STOPPED()) > + td = curthread; > + tid = (uintptr_t)td; > + if (SCHEDULER_STOPPED_TD(td)) > return (1); > > m = mtxlock2mtx(c); > @@ -394,13 +399,21 @@ _mtx_trylock_flags_(volatile uintptr_t * > ("mtx_trylock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, > file, line)); > > - if (mtx_owned(m) && ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || > - (opts & MTX_RECURSE) != 0)) { > - m->mtx_recurse++; > - atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); > - rval = 1; > - } else > - rval = _mtx_obtain_lock(m, (uintptr_t)curthread); > + rval = 1; > + recursed = false; > + v = MTX_UNOWNED; > + if (!_mtx_obtain_lock_fetch(m, &v, tid)) { > + if (v == tid && > + ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || > + (opts & MTX_RECURSE) != 0)) { > + m->mtx_recurse++; > + atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); > + recursed = true; > + } else { > + rval = 0; > + } > + } > + > opts &= ~MTX_RECURSE; > > LOCK_LOG_TRY("LOCK", &m->lock_object, opts, rval, file, line); > @@ -408,10 +421,9 @@ _mtx_trylock_flags_(volatile uintptr_t * > WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE | LOP_TRYLOCK, > file, line); > TD_LOCKS_INC(curthread); > - if (m->mtx_recurse == 0) > + if (!recursed) > LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, > m, contested, waittime, file, line); > - > } > > return (rval); > > Modified: head/sys/kern/kern_rwlock.c > ============================================================================== > --- head/sys/kern/kern_rwlock.c Sat Feb 18 21:59:19 2017 (r313927) > +++ head/sys/kern/kern_rwlock.c Sat Feb 18 22:06:03 2017 (r313928) > @@ -293,9 +293,14 @@ int > __rw_try_wlock(volatile uintptr_t *c, const char *file, int line) > { > struct rwlock *rw; > + struct thread *td; > + uintptr_t tid, v; > int rval; > + bool recursed; > > - if (SCHEDULER_STOPPED()) > + td = curthread; > + tid = (uintptr_t)td; > + if (SCHEDULER_STOPPED_TD(td)) > return (1); > > rw = rwlock2rw(c); > @@ -306,20 +311,23 @@ __rw_try_wlock(volatile uintptr_t *c, co > KASSERT(rw->rw_lock != RW_DESTROYED, > ("rw_try_wlock() of destroyed rwlock @ %s:%d", file, line)); > > - 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, > - (uintptr_t)curthread); > + rval = 1; > + recursed = false; > + v = RW_UNLOCKED; > + if (!atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid)) { > + if (v == tid && (rw->lock_object.lo_flags & LO_RECURSABLE)) { > + rw->rw_recurse++; > + atomic_set_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); > + } else { > + rval = 0; > + } > + } > > LOCK_LOG_TRY("WLOCK", &rw->lock_object, 0, rval, file, line); > if (rval) { > WITNESS_LOCK(&rw->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK, > file, line); > - if (!rw_recursed(rw)) > + if (!recursed) > LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, > rw, 0, 0, file, line, LOCKSTAT_WRITER); > TD_LOCKS_INC(curthread); > @@ -637,13 +645,13 @@ __rw_try_rlock(volatile uintptr_t *c, co > ("rw_try_rlock() by idle thread %p on rwlock %s @ %s:%d", > curthread, rw->lock_object.lo_name, file, line)); > > + x = rw->rw_lock; > for (;;) { > - x = rw->rw_lock; > KASSERT(rw->rw_lock != RW_DESTROYED, > ("rw_try_rlock() of destroyed rwlock @ %s:%d", file, line)); > if (!(x & RW_LOCK_READ)) > break; > - if (atomic_cmpset_acq_ptr(&rw->rw_lock, x, x + RW_ONE_READER)) { > + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &x, x + RW_ONE_READER)) { > LOCK_LOG_TRY("RLOCK", &rw->lock_object, 0, 1, file, > line); > WITNESS_LOCK(&rw->lock_object, LOP_TRYLOCK, file, line); > > Modified: head/sys/kern/kern_sx.c > ============================================================================== > --- head/sys/kern/kern_sx.c Sat Feb 18 21:59:19 2017 (r313927) > +++ head/sys/kern/kern_sx.c Sat Feb 18 22:06:03 2017 (r313928) > @@ -269,13 +269,13 @@ sx_try_slock_(struct sx *sx, const char > ("sx_try_slock() by idle thread %p on sx %s @ %s:%d", > curthread, sx->lock_object.lo_name, file, line)); > > + x = sx->sx_lock; > for (;;) { > - x = sx->sx_lock; > KASSERT(x != SX_LOCK_DESTROYED, > ("sx_try_slock() of destroyed sx @ %s:%d", file, line)); > if (!(x & SX_LOCK_SHARED)) > break; > - if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) { > + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, x + SX_ONE_SHARER)) { > LOCK_LOG_TRY("SLOCK", &sx->lock_object, 0, 1, file, line); > WITNESS_LOCK(&sx->lock_object, LOP_TRYLOCK, file, line); > LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, > @@ -322,9 +322,14 @@ _sx_xlock(struct sx *sx, int opts, const > int > sx_try_xlock_(struct sx *sx, const char *file, int line) > { > + struct thread *td; > + uintptr_t tid, x; > int rval; > + bool recursed; > > - if (SCHEDULER_STOPPED()) > + td = curthread; > + tid = (uintptr_t)td; > + if (SCHEDULER_STOPPED_TD(td)) > return (1); > > KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), > @@ -333,19 +338,23 @@ sx_try_xlock_(struct sx *sx, const char > KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, > ("sx_try_xlock() of destroyed sx @ %s:%d", file, line)); > > - if (sx_xlocked(sx) && > - (sx->lock_object.lo_flags & LO_RECURSABLE) != 0) { > - sx->sx_recurse++; > - atomic_set_ptr(&sx->sx_lock, SX_LOCK_RECURSED); > - rval = 1; > - } else > - rval = atomic_cmpset_acq_ptr(&sx->sx_lock, SX_LOCK_UNLOCKED, > - (uintptr_t)curthread); > + rval = 1; > + recursed = false; > + x = SX_LOCK_UNLOCKED; > + if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) { > + if (x == tid && (sx->lock_object.lo_flags & LO_RECURSABLE)) { > + sx->sx_recurse++; > + atomic_set_ptr(&sx->sx_lock, SX_LOCK_RECURSED); > + } else { > + rval = 0; > + } > + } > + > LOCK_LOG_TRY("XLOCK", &sx->lock_object, 0, rval, file, line); > if (rval) { > WITNESS_LOCK(&sx->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK, > file, line); > - if (!sx_recursed(sx)) > + if (!recursed) > LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, > sx, 0, 0, file, line, LOCKSTAT_WRITER); > TD_LOCKS_INC(curthread); > From owner-svn-src-all@freebsd.org Sun Feb 19 10:30: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 90625CDB808; Sun, 19 Feb 2017 10:30:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::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 2A0B11594; Sun, 19 Feb 2017 10:30:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr0-x242.google.com with SMTP id s27so56197wrb.0; Sun, 19 Feb 2017 02:30:31 -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=Gaor2zbwr03PKgVlTq4SPPpyM3Q1PB20KdSpYCrObWo=; b=JvxcMrLW3kRPVkwEi5TTe+deylxEWEivbDhkOZXVGl3n/WmZKmLLlrAdTi91j7sPvi Y1J8HLPrCKnqNHi/XSgHl1wsk9rvrtkcX/TmjrANr2W9LxWuuJhwxsdeQ08QSWC0y+0O cU8qpgcvblszhk4KpBoS2bd+aNXjgVlAVlrQDyQBuvhSFEd35L+F7xPQ/KOYp9AduVlt ZJQyvVcMaccpzsuK6drGGMm6ixvsfkimxPiF6SA+jQPN++kjv30pnvbOO//Tt9gEnvBv XBismwuWqm9fsVpuU5UsejkfRF9QG9YMzqTWqjyr7pvJYSnU9gJriRcA8n/zsZYeSDoB Z5zQ== 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=Gaor2zbwr03PKgVlTq4SPPpyM3Q1PB20KdSpYCrObWo=; b=bZj4q9XIN5Lnwa72zbByK2l/YoN+qPk4JzLqYUEqJyQTE6JLy+swGXHOALOdT0lgFG IRJho5ipUklTA6lzk0pcD0KRxCFW8oujvWzI9dsfgnWievhTOMDRZy4LyebcyiSwOImi ZWCv2iACSGVCAWOYT+AHgyNwBMQBiQrzkaoK+inqTPSmxxfvxCJ6cL8o+kequuBPslko QrfxzT2PCHy/31SuhLoNe1r8m+voq+tFZFOpq/K0S1mWzHvUVZmVzRieSSZWUJqk4Htt Cwz01T85YzPH8duPC4eOdRZMkShO3uhWhcCiKm0JE3uNymuhcpeQYSoqHbVFkN6qRieA GbuA== X-Gm-Message-State: AMke39mEPs4lMqGb2tn+LzgEVrh7uK5XHWuLUCL4UMYs46LgMt63a/AaDQPh/RZreDxcJQ== X-Received: by 10.223.174.183 with SMTP id y52mr13145745wrc.112.1487500229200; Sun, 19 Feb 2017 02:30:29 -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 b10sm8964292wmi.34.2017.02.19.02.30.27 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 19 Feb 2017 02:30:28 -0800 (PST) Date: Sun, 19 Feb 2017 11:30:25 +0100 From: Mateusz Guzik To: mmel@freebsd.org Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313928 - head/sys/kern Message-ID: <20170219103025.GA8630@dft-labs.eu> References: <201702182206.v1IM64it034226@repo.freebsd.org> <562d8e7b-f81d-65cc-9806-a074e08b96d5@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <562d8e7b-f81d-65cc-9806-a074e08b96d5@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, 19 Feb 2017 10:30:31 -0000 On Sun, Feb 19, 2017 at 09:30:44AM +0100, Michal Meloun wrote: > > > On 18.02.2017 23:06, Mateusz Guzik wrote: > > Author: mjg > > Date: Sat Feb 18 22:06:03 2017 > > New Revision: 313928 > > URL: https://svnweb.freebsd.org/changeset/base/313928 > > > > Log: > > locks: clean up trylock primitives > > > > In particular thius reduces accesses of the lock itself. > > > > Modified: > > head/sys/kern/kern_mutex.c > > head/sys/kern/kern_rwlock.c > > head/sys/kern/kern_sx.c > > > > This commit broke (at least) sx_try_xlock_(). > Try this please https://people.freebsd.org/~mjg/patches/trylock.diff -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sun Feb 19 11:40: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 B8BB6CE5832; Sun, 19 Feb 2017 11:40:52 +0000 (UTC) (envelope-from melounmichal@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 5D9C7127A; Sun, 19 Feb 2017 11:40:52 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id r18so9675249wmd.3; Sun, 19 Feb 2017 03:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:references:to:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=hVJPlQ87u0cE2EpE5SVHn32lAxHE0f53R42+zsq01UU=; b=uHcg6XxgPNzE9lg7UvY0cgEUbLE41XoVBgVGajwdMU3i+brilGh/9aGtGxP2G8/loK b+Vx1Xr6vR1pY7T+IWoGlS1dWyOo7NWk50JXCeWXEAAqJ0wmeTz+pg7uwVwNxRDv4E3V rHltWb2we2zkibfSV+SsXD6cJcwfG8+8o0D49haLfcXUrBUbWZQmyAAKhBtj4HBTt6fd oPAg0MkrqQSyj4eN86asL3rGbcbq8x/q9LcUp3Fjgddi9O2tyPcV7KIpki1MQ7LLrE0K 69IReSEL4ttT09Wd51kOnox7SAiYBLBLlQTFxnqaPutrUSYTwEA3YZqLEubU2nfn1d7B VH0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:references:to:cc :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=hVJPlQ87u0cE2EpE5SVHn32lAxHE0f53R42+zsq01UU=; b=g9nA3Q6AnxUX59RkFZ7n5pM2Ivh7uIpfFYzH11nLNB73hhCBv0pLBQF0f4twWwh1c8 RNC3xtgR9XNeo1D4snQmzRvpLlG9fPgOS0x5tYoFgUZ8hvm+zC/BEJnPjCsL+GattLQ5 HthSDlFBZVdaRvA66abJ+b8SKzZc2YHMWXkQljsgeGLe8qrMrDobOhJLUuqi2ma/cdAG BgIghy3nbPK88EuerEeTazhzvCa+l4i1lmEEPo+D4UwZpNLJDfcS46UY14gIN38QNGSa C62/ZtZHTzBr58BJ4Rn8E8aQMxYv5dGLtcPWJfrMDXQZuFA5WcmmB0UwAcTADmiZ2fJb ejJg== X-Gm-Message-State: AMke39narjAIIG+UdGvF8qS3r/bJan5BvJk1lYhiqysNDJQFHMnCdamKcNWXL9gFe7IQPg== X-Received: by 10.28.191.139 with SMTP id o11mr13903695wmi.97.1487504450026; Sun, 19 Feb 2017 03:40:50 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id t103sm20508316wrc.43.2017.02.19.03.40.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Feb 2017 03:40:49 -0800 (PST) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r313928 - head/sys/kern References: <201702182206.v1IM64it034226@repo.freebsd.org> <562d8e7b-f81d-65cc-9806-a074e08b96d5@freebsd.org> <20170219103025.GA8630@dft-labs.eu> To: Mateusz Guzik Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <8b3f96ad-969b-3c88-53a2-20189d2ee2a1@freebsd.org> Date: Sun, 19 Feb 2017 12:40:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170219103025.GA8630@dft-labs.eu> 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: Sun, 19 Feb 2017 11:40:52 -0000 On 19.02.2017 11:30, Mateusz Guzik wrote: > On Sun, Feb 19, 2017 at 09:30:44AM +0100, Michal Meloun wrote: >> >> On 18.02.2017 23:06, Mateusz Guzik wrote: >>> Author: mjg >>> Date: Sat Feb 18 22:06:03 2017 >>> New Revision: 313928 >>> URL: https://svnweb.freebsd.org/changeset/base/313928 >>> >>> Log: >>> locks: clean up trylock primitives >>> >>> In particular thius reduces accesses of the lock itself. >>> >>> Modified: >>> head/sys/kern/kern_mutex.c >>> head/sys/kern/kern_rwlock.c >>> head/sys/kern/kern_sx.c >>> >> This commit broke (at least) sx_try_xlock_(). >> > Try this please https://people.freebsd.org/~mjg/patches/trylock.diff > The new patch works without problems (on armv6), please commit it. Thanks for quick response. Michal From owner-svn-src-all@freebsd.org Sun Feb 19 13:15: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 3B53ACE3F2E; Sun, 19 Feb 2017 13:15:35 +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 E296CAA5; Sun, 19 Feb 2017 13:15:34 +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 v1JDFXv6000698; Sun, 19 Feb 2017 13:15:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JDFXmT000697; Sun, 19 Feb 2017 13:15:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702191315.v1JDFXmT000697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 19 Feb 2017 13:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313941 - 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, 19 Feb 2017 13:15:35 -0000 Author: hselasky Date: Sun Feb 19 13:15:33 2017 New Revision: 313941 URL: https://svnweb.freebsd.org/changeset/base/313941 Log: Make sure the thread constructor and destructor eventhandlers are called for all threads belonging to a procedure. Currently the first thread in a procedure is kept around as an optimisation step and is never freed. Because the first thread in a procedure is never freed nor allocated, its destructor and constructor callbacks are never called which means per thread structures allocated by dtrace and the Linux emulation layers for example, might be present for threads which don't need these structures. This patch adds a thread construction and destruction call for the first thread in a procedure. Tested: dtrace, linux emulation Reviewed by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Feb 19 07:38:11 2017 (r313940) +++ head/sys/kern/kern_proc.c Sun Feb 19 13:15:33 2017 (r313941) @@ -191,11 +191,17 @@ static int proc_ctor(void *mem, int size, void *arg, int flags) { struct proc *p; + struct thread *td; p = (struct proc *)mem; SDT_PROBE4(proc, , ctor , entry, p, size, arg, flags); EVENTHANDLER_INVOKE(process_ctor, p); SDT_PROBE4(proc, , ctor , return, p, size, arg, flags); + td = FIRST_THREAD_IN_PROC(p); + if (td != NULL) { + /* Make sure all thread constructors are executed */ + EVENTHANDLER_INVOKE(thread_ctor, td); + } return (0); } @@ -220,6 +226,9 @@ proc_dtor(void *mem, int size, void *arg #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); + + /* Make sure all thread destructors are executed */ + EVENTHANDLER_INVOKE(thread_dtor, td); } EVENTHANDLER_INVOKE(process_dtor, p); if (p->p_ksi != NULL) From owner-svn-src-all@freebsd.org Sun Feb 19 16:08: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 DBE78CE5BA6; Sun, 19 Feb 2017 16:08:59 +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 A8E8B19D7; Sun, 19 Feb 2017 16:08:59 +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 v1JG8w1R068830; Sun, 19 Feb 2017 16:08:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JG8wAN068829; Sun, 19 Feb 2017 16:08:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702191608.v1JG8wAN068829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Feb 2017 16:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313943 - head/sbin/mdconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 16:09:00 -0000 Author: trasz Date: Sun Feb 19 16:08:58 2017 New Revision: 313943 URL: https://svnweb.freebsd.org/changeset/base/313943 Log: Make mdconfig(8) not segfault when the kernel returns garbage data. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Sun Feb 19 14:53:59 2017 (r313942) +++ head/sbin/mdconfig/mdconfig.c Sun Feb 19 16:08:58 2017 (r313943) @@ -452,8 +452,8 @@ md_list(const char *units, int opt, cons } gc = &pp->lg_config; type = geom_config_get(gc, "type"); - if (strcmp(type, "vnode") == 0 || - strcmp(type, "preload") == 0) { + if (type != NULL && (strcmp(type, "vnode") == 0 || + strcmp(type, "preload") == 0)) { file = geom_config_get(gc, "file"); if (fflag != NULL && strcmp(fflag, file) != 0) From owner-svn-src-all@freebsd.org Sun Feb 19 16:20: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 2E17BCE5F8D; Sun, 19 Feb 2017 16:20:04 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 CC0491F74; Sun, 19 Feb 2017 16:20:03 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id fUDRcTOw1sa1kfUDSchBEc; Sun, 19 Feb 2017 09:20:02 -0700 X-Authority-Analysis: v=2.2 cv=W+NIbVek 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=PNSh0XS_3XU6sIBE0BMA: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 DA72E3E6; Sun, 19 Feb 2017 08:20:00 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1JGJxkw013169; Sun, 19 Feb 2017 08:19:59 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702191619.v1JGJxkw013169@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: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313943 - head/sbin/mdconfig In-Reply-To: Message from Edward Tomasz Napierala of "Sun, 19 Feb 2017 16:08:58 +0000." <201702191608.v1JG8wAN068829@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Feb 2017 08:19:59 -0800 X-CMAE-Envelope: MS4wfHH0JNrKa950rxswXTHwxeXd39cYNifixaUacaD7EZnpRIhCIWn5SbjFykqWP7wlfQJGSD4TEUioE/ZWPfi1YKAPaEJPk6+OA7zqv/Tsjaz7Jw6AFB4r pqx0Da6OWQ5YcNmyXfzK/KUd/sNcqrCZUdwEcEFiePijjcQgzZog3EUAgTYIByxxRzyNmVKxrqwikfbnWzfxNInitmFqG6ka6SJCwRES8O+gpDrVAr8mApRv mdkvGyzkOlKznOtJ1t0pF9JjbF1f/XVzQHECYV+dm3K9aQm+4QFWlSQdiCVGQ+gl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 16:20:04 -0000 In message <201702191608.v1JG8wAN068829@repo.freebsd.org>, Edward Tomasz Napier ala writes: > Author: trasz > Date: Sun Feb 19 16:08:58 2017 > New Revision: 313943 > URL: https://svnweb.freebsd.org/changeset/base/313943 > > Log: > Make mdconfig(8) not segfault when the kernel returns garbage data. > > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > > Modified: > head/sbin/mdconfig/mdconfig.c > > Modified: head/sbin/mdconfig/mdconfig.c > ============================================================================= > = > --- head/sbin/mdconfig/mdconfig.c Sun Feb 19 14:53:59 2017 (r31394 > 2) > +++ head/sbin/mdconfig/mdconfig.c Sun Feb 19 16:08:58 2017 (r31394 > 3) > @@ -452,8 +452,8 @@ md_list(const char *units, int opt, cons > } > gc = &pp->lg_config; > type = geom_config_get(gc, "type"); > - if (strcmp(type, "vnode") == 0 || > - strcmp(type, "preload") == 0) { > + if (type != NULL && (strcmp(type, "vnode") == 0 || > + strcmp(type, "preload") == 0)) { > file = geom_config_get(gc, "file"); > if (fflag != NULL && > strcmp(fflag, file) != 0) > > I wonder why the kernel is returning garbage data? -- 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 19 16: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 70415CE51CB; Sun, 19 Feb 2017 16: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 310F9800; Sun, 19 Feb 2017 16: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 v1JGSl90076988; Sun, 19 Feb 2017 16:28:47 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JGSlTX076985; Sun, 19 Feb 2017 16:28:47 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702191628.v1JGSlTX076985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 19 Feb 2017 16:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313944 - 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, 19 Feb 2017 16:28:48 -0000 Author: mjg Date: Sun Feb 19 16:28:46 2017 New Revision: 313944 URL: https://svnweb.freebsd.org/changeset/base/313944 Log: locks: make trylock routines check for 'unowned' value Since fcmpset can fail without lock contention e.g. on arm, it was possible to get spurious failures when the caller was expecting the primitive to succeed. Reported by: mmel 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 Sun Feb 19 16:08:58 2017 (r313943) +++ head/sys/kern/kern_mutex.c Sun Feb 19 16:28:46 2017 (r313944) @@ -402,16 +402,21 @@ _mtx_trylock_flags_(volatile uintptr_t * rval = 1; recursed = false; v = MTX_UNOWNED; - if (!_mtx_obtain_lock_fetch(m, &v, tid)) { + for (;;) { + if (_mtx_obtain_lock_fetch(m, &v, tid)) + break; + if (v == MTX_UNOWNED) + continue; if (v == tid && ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || (opts & MTX_RECURSE) != 0)) { - m->mtx_recurse++; - atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); - recursed = true; - } else { - rval = 0; + m->mtx_recurse++; + atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); + recursed = true; + break; } + rval = 0; + break; } opts &= ~MTX_RECURSE; Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Feb 19 16:08:58 2017 (r313943) +++ head/sys/kern/kern_rwlock.c Sun Feb 19 16:28:46 2017 (r313944) @@ -314,13 +314,18 @@ __rw_try_wlock(volatile uintptr_t *c, co rval = 1; recursed = false; v = RW_UNLOCKED; - if (!atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid)) { + for (;;) { + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid)) + break; + if (v == RW_UNLOCKED) + continue; if (v == tid && (rw->lock_object.lo_flags & LO_RECURSABLE)) { rw->rw_recurse++; atomic_set_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); - } else { - rval = 0; + break; } + rval = 0; + break; } LOCK_LOG_TRY("WLOCK", &rw->lock_object, 0, rval, file, line); Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Feb 19 16:08:58 2017 (r313943) +++ head/sys/kern/kern_sx.c Sun Feb 19 16:28:46 2017 (r313944) @@ -341,13 +341,18 @@ sx_try_xlock_(struct sx *sx, const char rval = 1; recursed = false; x = SX_LOCK_UNLOCKED; - if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) { + for (;;) { + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) + break; + if (x == SX_LOCK_UNLOCKED) + continue; if (x == tid && (sx->lock_object.lo_flags & LO_RECURSABLE)) { sx->sx_recurse++; atomic_set_ptr(&sx->sx_lock, SX_LOCK_RECURSED); - } else { - rval = 0; + break; } + rval = 0; + break; } LOCK_LOG_TRY("XLOCK", &sx->lock_object, 0, rval, file, line); From owner-svn-src-all@freebsd.org Sun Feb 19 16:40: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 99924CE55CD; Sun, 19 Feb 2017 16:40: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 66AB8DB3; Sun, 19 Feb 2017 16:40:04 +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 v1JGe38K081104; Sun, 19 Feb 2017 16:40:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JGe3qd081103; Sun, 19 Feb 2017 16:40:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702191640.v1JGe3qd081103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Feb 2017 16:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313945 - 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: Sun, 19 Feb 2017 16:40:04 -0000 Author: mav Date: Sun Feb 19 16:40:03 2017 New Revision: 313945 URL: https://svnweb.freebsd.org/changeset/base/313945 Log: Remove broken remnants of obsolete INOT API. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Feb 19 16:28:46 2017 (r313944) +++ head/sys/dev/isp/isp_freebsd.c Sun Feb 19 16:40:03 2017 (r313945) @@ -3574,7 +3574,6 @@ isp_action(struct cam_sim *sim, union cc isp_disable_lun(isp, ccb); } break; - case XPT_IMMED_NOTIFY: case XPT_IMMEDIATE_NOTIFY: /* Add Immediate Notify Resource */ case XPT_ACCEPT_TARGET_IO: /* Add Accept Target IO Resource */ { @@ -3625,20 +3624,11 @@ isp_action(struct cam_sim *sim, union cc ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, ccb->ccb_h.path, "Put FREE INOT, (seq id 0x%x) count now %d\n", ccb->cin1.seq_id, tptr->inot_count); ccb->cin1.seq_id = 0; - } else if (ccb->ccb_h.func_code == XPT_IMMED_NOTIFY) { - tptr->inot_count++; - SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle); - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, ccb->ccb_h.path, "Put FREE INOT, (seq id 0x%x) count now %d\n", - ccb->cin1.seq_id, tptr->inot_count); - ccb->cin1.seq_id = 0; } rls_lun_statep(isp, tptr); ccb->ccb_h.status = CAM_REQ_INPROG; break; } - case XPT_NOTIFY_ACK: - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - break; case XPT_NOTIFY_ACKNOWLEDGE: /* notify ack */ { tstate_t *tptr; From owner-svn-src-all@freebsd.org Sun Feb 19 16:59: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 1D274CE5A73; Sun, 19 Feb 2017 16:59:02 +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 DB439188B; Sun, 19 Feb 2017 16:59:01 +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 v1JGx0qp089093; Sun, 19 Feb 2017 16:59:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JGx0gq089092; Sun, 19 Feb 2017 16:59:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702191659.v1JGx0gq089092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Feb 2017 16:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313946 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 16:59:02 -0000 Author: trasz Date: Sun Feb 19 16:59:00 2017 New Revision: 313946 URL: https://svnweb.freebsd.org/changeset/base/313946 Log: Make savecore(8) output nicer by specifying the maximum field width instead of minimum one (precision instead of width). MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Sun Feb 19 16:40:03 2017 (r313945) +++ head/sbin/savecore/savecore.c Sun Feb 19 16:59:00 2017 (r313946) @@ -651,7 +651,7 @@ DoFile(const char *savedir, const char * } if (kdhl.panicstring[0] != '\0') - syslog(LOG_ALERT, "reboot after panic: %*s", + syslog(LOG_ALERT, "reboot after panic: %.*s", (int)sizeof(kdhl.panicstring), kdhl.panicstring); else syslog(LOG_ALERT, "reboot"); From owner-svn-src-all@freebsd.org Sun Feb 19 17:17: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 A8DB5CE5F30; Sun, 19 Feb 2017 17:17:07 +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 7824AFA; Sun, 19 Feb 2017 17:17:07 +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 v1JHH6b0097050; Sun, 19 Feb 2017 17:17:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHH60R097049; Sun, 19 Feb 2017 17:17:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702191717.v1JHH60R097049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Feb 2017 17:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313947 - 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, 19 Feb 2017 17:17:07 -0000 Author: trasz Date: Sun Feb 19 17:17:06 2017 New Revision: 313947 URL: https://svnweb.freebsd.org/changeset/base/313947 Log: There are some Linux binaries that expect the system to obey the "addr" parameter to mmap(2), even if MAP_FIXED is not explicitly specified. Android ART is one example. Implement bug compatibility for this case in linuxulator. Reviewed by: dchagin@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9373 Modified: head/sys/compat/linux/linux_mmap.c Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Sun Feb 19 16:59:00 2017 (r313946) +++ head/sys/compat/linux/linux_mmap.c Sun Feb 19 17:17:06 2017 (r313947) @@ -203,8 +203,23 @@ linux_mmap_common(struct thread *td, uin } } - error = kern_mmap(td, addr, len, prot, bsd_flags, fd, pos); + /* + * FreeBSD is free to ignore the address hint if MAP_FIXED wasn't + * passed. However, some Linux applications, like the ART runtime, + * depend on the hint. If the MAP_FIXED wasn't passed, but the + * address is not zero, try with MAP_FIXED and MAP_EXCL first, + * and fall back to the normal behaviour if that fails. + */ + if (addr != 0 && (bsd_flags & MAP_FIXED) == 0 && + (bsd_flags & MAP_EXCL) == 0) { + error = kern_mmap(td, addr, len, prot, + bsd_flags | MAP_FIXED | MAP_EXCL, fd, pos); + if (error == 0) + goto out; + } + error = kern_mmap(td, addr, len, prot, bsd_flags, fd, pos); +out: LINUX_CTR2(mmap2, "return: %d (%p)", error, td->td_retval[0]); return (error); From owner-svn-src-all@freebsd.org Sun Feb 19 17:23: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 10F8DCE2176; Sun, 19 Feb 2017 17:23:29 +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 C9FBC8C9; Sun, 19 Feb 2017 17:23:28 +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 v1JHNRI2001239; Sun, 19 Feb 2017 17:23:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHNRoP001238; Sun, 19 Feb 2017 17:23:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702191723.v1JHNRoP001238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 19 Feb 2017 17:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313948 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:23:29 -0000 Author: emaste Date: Sun Feb 19 17:23:27 2017 New Revision: 313948 URL: https://svnweb.freebsd.org/changeset/base/313948 Log: bsdgrep: fix EOF handling with --mmap Rework part of the loop in grep_fgetln to return the rest of the line and ensure that we still advance the buffer by the length of the rest of the line. PR: 165471 Submitted by: Kyle Evans MFC after: 1 month Modified: head/usr.bin/grep/file.c Modified: head/usr.bin/grep/file.c ============================================================================== --- head/usr.bin/grep/file.c Sun Feb 19 17:17:06 2017 (r313947) +++ head/usr.bin/grep/file.c Sun Feb 19 17:23:27 2017 (r313948) @@ -219,12 +219,18 @@ grep_fgetln(struct file *f, size_t *lenp if (bufrem == 0) /* EOF: return partial line */ break; - if ((p = memchr(bufpos, '\n', bufrem)) == NULL) + if ((p = memchr(bufpos, '\n', bufrem)) == NULL && + filebehave != FILE_MMAP) continue; - /* got it: finish up the line (like code above) */ - ++p; - diff = p - bufpos; - len += diff; + if (p == NULL) { + /* mmap EOF: return partial line, consume buffer */ + diff = len; + } else { + /* got it: finish up the line (like code above) */ + ++p; + diff = p - bufpos; + len += diff; + } if (grep_lnbufgrow(len)) goto error; memcpy(lnbuf + off, bufpos, diff); From owner-svn-src-all@freebsd.org Sun Feb 19 17:28: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 6AB97CE240B; Sun, 19 Feb 2017 17:28:01 +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 3841FC09; Sun, 19 Feb 2017 17:28:01 +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 v1JHS00U001455; Sun, 19 Feb 2017 17:28:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHRxdq001437; Sun, 19 Feb 2017 17:27:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702191727.v1JHRxdq001437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Feb 2017 17:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313949 - in head/sys: cam/scsi dev/advansys dev/aha dev/ahci dev/arcmsr dev/ata dev/buslogic dev/hptmv dev/mvs dev/ncr dev/nvme dev/siis dev/sym dev/trm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:28:01 -0000 Author: mav Date: Sun Feb 19 17:27:58 2017 New Revision: 313949 URL: https://svnweb.freebsd.org/changeset/base/313949 Log: Remove dead mentions of CAM target mode APIs from drivers. This makes grepping kernel for target mode implementation much easier. Modified: head/sys/cam/scsi/scsi_low.c head/sys/dev/advansys/advansys.c head/sys/dev/aha/aha.c head/sys/dev/ahci/ahci.c head/sys/dev/arcmsr/arcmsr.c head/sys/dev/ata/ata-all.c head/sys/dev/buslogic/bt.c head/sys/dev/hptmv/entry.c head/sys/dev/mvs/mvs.c head/sys/dev/ncr/ncr.c head/sys/dev/nvme/nvme_sim.c head/sys/dev/siis/siis.c head/sys/dev/sym/sym_hipd.c head/sys/dev/trm/trm.c Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/cam/scsi/scsi_low.c Sun Feb 19 17:27:58 2017 (r313949) @@ -479,15 +479,6 @@ scsi_low_scsi_action_cam(sim, ccb) #endif /* SCSI_LOW_DEBUG */ break; - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ - /* XXX Implement */ - ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); - break; - case XPT_ABORT: /* Abort the specified CCB */ #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD) Modified: head/sys/dev/advansys/advansys.c ============================================================================== --- head/sys/dev/advansys/advansys.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/advansys/advansys.c Sun Feb 19 17:27:58 2017 (r313949) @@ -232,10 +232,6 @@ adv_action(struct cam_sim *sim, union cc break; } case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ - case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/aha/aha.c ============================================================================== --- head/sys/dev/aha/aha.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/aha/aha.c Sun Feb 19 17:27:58 2017 (r313949) @@ -831,10 +831,6 @@ ahaaction(struct cam_sim *sim, union ccb } break; } - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/ahci/ahci.c Sun Feb 19 17:27:58 2017 (r313949) @@ -2578,10 +2578,6 @@ ahciaction(struct cam_sim *sim, union cc } ahci_begin_transaction(ch, ccb); return; - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/arcmsr/arcmsr.c Sun Feb 19 17:27:58 2017 (r313949) @@ -2883,12 +2883,6 @@ static void arcmsr_action(struct cam_sim } break; } - case XPT_TARGET_IO: { - /* target mode not yet support vendor specific commands. */ - pccb->ccb_h.status |= CAM_REQ_CMP; - xpt_done(pccb); - break; - } case XPT_PATH_INQ: { struct ccb_pathinq *cpi = &pccb->cpi; @@ -2938,7 +2932,6 @@ static void arcmsr_action(struct cam_sim pabort_ccb = pccb->cab.abort_ccb; switch (pabort_ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: - case XPT_IMMED_NOTIFY: case XPT_CONT_TARGET_IO: if(arcmsr_seek_cmd2abort(pabort_ccb)==TRUE) { pabort_ccb->ccb_h.status |= CAM_REQ_ABORTED; Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/ata/ata-all.c Sun Feb 19 17:27:58 2017 (r313949) @@ -1013,10 +1013,6 @@ ataaction(struct cam_sim *sim, union ccb } ata_cam_begin_transaction(dev, ccb); return; - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/buslogic/bt.c ============================================================================== --- head/sys/dev/buslogic/bt.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/buslogic/bt.c Sun Feb 19 17:27:58 2017 (r313949) @@ -1217,10 +1217,6 @@ btaction(struct cam_sim *sim, union ccb } break; } - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/hptmv/entry.c Sun Feb 19 17:27:58 2017 (r313949) @@ -2289,10 +2289,6 @@ hpt_action(struct cam_sim *sim, union cc break; case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/mvs/mvs.c Sun Feb 19 17:27:58 2017 (r313949) @@ -2288,10 +2288,6 @@ mvsaction(struct cam_sim *sim, union ccb } mvs_begin_transaction(dev, ccb); return; - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/ncr/ncr.c ============================================================================== --- head/sys/dev/ncr/ncr.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/ncr/ncr.c Sun Feb 19 17:27:58 2017 (r313949) @@ -4152,10 +4152,6 @@ ncr_action (struct cam_sim *sim, union c break; } case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/nvme/nvme_sim.c Sun Feb 19 17:27:58 2017 (r313949) @@ -143,10 +143,6 @@ nvme_sim_action(struct cam_sim *sim, uni */ /*FALLTHROUGH*/ case XPT_ABORT: /* Abort the specified CCB */ - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ /* * Only target mode generates these, and only for SCSI. They are * all invalid/unsupported for NVMe. Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/siis/siis.c Sun Feb 19 17:27:58 2017 (r313949) @@ -1835,10 +1835,6 @@ siisaction(struct cam_sim *sim, union cc } siis_begin_transaction(dev, ccb); return; - case XPT_EN_LUN: /* Enable LUN as a target */ - case XPT_TARGET_IO: /* Execute target I/O request */ - case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ - case XPT_CONT_TARGET_IO: /* Continue Host Target I/O Connection*/ case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; Modified: head/sys/dev/sym/sym_hipd.c ============================================================================== --- head/sys/dev/sym/sym_hipd.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/sym/sym_hipd.c Sun Feb 19 17:27:58 2017 (r313949) @@ -8090,11 +8090,6 @@ static void sym_action2(struct cam_sim * sym_init (np, 1); sym_xpt_done2(np, ccb, CAM_REQ_CMP); break; - case XPT_ACCEPT_TARGET_IO: - case XPT_CONT_TARGET_IO: - case XPT_EN_LUN: - case XPT_NOTIFY_ACK: - case XPT_IMMED_NOTIFY: case XPT_TERM_IO: default: sym_xpt_done2(np, ccb, CAM_REQ_INVALID); Modified: head/sys/dev/trm/trm.c ============================================================================== --- head/sys/dev/trm/trm.c Sun Feb 19 17:23:27 2017 (r313948) +++ head/sys/dev/trm/trm.c Sun Feb 19 17:27:58 2017 (r313949) @@ -543,11 +543,6 @@ trm_action(struct cam_sim *psim, union c target_lun = pccb->ccb_h.target_lun; switch (pccb->ccb_h.func_code) { - case XPT_NOOP: - TRM_DPRINTF(" XPT_NOOP \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; /* * Execute the requested I/O operation */ @@ -623,16 +618,6 @@ trm_action(struct cam_sim *psim, union c } break; } - case XPT_GDEV_TYPE: - TRM_DPRINTF(" XPT_GDEV_TYPE \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - case XPT_GDEVLIST: - TRM_DPRINTF(" XPT_GDEVLIST \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; /* * Path routing inquiry * Path Inquiry CCB @@ -661,76 +646,33 @@ trm_action(struct cam_sim *psim, union c cpi->protocol_version = SCSI_REV_2; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(pccb); - } break; + } /* - * Release a frozen SIM queue - * Release SIM Queue + * XPT_ABORT = 0x10, Abort the specified CCB + * Abort XPT request CCB */ - case XPT_REL_SIMQ: - TRM_DPRINTF(" XPT_REL_SIMQ \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Set Asynchronous Callback Parameters - * Set Asynchronous Callback CCB - */ - case XPT_SASYNC_CB: - TRM_DPRINTF(" XPT_SASYNC_CB \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Set device type information - * Set Device Type CCB - */ - case XPT_SDEV_TYPE: - TRM_DPRINTF(" XPT_SDEV_TYPE \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Get EDT entries matching the given pattern - */ - case XPT_DEV_MATCH: - TRM_DPRINTF(" XPT_DEV_MATCH \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Turn on debugging for a bus, target or lun - */ - case XPT_DEBUG: - TRM_DPRINTF(" XPT_DEBUG \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * XPT_ABORT = 0x10, Abort the specified CCB - * Abort XPT request CCB - */ case XPT_ABORT: TRM_DPRINTF(" XPT_ABORT \n"); pccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(pccb); break; /* - * Reset the specified SCSI bus - * Reset SCSI Bus CCB - */ - case XPT_RESET_BUS: { + * Reset the specified SCSI bus + * Reset SCSI Bus CCB + */ + case XPT_RESET_BUS: { int i; TRM_DPRINTF(" XPT_RESET_BUS \n"); - trm_reset(pACB); + trm_reset(pACB); pACB->ACBFlag=0; for (i=0; i<500; i++) DELAY(1000); pccb->ccb_h.status = CAM_REQ_CMP; xpt_done(pccb); - } break; + } /* * Bus Device Reset the specified SCSI device * Reset SCSI Device CCB @@ -929,92 +871,6 @@ trm_action(struct cam_sim *psim, union c cam_calc_geometry(&pccb->ccg, /*extended*/1); xpt_done(pccb); break; - case XPT_ENG_INQ: - TRM_DPRINTF(" XPT_ENG_INQ \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * HBA execute engine request - * This structure must match SCSIIO size - */ - case XPT_ENG_EXEC: - TRM_DPRINTF(" XPT_ENG_EXEC \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * XPT_EN_LUN = 0x30, Enable LUN as a target - * Target mode structures. - */ - case XPT_EN_LUN: - /* - * Don't (yet?) support vendor - * specific commands. - */ - TRM_DPRINTF(" XPT_EN_LUN \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Execute target I/O request - */ - case XPT_TARGET_IO: - /* - * Don't (yet?) support vendor - * specific commands. - */ - TRM_DPRINTF(" XPT_TARGET_IO \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Accept Host Target Mode CDB - */ - case XPT_ACCEPT_TARGET_IO: - /* - * Don't (yet?) support vendor - * specific commands. - */ - TRM_DPRINTF(" XPT_ACCEPT_TARGET_IO \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Continue Host Target I/O Connection - */ - case XPT_CONT_TARGET_IO: - /* - * Don't (yet?) support vendor - * specific commands. - */ - TRM_DPRINTF(" XPT_CONT_TARGET_IO \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Notify Host Target driver of event - */ - case XPT_IMMED_NOTIFY: - TRM_DPRINTF(" XPT_IMMED_NOTIFY \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * Acknowledgement of event - */ - case XPT_NOTIFY_ACK: - TRM_DPRINTF(" XPT_NOTIFY_ACK \n"); - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; - /* - * XPT_VUNIQUE = 0x80 - */ - case XPT_VUNIQUE: - pccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(pccb); - break; default: pccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(pccb); From owner-svn-src-all@freebsd.org Sun Feb 19 17: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 383F8CE258C; Sun, 19 Feb 2017 17:31: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 F07281033; Sun, 19 Feb 2017 17:31:54 +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 v1JHVsJ5002388; Sun, 19 Feb 2017 17:31:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHVrYc002379; Sun, 19 Feb 2017 17:31:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191731.v1JHVrYc002379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313950 - in vendor/libucl/dist: . include lua src 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, 19 Feb 2017 17:31:55 -0000 Author: bapt Date: Sun Feb 19 17:31:53 2017 New Revision: 313950 URL: https://svnweb.freebsd.org/changeset/base/313950 Log: Import libucl snapshot 20170219 Modified: vendor/libucl/dist/ChangeLog.md vendor/libucl/dist/README.md vendor/libucl/dist/configure.ac vendor/libucl/dist/include/ucl.h vendor/libucl/dist/lua/lua_ucl.c vendor/libucl/dist/src/ucl_emitter_utils.c vendor/libucl/dist/src/ucl_internal.h vendor/libucl/dist/src/ucl_parser.c vendor/libucl/dist/src/ucl_util.c Modified: vendor/libucl/dist/ChangeLog.md ============================================================================== --- vendor/libucl/dist/ChangeLog.md Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/ChangeLog.md Sun Feb 19 17:31:53 2017 (r313950) @@ -35,7 +35,7 @@ ### Libucl 0.7.3 -- Fixed a bug with macroes that come after an empty object +- Fixed a bug with macros that come after an empty object - Fixed a bug in include processing when an incorrect variable has been destroyed (use-after-free) ### Libucl 0.8.0 Modified: vendor/libucl/dist/README.md ============================================================================== --- vendor/libucl/dist/README.md Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/README.md Sun Feb 19 17:31:53 2017 (r313950) @@ -1,6 +1,8 @@ # LIBUCL -[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138)[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl) +[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) +[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* @@ -217,8 +219,8 @@ Multiline comments may be nested: UCL supports external macros both multiline and single line ones: ```nginx -.macro "sometext"; -.macro { +.macro_name "sometext"; +.macro_name { Some long text .... }; @@ -229,12 +231,12 @@ arguments themselves are the UCL object options: ```nginx -.macro(param=value) "something"; -.macro(param={key=value}) "something"; -.macro(.include "params.conf") "something"; -.macro(#this is multiline macro +.macro_name(param=value) "something"; +.macro_name(param={key=value}) "something"; +.macro_name(.include "params.conf") "something"; +.macro_name(#this is multiline macro param = [value1, value2]) "something"; -.macro(key="()") "something"; +.macro_name(key="()") "something"; ``` UCL also provide a convenient `include` macro to load content from another files Modified: vendor/libucl/dist/configure.ac ============================================================================== --- vendor/libucl/dist/configure.ac Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/configure.ac Sun Feb 19 17:31:53 2017 (r313950) @@ -39,6 +39,7 @@ AC_CHECK_HEADERS_ONCE([stdarg.h]) AC_CHECK_HEADERS_ONCE([stdbool.h]) AC_CHECK_HEADERS_ONCE([stdint.h]) AC_CHECK_HEADERS_ONCE([string.h]) +AC_CHECK_HEADERS_ONCE([strings.h]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS_ONCE([ctype.h]) AC_CHECK_HEADERS_ONCE([errno.h]) Modified: vendor/libucl/dist/include/ucl.h ============================================================================== --- vendor/libucl/dist/include/ucl.h Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/include/ucl.h Sun Feb 19 17:31:53 2017 (r313950) @@ -154,7 +154,8 @@ typedef enum ucl_parser_flags { UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */ UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */ UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */ - UCL_PARSER_DISABLE_MACRO = (1 << 5) /** Treat macros as comments */ + UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */ + UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */ } ucl_parser_flags_t; /** @@ -205,7 +206,8 @@ enum ucl_duplicate_strategy { enum ucl_parse_type { UCL_PARSE_UCL = 0, /**< Default ucl format */ UCL_PARSE_MSGPACK, /**< Message pack input format */ - UCL_PARSE_CSEXP /**< Canonical S-expressions */ + UCL_PARSE_CSEXP, /**< Canonical S-expressions */ + UCL_PARSE_AUTO /**< Try to detect parse type */ }; /** @@ -227,7 +229,7 @@ typedef struct ucl_object_s { const char *key; /**< Key of an object */ struct ucl_object_s *next; /**< Array handle */ struct ucl_object_s *prev; /**< Array handle */ - uint32_t keylen; /**< Lenght of a key */ + uint32_t keylen; /**< Length of a key */ uint32_t len; /**< Size of an object */ uint32_t ref; /**< Reference count */ uint16_t flags; /**< Object flags */ @@ -831,10 +833,29 @@ UCL_EXTERN ucl_object_iter_t ucl_object_ * Get the next object from the `obj`. This fucntion iterates over arrays, objects * and implicit arrays * @param iter safe iterator + * @param expand_values expand explicit arrays and objects * @return the next object in sequence */ UCL_EXTERN const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t iter, bool expand_values); +/** + * Iteration type enumerator + */ +enum ucl_iterate_type { + UCL_ITERATE_EXPLICIT = 1 << 0, /**< Iterate just explicit arrays and objects */ + UCL_ITERATE_IMPLICIT = 1 << 1, /**< Iterate just implicit arrays */ + UCL_ITERATE_BOTH = (1 << 0) | (1 << 1), /**< Iterate both explicit and implicit arrays*/ +}; + +/** + * Get the next object from the `obj`. This fucntion iterates over arrays, objects + * and implicit arrays if needed + * @param iter safe iterator + * @param + * @return the next object in sequence + */ +UCL_EXTERN const ucl_object_t* ucl_object_iterate_full (ucl_object_iter_t iter, + enum ucl_iterate_type type); /** * Free memory associated with the safe iterator @@ -1016,6 +1037,7 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1025,6 +1047,7 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1069,6 +1092,21 @@ UCL_EXTERN bool ucl_parser_add_fd_priori int fd, unsigned priority); /** + * Load and add data from a file descriptor + * @param parser parser structure + * @param filename the name of file + * @param err if *err is NULL it is set to parser error + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Provide a UCL_ARRAY of paths to search for include files. The object is * copied so caller must unref the object. * @param parser parser structure Modified: vendor/libucl/dist/lua/lua_ucl.c ============================================================================== --- vendor/libucl/dist/lua/lua_ucl.c Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/lua/lua_ucl.c Sun Feb 19 17:31:53 2017 (r313950) @@ -29,7 +29,6 @@ #include "ucl_internal.h" #include "lua_ucl.h" #include -#include /*** * @module ucl @@ -187,6 +186,8 @@ ucl_object_lua_push_array (lua_State *L, lua_rawseti (L, -2, i); i ++; } + + ucl_object_iterate_free (it); } else { /* Optimize allocation by preallocation of table */ @@ -482,7 +483,7 @@ static int lua_ucl_parser_init (lua_State *L) { struct ucl_parser *parser, **pparser; - int flags = 0; + int flags = UCL_PARSER_NO_FILEVARS; if (lua_gettop (L) >= 1) { flags = lua_tonumber (L, 1); @@ -524,6 +525,27 @@ lua_ucl_push_opaque (lua_State *L, ucl_o lua_setmetatable (L, -2); } +static inline enum ucl_parse_type +lua_ucl_str_to_parse_type (const char *str) +{ + enum ucl_parse_type type = UCL_PARSE_UCL; + + if (str != NULL) { + if (strcasecmp (str, "msgpack") == 0) { + type = UCL_PARSE_MSGPACK; + } + else if (strcasecmp (str, "sexp") == 0 || + strcasecmp (str, "csexp") == 0) { + type = UCL_PARSE_CSEXP; + } + else if (strcasecmp (str, "auto") == 0) { + type = UCL_PARSE_AUTO; + } + } + + return type; +} + /*** * @method parser:parse_file(name) * Parse UCL object from file. @@ -579,13 +601,19 @@ lua_ucl_parser_parse_string (lua_State * struct ucl_parser *parser; const char *string; size_t llen; + enum ucl_parse_type type = UCL_PARSE_UCL; int ret = 2; parser = lua_ucl_parser_get (L, 1); string = luaL_checklstring (L, 2, &llen); + if (lua_type (L, 3) == LUA_TSTRING) { + type = lua_ucl_str_to_parse_type (lua_tostring (L, 3)); + } + if (parser != NULL && string != NULL) { - if (ucl_parser_add_chunk (parser, (const unsigned char *)string, llen)) { + if (ucl_parser_add_chunk_full (parser, (const unsigned char *)string, + llen, 0, UCL_DUPLICATE_APPEND, type)) { lua_pushboolean (L, true); ret = 1; } @@ -761,6 +789,28 @@ lua_ucl_object_unwrap (lua_State *L) return 1; } +static inline enum ucl_emitter +lua_ucl_str_to_emit_type (const char *strtype) +{ + enum ucl_emitter format = UCL_EMIT_JSON_COMPACT; + + if (strcasecmp (strtype, "json") == 0) { + format = UCL_EMIT_JSON; + } + else if (strcasecmp (strtype, "json-compact") == 0) { + format = UCL_EMIT_JSON_COMPACT; + } + else if (strcasecmp (strtype, "yaml") == 0) { + format = UCL_EMIT_YAML; + } + else if (strcasecmp (strtype, "config") == 0 || + strcasecmp (strtype, "ucl") == 0) { + format = UCL_EMIT_CONFIG; + } + + return format; +} + /*** * @method object:tostring(type) * Unwraps opaque ucl object to string (json by default). Optionally you can @@ -787,19 +837,7 @@ lua_ucl_object_tostring (lua_State *L) if (lua_type (L, 2) == LUA_TSTRING) { const char *strtype = lua_tostring (L, 2); - if (strcasecmp (strtype, "json") == 0) { - format = UCL_EMIT_JSON; - } - else if (strcasecmp (strtype, "json-compact") == 0) { - format = UCL_EMIT_JSON_COMPACT; - } - else if (strcasecmp (strtype, "yaml") == 0) { - format = UCL_EMIT_YAML; - } - else if (strcasecmp (strtype, "config") == 0 || - strcasecmp (strtype, "ucl") == 0) { - format = UCL_EMIT_CONFIG; - } + format = lua_ucl_str_to_emit_type (strtype); } } @@ -1088,6 +1126,9 @@ lua_ucl_to_format (lua_State *L) strcasecmp (strtype, "ucl") == 0) { format = UCL_EMIT_CONFIG; } + else if (strcasecmp (strtype, "msgpack") == 0) { + format = UCL_EMIT_MSGPACK; + } } } Modified: vendor/libucl/dist/src/ucl_emitter_utils.c ============================================================================== --- vendor/libucl/dist/src/ucl_emitter_utils.c Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/src/ucl_emitter_utils.c Sun Feb 19 17:31:53 2017 (r313950) @@ -102,7 +102,7 @@ ucl_elt_string_write_json (const char *s func->ucl_emitter_append_character ('"', 1, func->ud); while (size) { - if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE)) { + if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE|UCL_CHARACTER_DENIED)) { if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } @@ -128,6 +128,10 @@ ucl_elt_string_write_json (const char *s case '"': func->ucl_emitter_append_len ("\\\"", 2, func->ud); break; + default: + /* Emit unicode unknown character */ + func->ucl_emitter_append_len ("\\uFFFD", 5, func->ud); + break; } len = 0; c = ++p; @@ -138,9 +142,11 @@ ucl_elt_string_write_json (const char *s } size --; } + if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } + func->ucl_emitter_append_character ('"', 1, func->ud); } Modified: vendor/libucl/dist/src/ucl_internal.h ============================================================================== --- vendor/libucl/dist/src/ucl_internal.h Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/src/ucl_internal.h Sun Feb 19 17:31:53 2017 (r313950) @@ -87,6 +87,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "utlist.h" #include "utstring.h" @@ -127,19 +130,19 @@ enum ucl_parser_state { }; enum ucl_character_type { - UCL_CHARACTER_DENIED = 0, - UCL_CHARACTER_KEY = 1, - UCL_CHARACTER_KEY_START = 1 << 1, - UCL_CHARACTER_WHITESPACE = 1 << 2, - UCL_CHARACTER_WHITESPACE_UNSAFE = 1 << 3, - UCL_CHARACTER_VALUE_END = 1 << 4, - UCL_CHARACTER_VALUE_STR = 1 << 5, - UCL_CHARACTER_VALUE_DIGIT = 1 << 6, - UCL_CHARACTER_VALUE_DIGIT_START = 1 << 7, - UCL_CHARACTER_ESCAPE = 1 << 8, - UCL_CHARACTER_KEY_SEP = 1 << 9, - UCL_CHARACTER_JSON_UNSAFE = 1 << 10, - UCL_CHARACTER_UCL_UNSAFE = 1 << 11 + UCL_CHARACTER_DENIED = (1 << 0), + UCL_CHARACTER_KEY = (1 << 1), + UCL_CHARACTER_KEY_START = (1 << 2), + UCL_CHARACTER_WHITESPACE = (1 << 3), + UCL_CHARACTER_WHITESPACE_UNSAFE = (1 << 4), + UCL_CHARACTER_VALUE_END = (1 << 5), + UCL_CHARACTER_VALUE_STR = (1 << 6), + UCL_CHARACTER_VALUE_DIGIT = (1 << 7), + UCL_CHARACTER_VALUE_DIGIT_START = (1 << 8), + UCL_CHARACTER_ESCAPE = (1 << 9), + UCL_CHARACTER_KEY_SEP = (1 << 10), + UCL_CHARACTER_JSON_UNSAFE = (1 << 11), + UCL_CHARACTER_UCL_UNSAFE = (1 << 12) }; struct ucl_macro { @@ -568,4 +571,6 @@ bool ucl_parser_process_object_element ( */ bool ucl_parse_msgpack (struct ucl_parser *parser); +bool ucl_parse_csexp (struct ucl_parser *parser); + #endif /* UCL_INTERNAL_H_ */ Modified: vendor/libucl/dist/src/ucl_parser.c ============================================================================== --- vendor/libucl/dist/src/ucl_parser.c Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/src/ucl_parser.c Sun Feb 19 17:31:53 2017 (r313950) @@ -2469,8 +2469,10 @@ ucl_parser_new (int flags) parser->comments = ucl_object_typed_new (UCL_OBJECT); } - /* Initial assumption about filevars */ - ucl_parser_set_filevars (parser, NULL, false); + if (!(flags & UCL_PARSER_NO_FILEVARS)) { + /* Initial assumption about filevars */ + ucl_parser_set_filevars (parser, NULL, false); + } return parser; } @@ -2617,6 +2619,19 @@ ucl_parser_add_chunk_full (struct ucl_pa return false; } + if (parse_type == UCL_PARSE_AUTO && len > 0) { + /* We need to detect parse type by the first symbol */ + if ((*data & 0x80) == 0x80 && (*data >= 0xdc && *data <= 0xdf)) { + parse_type = UCL_PARSE_MSGPACK; + } + else if (*data == '(') { + parse_type = UCL_PARSE_CSEXP; + } + else { + parse_type = UCL_PARSE_UCL; + } + } + chunk->begin = data; chunk->remain = len; chunk->pos = chunk->begin; @@ -2643,6 +2658,8 @@ ucl_parser_add_chunk_full (struct ucl_pa return ucl_state_machine (parser); case UCL_PARSE_MSGPACK: return ucl_parse_msgpack (parser); + case UCL_PARSE_CSEXP: + return ucl_parse_csexp (parser); } } else { Modified: vendor/libucl/dist/src/ucl_util.c ============================================================================== --- vendor/libucl/dist/src/ucl_util.c Sun Feb 19 17:27:58 2017 (r313949) +++ vendor/libucl/dist/src/ucl_util.c Sun Feb 19 17:31:53 2017 (r313950) @@ -26,11 +26,17 @@ #include "ucl_internal.h" #include "ucl_chartable.h" #include "kvec.h" +#include #include #include /* for snprintf */ #ifndef _WIN32 #include +#include +#else +#ifndef NBBY +#define NBBY 8 +#endif #endif #ifdef HAVE_LIBGEN_H @@ -81,11 +87,6 @@ typedef kvec_t(ucl_object_t *) ucl_array #define MAP_FAILED ((void *) -1) #endif -#ifdef _WIN32 -#include -#define NBBY CHAR_BIT -#endif - static void *ucl_mmap(char *addr, size_t length, int prot, int access, int fd, off_t offset) { void *map = NULL; @@ -1854,9 +1855,11 @@ ucl_parser_add_file (struct ucl_parser * UCL_PARSE_UCL); } + bool -ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, - unsigned priority) +ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type) { unsigned char *buf; size_t len; @@ -1882,7 +1885,8 @@ ucl_parser_add_fd_priority (struct ucl_p } parser->cur_file = NULL; len = st.st_size; - ret = ucl_parser_add_chunk_priority (parser, buf, len, priority); + ret = ucl_parser_add_chunk_full (parser, buf, len, priority, strat, + parse_type); if (len > 0) { ucl_munmap (buf, len); @@ -1892,6 +1896,18 @@ ucl_parser_add_fd_priority (struct ucl_p } bool +ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, + unsigned priority) +{ + if (parser == NULL) { + return false; + } + + return ucl_parser_add_fd_full(parser, fd, parser->default_priority, + UCL_DUPLICATE_APPEND, UCL_PARSE_UCL); +} + +bool ucl_parser_add_fd (struct ucl_parser *parser, int fd) { if (parser == NULL) { @@ -2488,6 +2504,10 @@ ucl_object_iterate_reset (ucl_object_ite UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + rit->impl_it = obj; rit->expl_it = NULL; @@ -2497,6 +2517,13 @@ ucl_object_iterate_reset (ucl_object_ite const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t it, bool expand_values) { + return ucl_object_iterate_full (it, expand_values ? UCL_ITERATE_BOTH : + UCL_ITERATE_IMPLICIT); +} + +const ucl_object_t* +ucl_object_iterate_full (ucl_object_iter_t it, enum ucl_iterate_type type) +{ struct ucl_object_safe_iter *rit = UCL_SAFE_ITER (it); const ucl_object_t *ret = NULL; @@ -2509,21 +2536,23 @@ ucl_object_iterate_safe (ucl_object_iter if (rit->impl_it->type == UCL_OBJECT || rit->impl_it->type == UCL_ARRAY) { ret = ucl_object_iterate (rit->impl_it, &rit->expl_it, true); - if (ret == NULL) { + if (ret == NULL && (type & UCL_ITERATE_IMPLICIT)) { /* Need to switch to another implicit object in chain */ rit->impl_it = rit->impl_it->next; rit->expl_it = NULL; - return ucl_object_iterate_safe (it, expand_values); + + return ucl_object_iterate_safe (it, type); } } else { /* Just iterate over the implicit array */ ret = rit->impl_it; rit->impl_it = rit->impl_it->next; - if (expand_values) { + + if (type & UCL_ITERATE_EXPLICIT) { /* We flatten objects if need to expand values */ if (ret->type == UCL_OBJECT || ret->type == UCL_ARRAY) { - return ucl_object_iterate_safe (it, expand_values); + return ucl_object_iterate_safe (it, type); } } } @@ -2538,6 +2567,10 @@ ucl_object_iterate_free (ucl_object_iter UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + UCL_FREE (sizeof (*rit), it); } From owner-svn-src-all@freebsd.org Sun Feb 19 17:32: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 D3321CE2724; Sun, 19 Feb 2017 17:32:22 +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 6FD6A11AA; Sun, 19 Feb 2017 17:32:22 +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 v1JHWLuw003125; Sun, 19 Feb 2017 17:32:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHWL2U003120; Sun, 19 Feb 2017 17:32:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191732.v1JHWL2U003120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313951 - in vendor/libucl/20170219: . include lua src 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, 19 Feb 2017 17:32:22 -0000 Author: bapt Date: Sun Feb 19 17:32:21 2017 New Revision: 313951 URL: https://svnweb.freebsd.org/changeset/base/313951 Log: Tag import of libucl 20170219 Added: vendor/libucl/20170219/ - copied from r313949, vendor/libucl/dist/ Replaced: vendor/libucl/20170219/ChangeLog.md - copied unchanged from r313950, vendor/libucl/dist/ChangeLog.md vendor/libucl/20170219/README.md - copied unchanged from r313950, vendor/libucl/dist/README.md vendor/libucl/20170219/configure.ac - copied unchanged from r313950, vendor/libucl/dist/configure.ac vendor/libucl/20170219/include/ucl.h - copied unchanged from r313950, vendor/libucl/dist/include/ucl.h vendor/libucl/20170219/lua/lua_ucl.c - copied unchanged from r313950, vendor/libucl/dist/lua/lua_ucl.c vendor/libucl/20170219/src/ucl_emitter_utils.c - copied unchanged from r313950, vendor/libucl/dist/src/ucl_emitter_utils.c vendor/libucl/20170219/src/ucl_internal.h - copied unchanged from r313950, vendor/libucl/dist/src/ucl_internal.h vendor/libucl/20170219/src/ucl_parser.c - copied unchanged from r313950, vendor/libucl/dist/src/ucl_parser.c vendor/libucl/20170219/src/ucl_util.c - copied unchanged from r313950, vendor/libucl/dist/src/ucl_util.c Copied: vendor/libucl/20170219/ChangeLog.md (from r313950, vendor/libucl/dist/ChangeLog.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20170219/ChangeLog.md Sun Feb 19 17:32:21 2017 (r313951, copy of r313950, vendor/libucl/dist/ChangeLog.md) @@ -0,0 +1,67 @@ +# Version history + +## Libucl 0.5 + +- Streamline emitter has been added, so it is now possible to output partial `ucl` objects +- Emitter now is more flexible due to emitter_context structure + +### 0.5.1 +- Fixed number of bugs and memory leaks + +### 0.5.2 + +- Allow userdata objects to be emitted and destructed +- Use userdata objects to store lua function references + +### Libucl 0.6 + +- Reworked macro interface + +### Libucl 0.6.1 + +- Various utilities fixes + +### Libucl 0.7.0 + +- Move to klib library from uthash to reduce memory overhead and increase performance + +### Libucl 0.7.1 + +- Added safe iterators API + +### Libucl 0.7.2 + +- Fixed serious bugs in schema and arrays iteration + +### Libucl 0.7.3 + +- Fixed a bug with macros that come after an empty object +- Fixed a bug in include processing when an incorrect variable has been destroyed (use-after-free) + +### Libucl 0.8.0 + +- Allow to save comments and macros when parsing UCL documents +- C++ API +- Python bindings (by Eitan Adler) +- Add msgpack support for parser and emitter +- Add Canonical S-expressions parser for libucl +- CLI interface for parsing and validation (by Maxim Ignatenko) +- Implement include with priority +- Add 'nested' functionality to .include macro (by Allan Jude) +- Allow searching an array of paths for includes (by Allan Jude) +- Add new .load macro (by Allan Jude) +- Implement .inherit macro (#100) +- Add merge strategies +- Add schema validation to lua API +- Add support for external references to schema validation +- Add coveralls integration to libucl +- Implement tests for 80% of libucl code lines +- Fix tonns of minor and major bugs +- Improve documentation +- Rework function names to the common conventions (old names are preserved for backwards compatibility) +- Add Coverity scan integration +- Add fuzz tests + +**Incompatible changes**: + +- `ucl_object_emit_full` now accepts additional argument `comments` that could be used to emit comments with UCL output \ No newline at end of file Copied: vendor/libucl/20170219/README.md (from r313950, vendor/libucl/dist/README.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20170219/README.md Sun Feb 19 17:32:21 2017 (r313951, copy of r313950, vendor/libucl/dist/README.md) @@ -0,0 +1,384 @@ +# LIBUCL + +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl) +[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) +[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Introduction](#introduction) +- [Basic structure](#basic-structure) +- [Improvements to the json notation](#improvements-to-the-json-notation) + - [General syntax sugar](#general-syntax-sugar) + - [Automatic arrays creation](#automatic-arrays-creation) + - [Named keys hierarchy](#named-keys-hierarchy) + - [Convenient numbers and booleans](#convenient-numbers-and-booleans) +- [General improvements](#general-improvements) + - [Comments](#comments) + - [Macros support](#macros-support) + - [Variables support](#variables-support) + - [Multiline strings](#multiline-strings) +- [Emitter](#emitter) +- [Validation](#validation) +- [Performance](#performance) +- [Conclusion](#conclusion) + +## Introduction + +This document describes the main features and principles of the configuration +language called `UCL` - universal configuration language. + +If you are looking for the libucl API documentation you can find it at [this page](doc/api.md). + +## Basic structure + +UCL is heavily infused by `nginx` configuration as the example of a convenient configuration +system. However, UCL is fully compatible with `JSON` format and is able to parse json files. +For example, you can write the same configuration in the following ways: + +* in nginx like: + +```nginx +param = value; +section { + param = value; + param1 = value1; + flag = true; + number = 10k; + time = 0.2s; + string = "something"; + subsection { + host = { + host = "hostname"; + port = 900; + } + host = { + host = "hostname"; + port = 901; + } + } +} +``` + +* or in JSON: + +```json +{ + "param": "value", + "param1": "value1", + "flag": true, + "subsection": { + "host": [ + { + "host": "hostname", + "port": 900 + }, + { + "host": "hostname", + "port": 901 + } + ] + } +} +``` + +## Improvements to the json notation. + +There are various things that make ucl configuration more convenient for editing than strict json: + +### General syntax sugar + +* Braces are not necessary to enclose a top object: it is automatically treated as an object: + +```json +"key": "value" +``` +is equal to: +```json +{"key": "value"} +``` + +* There is no requirement of quotes for strings and keys, moreover, `:` may be replaced `=` or even be skipped for objects: + +```nginx +key = value; +section { + key = value; +} +``` +is equal to: +```json +{ + "key": "value", + "section": { + "key": "value" + } +} +``` + +* No commas mess: you can safely place a comma or semicolon for the last element in an array or an object: + +```json +{ + "key1": "value", + "key2": "value", +} +``` +### Automatic arrays creation + +* Non-unique keys in an object are allowed and are automatically converted to the arrays internally: + +```json +{ + "key": "value1", + "key": "value2" +} +``` +is converted to: +```json +{ + "key": ["value1", "value2"] +} +``` + +### Named keys hierarchy + +UCL accepts named keys and organize them into objects hierarchy internally. Here is an example of this process: +```nginx +section "blah" { + key = value; +} +section foo { + key = value; +} +``` + +is converted to the following object: + +```nginx +section { + blah { + key = value; + } + foo { + key = value; + } +} +``` + +Plain definitions may be more complex and contain more than a single level of nested objects: + +```nginx +section "blah" "foo" { + key = value; +} +``` + +is presented as: + +```nginx +section { + blah { + foo { + key = value; + } + } +} +``` + +### Convenient numbers and booleans + +* Numbers can have suffixes to specify standard multipliers: + + `[kKmMgG]` - standard 10 base multipliers (so `1k` is translated to 1000) + + `[kKmMgG]b` - 2 power multipliers (so `1kb` is translated to 1024) + + `[s|min|d|w|y]` - time multipliers, all time values are translated to float number of seconds, for example `10min` is translated to 600.0 and `10ms` is translated to 0.01 +* Hexadecimal integers can be used by `0x` prefix, for example `key = 0xff`. However, floating point values can use decimal base only. +* Booleans can be specified as `true` or `yes` or `on` and `false` or `no` or `off`. +* It is still possible to treat numbers and booleans as strings by enclosing them in double quotes. + +## General improvements + +### Comments + +UCL supports different style of comments: + +* single line: `#` +* multiline: `/* ... */` + +Multiline comments may be nested: +```c +# Sample single line comment +/* + some comment + /* nested comment */ + end of comment +*/ +``` + +### Macros support + +UCL supports external macros both multiline and single line ones: +```nginx +.macro_name "sometext"; +.macro_name { + Some long text + .... +}; +``` + +Moreover, each macro can accept an optional list of arguments in braces. These +arguments themselves are the UCL object that is parsed and passed to a macro as +options: + +```nginx +.macro_name(param=value) "something"; +.macro_name(param={key=value}) "something"; +.macro_name(.include "params.conf") "something"; +.macro_name(#this is multiline macro +param = [value1, value2]) "something"; +.macro_name(key="()") "something"; +``` + +UCL also provide a convenient `include` macro to load content from another files +to the current UCL object. This macro accepts either path to file: + +```nginx +.include "/full/path.conf" +.include "./relative/path.conf" +.include "${CURDIR}/path.conf" +``` + +or URL (if ucl is built with url support provided by either `libcurl` or `libfetch`): + + .include "http://example.com/file.conf" + +`.include` macro supports a set of options: + +* `try` (default: **false**) - if this option is `true` than UCL treats errors on loading of +this file as non-fatal. For example, such a file can be absent but it won't stop the parsing +of the top-level document. +* `sign` (default: **false**) - if this option is `true` UCL loads and checks the signature for +a file from path named `.sig`. Trusted public keys should be provided for UCL API after +parser is created but before any configurations are parsed. +* `glob` (default: **false**) - if this option is `true` UCL treats the filename as GLOB pattern and load +all files that matches the specified pattern (normally the format of patterns is defined in `glob` manual page +for your operating system). This option is meaningless for URL includes. +* `url` (default: **true**) - allow URL includes. +* `path` (default: empty) - A UCL_ARRAY of directories to search for the include file. +Search ends after the first match, unless `glob` is true, then all matches are included. +* `prefix` (default false) - Put included contents inside an object, instead +of loading them into the root. If no `key` is provided, one is automatically generated based on each files basename() +* `key` (default: ) - Key to load contents of include into. If +the key already exists, it must be the correct type +* `target` (default: object) - Specify if the `prefix` `key` should be an +object or an array. +* `priority` (default: 0) - specify priority for the include (see below). +* `duplicate` (default: 'append') - specify policy of duplicates resolving: + - `append` - default strategy, if we have new object of higher priority then it replaces old one, if we have new object with less priority it is ignored completely, and if we have two duplicate objects with the same priority then we have a multi-value key (implicit array) + - `merge` - if we have object or array, then new keys are merged inside, if we have a plain object then an implicit array is formed (regardless of priorities) + - `error` - create error on duplicate keys and stop parsing + - `rewrite` - always rewrite an old value with new one (ignoring priorities) + +Priorities are used by UCL parser to manage the policy of objects rewriting during including other files +as following: + +* If we have two objects with the same priority then we form an implicit array +* If a new object has bigger priority then we overwrite an old one +* If a new object has lower priority then we ignore it + +By default, the priority of top-level object is set to zero (lowest priority). Currently, +you can define up to 16 priorities (from 0 to 15). Includes with bigger priorities will +rewrite keys from the objects with lower priorities as specified by the policy. + +### Variables support + +UCL supports variables in input. Variables are registered by a user of the UCL parser and can be presented in the following forms: + +* `${VARIABLE}` +* `$VARIABLE` + +UCL currently does not support nested variables. To escape variables one could use double dollar signs: + +* `$${VARIABLE}` is converted to `${VARIABLE}` +* `$$VARIABLE` is converted to `$VARIABLE` + +However, if no valid variables are found in a string, no expansion will be performed (and `$$` thus remains unchanged). This may be a subject +to change in future libucl releases. + +### Multiline strings + +UCL can handle multiline strings as well as single line ones. It uses shell/perl like notation for such objects: +``` +key = <@]), [], + [enable_urls=no]) +AC_ARG_ENABLE([regex], AS_HELP_STRING([--enable-regex], + [Enable regex checking for schema @<:@default=yes@:>@]), [], + [enable_regex=yes]) +AC_ARG_ENABLE([signatures], AS_HELP_STRING([--enable-signatures], + [Enable signatures check (requires openssl) @<:@default=no@:>@]), [], + [enable_signatures=no]) +AC_ARG_ENABLE([lua], AS_HELP_STRING([--enable-lua], + [Enable lua API build (requires lua libraries and headers) @<:@default=no@:>@]), [], + [enable_lua=no]) +AC_ARG_ENABLE([utils], + AS_HELP_STRING([--enable-utils], [Build and install utils @<:@default=no@:>@]), + [case "${enableval}" in + yes) utils=true ;; + no) utils=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-utils]) ;; + esac],[utils=false]) +AM_CONDITIONAL([UTILS], [test x$utils = xtrue]) + +AS_IF([test "x$enable_signatures" = "xyes"], [ + AC_SEARCH_LIBS([EVP_MD_CTX_create], [crypto], [ + AC_DEFINE(HAVE_OPENSSL, 1, [Define to 1 if you have the 'crypto' library (-lcrypto).]) + LIBCRYPTO_LIB="-lcrypto" + LIBS_EXTRA="${LIBS_EXTRA} -lcrypto" + ], [AC_MSG_ERROR([unable to find the EVP_MD_CTX_create() function])]) +]) +AC_SUBST(LIBCRYPTO_LIB) +AC_PATH_PROG(PANDOC, pandoc, [/non/existent]) + +AC_SEARCH_LIBS([clock_gettime], [rt], [], [ + AC_CHECK_HEADER([mach/mach_time.h], [ + AC_DEFINE(HAVE_MACH_MACH_TIME_H, 1, [Define to 1 on Darwin]) + ], [AC_MSG_ERROR([unable to find clock_gettime or mach_absolute_time])]) +]) +AC_SEARCH_LIBS([remainder], [m], [], [AC_MSG_ERROR([unable to find remainder() function])]) + +AS_IF([test "x$enable_regex" = "xyes"], [ + AC_CHECK_HEADER([regex.h], [ + AC_DEFINE(HAVE_REGEX_H, 1, [Define to 1 if you have the header file.]) + AC_SEARCH_LIBS([regexec], [regex], [ + AS_IF([test "x$ac_cv_search_regexec" = "x-lregex"], [ + LIBREGEX_LIB="-lregex" + LIBS_EXTRA="${LIBS_EXTRA} -lregex" + ] + )], + [AC_MSG_ERROR([unable to find the regexec() function])])], + [AC_MSG_ERROR([unable to find the regex.h header]) + ], + [#include ]) +]) +AC_SUBST(LIBREGEX_LIB) + +AS_IF([test "x$enable_lua" = "xyes"], [ + AX_PROG_LUA([5.1], [], [ + AX_LUA_HEADERS([ + AX_LUA_LIBS([ + AC_DEFINE(HAVE_LUA, 1, [Define to 1 for lua support.]) + with_lua="yes" + ], [AC_MSG_ERROR([unable to find the lua libraries]) + ]) + ], [AC_MSG_ERROR([unable to find the lua header files]) + ]) + ], [AC_MSG_ERROR([unable to find the lua interpreter])]) +], [with_lua="no"]) + +AM_CONDITIONAL([LUA_SUB], [test "$with_lua" = "yes"]) + +AS_IF([test "x$enable_urls" = "xyes"], [ + AC_CHECK_HEADER([fetch.h], [ + AC_DEFINE(HAVE_FETCH_H, 1, [Define to 1 if you have the header file.]) + AC_CHECK_LIB(fetch, fetchXGet, [ + AC_DEFINE(HAVE_LIBFETCH, 1, [Define to 1 if you have the 'fetch' library (-lfetch).]) + LIBFETCH_LIBS="-lfetch" + have_libfetch="yes" + LIBS_EXTRA="${LIBS_EXTRA} -lfetch" + ]) + ], [],[ + #include + #ifdef HAVE_SYS_PARAM_H + #include + #endif + ]) + AC_SUBST(LIBFETCH_LIBS) + + AS_IF([ test "x$have_libfetch" != "xyes"], [ + dnl Fallback to libcurl + PKG_CHECK_MODULES([CURL], [libcurl], [ + AC_DEFINE(CURL_FOUND, 1, [Use libcurl]) + LIBS_EXTRA="${LIBS_EXTRA} -lcurl"], + [AC_MSG_ERROR([unable to find neither libfetch nor libcurl])]) + ]) + AC_SUBST(CURL_FOUND) + AC_SUBST(CURL_LIBS) + AC_SUBST(CURL_CFLAGS) +]) + +AC_SUBST(LIBS_EXTRA) + +AC_MSG_CHECKING(for GCC atomic builtins) +AC_LINK_IFELSE([ + AC_LANG_SOURCE([[ + int main() { + volatile unsigned long val = 1; + __sync_synchronize(); + __sync_val_compare_and_swap(&val, 1, 0); + __sync_add_and_fetch(&val, 1); + __sync_sub_and_fetch(&val, 1); + return 0; + } + ]]) +], +[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_ATOMIC_BUILTINS], [1], [Has gcc/MSVC atomic intrinsics]) +], +[ + AC_MSG_RESULT([no]) + AC_DEFINE([HAVE_ATOMIC_BUILTINS], [0], [Has gcc/MSVC atomic intrinsics]) + AC_MSG_WARN([Libucl references could be thread-unsafe because atomic builtins are missing]) +]) + +AX_CODE_COVERAGE + +AC_CONFIG_FILES(Makefile \ + src/Makefile \ + lua/Makefile + tests/Makefile \ + utils/Makefile \ + doc/Makefile \ + lua/libucl.rockspec \ + libucl.pc) +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) +AC_OUTPUT Copied: vendor/libucl/20170219/include/ucl.h (from r313950, vendor/libucl/dist/include/ucl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libucl/20170219/include/ucl.h Sun Feb 19 17:32:21 2017 (r313951, copy of r313950, vendor/libucl/dist/include/ucl.h) @@ -0,0 +1,1494 @@ +/* Copyright (c) 2013-2015, Vsevolod Stakhov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef UCL_H_ +#define UCL_H_ + +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +# define UCL_EXTERN __declspec(dllexport) +#else +# define UCL_EXTERN +#endif + +/** + * @mainpage + * This is a reference manual for UCL API. You may find the description of UCL format by following this + * [github repository](https://github.com/vstakhov/libucl). + * + * This manual has several main sections: + * - @ref structures + * - @ref utils + * - @ref parser + * - @ref emitter + */ + +/** + * @file ucl.h + * @brief UCL parsing and emitting functions + * + * UCL is universal configuration language, which is a form of + * JSON with less strict rules that make it more comfortable for + * using as a configuration language + */ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Memory allocation utilities + * UCL_ALLOC(size) - allocate memory for UCL + * UCL_FREE(size, ptr) - free memory of specified size at ptr + * Default: malloc and free + */ +#ifndef UCL_ALLOC +#define UCL_ALLOC(size) malloc(size) +#endif +#ifndef UCL_FREE +#define UCL_FREE(size, ptr) free(ptr) +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +#define UCL_WARN_UNUSED_RESULT \ + __attribute__((warn_unused_result)) +#else +#define UCL_WARN_UNUSED_RESULT +#endif + +#ifdef __GNUC__ +#define UCL_DEPRECATED(func) func __attribute__ ((deprecated)) +#elif defined(_MSC_VER) +#define UCL_DEPRECATED(func) __declspec(deprecated) func +#else +#define UCL_DEPRECATED(func) func +#endif + +/** + * @defgroup structures Structures and types + * UCL defines several enumeration types used for error reporting or specifying flags and attributes. + * + * @{ + */ + +/** + * The common error codes returned by ucl parser + */ +typedef enum ucl_error { + UCL_EOK = 0, /**< No error */ + UCL_ESYNTAX, /**< Syntax error occurred during parsing */ + UCL_EIO, /**< IO error occurred during parsing */ + UCL_ESTATE, /**< Invalid state machine state */ + UCL_ENESTED, /**< Input has too many recursion levels */ + UCL_EMACRO, /**< Error processing a macro */ + UCL_EINTERNAL, /**< Internal unclassified error */ + UCL_ESSL, /**< SSL error */ + UCL_EMERGE /**< A merge error occured */ +} ucl_error_t; + +/** + * #ucl_object_t may have one of specified types, some types are compatible with each other and some are not. + * For example, you can always convert #UCL_TIME to #UCL_FLOAT. Also you can convert #UCL_FLOAT to #UCL_INTEGER + * by loosing floating point. Every object may be converted to a string by #ucl_object_tostring_forced() function. + * + */ +typedef enum ucl_type { + UCL_OBJECT = 0, /**< UCL object - key/value pairs */ + UCL_ARRAY, /**< UCL array */ + UCL_INT, /**< Integer number */ + UCL_FLOAT, /**< Floating point number */ + UCL_STRING, /**< Null terminated string */ + UCL_BOOLEAN, /**< Boolean value */ + UCL_TIME, /**< Time value (floating point number of seconds) */ + UCL_USERDATA, /**< Opaque userdata pointer (may be used in macros) */ + UCL_NULL /**< Null value */ +} ucl_type_t; + +/** + * You can use one of these types to serialise #ucl_object_t by using ucl_object_emit(). + */ +typedef enum ucl_emitter { + UCL_EMIT_JSON = 0, /**< Emit fine formatted JSON */ + UCL_EMIT_JSON_COMPACT, /**< Emit compacted JSON */ + UCL_EMIT_CONFIG, /**< Emit human readable config format */ + UCL_EMIT_YAML, /**< Emit embedded YAML format */ + UCL_EMIT_MSGPACK, /**< Emit msgpack output */ + UCL_EMIT_MAX /**< Unsupported emitter type */ +} ucl_emitter_t; + +/** + * These flags defines parser behaviour. If you specify #UCL_PARSER_ZEROCOPY you must ensure + * that the input memory is not freed if an object is in use. Moreover, if you want to use + * zero-terminated keys and string values then you should not use zero-copy mode, as in this case + * UCL still has to perform copying implicitly. + */ +typedef enum ucl_parser_flags { + UCL_PARSER_DEFAULT = 0, /**< No special flags */ + UCL_PARSER_KEY_LOWERCASE = (1 << 0), /**< Convert all keys to lower case */ + UCL_PARSER_ZEROCOPY = (1 << 1), /**< Parse input in zero-copy mode if possible */ + UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */ + UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */ + UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */ + UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */ + UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */ +} ucl_parser_flags_t; + +/** + * String conversion flags, that are used in #ucl_object_fromstring_common function. + */ +typedef enum ucl_string_flags { + UCL_STRING_RAW = 0x0, /**< Treat string as is */ + UCL_STRING_ESCAPE = (1 << 0), /**< Perform JSON escape */ + UCL_STRING_TRIM = (1 << 1), /**< Trim leading and trailing whitespaces */ + UCL_STRING_PARSE_BOOLEAN = (1 << 2), /**< Parse passed string and detect boolean */ + UCL_STRING_PARSE_INT = (1 << 3), /**< Parse passed string and detect integer number */ + UCL_STRING_PARSE_DOUBLE = (1 << 4), /**< Parse passed string and detect integer or float number */ + UCL_STRING_PARSE_TIME = (1 << 5), /**< Parse time strings */ + UCL_STRING_PARSE_NUMBER = UCL_STRING_PARSE_INT|UCL_STRING_PARSE_DOUBLE|UCL_STRING_PARSE_TIME, /**< + Parse passed string and detect number */ + UCL_STRING_PARSE = UCL_STRING_PARSE_BOOLEAN|UCL_STRING_PARSE_NUMBER, /**< + Parse passed string (and detect booleans and numbers) */ + UCL_STRING_PARSE_BYTES = (1 << 6) /**< Treat numbers as bytes */ +} ucl_string_flags_t; + +/** + * Basic flags for an object + */ +typedef enum ucl_object_flags { + UCL_OBJECT_ALLOCATED_KEY = (1 << 0), /**< An object has key allocated internally */ + UCL_OBJECT_ALLOCATED_VALUE = (1 << 1), /**< An object has a string value allocated internally */ + UCL_OBJECT_NEED_KEY_ESCAPE = (1 << 2), /**< The key of an object need to be escaped on output */ + UCL_OBJECT_EPHEMERAL = (1 << 3), /**< Temporary object that does not need to be freed really */ + UCL_OBJECT_MULTILINE = (1 << 4), /**< String should be displayed as multiline string */ + UCL_OBJECT_MULTIVALUE = (1 << 5), /**< Object is a key with multiple values */ + UCL_OBJECT_INHERITED = (1 << 6), /**< Object has been inherited from another */ + UCL_OBJECT_BINARY = (1 << 7) /**< Object contains raw binary data */ +} ucl_object_flags_t; + +/** + * Duplicate policy types + */ +enum ucl_duplicate_strategy { + UCL_DUPLICATE_APPEND = 0, /**< Default policy to merge based on priorities */ + UCL_DUPLICATE_MERGE, /**< Merge new object with old one */ + UCL_DUPLICATE_REWRITE, /**< Rewrite old keys */ + UCL_DUPLICATE_ERROR /**< Stop parsing on duplicate found */ +}; + +/** + * Input format type + */ +enum ucl_parse_type { + UCL_PARSE_UCL = 0, /**< Default ucl format */ + UCL_PARSE_MSGPACK, /**< Message pack input format */ + UCL_PARSE_CSEXP, /**< Canonical S-expressions */ + UCL_PARSE_AUTO /**< Try to detect parse type */ +}; + +/** + * UCL object structure. Please mention that the most of fields should not be touched by + * UCL users. In future, this structure may be converted to private one. + */ +typedef struct ucl_object_s { + /** + * Variant value type + */ + union { + int64_t iv; /**< Int value of an object */ + const char *sv; /**< String value of an object */ + double dv; /**< Double value of an object */ + void *av; /**< Array */ + void *ov; /**< Object */ + void* ud; /**< Opaque user data */ + } value; + const char *key; /**< Key of an object */ + struct ucl_object_s *next; /**< Array handle */ + struct ucl_object_s *prev; /**< Array handle */ + uint32_t keylen; /**< Length of a key */ + uint32_t len; /**< Size of an object */ + uint32_t ref; /**< Reference count */ + uint16_t flags; /**< Object flags */ + uint16_t type; /**< Real type */ + unsigned char* trash_stack[2]; /**< Pointer to allocated chunks */ +} ucl_object_t; + +/** + * Destructor type for userdata objects + * @param ud user specified data pointer + */ +typedef void (*ucl_userdata_dtor)(void *ud); +typedef const char* (*ucl_userdata_emitter)(void *ud); + +/** @} */ + +/** + * @defgroup utils Utility functions + * A number of utility functions simplify handling of UCL objects + * + * @{ + */ +/** + * Copy and return a key of an object, returned key is zero-terminated + * @param obj CL object + * @return zero terminated key + */ +UCL_EXTERN char* ucl_copy_key_trash (const ucl_object_t *obj); + +/** + * Copy and return a string value of an object, returned key is zero-terminated + * @param obj CL object + * @return zero terminated string representation of object value + */ +UCL_EXTERN char* ucl_copy_value_trash (const ucl_object_t *obj); + +/** + * Creates a new object + * @return new object + */ +UCL_EXTERN ucl_object_t* ucl_object_new (void) UCL_WARN_UNUSED_RESULT; + +/** + * Create new object with type specified + * @param type type of a new object + * @return new object + */ +UCL_EXTERN ucl_object_t* ucl_object_typed_new (ucl_type_t type) UCL_WARN_UNUSED_RESULT; + +/** + * Create new object with type and priority specified + * @param type type of a new object + * @param priority priority of an object + * @return new object + */ +UCL_EXTERN ucl_object_t* ucl_object_new_full (ucl_type_t type, unsigned priority) + UCL_WARN_UNUSED_RESULT; + +/** + * Create new object with userdata dtor + * @param dtor destructor function + * @param emitter emitter for userdata + * @param ptr opaque pointer + * @return new object + */ +UCL_EXTERN ucl_object_t* ucl_object_new_userdata (ucl_userdata_dtor dtor, + ucl_userdata_emitter emitter, void *ptr) UCL_WARN_UNUSED_RESULT; + +/** + * Perform deep copy of an object copying everything + * @param other object to copy + * @return new object with refcount equal to 1 + */ +UCL_EXTERN ucl_object_t * ucl_object_copy (const ucl_object_t *other) + UCL_WARN_UNUSED_RESULT; + +/** + * Return the type of an object + * @return the object type + */ +UCL_EXTERN ucl_type_t ucl_object_type (const ucl_object_t *obj); + +/** + * Converts ucl object type to its string representation + * @param type type of object + * @return constant string describing type + */ +UCL_EXTERN const char * ucl_object_type_to_string (ucl_type_t type); + +/** + * Converts string that represents ucl type to real ucl type enum + * @param input C string with name of type + * @param res resulting target + * @return true if `input` is a name of type stored in `res` + */ +UCL_EXTERN bool ucl_object_string_to_type (const char *input, ucl_type_t *res); + +/** + * Convert any string to an ucl object making the specified transformations + * @param str fixed size or NULL terminated string + * @param len length (if len is zero, than str is treated as NULL terminated) + * @param flags conversion flags + * @return new object + */ +UCL_EXTERN ucl_object_t * ucl_object_fromstring_common (const char *str, size_t len, + enum ucl_string_flags flags) UCL_WARN_UNUSED_RESULT; + +/** + * Create a UCL object from the specified string + * @param str NULL terminated string, will be json escaped + * @return new object + */ +UCL_EXTERN ucl_object_t *ucl_object_fromstring (const char *str) UCL_WARN_UNUSED_RESULT; + +/** + * Create a UCL object from the specified string *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 17:35: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 C7D56CE27D7; Sun, 19 Feb 2017 17:35: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 967E01332; Sun, 19 Feb 2017 17:35: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 v1JHZEdC005409; Sun, 19 Feb 2017 17:35:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHZESA005408; Sun, 19 Feb 2017 17:35:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191735.v1JHZESA005408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:35: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: r313952 - stable/11/usr.bin/timeout 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, 19 Feb 2017 17:35:15 -0000 Author: bapt Date: Sun Feb 19 17:35:14 2017 New Revision: 313952 URL: https://svnweb.freebsd.org/changeset/base/313952 Log: MFC r313867, r313869-r313870 r313867: Add history and Authors section in the manpage Submitted by: dteske MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9419 r313869: Also add vsevolod@ in the authors r313870: Use full name for the month Reported by: brueffer Modified: stable/11/usr.bin/timeout/timeout.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/timeout/timeout.1 ============================================================================== --- stable/11/usr.bin/timeout/timeout.1 Sun Feb 19 17:32:21 2017 (r313951) +++ stable/11/usr.bin/timeout/timeout.1 Sun Feb 19 17:35:14 2017 (r313952) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 28, 2014 +.Dd February 17, 2017 .Dt TIMEOUT 1 .Os .Sh NAME @@ -127,3 +127,12 @@ the exit status return is 125. .Sh SEE ALSO .Xr kill 1 , .Xr signal 3 +.Sh HISTORY +The +.Nm +command first appeared in +.Fx 10.3 . +.Sh AUTHORS +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org +and +.An Vsevolod Stakhov Aq Mt vsevolod@FreeBSD.org From owner-svn-src-all@freebsd.org Sun Feb 19 17:37: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 A2059CE2867; Sun, 19 Feb 2017 17:37:18 +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 70A7114C3; Sun, 19 Feb 2017 17:37:18 +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 v1JHbH20005535; Sun, 19 Feb 2017 17:37:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHbGWl005526; Sun, 19 Feb 2017 17:37:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191737.v1JHbGWl005526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313953 - in head/contrib/libucl: . include lua src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:37:18 -0000 Author: bapt Date: Sun Feb 19 17:37:16 2017 New Revision: 313953 URL: https://svnweb.freebsd.org/changeset/base/313953 Log: Import libucl 20170219 MFC after: 3 days Modified: head/contrib/libucl/ChangeLog.md head/contrib/libucl/README.md head/contrib/libucl/configure.ac head/contrib/libucl/include/ucl.h head/contrib/libucl/lua/lua_ucl.c head/contrib/libucl/src/ucl_emitter_utils.c head/contrib/libucl/src/ucl_internal.h head/contrib/libucl/src/ucl_parser.c head/contrib/libucl/src/ucl_util.c Directory Properties: head/contrib/libucl/ (props changed) Modified: head/contrib/libucl/ChangeLog.md ============================================================================== --- head/contrib/libucl/ChangeLog.md Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/ChangeLog.md Sun Feb 19 17:37:16 2017 (r313953) @@ -35,7 +35,7 @@ ### Libucl 0.7.3 -- Fixed a bug with macroes that come after an empty object +- Fixed a bug with macros that come after an empty object - Fixed a bug in include processing when an incorrect variable has been destroyed (use-after-free) ### Libucl 0.8.0 Modified: head/contrib/libucl/README.md ============================================================================== --- head/contrib/libucl/README.md Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/README.md Sun Feb 19 17:37:16 2017 (r313953) @@ -1,6 +1,8 @@ # LIBUCL -[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138)[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl) +[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) +[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* @@ -217,8 +219,8 @@ Multiline comments may be nested: UCL supports external macros both multiline and single line ones: ```nginx -.macro "sometext"; -.macro { +.macro_name "sometext"; +.macro_name { Some long text .... }; @@ -229,12 +231,12 @@ arguments themselves are the UCL object options: ```nginx -.macro(param=value) "something"; -.macro(param={key=value}) "something"; -.macro(.include "params.conf") "something"; -.macro(#this is multiline macro +.macro_name(param=value) "something"; +.macro_name(param={key=value}) "something"; +.macro_name(.include "params.conf") "something"; +.macro_name(#this is multiline macro param = [value1, value2]) "something"; -.macro(key="()") "something"; +.macro_name(key="()") "something"; ``` UCL also provide a convenient `include` macro to load content from another files Modified: head/contrib/libucl/configure.ac ============================================================================== --- head/contrib/libucl/configure.ac Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/configure.ac Sun Feb 19 17:37:16 2017 (r313953) @@ -39,6 +39,7 @@ AC_CHECK_HEADERS_ONCE([stdarg.h]) AC_CHECK_HEADERS_ONCE([stdbool.h]) AC_CHECK_HEADERS_ONCE([stdint.h]) AC_CHECK_HEADERS_ONCE([string.h]) +AC_CHECK_HEADERS_ONCE([strings.h]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS_ONCE([ctype.h]) AC_CHECK_HEADERS_ONCE([errno.h]) Modified: head/contrib/libucl/include/ucl.h ============================================================================== --- head/contrib/libucl/include/ucl.h Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/include/ucl.h Sun Feb 19 17:37:16 2017 (r313953) @@ -154,7 +154,8 @@ typedef enum ucl_parser_flags { UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */ UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */ UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */ - UCL_PARSER_DISABLE_MACRO = (1 << 5) /** Treat macros as comments */ + UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */ + UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */ } ucl_parser_flags_t; /** @@ -205,7 +206,8 @@ enum ucl_duplicate_strategy { enum ucl_parse_type { UCL_PARSE_UCL = 0, /**< Default ucl format */ UCL_PARSE_MSGPACK, /**< Message pack input format */ - UCL_PARSE_CSEXP /**< Canonical S-expressions */ + UCL_PARSE_CSEXP, /**< Canonical S-expressions */ + UCL_PARSE_AUTO /**< Try to detect parse type */ }; /** @@ -227,7 +229,7 @@ typedef struct ucl_object_s { const char *key; /**< Key of an object */ struct ucl_object_s *next; /**< Array handle */ struct ucl_object_s *prev; /**< Array handle */ - uint32_t keylen; /**< Lenght of a key */ + uint32_t keylen; /**< Length of a key */ uint32_t len; /**< Size of an object */ uint32_t ref; /**< Reference count */ uint16_t flags; /**< Object flags */ @@ -831,10 +833,29 @@ UCL_EXTERN ucl_object_iter_t ucl_object_ * Get the next object from the `obj`. This fucntion iterates over arrays, objects * and implicit arrays * @param iter safe iterator + * @param expand_values expand explicit arrays and objects * @return the next object in sequence */ UCL_EXTERN const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t iter, bool expand_values); +/** + * Iteration type enumerator + */ +enum ucl_iterate_type { + UCL_ITERATE_EXPLICIT = 1 << 0, /**< Iterate just explicit arrays and objects */ + UCL_ITERATE_IMPLICIT = 1 << 1, /**< Iterate just implicit arrays */ + UCL_ITERATE_BOTH = (1 << 0) | (1 << 1), /**< Iterate both explicit and implicit arrays*/ +}; + +/** + * Get the next object from the `obj`. This fucntion iterates over arrays, objects + * and implicit arrays if needed + * @param iter safe iterator + * @param + * @return the next object in sequence + */ +UCL_EXTERN const ucl_object_t* ucl_object_iterate_full (ucl_object_iter_t iter, + enum ucl_iterate_type type); /** * Free memory associated with the safe iterator @@ -1016,6 +1037,7 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1025,6 +1047,7 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1069,6 +1092,21 @@ UCL_EXTERN bool ucl_parser_add_fd_priori int fd, unsigned priority); /** + * Load and add data from a file descriptor + * @param parser parser structure + * @param filename the name of file + * @param err if *err is NULL it is set to parser error + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Provide a UCL_ARRAY of paths to search for include files. The object is * copied so caller must unref the object. * @param parser parser structure Modified: head/contrib/libucl/lua/lua_ucl.c ============================================================================== --- head/contrib/libucl/lua/lua_ucl.c Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/lua/lua_ucl.c Sun Feb 19 17:37:16 2017 (r313953) @@ -29,7 +29,6 @@ #include "ucl_internal.h" #include "lua_ucl.h" #include -#include /*** * @module ucl @@ -187,6 +186,8 @@ ucl_object_lua_push_array (lua_State *L, lua_rawseti (L, -2, i); i ++; } + + ucl_object_iterate_free (it); } else { /* Optimize allocation by preallocation of table */ @@ -482,7 +483,7 @@ static int lua_ucl_parser_init (lua_State *L) { struct ucl_parser *parser, **pparser; - int flags = 0; + int flags = UCL_PARSER_NO_FILEVARS; if (lua_gettop (L) >= 1) { flags = lua_tonumber (L, 1); @@ -524,6 +525,27 @@ lua_ucl_push_opaque (lua_State *L, ucl_o lua_setmetatable (L, -2); } +static inline enum ucl_parse_type +lua_ucl_str_to_parse_type (const char *str) +{ + enum ucl_parse_type type = UCL_PARSE_UCL; + + if (str != NULL) { + if (strcasecmp (str, "msgpack") == 0) { + type = UCL_PARSE_MSGPACK; + } + else if (strcasecmp (str, "sexp") == 0 || + strcasecmp (str, "csexp") == 0) { + type = UCL_PARSE_CSEXP; + } + else if (strcasecmp (str, "auto") == 0) { + type = UCL_PARSE_AUTO; + } + } + + return type; +} + /*** * @method parser:parse_file(name) * Parse UCL object from file. @@ -579,13 +601,19 @@ lua_ucl_parser_parse_string (lua_State * struct ucl_parser *parser; const char *string; size_t llen; + enum ucl_parse_type type = UCL_PARSE_UCL; int ret = 2; parser = lua_ucl_parser_get (L, 1); string = luaL_checklstring (L, 2, &llen); + if (lua_type (L, 3) == LUA_TSTRING) { + type = lua_ucl_str_to_parse_type (lua_tostring (L, 3)); + } + if (parser != NULL && string != NULL) { - if (ucl_parser_add_chunk (parser, (const unsigned char *)string, llen)) { + if (ucl_parser_add_chunk_full (parser, (const unsigned char *)string, + llen, 0, UCL_DUPLICATE_APPEND, type)) { lua_pushboolean (L, true); ret = 1; } @@ -761,6 +789,28 @@ lua_ucl_object_unwrap (lua_State *L) return 1; } +static inline enum ucl_emitter +lua_ucl_str_to_emit_type (const char *strtype) +{ + enum ucl_emitter format = UCL_EMIT_JSON_COMPACT; + + if (strcasecmp (strtype, "json") == 0) { + format = UCL_EMIT_JSON; + } + else if (strcasecmp (strtype, "json-compact") == 0) { + format = UCL_EMIT_JSON_COMPACT; + } + else if (strcasecmp (strtype, "yaml") == 0) { + format = UCL_EMIT_YAML; + } + else if (strcasecmp (strtype, "config") == 0 || + strcasecmp (strtype, "ucl") == 0) { + format = UCL_EMIT_CONFIG; + } + + return format; +} + /*** * @method object:tostring(type) * Unwraps opaque ucl object to string (json by default). Optionally you can @@ -787,19 +837,7 @@ lua_ucl_object_tostring (lua_State *L) if (lua_type (L, 2) == LUA_TSTRING) { const char *strtype = lua_tostring (L, 2); - if (strcasecmp (strtype, "json") == 0) { - format = UCL_EMIT_JSON; - } - else if (strcasecmp (strtype, "json-compact") == 0) { - format = UCL_EMIT_JSON_COMPACT; - } - else if (strcasecmp (strtype, "yaml") == 0) { - format = UCL_EMIT_YAML; - } - else if (strcasecmp (strtype, "config") == 0 || - strcasecmp (strtype, "ucl") == 0) { - format = UCL_EMIT_CONFIG; - } + format = lua_ucl_str_to_emit_type (strtype); } } @@ -1088,6 +1126,9 @@ lua_ucl_to_format (lua_State *L) strcasecmp (strtype, "ucl") == 0) { format = UCL_EMIT_CONFIG; } + else if (strcasecmp (strtype, "msgpack") == 0) { + format = UCL_EMIT_MSGPACK; + } } } Modified: head/contrib/libucl/src/ucl_emitter_utils.c ============================================================================== --- head/contrib/libucl/src/ucl_emitter_utils.c Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/src/ucl_emitter_utils.c Sun Feb 19 17:37:16 2017 (r313953) @@ -102,7 +102,7 @@ ucl_elt_string_write_json (const char *s func->ucl_emitter_append_character ('"', 1, func->ud); while (size) { - if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE)) { + if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE|UCL_CHARACTER_DENIED)) { if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } @@ -128,6 +128,10 @@ ucl_elt_string_write_json (const char *s case '"': func->ucl_emitter_append_len ("\\\"", 2, func->ud); break; + default: + /* Emit unicode unknown character */ + func->ucl_emitter_append_len ("\\uFFFD", 5, func->ud); + break; } len = 0; c = ++p; @@ -138,9 +142,11 @@ ucl_elt_string_write_json (const char *s } size --; } + if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } + func->ucl_emitter_append_character ('"', 1, func->ud); } Modified: head/contrib/libucl/src/ucl_internal.h ============================================================================== --- head/contrib/libucl/src/ucl_internal.h Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/src/ucl_internal.h Sun Feb 19 17:37:16 2017 (r313953) @@ -87,6 +87,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "utlist.h" #include "utstring.h" @@ -127,19 +130,19 @@ enum ucl_parser_state { }; enum ucl_character_type { - UCL_CHARACTER_DENIED = 0, - UCL_CHARACTER_KEY = 1, - UCL_CHARACTER_KEY_START = 1 << 1, - UCL_CHARACTER_WHITESPACE = 1 << 2, - UCL_CHARACTER_WHITESPACE_UNSAFE = 1 << 3, - UCL_CHARACTER_VALUE_END = 1 << 4, - UCL_CHARACTER_VALUE_STR = 1 << 5, - UCL_CHARACTER_VALUE_DIGIT = 1 << 6, - UCL_CHARACTER_VALUE_DIGIT_START = 1 << 7, - UCL_CHARACTER_ESCAPE = 1 << 8, - UCL_CHARACTER_KEY_SEP = 1 << 9, - UCL_CHARACTER_JSON_UNSAFE = 1 << 10, - UCL_CHARACTER_UCL_UNSAFE = 1 << 11 + UCL_CHARACTER_DENIED = (1 << 0), + UCL_CHARACTER_KEY = (1 << 1), + UCL_CHARACTER_KEY_START = (1 << 2), + UCL_CHARACTER_WHITESPACE = (1 << 3), + UCL_CHARACTER_WHITESPACE_UNSAFE = (1 << 4), + UCL_CHARACTER_VALUE_END = (1 << 5), + UCL_CHARACTER_VALUE_STR = (1 << 6), + UCL_CHARACTER_VALUE_DIGIT = (1 << 7), + UCL_CHARACTER_VALUE_DIGIT_START = (1 << 8), + UCL_CHARACTER_ESCAPE = (1 << 9), + UCL_CHARACTER_KEY_SEP = (1 << 10), + UCL_CHARACTER_JSON_UNSAFE = (1 << 11), + UCL_CHARACTER_UCL_UNSAFE = (1 << 12) }; struct ucl_macro { @@ -568,4 +571,6 @@ bool ucl_parser_process_object_element ( */ bool ucl_parse_msgpack (struct ucl_parser *parser); +bool ucl_parse_csexp (struct ucl_parser *parser); + #endif /* UCL_INTERNAL_H_ */ Modified: head/contrib/libucl/src/ucl_parser.c ============================================================================== --- head/contrib/libucl/src/ucl_parser.c Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/src/ucl_parser.c Sun Feb 19 17:37:16 2017 (r313953) @@ -2469,8 +2469,10 @@ ucl_parser_new (int flags) parser->comments = ucl_object_typed_new (UCL_OBJECT); } - /* Initial assumption about filevars */ - ucl_parser_set_filevars (parser, NULL, false); + if (!(flags & UCL_PARSER_NO_FILEVARS)) { + /* Initial assumption about filevars */ + ucl_parser_set_filevars (parser, NULL, false); + } return parser; } @@ -2617,6 +2619,19 @@ ucl_parser_add_chunk_full (struct ucl_pa return false; } + if (parse_type == UCL_PARSE_AUTO && len > 0) { + /* We need to detect parse type by the first symbol */ + if ((*data & 0x80) == 0x80 && (*data >= 0xdc && *data <= 0xdf)) { + parse_type = UCL_PARSE_MSGPACK; + } + else if (*data == '(') { + parse_type = UCL_PARSE_CSEXP; + } + else { + parse_type = UCL_PARSE_UCL; + } + } + chunk->begin = data; chunk->remain = len; chunk->pos = chunk->begin; @@ -2643,6 +2658,8 @@ ucl_parser_add_chunk_full (struct ucl_pa return ucl_state_machine (parser); case UCL_PARSE_MSGPACK: return ucl_parse_msgpack (parser); + case UCL_PARSE_CSEXP: + return ucl_parse_csexp (parser); } } else { Modified: head/contrib/libucl/src/ucl_util.c ============================================================================== --- head/contrib/libucl/src/ucl_util.c Sun Feb 19 17:35:14 2017 (r313952) +++ head/contrib/libucl/src/ucl_util.c Sun Feb 19 17:37:16 2017 (r313953) @@ -26,11 +26,17 @@ #include "ucl_internal.h" #include "ucl_chartable.h" #include "kvec.h" +#include #include #include /* for snprintf */ #ifndef _WIN32 #include +#include +#else +#ifndef NBBY +#define NBBY 8 +#endif #endif #ifdef HAVE_LIBGEN_H @@ -81,11 +87,6 @@ typedef kvec_t(ucl_object_t *) ucl_array #define MAP_FAILED ((void *) -1) #endif -#ifdef _WIN32 -#include -#define NBBY CHAR_BIT -#endif - static void *ucl_mmap(char *addr, size_t length, int prot, int access, int fd, off_t offset) { void *map = NULL; @@ -1854,9 +1855,11 @@ ucl_parser_add_file (struct ucl_parser * UCL_PARSE_UCL); } + bool -ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, - unsigned priority) +ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type) { unsigned char *buf; size_t len; @@ -1882,7 +1885,8 @@ ucl_parser_add_fd_priority (struct ucl_p } parser->cur_file = NULL; len = st.st_size; - ret = ucl_parser_add_chunk_priority (parser, buf, len, priority); + ret = ucl_parser_add_chunk_full (parser, buf, len, priority, strat, + parse_type); if (len > 0) { ucl_munmap (buf, len); @@ -1892,6 +1896,18 @@ ucl_parser_add_fd_priority (struct ucl_p } bool +ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, + unsigned priority) +{ + if (parser == NULL) { + return false; + } + + return ucl_parser_add_fd_full(parser, fd, parser->default_priority, + UCL_DUPLICATE_APPEND, UCL_PARSE_UCL); +} + +bool ucl_parser_add_fd (struct ucl_parser *parser, int fd) { if (parser == NULL) { @@ -2488,6 +2504,10 @@ ucl_object_iterate_reset (ucl_object_ite UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + rit->impl_it = obj; rit->expl_it = NULL; @@ -2497,6 +2517,13 @@ ucl_object_iterate_reset (ucl_object_ite const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t it, bool expand_values) { + return ucl_object_iterate_full (it, expand_values ? UCL_ITERATE_BOTH : + UCL_ITERATE_IMPLICIT); +} + +const ucl_object_t* +ucl_object_iterate_full (ucl_object_iter_t it, enum ucl_iterate_type type) +{ struct ucl_object_safe_iter *rit = UCL_SAFE_ITER (it); const ucl_object_t *ret = NULL; @@ -2509,21 +2536,23 @@ ucl_object_iterate_safe (ucl_object_iter if (rit->impl_it->type == UCL_OBJECT || rit->impl_it->type == UCL_ARRAY) { ret = ucl_object_iterate (rit->impl_it, &rit->expl_it, true); - if (ret == NULL) { + if (ret == NULL && (type & UCL_ITERATE_IMPLICIT)) { /* Need to switch to another implicit object in chain */ rit->impl_it = rit->impl_it->next; rit->expl_it = NULL; - return ucl_object_iterate_safe (it, expand_values); + + return ucl_object_iterate_safe (it, type); } } else { /* Just iterate over the implicit array */ ret = rit->impl_it; rit->impl_it = rit->impl_it->next; - if (expand_values) { + + if (type & UCL_ITERATE_EXPLICIT) { /* We flatten objects if need to expand values */ if (ret->type == UCL_OBJECT || ret->type == UCL_ARRAY) { - return ucl_object_iterate_safe (it, expand_values); + return ucl_object_iterate_safe (it, type); } } } @@ -2538,6 +2567,10 @@ ucl_object_iterate_free (ucl_object_iter UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + UCL_FREE (sizeof (*rit), it); } From owner-svn-src-all@freebsd.org Sun Feb 19 17:38: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 1D821CE296D; Sun, 19 Feb 2017 17:38:19 +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 E12641758; Sun, 19 Feb 2017 17:38:18 +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 v1JHcI8D005800; Sun, 19 Feb 2017 17:38:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHcIN8005799; Sun, 19 Feb 2017 17:38:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702191738.v1JHcIN8005799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 19 Feb 2017 17:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313954 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:38:19 -0000 Author: imp Date: Sun Feb 19 17:38:17 2017 New Revision: 313954 URL: https://svnweb.freebsd.org/changeset/base/313954 Log: Remove obsolete comment after prior rev. Modified: head/sys/dev/nvme/nvme_sim.c Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Sun Feb 19 17:37:16 2017 (r313953) +++ head/sys/dev/nvme/nvme_sim.c Sun Feb 19 17:38:17 2017 (r313954) @@ -143,10 +143,6 @@ nvme_sim_action(struct cam_sim *sim, uni */ /*FALLTHROUGH*/ case XPT_ABORT: /* Abort the specified CCB */ - /* - * Only target mode generates these, and only for SCSI. They are - * all invalid/unsupported for NVMe. - */ ccb->ccb_h.status = CAM_REQ_INVALID; break; case XPT_SET_TRAN_SETTINGS: From owner-svn-src-all@freebsd.org Sun Feb 19 17:40: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 920CDCE2A8E; Sun, 19 Feb 2017 17:40:25 +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 6177B1913; Sun, 19 Feb 2017 17:40: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 v1JHeOKC006048; Sun, 19 Feb 2017 17:40:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHeOTE006047; Sun, 19 Feb 2017 17:40:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702191740.v1JHeOTE006047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 19 Feb 2017 17:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313955 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:40:25 -0000 Author: emaste Date: Sun Feb 19 17:40:24 2017 New Revision: 313955 URL: https://svnweb.freebsd.org/changeset/base/313955 Log: bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Submitted by: deeptech71@gmail.com, Anders Jensen-Waud MFC after: 1 month Modified: head/usr.bin/grep/grep.1 Modified: head/usr.bin/grep/grep.1 ============================================================================== --- head/usr.bin/grep/grep.1 Sun Feb 19 17:38:17 2017 (r313954) +++ head/usr.bin/grep/grep.1 Sun Feb 19 17:40:24 2017 (r313955) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match From owner-svn-src-all@freebsd.org Sun Feb 19 17:41: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 5FC9FCE2B15; Sun, 19 Feb 2017 17:41:22 +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 EA1FB1C19; Sun, 19 Feb 2017 17:41:21 +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 v1JHfLlt008432; Sun, 19 Feb 2017 17:41:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHfKX5008422; Sun, 19 Feb 2017 17:41:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191741.v1JHfKX5008422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313956 - vendor/mdocml/dist 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, 19 Feb 2017 17:41:22 -0000 Author: bapt Date: Sun Feb 19 17:41:20 2017 New Revision: 313956 URL: https://svnweb.freebsd.org/changeset/base/313956 Log: Import mandoc 1.4.1rc2 Added: vendor/mdocml/dist/catman.8 (contents, props changed) vendor/mdocml/dist/catman.c (contents, props changed) vendor/mdocml/dist/man.options.1 (contents, props changed) vendor/mdocml/dist/mandocd.8 (contents, props changed) vendor/mdocml/dist/mandocd.c (contents, props changed) vendor/mdocml/dist/test-O_DIRECTORY.c (contents, props changed) vendor/mdocml/dist/test-cmsg.c (contents, props changed) vendor/mdocml/dist/test-recvmsg.c (contents, props changed) Modified: vendor/mdocml/dist/INSTALL vendor/mdocml/dist/LICENSE vendor/mdocml/dist/Makefile vendor/mdocml/dist/Makefile.depend vendor/mdocml/dist/NEWS vendor/mdocml/dist/TODO vendor/mdocml/dist/apropos.1 vendor/mdocml/dist/cgi.c vendor/mdocml/dist/chars.c vendor/mdocml/dist/compat_fts.c vendor/mdocml/dist/configure vendor/mdocml/dist/configure.local.example vendor/mdocml/dist/dba.c vendor/mdocml/dist/dbm_map.c vendor/mdocml/dist/eqn_term.c vendor/mdocml/dist/gmdiff vendor/mdocml/dist/html.c vendor/mdocml/dist/html.h vendor/mdocml/dist/libmandoc.h vendor/mdocml/dist/libmdoc.h vendor/mdocml/dist/main.c vendor/mdocml/dist/man.1 vendor/mdocml/dist/man_html.c vendor/mdocml/dist/man_term.c vendor/mdocml/dist/manconf.h vendor/mdocml/dist/mandoc.1 vendor/mdocml/dist/mandoc.css vendor/mdocml/dist/mandoc.h vendor/mdocml/dist/mandoc_aux.h vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/dist/mandoc_html.3 vendor/mdocml/dist/mandocdb.c vendor/mdocml/dist/manpath.c vendor/mdocml/dist/mdoc.7 vendor/mdocml/dist/mdoc.c vendor/mdocml/dist/mdoc_html.c vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/dist/mdoc_man.c vendor/mdocml/dist/mdoc_term.c vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/dist/preconv.c vendor/mdocml/dist/read.c vendor/mdocml/dist/roff.c vendor/mdocml/dist/roff.h vendor/mdocml/dist/tag.c vendor/mdocml/dist/tbl_html.c vendor/mdocml/dist/term_ps.c vendor/mdocml/dist/tree.c Modified: vendor/mdocml/dist/INSTALL ============================================================================== --- vendor/mdocml/dist/INSTALL Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/INSTALL Sun Feb 19 17:41:20 2017 (r313956) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.17 2016/07/19 22:40:33 schwarze Exp $ +$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- @@ -16,7 +16,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, July 2016 +Ingo Schwarze, Karlsruhe, February 2017 Installation @@ -31,15 +31,21 @@ Regarding how packages and ports are mai system, please consult your operating system documentation. To install mandoc manually, the following steps are needed: -1. If you want to build the CGI program, man.cgi(8), too, run the -command "echo BUILD_CGI=1 > configure.local". Then run "cp -cgi.h.examples cgi.h" and edit cgi.h as desired. +1. If you want to build the CGI program, man.cgi(8), too, +run the command "echo BUILD_CGI=1 >> configure.local". +Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. + +2. If you also want to build the new catman(8) utility, run the +command "echo BUILD_CATMAN=1 >> configure.local". Note that it +is unlikely to be a drop-in replacement providing the same +functionality as your system's "catman", if your operating +system contains one. -2. Define MANPATH_DEFAULT in configure.local +3. Define MANPATH_DEFAULT in configure.local if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate for your operating system. -3. Run "./configure". +4. Run "./configure". This script attempts autoconfiguration of mandoc for your system. Read both its standard output and the file "Makefile.local" it generates. If anything looks wrong or different from what you @@ -49,27 +55,31 @@ result seems right to you. On Solaris 10 and earlier, you may have to run "ksh ./configure" because the native /bin/sh lacks some POSIX features. -4. Run "make". +5. Run "make". Any POSIX-compatible make, in particular both BSD make and GNU make, should work. If the build fails, look at "configure.local.example" and go back to step 2. -5. Run "make -n install" and check whether everything will be +6. Run "make -n install" and check whether everything will be installed to the intended places. Otherwise, put some *DIR or *NM* -variables into "configure.local" and go back to step 3. +variables into "configure.local" and go back to step 4. -6. Run "sudo make install". If you intend to build a binary +7. Optionally run the regression suite. +Basically, that amounts to "cd regress && ./regress.pl". +But you should probably look at "./mandoc -l regress/regress.pl.1" +first. + +8. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a command like "make DESTDIR=... install". Read the *-install targets in the "Makefile" to understand how DESTDIR is used. -7. Run the command "sudo -makewhatis" to build mandoc.db(5) databases in all the directory -trees configured in step 6. Whenever installing new manual pages, -re-run makewhatis(8) to update the databases, or apropos(1) will -not find the new pages. +9. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 6. Whenever installing +new manual pages, re-run makewhatis(8) to update the databases, or +apropos(1) will not find the new pages. -8. To set up a man.cgi(8) server, read its manual page. +10. To set up a man.cgi(8) server, read its manual page. Note that some man(7) pages may contain low-level roff(7) markup that mandoc does not yet understand. On some BSD systems using @@ -87,9 +97,10 @@ The following libraries are required: 2. The fts(3) directory traversion functions. If your system does not have them, the bundled compatibility version -will be used, so you need not worry in that case. But be careful: the -glibc version of fts(3) is known to be broken on 32bit platforms, -see . +will be used, so you need not worry in that case. But be careful: old +glibc versions of fts(3) were known to be broken on 32bit platforms, +see . +That was presumably fixed in glibc-2.23. If you run into that problem, set "HAVE_FTS=0" in configure.local. 3. Marc Espie's ohash(3) library. Modified: vendor/mdocml/dist/LICENSE ============================================================================== --- vendor/mdocml/dist/LICENSE Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/LICENSE Sun Feb 19 17:41:20 2017 (r313956) @@ -1,4 +1,4 @@ -$Id: LICENSE,v 1.13 2016/10/18 14:15:33 schwarze Exp $ +$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright @@ -10,6 +10,7 @@ Copyright (c) 2009, 2010, 2011, 2012 Joe Copyright (c) 2013 Franco Fichtner Copyright (c) 2014 Baptiste Daroussin Copyright (c) 2016 Ed Maste +Copyright (c) 2017 Michael Stapelberg Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek Modified: vendor/mdocml/dist/Makefile ============================================================================== --- vendor/mdocml/dist/Makefile Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/Makefile Sun Feb 19 17:41:20 2017 (r313956) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.493 2016/11/19 15:24:51 schwarze Exp $ +# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013-2016 Ingo Schwarze +# Copyright (c) 2011, 2013-2017 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,11 +15,12 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.14.0 +VERSION = 1.14.1 # === LIST OF FILES ==================================================== TESTSRCS = test-be32toh.c \ + test-cmsg.c \ test-dirent-namlen.c \ test-EFTYPE.c \ test-err.c \ @@ -30,10 +31,12 @@ TESTSRCS = test-be32toh.c \ test-mkdtemp.c \ test-nanosleep.c \ test-ntohl.c \ + test-O_DIRECTORY.c \ test-ohash.c \ test-PATH_MAX.c \ test-pledge.c \ test-progname.c \ + test-recvmsg.c \ test-reallocarray.c \ test-rewb-bsd.c \ test-rewb-sysv.c \ @@ -49,6 +52,7 @@ TESTSRCS = test-be32toh.c \ test-wchar.c SRCS = att.c \ + catman.c \ cgi.c \ chars.c \ compat_err.c \ @@ -89,6 +93,7 @@ SRCS = att.c \ mandoc.c \ mandoc_aux.c \ mandoc_ohash.c \ + mandocd.c \ mandocdb.c \ manpage.c \ manpath.c \ @@ -128,6 +133,7 @@ DISTFILES = INSTALL \ NEWS \ TODO \ apropos.1 \ + catman.8 \ cgi.h.example \ compat_fts.h \ compat_ohash.h \ @@ -156,6 +162,7 @@ DISTFILES = INSTALL \ man.cgi.8 \ man.conf.5 \ man.h \ + man.options.1 \ manconf.h \ mandoc.1 \ mandoc.3 \ @@ -169,6 +176,7 @@ DISTFILES = INSTALL \ mandoc_html.3 \ mandoc_malloc.3 \ mandoc_ohash.h \ + mandocd.8 \ mansearch.3 \ mansearch.h \ mchars_alloc.3 \ @@ -280,6 +288,12 @@ CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ out.o +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + MANPAGE_OBJS = $(DBM_OBJS) \ manpage.o \ manpath.o @@ -298,6 +312,7 @@ WWW_MANS = apropos.1.html \ man.1.html \ mandoc.1.html \ soelim.1.html \ + man.cgi.3.html \ mandoc.3.html \ mandoc_escape.3.html \ mandoc_headers.3.html \ @@ -311,11 +326,12 @@ WWW_MANS = apropos.1.html \ eqn.7.html \ man.7.html \ mandoc_char.7.html \ + mandocd.8.html \ mdoc.7.html \ roff.7.html \ tbl.7.html \ + catman.8.html \ makewhatis.8.html \ - man.cgi.3.html \ man.cgi.8.html \ man.h.html \ manconf.h.html \ @@ -334,11 +350,7 @@ include Makefile.local # === DEPENDENCY HANDLING ============================================== -all: base-build $(BUILD_TARGETS) Makefile.local - -base-build: mandoc demandoc soelim - -cgi-build: man.cgi +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local install: base-install $(INSTALL_TARGETS) @@ -360,13 +372,14 @@ clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) rm -f mandoc $(MAIN_OBJS) rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman $(MANDOCD_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) rm -f soelim $(SOELIM_OBJS) rm -f $(WWW_MANS) $(WWW_OBJS) rm -rf *.dSYM -base-install: base-build +base-install: mandoc demandoc soelim mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SBINDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 @@ -375,29 +388,29 @@ base-install: base-build mkdir -p $(DESTDIR)$(MANDIR)/man8 $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) - ln -f $(DESTDIR)$(BINDIR)/mandoc \ + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc \ $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 - ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 - $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 - $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 - $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7 - $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7 - $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7 - $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 $(INSTALL_MAN) makewhatis.8 \ $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 -lib-install: base-build +lib-install: libmandoc.a mkdir -p $(DESTDIR)$(LIBDIR) mkdir -p $(DESTDIR)$(INCLUDEDIR) mkdir -p $(DESTDIR)$(MANDIR)/man3 @@ -407,13 +420,70 @@ lib-install: base-build $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 -cgi-install: cgi-build +cgi-install: man.cgi mkdir -p $(DESTDIR)$(CGIBINDIR) mkdir -p $(DESTDIR)$(HTDOCDIR) $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) -Makefile.local config.h: configure ${TESTSRCS} +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) @echo "$@ is out of date; please run ./configure" @exit 1 @@ -429,6 +499,12 @@ manpage: $(MANPAGE_OBJS) libmandoc.a man.cgi: $(CGI_OBJS) libmandoc.a $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + demandoc: $(DEMANDOC_OBJS) libmandoc.a $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) @@ -453,14 +529,40 @@ depend: config.h Makefile.depend > Makefile.tmp mv Makefile.tmp Makefile.depend +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + dist: mdocml.sha256 mdocml.sha256: mdocml.tar.gz sha256 mdocml.tar.gz > $@ mdocml.tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true mkdir -p .dist/mdocml-$(VERSION)/ $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + cp -pR regress .dist/mdocml-$(VERSION) + find .dist/mdocml-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf chmod 755 .dist/mdocml-$(VERSION)/configure ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) rm -rf .dist/ Modified: vendor/mdocml/dist/Makefile.depend ============================================================================== --- vendor/mdocml/dist/Makefile.depend Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/Makefile.depend Sun Feb 19 17:41:20 2017 (r313956) @@ -1,4 +1,5 @@ att.o: att.c config.h roff.h mdoc.h libmdoc.h +catman.o: catman.c config.h compat_fts.h cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h compat_err.o: compat_err.c config.h @@ -39,6 +40,7 @@ man_validate.o: man_validate.c config.h mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h +mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h manpage.o: manpage.c config.h manconf.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h Modified: vendor/mdocml/dist/NEWS ============================================================================== --- vendor/mdocml/dist/NEWS Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/NEWS Sun Feb 19 17:41:20 2017 (r313956) @@ -1,7 +1,131 @@ -$Id: NEWS,v 1.12 2016/07/14 11:09:06 schwarze Exp $ +$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. +Changes in version 1.14.1, released on February XXX, 2017 + + --- MAJOR NEW FEATURES --- + * apropos(1): Reimplement complete semantic search functionality + without the dependency on SQLite3, using only POSIX APIs. + This comes with a completely new mandoc.db(5) file format. + * man(1): Support more than one tag entry for the same search term, + plus some minor improvements to the less(1) :t support. + * -Thtml: Use real macro names for CSS classes. + Systematic cleanup of and many improvements to mandoc.css. + * -Thtml: Produce human readable HTML code by using indentation + and better line breaks. Improve various HTML elements, + and trim several useless ones. + * New catman(8) utility, still somewhat experimental. + * Now includes a portable version of the OpenBSD mandoc regression + suite, see regress/regress.pl.1 for details. + --- REMOVED FUNCTIONALITY --- + * Operating systems that don't provide mmap(3) are no longer supported. + * Drop support for manpath(1). Even if your system has manpath(1), + it is simpler to use MANPATH_DEFAULT in configure.local for + operating system defaults, man.conf(5) for machine-specific + modifications, and ${MANPATH}, -m, and -M for user preferences + than to bother with the complexity of manpath(1). + * makewhatis(8) -p: No longer warn about missing MLINKS since these + are no longer needed for anything. + --- MINOR NEW FEATURES --- + * mdoc(7): Warn about invalid punctuation and content below NAME. + * mdoc(7): Warn about .Xr lacking the second argument (section). + * mdoc(7): Warn about violations of the rule "new sentence, new line". + * roff(7): Warn about trailing whitespace at the end of comments. + * mdoc(7): Improve rendering of double quotes. + * mdoc(7): Always do text production in the validator, never in the + formatters. Cleaner, simpler, shorter, helps NetBSD apropos(1) + and also makes -Ttree output more useful. + * -Ttree: Show metadata and some additional node flags. + New -Onoval output option to show the unvalidated tree. + --- RELIABILITY BUGFIXES --- + * man(1): Make "man -l" work with standard input from a pipe or file, + as long as standard output is a terminal. + * man(7): Fix out of bounds read access if a text node immediately + preceded the first .SH header. + * mdoc(7): Fix out of bounds read access for .Bl without a type + but with a width. + * mdoc(7): Fix out of bounds read access for .Bl -column starting + with a tab character instead of a child .It macro. + * mdoc(7): Fix syntax tree corruption leading to segfaults caused + by stray block end macros in nested blocks of mismatching type. + * man(1): Fix NULL dereference when the first of multiple pages + shown was preformatted. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by partial implicit macros inside .Bl -column table cells. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + for macro sequences like .Bl .Bl .It Bo .El .It. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by .Ta following a nested .Bl -column breaking another block. + * mdoc(7): Fix syntax tree corruption sometimes leading to NULL + dereference caused by indirectly broken .Nd or .Nm blocks. + * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns. + * mdoc(7): Fix NULL dereference in some specific cases of a + block-end macro calling another block-end macro. + * mdoc(7): Fix NULL dereference if the only child of the head + of the first .Sh was an empty in-line macro. + * eqn(7): Fix NULL dereference in the terminal formatter + for empty matrices and empty square roots. + * mdoc(7): Fix an assertion failure for a .Bd without a type that + breaks another block. + * mdoc(7): Fix an assertion failure that happened for some .Bl -column + lists containing a column width of "-4n", "-3n", or "-2n". + * mdoc(7): Fix an assertion failure caused by .Bl -column without .It + but containing eqn(7) or tbl(7) code. + * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf. + * roff(7): Fix an assertion failures caused by whitespace inside \o'' + (overstrike) sequences. + * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of + excessive length. + --- PORTABILITY IMPROVEMENTS --- + * man(1): Do not mix stdio narrow and wide stream orientation + on stdout, which could cause output corruption on glibc. + * mandoc(1): Autodetect a suitable locale for -Tutf8 mode. + * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined. + * ./configure: Autodetect if nanosleep(3) needs -lrt. + * ./configure: Provide an ${LN} configuration variable. + * ./configure: Put compiler arguments that may contain -l at the end. + --- MINOR BUGFIXES --- + * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro. + * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags. + * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode. + * mandoc(1): Error out on invalid output options on the command line. + --- STRUCTURAL CHANGES, no functional change --- + * Redesign part of the mandoc_html(3) interfaces, making them much + easier to use and reducing the amount of code by a few hundred lines. + --- THANKS TO --- + * Michael Stapelberg (Debian) for designing the new mandocd(8) + and parts of the new catman(8), and for a number of patches + and bug reports. + * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8) + implementation and suggesting an algorithmic improvement which + more than doubled performance, and for a few bug reports. + * Ed Maste (FreeBSD) for an important patch improving reproducibility + of builds in makewhatis(8), and for a few bug reports. + * Theo Buehler (OpenBSD) for more than ten important bug reports, + most of them found by systematic afl(1) fuzzing. + * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov + for crucial help in getting .Bl -tag CSS formatting fixed. + * Svyatoslav Mishyn (Crux Linux) for an initial version of the + patch to autodetect a suitable locale for -Tutf8 mode. + * Jason McIntyre (OpenBSD) for multiple useful discussions + and a number of bug reports. + * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley, + Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren, + Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav + Upadhyay, Christos Zoulas, Kamil Rytarowski, Sevan Janiyan, + Thomas Klausner (NetBSD), Aaron M. Ucko, Bdale Garbee, Reiner + Herrmann, Shane Kerr (Debian), Leah Neukirchen (Void Linux), + Daniel Sabogal (Alpine Linux), Yuri Pankov (illumos), + Carsten Kunze (Heirloom roff), Kristaps Dzonsons (bsd.lv), + Anton Lindqvist, Jan Stary, Jeremy A. Mates, Mark Patruck, + Pavan Maddamsetti, Sean Levy , and + Tiago Silva for bug reports. + * Brent Cook, Marc Espie, Philip Guenther, Todd Miller (OpenBSD) + and Markus Waldeck for useful discussions. + * And as usual, OpenCSW for providing me with a Solaris 9/10/11 + testing environment. + Changes in version 1.13.4, released on July 14, 2016 --- MAJOR NEW FEATURES --- @@ -109,7 +233,7 @@ Changes in version 1.13.4, released on J again resulting in more than half a dozen important bug reports. * Svyatoslav Mishyn (Crux Linux) for some patches, several bug reports, and extensive release testing. - * Christian Neukirchen (void Linux) for a number of compatibility + * Leah Neukirchen (Void Linux) for a number of compatibility patches and suggestions and several bug reports. * Christos Zoulas (NetBSD) for a bug fix patch and some useful suggestions for cleanup. Modified: vendor/mdocml/dist/TODO ============================================================================== --- vendor/mdocml/dist/TODO Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/TODO Sun Feb 19 17:41:20 2017 (r313956) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.223 2017/01/17 15:32:43 schwarze Exp $ +* $Id: TODO,v 1.234 2017/02/18 11:53:33 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -193,10 +193,6 @@ are mere guesses, and some may be wrong. uqs@ Thu, 2 Jun 2011 11:33:35 +0200 loc * exist ** algo *** size * imp ** ---- missing man features ----------------------------------------------- - -- -T[x]html doesn't stipulate non-collapsing spaces in literal mode - --- missing tbl features ----------------------------------------------- - horizontal lines in the layout still consume data cells @@ -223,13 +219,16 @@ are mere guesses, and some may be wrong. - support mdoc(7) and man(7) macros inside tbl(7) code; probably requires the parser reorg and letting tbl(7) use roff_node such that macro sets can mix; - informed by bapt@ that FreeBSD needs this. + informed by bapt@ that FreeBSD needs this: 3 Jan 2015 23:32:23 +0100 loc *** exist ** algo *** size ** imp *** - look at the POSIX manuals in the books/man-pages-posix port, they use some unsupported tbl(7) features. loc * exist ** algo ** size ** imp *** +- look what Joerg Schilling manual pages use + Thu, 19 Mar 2015 18:31:48 +0100 + - use Unicode U+2500 to U+256C for table borders in tbl(7) -Tutf-8 output suggested by bentley@ Tue, 14 Oct 2014 04:10:55 -0600 @@ -263,15 +262,6 @@ are mere guesses, and some may be wrong. even for apropos title line output; req by bapt@ loc * exist * algo * size * imp *** -- makewhatis(8) for preformatted pages: - parse the section number from the header line - and compare to the section number from the directory name - loc * exist * algo * size * imp ** - -- Does makewhatis(8) detect missing NAME sections, missing names, - and missing descriptions in all the file formats? - loc * exist * algo * size * imp *** - - clean up escape sequence handling, creating three classes: (1) fully implemented, or parsed and ignored without loss of content (2) unimplemented, potentially causing loss of content @@ -300,6 +290,8 @@ are mere guesses, and some may be wrong. - look at AT&T DWB http://www2.research.att.com/sw/download Carsten Kunze has patches Mon, 4 Aug 2014 17:01:28 +0200 + ported version: https://github.com/n-t-roff/DWB3.3 + Carsten Kunze Wed, 22 Apr 2015 11:21:43 +0200 - look at pages generated from reStructeredText, e.g. devel/mercurial hg(1) These are a weird mixture of man(7) and custom autogenerated low-level @@ -334,6 +326,9 @@ are mere guesses, and some may be wrong. https://github.com/schmonz/ikiwiki/compare/mandoc Amitai Schlair Mon, 19 May 2014 14:05:53 -0400 +- check features of the Slackware man.conf(5) format + Carsten Kunze Wed, 11 Mar 2015 17:57:24 +0100 + ************************************************************************ * formatting issues: ugly output ************************************************************************ @@ -394,7 +389,7 @@ are mere guesses, and some may be wrong. reveals lots of bugs both in groff and mandoc... reported by bentley@ Wed, 22 May 2013 23:49:30 -0600 ---- PDF issues --------------------------------------------------------- +--- PostScript and PDF issues ------------------------------------------ - PDF output doesn't use a monospaced font for .Bd -literal Example: "mandoc -Tpdf afterboot.8 > output.pdf && pdfviewer output.pdf". @@ -404,21 +399,11 @@ are mere guesses, and some may be wrong. instructions from juanfra@ Wed, 11 Jun 2014 02:21:01 +0200 add a new <> block to the PDF files with /BaseFont /Courier and change the /Name from /F0 to the new font (/F5 (?)). + re-reported by tb@ Mon, 16 Mar 2015 16:47:21 +0100 loc * exist ** algo ** size * imp ** --- HTML issues -------------------------------------------------------- --
formatting is ugly - hints are easy to find on the web, e.g. - http://stackoverflow.com/questions/1713048/ - see also matthew@ Fri, 18 Jul 2014 19:25:12 -0700 - loc * exist * algo ** size * imp *** - -- In -man -Thtml, .nf does not preserve indentation. - It should either convert blanks to   - or use
 rather than 
(like .Bd -literal does). - Reported by afresh1@ 12 Apr 2016 14:35:45 -0700 - - .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal space, see for example random(3). Introduced in http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92 @@ -427,6 +412,9 @@ are mere guesses, and some may be wrong. - jsg on icb, Nov 3, 2014: try to guess Xr in man(7) for hyperlinking + and render them with + https://github.com/Debian/debiman/issues/15 + loc * exist * algo ** size ** imp ** - The tables used to render the three-part page headers actually force the width of the to the max-width given for . @@ -435,9 +423,6 @@ are mere guesses, and some may be wrong. http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1 loc * exist * algo ** size * imp *** -- consider whether can be used for Ar Dv Er Ev Fa Va. - from bentley@ Wed, 13 Aug 2014 09:17:55 -0600 - - generate tags in HTML idea from florian@ Tue, 7 Apr 2015 00:26:28 +0000 may be possible to implement with .Lk img://something.png alt_text @@ -454,6 +439,9 @@ are mere guesses, and some may be wrong. Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 loc * exist ** algo ** size * imp ** +- .Lk formatting for long links with line breaks + Franco Fichtner 8 Oct 2013 00:33:42 +0200 + - In .Bl -enum -width 0n, groff continues one the same line after the number, mandoc breaks the line. mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 @@ -498,6 +486,7 @@ are mere guesses, and some may be wrong. The same applies to .Bl -column column widths; reported again by Nicolas Joly Thu, 1 Mar 2012 13:41:26 +0100 via wiz@ 5 Mar reported again by Franco Fichtner Fri, 27 Sep 2013 21:02:28 +0200 + reported again by Bruce Evans Fri, 17 Feb 2017 21:22:44 +0100 via bapt@ loc *** exist *** algo *** size ** imp *** An easy partial fix would be to just skip the first word if it starts with a dot, including any following white space, when measuring. @@ -508,12 +497,6 @@ are mere guesses, and some may be wrong. we want three blank lines, not two as in mandoc. loc ** exist ** algo ** size * imp ** -- Header lines of excessive length: - Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c - and document it in mdoc(7) and man(7) COMPATIBILITY - found while talking to Chris Bennett - loc * exist * algo * size * imp * - - Sequences of multiple man(7) paragraphs (.PP, .IP) interspersed with .ps and .nf/.fi produce execessive blank lines, see libJudy and graphics/dcmtk. The parser reorg may help with this. @@ -535,21 +518,10 @@ are mere guesses, and some may be wrong. to access the manpath and mandoc.db(3) after parsing. asked for by jmc@ Fri, 4 Dec 2015 22:39:40 +0000 -- Report errors in -O suboption parsing. - loc * exist * algo * size * imp ** - - warn when .Sh or .Ss contain other macros Steffen Nurpmeso, savannah.gnu.org/bugs/index.php?45034 loc * exist * algo * size * imp ** -- check that MANDOCERR_BADTAB is thrown in the right cases, - i.e. when finding a literal tab character in fill mode, - and possibly change the wording of the warning message - to refer to fill mode, not literal mode - See the mail from Werner LEMBERG on the groff list, - Fri, 14 Feb 2014 18:54:42 +0100 (CET) - loc * exist ** algo ** size * imp ** - - warn about attempts to call non-callable macros Steffen Nurpmeso Tue, 11 Nov 2014 22:55:16 +0100 Note that formatting is inconsistent in groff. @@ -558,9 +530,6 @@ are mere guesses, and some may be wrong. all over mdoc_macro.c and all subtly different. loc ** exist ** algo ** size ** imp ** -- warn about "new sentence, new line" - loc ** exist ** algo *** size * imp ** - - mandoc_special does not really check the escape sequence, but just the overall format loc ** exist ** algo *** size ** imp ** @@ -580,13 +549,6 @@ are mere guesses, and some may be wrong. * documentation issues ************************************************************************ -- mention hyphenation rules: - breaking at letter-letter in text mode (not macro args) - proper hyphenation is unimplemented - -- talk about spacing around delimiters - to jmc@, kristaps@ Sat, 23 Apr 2011 17:41:27 +0200 - - mark macros as: page structure domain, manual domain, general text domain is this useful? @@ -606,14 +568,8 @@ Several areas can be cleaned up to make - improve hashing mechanism for macros (quite important: performance) -- improve hashing mechanism for characters (not as important) - - the PDF file is HUGE: this can be reduced by using relative offsets -- instead of re-initialising the roff predefined-strings set before each - parse, create a read-only version the first time and copy it - loc * exist ** algo ** size * imp ** - ************************************************************************ * structural issues ************************************************************************ @@ -648,9 +604,6 @@ Several areas can be cleaned up to make output through libz. - Sandbox (see OpenSSH). - Enable caching support via HTTP 304 and If-Modified-Since. - - Allow for cgi.h to be overridden by CGI environment variables. - Otherwise, binary distributions will inherit the compile-time - behaviour, which is not optimal. - Have Mac OSX systems automatically disable -static compilation of the CGI: -static isn't supported. Modified: vendor/mdocml/dist/apropos.1 ============================================================================== --- vendor/mdocml/dist/apropos.1 Sun Feb 19 17:40:24 2017 (r313955) +++ vendor/mdocml/dist/apropos.1 Sun Feb 19 17:41:20 2017 (r313956) @@ -1,4 +1,4 @@ -.\" $Id: apropos.1,v 1.39 2015/04/03 08:46:17 schwarze Exp $ +.\" $Id: apropos.1,v 1.40 2017/01/31 19:44:04 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 3 2015 $ +.Dd $Mdocdate: January 31 2017 $ .Dt APROPOS 1 .Os .Sh NAME @@ -468,6 +468,10 @@ and in .Ox 5.6 for .Nm whatis . +The options +.Fl acfhIKklOTWw +appeared in +.Ox 5.7 . .Sh AUTHORS .An -nosplit .An Bill Joy Added: vendor/mdocml/dist/catman.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/dist/catman.8 Sun Feb 19 17:41:20 2017 (r313956) @@ -0,0 +1,186 @@ +.\" $Id: catman.8,v 1.7 2017/02/06 19:04:21 schwarze Exp $ +.\" +.\" Copyright (c) 2017 Ingo Schwarze +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: February 6 2017 $ +.Dt CATMAN 8 +.Os +.Sh NAME +.Nm catman +.Nd format all manual pages below a directory +.Sh SYNOPSIS +.Nm catman +.Op Fl I Cm os Ns = Ns Ar name +.Op Fl T Ar output +.Ar srcdir dstdir +.Sh DESCRIPTION +The +.Nm +utility assumes that all files below +.Ar srcdir +are manual pages in +.Xr mdoc 7 +and +.Xr man 7 +format and formats all of them, storing the formatted versions in +the same relative paths below +.Ar dstdir . +Subdirectories of +.Ar dstdir +are created as needed. +Existing files are not explicitly deleted, but possibly overwritten. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl I Cm os Ns = Ns Ar name +Override the default operating system +.Ar name +for the +.Xr mdoc 7 +.Ic Os +and for the +.Xr man 7 +.Ic TH +macro. +.It Fl T Ar output +Output format. +The +.Ar output +argument can be +.Cm ascii , +.Cm utf8 , +or +.Cm html ; +see +.Xr mandoc 1 . +In +.Cm html +output mode, the +.Cm fragment +output option is implied. +Other output options are not supported. +.El +.Sh IMPLEMENTATION NOTES +Since this version avoids +.Xr fork 2 +and +.Xr exec 3 +overhead and uses the much faster +.Sy mandoc +parsers and formatters rather than +.Sy groff , +it may be about one order of magnitude faster than other +.Nm +implementations. +.Sh EXIT STATUS +.Ex -std +.Pp +Possible errors include: +.Bl -bullet +.It +missing, invalid, or excessive command line arguments +.It +failure to change the current working directory to +.Ar srcdir +.It +failure to open +.Ar dstdir +.It +communication failure with +.Xr mandocd 8 +.It +resource exhaustion, for example file descriptor, process table, +or memory exhaustion +.El +.Pp +Except for memory exhaustion and similar system-level failures, +failures while trying to open, read, parse, or format individual +manual pages, to save individual formatted files to the file system, +or even to create directories do not cause +.Nm +to return an error exit status. +In such cases, +.Nm +will simply continue with the next file or subdirectory. +.Sh SEE ALSO +.Xr mandoc 1 , +.Xr mandocd 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 1.0 . +Other, incompatible implementations appeared in +.Nx 1.0 +and in +.Sy man-db No 2.2 . +.Pp +This version appeared in version 1.14.1 of the +.Sy mandoc +toolkit. +.Sh AUTHORS +.An -nosplit +The first +.Nm +implementation was a short shell script by +.An Christoph Robitschko +in July 1993. +.Pp +The +.Nx +implementations were written by +.An J. T. Conklin Aq Mt jtc@netbsd.org +in 1993, +.An Christian E. Hopps Aq Mt chopps@netbsd.org +in 1994, +and +.An Dante Profeta Aq Mt dante@netbsd.org +in 1999; the +.Sy man-db +implementation by +.An Graeme W. Wilford *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 17: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 2FE54CE2B87; Sun, 19 Feb 2017 17:42:07 +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 DA4931EBB; Sun, 19 Feb 2017 17:42:06 +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 v1JHg6qL009173; Sun, 19 Feb 2017 17:42:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHg5vT009167; Sun, 19 Feb 2017 17:42:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191742.v1JHg5vT009167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313957 - vendor/mdocml/1.4.1rc2 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, 19 Feb 2017 17:42:07 -0000 Author: bapt Date: Sun Feb 19 17:42:05 2017 New Revision: 313957 URL: https://svnweb.freebsd.org/changeset/base/313957 Log: Tag import of mandoc 1.4.1rc2 Added: vendor/mdocml/1.4.1rc2/ - copied from r313954, vendor/mdocml/dist/ vendor/mdocml/1.4.1rc2/catman.8 - copied unchanged from r313956, vendor/mdocml/dist/catman.8 vendor/mdocml/1.4.1rc2/catman.c - copied unchanged from r313956, vendor/mdocml/dist/catman.c vendor/mdocml/1.4.1rc2/man.options.1 - copied unchanged from r313956, vendor/mdocml/dist/man.options.1 vendor/mdocml/1.4.1rc2/mandocd.8 - copied unchanged from r313956, vendor/mdocml/dist/mandocd.8 vendor/mdocml/1.4.1rc2/mandocd.c - copied unchanged from r313956, vendor/mdocml/dist/mandocd.c vendor/mdocml/1.4.1rc2/test-O_DIRECTORY.c - copied unchanged from r313956, vendor/mdocml/dist/test-O_DIRECTORY.c vendor/mdocml/1.4.1rc2/test-cmsg.c - copied unchanged from r313956, vendor/mdocml/dist/test-cmsg.c vendor/mdocml/1.4.1rc2/test-recvmsg.c - copied unchanged from r313956, vendor/mdocml/dist/test-recvmsg.c Replaced: vendor/mdocml/1.4.1rc2/INSTALL - copied unchanged from r313956, vendor/mdocml/dist/INSTALL vendor/mdocml/1.4.1rc2/LICENSE - copied unchanged from r313956, vendor/mdocml/dist/LICENSE vendor/mdocml/1.4.1rc2/Makefile - copied unchanged from r313956, vendor/mdocml/dist/Makefile vendor/mdocml/1.4.1rc2/Makefile.depend - copied unchanged from r313956, vendor/mdocml/dist/Makefile.depend vendor/mdocml/1.4.1rc2/NEWS - copied unchanged from r313956, vendor/mdocml/dist/NEWS vendor/mdocml/1.4.1rc2/TODO - copied unchanged from r313956, vendor/mdocml/dist/TODO vendor/mdocml/1.4.1rc2/apropos.1 - copied unchanged from r313956, vendor/mdocml/dist/apropos.1 vendor/mdocml/1.4.1rc2/cgi.c - copied unchanged from r313956, vendor/mdocml/dist/cgi.c vendor/mdocml/1.4.1rc2/chars.c - copied unchanged from r313956, vendor/mdocml/dist/chars.c vendor/mdocml/1.4.1rc2/compat_fts.c - copied unchanged from r313956, vendor/mdocml/dist/compat_fts.c vendor/mdocml/1.4.1rc2/configure - copied unchanged from r313956, vendor/mdocml/dist/configure vendor/mdocml/1.4.1rc2/configure.local.example - copied unchanged from r313956, vendor/mdocml/dist/configure.local.example vendor/mdocml/1.4.1rc2/dba.c - copied unchanged from r313956, vendor/mdocml/dist/dba.c vendor/mdocml/1.4.1rc2/dbm_map.c - copied unchanged from r313956, vendor/mdocml/dist/dbm_map.c vendor/mdocml/1.4.1rc2/eqn_term.c - copied unchanged from r313956, vendor/mdocml/dist/eqn_term.c vendor/mdocml/1.4.1rc2/gmdiff - copied unchanged from r313956, vendor/mdocml/dist/gmdiff vendor/mdocml/1.4.1rc2/html.c - copied unchanged from r313956, vendor/mdocml/dist/html.c vendor/mdocml/1.4.1rc2/html.h - copied unchanged from r313956, vendor/mdocml/dist/html.h vendor/mdocml/1.4.1rc2/libmandoc.h - copied unchanged from r313956, vendor/mdocml/dist/libmandoc.h vendor/mdocml/1.4.1rc2/libmdoc.h - copied unchanged from r313956, vendor/mdocml/dist/libmdoc.h vendor/mdocml/1.4.1rc2/main.c - copied unchanged from r313956, vendor/mdocml/dist/main.c vendor/mdocml/1.4.1rc2/man.1 - copied unchanged from r313956, vendor/mdocml/dist/man.1 vendor/mdocml/1.4.1rc2/man_html.c - copied unchanged from r313956, vendor/mdocml/dist/man_html.c vendor/mdocml/1.4.1rc2/man_term.c - copied unchanged from r313956, vendor/mdocml/dist/man_term.c vendor/mdocml/1.4.1rc2/manconf.h - copied unchanged from r313956, vendor/mdocml/dist/manconf.h vendor/mdocml/1.4.1rc2/mandoc.1 - copied unchanged from r313956, vendor/mdocml/dist/mandoc.1 vendor/mdocml/1.4.1rc2/mandoc.css - copied unchanged from r313956, vendor/mdocml/dist/mandoc.css vendor/mdocml/1.4.1rc2/mandoc.h - copied unchanged from r313956, vendor/mdocml/dist/mandoc.h vendor/mdocml/1.4.1rc2/mandoc_aux.h - copied unchanged from r313956, vendor/mdocml/dist/mandoc_aux.h vendor/mdocml/1.4.1rc2/mandoc_char.7 - copied unchanged from r313956, vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/1.4.1rc2/mandoc_html.3 - copied unchanged from r313956, vendor/mdocml/dist/mandoc_html.3 vendor/mdocml/1.4.1rc2/mandocdb.c - copied unchanged from r313956, vendor/mdocml/dist/mandocdb.c vendor/mdocml/1.4.1rc2/manpath.c - copied unchanged from r313956, vendor/mdocml/dist/manpath.c vendor/mdocml/1.4.1rc2/mdoc.7 - copied unchanged from r313956, vendor/mdocml/dist/mdoc.7 vendor/mdocml/1.4.1rc2/mdoc.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc.c vendor/mdocml/1.4.1rc2/mdoc_html.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_html.c vendor/mdocml/1.4.1rc2/mdoc_macro.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/1.4.1rc2/mdoc_man.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_man.c vendor/mdocml/1.4.1rc2/mdoc_term.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_term.c vendor/mdocml/1.4.1rc2/mdoc_validate.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/1.4.1rc2/preconv.c - copied unchanged from r313956, vendor/mdocml/dist/preconv.c vendor/mdocml/1.4.1rc2/read.c - copied unchanged from r313956, vendor/mdocml/dist/read.c vendor/mdocml/1.4.1rc2/roff.c - copied unchanged from r313956, vendor/mdocml/dist/roff.c vendor/mdocml/1.4.1rc2/roff.h - copied unchanged from r313956, vendor/mdocml/dist/roff.h vendor/mdocml/1.4.1rc2/tag.c - copied unchanged from r313956, vendor/mdocml/dist/tag.c vendor/mdocml/1.4.1rc2/tbl_html.c - copied unchanged from r313956, vendor/mdocml/dist/tbl_html.c vendor/mdocml/1.4.1rc2/term_ps.c - copied unchanged from r313956, vendor/mdocml/dist/term_ps.c vendor/mdocml/1.4.1rc2/tree.c - copied unchanged from r313956, vendor/mdocml/dist/tree.c Copied: vendor/mdocml/1.4.1rc2/INSTALL (from r313956, vendor/mdocml/dist/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1rc2/INSTALL Sun Feb 19 17:42:05 2017 (r313957, copy of r313956, vendor/mdocml/dist/INSTALL) @@ -0,0 +1,157 @@ +$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ + +About mdocml, the portable mandoc distribution +---------------------------------------------- +The mandoc manpage compiler toolset is a suite of tools compiling +mdoc(7), the roff(7) macro language of choice for BSD manual pages, +and man(7), the predominant historical language for UNIX manuals. +It includes a man(1) manual viewer and additional tools. +For general information, see . + +In case you have questions or want to provide feedback, read +. Consider subscribing to the +discuss@ mailing list mentioned on that page. If you intend to +help with the development of mandoc, consider subscribing to the +tech@ mailing list, too. + +Enjoy using the mandoc toolset! + +Ingo Schwarze, Karlsruhe, February 2017 + + +Installation +------------ +Before manually installing mandoc on your system, please check +whether the newest version of mandoc is already installed by default +or available via a binary package or a ports system. A list of the +latest bundled and ported versions of mandoc for various operating +systems is maintained at . + +Regarding how packages and ports are maintained for your operating +system, please consult your operating system documentation. +To install mandoc manually, the following steps are needed: + +1. If you want to build the CGI program, man.cgi(8), too, +run the command "echo BUILD_CGI=1 >> configure.local". +Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. + +2. If you also want to build the new catman(8) utility, run the +command "echo BUILD_CATMAN=1 >> configure.local". Note that it +is unlikely to be a drop-in replacement providing the same +functionality as your system's "catman", if your operating +system contains one. + +3. Define MANPATH_DEFAULT in configure.local +if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate +for your operating system. + +4. Run "./configure". +This script attempts autoconfiguration of mandoc for your system. +Read both its standard output and the file "Makefile.local" it +generates. If anything looks wrong or different from what you +wish, read the file "configure.local.example", create and edit +a file "configure.local", and re-run "./configure" until the +result seems right to you. +On Solaris 10 and earlier, you may have to run "ksh ./configure" +because the native /bin/sh lacks some POSIX features. + +5. Run "make". +Any POSIX-compatible make, in particular both BSD make and GNU make, +should work. If the build fails, look at "configure.local.example" +and go back to step 2. + +6. Run "make -n install" and check whether everything will be +installed to the intended places. Otherwise, put some *DIR or *NM* +variables into "configure.local" and go back to step 4. + +7. Optionally run the regression suite. +Basically, that amounts to "cd regress && ./regress.pl". +But you should probably look at "./mandoc -l regress/regress.pl.1" +first. + +8. Run "sudo make install". If you intend to build a binary +package using some kind of fake root mechanism, you may need a +command like "make DESTDIR=... install". Read the *-install targets +in the "Makefile" to understand how DESTDIR is used. + +9. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 6. Whenever installing +new manual pages, re-run makewhatis(8) to update the databases, or +apropos(1) will not find the new pages. + +10. To set up a man.cgi(8) server, read its manual page. + +Note that some man(7) pages may contain low-level roff(7) markup +that mandoc does not yet understand. On some BSD systems using +mandoc, third-party software is vetted on whether it may be formatted +with mandoc. If not, groff(1) is pulled in as a dependency and +used to install a pre-formatted "catpage" instead of directly as +manual page source. + + +Understanding mandoc dependencies +--------------------------------- +The following libraries are required: + +1. zlib for decompressing gzipped manual pages. + +2. The fts(3) directory traversion functions. +If your system does not have them, the bundled compatibility version +will be used, so you need not worry in that case. But be careful: old +glibc versions of fts(3) were known to be broken on 32bit platforms, +see . +That was presumably fixed in glibc-2.23. +If you run into that problem, set "HAVE_FTS=0" in configure.local. + +3. Marc Espie's ohash(3) library. +If your system does not have it, the bundled compatibility version +will be used, so you probably need not worry about it. + +One of the chief design goals of the mandoc toolbox is to make +sure that nothing related to documentation requires C++. +Consequently, linking mandoc against any kind of C++ program +would defeat the purpose and is not supported. + + +Checking autoconfiguration quality +---------------------------------- +If you want to check whether automatic configuration works well +on your platform, consider the following: + +The mandoc package intentionally does not use GNU autoconf because +we consider that toolset a blatant example of overengineering that +is obsolete nowadays, since all modern operating systems are now +reasonably close to POSIX and do not need arcane shell magic any +longer. If your system does need such magic, consider upgrading +to reasonably modern POSIX-compliant tools rather than asking for +autoconf-style workarounds. + +As far as mandoc is using any features not mandated by ANSI X3.159-1989 +("ANSI C") or IEEE Std 1003.1-2008 ("POSIX") that some modern systems +do not have, we intend to provide autoconfiguration tests and +compat_*.c implementations. Please report any that turn out to be +missing. Note that while we do strive to produce portable code, +we do not slavishly restrict ourselves to POSIX-only interfaces. +For improved security and readability, we do use well-designed, +modern interfaces like reallocarray(3) even if they are still rather +uncommon, of course bundling compat_*.c implementations as needed. + +Where mandoc is using ANSI C or POSIX features that some systems +still lack and that compat_*.c implementations can be provided for +without too much hassle, we will consider adding them, too, so +please report whatever is missing on your platform. + +The following steps can be used to manually check the automatic +configuration on your platform: + +1. Run "make distclean". + +2. Run "./configure" + +3. Read the file "config.log". It shows the compiler commands used +to test the libraries installed on your system and the standard +output and standard error output these commands produce. Watch out +for unexpected failures. Those are most likely to happen if headers +or libraries are installed in unusual places or interfaces defined +in unusual headers. You can also look at the file "config.h" and +check that no "#define HAVE_*" differ from your expectations. Copied: vendor/mdocml/1.4.1rc2/LICENSE (from r313956, vendor/mdocml/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1rc2/LICENSE Sun Feb 19 17:42:05 2017 (r313957, copy of r313956, vendor/mdocml/dist/LICENSE) @@ -0,0 +1,54 @@ +$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $ + +With the exceptions noted below, all code and documentation +contained in the mdocml toolkit is protected by the Copyright +of the following developers: + +Copyright (c) 2008-2012, 2014 Kristaps Dzonsons +Copyright (c) 2010-2016 Ingo Schwarze +Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger +Copyright (c) 2013 Franco Fichtner +Copyright (c) 2014 Baptiste Daroussin +Copyright (c) 2016 Ed Maste +Copyright (c) 2017 Michael Stapelberg +Copyright (c) 1999, 2004 Marc Espie +Copyright (c) 1998, 2004, 2010 Todd C. Miller +Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2004 Ted Unangst +Copyright (c) 1994 Christos Zoulas +Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre + +See the individual source files for information about who contributed +to which file during which years. + + +The mdocml distribution as a whole is distributed by its developers +under the following license: + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +The following files included from outside sources are protected by +other people's Copyright and are distributed under various 2-clause +and 3-clause BSD licenses; see these individual files for details. + +soelim.c, soelim.1: +Copyright (c) 2014 Baptiste Daroussin + +compat_err.c, compat_fts.c, compat_fts.h, +compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, +man.1: +Copyright (c) 1989,1990,1993,1994 The Regents of the University of California + +compat_stringlist.c, compat_stringlist.h: +Copyright (c) 1994 Christos Zoulas Copied: vendor/mdocml/1.4.1rc2/Makefile (from r313956, vendor/mdocml/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1rc2/Makefile Sun Feb 19 17:42:05 2017 (r313957, copy of r313956, vendor/mdocml/dist/Makefile) @@ -0,0 +1,580 @@ +# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $ +# +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# Copyright (c) 2011, 2013-2017 Ingo Schwarze +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +VERSION = 1.14.1 + +# === LIST OF FILES ==================================================== + +TESTSRCS = test-be32toh.c \ + test-cmsg.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ + test-err.c \ + test-fts.c \ + test-getline.c \ + test-getsubopt.c \ + test-isblank.c \ + test-mkdtemp.c \ + test-nanosleep.c \ + test-ntohl.c \ + test-O_DIRECTORY.c \ + test-ohash.c \ + test-PATH_MAX.c \ + test-pledge.c \ + test-progname.c \ + test-recvmsg.c \ + test-reallocarray.c \ + test-rewb-bsd.c \ + test-rewb-sysv.c \ + test-sandbox_init.c \ + test-strcasestr.c \ + test-stringlist.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-vasprintf.c \ + test-wchar.c + +SRCS = att.c \ + catman.c \ + cgi.c \ + chars.c \ + compat_err.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ + compat_isblank.c \ + compat_mkdtemp.c \ + compat_ohash.c \ + compat_progname.c \ + compat_reallocarray.c \ + compat_strcasestr.c \ + compat_stringlist.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strsep.c \ + compat_strtonum.c \ + compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_hash.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandoc_ohash.c \ + mandocd.c \ + mandocdb.c \ + manpage.c \ + manpath.c \ + mansearch.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_hash.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_state.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + soelim.c \ + st.c \ + tag.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + tree.c + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + catman.8 \ + cgi.h.example \ + compat_fts.h \ + compat_ohash.h \ + compat_stringlist.h \ + configure \ + configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ + demandoc.1 \ + eqn.7 \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + libroff.h \ + main.h \ + makewhatis.8 \ + man.1 \ + man.7 \ + man.cgi.3 \ + man.cgi.8 \ + man.conf.5 \ + man.h \ + man.options.1 \ + manconf.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.css \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + mandoc_ohash.h \ + mandocd.8 \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + roff.h \ + roff_int.h \ + soelim.1 \ + st.in \ + tag.h \ + tbl.3 \ + tbl.7 \ + term.h \ + $(SRCS) \ + $(TESTSRCS) + +LIBMAN_OBJS = man.o \ + man_hash.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_hash.o \ + mdoc_macro.o \ + mdoc_state.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + mandoc_ohash.o \ + msec.o \ + preconv.o \ + read.o + +COMPAT_OBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ + compat_isblank.o \ + compat_mkdtemp.o \ + compat_ohash.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_strcasestr.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strsep.o \ + compat_strtonum.o \ + compat_vasprintf.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + tbl_html.o + +MANDOC_MAN_OBJS = mdoc_man.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + tbl_term.o + +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ + main.o \ + manpath.o \ + out.o \ + tag.o \ + tree.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ + cgi.o \ + out.o + +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + +MANPAGE_OBJS = $(DBM_OBJS) \ + manpage.o \ + manpath.o + +DEMANDOC_OBJS = demandoc.o + +SOELIM_OBJS = soelim.o \ + compat_err.o \ + compat_getline.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_stringlist.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + mandoc.1.html \ + soelim.1.html \ + man.cgi.3.html \ + mandoc.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + man.conf.5.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mandocd.8.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + catman.8.html \ + makewhatis.8.html \ + man.cgi.8.html \ + man.h.html \ + manconf.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + mansearch.h.html \ + mdoc.h.html \ + roff.h.html + +WWW_OBJS = mdocml.tar.gz \ + mdocml.sha256 + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_OBJS) $(WWW_MANS) + +$(WWW_MANS): mandoc + +.PHONY: base-install cgi-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) + rm -f mandoc $(MAIN_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman $(MANDOCD_OBJS) + rm -f manpage $(MANPAGE_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f soelim $(SOELIM_OBJS) + rm -f $(WWW_MANS) $(WWW_OBJS) + rm -rf *.dSYM + +base-install: mandoc demandoc soelim + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc \ + $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + $(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) + +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) + @echo "$@ is out of date; please run ./configure" + @exit 1 + +libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) + +manpage: $(MANPAGE_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD) + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) + +soelim: $(SOELIM_OBJS) + $(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS) + +# --- maintainer targets --- + +www-install: www + mkdir -p $(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + +dist: mdocml.sha256 + +mdocml.sha256: mdocml.tar.gz + sha256 mdocml.tar.gz > $@ + +mdocml.tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true + mkdir -p .dist/mdocml-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + cp -pR regress .dist/mdocml-$(VERSION) + find .dist/mdocml-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf + chmod 755 .dist/mdocml-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) + rm -rf .dist/ + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc + ./mandoc -Thtml -Wall,stop \ + -Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@ Copied: vendor/mdocml/1.4.1rc2/Makefile.depend (from r313956, vendor/mdocml/dist/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1rc2/Makefile.depend Sun Feb 19 17:42:05 2017 (r313957, copy of r313956, vendor/mdocml/dist/Makefile.depend) @@ -0,0 +1,74 @@ +att.o: att.c config.h roff.h mdoc.h libmdoc.h +catman.o: catman.c config.h compat_fts.h +cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h +chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h +compat_err.o: compat_err.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h +compat_getline.o: compat_getline.c config.h +compat_getsubopt.o: compat_getsubopt.c config.h +compat_isblank.o: compat_isblank.c config.h +compat_mkdtemp.o: compat_mkdtemp.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h +compat_progname.o: compat_progname.c config.h +compat_reallocarray.o: compat_reallocarray.c config.h +compat_strcasestr.o: compat_strcasestr.c config.h +compat_stringlist.o: compat_stringlist.c config.h compat_stringlist.h +compat_strlcat.o: compat_strlcat.c config.h +compat_strlcpy.o: compat_strlcpy.c config.h +compat_strsep.o: compat_strsep.c config.h +compat_strtonum.o: compat_strtonum.c config.h +compat_vasprintf.o: compat_vasprintf.c config.h +dba.o: dba.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mansearch.h dba_write.h dba_array.h dba.h +dba_array.o: dba_array.c mandoc_aux.h dba_write.h dba_array.h +dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_array.h dba.h dbm.h +dba_write.o: dba_write.c config.h dba_write.h +dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h +dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h +demandoc.o: demandoc.c config.h roff.h man.h mdoc.h mandoc.h +eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h +eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h +html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h manconf.h main.h +lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in +main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h +man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h +man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h +man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h +man_validate.o: man_validate.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h +mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h +mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h +mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h +mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h +manpage.o: manpage.c config.h manconf.h mansearch.h +manpath.o: manpath.c config.h mandoc_aux.h manconf.h +mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h +mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h +mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h +mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h +mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h +mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +out.o: out.c config.h mandoc_aux.h mandoc.h out.h +preconv.o: preconv.c config.h mandoc.h libmandoc.h +read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff_int.h +roff.o: roff.c config.h mandoc.h mandoc_aux.h roff.h libmandoc.h roff_int.h libroff.h predefs.in +soelim.o: soelim.c config.h compat_stringlist.h +st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in +tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h +tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h +tbl_layout.o: tbl_layout.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h +tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h +term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h manconf.h main.h +term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h manconf.h main.h +tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h main.h Copied: vendor/mdocml/1.4.1rc2/NEWS (from r313956, vendor/mdocml/dist/NEWS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1rc2/NEWS Sun Feb 19 17:42:05 2017 (r313957, copy of r313956, vendor/mdocml/dist/NEWS) @@ -0,0 +1,888 @@ +$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $ + +This file lists the most important changes in the mdocml.bsd.lv distribution. + +Changes in version 1.14.1, released on February XXX, 2017 + + --- MAJOR NEW FEATURES --- + * apropos(1): Reimplement complete semantic search functionality + without the dependency on SQLite3, using only POSIX APIs. + This comes with a completely new mandoc.db(5) file format. + * man(1): Support more than one tag entry for the same search term, + plus some minor improvements to the less(1) :t support. + * -Thtml: Use real macro names for CSS classes. + Systematic cleanup of and many improvements to mandoc.css. + * -Thtml: Produce human readable HTML code by using indentation + and better line breaks. Improve various HTML elements, + and trim several useless ones. + * New catman(8) utility, still somewhat experimental. + * Now includes a portable version of the OpenBSD mandoc regression + suite, see regress/regress.pl.1 for details. + --- REMOVED FUNCTIONALITY --- + * Operating systems that don't provide mmap(3) are no longer supported. + * Drop support for manpath(1). Even if your system has manpath(1), + it is simpler to use MANPATH_DEFAULT in configure.local for + operating system defaults, man.conf(5) for machine-specific + modifications, and ${MANPATH}, -m, and -M for user preferences + than to bother with the complexity of manpath(1). + * makewhatis(8) -p: No longer warn about missing MLINKS since these + are no longer needed for anything. + --- MINOR NEW FEATURES --- + * mdoc(7): Warn about invalid punctuation and content below NAME. + * mdoc(7): Warn about .Xr lacking the second argument (section). + * mdoc(7): Warn about violations of the rule "new sentence, new line". + * roff(7): Warn about trailing whitespace at the end of comments. + * mdoc(7): Improve rendering of double quotes. + * mdoc(7): Always do text production in the validator, never in the + formatters. Cleaner, simpler, shorter, helps NetBSD apropos(1) + and also makes -Ttree output more useful. + * -Ttree: Show metadata and some additional node flags. + New -Onoval output option to show the unvalidated tree. + --- RELIABILITY BUGFIXES --- + * man(1): Make "man -l" work with standard input from a pipe or file, + as long as standard output is a terminal. + * man(7): Fix out of bounds read access if a text node immediately + preceded the first .SH header. + * mdoc(7): Fix out of bounds read access for .Bl without a type + but with a width. + * mdoc(7): Fix out of bounds read access for .Bl -column starting + with a tab character instead of a child .It macro. + * mdoc(7): Fix syntax tree corruption leading to segfaults caused + by stray block end macros in nested blocks of mismatching type. + * man(1): Fix NULL dereference when the first of multiple pages + shown was preformatted. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by partial implicit macros inside .Bl -column table cells. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + for macro sequences like .Bl .Bl .It Bo .El .It. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by .Ta following a nested .Bl -column breaking another block. + * mdoc(7): Fix syntax tree corruption sometimes leading to NULL + dereference caused by indirectly broken .Nd or .Nm blocks. + * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns. + * mdoc(7): Fix NULL dereference in some specific cases of a + block-end macro calling another block-end macro. + * mdoc(7): Fix NULL dereference if the only child of the head + of the first .Sh was an empty in-line macro. + * eqn(7): Fix NULL dereference in the terminal formatter + for empty matrices and empty square roots. + * mdoc(7): Fix an assertion failure for a .Bd without a type that + breaks another block. + * mdoc(7): Fix an assertion failure that happened for some .Bl -column + lists containing a column width of "-4n", "-3n", or "-2n". + * mdoc(7): Fix an assertion failure caused by .Bl -column without .It + but containing eqn(7) or tbl(7) code. + * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf. + * roff(7): Fix an assertion failures caused by whitespace inside \o'' + (overstrike) sequences. + * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of + excessive length. + --- PORTABILITY IMPROVEMENTS --- + * man(1): Do not mix stdio narrow and wide stream orientation + on stdout, which could cause output corruption on glibc. + * mandoc(1): Autodetect a suitable locale for -Tutf8 mode. + * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined. + * ./configure: Autodetect if nanosleep(3) needs -lrt. + * ./configure: Provide an ${LN} configuration variable. + * ./configure: Put compiler arguments that may contain -l at the end. + --- MINOR BUGFIXES --- + * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro. + * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags. + * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode. + * mandoc(1): Error out on invalid output options on the command line. + --- STRUCTURAL CHANGES, no functional change --- + * Redesign part of the mandoc_html(3) interfaces, making them much + easier to use and reducing the amount of code by a few hundred lines. + --- THANKS TO --- + * Michael Stapelberg (Debian) for designing the new mandocd(8) + and parts of the new catman(8), and for a number of patches + and bug reports. + * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8) + implementation and suggesting an algorithmic improvement which + more than doubled performance, and for a few bug reports. + * Ed Maste (FreeBSD) for an important patch improving reproducibility + of builds in makewhatis(8), and for a few bug reports. + * Theo Buehler (OpenBSD) for more than ten important bug reports, + most of them found by systematic afl(1) fuzzing. + * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov + for crucial help in getting .Bl -tag CSS formatting fixed. + * Svyatoslav Mishyn (Crux Linux) for an initial version of the + patch to autodetect a suitable locale for -Tutf8 mode. + * Jason McIntyre (OpenBSD) for multiple useful discussions + and a number of bug reports. + * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley, + Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren, + Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav + Upadhyay, Christos Zoulas, Kamil Rytarowski, Sevan Janiyan, + Thomas Klausner (NetBSD), Aaron M. Ucko, Bdale Garbee, Reiner + Herrmann, Shane Kerr (Debian), Leah Neukirchen (Void Linux), + Daniel Sabogal (Alpine Linux), Yuri Pankov (illumos), + Carsten Kunze (Heirloom roff), Kristaps Dzonsons (bsd.lv), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 17:46: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 CDD12CE2DC0; Sun, 19 Feb 2017 17:46:39 +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 65CCC112; Sun, 19 Feb 2017 17:46: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 v1JHkcXL010259; Sun, 19 Feb 2017 17:46:38 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHkbXY010249; Sun, 19 Feb 2017 17:46:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191746.v1JHkbXY010249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 17:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313958 - head/contrib/mdocml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:46:39 -0000 Author: bapt Date: Sun Feb 19 17:46:37 2017 New Revision: 313958 URL: https://svnweb.freebsd.org/changeset/base/313958 Log: Import mandoc 1.4.1rc2 Added: head/contrib/mdocml/catman.8 - copied unchanged from r313957, vendor/mdocml/dist/catman.8 head/contrib/mdocml/catman.c - copied unchanged from r313957, vendor/mdocml/dist/catman.c head/contrib/mdocml/man.options.1 - copied unchanged from r313957, vendor/mdocml/dist/man.options.1 head/contrib/mdocml/mandocd.8 - copied unchanged from r313957, vendor/mdocml/dist/mandocd.8 head/contrib/mdocml/mandocd.c - copied unchanged from r313957, vendor/mdocml/dist/mandocd.c head/contrib/mdocml/test-O_DIRECTORY.c - copied unchanged from r313957, vendor/mdocml/dist/test-O_DIRECTORY.c head/contrib/mdocml/test-cmsg.c - copied unchanged from r313957, vendor/mdocml/dist/test-cmsg.c head/contrib/mdocml/test-recvmsg.c - copied unchanged from r313957, vendor/mdocml/dist/test-recvmsg.c Modified: head/contrib/mdocml/INSTALL head/contrib/mdocml/LICENSE head/contrib/mdocml/Makefile head/contrib/mdocml/Makefile.depend head/contrib/mdocml/NEWS head/contrib/mdocml/TODO head/contrib/mdocml/apropos.1 head/contrib/mdocml/cgi.c head/contrib/mdocml/chars.c head/contrib/mdocml/compat_fts.c head/contrib/mdocml/configure head/contrib/mdocml/configure.local.example head/contrib/mdocml/dba.c head/contrib/mdocml/dbm_map.c head/contrib/mdocml/eqn_term.c head/contrib/mdocml/gmdiff head/contrib/mdocml/html.c head/contrib/mdocml/html.h head/contrib/mdocml/libmandoc.h head/contrib/mdocml/libmdoc.h head/contrib/mdocml/main.c head/contrib/mdocml/man.1 head/contrib/mdocml/man_html.c head/contrib/mdocml/man_term.c head/contrib/mdocml/manconf.h head/contrib/mdocml/mandoc.1 head/contrib/mdocml/mandoc.css head/contrib/mdocml/mandoc.h head/contrib/mdocml/mandoc_aux.h head/contrib/mdocml/mandoc_char.7 head/contrib/mdocml/mandoc_html.3 head/contrib/mdocml/mandocdb.c head/contrib/mdocml/manpath.c head/contrib/mdocml/mdoc.7 head/contrib/mdocml/mdoc.c head/contrib/mdocml/mdoc_html.c head/contrib/mdocml/mdoc_macro.c head/contrib/mdocml/mdoc_man.c head/contrib/mdocml/mdoc_term.c head/contrib/mdocml/mdoc_validate.c head/contrib/mdocml/preconv.c head/contrib/mdocml/read.c head/contrib/mdocml/roff.c head/contrib/mdocml/roff.h head/contrib/mdocml/tag.c head/contrib/mdocml/tbl_html.c head/contrib/mdocml/term_ps.c head/contrib/mdocml/tree.c Directory Properties: head/contrib/mdocml/ (props changed) Modified: head/contrib/mdocml/INSTALL ============================================================================== --- head/contrib/mdocml/INSTALL Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/INSTALL Sun Feb 19 17:46:37 2017 (r313958) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.17 2016/07/19 22:40:33 schwarze Exp $ +$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- @@ -16,7 +16,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, July 2016 +Ingo Schwarze, Karlsruhe, February 2017 Installation @@ -31,15 +31,21 @@ Regarding how packages and ports are mai system, please consult your operating system documentation. To install mandoc manually, the following steps are needed: -1. If you want to build the CGI program, man.cgi(8), too, run the -command "echo BUILD_CGI=1 > configure.local". Then run "cp -cgi.h.examples cgi.h" and edit cgi.h as desired. +1. If you want to build the CGI program, man.cgi(8), too, +run the command "echo BUILD_CGI=1 >> configure.local". +Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. + +2. If you also want to build the new catman(8) utility, run the +command "echo BUILD_CATMAN=1 >> configure.local". Note that it +is unlikely to be a drop-in replacement providing the same +functionality as your system's "catman", if your operating +system contains one. -2. Define MANPATH_DEFAULT in configure.local +3. Define MANPATH_DEFAULT in configure.local if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate for your operating system. -3. Run "./configure". +4. Run "./configure". This script attempts autoconfiguration of mandoc for your system. Read both its standard output and the file "Makefile.local" it generates. If anything looks wrong or different from what you @@ -49,27 +55,31 @@ result seems right to you. On Solaris 10 and earlier, you may have to run "ksh ./configure" because the native /bin/sh lacks some POSIX features. -4. Run "make". +5. Run "make". Any POSIX-compatible make, in particular both BSD make and GNU make, should work. If the build fails, look at "configure.local.example" and go back to step 2. -5. Run "make -n install" and check whether everything will be +6. Run "make -n install" and check whether everything will be installed to the intended places. Otherwise, put some *DIR or *NM* -variables into "configure.local" and go back to step 3. +variables into "configure.local" and go back to step 4. -6. Run "sudo make install". If you intend to build a binary +7. Optionally run the regression suite. +Basically, that amounts to "cd regress && ./regress.pl". +But you should probably look at "./mandoc -l regress/regress.pl.1" +first. + +8. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a command like "make DESTDIR=... install". Read the *-install targets in the "Makefile" to understand how DESTDIR is used. -7. Run the command "sudo -makewhatis" to build mandoc.db(5) databases in all the directory -trees configured in step 6. Whenever installing new manual pages, -re-run makewhatis(8) to update the databases, or apropos(1) will -not find the new pages. +9. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 6. Whenever installing +new manual pages, re-run makewhatis(8) to update the databases, or +apropos(1) will not find the new pages. -8. To set up a man.cgi(8) server, read its manual page. +10. To set up a man.cgi(8) server, read its manual page. Note that some man(7) pages may contain low-level roff(7) markup that mandoc does not yet understand. On some BSD systems using @@ -87,9 +97,10 @@ The following libraries are required: 2. The fts(3) directory traversion functions. If your system does not have them, the bundled compatibility version -will be used, so you need not worry in that case. But be careful: the -glibc version of fts(3) is known to be broken on 32bit platforms, -see . +will be used, so you need not worry in that case. But be careful: old +glibc versions of fts(3) were known to be broken on 32bit platforms, +see . +That was presumably fixed in glibc-2.23. If you run into that problem, set "HAVE_FTS=0" in configure.local. 3. Marc Espie's ohash(3) library. Modified: head/contrib/mdocml/LICENSE ============================================================================== --- head/contrib/mdocml/LICENSE Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/LICENSE Sun Feb 19 17:46:37 2017 (r313958) @@ -1,4 +1,4 @@ -$Id: LICENSE,v 1.13 2016/10/18 14:15:33 schwarze Exp $ +$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright @@ -10,6 +10,7 @@ Copyright (c) 2009, 2010, 2011, 2012 Joe Copyright (c) 2013 Franco Fichtner Copyright (c) 2014 Baptiste Daroussin Copyright (c) 2016 Ed Maste +Copyright (c) 2017 Michael Stapelberg Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek Modified: head/contrib/mdocml/Makefile ============================================================================== --- head/contrib/mdocml/Makefile Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/Makefile Sun Feb 19 17:46:37 2017 (r313958) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.493 2016/11/19 15:24:51 schwarze Exp $ +# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013-2016 Ingo Schwarze +# Copyright (c) 2011, 2013-2017 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,11 +15,12 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.14.0 +VERSION = 1.14.1 # === LIST OF FILES ==================================================== TESTSRCS = test-be32toh.c \ + test-cmsg.c \ test-dirent-namlen.c \ test-EFTYPE.c \ test-err.c \ @@ -30,10 +31,12 @@ TESTSRCS = test-be32toh.c \ test-mkdtemp.c \ test-nanosleep.c \ test-ntohl.c \ + test-O_DIRECTORY.c \ test-ohash.c \ test-PATH_MAX.c \ test-pledge.c \ test-progname.c \ + test-recvmsg.c \ test-reallocarray.c \ test-rewb-bsd.c \ test-rewb-sysv.c \ @@ -49,6 +52,7 @@ TESTSRCS = test-be32toh.c \ test-wchar.c SRCS = att.c \ + catman.c \ cgi.c \ chars.c \ compat_err.c \ @@ -89,6 +93,7 @@ SRCS = att.c \ mandoc.c \ mandoc_aux.c \ mandoc_ohash.c \ + mandocd.c \ mandocdb.c \ manpage.c \ manpath.c \ @@ -128,6 +133,7 @@ DISTFILES = INSTALL \ NEWS \ TODO \ apropos.1 \ + catman.8 \ cgi.h.example \ compat_fts.h \ compat_ohash.h \ @@ -156,6 +162,7 @@ DISTFILES = INSTALL \ man.cgi.8 \ man.conf.5 \ man.h \ + man.options.1 \ manconf.h \ mandoc.1 \ mandoc.3 \ @@ -169,6 +176,7 @@ DISTFILES = INSTALL \ mandoc_html.3 \ mandoc_malloc.3 \ mandoc_ohash.h \ + mandocd.8 \ mansearch.3 \ mansearch.h \ mchars_alloc.3 \ @@ -280,6 +288,12 @@ CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ out.o +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + MANPAGE_OBJS = $(DBM_OBJS) \ manpage.o \ manpath.o @@ -298,6 +312,7 @@ WWW_MANS = apropos.1.html \ man.1.html \ mandoc.1.html \ soelim.1.html \ + man.cgi.3.html \ mandoc.3.html \ mandoc_escape.3.html \ mandoc_headers.3.html \ @@ -311,11 +326,12 @@ WWW_MANS = apropos.1.html \ eqn.7.html \ man.7.html \ mandoc_char.7.html \ + mandocd.8.html \ mdoc.7.html \ roff.7.html \ tbl.7.html \ + catman.8.html \ makewhatis.8.html \ - man.cgi.3.html \ man.cgi.8.html \ man.h.html \ manconf.h.html \ @@ -334,11 +350,7 @@ include Makefile.local # === DEPENDENCY HANDLING ============================================== -all: base-build $(BUILD_TARGETS) Makefile.local - -base-build: mandoc demandoc soelim - -cgi-build: man.cgi +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local install: base-install $(INSTALL_TARGETS) @@ -360,13 +372,14 @@ clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) rm -f mandoc $(MAIN_OBJS) rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman $(MANDOCD_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) rm -f soelim $(SOELIM_OBJS) rm -f $(WWW_MANS) $(WWW_OBJS) rm -rf *.dSYM -base-install: base-build +base-install: mandoc demandoc soelim mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SBINDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 @@ -375,29 +388,29 @@ base-install: base-build mkdir -p $(DESTDIR)$(MANDIR)/man8 $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) - ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) - ln -f $(DESTDIR)$(BINDIR)/mandoc \ + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc \ $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 - ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 - $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 - $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7 - $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7 - $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7 - $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7 - $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 $(INSTALL_MAN) makewhatis.8 \ $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 -lib-install: base-build +lib-install: libmandoc.a mkdir -p $(DESTDIR)$(LIBDIR) mkdir -p $(DESTDIR)$(INCLUDEDIR) mkdir -p $(DESTDIR)$(MANDIR)/man3 @@ -407,13 +420,70 @@ lib-install: base-build $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 -cgi-install: cgi-build +cgi-install: man.cgi mkdir -p $(DESTDIR)$(CGIBINDIR) mkdir -p $(DESTDIR)$(HTDOCDIR) $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) -Makefile.local config.h: configure ${TESTSRCS} +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) @echo "$@ is out of date; please run ./configure" @exit 1 @@ -429,6 +499,12 @@ manpage: $(MANPAGE_OBJS) libmandoc.a man.cgi: $(CGI_OBJS) libmandoc.a $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + demandoc: $(DEMANDOC_OBJS) libmandoc.a $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) @@ -453,14 +529,40 @@ depend: config.h Makefile.depend > Makefile.tmp mv Makefile.tmp Makefile.depend +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + dist: mdocml.sha256 mdocml.sha256: mdocml.tar.gz sha256 mdocml.tar.gz > $@ mdocml.tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true mkdir -p .dist/mdocml-$(VERSION)/ $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + cp -pR regress .dist/mdocml-$(VERSION) + find .dist/mdocml-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf chmod 755 .dist/mdocml-$(VERSION)/configure ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) rm -rf .dist/ Modified: head/contrib/mdocml/Makefile.depend ============================================================================== --- head/contrib/mdocml/Makefile.depend Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/Makefile.depend Sun Feb 19 17:46:37 2017 (r313958) @@ -1,4 +1,5 @@ att.o: att.c config.h roff.h mdoc.h libmdoc.h +catman.o: catman.c config.h compat_fts.h cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h compat_err.o: compat_err.c config.h @@ -39,6 +40,7 @@ man_validate.o: man_validate.c config.h mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h +mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h manpage.o: manpage.c config.h manconf.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h Modified: head/contrib/mdocml/NEWS ============================================================================== --- head/contrib/mdocml/NEWS Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/NEWS Sun Feb 19 17:46:37 2017 (r313958) @@ -1,7 +1,131 @@ -$Id: NEWS,v 1.12 2016/07/14 11:09:06 schwarze Exp $ +$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. +Changes in version 1.14.1, released on February XXX, 2017 + + --- MAJOR NEW FEATURES --- + * apropos(1): Reimplement complete semantic search functionality + without the dependency on SQLite3, using only POSIX APIs. + This comes with a completely new mandoc.db(5) file format. + * man(1): Support more than one tag entry for the same search term, + plus some minor improvements to the less(1) :t support. + * -Thtml: Use real macro names for CSS classes. + Systematic cleanup of and many improvements to mandoc.css. + * -Thtml: Produce human readable HTML code by using indentation + and better line breaks. Improve various HTML elements, + and trim several useless ones. + * New catman(8) utility, still somewhat experimental. + * Now includes a portable version of the OpenBSD mandoc regression + suite, see regress/regress.pl.1 for details. + --- REMOVED FUNCTIONALITY --- + * Operating systems that don't provide mmap(3) are no longer supported. + * Drop support for manpath(1). Even if your system has manpath(1), + it is simpler to use MANPATH_DEFAULT in configure.local for + operating system defaults, man.conf(5) for machine-specific + modifications, and ${MANPATH}, -m, and -M for user preferences + than to bother with the complexity of manpath(1). + * makewhatis(8) -p: No longer warn about missing MLINKS since these + are no longer needed for anything. + --- MINOR NEW FEATURES --- + * mdoc(7): Warn about invalid punctuation and content below NAME. + * mdoc(7): Warn about .Xr lacking the second argument (section). + * mdoc(7): Warn about violations of the rule "new sentence, new line". + * roff(7): Warn about trailing whitespace at the end of comments. + * mdoc(7): Improve rendering of double quotes. + * mdoc(7): Always do text production in the validator, never in the + formatters. Cleaner, simpler, shorter, helps NetBSD apropos(1) + and also makes -Ttree output more useful. + * -Ttree: Show metadata and some additional node flags. + New -Onoval output option to show the unvalidated tree. + --- RELIABILITY BUGFIXES --- + * man(1): Make "man -l" work with standard input from a pipe or file, + as long as standard output is a terminal. + * man(7): Fix out of bounds read access if a text node immediately + preceded the first .SH header. + * mdoc(7): Fix out of bounds read access for .Bl without a type + but with a width. + * mdoc(7): Fix out of bounds read access for .Bl -column starting + with a tab character instead of a child .It macro. + * mdoc(7): Fix syntax tree corruption leading to segfaults caused + by stray block end macros in nested blocks of mismatching type. + * man(1): Fix NULL dereference when the first of multiple pages + shown was preformatted. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by partial implicit macros inside .Bl -column table cells. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + for macro sequences like .Bl .Bl .It Bo .El .It. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by .Ta following a nested .Bl -column breaking another block. + * mdoc(7): Fix syntax tree corruption sometimes leading to NULL + dereference caused by indirectly broken .Nd or .Nm blocks. + * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns. + * mdoc(7): Fix NULL dereference in some specific cases of a + block-end macro calling another block-end macro. + * mdoc(7): Fix NULL dereference if the only child of the head + of the first .Sh was an empty in-line macro. + * eqn(7): Fix NULL dereference in the terminal formatter + for empty matrices and empty square roots. + * mdoc(7): Fix an assertion failure for a .Bd without a type that + breaks another block. + * mdoc(7): Fix an assertion failure that happened for some .Bl -column + lists containing a column width of "-4n", "-3n", or "-2n". + * mdoc(7): Fix an assertion failure caused by .Bl -column without .It + but containing eqn(7) or tbl(7) code. + * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf. + * roff(7): Fix an assertion failures caused by whitespace inside \o'' + (overstrike) sequences. + * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of + excessive length. + --- PORTABILITY IMPROVEMENTS --- + * man(1): Do not mix stdio narrow and wide stream orientation + on stdout, which could cause output corruption on glibc. + * mandoc(1): Autodetect a suitable locale for -Tutf8 mode. + * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined. + * ./configure: Autodetect if nanosleep(3) needs -lrt. + * ./configure: Provide an ${LN} configuration variable. + * ./configure: Put compiler arguments that may contain -l at the end. + --- MINOR BUGFIXES --- + * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro. + * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags. + * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode. + * mandoc(1): Error out on invalid output options on the command line. + --- STRUCTURAL CHANGES, no functional change --- + * Redesign part of the mandoc_html(3) interfaces, making them much + easier to use and reducing the amount of code by a few hundred lines. + --- THANKS TO --- + * Michael Stapelberg (Debian) for designing the new mandocd(8) + and parts of the new catman(8), and for a number of patches + and bug reports. + * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8) + implementation and suggesting an algorithmic improvement which + more than doubled performance, and for a few bug reports. + * Ed Maste (FreeBSD) for an important patch improving reproducibility + of builds in makewhatis(8), and for a few bug reports. + * Theo Buehler (OpenBSD) for more than ten important bug reports, + most of them found by systematic afl(1) fuzzing. + * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov + for crucial help in getting .Bl -tag CSS formatting fixed. + * Svyatoslav Mishyn (Crux Linux) for an initial version of the + patch to autodetect a suitable locale for -Tutf8 mode. + * Jason McIntyre (OpenBSD) for multiple useful discussions + and a number of bug reports. + * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley, + Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren, + Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav + Upadhyay, Christos Zoulas, Kamil Rytarowski, Sevan Janiyan, + Thomas Klausner (NetBSD), Aaron M. Ucko, Bdale Garbee, Reiner + Herrmann, Shane Kerr (Debian), Leah Neukirchen (Void Linux), + Daniel Sabogal (Alpine Linux), Yuri Pankov (illumos), + Carsten Kunze (Heirloom roff), Kristaps Dzonsons (bsd.lv), + Anton Lindqvist, Jan Stary, Jeremy A. Mates, Mark Patruck, + Pavan Maddamsetti, Sean Levy , and + Tiago Silva for bug reports. + * Brent Cook, Marc Espie, Philip Guenther, Todd Miller (OpenBSD) + and Markus Waldeck for useful discussions. + * And as usual, OpenCSW for providing me with a Solaris 9/10/11 + testing environment. + Changes in version 1.13.4, released on July 14, 2016 --- MAJOR NEW FEATURES --- @@ -109,7 +233,7 @@ Changes in version 1.13.4, released on J again resulting in more than half a dozen important bug reports. * Svyatoslav Mishyn (Crux Linux) for some patches, several bug reports, and extensive release testing. - * Christian Neukirchen (void Linux) for a number of compatibility + * Leah Neukirchen (Void Linux) for a number of compatibility patches and suggestions and several bug reports. * Christos Zoulas (NetBSD) for a bug fix patch and some useful suggestions for cleanup. Modified: head/contrib/mdocml/TODO ============================================================================== --- head/contrib/mdocml/TODO Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/TODO Sun Feb 19 17:46:37 2017 (r313958) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.223 2017/01/17 15:32:43 schwarze Exp $ +* $Id: TODO,v 1.234 2017/02/18 11:53:33 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -193,10 +193,6 @@ are mere guesses, and some may be wrong. uqs@ Thu, 2 Jun 2011 11:33:35 +0200 loc * exist ** algo *** size * imp ** ---- missing man features ----------------------------------------------- - -- -T[x]html doesn't stipulate non-collapsing spaces in literal mode - --- missing tbl features ----------------------------------------------- - horizontal lines in the layout still consume data cells @@ -223,13 +219,16 @@ are mere guesses, and some may be wrong. - support mdoc(7) and man(7) macros inside tbl(7) code; probably requires the parser reorg and letting tbl(7) use roff_node such that macro sets can mix; - informed by bapt@ that FreeBSD needs this. + informed by bapt@ that FreeBSD needs this: 3 Jan 2015 23:32:23 +0100 loc *** exist ** algo *** size ** imp *** - look at the POSIX manuals in the books/man-pages-posix port, they use some unsupported tbl(7) features. loc * exist ** algo ** size ** imp *** +- look what Joerg Schilling manual pages use + Thu, 19 Mar 2015 18:31:48 +0100 + - use Unicode U+2500 to U+256C for table borders in tbl(7) -Tutf-8 output suggested by bentley@ Tue, 14 Oct 2014 04:10:55 -0600 @@ -263,15 +262,6 @@ are mere guesses, and some may be wrong. even for apropos title line output; req by bapt@ loc * exist * algo * size * imp *** -- makewhatis(8) for preformatted pages: - parse the section number from the header line - and compare to the section number from the directory name - loc * exist * algo * size * imp ** - -- Does makewhatis(8) detect missing NAME sections, missing names, - and missing descriptions in all the file formats? - loc * exist * algo * size * imp *** - - clean up escape sequence handling, creating three classes: (1) fully implemented, or parsed and ignored without loss of content (2) unimplemented, potentially causing loss of content @@ -300,6 +290,8 @@ are mere guesses, and some may be wrong. - look at AT&T DWB http://www2.research.att.com/sw/download Carsten Kunze has patches Mon, 4 Aug 2014 17:01:28 +0200 + ported version: https://github.com/n-t-roff/DWB3.3 + Carsten Kunze Wed, 22 Apr 2015 11:21:43 +0200 - look at pages generated from reStructeredText, e.g. devel/mercurial hg(1) These are a weird mixture of man(7) and custom autogenerated low-level @@ -334,6 +326,9 @@ are mere guesses, and some may be wrong. https://github.com/schmonz/ikiwiki/compare/mandoc Amitai Schlair Mon, 19 May 2014 14:05:53 -0400 +- check features of the Slackware man.conf(5) format + Carsten Kunze Wed, 11 Mar 2015 17:57:24 +0100 + ************************************************************************ * formatting issues: ugly output ************************************************************************ @@ -394,7 +389,7 @@ are mere guesses, and some may be wrong. reveals lots of bugs both in groff and mandoc... reported by bentley@ Wed, 22 May 2013 23:49:30 -0600 ---- PDF issues --------------------------------------------------------- +--- PostScript and PDF issues ------------------------------------------ - PDF output doesn't use a monospaced font for .Bd -literal Example: "mandoc -Tpdf afterboot.8 > output.pdf && pdfviewer output.pdf". @@ -404,21 +399,11 @@ are mere guesses, and some may be wrong. instructions from juanfra@ Wed, 11 Jun 2014 02:21:01 +0200 add a new <> block to the PDF files with /BaseFont /Courier and change the /Name from /F0 to the new font (/F5 (?)). + re-reported by tb@ Mon, 16 Mar 2015 16:47:21 +0100 loc * exist ** algo ** size * imp ** --- HTML issues -------------------------------------------------------- --
formatting is ugly - hints are easy to find on the web, e.g. - http://stackoverflow.com/questions/1713048/ - see also matthew@ Fri, 18 Jul 2014 19:25:12 -0700 - loc * exist * algo ** size * imp *** - -- In -man -Thtml, .nf does not preserve indentation. - It should either convert blanks to   - or use
 rather than 
(like .Bd -literal does). - Reported by afresh1@ 12 Apr 2016 14:35:45 -0700 - - .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal space, see for example random(3). Introduced in http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92 @@ -427,6 +412,9 @@ are mere guesses, and some may be wrong. - jsg on icb, Nov 3, 2014: try to guess Xr in man(7) for hyperlinking + and render them with + https://github.com/Debian/debiman/issues/15 + loc * exist * algo ** size ** imp ** - The tables used to render the three-part page headers actually force the width of the to the max-width given for . @@ -435,9 +423,6 @@ are mere guesses, and some may be wrong. http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1 loc * exist * algo ** size * imp *** -- consider whether can be used for Ar Dv Er Ev Fa Va. - from bentley@ Wed, 13 Aug 2014 09:17:55 -0600 - - generate tags in HTML idea from florian@ Tue, 7 Apr 2015 00:26:28 +0000 may be possible to implement with .Lk img://something.png alt_text @@ -454,6 +439,9 @@ are mere guesses, and some may be wrong. Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 loc * exist ** algo ** size * imp ** +- .Lk formatting for long links with line breaks + Franco Fichtner 8 Oct 2013 00:33:42 +0200 + - In .Bl -enum -width 0n, groff continues one the same line after the number, mandoc breaks the line. mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 @@ -498,6 +486,7 @@ are mere guesses, and some may be wrong. The same applies to .Bl -column column widths; reported again by Nicolas Joly Thu, 1 Mar 2012 13:41:26 +0100 via wiz@ 5 Mar reported again by Franco Fichtner Fri, 27 Sep 2013 21:02:28 +0200 + reported again by Bruce Evans Fri, 17 Feb 2017 21:22:44 +0100 via bapt@ loc *** exist *** algo *** size ** imp *** An easy partial fix would be to just skip the first word if it starts with a dot, including any following white space, when measuring. @@ -508,12 +497,6 @@ are mere guesses, and some may be wrong. we want three blank lines, not two as in mandoc. loc ** exist ** algo ** size * imp ** -- Header lines of excessive length: - Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c - and document it in mdoc(7) and man(7) COMPATIBILITY - found while talking to Chris Bennett - loc * exist * algo * size * imp * - - Sequences of multiple man(7) paragraphs (.PP, .IP) interspersed with .ps and .nf/.fi produce execessive blank lines, see libJudy and graphics/dcmtk. The parser reorg may help with this. @@ -535,21 +518,10 @@ are mere guesses, and some may be wrong. to access the manpath and mandoc.db(3) after parsing. asked for by jmc@ Fri, 4 Dec 2015 22:39:40 +0000 -- Report errors in -O suboption parsing. - loc * exist * algo * size * imp ** - - warn when .Sh or .Ss contain other macros Steffen Nurpmeso, savannah.gnu.org/bugs/index.php?45034 loc * exist * algo * size * imp ** -- check that MANDOCERR_BADTAB is thrown in the right cases, - i.e. when finding a literal tab character in fill mode, - and possibly change the wording of the warning message - to refer to fill mode, not literal mode - See the mail from Werner LEMBERG on the groff list, - Fri, 14 Feb 2014 18:54:42 +0100 (CET) - loc * exist ** algo ** size * imp ** - - warn about attempts to call non-callable macros Steffen Nurpmeso Tue, 11 Nov 2014 22:55:16 +0100 Note that formatting is inconsistent in groff. @@ -558,9 +530,6 @@ are mere guesses, and some may be wrong. all over mdoc_macro.c and all subtly different. loc ** exist ** algo ** size ** imp ** -- warn about "new sentence, new line" - loc ** exist ** algo *** size * imp ** - - mandoc_special does not really check the escape sequence, but just the overall format loc ** exist ** algo *** size ** imp ** @@ -580,13 +549,6 @@ are mere guesses, and some may be wrong. * documentation issues ************************************************************************ -- mention hyphenation rules: - breaking at letter-letter in text mode (not macro args) - proper hyphenation is unimplemented - -- talk about spacing around delimiters - to jmc@, kristaps@ Sat, 23 Apr 2011 17:41:27 +0200 - - mark macros as: page structure domain, manual domain, general text domain is this useful? @@ -606,14 +568,8 @@ Several areas can be cleaned up to make - improve hashing mechanism for macros (quite important: performance) -- improve hashing mechanism for characters (not as important) - - the PDF file is HUGE: this can be reduced by using relative offsets -- instead of re-initialising the roff predefined-strings set before each - parse, create a read-only version the first time and copy it - loc * exist ** algo ** size * imp ** - ************************************************************************ * structural issues ************************************************************************ @@ -648,9 +604,6 @@ Several areas can be cleaned up to make output through libz. - Sandbox (see OpenSSH). - Enable caching support via HTTP 304 and If-Modified-Since. - - Allow for cgi.h to be overridden by CGI environment variables. - Otherwise, binary distributions will inherit the compile-time - behaviour, which is not optimal. - Have Mac OSX systems automatically disable -static compilation of the CGI: -static isn't supported. Modified: head/contrib/mdocml/apropos.1 ============================================================================== --- head/contrib/mdocml/apropos.1 Sun Feb 19 17:42:05 2017 (r313957) +++ head/contrib/mdocml/apropos.1 Sun Feb 19 17:46:37 2017 (r313958) @@ -1,4 +1,4 @@ -.\" $Id: apropos.1,v 1.39 2015/04/03 08:46:17 schwarze Exp $ +.\" $Id: apropos.1,v 1.40 2017/01/31 19:44:04 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 3 2015 $ +.Dd $Mdocdate: January 31 2017 $ .Dt APROPOS 1 .Os .Sh NAME @@ -468,6 +468,10 @@ and in .Ox 5.6 for .Nm whatis . +The options +.Fl acfhIKklOTWw +appeared in +.Ox 5.7 . .Sh AUTHORS .An -nosplit .An Bill Joy Copied: head/contrib/mdocml/catman.8 (from r313957, vendor/mdocml/dist/catman.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/mdocml/catman.8 Sun Feb 19 17:46:37 2017 (r313958, copy of r313957, vendor/mdocml/dist/catman.8) @@ -0,0 +1,186 @@ +.\" $Id: catman.8,v 1.7 2017/02/06 19:04:21 schwarze Exp $ +.\" +.\" Copyright (c) 2017 Ingo Schwarze +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: February 6 2017 $ +.Dt CATMAN 8 +.Os +.Sh NAME +.Nm catman +.Nd format all manual pages below a directory +.Sh SYNOPSIS +.Nm catman +.Op Fl I Cm os Ns = Ns Ar name +.Op Fl T Ar output +.Ar srcdir dstdir +.Sh DESCRIPTION +The +.Nm +utility assumes that all files below +.Ar srcdir +are manual pages in +.Xr mdoc 7 +and +.Xr man 7 +format and formats all of them, storing the formatted versions in +the same relative paths below +.Ar dstdir . +Subdirectories of +.Ar dstdir +are created as needed. +Existing files are not explicitly deleted, but possibly overwritten. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl I Cm os Ns = Ns Ar name +Override the default operating system +.Ar name +for the +.Xr mdoc 7 +.Ic Os +and for the +.Xr man 7 +.Ic TH +macro. +.It Fl T Ar output +Output format. +The +.Ar output +argument can be +.Cm ascii , +.Cm utf8 , +or +.Cm html ; +see +.Xr mandoc 1 . +In +.Cm html +output mode, the +.Cm fragment +output option is implied. +Other output options are not supported. +.El +.Sh IMPLEMENTATION NOTES +Since this version avoids +.Xr fork 2 +and +.Xr exec 3 +overhead and uses the much faster +.Sy mandoc +parsers and formatters rather than +.Sy groff , +it may be about one order of magnitude faster than other +.Nm +implementations. +.Sh EXIT STATUS +.Ex -std +.Pp +Possible errors include: +.Bl -bullet +.It +missing, invalid, or excessive command line arguments +.It +failure to change the current working directory to +.Ar srcdir +.It +failure to open +.Ar dstdir +.It +communication failure with +.Xr mandocd 8 +.It +resource exhaustion, for example file descriptor, process table, +or memory exhaustion +.El +.Pp +Except for memory exhaustion and similar system-level failures, +failures while trying to open, read, parse, or format individual +manual pages, to save individual formatted files to the file system, +or even to create directories do not cause +.Nm +to return an error exit status. +In such cases, +.Nm +will simply continue with the next file or subdirectory. +.Sh SEE ALSO +.Xr mandoc 1 , +.Xr mandocd 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Fx 1.0 . +Other, incompatible implementations appeared in +.Nx 1.0 +and in +.Sy man-db No 2.2 . +.Pp +This version appeared in version 1.14.1 of the +.Sy mandoc +toolkit. +.Sh AUTHORS +.An -nosplit +The first +.Nm +implementation was a short shell script by +.An Christoph Robitschko +in July 1993. +.Pp +The +.Nx +implementations were written by +.An J. T. Conklin Aq Mt jtc@netbsd.org +in 1993, +.An Christian E. Hopps Aq Mt chopps@netbsd.org +in 1994, +and +.An Dante Profeta Aq Mt dante@netbsd.org +in 1999; the +.Sy man-db +implementation by +.An Graeme W. Wilford *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 17:47: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 A0177CE2E7F; Sun, 19 Feb 2017 17:47:45 +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 649FD2D1; Sun, 19 Feb 2017 17:47:45 +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 v1JHlim7010346; Sun, 19 Feb 2017 17:47:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JHlh5F010337; Sun, 19 Feb 2017 17:47:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702191747.v1JHlh5F010337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Feb 2017 17:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313959 - in head: share/man/man4 sys/conf sys/dev/usb/storage sys/modules/usb sys/modules/usb/cfumass X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 17:47:45 -0000 Author: trasz Date: Sun Feb 19 17:47:43 2017 New Revision: 313959 URL: https://svnweb.freebsd.org/changeset/base/313959 Log: Add USB Mass Storage CTL frontend. This makes it possible for USB OTG-capable hardware to implement device side of USB Mass Storage, ie pretend it's a flash drive. It's configured in the same way as other CTL frontends, using ctladm(8) or ctld(8). Differently from usfs(4), all the configuration can be done without rebuilding the kernel. Testing and review is welcome. Right now I'm still moving, and I don't have access to my test environment, so I'm somewhat reluctant to making larger changes to this code; on the other hand I don't want to let it sit on Phab until my testing setup is back, because I want to get it into 11.1-RELEASE. Reviewed by: emaste (cursory), wblock (man page) MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8787 Added: head/share/man/man4/cfumass.4 (contents, props changed) head/sys/dev/usb/storage/cfumass.c (contents, props changed) head/sys/modules/usb/cfumass/ head/sys/modules/usb/cfumass/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/ctl.4 head/share/man/man4/umass.4 head/share/man/man4/usb_template.4 head/share/man/man4/usfs.4 head/sys/conf/files head/sys/modules/usb/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Feb 19 17:46:37 2017 (r313958) +++ head/share/man/man4/Makefile Sun Feb 19 17:47:43 2017 (r313959) @@ -102,6 +102,7 @@ MAN= aac.4 \ cd.4 \ cdce.4 \ cfi.4 \ + cfumass.4 \ ch.4 \ ciss.4 \ cloudabi.4 \ Added: head/share/man/man4/cfumass.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/cfumass.4 Sun Feb 19 17:47:43 2017 (r313959) @@ -0,0 +1,137 @@ +.\" Copyright (c) 2017 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Edward Tomasz Napierala under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd January 27, 2017 +.Dt CFUMASS 4 +.Os +.Sh NAME +.Nm cfumass +.Nd USB device side support for Mass Storage Class Transport +.Sh SYNOPSIS +This driver can be compiled into the kernel by placing these lines in +the kernel configuration file: +.Bd -ragged -offset indent +.Cd "device usb" +.Cd "device usb_template" +.Cd "device iscsi" +.Cd "device ctl" +.Cd "device cfumass" +.Ed +.Pp +The driver module can also be loaded at boot by adding this line to +.Xr loader.conf 5 : +.Bd -literal -offset indent +cfumass_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides device side support for emulating an USB mass storage +device compliant with the USB Mass Storage Class Bulk-Only (BBB) Transport +specification, implemented as a +.Xr ctl 4 +frontend driver. +.Pp +To use +.Nm : +.Bl -bullet +.It +.Xr cfumass 4 +must be loaded as a module or compiled into the kernel. +.It +The USB Mass Storage template must be chosen by setting the +.Va hw.usb.template +sysctl to 0. +.It +The USB OTG port must be working in USB device-side mode. +This happens automatically upon connection to a USB host. +.It +There must be a +.Xr ctl +LUN configured for the +.Pa cfumass +port. +.El +.Pp +Upon loading, the driver creates a +.Xr ctl 4 +port named +.Pa cfumass , +presenting the first LUN mapped for that port - usually LUN 0 - to +the USB host. +See +.Xr ctl.conf 5 +and +.Xr ctld 8 +for details on configuring the LUN. +.Sh SYSCTL VARIABLES +These variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.usb.cfumass.debug +Verbosity level for log messages from the +.Nm +driver. +Set to 0 to disable logging or 1 to warn about potential problems. +Larger values enable debugging output. +Defaults to 1. +.It Va hw.usb.cfumass.ignore_stop +Ignore START STOP UNIT SCSI commands with START and LOEJ bits cleared. +Some initiators send that command to stop the target when the user +attempts to gracefully eject the drive, but fail to start it when the +drive is reconnected. +Set to 0 to handle the command in a standards-compliant way, +1 to ignore it and log a warning, or 2 to ignore it silently. +Defaults to 1. +.It Va hw.usb.cfumass.max_lun +Max LUN number to report to the initiator (USB host). +Must be between 0 and 15. +Some initiators incorrectly handle values larger than 0. +Defaults to 0. +.El +.Sh SEE ALSO +.Xr ctl 4 , +.Xr umass 4 , +.Xr usb 4 , +.Xr usb_template 4 , +.Xr ctl.conf 5 , +.Xr ctld 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 11.1 . +.Sh AUTHORS +The +.Nm +driver was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Sun Feb 19 17:46:37 2017 (r313958) +++ head/share/man/man4/ctl.4 Sun Feb 19 17:47:43 2017 (r313959) @@ -172,6 +172,7 @@ Set to 0 to disable sending NOP-In PDUs. Defaults to 5. .El .Sh SEE ALSO +.Xr cfumass 4 , .Xr ctladm 8 , .Xr ctld 8 , .Xr ctlstat 8 Modified: head/share/man/man4/umass.4 ============================================================================== --- head/share/man/man4/umass.4 Sun Feb 19 17:46:37 2017 (r313958) +++ head/share/man/man4/umass.4 Sun Feb 19 17:47:43 2017 (r313959) @@ -239,6 +239,7 @@ type as when using .Xr mount 8 . .Sh SEE ALSO +.Xr cfumass 4 , .Xr ehci 4 , .Xr ohci 4 , .Xr uhci 4 , Modified: head/share/man/man4/usb_template.4 ============================================================================== --- head/share/man/man4/usb_template.4 Sun Feb 19 17:46:37 2017 (r313958) +++ head/share/man/man4/usb_template.4 Sun Feb 19 17:47:43 2017 (r313959) @@ -84,6 +84,7 @@ Available templates are: .El . .Sh SEE ALSO +.Xr cfumass 4 , .Xr usb 4 , .Xr usfs 4 .Sh STANDARDS Modified: head/share/man/man4/usfs.4 ============================================================================== --- head/share/man/man4/usfs.4 Sun Feb 19 17:46:37 2017 (r313958) +++ head/share/man/man4/usfs.4 Sun Feb 19 17:47:43 2017 (r313959) @@ -58,6 +58,7 @@ sysctl is set to 0). .Pp Upon attach the driver creates a RAM disk which can be read and written. .Sh SEE ALSO +.Xr cfumass 4 , .Xr umass 4 , .Xr usb 4 , .Xr usb_template 4 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Feb 19 17:46:37 2017 (r313958) +++ head/sys/conf/files Sun Feb 19 17:47:43 2017 (r313959) @@ -3037,6 +3037,7 @@ dev/usb/controller/usb_controller.c opti # # USB storage drivers # +dev/usb/storage/cfumass.c optional cfumass ctl dev/usb/storage/umass.c optional umass dev/usb/storage/urio.c optional urio dev/usb/storage/ustorage_fs.c optional usfs Added: head/sys/dev/usb/storage/cfumass.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/storage/cfumass.c Sun Feb 19 17:47:43 2017 (r313959) @@ -0,0 +1,1075 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Edward Tomasz Napierala under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ +/* + * USB Mass Storage Class Bulk-Only (BBB) Transport target. + * + * http://www.usb.org/developers/docs/devclass_docs/usbmassbulk_10.pdf + * + * This code implements the USB Mass Storage frontend driver for the CAM + * Target Layer (ctl(4)) subsystem. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "usbdevs.h" +#include "usb_if.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +SYSCTL_NODE(_hw_usb, OID_AUTO, cfumass, CTLFLAG_RW, 0, + "CAM Target Layer USB Mass Storage Frontend"); +static int debug = 1; +SYSCTL_INT(_hw_usb_cfumass, OID_AUTO, debug, CTLFLAG_RWTUN, + &debug, 1, "Enable debug messages"); +static int max_lun = 0; +SYSCTL_INT(_hw_usb_cfumass, OID_AUTO, max_lun, CTLFLAG_RWTUN, + &max_lun, 1, "Maximum advertised LUN number"); +static int ignore_stop = 1; +SYSCTL_INT(_hw_usb_cfumass, OID_AUTO, ignore_stop, CTLFLAG_RWTUN, + &ignore_stop, 1, "Ignore START STOP UNIT with START and LOEJ bits cleared"); + +/* + * The driver uses a single, global CTL port. It could create its ports + * in cfumass_attach() instead, but that would make it impossible to specify + * "port cfumass0" in ctl.conf(5), as the port generally wouldn't exist + * at the time ctld(8) gets run. + */ +struct ctl_port cfumass_port; +bool cfumass_port_online; +volatile u_int cfumass_refcount; + +#ifndef CFUMASS_BULK_SIZE +#define CFUMASS_BULK_SIZE (1U << 17) /* bytes */ +#endif + +/* + * USB transfer definitions. + */ +#define CFUMASS_T_COMMAND 0 +#define CFUMASS_T_DATA_OUT 1 +#define CFUMASS_T_DATA_IN 2 +#define CFUMASS_T_STATUS 3 +#define CFUMASS_T_MAX 4 + +/* + * USB interface specific control requests. + */ +#define UR_RESET 0xff /* Bulk-Only Mass Storage Reset */ +#define UR_GET_MAX_LUN 0xfe /* Get Max LUN */ + +/* + * Command Block Wrapper. + */ +struct cfumass_cbw_t { + uDWord dCBWSignature; +#define CBWSIGNATURE 0x43425355 /* "USBC" */ + uDWord dCBWTag; + uDWord dCBWDataTransferLength; + uByte bCBWFlags; +#define CBWFLAGS_OUT 0x00 +#define CBWFLAGS_IN 0x80 + uByte bCBWLUN; + uByte bCDBLength; +#define CBWCBLENGTH 16 + uByte CBWCB[CBWCBLENGTH]; +} __packed; + +#define CFUMASS_CBW_SIZE 31 +CTASSERT(sizeof(struct cfumass_cbw_t) == CFUMASS_CBW_SIZE); + +/* + * Command Status Wrapper. + */ +struct cfumass_csw_t { + uDWord dCSWSignature; +#define CSWSIGNATURE 0x53425355 /* "USBS" */ + uDWord dCSWTag; + uDWord dCSWDataResidue; + uByte bCSWStatus; +#define CSWSTATUS_GOOD 0x0 +#define CSWSTATUS_FAILED 0x1 +#define CSWSTATUS_PHASE 0x2 +} __packed; + +#define CFUMASS_CSW_SIZE 13 +CTASSERT(sizeof(struct cfumass_csw_t) == CFUMASS_CSW_SIZE); + +struct cfumass_softc { + device_t sc_dev; + struct usb_device *sc_udev; + struct usb_xfer *sc_xfer[CFUMASS_T_MAX]; + + struct cfumass_cbw_t *sc_cbw; + struct cfumass_csw_t *sc_csw; + + struct mtx sc_mtx; + int sc_online; + int sc_ctl_initid; + + /* + * This is used to communicate between CTL callbacks + * and USB callbacks; basically, it holds the state + * for the current command ("the" command, since there + * is no queueing in USB Mass Storage). + */ + bool sc_current_stalled; + + /* + * The following are set upon receiving a SCSI command. + */ + int sc_current_tag; + int sc_current_transfer_length; + int sc_current_flags; + + /* + * The following are set in ctl_datamove(). + */ + int sc_current_residue; + union ctl_io *sc_ctl_io; + + /* + * The following is set in cfumass_done(). + */ + int sc_current_status; + + /* + * Number of requests queued to CTL. + */ + volatile u_int sc_queued; +}; + +/* + * USB interface. + */ +static device_probe_t cfumass_probe; +static device_attach_t cfumass_attach; +static device_detach_t cfumass_detach; +static device_suspend_t cfumass_suspend; +static device_resume_t cfumass_resume; +static usb_handle_request_t cfumass_handle_request; + +static usb_callback_t cfumass_t_command_callback; +static usb_callback_t cfumass_t_data_out_callback; +static usb_callback_t cfumass_t_data_in_callback; +static usb_callback_t cfumass_t_status_callback; + +static device_method_t cfumass_methods[] = { + + /* USB interface. */ + DEVMETHOD(usb_handle_request, cfumass_handle_request), + + /* Device interface. */ + DEVMETHOD(device_probe, cfumass_probe), + DEVMETHOD(device_attach, cfumass_attach), + DEVMETHOD(device_detach, cfumass_detach), + DEVMETHOD(device_suspend, cfumass_suspend), + DEVMETHOD(device_resume, cfumass_resume), + + DEVMETHOD_END +}; + +static driver_t cfumass_driver = { + .name = "cfumass", + .methods = cfumass_methods, + .size = sizeof(struct cfumass_softc), +}; + +static devclass_t cfumass_devclass; + +DRIVER_MODULE(cfumass, uhub, cfumass_driver, cfumass_devclass, NULL, 0); +MODULE_VERSION(cfumass, 0); +MODULE_DEPEND(cfumass, usb, 1, 1, 1); +MODULE_DEPEND(cfumass, usb_template, 1, 1, 1); + +static struct usb_config cfumass_config[CFUMASS_T_MAX] = { + + [CFUMASS_T_COMMAND] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = sizeof(struct cfumass_cbw_t), + .callback = &cfumass_t_command_callback, + .usb_mode = USB_MODE_DEVICE, + }, + + [CFUMASS_T_DATA_OUT] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = CFUMASS_BULK_SIZE, + .flags = {.proxy_buffer = 1, .short_xfer_ok = 1, + .ext_buffer = 1}, + .callback = &cfumass_t_data_out_callback, + .usb_mode = USB_MODE_DEVICE, + }, + + [CFUMASS_T_DATA_IN] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = CFUMASS_BULK_SIZE, + .flags = {.proxy_buffer = 1, .short_xfer_ok = 1, + .ext_buffer = 1}, + .callback = &cfumass_t_data_in_callback, + .usb_mode = USB_MODE_DEVICE, + }, + + [CFUMASS_T_STATUS] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = sizeof(struct cfumass_csw_t), + .flags = {.short_xfer_ok = 1}, + .callback = &cfumass_t_status_callback, + .usb_mode = USB_MODE_DEVICE, + }, +}; + +/* + * CTL frontend interface. + */ +static int cfumass_init(void); +static int cfumass_shutdown(void); +static void cfumass_online(void *arg); +static void cfumass_offline(void *arg); +static void cfumass_datamove(union ctl_io *io); +static void cfumass_done(union ctl_io *io); + +static struct ctl_frontend cfumass_frontend = { + .name = "umass", + .init = cfumass_init, + .shutdown = cfumass_shutdown, +}; +CTL_FRONTEND_DECLARE(ctlcfumass, cfumass_frontend); + +#define CFUMASS_DEBUG(S, X, ...) \ + do { \ + if (debug > 1) { \ + device_printf(S->sc_dev, "%s: " X "\n", \ + __func__, ## __VA_ARGS__); \ + } \ + } while (0) + +#define CFUMASS_WARN(S, X, ...) \ + do { \ + if (debug > 0) { \ + device_printf(S->sc_dev, "WARNING: %s: " X "\n",\ + __func__, ## __VA_ARGS__); \ + } \ + } while (0) + +#define CFUMASS_LOCK(X) mtx_lock(&X->sc_mtx) +#define CFUMASS_UNLOCK(X) mtx_unlock(&X->sc_mtx) + +static void cfumass_transfer_start(struct cfumass_softc *sc, + uint8_t xfer_index); +static void cfumass_terminate(struct cfumass_softc *sc); + +static int +cfumass_probe(device_t dev) +{ + struct usb_attach_arg *uaa; + struct usb_interface_descriptor *id; + + uaa = device_get_ivars(dev); + + if (uaa->usb_mode != USB_MODE_DEVICE) + return (ENXIO); + + /* + * Check for a compliant device. + */ + id = usbd_get_interface_descriptor(uaa->iface); + if ((id == NULL) || + (id->bInterfaceClass != UICLASS_MASS) || + (id->bInterfaceSubClass != UISUBCLASS_SCSI) || + (id->bInterfaceProtocol != UIPROTO_MASS_BBB)) { + return (ENXIO); + } + + return (BUS_PROBE_GENERIC); +} + +static int +cfumass_attach(device_t dev) +{ + struct cfumass_softc *sc; + struct usb_attach_arg *uaa; + int error; + + sc = device_get_softc(dev); + uaa = device_get_ivars(dev); + + sc->sc_dev = dev; + sc->sc_udev = uaa->device; + + CFUMASS_DEBUG(sc, "go"); + + usbd_set_power_mode(uaa->device, USB_POWER_MODE_SAVE); + device_set_usb_desc(dev); + + mtx_init(&sc->sc_mtx, "cfumass", NULL, MTX_DEF); + refcount_acquire(&cfumass_refcount); + + error = usbd_transfer_setup(uaa->device, + &uaa->info.bIfaceIndex, sc->sc_xfer, cfumass_config, + CFUMASS_T_MAX, sc, &sc->sc_mtx); + if (error != 0) { + CFUMASS_WARN(sc, "usbd_transfer_setup() failed: %s", + usbd_errstr(error)); + refcount_release(&cfumass_refcount); + return (ENXIO); + } + + sc->sc_cbw = + usbd_xfer_get_frame_buffer(sc->sc_xfer[CFUMASS_T_COMMAND], 0); + sc->sc_csw = + usbd_xfer_get_frame_buffer(sc->sc_xfer[CFUMASS_T_STATUS], 0); + + sc->sc_ctl_initid = ctl_add_initiator(&cfumass_port, -1, 0, NULL); + if (sc->sc_ctl_initid < 0) { + CFUMASS_WARN(sc, "ctl_add_initiator() failed with error %d", + sc->sc_ctl_initid); + usbd_transfer_unsetup(sc->sc_xfer, CFUMASS_T_MAX); + refcount_release(&cfumass_refcount); + return (ENXIO); + } + + refcount_init(&sc->sc_queued, 0); + + CFUMASS_LOCK(sc); + cfumass_transfer_start(sc, CFUMASS_T_COMMAND); + CFUMASS_UNLOCK(sc); + + return (0); +} + +static int +cfumass_detach(device_t dev) +{ + struct cfumass_softc *sc; + int error; + + sc = device_get_softc(dev); + + CFUMASS_DEBUG(sc, "go"); + + CFUMASS_LOCK(sc); + cfumass_terminate(sc); + CFUMASS_UNLOCK(sc); + usbd_transfer_unsetup(sc->sc_xfer, CFUMASS_T_MAX); + + if (sc->sc_ctl_initid != -1) { + error = ctl_remove_initiator(&cfumass_port, sc->sc_ctl_initid); + if (error != 0) { + CFUMASS_WARN(sc, "ctl_remove_initiator() failed " + "with error %d", error); + } + sc->sc_ctl_initid = -1; + } + + mtx_destroy(&sc->sc_mtx); + refcount_release(&cfumass_refcount); + + return (0); +} + +static int +cfumass_suspend(device_t dev) +{ + struct cfumass_softc *sc; + + sc = device_get_softc(dev); + CFUMASS_DEBUG(sc, "go"); + + return (0); +} + +static int +cfumass_resume(device_t dev) +{ + struct cfumass_softc *sc; + + sc = device_get_softc(dev); + CFUMASS_DEBUG(sc, "go"); + + return (0); +} + +static void +cfumass_transfer_start(struct cfumass_softc *sc, uint8_t xfer_index) +{ + + usbd_transfer_start(sc->sc_xfer[xfer_index]); +} + +static void +cfumass_transfer_stop_and_drain(struct cfumass_softc *sc, uint8_t xfer_index) +{ + + usbd_transfer_stop(sc->sc_xfer[xfer_index]); + CFUMASS_UNLOCK(sc); + usbd_transfer_drain(sc->sc_xfer[xfer_index]); + CFUMASS_LOCK(sc); +} + +static void +cfumass_terminate(struct cfumass_softc *sc) +{ + int last; + + for (;;) { + cfumass_transfer_stop_and_drain(sc, CFUMASS_T_COMMAND); + cfumass_transfer_stop_and_drain(sc, CFUMASS_T_DATA_IN); + cfumass_transfer_stop_and_drain(sc, CFUMASS_T_DATA_OUT); + + if (sc->sc_ctl_io != NULL) { + CFUMASS_DEBUG(sc, "terminating CTL transfer"); + ctl_set_data_phase_error(&sc->sc_ctl_io->scsiio); + sc->sc_ctl_io->scsiio.be_move_done(sc->sc_ctl_io); + sc->sc_ctl_io = NULL; + } + + cfumass_transfer_stop_and_drain(sc, CFUMASS_T_STATUS); + + refcount_acquire(&sc->sc_queued); + last = refcount_release(&sc->sc_queued); + if (last != 0) + break; + + CFUMASS_DEBUG(sc, "%d CTL tasks pending", sc->sc_queued); + msleep(__DEVOLATILE(void *, &sc->sc_queued), &sc->sc_mtx, + 0, "cfumass_reset", hz / 100); + } +} + +static int +cfumass_handle_request(device_t dev, + const void *preq, void **pptr, uint16_t *plen, + uint16_t offset, uint8_t *pstate) +{ + static uint8_t max_lun_tmp; + struct cfumass_softc *sc; + const struct usb_device_request *req; + uint8_t is_complete; + + sc = device_get_softc(dev); + req = preq; + is_complete = *pstate; + + CFUMASS_DEBUG(sc, "go"); + + if (is_complete) + return (ENXIO); + + if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->bRequest == UR_RESET)) { + CFUMASS_WARN(sc, "received Bulk-Only Mass Storage Reset"); + *plen = 0; + + CFUMASS_LOCK(sc); + cfumass_terminate(sc); + cfumass_transfer_start(sc, CFUMASS_T_COMMAND); + CFUMASS_UNLOCK(sc); + + CFUMASS_DEBUG(sc, "Bulk-Only Mass Storage Reset done"); + return (0); + } + + if ((req->bmRequestType == UT_READ_CLASS_INTERFACE) && + (req->bRequest == UR_GET_MAX_LUN)) { + CFUMASS_DEBUG(sc, "received Get Max LUN"); + if (offset == 0) { + *plen = 1; + /* + * The protocol doesn't support LUN numbers higher + * than 15. Also, some initiators (namely Windows XP + * SP3 Version 2002) can't properly query the number + * of LUNs, resulting in inaccessible "fake" ones - thus + * the default limit of one LUN. + */ + if (max_lun < 0 || max_lun > 15) { + CFUMASS_WARN(sc, + "invalid hw.usb.cfumass.max_lun, must be " + "between 0 and 15; defaulting to 0"); + max_lun_tmp = 0; + } else { + max_lun_tmp = max_lun; + } + *pptr = &max_lun_tmp; + } else { + *plen = 0; + } + return (0); + } + + return (ENXIO); +} + +static int +cfumass_quirk(struct cfumass_softc *sc, unsigned char *cdb, int cdb_len) +{ + struct scsi_start_stop_unit *sssu; + + switch (cdb[0]) { + case START_STOP_UNIT: + /* + * Some initiators - eg OSX, Darwin Kernel Version 15.6.0, + * root:xnu-3248.60.11~2/RELEASE_X86_64 - attempt to stop + * the unit on eject, but fail to start it when it's plugged + * back. Just ignore the command. + */ + + if (cdb_len < sizeof(*sssu)) { + CFUMASS_DEBUG(sc, "received START STOP UNIT with " + "bCDBLength %d, should be %zd", + cdb_len, sizeof(*sssu)); + break; + } + + sssu = (struct scsi_start_stop_unit *)cdb; + if ((sssu->how & SSS_PC_MASK) != 0) + break; + + if ((sssu->how & SSS_START) != 0) + break; + + if ((sssu->how & SSS_LOEJ) != 0) + break; + + if (ignore_stop == 0) { + break; + } else if (ignore_stop == 1) { + CFUMASS_WARN(sc, "ignoring START STOP UNIT request"); + } else { + CFUMASS_DEBUG(sc, "ignoring START STOP UNIT request"); + } + + sc->sc_current_status = 0; + cfumass_transfer_start(sc, CFUMASS_T_STATUS); + + return (1); + default: + break; + } + + return (0); +} + +static void +cfumass_t_command_callback(struct usb_xfer *xfer, usb_error_t usb_error) +{ + struct cfumass_softc *sc; + uint32_t signature; + union ctl_io *io; + int error = 0; + + sc = usbd_xfer_softc(xfer); + + KASSERT(sc->sc_ctl_io == NULL, + ("sc_ctl_io is %p, should be NULL", sc->sc_ctl_io)); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + CFUMASS_DEBUG(sc, "USB_ST_TRANSFERRED"); + + signature = UGETDW(sc->sc_cbw->dCBWSignature); + if (signature != CBWSIGNATURE) { + CFUMASS_WARN(sc, "wrong dCBWSignature 0x%08x, " + "should be 0x%08x", signature, CBWSIGNATURE); + break; + } + + if (sc->sc_cbw->bCDBLength <= 0 || + sc->sc_cbw->bCDBLength > sizeof(sc->sc_cbw->CBWCB)) { + CFUMASS_WARN(sc, "invalid bCDBLength %d, should be <= %zd", + sc->sc_cbw->bCDBLength, sizeof(sc->sc_cbw->CBWCB)); + break; + } + + sc->sc_current_stalled = false; + sc->sc_current_status = 0; + sc->sc_current_tag = UGETDW(sc->sc_cbw->dCBWTag); + sc->sc_current_transfer_length = + UGETDW(sc->sc_cbw->dCBWDataTransferLength); + sc->sc_current_flags = sc->sc_cbw->bCBWFlags; + + /* + * Make sure to report proper residue if the datamove wasn't + * required, or wasn't called due to SCSI error. + */ + sc->sc_current_residue = sc->sc_current_transfer_length; + + if (cfumass_quirk(sc, + sc->sc_cbw->CBWCB, sc->sc_cbw->bCDBLength) != 0) + break; + + if (!cfumass_port_online) { + CFUMASS_DEBUG(sc, "cfumass port is offline; stalling"); + usbd_xfer_set_stall(xfer); + break; + } + + /* + * Those CTL functions cannot be called with mutex held. + */ + CFUMASS_UNLOCK(sc); + io = ctl_alloc_io(cfumass_port.ctl_pool_ref); + ctl_zero_io(io); + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = sc; + io->io_hdr.io_type = CTL_IO_SCSI; + io->io_hdr.nexus.initid = sc->sc_ctl_initid; + io->io_hdr.nexus.targ_port = cfumass_port.targ_port; + io->io_hdr.nexus.targ_lun = ctl_decode_lun(sc->sc_cbw->bCBWLUN); + io->scsiio.tag_num = UGETDW(sc->sc_cbw->dCBWTag); + io->scsiio.tag_type = CTL_TAG_UNTAGGED; + io->scsiio.cdb_len = sc->sc_cbw->bCDBLength; + memcpy(io->scsiio.cdb, sc->sc_cbw->CBWCB, sc->sc_cbw->bCDBLength); + refcount_acquire(&sc->sc_queued); + error = ctl_queue(io); + if (error != CTL_RETVAL_COMPLETE) { + CFUMASS_WARN(sc, + "ctl_queue() failed; error %d; stalling", error); + ctl_free_io(io); + refcount_release(&sc->sc_queued); + CFUMASS_LOCK(sc); + usbd_xfer_set_stall(xfer); + break; + } + + CFUMASS_LOCK(sc); + break; + + case USB_ST_SETUP: +tr_setup: + CFUMASS_DEBUG(sc, "USB_ST_SETUP"); + + usbd_xfer_set_frame_len(xfer, 0, sizeof(*sc->sc_cbw)); + usbd_transfer_submit(xfer); + break; + + default: + if (usb_error == USB_ERR_CANCELLED) { + CFUMASS_DEBUG(sc, "USB_ERR_CANCELLED"); + break; + } + + CFUMASS_DEBUG(sc, "USB_ST_ERROR: %s", usbd_errstr(usb_error)); + + goto tr_setup; + } +} + +static void +cfumass_t_data_out_callback(struct usb_xfer *xfer, usb_error_t usb_error) +{ + struct cfumass_softc *sc; + union ctl_io *io; + struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; + int actlen, ctl_sg_count; + + sc = usbd_xfer_softc(xfer); + + CFUMASS_DEBUG(sc, "go"); + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + io = sc->sc_ctl_io; + + if (io->scsiio.kern_sg_entries > 0) { + ctl_sglist = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; + ctl_sg_count = io->scsiio.kern_sg_entries; + } else { + ctl_sglist = &ctl_sg_entry; + ctl_sglist->addr = io->scsiio.kern_data_ptr; + ctl_sglist->len = io->scsiio.kern_data_len; + ctl_sg_count = 1; + } + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + CFUMASS_DEBUG(sc, "USB_ST_TRANSFERRED"); + + /* + * If the host sent less data than required, zero-out + * the remaining buffer space, to prevent a malicious host + * to writing uninitialized kernel memory to the disk. + */ + if (actlen != ctl_sglist[0].len) { + KASSERT(actlen <= ctl_sglist[0].len, + ("actlen %d > ctl_sglist.len %zd", + actlen, ctl_sglist[0].len)); + + CFUMASS_DEBUG(sc, "host transferred %d bytes" + "instead of expected %zd bytes", + actlen, ctl_sglist[0].len); + + memset((char *)(ctl_sglist[0].addr) + actlen, 0, + ctl_sglist[0].len - actlen); + } + + sc->sc_current_residue = 0; + io->scsiio.be_move_done(io); + sc->sc_ctl_io = NULL; + break; + + case USB_ST_SETUP: +tr_setup: + CFUMASS_DEBUG(sc, "USB_ST_SETUP"); + + CFUMASS_DEBUG(sc, "requested size %d, CTL segment size %zd", + sc->sc_current_transfer_length, ctl_sglist[0].len); + + usbd_xfer_set_frame_data(xfer, 0, ctl_sglist[0].addr, ctl_sglist[0].len); + usbd_transfer_submit(xfer); + break; + + default: + if (usb_error == USB_ERR_CANCELLED) { + CFUMASS_DEBUG(sc, "USB_ERR_CANCELLED"); + break; + } + + CFUMASS_DEBUG(sc, "USB_ST_ERROR: %s", + usbd_errstr(usb_error)); + + goto tr_setup; + } +} + +static void +cfumass_t_data_in_callback(struct usb_xfer *xfer, usb_error_t usb_error) +{ + struct cfumass_softc *sc; + union ctl_io *io; + uint32_t max_bulk; + struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 18: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 08974CE5152; Sun, 19 Feb 2017 18:00:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C98B4AD4; Sun, 19 Feb 2017 18:00:58 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1JI0v38014370; Sun, 19 Feb 2017 18:00:57 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JI0vQx014369; Sun, 19 Feb 2017 18:00:57 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201702191800.v1JI0vQx014369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 19 Feb 2017 18:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313960 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 18:00:59 -0000 Author: alc Date: Sun Feb 19 18:00:57 2017 New Revision: 313960 URL: https://svnweb.freebsd.org/changeset/base/313960 Log: In pmap_enter(), set the PG_MANAGED flag on the new PTE in one place, rather two places, and do so before the pmap lock is acquired. Submitted by: Yufeng Zhou Reviewed by: kib MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Feb 19 17:47:43 2017 (r313959) +++ head/sys/amd64/amd64/pmap.c Sun Feb 19 18:00:57 2017 (r313960) @@ -4350,7 +4350,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, if ((m->oflags & VPO_UNMANAGED) != 0) { if ((newpte & PG_RW) != 0) newpte |= PG_M; - } + } else + newpte |= PG_MANAGED; mpte = NULL; @@ -4423,11 +4424,9 @@ retry: /* * No, might be a protection or wiring change. */ - if ((origpte & PG_MANAGED) != 0) { - newpte |= PG_MANAGED; - if ((newpte & PG_RW) != 0) - vm_page_aflag_set(m, PGA_WRITEABLE); - } + if ((origpte & PG_MANAGED) != 0 && + (newpte & PG_RW) != 0) + vm_page_aflag_set(m, PGA_WRITEABLE); if (((origpte ^ newpte) & ~(PG_M | PG_A)) == 0) goto unchanged; goto validate; @@ -4444,8 +4443,7 @@ retry: /* * Enter on the PV list if part of our managed memory. */ - if ((m->oflags & VPO_UNMANAGED) == 0) { - newpte |= PG_MANAGED; + if ((newpte & PG_MANAGED) != 0) { pv = get_pv_entry(pmap, &lock); pv->pv_va = va; CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, pa); From owner-svn-src-all@freebsd.org Sun Feb 19 18:02: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 B99DACE51BD; Sun, 19 Feb 2017 18:02:12 +0000 (UTC) (envelope-from etnapierala@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 4C1C8DFF; Sun, 19 Feb 2017 18:02:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id v77so10715887wmv.0; Sun, 19 Feb 2017 10:02: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=w6c4g6Y/3btNcLa5ErIxKOgIl65Gqw8t/V1429NZb5M=; b=gVQrVUzulv+IL9WBgSGTcAjcDdimSmnK5Se2C5gA29Qt5vESrTNhANdKl62xmWPpd7 rLKmbFSsVXTJjbn3t55xZ/qOgEfg6PQm1YmtlLfoNc1vKnG51IgE2VP08DPWIcfprhHk rPqzzxYxBeJiuVpIHN89TeCGNH2qwYae4iEE0Slfuk5OLP+cl8T1/BOqqXrIlto2x0vR ugnGBhjYQbSBOMTS/u9uBsULCL71HcHjWQthizuByHUs4RYIVrZQrB2DoLGfG9Qp3Kjf uY57krrhky0X8fqF+D5uYrReS9HgBD+Dg8jSfIk0MXLxsG2a7qziwnThU66cKvTG+bZA UmtQ== 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=w6c4g6Y/3btNcLa5ErIxKOgIl65Gqw8t/V1429NZb5M=; b=gF4JsTlnKcfWBBULtghOKJoR5AW3S/AMLNYwJ7/1VJc4+6pz/X+AgsZD3jN8Tl1PKN JDb9DUNp2D5StRaAuaX3G7VPcVNVaeyTPtYjMfbEedJbScXqZLdy6TKw0pgiNfRsBifQ +aVULUG2KZSSTbFWIVfUrZucphoGt1ym+gCmUv6OsZvo8+E91AMmRJ4QwAh96q9Vjt6R +d8dGKki/nvlDiACZe2+PqW0mGuwabdy0EIUUDW2WW6GEO3k/kxW9x9FZOEPCPXAQuHO L0hVKq/bnYH/GI4uCzQq5893jSFbFTcGGT5xrorryEC7GXU9pBeoWwnIwxO+MYjPQ2+o dpug== X-Gm-Message-State: AMke39ln5NAhdpDy2RdIy1SiZTuNii1DgEi222PX/1oBjwOt045kOVsly1jM62miqhg1gg== X-Received: by 10.28.229.193 with SMTP id c184mr8938968wmh.83.1487527330060; Sun, 19 Feb 2017 10:02:10 -0800 (PST) Received: from brick (gbh5.clarehall.cam.ac.uk. [131.111.224.37]) by smtp.gmail.com with ESMTPSA id l130sm10329454wmf.0.2017.02.19.10.02.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Feb 2017 10:02:09 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sun, 19 Feb 2017 18:02:07 +0000 From: Edward Tomasz Napierala To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313943 - head/sbin/mdconfig Message-ID: <20170219180207.GA6808@brick> Mail-Followup-To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702191608.v1JG8wAN068829@repo.freebsd.org> <201702191619.v1JGJxkw013169@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702191619.v1JGJxkw013169@slippy.cwsent.com> 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: Sun, 19 Feb 2017 18:02:12 -0000 On 0219T0819, Cy Schubert wrote: > In message <201702191608.v1JG8wAN068829@repo.freebsd.org>, Edward Tomasz > Napier > ala writes: > > Author: trasz > > Date: Sun Feb 19 16:08:58 2017 > > New Revision: 313943 > > URL: https://svnweb.freebsd.org/changeset/base/313943 > > > > Log: > > Make mdconfig(8) not segfault when the kernel returns garbage data. > > > > MFC after: 2 weeks > > Sponsored by: DARPA, AFRL > > > > Modified: > > head/sbin/mdconfig/mdconfig.c > > > > Modified: head/sbin/mdconfig/mdconfig.c > > ============================================================================= > > = > > --- head/sbin/mdconfig/mdconfig.c Sun Feb 19 14:53:59 2017 (r31394 > > 2) > > +++ head/sbin/mdconfig/mdconfig.c Sun Feb 19 16:08:58 2017 (r31394 > > 3) > > @@ -452,8 +452,8 @@ md_list(const char *units, int opt, cons > > } > > gc = &pp->lg_config; > > type = geom_config_get(gc, "type"); > > - if (strcmp(type, "vnode") == 0 || > > - strcmp(type, "preload") == 0) { > > + if (type != NULL && (strcmp(type, "vnode") == 0 || > > + strcmp(type, "preload") == 0)) { > > file = geom_config_get(gc, "file"); > > if (fflag != NULL && > > strcmp(fflag, file) != 0) > > > > > > I wonder why the kernel is returning garbage data? Because of a bug. I hadn't tracked that down yet, though, and while kernel should be trusted, some additional error checking won't hurt. From owner-svn-src-all@freebsd.org Sun Feb 19 18:16: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 CFF44CE57FB; Sun, 19 Feb 2017 18:16:48 +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 8ECB114BC; Sun, 19 Feb 2017 18:16:48 +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 v1JIGlcH022314; Sun, 19 Feb 2017 18:16:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JIGlAh022313; Sun, 19 Feb 2017 18:16:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702191816.v1JIGlAh022313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 19 Feb 2017 18:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313961 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 18:16:48 -0000 Author: bapt Date: Sun Feb 19 18:16:47 2017 New Revision: 313961 URL: https://svnweb.freebsd.org/changeset/base/313961 Log: Update pci_vendors to 2017.02.15 MFC after: 3 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sun Feb 19 18:00:57 2017 (r313960) +++ head/share/misc/pci_vendors Sun Feb 19 18:16:47 2017 (r313961) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.01.08 -# Date: 2017-01-08 03:15:02 +# Version: 2017.02.15 +# Date: 2017-02-15 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -2254,6 +2254,7 @@ 1043 2016 Trinidad PRO [Radeon R9 370 OEM] 1458 2016 Trinidad PRO [Radeon R9 370 OEM] 1462 2016 Trinidad PRO [Radeon R9 370 OEM] + 1462 3050 R9 270 Gaming OC 148c 2016 Trinidad PRO [Radeon R9 370 OEM] 1682 2015 Trinidad PRO [Radeon R7 370] 174b 2016 Trinidad PRO [Radeon R9 370 OEM] @@ -5520,6 +5521,10 @@ 8056 Rockwell HCF 56K modem 808a Memory Stick Controller 81ce SxS Pro memory card +# 2nd ID + 905c SxS Pro memory card +# 2nd ID + 907f SxS Pro+ memory card 908f Aeolia ACPI 909e Aeolia Ethernet Controller (Marvell Yukon 2 Family) 909f Aeolia SATA AHCI Controller @@ -5528,6 +5533,7 @@ 90a2 Aeolia DMA Controller 90a3 Aeolia Memory (DDR3/SPM) 90a4 Aeolia USB 3.0 xHCI Host Controller + 90bc SxS Pro+ memory card 104e Oak Technology, Inc 0017 OTI-64017 0107 OTI-107 [Spitfire] @@ -6093,6 +6099,20 @@ 1077 0246 8300 Series Dual Port 10GbE Converged Network Adapter (TCP/IP Networking) 8031 8300 Series 10GbE Converged Network Adapter (FCoE) 8032 8300 Series 10GbE Converged Network Adapter (iSCSI) + 8070 FastLinQ QL41000 Series 10/25/40/50GbE Controller + 1077 0011 FastLinQ QL41212H 25GbE Adapter + 1077 0012 FastLinQ QL41112H 10GbE Adapter + 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) + 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter + 1077 000e FastLinQ QL41162H 10GbE FCoE Adapter + 8084 FastLinQ QL41000 Series 10/25/40/50GbE Controller (iSCSI) + 1077 000d FastLinQ QL41262H 25GbE iSCSI Adapter + 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter + 8090 FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF) + 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter (SR-IOV VF) + 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) + 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) + 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) @@ -10584,6 +10604,7 @@ 1347 GM108M [GeForce 940M] 1348 GM108M [GeForce 945M / 945A] 1349 GM108M [GeForce 930M] + 134b GM108M [GeForce 940MX] 134d GM108M [GeForce 940MX] 134e GM108M [GeForce 930MX] 134f GM108M [GeForce 920MX] @@ -10616,6 +10637,8 @@ 13b1 GM107GLM [Quadro M1000M] 13b2 GM107GLM [Quadro M600M] 13b3 GM107GLM [Quadro K2200M] + 13b4 GM107GLM [Quadro M620 Mobile] + 13b6 GM107GLM [Quadro M1200 Mobile] 13b9 GM107GL [NVS 810] 13ba GM107GL [Quadro K2200] 13bb GM107GL [Quadro K620] @@ -10648,6 +10671,7 @@ 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] 1431 GM206GL [Tesla M4] + 1436 GM206GLM [Quadro M2200 Mobile] 15f0 GP100GL 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] @@ -10677,28 +10701,31 @@ 1b82 GP104 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] - 1ba0 GP104M [GeForce GTX 1080] - 1ba1 GP104M [GeForce GTX 1070] + 1ba0 GP104M [GeForce GTX 1080 Mobile] + 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL - 1be0 GP104M [GeForce GTX 1080] - 1be1 GP104M [GeForce GTX 1070] + 1bb6 GP104GLM [Quadro P5000 Mobile] + 1bb7 GP104GLM [Quadro P4000 Mobile] + 1bb8 GP104GLM [Quadro P3000 Mobile] + 1be0 GP104M [GeForce GTX 1080 Mobile] + 1be1 GP104M [GeForce GTX 1070 Mobile] 1c00 GP106 1c01 GP106 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] - 1c20 GP106M [GeForce GTX 1060] + 1c20 GP106M [GeForce GTX 1060 Mobile] 1c30 GP106GL 1c35 GP106 - 1c60 GP106M [GeForce GTX 1060] + 1c60 GP106M [GeForce GTX 1060 Mobile] 1c70 GP106GL 1c80 GP107 1c81 GP107 [GeForce GTX 1050] 1c82 GP107 [GeForce GTX 1050 Ti] - 1c8c GP107M [GeForce GTX 1050 Ti] - 1c8d GP107M [GeForce GTX 1050] + 1c8c GP107M [GeForce GTX 1050 Ti Mobile] + 1c8d GP107M [GeForce GTX 1050 Mobile] 1c8e GP107M 1ca7 GP107GL 1ca8 GP107GL @@ -13224,6 +13251,7 @@ 0001 FireStream 155 0003 FireStream 50 119f Bull HN Information Systems + 1081 BXI Host Channel Adapter 11a0 Convex Computer Corporation 11a1 Hamamatsu Photonics K.K. 11a2 Sierra Research and Technology @@ -16021,6 +16049,9 @@ 509b T540-509B Unified Wire Ethernet Controller 509c T520-509C Unified Wire Ethernet Controller 509d T540-509D Unified Wire Ethernet Controller + 509e T520-509E Unified Wire Ethernet Controller + 509f T540-509F Unified Wire Ethernet Controller + 50a0 T540-50A0 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16049,7 +16080,7 @@ 5481 T540-5081 Unified Wire Ethernet Controller 5482 T504-5082 Unified Wire Ethernet Controller 5483 T540-5083 Unified Wire Ethernet Controller - 5484 T580-5084 Unified Wire Ethernet Controller + 5484 T540-5084 Unified Wire Ethernet Controller 5485 T580-5085 Unified Wire Ethernet Controller 5486 T580-5086 Unified Wire Ethernet Controller 5487 T580-5087 Unified Wire Ethernet Controller @@ -16069,6 +16100,9 @@ 549b T540-509B Unified Wire Ethernet Controller 549c T520-509C Unified Wire Ethernet Controller 549d T540-509D Unified Wire Ethernet Controller + 549e T520-509E Unified Wire Ethernet Controller + 549f T540-509F Unified Wire Ethernet Controller + 54a0 T540-50A0 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16097,7 +16131,7 @@ 5581 T540-5081 Unified Wire Storage Controller 5582 T504-5082 Unified Wire Storage Controller 5583 T540-5083 Unified Wire Storage Controller - 5584 T580-5084 Unified Wire Storage Controller + 5584 T540-5084 Unified Wire Storage Controller 5585 T580-5085 Unified Wire Storage Controller 5586 T580-5086 Unified Wire Storage Controller 5587 T580-5087 Unified Wire Storage Controller @@ -16117,6 +16151,9 @@ 559b T540-509B Unified Wire Storage Controller 559c T520-509C Unified Wire Storage Controller 559d T540-509D Unified Wire Storage Controller + 559e T520-509E Unified Wire Storage Controller + 559f T540-509F Unified Wire Storage Controller + 55a0 T540-50A0 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16145,7 +16182,7 @@ 5681 T540-5081 Unified Wire Storage Controller 5682 T504-5082 Unified Wire Storage Controller 5683 T540-5083 Unified Wire Storage Controller - 5684 T580-5084 Unified Wire Storage Controller + 5684 T540-5084 Unified Wire Storage Controller 5685 T580-5085 Unified Wire Storage Controller 5686 T580-5086 Unified Wire Storage Controller 5687 T580-5087 Unified Wire Storage Controller @@ -16165,6 +16202,9 @@ 569b T540-509B Unified Wire Storage Controller 569c T520-509C Unified Wire Storage Controller 569d T540-509D Unified Wire Storage Controller + 569e T520-509E Unified Wire Storage Controller + 569f T540-509F Unified Wire Storage Controller + 56a0 T540-50A0 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16232,7 +16272,7 @@ 5881 T540-5081 Unified Wire Ethernet Controller [VF] 5882 T504-5082 Unified Wire Ethernet Controller [VF] 5883 T540-5083 Unified Wire Ethernet Controller [VF] - 5884 T580-5084 Unified Wire Ethernet Controller [VF] + 5884 T540-5084 Unified Wire Ethernet Controller [VF] 5885 T580-5085 Unified Wire Ethernet Controller [VF] 5886 T580-5086 Unified Wire Ethernet Controller [VF] 5887 T580-5087 Unified Wire Ethernet Controller [VF] @@ -16252,6 +16292,9 @@ 589b T540-509B Unified Wire Ethernet Controller [VF] 589c T520-509C Unified Wire Ethernet Controller [VF] 589d T540-509D Unified Wire Ethernet Controller [VF] + 589e T520-509E Unified Wire Ethernet Controller [VF] + 589f T540-509F Unified Wire Ethernet Controller [VF] + 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16265,6 +16308,8 @@ 6011 T6225-LL-CR Unified Wire Ethernet Controller 6014 T61100-OCP-SO Unified Wire Ethernet Controller 6015 T6201-BT Unified Wire Ethernet Controller + 6080 T6225-6080 Unified Wire Ethernet Controller + 6081 T62100-6081 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16278,6 +16323,8 @@ 6411 T6225-LL-CR Unified Wire Ethernet Controller 6414 T61100-OCP-SO Unified Wire Ethernet Controller 6415 T6201-BT Unified Wire Ethernet Controller + 6480 T6225-6080 Unified Wire Ethernet Controller + 6481 T62100-6081 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16291,6 +16338,8 @@ 6511 T6225-LL-CR Unified Wire Storage Controller 6514 T61100-OCP-SO Unified Wire Storage Controller 6515 T6201-BT Unified Wire Storage Controller + 6580 T6225-6080 Unified Wire Storage Controller + 6581 T62100-6081 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16304,6 +16353,8 @@ 6611 T6225-LL-CR Unified Wire Storage Controller 6614 T61100-OCP-SO Unified Wire Storage Controller 6615 T6201-BT Unified Wire Storage Controller + 6680 T6225-6080 Unified Wire Storage Controller + 6681 T62100-6081 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16317,6 +16368,8 @@ 6811 T6225-LL-CR Unified Wire Ethernet Controller [VF] 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF] 6815 T6201-BT Unified Wire Ethernet Controller [VF] + 6880 T6225-6080 Unified Wire Ethernet Controller [VF] + 6881 T62100-6081 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -16516,6 +16569,7 @@ 14a2 Millennium Engineering Inc 14a3 Maverick Networks 14a4 Lite-On Technology Corporation + 22f1 M8Pe Series NVMe SSD # Wrong vendor ID used 4318 Broadcom BCM4318 [AirForce One 54g] 802.11g WLAN Controller 14a5 XIONICS Document Technologies Inc @@ -17957,6 +18011,7 @@ 1599 Delta Electronics Inc 159a General Instrument 159b Faraday Technology Corp + 4321 StorLink SL3516 (Gemini) Host Bridge 159c Stratus Computer Systems 159d Ningbo Harrison Electronics Co Ltd 159e A-Max Technology Co Ltd @@ -18013,6 +18068,7 @@ 024f MT53100 [Spectrum-2, Flash recovery mode] 0262 MT27710 [ConnectX-4 Lx Programmable] EN 0263 MT27710 [ConnectX-4 Lx Programmable Virtual Function] EN + 0281 NPS-600 Flash Recovery 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 103c 1777 InfiniBand FDR/EN 10/40Gb Dual Port 544FLR-QSFP Adapter (Rev Cx) @@ -18872,10 +18928,18 @@ 9700 Octeon III CN73XX Network Processor 9702 CN23XX [LiquidIO II] Intelligent Adapter 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE Intelligent adapter - 177d 0004 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter +# This was changed during the production phase to 10GbE adapter. + 177d 0004 CN2350 [LiquidIO II] 2-port 10GbE Intelligent adapter + 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE Intelligent adapter + 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE Intelligent adapter + 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter 9703 CN23XX [LiquidIO II] NVMe Controller 9712 CN23XX [LiquidIO II] SRIOV Virtual Function 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0004 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE SRIOV Virtual Function + 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE SRIOV Virtual Function 9713 CN23XX [LiquidIO II] NVMe SRIOV Virtual Function 9800 Octeon Fusion CNF75XX Processor a001 ThunderX MRML(Master RML Bridge to RSL devices) @@ -19445,8 +19509,8 @@ 0155 NT100E3-1-PTP Network Adapter 1x100Gb 0165 NT80E3-2-PTP Network Adapter 2x40Gb 0175 NT20E3-2-PTP Network Adapter 2x10Gb - 0185 NT40A01-4x1 Network Adapter 4x1Gb - 01a5 NT200A01 Network Adapter 2x100Gb + 0185 NT40A01 Network Adapter + 01a5 NT200A01 Network Adapter 18f6 NextIO 1000 [Nexsis] Switch Virtual P2P PCIe Bridge 1001 [Texsis] Switch Virtual P2P PCIe Bridge @@ -19602,14 +19666,15 @@ 1924 800e SFN7x42Q-R2 Flareon Ultra 7000 Series 10/40G Adapter 1924 800f SFN7xx4F-R1 Flareon Ultra 7000 Series 10G Adapter 0a03 SFC9220 10/40G Ethernet Controller - 1924 8011 SFN 8022-R1 Solarflare Flareon 8000 Series 10G Adapter + 1924 8011 SFN8022-R1 Flareon 8000 Series 10G Adapter 1924 8012 SFN8522-R1 Flareon Ultra 8000 Series 10G Adapter - 1924 8013 SFN8042-R1 Solarflare Flareon 8000 Series 10/40G Adapter + 1924 8013 SFN8042-R1 Flareon 8000 Series 10/40G Adapter 1924 8014 SFN8542-R1 Flareon Ultra 8000 Series 10/40G Adapter 1924 8016 SFN8022-R2 Flareon 8000 Series 10G Adapter 1924 8017 SFN8522-R2 Flareon Ultra 8000 Series 10G Adapter 1924 8018 SFN8042-R2 Flareon 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 Flareon Ultra 8000 Series 10/40G Adapter + 1924 801a SFN8722-R1 Flareon Ultra 8000 Series OCP 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -19902,6 +19967,7 @@ 5808 DDRdrive X8 dd52 DDRdrive X1-30 19e5 Huawei Technologies Co., Ltd. + 1711 Hi1710 [iBMC Intelligent Management system chip w/VGA support] 19e7 NET (Network Equipment Technologies) 1001 STIX DSP Card 1002 STIX - 1 Port T1/E1 Card @@ -20101,7 +20167,7 @@ 1b03 Magnum Semiconductor, Inc, 6100 DXT/DXTPro Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder 7000 D7 Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder -1b08 MSC Vertriebs GmbH +1b08 MSC Technologies GmbH 1b0a Pegatron 1b13 Jaton Corp 1b1a K&F Computing Research Co. @@ -20318,6 +20384,8 @@ 0003 Ultrastar SN100 Series NVMe SSD 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter +1c5f Beijing Memblaze Technology Co. Ltd. + 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) 1c63 Science and Research Centre of Computer Technology (JSC "NICEVT") # http://www.radiotec.ru/catalog.php?cat=jr8&art=14109 @@ -20437,16 +20505,18 @@ 4022 TN9310 10GbE SFP+ Ethernet Adapter 1043 8709 XG-C100F 10GbE SFP+ Ethernet Adapter 1186 4d00 DXE-810S 10GbE SFP+ Ethernet Adapter - 1432 8103 EN-8102PF 10GbE SPF+ Ethernet Adapter + 1432 8103 10 Gigabit Ethernet SFP+ PCI Express Adapter 1fc9 3015 Ethernet Adapter 4024 TN9210 10GBase-T Ethernet Adapter 4025 TN9510 10GBase-T/NBASE-T Ethernet Adapter 105a 7203 SANLink3 NBase-T1 1186 2900 DXE-810T 10GBase-T Ethernet Adapter - 1432 8102 EN-8102P 10GbE Ethernet Adapter + 1432 8102 10 Gigabit Ethernet PCI Express Adapter 1fc9 3015 Ethernet Adapter 4026 TN9610 10GbE SFP+ Ethernet Adapter 4027 TN9710P 10GBase-T/NBASE-T Ethernet Adapter + 1432 8104 10 Gigabit Ethernet PCI Express Adapter + 1fc9 3015 Ethernet Adapter 4527 TN9710Q 5GBase-T/NBASE-T Ethernet Adapter 1fcc StreamLabs f416 MS416 @@ -21748,6 +21818,7 @@ 0a26 Haswell-ULT Integrated Graphics Controller 0a2a Haswell-ULT Integrated Graphics Controller 0a2e Haswell-ULT Integrated Graphics Controller + 0a53 DC P3520 SSD 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -22105,7 +22176,7 @@ 8086 1019 PRO/1000 CT Desktop Connection 8086 301f D865PERL mainboard 8086 3025 D875PBZ motherboard - 8086 302c Intel 82865G Mainboard (D865GBF) + 8086 302c D865GBF Mainboard 8086 3427 S875WP1-E mainboard 101a 82547EI Gigabit Ethernet Controller (Mobile) 8086 101a PRO/1000 CT Mobile Connection @@ -22303,7 +22374,7 @@ 1096 80003ES2LAN Gigabit Ethernet Controller (Copper) 15d9 1096 Motherboard 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 1097 631xESB/632xESB DPT LAN Controller (Fiber) 1098 80003ES2LAN Gigabit Ethernet Controller (Serdes) 1099 82546GB Gigabit Ethernet Controller (Copper) @@ -22457,6 +22528,7 @@ 103c 17d2 Ethernet 10Gb 2-port 560M Adapter 103c 18d0 Ethernet 10Gb 2-port 560FLB Adapter 1059 0111 T4007 10GbE interface + 1059 0130 T4009 10GbE interface 8086 000c Ethernet X520 10GbE Dual Port KX4-KR Mezz 10f9 82599 10 Gigabit Dual Port Network Connection 10fb 82599ES 10-Gigabit SFI/SFP+ Network Connection @@ -22862,6 +22934,7 @@ 1059 0110 T4005 1GbE interface 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface + 1059 0130 T4009 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23187,7 +23260,7 @@ 1a31 82845 845 [Brookdale] Chipset AGP Bridge 1a38 5000 Series Chipset DMA Engine 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 1a48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE SR Server Adapter 8086 a11f PRO/10GbE SR Server Adapter @@ -24772,13 +24845,13 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2680 631xESB/632xESB/3100 Chipset SATA IDE Controller 2681 631xESB/632xESB SATA AHCI Controller 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2682 631xESB/632xESB SATA RAID Controller 103c 31fe Adaptec Serial ATA HostRAID 2683 631xESB/632xESB SATA RAID Controller @@ -24788,31 +24861,31 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2689 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 1028 01bb PowerEdge 1955 onboard USB 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268a 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268b 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 1028 01f0 PowerEdge R900 onboard USB 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268c 631xESB/632xESB/3100 Chipset EHCI USB2 Controller 1028 01bb PowerEdge 1955 onboard USB 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2690 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 103c 31fe ProLiant DL140 G3 15d9 9680 X7DBN Motherboard @@ -24827,7 +24900,7 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 269e 631xESB/632xESB IDE Controller 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard @@ -24844,7 +24917,7 @@ 103c 2a3b Pavilion A1512X 1462 7418 Wind PC MS-7418 8086 544e DeskTop Board D945GTP - 8086 d605 Intel Desktop Board D945GCCR + 8086 d605 Desktop Board D945GCCR 2774 82955X Memory Controller Hub 2775 82955X PCI Express Root Port 2776 82945G/GZ Integrated Graphics Controller @@ -26205,8 +26278,7 @@ 8086 4010 Dual Band Wireless AC 3165 # Stone Peak 1x1 8086 4210 Dual Band Wireless AC 3165 -# Stone Peak 1x1 - 3166 Intel Dual Band Wireless-AC 3165 Plus Bluetooth + 3166 Dual Band Wireless-AC 3165 Plus Bluetooth 3200 GD31244 PCI-X SATA HBA 1775 c200 C2K onboard SATA host bus adapter 3310 IOP348 I/O Processor From owner-svn-src-all@freebsd.org Sun Feb 19 18: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 47A3ECE5CF9; Sun, 19 Feb 2017 18:40:59 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 08D8C1E6B; Sun, 19 Feb 2017 18:40:58 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id fWPmcUeaQsa1kfWPnchaGf; Sun, 19 Feb 2017 11:40:57 -0700 X-Authority-Analysis: v=2.2 cv=W+NIbVek 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=r4ZvWj_WVzq_KmOXN24A: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 B8B16508; Sun, 19 Feb 2017 10:40:54 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1JIerbs037421; Sun, 19 Feb 2017 10:40:53 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702191840.v1JIerbs037421@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: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313943 - head/sbin/mdconfig In-Reply-To: Message from Edward Tomasz Napierala of "Sun, 19 Feb 2017 18:02:07 +0000." <20170219180207.GA6808@brick> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Feb 2017 10:40:53 -0800 X-CMAE-Envelope: MS4wfIlAnacJbB9Fw+5LVLTLKq29bGtUJYU4dll5ppobnjKYreGU387pC92AiuiPqV78suCfFyKbgnpyM7hp3+giUV7X1f+hBFP/SAUZMQ6W3cDivM0X1S4C oklrrboVgOFRpXE9DgLQR65Bbf/CEbcNw287Q0OXNBoYvGPkNM79kydafOclw2Uvw/CNrvErGXv56inndy5YxZxPJc2D78WHd2VZ/44RtOsrSJ/QdjZnEGob vEoVdD1PfeB4S3fB57gYPQ== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 18:40:59 -0000 In message <20170219180207.GA6808@brick>, Edward Tomasz Napierala writes: > On 0219T0819, Cy Schubert wrote: > > In message <201702191608.v1JG8wAN068829@repo.freebsd.org>, Edward Tomasz > > Napier > > ala writes: > > > Author: trasz > > > Date: Sun Feb 19 16:08:58 2017 > > > New Revision: 313943 > > > URL: https://svnweb.freebsd.org/changeset/base/313943 > > > > > > Log: > > > Make mdconfig(8) not segfault when the kernel returns garbage data. > > > > > > MFC after: 2 weeks > > > Sponsored by: DARPA, AFRL > > > > > > Modified: > > > head/sbin/mdconfig/mdconfig.c > > > > > > Modified: head/sbin/mdconfig/mdconfig.c > > > ========================================================================= > ==== > > > = > > > --- head/sbin/mdconfig/mdconfig.c Sun Feb 19 14:53:59 2017 (r31394 > > > 2) > > > +++ head/sbin/mdconfig/mdconfig.c Sun Feb 19 16:08:58 2017 (r31394 > > > 3) > > > @@ -452,8 +452,8 @@ md_list(const char *units, int opt, cons > > > } > > > gc = &pp->lg_config; > > > type = geom_config_get(gc, "type"); > > > - if (strcmp(type, "vnode") == 0 || > > > - strcmp(type, "preload") == 0) { > > > + if (type != NULL && (strcmp(type, "vnode") == 0 || > > > + strcmp(type, "preload") == 0)) { > > > file = geom_config_get(gc, "file"); > > > if (fflag != NULL && > > > strcmp(fflag, file) != 0) > > > > > > > > > > I wonder why the kernel is returning garbage data? > > Because of a bug. I hadn't tracked that down yet, though, and while > kernel should be trusted, some additional error checking won't hurt. Agreed. -- 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 19 19:30: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 1B38CCE59BD; Sun, 19 Feb 2017 19:30:35 +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 F2B171342; Sun, 19 Feb 2017 19:30:33 +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 v1JJUXnr051029; Sun, 19 Feb 2017 19:30:33 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JJUW3q051018; Sun, 19 Feb 2017 19:30:32 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702191930.v1JJUW3q051018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 19 Feb 2017 19:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 19:30:35 -0000 Author: allanjude Date: Sun Feb 19 19:30:31 2017 New Revision: 313962 URL: https://svnweb.freebsd.org/changeset/base/313962 Log: improve PBKDF2 performance The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it could be GELI's PBKDF2 uses a simple benchmark to determine a number of iterations that will takes approximately 2 seconds. The security provided is actually half what is expected, because an attacker could use the optimized algorithm to brute force the key in half the expected time. With this change, all newly generated GELI keys will be approximately 2x as strong. Previously generated keys will talk half as long to calculate, resulting in faster mounting of encrypted volumes. Users may choose to rekey, to generate a new key with the larger default number of iterations using the geli(8) setkey command. Security of existing data is not compromised, as ~1 second per brute force attempt is still a very high threshold. PR: 202365 Original Research: https://jbp.io/2015/08/11/pbkdf2-performance-matters/ Submitted by: Joe Pixton (Original Version), jmg (Later Version) Reviewed by: ed, pjd, delphij Approved by: secteam, pjd (maintainer) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8236 Added: head/tests/sys/geom/eli/ head/tests/sys/geom/eli/Makefile (contents, props changed) head/tests/sys/geom/eli/pbkdf2/ head/tests/sys/geom/eli/pbkdf2/Makefile (contents, props changed) head/tests/sys/geom/eli/pbkdf2/gentestvect.py (contents, props changed) head/tests/sys/geom/eli/pbkdf2/hmactest.c (contents, props changed) head/tests/sys/geom/eli/pbkdf2/testvect.h (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/sys/boot/geli/Makefile head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_hmac.c head/sys/geom/eli/pkcs5v2.c head/tests/sys/geom/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Feb 19 18:16:47 2017 (r313961) +++ head/etc/mtree/BSD.tests.dist Sun Feb 19 19:30:31 2017 (r313962) @@ -425,6 +425,10 @@ .. .. .. + eli + pbkdf2 + .. + .. .. kern acct Modified: head/sys/boot/geli/Makefile ============================================================================== --- head/sys/boot/geli/Makefile Sun Feb 19 18:16:47 2017 (r313961) +++ head/sys/boot/geli/Makefile Sun Feb 19 19:30:31 2017 (r313962) @@ -24,6 +24,10 @@ WARNS?= 0 .PATH: ${.CURDIR}/../../../lib/libc/string SRCS+= bcmp.c bcopy.c bzero.c +# need explicit_bzero for crypto +.PATH: ${.CURDIR}/../../../sys/libkern +SRCS+= explicit_bzero.c + # Our password input method SRCS+= pwgets.c Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Sun Feb 19 18:16:47 2017 (r313961) +++ head/sys/geom/eli/g_eli.h Sun Feb 19 19:30:31 2017 (r313962) @@ -692,8 +692,8 @@ int g_eli_crypto_decrypt(u_int algo, u_c const u_char *key, size_t keysize); struct hmac_ctx { - SHA512_CTX shactx; - u_char k_opad[128]; + SHA512_CTX innerctx; + SHA512_CTX outerctx; }; void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, Modified: head/sys/geom/eli/g_eli_hmac.c ============================================================================== --- head/sys/geom/eli/g_eli_hmac.c Sun Feb 19 18:16:47 2017 (r313961) +++ head/sys/geom/eli/g_eli_hmac.c Sun Feb 19 19:30:31 2017 (r313962) @@ -47,7 +47,7 @@ void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, size_t hkeylen) { - u_char k_ipad[128], key[128]; + u_char k_ipad[128], k_opad[128], key[128]; SHA512_CTX lctx; u_int i; @@ -66,13 +66,17 @@ g_eli_crypto_hmac_init(struct hmac_ctx * /* XOR key with ipad and opad values. */ for (i = 0; i < sizeof(key); i++) { k_ipad[i] = key[i] ^ 0x36; - ctx->k_opad[i] = key[i] ^ 0x5c; + k_opad[i] = key[i] ^ 0x5c; } - bzero(key, sizeof(key)); - /* Perform inner SHA512. */ - SHA512_Init(&ctx->shactx); - SHA512_Update(&ctx->shactx, k_ipad, sizeof(k_ipad)); - bzero(k_ipad, sizeof(k_ipad)); + explicit_bzero(key, sizeof(key)); + /* Start inner SHA512. */ + SHA512_Init(&ctx->innerctx); + SHA512_Update(&ctx->innerctx, k_ipad, sizeof(k_ipad)); + explicit_bzero(k_ipad, sizeof(k_ipad)); + /* Start outer SHA512. */ + SHA512_Init(&ctx->outerctx); + SHA512_Update(&ctx->outerctx, k_opad, sizeof(k_opad)); + explicit_bzero(k_opad, sizeof(k_opad)); } void @@ -80,28 +84,27 @@ g_eli_crypto_hmac_update(struct hmac_ctx size_t datasize) { - SHA512_Update(&ctx->shactx, data, datasize); + SHA512_Update(&ctx->innerctx, data, datasize); } void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize) { u_char digest[SHA512_MDLEN]; - SHA512_CTX lctx; - SHA512_Final(digest, &ctx->shactx); - /* Perform outer SHA512. */ - SHA512_Init(&lctx); - SHA512_Update(&lctx, ctx->k_opad, sizeof(ctx->k_opad)); - bzero(ctx, sizeof(*ctx)); - SHA512_Update(&lctx, digest, sizeof(digest)); - SHA512_Final(digest, &lctx); - bzero(&lctx, sizeof(lctx)); + /* Complete inner hash */ + SHA512_Final(digest, &ctx->innerctx); + + /* Complete outer hash */ + SHA512_Update(&ctx->outerctx, digest, sizeof(digest)); + SHA512_Final(digest, &ctx->outerctx); + + explicit_bzero(ctx, sizeof(*ctx)); /* mdsize == 0 means "Give me the whole hash!" */ if (mdsize == 0) mdsize = SHA512_MDLEN; bcopy(digest, md, mdsize); - bzero(digest, sizeof(digest)); + explicit_bzero(digest, sizeof(digest)); } void Modified: head/sys/geom/eli/pkcs5v2.c ============================================================================== --- head/sys/geom/eli/pkcs5v2.c Sun Feb 19 18:16:47 2017 (r313961) +++ head/sys/geom/eli/pkcs5v2.c Sun Feb 19 19:30:31 2017 (r313962) @@ -56,6 +56,7 @@ pkcs5v2_genkey(uint8_t *key, unsigned ke uint8_t *counter, *keyp; u_int i, bsize, passlen; uint32_t count; + struct hmac_ctx startpoint, ctx; passlen = strlen(passphrase); bzero(key, keylen); @@ -66,20 +67,23 @@ pkcs5v2_genkey(uint8_t *key, unsigned ke for (count = 1; keylen > 0; count++, keylen -= bsize, keyp += bsize) { bsize = MIN(keylen, sizeof(md)); - counter[0] = (count >> 24) & 0xff; - counter[1] = (count >> 16) & 0xff; - counter[2] = (count >> 8) & 0xff; - counter[3] = count & 0xff; - g_eli_crypto_hmac(passphrase, passlen, saltcount, - sizeof(saltcount), md, 0); + be32enc(counter, count); + + g_eli_crypto_hmac_init(&startpoint, passphrase, passlen); + ctx = startpoint; + g_eli_crypto_hmac_update(&ctx, saltcount, sizeof(saltcount)); + g_eli_crypto_hmac_final(&ctx, md, sizeof(md)); xor(keyp, md, bsize); for(i = 1; i < iterations; i++) { - g_eli_crypto_hmac(passphrase, passlen, md, sizeof(md), - md, 0); + ctx = startpoint; + g_eli_crypto_hmac_update(&ctx, md, sizeof(md)); + g_eli_crypto_hmac_final(&ctx, md, sizeof(md)); xor(keyp, md, bsize); } } + explicit_bzero(&startpoint, sizeof(startpoint)); + explicit_bzero(&ctx, sizeof(ctx)); } #ifndef _KERNEL Modified: head/tests/sys/geom/Makefile ============================================================================== --- head/tests/sys/geom/Makefile Sun Feb 19 18:16:47 2017 (r313961) +++ head/tests/sys/geom/Makefile Sun Feb 19 19:30:31 2017 (r313962) @@ -3,5 +3,6 @@ TESTSDIR= ${TESTSBASE}/sys/geom TESTS_SUBDIRS+= class +TESTS_SUBDIRS+= eli .include Added: head/tests/sys/geom/eli/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/eli/Makefile Sun Feb 19 19:30:31 2017 (r313962) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/sys/geom/eli + +ATF_TESTS_SUBDIRS+= pbkdf2 + +.include Added: head/tests/sys/geom/eli/pbkdf2/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/eli/pbkdf2/Makefile Sun Feb 19 19:30:31 2017 (r313962) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +.include + +SYSDIR = ../../../../../sys +.PATH: ${SYSDIR}/geom/eli +.PATH: ${SYSDIR}/crypto/sha2 + +TESTSDIR= ${TESTBASE}/sys/geom/eli/pbkdf2 + +ATF_TESTS_C= pbkdf2 + +CFLAGS.pbkdf2= -I${SYSDIR} + +SRCS.pbkdf2= \ + hmactest.c \ + g_eli_crypto.c \ + g_eli_hmac.c \ + pkcs5v2.c \ + sha512c.c \ + sha256c.c + +LIBADD.pbkdf2= crypto + +testvect.h: gentestvect.py + python gentestvect.py > $@ + +.include Added: head/tests/sys/geom/eli/pbkdf2/gentestvect.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/eli/pbkdf2/gentestvect.py Sun Feb 19 19:30:31 2017 (r313962) @@ -0,0 +1,63 @@ +#!/usr/bin/env python +# $FreeBSD$ + +from hashlib import pbkdf2_hmac +import hashlib +import itertools +import string + +#From: https://stackoverflow.com/questions/14945095/how-to-escape-string-for-generated-c +def cstring(s, encoding='ascii'): + if isinstance(s, unicode): + s = s.encode(encoding) + + result = '' + for c in s: + if not (32 <= ord(c) < 127) or c in ('\\', '"'): + result += '\\%03o' % ord(c) + else: + result += c + + return '"' + result + '"' + +intarr = lambda y: ', '.join(map(lambda x: str(ord(x)), y)) + +_randfd = open('/dev/urandom', 'rb') +_maketrans = string.maketrans('', '') +def randgen(l, delchrs=None): + if delchrs is None: + return _randfd.read(l) + + s = '' + while len(s) < l: + s += string.translate(_randfd.read(l - len(s)), _maketrans, + delchrs) + return s + +def printhmacres(salt, passwd, itr, hmacout): + print '\t{ %s, %d, %s, %d, %s, %d },' % (cstring(salt), len(salt), + cstring(passwd), itr, cstring(hmacout), len(hmacout)) + +if __name__ == '__main__': + import sys + + if len(sys.argv) == 1: + hashfun = 'sha512' + else: + hashfun = sys.argv[1] + + if hashfun not in hashlib.algorithms: + print 'Invalid hash function: %s' % `hashfun` + sys.exit(1) + + print '/* Test Vectors for PBKDF2-%s */' % hashfun.upper() + print '\t/* salt, saltlen, passwd, itr, hmacout, hmacoutlen */' + for saltl in xrange(8, 64, 8): + for itr in itertools.chain(xrange(100, 1000, 100), xrange(1000, + 10000, 1000)): + for passlen in xrange(8, 80, 8): + salt = randgen(saltl) + passwd = randgen(passlen, '\x00') + hmacout = pbkdf2_hmac(hashfun, passwd, salt, + itr) + printhmacres(salt, passwd, itr, hmacout) Added: head/tests/sys/geom/eli/pbkdf2/hmactest.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/eli/pbkdf2/hmactest.c Sun Feb 19 19:30:31 2017 (r313962) @@ -0,0 +1,41 @@ +/* + * $FreeBSD$ + */ + +#include +#include + +#include + +const struct { + char *salt; + size_t saltlen; + char *passwd; + int iterations; + char *hmacout; + size_t hmaclen; +} testdata[] = { +#include "testvect.h" +}; + +ATF_TC_WITHOUT_HEAD(hmactest); +ATF_TC_BODY(hmactest, tc) +{ + size_t i; + uint8_t hmacout[64]; + + for (i = 0; i < nitems(testdata); i++) { + pkcs5v2_genkey(hmacout, testdata[i].hmaclen, + (uint8_t *)testdata[i].salt, testdata[i].saltlen, + testdata[i].passwd, testdata[i].iterations); + ATF_REQUIRE(bcmp(hmacout, testdata[i].hmacout, + testdata[i].hmaclen) == 0); + } +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, hmactest); + + return (atf_no_error()); +} Added: head/tests/sys/geom/eli/pbkdf2/testvect.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/eli/pbkdf2/testvect.h Sun Feb 19 19:30:31 2017 (r313962) @@ -0,0 +1,1137 @@ +/* $FreeBSD$ */ +/* Test Vectors for PBKDF2-SHA512 */ + /* salt, saltlen, passwd, itr, hmacout, hmacoutlen */ + { "\331}\035\215\000\272\350\261", 8, "\323\303\210\231\260\225\217\035", 100, "J\257\275\352n\371\300!tp\367\257\347c'\000\243F\246\376\274H\263\312m\336\304\3515P\222Cb\037-\313W\0067\232\024%\235\252\322\035\225k\025\2248\251r\312]v\316\021j\231\224\2556\350", 64 }, + { "\321\213\277\330\210E\207x", 8, "(C\371\344\354\356\232\212\346\014\335M(\234g\226", 100, "\035MoB\245\001\000\315\332\235\356?alD\231I[%A\372\367\027\267,\303\022\324\004\302a\302t\257\306S\251\250;-pa\246Z\200\003*+\026\305_\250\214n\321\340.\032a3\371\346\025\042", 64 }, + { "\344\353\215\257\020\315\245\367", 8, "/pj@N\344\271\243^\352\236gu\352\344os\366FR\362\001\347\301", 100, "\223eS:\015\311\023\317\230O\012\347\014\32070\321\337p\353\305\361\223\323\333&\011'\360?\022\374P\336\337\031\266,~@!\037\000\320v\360!\225\221@C\266|k\370@\305\202\235+\314\247\305&", 64 }, + { "\364\275\222\376\0064\240g", 8, "_\2000 A\233#\372\351\332\247\010\313\274\334\255\362J\356\333\302\345\317\305*\357 \366Aj\344\346", 100, "\223\015X\340\024\244\2767\027\253\261\232\360(?\350H7\326K\322\246\341\222\202:@\254\3218\016T\275\212^\005\344\202\230\220s\311\201\025\233~K6\241*b\244\203\273\355\270\277\242\300V3\037\224\311", 64 }, + { "\272\207\326\030\010\374\263f", 8, "\323\230\233\317\337\001\241]G\312\347\320K\3374\247\016\343\246\353\300\373\267\335\314h\216\245$\373\210\214\014b\340\377\256\0202E", 100, "a\274S.\032\246\330\321\322\207\004\241n\303\363\361\361\215\367Xi\250\275\246\037\355\255\342\004\253\250\243&\032\357\250\204\207K\2612\0318\3353\253\335Z\351\337\253v\345\322r\030\0066\230jp\345\373\203", 64 }, + { "j\276\230\215\031$\326v", 8, "gy\264\354\363\322(w\262\272\203\306{\356\031\376\277+\276L\337\270G\345!>29\010\204m\240!\326\255\326\321\272(\325T\033B\262[\267]\272", 100, "\2563\024\201\310\372\017\373\270\232\277\265:j\231\365\032zS\3723\012\341i\302V\233l\247\030:\355\262]\337\361JUe:\350|#D\262\335)\260\333\273\221\252\005\226\322'\371+a\270a\302\276p", 64 }, + { ",;\270P\012\035\262\235", 8, "\375 \232J\304\271_\272\033\027\363\021\227\260\323\310\304k\004.\327\354\217,\357\353]I0\332We\245\257\371,\260\360\325\224\026q[VuS\217\004\262\376T\353\262\321\241\024", 100, "\313\246&~\374Zq(0\000\002\332\356\355M\353Z?\310~\234\327\011\242\370\032GK\250\020\203sJ\234I,\271\012\230\204g\323\345\343\343\350\231\227\015\350b\256\012\367Q\255v\365\210\247\2614\210\365", 64 }, + { "\021\325\267u\203$\352\274", 8, "\232\032\225'\021*'a\042\023{\250\361r\262\365\370\032\347\336\363Re28\033J\3763^\311I\322:\036\204\320\033\245\200\262\225\341\377\334\241p\314\334\005O,\374\225\234\014\266\365\030i6\210a\205", 100, "\220\006\216\2420-8m\2766\353(6\212\306\261C@\252\2104\005\205\274\204\365\226\373\016\345\332\207\361A\244\023W\3051:\277\2705Z\253\262\371M\024L\215\224\340p\336\355\250\030*8\300\017\254f", 64 }, + { "[\353e\224\2423\270m", 8, "\1776\374\302o0\007\307w\032\307\266\376\320\042/\266\352\233\224\316\3616\314!`\015d\316\370L{\201B\245\317\366@V\036\227\273I\205\251\306GW\200*\340P\267\202#\354\330\266O\347\254(\203\270\366w\274\375\272\016\240\313", 100, "?j\005\340=\022\012NM\024\231\220_u\023@\042\214\014b\375\251\023\244y3m\330\377\341\271~V0\263\223\274\325Rmug\026Dt!\347%\270\244\371@\177\350\250N\320\246\034\320\013|\276\027", 64 }, + { "\262\304(\244\326\272\262\311", 8, "\210C(\273\376\013/\034", 200, "6+\233\201\350\374\2053\013\377SA\007\037\303\027RyrC\361\303\321\031\225d\215\314\213\210\006\031\217\035L)\377'\016\263\310\206\326\372\362\230\226.F\134\277\367\35357(\214\262\036\310@\363#\020", 64 }, + { "\246<\216\226^F\004\036", 8, "\344].\210\212\236\252f\256n\006\250\2615\325\371", 200, "\213J\234\270\227$St\265\035\323\001&\025\027T>\015F\205\325\361_\003l\245|\213S\232@\254o\227\235l$\355\037\214\220\032\213\320\265lM\334\320\313+\205.\355\310\201K\370^\025\134\346[K", 64 }, + { "9s72\020\270\251\350", 8, "\323\370:k\323o\271Y\335\306\375#\333\222\246?C\313\023\202>\005\025\216", 200, "\371\373\341\202(\231\010\325_\335\205\253\216\371\227\354\352Os2\356e\033L\236znr;\337a'\025\335n\032f\304\177u\001n{\236`\261\346N\2748R\017\243\226[\256@<\021m\202r\363g", 64 }, + { "\032\216\254\215\022l\001H", 8, "\027J\232\302\240lTSU\215y\262\360\017\346\3253\276r\276\211\306>\3740\263\264\002\333J;\262", 200, "\3206K,\267r<\302r\207y\373\3625]2Y\3710\343\272\211\202\3465g\340jG\001`\341\352\313\203\250x\221K\254iV\350w\2220\257Yc\360Z\263\237\255\042\325\341\307\330\232s@?\210", 64 }, + { "D\302g\023\316\224l\271", 8, "\262t\301{\366\345Bv\271!\213\303\244O8\314\336\363\325|\206x\034d$#\001x9\012\241\256W\241\334\307\240\207F", 64 }, + { "\037\346\010\241]\004x\204", 8, "T\334\371\316I\33656Q\027\277\203\033\303\240\371\231\352\214\3701@\002\015?2\264\002\257R\205\250\264}\021\012\326\366wF\311\267\271\0042C:/\341\031\242\337\237.\021V\034\263`W\306Y\3533", 200, "V\370Nt\341W\226|\367\226\200\033|\006Kii\263\304\307\347\301#L\371\335l|O\304\300v\361d\255h^\322\026\332U\224\270\255\227\022\226G\326\363\303\244\234\235\016/<\331\247\307\242\355\226\307", 64 }, + { "\364\303X\325\327\256\342f", 8, "\227E\237\320\214GB\332\005\0333\250=\020c(\345\007?\032)\2643\243\202\371\200\030\002\225\011/\030\030\003Q\354\344\361B\214\333.\015\336`\376.\360\243$\017\367K\207\212\347L\356S\230\346\034*\307\207\203\233a\310\370\255", 200, "L(\217#(\300jA\343\037\251rR\312G\024\016dj:\212|\024\373\275\134\375\374\247\266FpF\275:\373_\314\134\244\016\373\203k\265\225\243\212t\240\310\347\226\262%\233\213\332w\042WL\302\331", 64 }, + { "c\027\266\220\010\031\241\313", 8, "F#\323\2367\260\323\273", 300, "@\200\033\254\020\246\206L$\203\026.T\223\205\364\362@\204*\316\232u\033\321\212;l\202\313s\205\333<1~\211\267\213\336Z\276\233W\322\366!\3629l\343@O\216+[!\262I\350\262\312\022\357", 64 }, + { "\001\277`\003x\301n\313", 8, "\257'\372i.M$\356\230\032\252yq\302\004c", 300, "?\037\327=m\335R\367?\242q\002\023V\203\017q8\252\325?6\213\241\274\275\356\344*\312/p~.<\305\346]\377\242\361\025\311\375\303\247\305\345@U\230\364F\275\211n\250Ay\352\026+\253V", 64 }, + { "\203\020{)\016R\324\350", 8, "\261\200\031:\346l\242u\352\300\014_\320\221y\213e\214\352\042c\371\257\361", 300, "\001\2111R\305R'b.L\007$\042\267\346\304(|+2\240\260\021\042\243J\344\237\006\236\203A\032\363\356\251\015.\321\336\03431X\002\355\221\313]\264\310\315o\316aw\246|\312bT:\325\300", 64 }, + { "\002X\311\253\033h\036'", 8, "P\206\257!\305E\377\275\310\005\364Bn\005\342>!w\017@}\245\350\177\305\312\323\361,\301y\022", 300, "\360\301\033\007\367,\374\242\177\3153D\251*_>{\005\272NQ\021\024:0\036\357\333c\254/\001\035\202\341\330\005\0245\265b}\261\232\273\0318\225\227\252\210\361\300\016\357\323\204\202\246\376\277@\225w", 64 }, + { ">+\207\003k\311\225\276", 8, "((\260Eak\253\305\3243Q\332*N\276\323\325_48\317\264&\340\005\323N\224p\003\331Fl\215\317 w\034u?", 300, "\276\317.\310Gj \217\3502.za\021\230\322C6\255\301\354-\263\247\002\352\377\267]\243\201n\245\213D\240\010D|\324\336\251\326\342e\231\350*\300\315\007\234\236\002}\372\013\364\257\232\262:\207e", 64 }, + { "\265G\357\330S\302?8", 8, "7S-\203\036\340\015\356\027\253\302\376\222\037\2276\0141|p\255\313\325\211\206\265\230\333\027\343\231\007\335\366\356\011 $ \312`\333y\267K4\317\277", 300, "\004\264\241\262\204\361YL%#v\373\013@E/\335\353 l\365\242u\215\301p\360O\030{\0236\033\206$\340\263\202bC\032\014\252\365\323\325\350u\210\234\020\037\015\275\000{h\363a\244\024\177\356\236", 64 }, + { "I\257\321\376\365\317\267I", 8, "\200!XxW\233B\374,\362\027,\343\022\204\220\373\231=\376\343\362\246\224 \001\233\015\0338\337\224#%\320\037\342\276\314X{h\036\210w\377\011@=\021\034\3429!\211\350", 300, "`\277s c\215t\251,\306:L\267`u%D\244\021\340\036C\304\032\014u\042\134Mzo\313\225\3641\017\037\271q*\321\023\227\253\215\330\351\373\202\220\274`P\267\277\373\007\366\370\031\350\015\214\245", 64 }, + { "\324\366\347;\363R\300!", 8, "y\262~C\031\252 \004\215a\033\355l9\024C\237b/\032Kk\316q\257K\017\017\036\316\003\246\005\225(\0168\264\032pT\030\250\334\341\020\012X K\325\002\254mh\265\134N*?\233\007Zn", 300, "\202\252\261h$8%\335rv\260\0005\313Lj\244\262\342\202\352\277\005 \2418\2740Y\333\036\014[\015\030'O\351\377|D\0114O\344\203\177\360\337\3610\315\323\2528\247\307\3535R\366)\033\236", 64 }, + { "\301\357\263\261\347O\344,", 8, "\216\376\312\271K}\224Pt\022\2572\230lR\177\340m\224\271\305\237Z\374\252\204\313M\307&\330]^W[\001\317\207\264\305\017\224\331\245\361\301Z\371r\264\223\202\201\353\252k\223Bk\361\323c\307\255(\010:x%\257\3352", 300, "\312\240!.\3606\236]\235\315\2409\042?\027\015\271\030\352l>\272s\345\340\231\317\263\306W6[\342\360\307\305 !\357\003|g][\275j=ptx\344\265\271~\036_\361\004\246\261\313\241D)", 64 }, + { "\257\000;+\233Q\214b", 8, "eoq{\270\246ua", 400, "\251B\370\245m\000>\134\007\256\373\001\251\262,\310\367\376\323\334{K\202\177\235\376x\365D(+\367\361\373\031\376\254H\243\305/N\267\205\2108\301*\025@\030\311\012.\261\237\377\015\205h\261\042\372\034", 64 }, + { "hU\325\246:obb", 8, "?/\352\332\327c\027\331\305N'\321\355\337\316\241", 400, "\177\312\2275\203 \026aNXF\010\377\336=\240\025\312\252r\01363\234\351\2754[y7E\334CQ\371\243F\010l\2545\253\214\341\323\300u\202\225\236\250\356\007Q\000Q\302\207M@g\350m:", 64 }, + { "p(\256-\313\020{\300", 8, "\334\310\227\225J\356\360\307!\353\023\332|\214\306\036\026\253|-\267\341\321\223", 400, "\267\250\271J-\265\303\247\337ib\237l>\352\344\302\3321\3006\240\233\232N\2661\236\022s+\300\1342\375%\251Yl\032kK}\227T`\364\233v0|/\217\026\032\261\020\225\335k@`\021\227", 64 }, + { ",\032\034\337\304,\340\334", 8, "\011F\350\213N\0058\212}N\267\007\007E\276\203C\315\332\013\030`\372\030\370\001\240\030\354@9\327", 400, "\206A\034\355\042\030\025\220\000\251\025`\356\372Fr\313\246L\307\255@;\366\354\346\362\206h\023>A\271\273r\036\224\325Q\246\2527 ^\014!\240:|\335G\322\333\032\005ok~\371\372\255oD\257", 64 }, + { "H\322\305\000\020\341\365\243", 8, "\330\313R\037\276\004\355\327\363QH\327\364r\305}\014\370\007B\252xS\345\003\346\202\366\250\375\237\315 \205\355\214Rj\037\365", 400, "u\346\0049k\347\134\211\023\330\015\360o`\217\266\234\012\007\003\270\025A}\373^\366d:n\344\000PqM\314\200\213<\204:N\0279\323z\337\271\031\337x\0007\352\220\032b \303\346`\201\2729", 64 }, + { "\236\271\202\214\310\003r\323", 8, "\020>\356\364\222*\307l\337\312\351\343R\273pxL6|\305\324\362\273>\332\245t\3267\212\276\231\310\343\243\034X\360,\224il\313\374\217\2407\134", 400, "\224?^QsO\227|\332iTx\204=g\360\033\352\240`\330L\212\276(\201Dx\017\216\016\231\307^\204K%^\327\360\257\236\005j\010\233\371H\203n`zx\230cH\320,M\315\344%\215\024", 64 }, + { "\353h~\2307\320gN", 8, "\235H\252\037+\014\003\265\235*v\020I\376\207\331\222\266\274\0270tb\341\276.\306w^\331\270\263k\341%\270\200\232\321b/\244\310\016\361\316\362:\375/\371\255B\307./", 400, "\221Y)\236*\214\226e\360\324\257\367\230R\014_\314\214\236\027O\004\305\370\317w\257\260\001w\245\003P\371\335Y\240\227\365\243bh\254\372\247\375\301)k\255\245&\262\036\374_\026\224\326D\220\336\246\351", 64 }, + { "\362\023\013 \331\240-M", 8, "\353~\003\260'd@\026_<\301\360]EU\332i\336\177g\347\313\232\337\3562\010\250\345c\235\265\236\343;\322\302~\317\371\002~\027\012\332\301r\014#\322\004\353\261\275g\263\017(W>{`\322P", 400, "SA\003b\271\034\227\224gN\023\203\207 mW\365\257Nz\267wn\016\221\017g%(n\256/\330\311\377+\335\261\343CA\015A\272\352-\345`\245\370W6\020Y\215\2212\000\272\001\022$*\376", 64 }, + { "\250c`\236vN\302\210", 8, "\257(\256\0171z\243\023\042\134\363\223\252}GzB\307\261\220\301\270\027\327\326\353\253>\313\276\006UAd\355}\276\320)\375`E\353*-\370\226\370\021\004\203\374e\016e\275\202\313\227AP/?5\260\225\217\243\276Ag\377", 400, "\203\022\352c\27522Z\265mo\224\016G\376/C\026\000{\0201\015(\224\005!fV\262\204N\265\206\202\336\255\362\036\015\330\241!5\247\035rVG\346v\301W\306\204\335HS\371Tlq\207\334", 64 }, + { "\327\002\265\344\005\337@O", 8, "\233\317\326\221:\2409Y", 500, "\134\021\253\352\370\313yg<\015\200\022b\317Vq\262\220\257fL\315\302\201\266\036lxQ\371\021 J\337)(2\346\017V2\310\217\030\274I\357\215\2115\277p\351\236\012\272\346V:\317\003\326\2062", 64 }, + { "\320u\027+-\245\0217", 8, "\216\257\376\3147\035d\300\366\365\315\320w\304\236$", 500, "\001_\134H\237\352\244\340\034\274\366\034H\321\311\216\255R_U\263\221\206J\301\2641\304J~\274oH\007\340\246a\313\204>\216\330\311x*<\334T\216\251S\322at\360\234\243w3\033\2061PL", 64 }, + { "#@\256\000\333y\350\327", 8, "Rb\213R\263\262W\317\333\354\261\340\246\26119H\334\277U\253\266C\247", 500, "\343\224\023a\337\367\347\276\245\310-(\363\021\271\221_\360\245\233\356S\236\363\027\212\0046*\244\376\3032\352\007\023Fs-\332\203#+\355\244\33654\205a\200\302w\314\335\0157\212S\227\271l\202*", 64 }, + { "\350e\303Y\257\366M\223", 8, "d\311\323\036\030%\266j\372\006\016\024;\344\350\256\234\026\341el\325\270\236\226\020\312b[\212\353\343", 500, "F\026H&\347}\264@\307\246ap\356W\272P\023\254\204/-\006\337u\230K\221\204\312h\337Q\021\037p9\222U\032\262k~\013e\017X\134/\243\264>j\251=DBu_*\350Z\260\010z", 64 }, + { "\277\212\2413\001K\016_", 8, "\005<#\022(`\277\021/J4~\363\354x\207\271\211Ft\233\026\252\326:\236", 500, "\220\344\307\355\203\332\013\207\2504\364\207\303\026\316\251\026X\367\373sN\225\2540\243\006\233/l\224\370\310\346\352\227}K\267\223E,\010G{e\270>})\274\312\001\3350\311\261\367?7\251|i\243", 64 }, + { "\271\035\035\334\321\366u\304", 8, "\325L\272\252\211;\134\014}^\270\007<\316[68S\361\3264lA\240}\025l\032\265\036\247\227!\035x\354C\262[\177\320\324\305%\333{\317*V\220\027\367\322_\234\017\253]\024\347dDB#>\373\003\216\347\333r\220Z\334\301\346\356']\323 \375t7cQh\010\004v\2253", 64 }, + { "\275\303\226\316\005\315-\300", 8, "\223\241?\356\014`\255l\337ad\241k\345\355\226\334\266@\217C\221\237\005", 600, "\312\375\227\367e\311\261\367\012\304\303\372K:\226\326\010E\235\355A\225\331j\026n\3264\303\301\324\214YnM\261\310\020\002bi\324\311\247\011\237{;\013\216C<> \017-xk\370\265\303\333\311\014", 64 }, + { "J\242\213\023\026l\3506", 8, "\303\020\346\376\230\303\347=_\355#\0015\363\345+\233\216\203l\347rSa\272Q9\336>\034\257\233", 600, "\3331\377\232\361\326D\362V#\2124l\237\327\215\231\375%|)aM\037\201\030\027\341OxFU<\306\302\355fO\326\325\242\177A\254\316H\247V\227\342\032\377\002\256VY\220\303\363\206[j\222\226", 64 }, + { "\222\360%qi`\034\316", 8, "\370Hx\232\025]yH\337ys\310\032f\317g\371\315-zT\225c4\033Uy\021\314\013\337\260\247G_4s%\261\004", 600, "\336lk\337\003M\223\020y\344p\356\250\000\301z\337\263.WN),\335!\375\227\210\367d\263Z\214Y\330\333\264\030\004\326\011W\005\323\3448\354(^T'\200\255\301\320\012\355F\240\271\203\012\353\313", 64 }, + { "0\015\376\022\354\343\255/", 8, "\304\347\345\335\327g\331\204\343\025\246\030\247y\365-\266\264\361\212\366\211\035\216\276+\235<\371\321\226[\250\336\346tn<}\247\2076%\231\373\227o\351", 600, "\201\306eLu\262\032\355\246H`2\246\247-\007\217H;\017\370\277\237)\275='\001HG$\134\223N\000\335n\304y\272\205N\2265\310\305o\250# \235r\312\236\217W\324\360\323\007\351\215\232+", 64 }, + { "\030\253\370\026\377\013s\252", 8, "\337\202p\313\334&[ql\346\042\350\016\272+\322|\004S5d\223]9}\250\253EW\357+\215\315\255\246\023\352>\274\001\027\231x\225#\261:n\342\012l\253\005\036\134\327", 600, "\223\241\274\227M\2322t\205\027\016\377\267\015\350\012Y \321\217\000\305\305Y\322\301\260\316\230\200\003rQ\235\245\177\003\305\342\022Iu\375\323>1W\002\013\321k\264\334?\225:!\377\014\331\206\270\371'", 64 }, + { "a\033o\014\314\261\004\243", 8, "y\340j\235ZH+4\023}\372=4\262\303\213\134|\220\252\255\0014\021\262\355\224\212\312\341\277 l^\021t\261S^j\007\313N\005\277\340\224\345\320\346\226eH\042\313q\271i\317\023U]B\331", 600, "\355=1\261\000\236>\260t@\241\370\305\323\2139\016\316vb\352\2533\336L\015\371\321\265\211_\273\177c\311UAa8P\263\017\272\037\217<\201\327\205\002IV\227\034\273\002\002\3312#\243\225\327b", 64 }, + { "[$\035\042a\220:c", 8, "j\312\316\373\207\241\335\304\0327\033\263\274[\305\234\371\224\253\012\266x\340\224V\230\335\374l3\320L\252\306qA\344\3069C&H\265\211\306X\347\311:\376\223It,\251\300!h\24791\371V\007\375\233J\032\330.\236U", 600, "`l\213nT\353\237\304\251I\256 >C\231\000X\377\332\206\204K\262Z\353\327\022\265}\245y\232\3368WI\332/\213\316\042\371\200\033\0378\322U4J\363\360\357\350\361*\367.>\363\377\334\0232", 64 }, + { "\354\304\015\017\355\240\021\276", 8, "\247\274\225<\353\357\376c", 700, "\374\221\245\277Y\007w\274\375\266'l\316\243\333\312\223\257\301\270\303K\337q_\331\354\347\376\012\223\275\344\001t\373F`\235\302\3108W\332\205Q\223d\004\207\223aki\277\307\313}\326\254\234v\042\341", 64 }, + { "IZ\367\257\273\377\332k", 8, "i\027\226\010\004~\257w\273?\222\224\212\274 C", 700, "\253\034\346./iA\3661T32Zw\312\266.\357\034\032\202\213\332\320\356\356\327\275\217\251\326\356\042\377^\270\362\346W\367\353\237\331B[\021\034\310& Me]|\355\274\207\325\372=\373iR\177", 64 }, + { "G\334S\242\304\334Y<", 8, "\330x<\264\323\016\237-\300\231\260\364\210B\314bW\255/\235\014\277\3450", 700, ";U\042\252\241\200\357\247\366\020?gb\0358\231W\354\331\377MS\273 F\3361\313\377\344\361\004edjn\276\261[\0221\225\017\3731\203`\350a\301a\005\036wwQ\034m\323\226", 64 }, + { "T\236\334\030&\300sl", 8, "\006\377L|^\220T\213\307-f\214\024\215\251\366\224\240\250L\364\346=\224\001m\206D\335\375i\371.\261\3026\364\270\225\320", 700, "|i\376\031T\307y\012)\250\211\242c\200\244\370\232\212\206\316$-\031~\274\264\302IJ\243\356\367\232C\314c\013U\037\236\305\313\264\207\322}\273VHX\300\321\002Yi\237\261\345e\031\005{L|", 64 }, + { "A\313\345\257\373[@]", 8, ")\227\310\042\306\361\235\256\363y\337\341\265\3144\344\012\342\3540\260>\343\246\214id\013\254c:\203>\020\365\267x\243\013B7w4\235\267\015\330,", 700, "\0428\377Wc\042\366\266\227\254\030_w\263g\202\376\326\267\253\336\265\353\026\200t\017\354l\227\352\314[;\364\263\361\203\215\220\374.\272\042:.@m\033\250\274}\3646\000\330b^\363\364\327(A\015", 64 }, + { "\210\332a\312\367\024()", 8, "]\215\337\017p\215\251/\2747[\206\312\314Zk\267'\324\223c4\265Z%\315\210&\014\021&\262\270U\274@\374\221\0262\2720\3360?\274\214\330\302\373\240G\205RwQ", 700, "0\3646)\364\337\3250\333!\010\356\306D\241]wn\353\303\265:\374\315~6C%\250\346\234\231\367\330\367\220\221\324\255\221\375\344mc\271+R\324\374z\027\237H?k\343\211\022\014\375\134J\256\014", 64 }, + { "\305\354v] \232v\253", 8, "9\230\361c\001XS\355\303\361*\366\267z\363\226\237\331E\336\222#\305\037\326\005v\336\375_+=\277\212_\0269!A=\235\007h\254\370Z7K\346\277\246\360*\015Kb6\303\022\224\322\026M\313", 700, "\253\232\256))\226\212\353\237S+\307u<>$\3440\367\363v\222\250\321k:\323^\234P\351\236f\205?\003F\326\016\355\311\244\023\346\321\243|\256!\273\2243y\226P\026\323m\250\306\360Q\267p", 64 }, + { "\001\363\342\257~\177S\275", 8, "B\012\033\376\003<9&\264 \214\003\212\001j\004;/\321@\231r\267\024\302\270\344c\0306\262\215\205@\263_\360\033j\3177Z\220\042E#\206\231X_}j\012\340\365\325\336\376D[\273g\366O\377\300\265\373\256\203\2779", 700, "\013\331\003N\240.\215\336\022\230\317\271\042\376lv\311\036\305[f4\351\314\237f\323e2u2\272g\225\261b1\027\246>\251\235\261\326$\243\201\342\250CG\224MY\3737\225\312o\355TU\032\275", 64 }, + { "\017\327\331x\230\001\363\353", 8, ".\331\317\373;\330h_", 800, "\265udMk\214\004v\236Q\366c\336\020\010/\243\236\262\020\320\004\016\241\371\242\232i |)\240\305=\266\316\201\350UAY$J\243\230\267P\377\011\000o\033+\211\236\020r\356|\261\317\033\355u", 64 }, + { "\032\276\352\212\347\313\231;", 8, "\311\365\134;\311+\024N\037\134\0020\362\354\324x", 800, "\276\004-\013\036\334\372\350\311\270\306T3\014\230\351\015\230^@\330\342\304\324\034F\264e\367\013\273\355\251\260\271O4\257\020x\362*\354il)\363\201\017\232\032\344:\312\037\005\341\325\3720\326\366\002b", 64 }, + { "]]Yk\304T\222f", 8, "H\031\273\324T\210$\267\222\324\027\270_\2514\214\347\317o\177C\272\313\012", 800, "\325\007\134%\256\3015\242\203%;\261\350\324!\262\367\002H\177\355\247Mk\042m\373\263\306#\301\3472\354\344\353\031\346\246\017\202\342\306V\005D\266giX\205\012\016H3\231\344bn:;v\225,", 64 }, + { "\346\320\306\0348\265\356\000", 8, "\376S\210\356d\366\033O0\352\265\314ZV\263\3701p\023\262f\227\356\025\361\002EV\204\337\304\206", 800, "Z\2104\306`\244\211\342\010\204%\343\240\207VL\375_T\342\360\031\017\257_\207\345\327\014\347Fn?\331QY\310\375\334b\244\337\241\003\370\202\0356!\305\326z\330@\201\0241\244\332:v\371/\264", 64 }, + { "r\206Tl\304\226\231\356", 8, "g_B@\2277\267\027l\314\247W\306\346\221\226\223\201\013\263R\245A<\024\177\007\230\222|\216\331~\233{\350n\244\341\362", 800, "f8ma\263y|\237\2600q\021'\276I\3642\276\344\255\345\032\270\273\032\262\365\026\004\364j\211x:\330_\207\250\336\311\016g\376\261\366\307\345\223\204k\362\355\252l!\357X\211\003\035L`]\341", 64 }, + { "\016\320!\037;\311\210\213", 8, "\347\042\302\3575\315\031\013\267\340\377)\031DY\177`G\316D\251\025\327o\311\233We3\236\022L\017\354\314\342d\207\343\017\345\235\010H\210\225E\345", 800, "4V\003\007\215ht\377\262zSoW\277\3314\316L\376oAw\367\015\224\304\201\2176\277\375}9r\042\304hZU\374\306\202\205\354\2167M!(\371]\313\357]\233\005\345\256N\252]\177Q#", 64 }, + { "\347\274e\2157\327\016 ", 8, "\272xp\134\303\305\032\372\217\330\225\227\354\372?D\027\354\212\376\311\236\260?H\362\257\006\261\003\350|p\266\331R\363\036{\332\335t\021\327\213.\253\202Ss \335\252#*%", 800, "\1346\322\026\247m\011\012,\203\263\2449,\344\250\235\360|t>\225\277.Z\215\037\226)5\356\345JV\334\234\211\357c\024=\2534\257\026\225\005\023\221\330\275\010\246\011^\374\034A\246Pd\212\234\317", 64 }, + { "Z\207\036\243J\207\322D", 8, "\323\326\355\204\245}\341\034\322\331\364\234\240\241\260\2203,X\355\362\335O9^V\212\373;\214\342\334\020\316\234\214\324H\317wH_\313S\257\335\240e\007n\372\036](\317\024\331\231`\031\023\002\243\033", 800, "\224\343\262\023\213\042XE\317\300\260\327\316\217{{\322\307\234yqc\011BMd\312\373\375M\323]@X\3400\012\2175k\235_X\307a\134\023\376\035\323Z\312\011\376?\346\006C\356x \332\323\227", 64 }, + { "4\324\256]z\277\006\304", 8, "Os\324\324\223\211\353X\217\245\344\317\334w C\265\024\371e5\007\235\230\364CH*\036\243\251\222,|/\270+\31386ywY\202.ByB J\245p\237(\315\024l\362\240SC\352\261D\24176\026\024D\023u", 800, "\014\217}\334\346\012\202\320\323x\317\341\363\307y\261\134\355\0259|\237\224\200Q\002q#\232t\336\215\303\355\020\263\221\0257\205)\374-\316\271sj(\000\332h\303&\003\323%\3052x\035\230\3673\267", 64 }, + { "\2311\362\360(*\314c", 8, "\226\205\332a\235\200\177\002", 900, "\266N>\311\351\345\223>\327\365/\202\006\211\317\345\265z\001\276\340'\355\303QyH\367\311\042\032\350\331\012\034\261\327po\323\275E\317\000D\234\355\032\241\242\332]e\276Pk\264\000\211ia0q5", 64 }, + { "\020\277\212\360H>\226S", 8, "\333\342rh\323\302\366\223vK\376\004\340\213\316;", 900, "\344\254\354@\367\243\012\310\303\042\263\330\230\230\307\266-\011\134\024\221[\371\320\324\244\375^S\314u\303\335:", 8, "\035)\304;g\254m\313n\232Rn\276\022\264\317.\210WB\272\026M~", 900, "[i{\304\237n\213\314\375\2223w\134T\257\027\265\307\015\264\016\022\245~\250\031\257\342w\211Q\242{\012\370&\003P\016\311\032+\235,F\260\362\327&2wxw\030\277D#\365'c\216\303A\356", 64 }, + { "\324\210\245\303\375jc\134", 8, "\003\042\006\004.8\256\321\013\216'\227\210\353\226.\364\037\300\351e\206\357JY\201\254x\015\352\023\212", 900, "\2727$\177\202\237\0142`&\034\321\224P\3620\013\367pg\371h\315 \134\227\306\241\257\3333uS\025\206\030\2704n\013\354^\032\034\266]\024\254\000\256\356\2356\331nz\263\310Q\2178\201\310\320", 64 }, + { "\322;F\214L\230wH", 8, "\330%\316\307\264\310\375q;+\256*\315h\300\274\215yZ\320\360\203)\353|\310!\016u\260\350\222\323\177\303\226\212o\3255", 900, "m\267\007?\353\220\220$\231\316;f\201\253X\312\320\006{\307\014\334s\3257\277[^\0055\2567\134\270yr9A\342\273N\217i\374\314\364\301\312\335G\036\014R\341|w\323ei\226\014I\034C", 64 }, + { "\345\342>\335\2457/,", 8, "\355\262\340\201\134\012o\2011F\234^\321\211\216w\207\022[\361\310\004\236\256`x`j^\263v*\2250\336=*\340\017\317R|\00164\353<\244", 900, "\004\240\005\275jv\352M\360\350\036U\306l\237[\031C\224\205C0iT\370\242\011K\042\030\333\375\302^\255B\301\354\310\240*\323\257\310\222\240\354\233\221\346h\311;\214\321\240\341]\363\326\335\022\216\224", 64 }, + { ".\245\313\031\277\374\042l", 8, "-]\026q\347=q\004<\002@^\242\277\355\212\334\337M\304B\351\015:p\323!lA\357\204\206\364*N\317\363\016\016\230D6\227\337\347*t\243\177\021]Y|\240\035\006", 900, "p\006\336\010\351\337\304\260\372\210\267\013\231 t\265\231\274{%DScF\3726\320\205\275 \011h'\251B\363\323L\014V\260\362#z'\233\322H_\306t\273\027\353\272\021f0Q\222\244\0316\225", 64 }, + { "\014Y>\242\331\270\367G", 8, "\222\344 \364|\347CP.9\372Tu\341n\014\333\321\034\204k4y\312\314\363\323(\221\365\023\032\342Y!\010n\273\213ot\346\310h\304\220y./\235\342Pg\214\037\217\352\316\374\276\3740\256e", 900, "\211\042{m\201\233_\3020\350\237<\315\272\256\200\010\323)\210\210*\042\200~\266\343\177ic\212\300\363L\215\271\022\2609_\361eWbF8\203\271\363\214t\272\275X5\011\355<\2233[T]P", 64 }, + { "\334\023\304\233\305\200\206\272", 8, "\314\332|aD\003\341\033_\3733\374\263\042L&9\014g\336\253\355Ir`\004\014\377\306\2031\212nX)uG\236I\021\031\337\336u0m;\3126u\332\025Q\370u\303$2*YH\211\343Z\3628\237\274\2061sw", 900, "\005Zx\257\262D\357n\005b\014(\012\277O<\313\361M\331\373mB8\031\215\035/\247\005B\343\346\305\337o\024\275\357|Y\235@\221}\202M1\0325\306\325A\253\250\241JY\326\255\032\272\314c", 64 }, + { "Z\270\301ED\237U|", 8, "\0272-\237\010\275\377\042", 1000, "\360\355\220\212\252\371b9P\343K\301,\024$\227|\305\346\327$>\215R\243\214Vs\273W{\306\234x\347Jlb\211\355\321\310\015\002\267\352[\210\335Zl\341\023\236u{\225\264\027\370Wc\343&", 64 }, + { "\262\3435,q\037^\014", 8, "G\330\246\256\356\260\201)P|\336R\254\301\265m", 1000, "\314\320h\267\227\350\034\216p\334\250\372\230\300\273\220s\352K\341\347\253\317\321\362\042R\311fN\177S[\376b\354@R\320\010\251W\374\256]\243\262NO\000\206\347\005\306`\215u4/!\365\025T\026", 64 }, + { "\033\341\202Z\263\274s\025", 8, "\317\320\367\371\200\035\361Z\240oE~t\347\300\227\330V]g\337r\316@", 1000, "\234\313t+9d;3\226!\325\256\242\211`\323\030\352\336\377\306\215rZ\263#{\306\037{7\307\203\325M\032\031Q^\260[8$a\272\215\337?p\022A\335n%u\214\232\303^\352\241\251~\247", 64 }, + { "uc\214\232\3031l\300", 8, "\013(7Vl\341\013JA\276\222u\345\271\363\015\134\317\340R\214\335\312\245\264z\324\326\366L\344\250", 1000, "'\352\216\246\314\215\365\333%\334\202\342\334\352\347\211%\312\215(R\312k\246\330\207\223\004LhVFw\374\322\331\275\265\334k7\343\013\312\010_\264\362b[\254\366\226\224hvgG\307\200\347\216\033\036", 64 }, + { "cD\020\266.C`u", 8, "\247&^M\360@\266Y\365\322'\367\262l\376\250\042KU\360\237nOl\207\346\2520\203\0428\003\332o\344\0046`\226a", 1000, "\241u\001\027W\202YT\341\275\204.Y\242_U\016t\003\025\001\340\304\213\364L\264)\023\346\031(d\234\256\313\204\260\262x\220N\017\274\340\315\000\276q\017\001;x\375v\004\025\300\276U9\336\260\375", 64 }, + { "a\0162\201\011\221d\017", 8, "\256aW\215\327\374\235\334;\303\032\021\037wg\306K@\001d\213L\244>\343Z\234u\336\313\024b\344`\233\271\234\333\365\305Z\306\0218\310UK\306", 1000, "\304\023e\243|\032k\320ni\270\002\252\306\036tZ\015j\373\340\331\207\245\347\032\261L\354kh\012\356\363e7\015\334\352\206\036;\320~\331\260\330\003\257\310\244\364\244\370\305\233:J\363\367\324\362\025[", 64 }, + { "\324\304\265\306\270\217\276\015", 8, "\276\027jRk0X\215\227lG\236\240RpJ\220N\005\250b\345tQ\221h\321\354P\371\035\244$\256l\023HZ[\031\255- O\236\222:\267t\254d\313's\317\024", 1000, "\250\316\327\215\271\374\206\207\220\351D\263\306Q\362\366c|\273VQ\241\016\377\004n\314f\215\253\305\321\350\236.ZjX\037|!\314m\331\3775\011\034n_\263x\267\345\241\322j\230l^G\334\256L", 64 }, + { "\030\302&\234\200)\230\305", 8, "+L\221:5T\274h\237\256q\323\353m\333fh\201}Q\351*\351\240\267\276\327\007\254\316\214J\342\350\351\367\367\266\301\010\3775\015\014\351\337\3264\355K\027\355\327m\300\241@?#\232\225\263\037\007", 1000, "\201\355F\216\035\037@\350_\232\325Mx5\353\004*\372\250\370%X\247)\315\324\314\256\315\242}?\373L3\346a\331\302\134\334=\237n\275 \330_OZ]VW\007q\312\254\244\276\024\034K,C", 64 }, + { "?\362\015\253q\331|\250", 8, "}\020\020\337\215V\263\334p\346\003G\363\301A\333\134\177\222w\271\262\306>m\2774\343\006#P\260\306mS#Gs\250\363u\230\227\377\015\361\235\336\273V\230\316\214\276l\201\272\241}\361\260\357Aw\015\263\246/\366\026\375\037", 1000, "u'\305L\233\270\032\326\225\2422\323\347\335g\374\270\023\352E\305\332\240\231\244\035\343\226\322z\264\346\354M\036\211ye:A1\257K\236\215\333B#BV!\333\245\336|\217\317P\257>\257\265\252\003", 64 }, + { "(\134\324\014\245*\260?", 8, "\263nO\374\320BL\042", 2000, "\354`\262\357X\301\351\240\333\374\3536\307\367A\273gVR\366B\1775\217_]\214\016\2641j$kE\201g\270,\276$\213\205\250\237\005\211D$\351\241\334\222\337\326\360\372\277P\002k\224\235\2137", 64 }, + { "VC\260\247\227+K\325", 8, "\214y\202\334\330\323;\206\274k\026\333#X\247H", 2000, "\005\366 t\203\277\030z|\241z+\222\344\134C\306XV\367\042\032Y\2074j\211\034g~\013\263Z}\354d\342\246\005\011\250\230\244\222\336(\224\320\320\221\237lj\227\003\345c\311P\023t\000\243<", 64 }, + { "\226\264\332\250Q\332\033?", 8, "6\177z\010St\034J\240\224\003\367\252I\322/\034ZS\243\322\307\374\311", 2000, "\225\325\364`R\004\354\021\306\2123\337\341M\273\023xsu\030\210\267U\375\011\223{\002!3a\031\254\247\200\302\265\016\277\301\235\024\014Vj\363\022\367H\224\372\205\337\302G\035\351\257~\316\371\252D\342", 64 }, + { "\347\016\225\220\026\324\301Y", 8, "\351\314\237M\230\305o\321\374\374\253H\236(*=1\364\203\007\210\344\001\245\2736\022\340C\314\265\224", 2000, "kN3z\003R\340\020D\033\221{\234\352\211\201\315\356\017\234\370\270\214\035J\335KM\255\200I\010=:\3512\030\260(+\257\276\275\001\361\263j\030\002\224\352\372\031$q_\023\330\333\021\233\240\222x", 64 }, + { "\340r\267}u]\377\350", 8, "\242\360\243\361\363\020jX_g\376\016X\352dF\022;'+\306\213\375\036\224\214A\242L\022\334\025\231\015\267\305\001:\032\270", 2000, "\230D8\251\010\031,p\016\330\310\233\241O\031#\310[\324u\261\207\2042\361u\310;\366\342[9\201\005\037\20261\316\351;&\273\325\263\305\325@\251\027\343Ak\225\270\014K\342\037\015\305\247e\231", 64 }, + { "\013n\007\254\357\255\217\340", 8, "\334\015\217\312\237\315sW\026\357{W\321,\031\034\374\023\2720y\251\235q\030\2170\357\251\366\370\364\312E\205.w\273r\242`\246\005}>,\231\250", 2000, "w\210\363\2605\020\134\374\231\024\327\314\205\310\325\247\033%\322T\226\271@\302\004\266q\304\345\326\275\347\260\322\361\2435\344\010\356\300%g\307\217K\0423!`R,\005\327\201\0037U\266\2705\275\343r", 64 }, + { "\202\361W\024^\252\307\235", 8, "\356\247\020\315\037(p\361\006\223 \261\035\332b\222m\236\027\367n\020dw\323\247\3017:8\034\256\302\363\263|\273\134TF\260M_D\3418h\237\365\260\262\257\007\344\231\351", 2000, "\327G\376I\211\335s\3060\367\277\200\015\270\327\351\023\3539\245\203\356\244\367Y\244\340\277\207\235\360\027\347\352\343.\301\3570\347\330\324\352\353S\242>\324w\213\271\262\013\211\250\035\261a\011\271\370\034\3633", 64 }, + { "\207-J\204\243\334\335\016", 8, "\261\134\241\340\024\3441\306'\32061\256\202\267\232\370\2327\257\357\342R\202\326\345\300\362Cp\315!;\320\305\240\013Zm\234\343\217\373f)#\223\343s7\320R\342d\224\027\212,+\304\262k\243l", 2000, "\271\317r\177#\201M\306\320\314\317e\236\042k\031\032\242W\364\321\255\026YkJ\371zp`\337\264\212\253x\034Ef\2003\214-\370o\277\305\3671\355\013\320C\247d\214nA\273!C\375\025\2218", 64 }, + { "\300H\213\371\272>\337\241", 8, "\001qO\241\310Gs\274\036\375\272\362\033\014\256\327v^\037\321\246\277e\224\300\235\231U\367\316'\014\327\232\265Z\033*s\302\252}xo\374(a\231\355\301\0350\021\231\024F\177\276\341\221N\316\025f\320\324\134\247\376\335\274c", 2000, "\301\360\262PJf1\243rl\320\364\320\017\312@~\240\031\206\211\261\330\035?\314\356\253\263>\016\252wt\341\213\001!\014.N\264\350\377]\243\234\245\354\325Au\353\227\236;L\333\332k\340\343\352z", 64 }, + { "z\015\256n_HF\264", 8, "IO\305\325\253\232\001\022", 3000, "\021\032\252P\005v\354\234q:\204\326\203U\2162\246\371\343\340b\327+\037\330\360\241_\215\134H\214c\373Ix\364j>\036L\016\355i\226\034Q\370\320'\320'\014i\336A\210Z|D\200\006\006\202", 64 }, + { "\027\035\353\321\372\222%>", 8, "\375\3772\334\316\222?\333\300\325\265\005\360\361\347F", 3000, "\231\0011>Jk\031l\324q\271\2308\316\025B\362/JA\010\370\021\377C[3\016G\260/l~\042\350_8\252%\373Q\275-\263}>\356\330\337&\005\265L\353\377\021\324~\255\371\346\316R\204", 64 }, + { "'\331\374\255\355\315\206^", 8, "~Wx\355\211\365/\372@\022c3\337\311\233\253\007\215j\356\264\254\321\032", 3000, "}\344w\013/\000n\371<7", 3000, "f8\205}\321\371=\330\3410\034\030\354\323\033\270\333\227\320vUS\336\305\010\332`\306q8\351\027\034n\372\356\363$u\376@\017\244\3467Ft6H{\264\345\275k\302G \334\202\275\257\375\242r", 64 }, + { "\241\364\000\231\250^_\277", 8, "R4\332\217\332\374?\341\030\277\345\025~Q\364#l\307\273\331\357\0352\361\373\246\320M\220\250\265EP\225\221(\236\026\332\272", 3000, "\177\243\277\322\005\134\016\015E\251\300\205\250\352\366e_~\377\251+\223\011\021\326\042\033\277\267\206\037\224\231g\260\031_V\341.\300{\243-x\025Q>\177u8\223\177\032\201T3\360\033\336\201\255\234\024", 64 }, + { "\020\011\277\006(\215\353j", 8, "\215\341\262\207s/M\323\274\341\223\322q\215t\177\225\246\367?\326\245Y\330\026\221:\370`u1\305\377\261\215p\311[D\0229\200(\205\216\341\247\230", 3000, "\236\022O\372{|'\313\011\216[d\364\210\030\36249\2122\266\221\022xD\266\363\207'z\215t\2448\007Be{\272\244\207\251\352\365_\353t\333u\355\317\327\327\205\222\250\003\330\201B\023\004#5", 64 }, + { "C\251\361u\026\34102", 8, "5\343\200wqFK\2739\260#\224\301\256\323$\247\033\272\322\346_\227k\274\250Wzt\3062\134VI\202\234\325fv\013*m\003\355=R\366\214\233\305O\333|\200\376b", 3000, "\030\177WT\007\014.\134XcB\245\202\004\363\021\313E\344M\216\332<\330W\360N\314\134\341\255\030%\031\323\024\035\312O\370\213\017\263\034*\261\344\031\356\237\271Oi\213.\276\315\314\367\222\212\027\024W", 64 }, + { "\311\254\331ZS\226@L", 8, "\013\320= \345\032S\317t\255\2550\245\3062\232\316\241\002\235\333\015$Lx\376\026\334K\010\360=\237*;\007\134\3506O\352,\037\322\342\013", 3000, "\344\202\347\365^\026e&\200\260\214A\324\264\022\313\225\351\033\254\254o\357\255(\215^z\034\200\220\312K\301\240\227MO\030\231\366\020\031=\203\012\224=\024\004>\316W2:\363D\365\231hy\366\365j", 64 }, + { "\134#\216 D[\241\223", 8, "\017P\274\200^(R\220\266g;\211Z\265\036\345\337\360\2310y\031\330\206rF\253\254\375\271dr\321\367iT\304\2003fV\367\333\264\247\2370S:\377&\216\360yfs\202h>\327\347C\261\345\274\357q\037\331^\305\134", 3000, "\177\373nj\013\324\202\021\035]!)\370\370%\005\353\016~W\330\265\217\362\337\301Z\275\321V\000g71\335\377v\013R\335K\315\241\225\216qE\312\272@.\020\315b\247l\3359:\242\265\000)\310", 64 }, + { "\304\326\303\344\272\260A?", 8, "`f\262P\027'\211\217", 4000, "\012^\363\365\134\265*$\014\270]F\274|\375>p\341\003dT\242\337u{\314\205\307\260\360\322\025\214\007E\307y\365\352\310\240\372\134Fji\370\241\017\305\336\262\351\332\002{\026\270\376\363\266\134\274;", 64 }, + { "1\2004\011\006-\032R", 8, "\353\371\330A\261\263)\213u\007\233-\354\230!\202", 4000, "{o\014.\322\016\323\244\021\037&W4*\362\300)mGv\014\016\306\307\237/6G[\267\033\213u\313\266J'\276GtN!\000\216\363^7Y\037\370\021\014\333\250\374\332\274\235l\230\263\220\347\222", 64 }, + { "\354n\227\202\363\306j8", 8, "T\334\212\366\246\020\042\264\342r\271\317a\0047\322\317\354O\031\202\342\370o", 4000, "\312~\260\260\027\266G\247\236\312`n\335\342\262Ec\247\272x\001\003\252y=\002\362\362\004\326\350\007\0252!\263\312\360H\344\246\016\207vEO\022\205\212\306\276\251O\325;Gz\307O\266}\020\322\376", 64 }, + { "\360\263\275l\234\244zO", 8, "\335\375\273\001\261%\233,\007\350\255\247\342\235\310-\032\035\314\246\252\027+a\233f\204\274M5W\262", 4000, "\317\365.\214hyP\313\205\356(4Y\251\224W\367\263\361\027\262\324\277\255M\010z\263\314?0\025\003\367\332\236.\004\331\302\232\011R\332D8;]Dz`v\000\246\242a\247b\033M\031\270\011?", 64 }, + { "v\327\346&\035C\320\322", 8, "\260 ^\376\355\375\2567_\272\252\255Wb\376v\0057M\226\346\031\272a#Up\264#\015\311\342+\2128`(\224\224V", 4000, "`s7\365\307p\250\356x\310^7\320f\2442mm\242\0207\023\360\300\264\336\252.\266\244\202\134\042\311\023F\374\206\225'\371|\327R\371\277\357\307\304\250\352E\016\253\010N@-/9\257'\0235", 64 }, + { "\252\317\025\232\012l\372\275", 8, "\216\020\363\015\245F\277y5\254}\016'\272\204Rf\226\340\341E\230L\024\352\205\312\306\340\042\241\017\263\375\337\355\013\020KJ\273\342\3572^\313\312U", 4000, "\222\010Cw\275\317./j@\012\032LH^\222s\205\240\335\011\026\310\275i\246\264\347\305\302\365\302\336\221}R\016]\231\006#G\321\222\255\215E\262\272\013\202\260%~\027\350U\031\220(U\210\221\314", 64 }, + { "\035dQ9@Z\267$", 8, "\204]\013SSO\332\324\322\327\216\362D\203\253\241/\262\21093\374Z\213\001t\376>\207\024e\273\371.\037|\036\334p\005}\353\277'/\346\014#NP\362\2504w6/", 4000, "\252BW%6\265\317\000\271\024C\010C\202nYZ\027\006@\334\321\365g\371z\017\3469J\374\262\366\242G\200\017\363\313\223=\251s\213`\343\362\007\000~_CV\336\207\240\352F*\313#x\212P", 64 }, + { "\344\263\246\321\357 \003\347", 8, "aT\363\245-\012\023\032\333\253\3049D\372\033\332I\370\005o\267\177\340\226\211&\356T(\210\017\355\372\003\207\277F\012\010\221\213\274s\314\200xLST\260\375\217\013\331wG\240\343\344\347\347\301\324\302", 4000, "\324\336\003\003\337\337\215\354\327z\217\0319E\000\020\353\011\366\347\001\035x\3660D\332\014\276\374\2363\3635\026\227\031f0G#=\015\213\275\210\237\032\207\342s\002\263\2438h'\301)M\351\213\200\274", 64 }, + { "fJ\325L\311M\364\333", 8, "\2640\311\202\3471\2310\011\271\345\002\265\225\257>\220\277\205\311f_I3\247|l\351\222\341\353j\240|2G\035(\353\203\250\031Jl]\317\226\223\343\205]Z\324\356\245,\264v\030\333~t\035\220*f\027k\207\364Yr", 4000, "42\335%\022\372\310&W\2374\335bp\217\247m#\210\006\207\021\371\134N\306\335a]S\274\350y\247oZ\024\272j%\326\213;\324\273\347w\300E]\347%'Z\261\206w\2350(\265\205\301\302", 64 }, + { "\363\237$\002\006\023\357\001", 8, "f\327\370v\0061\026\200", 5000, "\331\303\025\301\344\370\222\004z\275\364\374h\253Y9i\027md\032\020<\042\017\250\261\317%#ne\303Z\324!\354\300\006\235\374[Y\341\036`\373a0\357\357\015\246\3464\352*'\241\272-\317\325M", 64 }, + { "\332|{6Q\346v\313", 8, "\134!gL\026\024\376\2430~\306\2743\232c\206", 5000, "3\325\201\34598\202\330\263Y\005\244\321}}w+\245:\274\177\255\365\265\000e7\375\312gc\261'OG\266hPp\365\250\364\042\333\373\323|\205m\005\2572\021\027\271]\233\360\216-;\210\371\274", 64 }, + { "\333\220G-\240N\205\232\303\177 \012\324\374rl\034", 5000, "U\342\2200*K\262\010\177\273\024\2455|\367\336\2311\225\366/\005b\305\345{\233\301k\030\023?e\250Cf\007\134\036:\377\213\027)\353%\323R\322:b\255Rqr\007!\020r6\305a)F", 64 }, + { "\234\004/\345\032\000v\220", 8, "ar\031\272\305\245\232*\007\247\025HL\274\010\336E+\311\336\2557\266\300\263%\3031\337F\227<", 5000, "\320\254\3477Do\003\227NL\334\355\217)\317\302\221\344\300\320\356\204\266\350\305\223\275\273&r\327\014\261\352\324@\356\032\325\221\330C\346\202\233\013\007\304\031#h\202\244L\207\236p\351\371\335\213O\341^", 64 }, + { "k\317u\332\217\324\322\216", 8, "\177Te\253\271\260\255\276\353o\223D\324\001s\317L\033V\242\247,\2566\233\206\313\315\014\332b\317\312\134\322\216\314d\344\344", 5000, "\316\021\033\027\375R\207\327\021\341\340\253Y\230\016\257\355\024\027B\226\322\346\025\017\2429.\336\2262\352\324\375\225\356\367\353\235\012X\011\361$Q,s\240\033\372\254p\202>\343\034^\303<\211\242\273AA", 64 }, + { "`\226\222T\332\377\223\015", 8, "\351\350a \311\352J/ \015\270I~3\360\2378\265kP\302\371q\202\3006\000", 64 }, + { "\303\327\253eb|\362\227", 8, "\30630\364^\006>\227\224\315o\217]aL\236*\256DZ\270<^N.\326\014y!!Ng\375\325P-v\220\341\206\315'>\314X\315\364\276\014L\324\212\374\354e\230", 5000, "\267\272\262\235\213^\042E\255\330\372\010&\012p\354nBG\344\246\266#t\300\237a\271)\275\010x\356b\274a7^\327\303S9s\343\203\236!=\332n06\241\312\254s\335\265\334\356\324\367\177\375", 64 }, + { "Z\3378}!\257\020\301", 8, "\301.\2642Q\250\277$\271\334M\307\250jz\364\354\361+K\322\275\343\242\322\021Z\2747\333\213\241\224\011\0320j\267\011\337O\023~{7/y\350\012_\202\331\216L\206\003\006\026iQ^\310\036\360", 5000, "\216\202S\222}\336pr\331?\232X\323M!\202<\372\263%\353\264\334\035\370_\323\363\217\322\014\301\177", 8, "\344\303W\177\317\032+u\032B\353\375\317,\225r", 6000, "\212\205\266\373(\344\246\213'\247\262\257\030vZ\355L)\242\375\353p\227\3250h\022Xg\356\310\350=\353\247=/k%\021\364\030\223\013\272-\177\277iX\005?\000\200\325\310\245\0137\247\365\034\234\007", 64 }, + { "\235z\200\0425D\206\326", 8, "ZC\014\243\032t3g\336&\0058\016`U\317\210K$\205\236\264\274\224", 6000, "\233__\371\276\213\263L\005\211\250jO\042\364m,B\020S9\014\332\263~`R\334\236\020\224d\374\037\201\311\327\262:l\221\315&\277\351A\251\262\000\012\200R\203\360\011\371.\373\323b\000\316\277\275", 64 }, + { "\013\216\203\231;\177\030\022", 8, ";\250\2605\215\314[\2478\314\343\342gM\352\211\020:\336\3271E\260\042\3444\274\305\234:\226\221", 6000, "k\255\012\344\344\350\306;fm\253<\277T\017\020?\234\215\216A\373\303\3375l\325\333\027P\301\006\214\221\202\375\342\240\213\012\307g3`\377@*F\3518\000?\010\002\021\005\023\227+E\177\363\022\236", 64 }, + { "\211\354\257\301\023\201\377\374", 8, "t\235\202\224\274\013\350\134Cnm77\352w\200B>\250\213\211l\275\357\234/\004\342\311\216)\260a\016B\216o\253&\317", 6000, "\304\225\214\273\016\374\375V\215\207G\264?/\273*\276\257\343\012\234/\025&/\017\331\211\355\016\351+\301bS\004x\017\326\252\032&\205\030\222\347\272\002\036\231\261\033\200\276\330\367\007\252\376\005#\217~\212", 64 }, + { "{\355d\364\020MGs", 8, "\324\301)\225SI\220\322\320\333\263[\375\2154\006X\303\014\275x\300a\313O:E]\011\236\134\203\344\220wj\231\320\300\015\222\321\324\177\341\320\237\372", 6000, "]\005'\026\210\036\250\037{}hs7\254d\327\243$Ch\000.\011E|\213_\347\3579d\342\321E\212\334\251~\231\221o9\006\323\317\013L9L\312\206\357\372\007Hv\234Q\311'+\001\276\034", 64 }, + { "DR\0073?q\272\374", 8, "\250l\002\017#4\320=p\032\202\257s\207\352\347I\373\244z\377jD\227\214IG\364\206\004\322\261-\217\305\301\214.\314\206\373p\341 TSu\323\377L\373Bu{\032\247\370\270Q\260\307PZ\337\203\304\235\004\254\354\322\363\260\001\004", 64 }, + { "PB\323`z9_2", 8, "\373\317\015\021\275\311\335\315\323\231\212}\307j\336::\201\343Y\210\042P+M\263Gh\031d1\034jz&\134\366\363\012\374\274\212\244\315j|\207\331 \345\312\027x\026\261f\016\311\035Mt\370x\243\323\3550A\014R\033h", 6000, "\134L\334\310\334X\035\356S\015v\243\242|\002\037\305\022\375\372qK]\020\300\226\001\334\310P\357\376s\203\225 \037\305\373o\261\020\303\264\370\256\262\337\237\251\273>:E\335e\260\316\246U`c}\016", 64 }, + { "\027\223!\256N\260<\200", 8, "\020\374\203\034\005b\230\201", 7000, "\302I|/\305\025\001\003\233\244@\332R<&1\333\030B<\010\3315\267\213\317\231U\225\303\336S\217\037\337\212C\202\022p\270\207o\205D\177!}j\221\215\027)\306~s\004h\323\342\336Z\252\377", 64 }, + { "\201\016\210\273m\345&W", 8, "\253\363\011\215\2646\222:gr\001:h{\012Y", 7000, "\244*>\204\042@\302A*b\010\024j\270\220P!\2114\327\031\237\304\231Lb\303\336J\325\321K\263d0\200\327\005l\320\344\336\353\323\012y}N\251!h\275\363\376\320\225\341f\246RE\310\2418", 64 }, + { "\276\257\256+\244\247\211\226", 8, "?\235\347\030\024\362ng\234\254\017@\033\321\331TO_\255\277!\042\233t", 7000, "\216I\365\206\200\134\002\353\213I$\327$U\275\240(\351\352\2738{\313H\202\275F/\322\013h(8\263\205\326\303\042\2621\032\204M\264hT\221\205\310\263\214\273\262\313\221\267\206m|)G\324\241\025", 64 }, + { "\2020\274j\042\224\231\221", 8, "\334\260p\216\333[3\014\301-\223\026&\315G|\231\207\205{\310\336@H\246\3257M\020\031\362-", 7000, "x\213\321\215\223\332\313\016\323\012\310\330?o\300\277\177j\312\220\255H\247&\366\232BX\232\352\362N0\225=\373\010\260\027'\271v\376\220\324\263\225~\354\035\277r\222f\221\260R\253\215m\203|$\334", 64 }, + { "\372+1\367\246\333\271w", 8, "`\220^\277$Y\341q?\315!\014J\221\210\242\232ySd'\354\361z\306\301\016\252\274\342\267sso_TZ\200fe", 7000, "d\224\227\252\306\204\012g\201\237\314i~\216\214QV(1C\271\320\233K\341\351\313\005\342\343>\361\341\377\030\204b7N\340\356\274Ma\023\212\314\222\240\211\033\013\211-\356\264\267\027\262\005\313\270[\204", 64 }, + { "e/\227\361\021\350\237E", 8, "-NQ\342\360?\267#\011s\303\241\227\353\232\227\010f\003f\012;[\022\217iu\317\024g,caX\370.\214\321\273\035|\337EB\014\2636\235", 7000, "\247_\330\233!\237~,D\351\274\202\265Z\026G\224a}\277q1\250?\023!\276\011j\254e\233\255\374\246b\024\275ss\200\031\036\312\322\257i\357\367\371\022\324\213W\014\246<}_\003G\317\204\247", 64 }, + { "\230\373\305\254hVc5", 8, "\362\306\303B\214\210\020QR\316\205\356\241\373>W\307q\237\261\227\355\251R\334\332j\303\231\202Y\356~\213C$l\353f\017\031US\334\324\016\034D:\374\345\252\235D\303\214", 7000, "\331[#\367\002\331}\306\266\3258\246n\226\357M\204u\226\320\306\323n\015$\320\247\305;\265~\2478\025V\364\222\366s\240f\270\314\034\250\277\347d\275\351\326\310]\213\244d\264v\303\317\371p\235\263", 64 }, + { "j\332\311\021\016q~\273", 8, "G\026\002J\024d]\255~\231\271\322d\335T1\203\371(\350\331b\013\302n\244\004pi\231\210\205\332\327oE\205\345\011\300\216df>F@\323\020\240I)\026\335\362\345ndx\321b|a\304U", 7000, "\371?q\263\265\2344%\200;\333\251G\020E\316\333\331RD`\275\260\006\261\356\332b\027Tv\251\243\001S(p\361\313\011(g\327^\241\0030\376\365\3425\376\363\307\216\234\316\216\377b{\310\347\003", 64 }, + { "oS\366\311V \247u", 8, "\217\350\316\355\003>f\334\306W\026\213\307? \304a\245\370\333\364[\236\0256\267\320g\360xn{\037\015\356H\271\010\255\360\265\3136\025\266\342\324\246\204\211\311k\244\322\342\231\307\204o\2376\361cy3w\314\347/\246@\022", 7000, "\211\314\257hDW;\257\3702\271\243\322\314\3131\352\250e\313\006\364/\001\207\327J\350\214\350\232U\353\216\024\344\177(\325\366K\031Rt\220\201L\265\263{\366\305\305\215]\373x\177\373\020K\224\346\350", 64 }, + { "\2713\267\214\012\302\311g", 8, "bo\2109\255\305P\036", 8000, "\236bG>\215\363\021\012\242\265P8\373\332\017,\367o\217}\210\320\035\320\255\316}1\005\021m'\205\214B\236y\232\377\300\262&\240pJRXQ9\226\011\212\316\346E3\302\252!l\266\304\134\017", 64 }, + { "l\364\370\012\341\025\344z", 8, "\201\004\012\261\355\255N]*\324i\346\002z\300O", 8000, "\024\220\237\352h\017\263\237Vk7\015\250\007\000\253\203\305\255\220\337|\306\233\240\023\361\226d\304\315g!GGY\363g\331\005\376\354\243\371\207Q\212\246Ez\030|\341\315;h?Pe\351\256\004\364\373", 64 }, + { "\302\241:W\337\336\036\342", 8, "\273\233\362\231\357\212^\310 $n\370\314\324a\225\235\004L|\322\015\357\256", 8000, "\357\333\324\221\253\207\002\244\006\352S#\326\352Y\201\034\307\301e\22120\252\036\333\2151\010\134*~\235T\322\007\200\020x\221phGw4p\221d\251\262\355\013=\236I_Vm\241\003CN\245]", 64 }, + { "\250\275\025\013\365\363\227\210", 8, "\030\02582\351Z8\344\017\0252\203\305sTM6\322\336\214\037\303\223!H\306\276R3\235\323D", 8000, "\337/\303\204\376H\020/\366\036\3336O\234\237b\012Q,=9z*4VZ<\320\214\270\341\277\262gjEu,I\224\242\316c\217h\042\211\005\300+\033&\336\024\254&\227&\301\324\004\362\377r", 64 }, + { "\366\345\301\371\301\220\3759", 8, "\315\012\003\227M\042[2[ \036\264dB\022a\326\372\203%\223\005\330&\007\304\012\300n\347\233\012\263o\330)\177DC\323", 8000, "\023\006\222\026\010\342gH\220\370\372\277Z\327/?\240P\244\244-\326\333e\234g8p\323\263OG2K_\272S=\276\012\011\314\217G\027{\215\246\360 \024\224\244\352\363\003\307\371o\305\212\341\3706", 64 }, + { "\272\010\025[\365PR<", 8, "\270\205:\014\2338\264k\246~\025\245z3\345\001?\005Nk\006\202\357\220:|\251\2522\276Z\243\232<~8\341i\326IQq\265\355\013$c\241", 8000, "\031\240\307X\344 m0\221(p%\247>\215B\244\325\211#\036\355\215\356\231\247\263=B\232G\264E\260\222\214`\006v\315L\011\355\025F\235\352\347\365Pm\230\211\273\255N\0023\021\202\362\370\004\340", 64 }, + { "\031\322*2\357\375S\022", 8, "\366\252\324S\223=\016\205>\011\374\2703\234\226\316\004\327\231\1774K\236\030T\232_\315AS'\374H\326\226E\037\225\263.s\004g\332\360\372\0147\200\364Z\003\262\225GJ", 8000, "Y$ \014\261L\304\307\264F\212M\362\364\272\375f5\223\016\275&3z|\227\021]mvP-\024\225!+\361\371\250\335\375\377\310\035\017=\233\347\225\235\042\335\241\300\264\260E*\327\034\220E\204\325", 64 }, + { "\031\220H$e\221aZ", 8, "\366\331\016o\241W!J\177\212U\230\316F\042\345xO@\324\314cQfu\315\261\312j\252\005{\001\035\362/`i|\361\237\367GmJ\303\356\035\366sV<\031\346\2736\266t\302\024x\001\360t", 8000, "IB\042P\213'\260\225\275a\244\255\225\361\346a%\321tT\251t?gbp\344@x\016\002A\025\242\264\177\224\256'~;\256\216\277\301Nc\302a\216\325\220~\213\240\245\252\260E2\371\216w\134", 64 }, + { "\004\341juF>\010\303", 8, "\012\374\210H\310\034\235\215\205\261\207r\3443\224\300\027\275\304\271\366\021\300\034\024b\256\337\0164\007w\335\243$T\300m\010O\202]%\306h\205\311\260B\206c\236\011\233m\305\305V\042\020\274\001[zM", 8000, "e\327,[\030\205\3270?\251o\320\177\305\134\272`\256\332~\363\017\200(\035s=\343\300\244A\231\243\267\247\032\353\325\275\256k\221\364\230\301\301\2658\260D\035\244\207>\211\354\035\220\202$:\012\345\177", 64 }, + { "\244\276\254\240~1|k", 8, "\251>\326\357\223\360I\224", 9000, "\202\327C\273\265\315pa&\261\02517B\232V\007\200q\302i\240\265\250\302FH\230\002]\357\216\204\245\351\221\223\335\250[\0274\265\307\214\362\347_\213\003]\244\360\344\014\011\003t\226\031\016\354\034L", 64 }, + { "v\015\177M_\312\0052", 8, "\366;\234/9\024b`\042Np7\3674\335\254", 9000, "\363{J[\233\031\001=k\307d\011w?\300 `\320\005\253\303\373\134\004Q\212\334\344} \355v\221\370\315a\314\205\236\343\363H=\357/\026\2531\024\316ZC\200D\345\212\3025\011\333!`:q", 64 }, + { "\272\021\314kDz,\250", 8, "\1774.\331\031\134\003wT\204\366\216@\2057N\223\237m<\341\307Z\307", 9000, "\323`\024\332+\270\220\374#eZ\314\217\274\015\275\234>X\342\363\240l\202\321\3030\245n44\267\007\377\042\334\225\323>t\310\316\301\333\213\215\205N\330\274+\214\323(\342\012\336\255\233\233T\220\345\352", 64 }, + { "\346G\354\015KEg9", 8, "\320i\372\224\255\204t\310p\216(.\260j\241\215\217\245\350o\362=\024d\323\350\364\212\010\300\351\265", 9000, "\237\006\200\214I\354\024/O\134\026\322\201i\203\031vjkO\024\234\311\351M\020\202\350\016vO\331}^\333\223\247\006\366\251\260\3661()\027\322\361\350v\310F\005n\337\277'\361\327\220\330\031\374\037", 64 }, + { "\350V\321\365\262\311q\250", 8, "\343m\037\250\273\367\033\260\306+\343\236\021\337\216;&\366\361\237\301\244\224\035\017m\033\241T\206\011\006\030\220\240\222(\226=%", 9000, "\215,\364\267-?M\243\134l\345\312s\270\224lu\363@\337\360Gz\357 =0\374\320\027E~\206t\347\031\222\371\211H\333\242\210p\371H\023E\262u\004\042@\250\341.\316IYA%\364\010o", 64 }, + { "\134\012\274\273\331\3564\247", 8, "o\2669\261\335\134\307M'\373{\361\367\325\253\331\243qy\316^\031\315\223>\024\007\177\375L\216\001\272Y\235\246\340\341$rG\352<\203s\255%#", 9000, "-\017\003\263@\273\011\274\3138Fx\036\312\320/3y\26458\035V\222\376\004\312\330]\263\317*\265q\324\340a%\016\214\241\255v\033U4j\006\002n\346\014\326\011\211\201\237I4\330\034\0002\335", 64 }, + { "\276Z\205\372\215/E^", 8, "\260X\264\010\316\224\021_\014\005\246\0046\005I\377j\356N\365\013\253}\007\250BlGu\224\027\37541\352\316\3704\305\024\343%\037\342\265\236YA\200\005j\352\203\254\315\237", 9000, "\266t\3301\355\364\233_\353*\333\220Z\007\360\343t\343&\260\036\334\201\254\335R\373&b\237\027\221\343]U\304\212+\0367\307\375w\250\227\233\042U\227\215\324\017`_\254\3125.E\002D\321\200;", 64 }, + { "\226\005\201\252\315+\266a", 8, "\377\315Y\201\220\361\037\222\262r \237\226*r\005\236\225\036\323\313(n\257b\011\330\357H:# \321\271\344\202,\231Q\016\013\034\222\003\364\205|m\335\232\0172V\355\275*vH\262\177\205\307\210D", 9000, "\234GS\240:\220\213\346l\004u\204\234\243\351I\370\260\375\010\201\035\223_E\354\271v\036\250\266h\227[\243=\337\315?\220\3253\300\366\346\024[\307w\325\313y&l\027\010-", 9000, "\307\367\342\016j\337\217Jr\210\226)\242A\315v6U\313S\042\025`\335\346\002\240'U\312\342\210]=|DZU\253\237\320\235\264\311p\200\221EP\311z*\207\267\305J\273P\033Utu\254\300", 64 }, + { "\347H\205\004\340w\177\321\313\337\042G\204\274\033\334", 16, "h}o\344Iv:b", 100, "\037 \023\347\332\024\007\042\036e\253\276\016\270RM\224\223w\012i\223\305\2474]_=\257\303.\331\025EqB}\214\204s\253sD\037\317b\034\000\376e\012\340V\220\224\00532+\024f\206\032a", 64 }, + { "S>\007\330\027\271yp\211\357\017\246\200q\302\376", 16, "\266\042\300\276\377Z\362X\241\271\005\257\355l\232\235", 100, "\320\302\134\002$F\034\315\343\211\010\256\264\222\021\363\177\003T\030\225\027\333\376\213\256\357\202\324\272\350\201\3161\233\277\327\04293 \332>?\327A\377\361\265b\274\202\246\3123\236\366\001g\211u\223\354\354", 64 }, + { "B\031~Q\003^\310\367\210K\014\256\245\202\316j", 16, "\015-L\002\032\352\005\215\322f\024\344\3559\360\273\222\336\347\221\356_c\320", 100, "\177\207_s#\007\301m\206\013\2300!\365\000\2125o\261\376\343\365x\220\313\356\264p\304\013\033\306\354\246}\304\004Z\311l]\002b\362yd\013\234c\007\340\262Bh\001\013\314\364\021l=T\344~", 64 }, + { "\245\360\247\005\370r{\215\303#0\353\344>\002d", 16, "_k\016jF9i\254\253\026,\251e\003\315\3136\016\023\213\337/\331q\343\356n_\355\242\200\231", 100, "\303\207[\317\226\277\341}\225.\324<\006jL\035\372\247\245\332j\334V\015\266\012\366\273\213;\213\275\021\020\341\271\325W\277\303oy\260\215\021U1\333\205D-`-[<\335E$V\253\014\213mg\267\355k\262\211(7(\016\003\036\231$\257", 64 }, + { "\3746\000\2150\247\037#\313\331\351l\012\333\247A", 16, "\234y\004\241[\363vH\207.\227X3\234\366G", 200, "\314z=\265I\243\201;\010\234\015.\042\377\265`\220\223M \006\234\276\035\036\2571\322\237+~C\241qv\223\006\223I\034\225qT'Q\232q7\3102\336\371\271\237~F(~\350\317W\236D\000", 64 }, + { "\305\363\361\241\301\257\317\177\3327\134\252\316f \307", 16, "\324)\212\012\226\034\330\315\313\323n\361&s(,\205\322\034\211a\236\335\375", 200, "&\3403J!17\345\026 \211\235C\025R\212\177\374\273\343\027\3772\026}\232\347\016\362U\352\025|-\373V\300Q\221\003\317,\037x\334Dq\230j\277\206(iW\037.\336vJ\230W=\013\376", 64 }, + { "\342\015\026\337\254d\021\237\010\216O\314\271\015\202>", 16, "\272\010\351vz\243\205y\234\345\354\262[\353^z\346G\324\177@\217\357\252z\254\354\240\241Yb0", 200, "_\235S\033v\365x\3567c\255\216L\267\200\307\204\006\365\271\276>H#\260\015\335\025d\000\230H4\255\365\264\370& \204[\345w\035ne\301\254\312\246$\213\345\362\261\256s;,\321\304\371o\333", 64 }, + { "P\220Zg>x\313,\234\260\240\262\260\351\177{", 16, "\3762s\2309\276B\215}-\215&\363Z\374\305\233\325\203\254\367\212\250\266H\222\002\256\362~m\374mr\354\305\317\330\215\214", 200, "B\2700\007hU\301p|\227\275\342e\005%\374\023D\242x\311l\0344\211\256k(\264%\011\362\266:a\305\330\252\320\303\365uh6\240\0033\271\236c\220M:}\365|\210\010\305g\000\364\027\347", 64 }, + { "\032\222\254\003\000n\311\010x\225ny~\226p\016", 16, "\303\3346\310>\2656\271\251L\272\243\007\315\221OZ\300\212q\335\367\246t\234`\213\214\347\332U\340\352\275\265\134\354\203\333( ?\256\304\035D\012?", 200, "t\301\031U\330\0141Jw\010\027\212\334q,\306\307\313\354\177L^h\376&\033\310-\231\220\273=\277?n\201>~\0263\216\012M\341\224\037\034\244\036:\325\017\2024\230\342\006i=$\3546*\243", 64 }, + { "z\012!\011\346\202\316+8\217e\255\023>\350\221", 16, "\177\015\264RK\134=\005j\210\255\202\373z\327\304\377\027\267g\254\3139\333\354\215\273\177\0112\237\327\343D\205>\213\231j#\235\355\363,\237\315t\021\335Q\300t.\346v\210", 200, "\233c\377\253\202\010\203\256\372\357<\200\231\334\3074\207\371\232\243\206\023\212zj\272\273\216\217\210f\200`\031\202Z\337/\2467?\177\226\321\215\300\216\260\222t\320i\361\012oT\017\302\340\353=\302\240z", 64 }, + { "8\346\2320\027\300\302e_\224V5\347!\037<", 16, "\247b\235u\341\201tX7\372$\260M\312R\344\275\241i\233\255\253\030\206\256u!\334\201\275\202\042\036_\237\335=\031,\015\230\372\303\224\312\334\220V\035\323\226\340;\177\250v\375{k\344\331\255\214$", 200, "\216\323\264\300\362\373?\027\346\000\323\275\267q\001\222 y\303D\366{@f\034\226O\234\341\216\230/\226\324\034{\001\264\042\326\357\015\360\037\362\2602\306\277.s\244\001t\346V\333\016\3111\015r0\316\005b\330s\204\317uxc", 64 }, + { "`\204\233i\237g%EA\265\241\220\240\311\271\277", 16, "\007{\3171vCb\215", 300, "\231\365\3613x\302\240\021\024\331\3726O\333\340E\304 OVy^\0121\360\353\237\210PM\261P\011\325\311\307{ -\307\016\204R\300+\003\324M\312h\003\304+\251\214\005\205&\002\252\022\240\3702", 64 }, + { "t\271\276\220\376\026\002Q\320(\350\3108\032\234\227", 16, "\275'o.\375\363f\266\245\373IN`\331\016]", 300, "\234\203\367\265\303\221\335\243F\363!\225\007..\177v\266\321oe\227\013_/3\032\330\225d3\233*\252\042A\323gR\303}A\374\300A\353s*~\205LdO\305\002[\201\204\033>\244\207\330\030", 64 }, + { "\200|\315\327\367T6\016E/+~\016\267\042\366", 16, "hR\302J\352\242*>\306R\202R\354\214^\317\216\270\277\014\316\322P*", 300, "\215.\042\007PDE\315\3073\355\007^\2619\323ET\250\004\334|\364lQ8\020/f|\206\344Q\010p')\013\220\277\231\362\272\00462\344r\211%i\273U\012y\346\322<\005s\204\017\200\274", 64 }, + { "\302\354a`\2242\277\372\213\134P\021lU\200u", 16, "\320\311\272#\313\335\306\264\251J\255lR}\002\273G\3006\371\205h\235Ah-X\001\312\3341\027", 300, "\022\220u_\275S\011\301u+\222\351\307~q\226\007\233d\231\276\026e\251x\3123(\243B\227\021\215\277\031\315\226\315Y<\360\213$h\203\017\266\335\024\247cSC\350<\340\303\343\237\241*\200}\265", 64 }, + { "/\342EJ\341\2354E\202N)\376\311\231S\231", 16, "\266\012\010\366\027c\3434\364\272\373\260 \263\207\262\344\237\350\271Y\245+\011 \341\344\277", 16, "\326&\352]\243\333[\211\035t!\366\204\204.\351\005\036:\260F<\210?\343m\226\035_\134\255@\016\260\017\347\033\256\377\361Cd,\343@\007\264e\177L\275f\216\346rP", 400, "\300\042\035WU\336\316\023i\201\215\215KSU\215aH=\010\332C\207\276\207\254}\373\331\325\312\013)%<)WM\330r+ \014\214\217\012c\266\023\364\330\356t\264\042(\031\312\271\312\351\3356J", 64 }, + { "\260\354\027\023%\230\372\345'\315\035rq\356<\327", 16, "\300#\263\231\336\337J9\346\354\007\273\351\244z\013\247C\342\337\042cF\221\022\221\203z\200\244\323H\015\366p\364*1\2271\134\326\377>\002{\260:\242\224\323\035\211\002\277\347\246\227\237\223\315\315\361=", 400, "/\015\317\021n>l.\252\256A\340'/\327vM\233\262C*\241\361\036\353\203sjK\003\007\331\361][\204\3643\237$\234\353\205_\206\226\337\275\375\025\255\314\263\250\311\244.\362P\336w8_\344", 64 }, + { "\366\317\345\225\251\365g\205\211\324*\313\001E\314R", 16, "{-\027(\230\231a\371\302\271rc\302\204\32402\204\312\005f\227\336R@f+%\250\372%\023\340\002!\203\037\237!\1346\012\355\345\246\020\346\263\204\204\222\356\221\2334=\3333\364)bs\242\314w\001g\214\212\020Gq", 400, "\212K\270\302:\017\317\343\266*H-\373\241\321\200\021\204y\276\272\252\347#\333V\025sI&\325@\337\015t\312JR\312\222\243le-\204\354WAi\364d\353\364+\023\376\363\210}\261\236\242\262\222", 64 }, + { "'\225\026", 500, "\341\213,\254\202dg\312T3&z\363\354#\350\301\204b\302\357\253~\315a\342\235Z\206J\002\341\042\004\342h+\274Z\305\350.8^\377C\241c'\231+UI\216`a\002\203>>H\276q\330", 64 }, + { "\355\2508\036\235/\211\331\356\0223S\2121`\224", 16, "Zk\3217\020B\320\302u\222N\357UBC\364\221M<\344\210Rq\254\327[v\266\347\251Y\022\367E\376m\303\332\134\270\020\332\333\026\224\204\367\254\362U\011 \324\276m\330 \032\222^W\2304\345F\005fw\364\277\322VXJ\345\0167KM\213\022fv'~\032k", 64 }, + { "\134\244y5\2355\245\326E\016:R\206\032\334\202", 16, "\233\364\201H8\215y\376\014\277\016\334\013\337Jm", 600, "8\337\036\337\322h\016\272\377\261\302jZ\271\312!F\372\364\327>XPTg\232\226F\021\362\024%~\371@\314\226;\026\244\2356\312\134\134\236K\217\243\341\0052J\304\014\354n\205\321\365\256\214t\337", 64 }, + { "Q\361\217DR\030\023l0f\316\321\317\370\000\270", 16, "\210\323\252\322\0060{\223\006\022On0fm\202\011\315\357a\031\373*\317", 600, "\300\241\266\226\264\202\202\216m\0166|\321<:^\367\256B\327\211\036d\030\002i\207\311\322RSC\252\303G*xD\203\213\003\343\252=D\261b6\033?\351\257Y\251\261)\254j6I\203e<\333", 64 }, + { "W\240\211i \373\342$O\315\042y\243\371o\203", 16, "m\225\254MJ\265\037\231)\021\336\371\254\253\256\317.\204\210N\300\226\320w\354\021G>\014\256\310\034", 600, "\373\356\000o\004\330\262\234\262\250\346f\212ap\337e\220,\007f\333\202\270\253_ms\351\013\373\234\251j\204\360\033\257e\344\360\200A\324S\320\251\235)\015\013m\202\206$eE\370\243\001\014\221\300\275", 64 }, + { "\305\337\271 *\214\274\272\356\013\307u\215/<'", 16, "\323>\273\2563S\220)\265\367\346\246\002l),\025\177\027f\332\223\014\004\260}A%R0 #Z\357h\340e\261\025>", 600, "\333\224\212N\256t\331\335\002\315\266\324W\214\017\016\273\250\303\021\326\340\016fC\015&\305\213\266Pi\261\344D\325A\367z\251\326n\321\305\2120L\324v\006\262r\320\211[\023\253\301\330\376\017\245w\000", 64 }, + { "\227\317\337v\243\316\223\362\003=\022\307\243\250o\216", 16, "\247\270\205\312\252b\325\344\227\372q6\3660\004\035i&r\212 \253\177\211\365\034\207`\213\310&\005\307zo\332\363\344R`\217\267\270l<\275\321\317", 600, "\312\021O\242AA,?\251\335\207\244\357\274\2753\020\006\321\240\362\262\304\253\210\370\231>\323v}\335C\000r\362|f\273\246\225\314\354\244\272\260\330o\221e\233\005ea'7\336\232\232:\221S\031\334r`\316\2015\257\377\203:j\221\264d@\342", 64 }, + { "\255\377\250\342\216\0156\217\331\352\220r\302\236\376w", 16, "\377I\023\011\206\313\214=\006\344\0217\037\034\312Q\013\303;#v\275,\276b\036\023\375r\332\302G\335\307\333B\325\374\347\271", 700, "0\2629)\037Z\226\272\312\021\215\345\266_\036\373\277\012\023\364\271%\271\272\366\353\205\322\243\220\1342<\233\372\311M\232\027,\215<\334Z\357N6F\207O#\031n\215\235<\256\333\304k\223\323\240]", 64 }, + { "\243<+\014\304\027\016\025\023\373@\377rt@\336", 16, "\316\023W\361\200\325\241\255_\347\247V\0324U\031.\377u1F=\234\206\365\342\256\210\243\346\217\317m\3334\267\242\263|.\015H9\212\313\360\331,", 700, "B\322\302\014Tt\014A\243K\347\353K\031\364_)\340Q\356\216\006\367\275\355\246\035\362k)\322$\242jn\3077\255@\036d#\266\267\274\267\343ti\211\376\032\200x\313[\306\267\247n\222\222\347\021", 64 }, + { "\371)r\237\3421+4\356s\277\234\343\330\212\313", 16, "\262\017\333\260\372\305\253\325SWj\350\233\231\222\372s\277\032\272[p;5\204T\014\243\017A\345\314\217\210\323&9\222!y\247U\3673'\351\266W\216N\215\265\0331\331\373", 700, "r\016\300\215\261\246E\350\234\360\035\340\025\033\206C`\206b.\326\223\367sV\320\232\006\374\227\234N\027\222\376\273\264\356\206\340\317\337>\237\266r\207\206\224zp\343\335b\333\237k\240\306\204I9qF", 64 }, + { "\351\236t\270\232A\203a}#a\340\217\314\235\246", 16, "\345a\00716#31\263\314\220\255\005<\306\277\3574;\025\004\341\323\215\023\210l\373|\226\234\251O\242\2334\311\336g\260\033<\261\236\237\271\357\230\035\273\016c\212\200\3406\361g\022\263\030\311E\277", 700, "\300\270 \346\234{<\357^\225\303\255u\351\042\254\267A6\032?\023\251\226\320\361AToOc\201\220\335\241\276\363.\277\227G\042i\300x^`\230\253\247S\205\231\2700\370]\304\343y-\134\262\274", 64 }, + { "\326\315\030\330\327m\324g`\357\314\374,m\313\027", 16, "\222\231=\273\242\212\226\031\325\251e5\213\256\244i\036\370\247\361\2530\377\372E\244\265\367\346\251\312\300<\304\221\035\201\277\342\304\015@", 64 }, + { "o}J\242\212Q\201\317\222\006\331dI:\362T", 16, "\227\363\374\030\2151\324W\373\366>QP\367\032\315", 900, "\374\010\253\244u\317\244|\366\2348h\341\373\322\350\234,{x>V\036\006\266m\042\374\335,\351Vl\376\341\026\000\233\302\021\013u\274\246\363#F\321\234\226A[J\323\253\371\201\344\306\312\222\300\232!", 64 }, + { "fW`\315\042.\323\234/\024e/\235.\367{", 16, "\377\001Rk\017\237\367\371WR4q\271\242\200\034\374\224\224\026\371\3056\305", 900, "\314e3\234\224\216\231\334\257\005\354\223\241\322\363t\134 T\343l\246q\237[\300n.\014F\207I6 Hp21\271l\244b\023\352\214\356\331+\331\006'\321\215\301}\223!\3318Mp7\005\330", 64 }, + { "\365\016\371I\230s\357\307\245\037\373\023N\2579\236", 16, "+\214\007\212\252%\034\006\337Z\013\267\134l\211\030\302\271\267\376W\014!\370 \354\272k\013 \265\035", 900, "\026\345\251\321>\361;\226\251\251\277\3261$\233\224tk\373\011h\030\256N\030\314e\352M\2200\273\341\351\350\302\257\03796Lc\3615\215\033J\326q\347\364T\0232B<\015\202\251b\021\352\271\224", 64 }, + { "\357\305\300\016h4\217\213\205|\365\275\2402M\212", 16, "\232{\261\235\227\366}\037?xZ\217{\271\352\3539\3628\370T\207\370\222\334\221PJ6\237`\235\343\020n\323\370}+\025", 900, "\006An\011@\267Z\023\026aW\274\002\263\316S\006\374\372\362%\003\357C\355\307\202\023\266YN\245\361\324:\311\201/Pa\342e4\2122\203\255\312T\201\243l\357\337}\361\302\347\034}\315l\007\301", 64 }, + { "\254\373N\035\251\017\360\304\005\333`\256\301\240\351\020", 16, "\257\231q%\353\262\257\37167\260\364e\222*\0135\242\214-\263;\011\232e\237\221\202\026\352\334\034=\326\346\246\016\353\375hH\020\2666;\276\254\254", 900, "{1\200C\304@\350\255\323d\266\042|\2019\262\264\177/T\362\020\346V=\032\360\226WC\234\260u\244X/6\326\202\363\025[\327Y1\240\243\030\373m$Yp8\220\272v\321]\361\343\305?\226", 64 }, + { "\200\323\244\005\342\327}\330\0329D\266v\037\332\234", 16, "\305sYC\035z\357\246\025\315'\376\305Do\345\022\320\016L\321\236rW)\0128>;\042\215\2640\244\370\245\271\312\220\222\211j\247\323\252\324\252\316G\014\307\303\220\026>\241", 900, ":\015\356\340\031MC[\210\244\201QVg/u5\331\215\134Q\277J\322E\306\222\372\346X0\210N^\207'\300I\345\011\020\366R\014\177\213\037\3425&\252>\264H\316\335\235W\264\265\256\3774\002", 64 }, + { "\033t\350)6\260R\333\031\346'3\021x\014)", 16, "\317\036\207|'\372vD9\324\306m\004B96\3643\007/\337\212\015\042\015\317\022\375\3434\3669\266\243\234+\336\261\234!@P\204\377\220d\236\370\254\370vx\312\134\017\204\3509\225+\034\351\024\267aH}p\364fW\006+;=", 900, "\023\234\016G\310\260[R\353\236BW\207\317\016H\245'\203'\3209L\0148\230(x\027\337\025\256\355&O\2170\024\177\312\200\005\320\365Z\353c\365\207\333\134\264?\321j\0170\312\263\366\350\2733\030", 64 }, + { "}\026\215\320q$\364\307\271\035\234s\210bw\265", 16, "\260d\255\307\300\313\321\370", 1000, "ko~\027fI:q\276\226\305\216\270\317\010\340)d\020\353l\010\274H\013-\306\331\014\277\252\254}\007~\371\327{\352\216\255\211<\366\221\201\311\001\340\267JV\227+\347\253.\222\200U\317F_\276", 64 }, + { "\302\316l\266\270\312\0316W\200lJD\344\263\264", 16, "\353L\235\037:<\341\377\357z\035R\322\221b\010", 1000, "\357\261'\225|\274\201H\253\332.\240:\2151\3776\250\032Sa\351\3659\223\366\240H\200\2439\007\223\240\300k?,\004\203$\200\220M\236\202\314\032\321/\231;\210\312\013\214=U\0129\246\247\347\324", 64 }, + { "\351%\241\263p\261\200\362S\377%\206e\350\237p", 16, "\347x\025h\232\331\240\015\006\035\273\353\233\001@\004\177>\254We\361\353\215", 1000, "\302\000\266c\330\375\3350W\022\272\3446\345EY+\311~\244\0162\006=\353N\212\343\257/-B\271\270\343!\030Q\210\242F\307r\276342\261F[\342\337\277\321\217\360v\015\215\301\005\367\232C", 64 }, + { "\224U\367\245\357\276\004zv\004\017`\350\315\220^", 16, "\230G\361u\016\305\221\367\253\334\344Dg&x0\314\301/j\042\211~\320\207\207y\217r\237p\354", 1000, "{8\226FL\023\270\334N,\247>\033\032B\032\354k\010\001\373\222;t\023X\304\371\276\244\203\316Vw\352\214\310yI\010x\025\215\250}\301\027\205 .\042P`\306Xrx\322\257\235\340J;\277", 64 }, + { "\225t\353\356\367\376\013\326RX\246\016\134D\243\336", 16, "D\006}S\362\262u\220p\364\313\365&{\346n\277\322Jv\2202xdk\230g\327\341C1\220\374\322>;C\263\254W", 1000, "\026.X\262\251\361\032\206=\326\251\214\2721.!5n:\266-\267\015\213\216\313\335vP\013\305\034*\301\177\226\010\345\030\322\213C\313\233\251n\245p*\207tO\021\022\221\020)\006\212\237\014\223\020\256", 64 }, + { ")\035\350\023\325\370\321\370\243\005\263dm\3147\252", 16, "\015m$\343M\220\3573\304\200,C\032m\237}\256\366=A@\200\223\177z|~\263a\321\320\344=z\0229\244\200\222\253\013\224\021\265\224\023Hf", 1000, "x\351\246kB\345\355\201\134K M\003\321V\307\024\257\246\251\031\224>\244\021e]\014\262\272\004\206>\251\270D\372\226\206\352\225\273\010\036!\364_\327\244\001\353\012\250\232\227W(\034\231p\301\031\203\325", 64 }, + { "\246\337^`\273\277pp\204\370\235\023\256\026&Z", 16, "\327 h\205i7+eN\362\265T\320\321\237\214s\036,\326\021\357:7S\302\212\253\016e+\251\253\334z]\022\256]c\007\310`\223\364\022\206\245\217O\036\251\366\214\242\370", 1000, "\346\364s\202y\026\347\275\220gk\304\232\326\234\025\257Rg\254\233\216\344a\306\225\366N\216?\276\367\032pn\364-\322\331\367y\002*\276\322x\340Q\016\354:\341\216\320b\216w:\267_\227>\274\235", 64 }, + { ";\355],\232J\026\265\200\333\220Di\271\362\325", 16, "\217p\015\025\3636\334\234\011:\304\3378\203T\247\207\350qA\370\365\307\021\230\250\312:\214l\311~\274\220\303\225S\250\230\343hc\261\374\343gI\374JO\013\325N\271\255A\264\032\215\013>>\262\021", 1000, "Tm\271\346\333\031\034\261o\233\342G\006\277\264\2759\015$\351\352\331\214\200BL\375\356\322\376\340\337)f\356%\346Tm@\277F\027\012\315>\327\276\001\302\2576\313\244\315\276H3\346A\266\226\312T", 64 }, + { "1\317C\247\340O\362+\332\245\006\261\2069\252\342", 16, "l\31548\373\321n\375\007\337\320\277WV\334\205Q\230:\021\010*g?\3702\004\005\306\305\324\025\256 \203\351^\276\347H\306\345=k\310\247G}\326\020\347\363\350\016\215{\023\374\357\335\2669\315\353\336\250\224\303W\370\246\221", 1000, "E66r;h\253\215\200\205\375d\261\331\275\264\330\3146o\011W\210\217NI\343w\256;\226\351\351\000h\346\340wi\221\275\302C}l{\336\272\030\177\273o[6zV3j6\007)L\244T\025\256\353\2726\023\241\3501\221Qz\342\001S*^\327x", 64 }, + { "^u\024=)!f\324L\251Z\200\377#\134\362", 16, "\224v\363\204\345\353\263&e\242g\310\227\323\231\370\320\350u(3>\346\013?\3316\360n\316\2560\032\264n\003\177\352b\360", 2000, "u64\012\241KEM\001(>Z\237\042\027\240\361|\252\216\357\214\017-\302\002\365\224\355\277\351\033\011\030\324\363\034\320q\340&F4uCc\235{\347\013l\2671zB\025\236\3174\215k\361IJ", 64 }, + { "\256\002\200\356\321\334\300\0423Y\021fv\323iD", 16, "\224\307\134\316\002\320\273^[g\332G\320U\0139\004\022\220\010\372\200'iw\376\236\012\034\304\017\035\334a%/\322\277\3206o\262*8\014<\004\202", 2000, "4\274\031mr\012\340\305s\042/\217\205y3\374`\224\223\311\377\222\301\202\214\351\337\010\015\315m\213\263\334g\314oT\372\330\246(\333\306X\321\376X2\206\026\230\333\361\325z=\277n98\334\377@", 64 }, + { "\250\346\251\243\207\200\303\011\307\231z\220\332\004\367\021", 16, "F\251%7\247?A\003\200\015@A\260\042\247\310\356\004/`#\222\244\201\317\375>\134B\023\024\007\032\251z\330\371\3456\006Be\207\343\354CR<\261O\352\362J\361\377\367", 2000, "\276\207\365,\306\033P\0200\231\2013c\351-\301\032\207\212#\301\3233D\374b\027\206\357\335\341\321\205TO<\316\225\011\271\013Ca\235\315>\214\325\222R$\003a\224\005v\253\226\243s$\375\345\240", 64 }, + { "\222\324\307\304'\000\210\255 [),\322\357l\332", 16, "\007\345\242+\012\357t\231\202\266\324\250iv\277\257n\315\354r\025\004\356\233\317n\256\042\202\372\251\223\230\226c\203=\334\331\230\237\034\2129\215\365\317\006\250\010\361\335\226\261\367u[zT63|\365!", 2000, "\371\270dr\215\025\035\212\004\012q>\263\267*L\201\373g<\333+\215@\334\260E\253,\302\261>\222\201)Y\006\316,{?\303H\240\253\326\362b\134\374\177\013c\351\237h\025\2350\313\3422\313\272", 64 }, + { "\325\351\200@r/\240=\323\331\372\023\244H\013\236", 16, "\326\307\360\340u/\260\312d\314E\240r\134\025h\272\202\230\177\364\346\134-L\345\362\260Y$\207\027fv\257(\336a\307\215\341!X{\024\0317\345\257\240\263q\332\032Y\230k\026\254\037-t\031\244'\353\324\344\3014pD", 2000, "sf\252}\216![5`hs\210\324T5H\346\037v\314\344\346\330c\240\373\021\023-s\350\356kj\224M~i\206\325\246\325b\347\335\252\303+\277n\003\307lgw\217\245\025R\205\301\257gb", 64 }, + { "\244 \262P\000\300\360\311\042\251hn\226\023A\270", 16, "R{\337\244\226\014\276w", 3000, "b\254\205l3\271@=Y`\251\226<\316\334\013$\321\357[\357\324P\201\246!\355W;\362{\367h\2072\270\247\353 \271\357\233_\330C\322\231\341\251\315\010xm\270\350\260\352\304\035\304\204K$m", 64 }, + { "\015}\205\262\251\331\300M\312\216\024H;\313O\030", 16, "@\225\032!\031\231W`\325%\332\334+\345L\257", 3000, "S\042\245F\263\330\001\203\365\020Q(Q\032O\302\236\311jA[Yq$\000\210\266\026BIFj\255\263\362L\357^\304I\266\222\223\001~\321N2\202\206\301Ml?.R\321\215h\327*\347\317\324", 64 }, + { "\270\257g\226\273\231t\256;\025\270\267mL\177y", 16, "\224\2678\3320\274\306\365\254a\260\307\276\377\012Y\231\372-\3652\026\225\026", 3000, "5\3706\342[/{PT\265sHl\345\275\215\273W\300\354\341\342 \334\011\013T\003l\225Q\333\277B\240s\211\231s\360\353\301A4yj&`\024\005_\307\216\325E3\235R\032>\213\034[4", 64 }, + { "\312\207\223Gfp\250\306\342\002|\233\1349U\004", 16, "4\321\374\364\375ycx\020g\345\224\352\0424\313\011c*p\267\376\232_\370|\240\010.\3227\033", 3000, "\341.\134\262?0\256n\334\263\356\273\3141m*\352\344\237\302\300\364>\347Kq,mu<\327\010\267.lg\002\232\226\350\354\010\263\215+\032\014\230\262\375R\264\032\204\334\351/\314q\361w\246D\274", 64 }, + { "\2645\264\241X\321\351\352\342\015\253\257\241\354xn", 16, "\214Ihf0\343\371\323=X6\244\327\237l%\340\300\021\006\271Q\340\002\267\331\234\0100\231#j\005\342[\367\012\042J\237", 3000, "A?@\303a\325\243\015\200\206\256\025m\2471\254|\252\203j$Y(\013'\346\336\011\217\355I\346m.\001\337\033V\022\342\2177\216\264\211\000\253\330\007\315\323s\365o\371\330t\361\235:\0231\266#", 64 }, + { "\250b\326\230\271\352\346\357\305\245\303:\3236\036\300", 16, "Fe\247\220E?\206\201p\303G\006\357\027\204xD\264\237\247t\042\357N\335\351\351B6\177Q\301\307\334\012H>\2572\275.'tu#\014\371\260", 3000, "\3270\222r\024-Gf*\352\204\271\305\315l\234\370\364\313\304\250N\267\321i_=5\370R-\302Oi\251\305\236\244\376\005\033\270\265\031\007\242\234\301\02166q\243\042\035\326j\224w\035\232J#m", 64 }, + { "\226 \316\360\363n\302\012\207I\3022\252\232\271\221", 16, "\213\316\027t\212l\242\354\014\304\376\344\377\352o\207\330\376\037?t/\214\316\017\027\363Y\010\017\027N\326\007\003\263\274\042\177\230z\264x\340\017\204\005\203\200}w8R\304|g", 3000, "x\330\300Nq\0371t=\326=O'i\0176\314k\351\301\335\134\372s\200\331\010\322\226e3N\016\341\251\3670QT\322\200\346\217\300\202w\010\253\242\342\272\024&|i\307\270[H\357\306Vu\004", 64 }, + { "ng,\206\357\313\353!`\263a\237\375\256\224s", 16, "\334\370\260\331\016\0355\342]/\207\227K\2323\256\003\004\314\256\020\020Wc\241\367!s\366\223\025\254\245\227`\335\226-<\375\367\010_p\2151*\204\2501\263\242r\324y\231>Ej\324\374\265\247+", 3000, "\233\241\316\316\335\307~\260\336\332\273\337\263yqH^\202\037\265\375\032\353\364\277\241\241\2456\325\3558\364\360ft\316\031F\350\300\026\026\264;\345{Ru\002~\027\340U\316\313\231\205\205p\3167\256*", 64 }, + { "]\340\304\315\250W\316\336J\263\231\002\216\251\364\242", 16, "\201\376\003\177\021\346\237\211\320\262\334k\320Hu\220r\357\237%\222\357\013\350\330\042{\210t\227\376\372\016\3707\340\230f\200\360\300u\312\034\220\376]ct\225\311\275\005z1\243l\373-\234\2154\317zZ\0306\312\2435\032C", 3000, "V\373\262\256p\232H\0424\034\215\015\273)\217\366\237\253\323R\226\256A\257\334\355\035\376\331=\251.T)OVJd0\005q#\356\346\012\223,\017\015S\227\007\034\010\026\370\271\233\267\030\010\357*\244", 64 }, + { "\021\225f`U!\334\331P\355\312\351-\032E)", 16, "+d'\210\235<\262\204", 4000, "'\276\227\331e\015\206\231\234\323\2578\306/\0338\007U8\354}%\310\265\335%O%\255\377\376Lo\303\350n0\353Zi\355\277\315l\010\252\366'G\272\263f\341\310N2V\346\334\257\214\333\002G", 64 }, + { "^\314\361\023\376q\261\003\245N\240\353\031\300\031I", 16, "\355^\377\321#:\253X@7\201\251\215\257&\310", 4000, "\266=p\000\366\231n\365r\310\011\266\315\357\242\011\333\237o\030k\364\341T\042E\332\313\255\227\246\251.^\372\012\317\222\355\244\2066\034\336\000\250\277x\000\315\002\373\263]\037b\350S\036\303\341X\002\335", 64 }, + { "\300&m\242\343a\326$\210e\200x\012\335\036Z", 16, "SG\363E\013\273\017VO\360a#J\220,\263\375\322\202\227\242;Pr", 4000, "\242\351.\17783>g\001<\034\004\030\002\312\345\270\021k\342\375\243/\342-\346\240\017\260bj\342e\206\225\134\367x\330\020/\363v\214\241\025\205lg\347$\275\300\315\205\021u-1\246SH\205$", 64 }, + { "\235QV\311\015\001\301Sd\204*\270o\026\177A", 16, "w\020\211E\315W\014\015\342\344j\251X\341\2528\354\371\336\214\260B\367)\264r\345r~\221k\255", 4000, "\3260\375\203\347\030\375\023\351t]\015=\301\267\303\035\204\2345cJ\2565\243\266G\211\333\024\311\320\2556\031\302\310\257\273{\340\274A\011\305\206\272\232\264\336\217\012)\375\036~q]\241\267\220[\203\330", 64 }, + { "\303g\3655f\271\332\250\306${\317S'\270U", 16, "\300RV\321<\333\2779\031\216\346/\305Dv\021\333a\374\344\303\355\370\0367\201\315\346]\242\375)\323=e\023\013\201\306 ", 4000, "@\253ur\230\326\344l!\004\026\352D\222,\021l\0316S\205-,\035\374#E\023q\034\312\0003?\234\000bs\334\011\011\204w\2558\356v\343\255y\260\023\320\305T\314\300K\232\000\013\352\305:", 64 }, + { "\366\307\305\200i\370k\246sc\035zh#`\035", 16, "\341@\032\010\373\0114'\275\204P\256\314\324>\030\266\343 \034jB\372\0124\255^\234\207\274\322\227\357\244VJ\273wq\326\224\373x\360\327k\3508", 4000, "\323u\002\267\022\271\274t\002\305B\017\015\366y`\256\201{w\017\240/\225p\356\036yj\277\277\242\243)$\244\333\272j\367\024\223>\021o\370Aq\343nV\237\031\234\350z\226\201\300\024\256\006Gh", 64 }, + { "\365\236\311\322\134\327\033F\230F\370_\217\221H\315", 16, "\214\207u\217\253\234Y\236\377\343qB\374\035\231b\267\266\314\226V\207T\367\352V\001jY<\337~q\203\345\265\230zB\2110\346U0\231\205\246\254\013\213\011\134\236\351YO", 4000, "\315\360d\246\273\364\265\217\210\306dnuA\004\347\022w\200\375\267\341\336\340\226jlc\354\205\310\316\251G\373\347\237Cee]O\351\237UN\236`\305\244W6al;#\336\377n\335(\337qO", 64 }, + { "\341\325\003\214aV\254\361\365\314\333y}\005\036p", 16, "\274\271\3200UV\327\273\263H\022\362@\322\300\362)SMQ\335'6}\017\255\332e\341=\377v}\024\012\316\233\324xJ\367\011\016\260[\260N\322\257\011\005h\273\237L\010C\263\3300\321C\365H", 4000, "\336=?\327\210\002\245G\275:Q\371\271\233\300\273v\274@\002\363\340A\305\372\272%\355\365\343\012\000a\204\276\243$|\237\223\221\240*\351\311\262\327\367U\000\316$G\224q\036\033\327\224\247\371rzY", 64 }, + { "E\352\312,\222$\365\267\303\016\331\276\345f\305\134", 16, "\01152\236\032\242H}L\263\334qk-9\013\006\356\357\251\372\026Tb\304\256\226#Ad\216\3024\333\264\240S\217:S\257\024\347\030\321\026\223\024f\301\261]\301\002\272\350\023M<\254\255A\270]Yh\251g\2235\206*", 4000, "\352\317\323\300\357w\365m\200D*\277\024\330\246H\207\347\257\211^\240\362\005\001D\237\310\332@T\243pB\247\025\236\204V\377\346u\242\203q\324\307\320\314\207\372\376\222\206m\134\037\365[\307,\240\377c", 64 }, + { "ho\014\234\352\310\134-\224\021\301\134\015d\356\351", 16, "'\256\217k~\376y\335", 5000, "_\341\264f\012\003\275\012It\363\322\301\032\342\337\331j$'\006\014!3\3029\313\200n\266\003\254@\236[\011\214XK\372\020\210\335\031\134\303\011\042-\004\365\003sn5\235NK\375\013`\022\336\025", 64 }, + { "4\020\304\323y$t\014\202P\251H\371\235|\035", 16, "\303\370Y \366f\325\317\352\030^\245\234\366\010u", 5000, "#W\033\270\241m\245%\357\270\243\340\211\271\263y*\341-\002\277I\332\227\042\271x\321\344\246\030x\252\233\326-s\302\334\327G:(!\315\220c\346\240\375\012@F8@\205\271Vx\321\202\024!}", 64 }, + { "\034.{\0068\255D\335\340\303m\273\356\223x\204", 16, "\247z\325\244A\337\245'5\373\351\336X\330\003\2576\243H\020s\226\266p", 5000, "\353\206?\351#+\346\206\330\225;ua\020\263\312p\024\2229\213h\015\336q\254\216P\256 \004}\001\355\230\214emU\323E\371g--\237\303\022'\016\033\355\274\267\271\351T\0327\300\306\253\031v", 64 }, + { "\015\363\324\364\323\220\323f\177rR&v\375\027U", 16, "C\020\362\262F\351H\240l\271\245_G\134\034mC}\277\354\017\377_Ab,l\322_6[v", 5000, "\370\357\015*{\001\221\310\244\235\134\214k\335\310%\274\226\3203o6\223\361\243\356\200\000\340\240\330~\225\266\004\224\254\211\276\270\202^\251P4\237\350^\036\3671MV\317\214\227\022\211\344\022\321\001\257}", 64 }, + { "\312\272\240\233x{\372:;\253\370\330\334#\267A", 16, "\323&\213|\016\3346>\224\345\032;R\233\0056\316:\037\315V?\221!h\0308\231\333\207\221k\035\222\252\014I\2215K", 5000, "\004\012\245\017y\316\355)\320\007\331\236c\324+\3771\247\257|\336C\332\331\317\037\007KG\321\334\235\237\265\301\360\315Im\212\260\012d\033DIb\042\260\025\304\311I6\2158\3527n[\032\347x\371", 64 }, + { "\215R\005M\032\350\240=\023x\0165\246\231$.", 16, "\021\272d\364Y\217\317\346\026\0161\327\214\001\357\335D\030\364OE\264\266\012\270\350c\276\340\327\254(\2638\361O\253\254!Lb\021\014S\234Z8Y", 5000, "_\3748\356H\220\264;\253\233\323\376\2548\235\004\357)\002\277#Gz\253\363j\026\015^\335\024#\211\002\354\207\373E\364\2513\344(f`\214\227\3319\031SIh\260\234\202\301\375\204\315 \002\347\376", 64 }, + { "\245\313\007\234\303h\224\215\356\243\352O\206,e\266", 16, "\031\033p\375\350W\006\004\213\313]3\214\257v\333\0357\016\375\364\021\344\305\323,;_\330E\224\351&N\244\026\275J\354\024\340\310'/(\012V\217\253P\361\236\273PMl", 5000, "v\276{&\342:\355Rm1\362\320E\344J?\015\023\323l\315\331\252\031\245\206\231\014\303\340\022\231\241\332qe\036\226qF\213\254\037^\220\042\324L\204\011q\277\233T\303\350o\217k[\327x2\346", 64 }, + { "\273E~\201\327n\340\231\001G\001\367l\206\021\030", 16, "<0=\371\010\317Aa\375\340\261\234F\275\251\236\024\310d\003\265^\345|\372-\223\305\235\272\344\350\271\3669-Q\264\312S\323 \236\343\352x\304)\341\334\355>j\024\251\377\252-\356\241.QW\256", 5000, "\307\241^1\271\302UOY$\250\372pd\343l\031\205\353\272s\004\311\002R\276\006\232I?\327\020\237[\363\012\2656-\361Z\177\025\210V\204ZF\351w|\206RqU\042T\205+\222Op\235\376", 64 }, + { "[\034\223\310a\210w\351\020J\351\263\240z\034\261", 16, "<\217A\265\347 \264\242\024\324:\011\370b\263\345R\012'\271.\005\350d\027\314\017\034\361W\316Tj\225n\1778Y\356'\012ie\307\342cF\266?M\300. \271\247`\042\344\272\371\013\273s\316\357X\207\304\357\013\322\315", 5000, "\241\224\024\317\303\227\241\317\332\351\301\3567j\326\320w)\275\223\234m\241{B\356\274P\274,\012|\235\367.E\345c ^Z\321\031\352I\042\005\365\264\360\245\357K;\306\202h\350\206fV1\000\325", 64 }, + { "5\265\376M\262\3518<\353of\232AA \374", 16, "WSKsW#\354W", 6000, "o\027\243%Q.\3759\331k\011R\363\367jK\234\357o\363\317\220|'\245\233l\250\001N\203\322\002Q\026\027H\267\253v.\351\242\220\257e=}\010/v!9\346\352\3749\2014q-\340N\376", 64 }, + { "\350\203\337\210]\367\213\335\270\213\232\026\221|,\370", 16, "\346\327\263\312\213\345\005\011'~\221\027\355\241J\231", 6000, "*\022\205kO\256\322\231(\361\367\342\277\266\220\000nj\330xh\340\215O\356d\210\225\303\2373\340\2130;\005\254S\3115R\257g\344\233\023\347\205\237\274M\307\367\327\364-W\246W\203\275\373\237\272", 64 }, + { "m\326\335]k)2U\200G\347\000\311\010\311\302", 16, "\340\250^(]nb\003\212\354b\177\344\011y\300P\016cl/0\016\213", 6000, "\273\333\252\306\015\232\306\321\251_]Y\006\042\345\350r\222\010\372\026\205Mg\373\347\267\014\234\032\016d\210i@n*aP\316s\366\206\200\004\015\017\034\325g\334OS\177\214\374\230\211eP\213rNp", 64 }, + { "f\323\354%,\247\330/\027\373\267@~\345\352\256", 16, "=\354\324\017\336\012\214\370\014Pd\217\317f\364\301a\207\032+\227\2247\201\317\215\333\020\276B&0", 6000, "\245+\223Y\302\363Wl\312\0344J\245)\347\217\027l\027\321\0121\341\365/\263\374t\330\262\210\220\250\354\240q\020^\033M\274\261\350Sp\325\254_\262\304\357U\031*\262$\363\371\030\036ay\200\242", 64 }, + { "|\035\377\326\376\2752^\335\207\230\271\341\326z*", 16, "P\271\315\034\230[z$j\377\266\015\205\3064h_\316\254\271\353\342\301*\366\366\350iV\004\351f}\260wr\257\236\025\241", 6000, "\301\354S\253]c\332 \277\205!Y\356v%\225\367c`gB\006\024\247t\314\300Q\323\225\020d\036\024A\353d\335\007\025\014\245?\252\246W\222w'\301\263\003M\014\300.\014\2420\011\355\342XA", 64 }, + { "\364;\377\002H\026A\016P\352\331g\2407[\261", 16, "p\271\243\3110\372w{O\317\315Q\035\371\221\016\236\215\002\222\317Z{\372\375X\316 8\226\270\024\344\373^>\235\274\320\337\313\366\223\246\336\250\134K", 6000, "\340Lv+w\360\311\322\355_\036@Hd\246\275\324\033\235\274\013RJr&zD\230\345\033\216\234\213\255\237[\217U\367\300\356\331\372\237\021)x\362\216\306/\351\374\314\210\2341h\227|\230,\336D", 64 }, + { "\134.\271\033\351\232P\020\356k\321X\351q\331\004", 16, "\277\207!\216\312\324\347\223\234\202\360\220}m\3773\210\232pe\020\254\371\334\266(\227\254?\305\017T5\020\210\223\006O\223\375\357!+\363\003\245.\325\255vF\350\3565s\221", 6000, "\352*\003U\323P\225\256\254\374\001\337\312\377[\134>\2306\270\001\217V\033\006<\243\265\012\355+\024&\374\313\031\254|\302\006\216\216\250wD\352\320\3128zf\000\205[P\323\013E{\025\353\276\316\034", 64 }, + { "\015\372\205\371:m\005T\000n\3255\366\220\2653", 16, "\266\234\036\134e\020:],5\005\201\331`S\305\224\017kW=@.\025\376\017\353\022\210\007#|M6\354\210\3121N\356\331\033\223\230\344\305sR\241\232p*t\217\366\243\352E\255\332\004\270\365\361", 6000, "qq\245\012\237#\004\316%\345a6\322\340\353\0344\265\013LH`\237A\232\337\357]\363\023[\353\2631\000\277\013\317\336\371\3125\312y\305`\236*]]\204\236\302\344e#L\270F\232\372\267\232\250", 64 }, + { "F\256\277\366N\234\235\316\042\230\263\256\025Q\320'", 16, "\200\254Yq.\205\373\373\0056\331\214\376C\235\277\323\350\261Rc<\177.<\326\237B\353\373\360\313\257\333^\212\303\023>\223\004\327Q\333\271\011I\303\230N\325N\0172vT\011\214\330a\260\216n\017\207xd\264\327\272f\276", 6000, "9\343\311g\224\222\221\275\256Mb\206nD\361\232L\327s\222P\005;\255\027\240\261R-M\231\347\315\3164\264\314F\347\245\372\247\247\303Q\341\241\271\003\035\207\303\304\335,\012\360?Y\320Y\227\376q", 64 }, + { "#\256)c\376QG\273\245\222Y\010\357x\221;", 16, "\315Ysi\036\266I\332", 7000, "Z\213\027\2367\231\205\005\224\300'\224>u*\372\031\003U\205\242e\223\274Q6F\362;?\022\327_\343!\214\276\262\247L\260MLX\247N*Y+\331\361\215\220l\331\213\361\335c\314\203.\330~", 64 }, + { "\360\343\200\367\344\250O\260\215`\247Z\341\274\346\270", 16, "\310\2524/j\334(\344\303\017Bs-\201\264\312", 7000, "\037$}\362F\213\254\306\345R\345i\326Z&\262Q\017\304\210\026\216\336#\220:A]\210[W\246\272\005\011z\337\036g\366\206)\245\201\214K\335#\212\205\350B\376h\034!\235\006M\272\256\225\257\220", 64 }, + { "<\230\261\363\334\357\217\022\276\000R\306\240\210Dg", 16, "FQ\263I\223\375\335\2135\006\374-1/\227\207S\341\202!\372\206\253\236", 7000, "\266|\263\374\266\265}\000\261eB\307;\233\241V\253C\014\224\230\012\326q\276\242>M\214[wt \361\361\205\303\311\320\355dV\245\242A\237MAt\237\340\242K\3133\355\357\034\303\200\0277\267U", 64 }, + { "\213.\310\205\014W\307\364sd\223u\363\035M\260", 16, "\331\007K\015\367D\224\016Q@\243a\264\342\346\216t\2161\030p\345{\227\245]\245\274\235{\322\245", 7000, "nX\013K/^l\377\237\3044\010\277\367\134.\222\215/\3471\023&:]!^\261\177g\272\011\177\374#2\177\326v\251\003\005\374\232z\030\274@\311\321n\323\227*\024H\225PA\241y(\276\361", 64 }, + { "`k\271x\304Cf\230\313;O\277\236\2448\207", 16, "r(\245\265\003\237kT\204@\321\252\202j\242\352\365\366FZZ:\366\272#\323\017\2666U\240v\252\236S\332\011\001\361p", 7000, "W\200\361\034j\376\022\254\325\205\257|\232\255w/0\373\267n~\355u_\331\007\242jXi\034E\254\032S\205\034/\023i\356\310\250\226\3517\201\311\360\237\201\221O\267w\355`\366\217\257\006z\357\321", 64 }, + { "bg\316Zg(\330\371\016:\011^\202\000\235f", 16, "_\177\346\022\375\256%\310\347m\336p`_J\333\334\003\312k\254X,Z\361\372\303#\305q;\343&XT\316`\006\036\215\306\207\327\311\255(\203/", 7000, "\313\000\3670T+\346TF\365[6\223rBb\241\267_\035\321y\315o\255\321\035\361\230\371\230\015\264\347y\364'\376-\240yL\036\260\265\234\265n.\217\312\261a\234\032\227\257\207a\331\354\010\263X", 64 }, + { "\350\026px{\014~\0317\015\314\231h\336\237\217", 16, "\347A\307^u\267Qc\027\235j\323\012\315\311\031\234\2003R'\015\221\370\030\227\003)h\214\236\012Qok\210`\320\227\307\354\303\305\317\314~|\014Z\012WA\036M\322I", 7000, "\227|\356\271\333\257\235G", 16, "\311\372\032x.?\3452L\331*\235\356\356\261sY\313\266\260\014\202\333\016\006\322j\3516\007U\377\215p\177s\267&\010\352\010A\361\315\357\0103k\220\311\042\250\267\022\312\030\034>\343\250\320\300\002\0123i\361\025~V\037\273\277\322\272sI\375m\375\337(\345*\220\362w\231\373\315y\230\273l3\017\226\260`", 64 }, + { ",<\361\027\343\375\355\265O\264\234[w5\261\340", 16, "dS:\242\350\2612,\314\224}\367\361kW\335+Gj\357Q\355\251i@\326r\024K\346\034B\340\360\242\356\016\272\216m\232u\220\300\236\333\312\363\036\241(\322&\244\211=\275\376\006.\377\013\034\220\020\306\353\274\374\042[\300", 7000, "\277\364m'[]\305CMd`\345G\237\352\371\225\215\373j>V\362\241!\364l\033<\236\364O\023\276?n\231\207\3735\201r\270\305\337\177'b\031\014\251\213\217mZ\320\266O\211\364&\0304x", 64 }, + { "\225\306\272{\341v\275 [\231\230\317\371\363Je", 16, "\343\036pA\252Q\264\242", 8000, "sJ\331\240\3206G\226\015\2441\370e\317\012u\356\372V>}\251l\1340\033U\177\215\316\317\037v\226\016\272O\275Z\341\307\370\317q\311\010\332\304\012a\375\343y\336ZT\377-2\361\203 \042\336", 64 }, + { "\320\231-\337g\034\212\004\342\037QU:X\277\316", 16, "\216k\037\361.T\244\366\003\010E\323U\233v\240", 8000, "\021\375\214G\326\017\316\350\013*\236-\013\026S\223\310,d\036L\311\032CM\006\0352\241\232\000\342\224\025x:\215S\2146wvh\205\306-[p2\003\322M\224\353\237\263/\216\134`Z8\273_", 64 }, + { "*/E\206\367\224\243\334\243\262r\326\360\231*H", 16, "\345\315t\032\021\207@\026\330=HF\320\204\304\330!\232Om\322\246\0260", 8000, "\200\306R\350\230V\334N\020\001Ol\242\024yN:\350\241\332\214\262\016\2629V\264(\2059\220\326b\340\303\020h\232gb\202ZCiR\275z\347+\326\267\027+A\246!\345\206k6\344\255\264*", 64 }, + { "S\345P\373\311\016\352\202\352`)Ecl\336\361", 16, "\376\007\354p2\333q\006\237q%\037\220/,\007\264\366\006-\335\273\235\377\036\345\035:\351\042k<", 8000, "\204\256G\244\332\302{GC\274\335x\200\216\001\232\211>\263\211\360\032\031\267\236\317\257\211\273\031u?.M\022\014\220!\202\225\310_VC)L\001\323\362\014\231\341\244\350\222\022\243\361t\364\357\316G\257", 64 }, + { "F\042a\201rU \373\374e\273\351=\364w\222", 16, "\212\030=]!}o\373VP\036\303\376/\373\322\025\222n\234\300Rl\264\010\2311(Y\275\232\3137\013i>\327\233)\207", 8000, "\233\276*\331\257\377\012\270|\212\272\2466cAh\225\024\334\2332\026\177\330'\006\210\210V\277\323\251\211\230\212\363W\2258y\224\236=9\337(]\010\3171N\342\016.Cjm\322Y\356\26574\207\332\355^\351f\0258\343\267w\361B", 64 }, + { "\305?\017\233\177\271m4\354\221@\216j\376%_", 16, "_,H\223\264<\314\342", 9000, "\236\314\367\273Z6(]M\214\215U\254\264\325Gb\24793\042l66\014g\317\342a\236\317\251\254CaS\326![\210\303\323\202\032f\014M\247\034w\225a\220\303\332\024L\317M\324\022\023\206\316", 64 }, + { "?0`\205\22034\220\217B\361\242\217+'\022", 16, "\177\315\237t\250\213S\313\337\265\337\371]l8\026", 9000, "\377n\327S\215\306\365\346\375Gj\247\245e\2004\343\202\221^_\275}\323\2345\302\007\333\337p\353\265\222\350t\227g\356\032\272G't\242r3V\276\362Lf\222\016\244Ez\200\315\247\370B|\372", 64 }, + { "\306$\211\276,\353}W.\355\274\330\215Ay\346", 16, "\330\362\015\255\012+e\264\241.\036#\377\327\001\011\205\254i;[P\223\363", 9000, "\204\003\342\235\365\213\361\303\3248_\324\346\330RpT4\235J\0106j\263\032\2113bjHj\233\332\365oA\222\247s;\250\247\017\377U\354-f\005\277p\377\345\345&ILO05\232R\325\311", 64 }, + { "\257\364\250\253\267\304/\330\357ch\230xu]1", 16, "\247\336\344\240\322\251G\223\222\225P\370\322\311/\204f}\253\222\252\363y\214\346\016x\262&N_\002", 9000, "\262\003\321\0362H\220\310\344\306\265\020\373\300T3\2652+\252g\275\225\224\036\357\2050B?\375E\273\232\344\024\310\344Zh\004(%@e)\264\202\2022iAZ\030\210\033r\346\211\332x\363\023\032", 64 }, + { "\340\000\323\220e,\371U\242\254f\245\272\337\001\357", 16, "\215\306\001}9&\307\2221d\253\212q\236\3316G\005|\015\042\012\361+\005w\270\367\211\332N\026\331\037\250\014\212d\330\246", 9000, "\260\342\217\247s\321\350A\016\221\371\222W\304&<`\312c#\366\002\225\241fJ\033\211F\252\300\251Z\313\225q\202\036w\253\264\277+\361\256\235\354\300\203g\334qz\310[\022\326\212\223\314H\247Wg", 64 }, + { "\025[\275\212\134\0013L[|\034k\356Q\321\267", 16, "#YZ\033(t\272\257\363\262\134\225y\206zF\234rB\266\221\254\367\310\042\264\270\236\026\372#v\354\213\265\372\221\304-i\020\042\0107\344\253\3678", 9000, "E\267\177\372_&\305\201\215\351\335\007irx\302U\037\252\012q4\201U\356%\366m\245\202\373bqh\244;\271z\372l\2516u\267\004\013\246z\274F\021\312E\177\2159|\037\033C\340\351\332\353", 64 }, + { "\312\016\206\247\361E\252\245\001\033\031\234\227\246L\332", 16, "^S8\353\353\0307\031}\012\247}o\352@\027\217\200s\220\206c\320`D\270\232\275#\361\223\210ur\361%\003\034\3607\255E\016\271p\336\274\260Q\027\0136r\246\025\263", 9000, "\202d\317\362\315$\311J\377+\037\244V\342.\336\363Mx^\347\202\206Vm:\363[\3353\324\316\3403\012\357\351\364\221TN\340\275ALC\033mC\224\225\274\000{n>i\327\006\221p\360:\020", 64 }, + { "I-\350\031\2302\352\226OO\234*?me\030", 16, "\004'\254\034\206\216\214\277\213/\235\237\007\312K\347\034\361?\376\327C64w\313\300\004Z\226\207\303\363\0066\377\375=\341\371\207Aq\247V\237\024T\246\200X\342]\005\356\337\273\023tq\226\032\021\202", 9000, "\367\317\013/\030\210_\377\013k\366C\234s\237\011\212\330!.\016\263@\353\017\007\034\345B\212s\204\371q\336;\334\032\313E\324>\326e\344\304v\205\004\342\000\343v\025\346ZO\2243Y\264\366Z{", 64 }, + { "\237\234O\246\003\264m\356\326\201\266\313\345\227j\324", 16, "\027\016\205\250\331\027\275\260Q\032'\204\373j<\233N\251v\234\346T\250\270n\017\244\225\275\340\354\346LJ\376\2779\2311\311\312P\335\036\323\202h\255\254\376\261\350kO\3324\277\266\223\207Q\263\373\351&\0030\247\330lL9", 9000, "r\036\301q\371B\034\017/H\010>\242\326\247F\353\014\333:)9\353\261c\003\177\223\3277\250Sm\263\306\316\261\341\321\321\134\232b\312\235\014@\336l\330\3356\001nw>\363\015\210O!*{Z", 64 }, + { "\227\346\344\330,\020\250\376\033v\253F\236\207\374\245C\230\255&\277\300\310M", 24, "\333\256\034\031\307s\315'", 100, "\267@0\237\025s\217\307\3646\231O\246za\000\340\233Q\254$\277/=)M\250\213i\245\275t\333\322U\256S\025\030<\200fFkO\2528Y\272\243:\033\315\304\313\237\017\356\255\274\357m\323\215", 64 }, + { "\3410\3103\201\025\037\366'2\340N\277\256q\345Gc\020\036kH\373w", 24, "\302\330?\225\200d\3510\335\346\211\317\324\365\366*", 100, "FN\014\374\031a\240\212\202H\314\016\371|{\025\267\243\353r\257\365{35\134q\252\205\357]\317,Y\350G\206\365Tuf9\356\267\365S\371\332+\245f\332\213\371\320\215\215\300\242\243\216F\361-", 64 }, + { "\265\001\263W\336\011\274\204=\356p6\210\000\216k\216k\203\365>W\275k", 24, "\270\342\331\242\013|j\306\324$X\035R\365\326\242\307\036Z\321\303\357hi", 100, "\005\301\361qhJ\263\253\2069O\003\242E\333Z\014\003\274\336f\322De(\376\024T\336\250\2111T\270\320>\366\266\311P\177\234\264(\015Vd\260+ De[\0301}gzZ/\263\263ma", 64 }, + { "C\347\306\033\005#\201X+OL\177\310\360:\207'L\316B\325\264\324\264", 24, "\021\357\353jzG\377\235V\012u\262'\256\354:\007\343A-'{Z\204\204\226\321GbTP\270", 100, "\200GB\211ui\244\352\343Sj\207|\250\213\035\010[\335\312\345k)&a\035\363\213\371\217\212\317\364\031{]\355\315E\222@n\026\375k\357\004\3505\025\226w<\134\226\324\326\254\345$\322l\302\247", 64 }, + { "\236\030\042\231=f\332wq\260\342\364o\372S\374t^\343\027\374\006\002\024", 24, "\344\273\215\371\325wt\273n\225\221\020\263\214~\226\266\237\226\323w\026\313\327\377\201\022\226\356.7`C\362jR\217,\362.", 100, "\235\361\025\375f\302\004\271\274\003\354w\027\001f\034\246\323HME~<%\303I\037 \266\042\335PY\306\134<]\364\377\026\254d^a\327\275\012\134\223\027\265\277\177\035W\3347,d\362\250`\006\342", 64 }, + { "\035x\237%7I1\271N\370\236\340\214p\331\367@\355o\134\256\032\355\243", 24, "3w\231\014p'd\220\317\366[Kz\241\271\010\200u\225.E\277\313q\262\341\313\031\271\205\016\024\3616\021\345\030\254\367\314\312] \026\211\273fs", 100, "-\300\221\205rc1\013\374\370_xC\315\013Y\21477\320\202m(\345(%:\260\232\304\004\263\303\275\304\317D\376\245\331K\310\027\343\322\221q\200.Kp\206\311\231\306!a\240\203\324^)%\026", 64 }, + { "\023\366\263t\006\015l\264\316Gq\271\3468j\220\271\232\361\223tW\224\020", 24, "\365\367`yT7jO\360\247/;-K\241\031\227\034\211\251[\236S\015\035P\304\256\342E!q\205WJ\207\373\016\006\355`\235\367[~\300\264'\232\200u\241\234\210io", 100, "\271\034\330\262\216K\312\224\375\206\243\341{\372}\232\210R2H\032n\264\377J\021*\263\022\240\277i\242\356GS\302\243b\230@\034<\261\276\025\016\340EIt$;\347\221\024W\311\275R\254\272A\037", 64 }, + { "\373Oc{\307\313=\3414>\340\016\245\217jar]\035\307\252\010\031\025", 24, "kk\262\256\340\255Z\310\235\020\320_\032\345\260\243\352\202\321\301\246s\300)\3314FJ\267\361b\237\034*BrjY=z\336\300\344\370\371\035\227\334[5*\325\3152\233Z\022\302\3733Wr\012\005", 100, "\246\372\3420\204\346\034\314$wZT/\240\376d\252\354?\331y\225\037\252\374Ah.\304\3737\242\013K\351\035tH(\255\353\240\214\304\350\245s\273\326\265\340\300\253,\022/\311\223\024\3369\002{V", 64 }, + { "\201\012\000\332_\206`\206GD\336\346Gm\227j>\301Y\333\2658\354\001", 24, "\361\321\374qZ\346\016\307Xm(a\256\301\002\245\352\216\244/ca\247,\315V\017+H\004\355wmR\225Upz\373\217\333\206\337>\257\313\275\307\260\342PS\013\260\356\377\322\267e\027\250\030\262B\012\346Q\260\025C\311\317", 100, "\254\012\230\016\257A\017\210\264Z&\234\320\375BRb?\266\012\2509\222\355UgM\322Y^\321b\225\243\353\374\374\224\2545$q\030\030\370\332M\302\350\014F\023p\033\201\316\004\000\270b\016!)$", 64 }, + { "n( \210$O\004\366\207T\3158\361!\212\3606\317<\330G\250\260\272", 24, "\204+\330\321\244\030h\275", 200, "\353Ko\207&\357t\224\036\266ob\222)Cz\360#p\020E\357k\320\370\007R\375\311'\347\007\364p\340\341\275\220\341\260\032\316]-Rthu\206\202\255QY\251.\214\245\330\007\312\354@\375\204", 64 }, + { "'\273`n\012l\345{r4\347\264\223\376LW\311\363P_h\302\001C", 24, "\324\200pH\263\220\2615\305\341\371Gp:\323\322", 200, "\205-\343\243<\333\375na\337\314\271J\354S\300D7\011J\364\023?\2222\360\267\221\010Fr\256\366{\366\235\255\331K 1\370\307V\373\020o\363\367\036\226\004\246G\331o\321%\314\220\254\234\317\033", 64 }, + { "\345/\334G\221\360\212(\211i\247\012\215\223h(P\366\215\371\300w\336\274", 24, "o\341\236\363w\371x\217Y)\013\331\006\034\222\007\221oA\022\037\332\252-", 200, "os\235_H\326N\300\244\310\361o0\202j4\334YO \345#:/\227\042=$@\363h\212\365\376\277\34220\301\371\373\250\327\201\374\012!)_\001\346Y\2061\220\302e\323\004E\364\025\334Q", 64 }, + { "|fm*#\220r\246\343f\364\364\241\370P\313\315}\216x\303,\335w", 24, "\342\177\034\326\226\223Oo\035\214\227\361\305\316\314\307\323\223\353\271\303_\213^\337\017\204C\316\037t\345", 200, "\2571!\373\364\361]\225\332K\267\042\317\314\030\2360.\257\037H\215E\276I,\356\033\13411\267\335>;\226\254g\2532\024\323t\024\237\275\014\021\267\251\004\004\331o\305\036\256\221\234\242\210[\273\271", 64 }, + { "\315\3742x\230\331D\375G\256R\363g\316 \024Q\034\317C\271X\240K", 24, "<3~d\026V9\2178\224\202\324U\335\006%\270=\225^\001l\212\212UC\277\270\233r\211lR\300\275\223\275\300\346J", 200, "`[\366\233Zk==\042\033\211\322-r\354e6D\210\302\275\247\274\374\0266\203d\234\315\331\244\2671\226\014\336\243\350\216^\206\255\242\023ueK\017%CN\002t\300N\244\272?/s\243\200\327", 64 }, + { "v\313\001I\364\011(l\005=7\330\0012\000C@w\317\206\230\306\363\000", 24, " \300\300\271\3443iMC\254\301*%S\325\211\212Rw\350\3027N\233\237\334\3134\204\332\031HS\374\3749\214 \3503FN\367\002\030\312\351D", 200, "S\007a\011\031\231\366\371g\003@\3407\024\016\376yl\373M ksH\327=6\210Y\225Q\325(\2348\334\362E/w#\375\354qY5\324\356F\212\232:\033\231\306\235\302\321\330y\226\005\260X", 64 }, + { "\335\002\277\030F@\273\340E\000\300\304\372\322n\230\262\354\032\250/*\351\230", 24, "\270\207\0010\377\337\347\375\213\331q\315\033\371\253\012n\275\262D\267\226G\367\371P\213*xA!\364!J\342\2113\242\321:\205\203hF\015\315D\026\313\353[`\213`\374j", 200, "3\301\365]\214s%u\230\234\215e\331<.\347<\320T/\254\351\243huF\003dA\341\342\372\206\243\005\277\257\033\364\042[\200Y\326\017@\015\271R\225\035\330z\37523*\313\3347\027\226\325\355", 64 }, + { "C\325RQ/\246$:h\177\362\331\223\261\312\006\237%\326zY\375\033\341", 24, "\002d\2740-\177h\221\356\310\211B\036K/H\335\336X\326\324\3304\251D\365\377\234\220\375\325,`\003O?\340\276=1\246+\231\336\233\211\272\265\257K\036\316\333\204\223g\035\336s\347h\230\270f", 200, "[\037\344w\257\272\235\230\032\270\263xh\361\014\273\350:\273\201Z[\314W\254\224\222\364;z\303\372D:\022a\366\266\364U\3467\314\337\357\246su\014FO\240\030:\325\362ZA\363`\362\005q!", 64 }, + { "=e\0029fU\375,?\262\327\273+f\013\263\201\021\027N\026y\341\340", 24, "\312\204\344\332=f\0336\341\017\264#j\216\206\236k\022Z`B\242\355'Y\016\267h?F\270\213B0\245;\367f\363\246J\012\200\330y\230\200}\347$\243\343\216\032\037\006\271\214\322X\255\256\032\276\021%\263aM\264\252G", 200, "H)\352\343\007'}5\333\013:e\354\225zG\271\032\340~\262\351\261\177\004\227~\333I\363\301u\210S\252\231\340+R\271\336\317\027\354\351\364<\276\220\042a\373\320en\370\001\301\305\356\344\244\236,", 64 }, + { "\376\374`\300n\003\362\372\017\2253-\307\232\264a\351F\247\002\011\270\336\311", 24, "\023\265B\220\374\244\304\323", 300, "{\346'N\227\254\343\334b\323\220\316&\335\375\227\013\314K\214~E\374$n.Mi\337\223\326L\361\342\237\242\257D\207'#\237\373.\2729\363\005\003O\216\011\005$\261O\214\343\275(X\336]\317", 64 }, + { "\177\337\370\037J\313\252R\367\027-\303\274\322?(]\370\017_?\010\360a", 24, "~hCg\251\003\302}\372\2644,v\264q\251", 300, "\003\253\302X\215\255\034\206\337\272\327Z}\206\000\333\311\026\377T\336\347\315\341>\210gsS*\276@3(T\340\263#\325\327\335\027~\310\201;C\2723?\042\341R\346\247\273\355\344\002\300\341\314\245\345", 64 }, + { "mD\363\333\332\276\206\023\340y\331\010\326\322\331vHX\265:\277\042\350_", 24, "w\011\263\376{\016R3\025\013<\033\261\320\024\017\356)\371\235c\021\353\262", 300, "\304\010\302K\273#u\237\227\3135^\134\2743z\326F\265=}0#m\240@\303\020\356\373\042Xl\223^)\242\031\374\215\031T\316\020\203\255\273$\024\034h1\370\270;\276\277P\250k\252\352\232\371", 64 }, + { "Z\2556U\206\026\34258E\247BT\276%L\367\0119r\032\233L\272", 24, "8@\034\305j[D\015A\317!\227jgy\313D\315ZIu\367\266{@]\335\311}\351dC", 300, "\022\23418\340\022\235\005\024\016\010m\217\370\271\262\307z\325\003\237:a\216\255w\023y=#fx\323k\346\215\331\275\206YGw_\261\353\007", 64 }, + { "\247\005\202\025\315\206zP\360\241\134\036C<-\006\327\363\201q\251\002`\267", 24, "\271]\336\352\244%\215\020\330\3458\377\225\350\302\237\253\033\202\367\265\373\331\261o\250\031Q\374q\217\254\233o\230\375\236\327\333f", 300, " ~\303\251\370\211U\337,\237Ln}E\320.k\245\246i\234\202r\314\324MU\365\377v\3177\266nXT\002%\346<;\350\3354\262\330\275\303W\242\014\024UN\274Hd\210 W\244\222Fv", 64 }, + { "%\312/\275\212\305\002\376\340\362\311b\224\3203\012\317R\370]\336\204\260>", 24, "\343';\334\363\247E\332\354\203kj\3654>+_E\310\353~xO\202n\234\217\227\360\371\261\343\314E\331-\210\203\032]\177;)$~\333\367\313", 300, "\2553\037\301\022E\356\010\274\241\216\332\333\037!9X\374z\314\306T\345\274'Z\256\375\036\355HL\337Dw\276\235D\225\213\304\214\350\250\031\316\200B\317\320:\0253\233\233\025n\264\016Y\271\242\035\316", 64 }, + { "\273o\033\015`\0168\005\343\233[\262$q\314\315\246\011\036(\233\203\211'", 24, "Qsa\3029\213*\321F\261}\270\357\330\030\200\335\375'\261cT$\2101\303\035\253\024\267\240\246\377&\316\357\331\221\361nl\0327B\015[\332h\333\376\351\0258\232\203\321", 300, "\260<4h\346\217Q\237=\376N\213\261R\257\374@!&\300\311\027\263\346'\230\377\224\134\225\237\002vQu\006\033y\036D\357T\362\316\311.\321\271\207r8\304\035T\226\233\326\345,\327\361W\217\364", 64 }, + { "-\207,\240\261txU\001\360Q\213R3\332\236\037_7\016H\261d,", 24, ",U^\351\036\003\300?0&+'`\363\252j\202\270V\375\007\355DR^\032\011\237}B\304\031\267.[\266J\273]\325y\335\327\2555\201m\233\254\352A\315\214\337\022Q\270\330\367?\363A\021f", 300, "\220\326\330u\2268\305\223\255\2359\332\203\273F\203I~\012\232g\001\355jb\224\212\226\032\277\036z\326\0361\265\025[N\226\261$f\216\311\236X:.\366\036_\020:\247\004d\276_\276\237`\323=", 64 }, + { "\276\035\274eI\033\356\262M3\021I\315\006j\241T\025\216\342\246\223\035}", 24, "1\316\345\252\312\377\027_\302v+.\276[\002j\006\266\233\037\265UR\023\255\244o\263\333\276+\264s\336\304f'\250\377\003\300\006\320\006B\375\205\300\332\341p\241\223\254\024j\274\231\024:\003\276\233\232\006\011\201\220\356\257\257\361", 300, "\271\353O+ C\226\325Qu\362\201Cb\304)\014\367\001\376\243\027\360U\273\356Y\235\234\357\243\002a\210\324\017`\304F\317;\022\014\021Y\375?\356\343\253\306\371\006\330fdD\333O6\042\203\214\354", 64 }, + { "\342$\336\336[\306\001\033/\216\277\201\367\014\257\362\331\320\374\036\034\361\371N", 24, "\220F\317Y\0232\2022", 400, "\351\321\325*\035\023\026\377\273d.\016s\225\276\321.\330u\014V+\331Z\223\365\034\371\377\236^\203\213\240\375\220/\313P\024WS\331\034\251\347\220ux\231[$\334:x\014|\344\010\233U)\276\344", 64 }, + { "D\255;\367\374\305_\373\372\020$\201\275\3735p`S\330\333\246\271\316)", 24, "\300M\273:\024\362\017\002\247j\376#8\321\260\346", 400, "rW\235\326[\326(\001\223\221\340\316\006z Z$\217\321\372\3722\277\024\334\025I\252\374\134\232\342!\2111\351\323}^\324\217L\032\350n1\372>\311\001\323\3239\321\345i\262\323\013\014\262j \336", 64 }, + { "\200q\243(\134z\361\042cG\335'v\231\025X:\016\316\0170\342hH", 24, "!8\347\001?\220\313\251\3042\306\201\004l\012\356.\177\367~e\305\3269", 400, "\371\230\253b7m\177\266\325\344\350\375>!D\246b", 24, "\314\354\361@\255\027O\232\037\322w\032\316\356i\023\333\331\342n-\301Q\002\244\2328z\026\304$\372\366\260cc\310_S\236\241\237\304\212[\022'\365\226e\016_X\303\323\005'\374\010}O\336\242\321", 400, "\273\265\023\023\343\261\201\026t\300\270#E\336\012I8\300\271\011\016`\234\326\2417\015\311t\012\322\341\355T\335\254\217L\243\253\211\364\234d\222-\344\203\027o\342y1\305\266\261$\316\376\364\220\317I\267", 64 }, + { "\275\272\371\314\250`\370\331\324d(\227\364e\203!\014\322m\254kH\012\354", 24, "\2617\007\347\243\255u9\320\226\035d\341\311\344L\272\352\023\256\361\332\364\2700\014\247\331s]\234\223\223\210/\273V\364\335\015\032\267\357_\001q\310\367\260E\374!E\335\200\337\316sQ\205\023\240M\355\267\250\020{\207\254\231i", 400, "R\300\302\270\242\312\331\300\376P\201\353\0128\370\241o\233\316\260\030\222\303\322)\376\017>\007\011\005\222JPb\361\233\340)\036\352\242\035*>\373R\020\203\355\340\000\0212K8\311\240\266\134\347\351\216\326", 64 }, + { "\330\2011\262\366s\232\025\317~\260\312\237+J\202\020t?\134l\207\310\304", 24, "cE\245\266X\315\3545", 500, "\315\247\030\277\337=T\214\254\331&\364\374\030\246\000]\220\345\274\373k\243O\0234\006\210\2606\031\360y\205\226\221\212I\341\006\216M\206K\211\342\314s\343\327\316\353A]}z@b\0053\202\212R[", 64 }, + { "\250+>b\307\310\001\233\331\261o\360>\206\2733Dp\340y\017\372V\023", 24, "E\241\134\345\365\327\016\336D,\217\032\022E\233\262", 500, "O5\263\352\317g89k\247\351\020/\037\3033\370T7\304\256o\216\337\227\321\225\254hH\211G\316\224j^c\271?\340\036\003\177\001\205Y\303a3\376f \021\211\344q\362\255Q\341\264\244u\321", 64 }, + { "\2153$\257\243\042\257\230\3443\276Y\275\000\354^\363\317\342#\343\272~?", 24, ")\246LD\006}w(\243\307w\260\336\241\024w{O\237/\236\004\230\016", 500, "\304\373j\036\0062\302._\327q\002\302 \023~\367\007.TC,\206\177DX\275Y]\224\366\232\212\001U\207z\305\233\317\320\203\3543\353s\374\012\272q`]\333W\305\250E\336VG\223\343I\257", 64 }, + { "\224\302\305\230\315\313\231\243pxO_\014\374\342\256\237\231\356\330\215:\260S", 24, "\310D\2217\341\363\362\243&@$\221\340\320\266\213\236`LOy:'\300\244\314\212\302^Q\373\376", 500, "i\311\241\337\357s\333\356P+\023'\330\310\273\205D\354\233\343\310\306;\037\213N6\230\006\273\261H\272X\243\367\341t\234\035\263\2034{\203p\034\371gY\265^_\010\267\321~\272\34364\227\322\027", 64 }, + { "m#\277k\323P\307\256\351\316\020\370d\202\377\023P~l\024\201p\033\015", 24, "\366g\225\335\215\223\322\241\007\333\007Y\275\343\330\267\346\003\006\306q\332\317\355\355\377\373}\303i\3322\262\322\221\226\217\305\027\354", 500, "\351\011\202M\306\035&\257KE\357\361\3644\243^\272\346\024\375\267gK4\010y\013\021\361o\253\025\2719\267yk\374\261 [\010\036\360yP\311\351v\0252\236\270i\217\356\022\006\214\224k@L\343", 64 }, + { "\264\276S\014\276;\012]s|\330\273\223+\222\230\004j-\035u\260\336\364", 24, "\177\010jO\370\237\274\370J\333u\240\013\255\374\3621\342\013\240H\374l\372\225\016\266Vy\315\371\030*\024\231\302pLl\234\336\255\271T\001V\254\263", 500, "\225$\317\031\226?\314Cy\201\035-@<\030\252\205\014\245\231\277\271\013\317\375\260", 64 }, + { ".\373qW\226\272\303\354\235\374\302\320h\345\357\034\014\250\344\266\244\325\244\270", 24, "\240/%\223\314\333\316\363\361\034q\245\312\134]\254\263\267\255f\225\217\313\313!ax\035\273\264\272_\027\037\323c\253\271\372\246\013\361\305\364\014\016@-\310\361\233Tc(\015\014", 500, "\010\250\337\244J\255\022/\001\035M\334\2426i\327\255\012i\333\217Y4\250uG\007D\225:\276\344|\027(\311\302\307\321!!A\003\343y\202\247\267\253R\032\312Y\243\134\007\252\321\236\251\364\307\342\366", 64 }, + { "3\244\330\322\257\350\201\244$\032V\270\032\236T:YU\211U\265\327\262\355", 24, "\227o]\354 ;iq\224\345\203Z\231L9+\374\316\265\226\226{\375\377\204\007\223\274\273RH\244\134\243\224A\337W-k\362\372\317'\207\023\272\361\347\015\3371\344\334\226\277\215\277\237\351O\307\362}", 500, "I^J\373\327{\005\200L\373\304\022M\022\250J\253Iu`\345;/\023\325\362\001\032\367{B\017\366_\034a\257x\000\025}tA\347\332]#_\260\023\211{\301\310/@.&\272-\005\323\262\355", 64 }, + { "\343~<_Kd\253{\262\357W95\256\337n\325\336\357\257\260-\227\011", 24, "\251\014\025\254\015\257!\326\256@1\225Ay\027\311\313\204'#\230\306\254\036\324p\221e>\230{\373ZP\236\025\025\3610\001\313\002\275\315\204\263\332\315\342\003-\326\356\216[+\270g\255p%\224O\306\365\241H\262\001q\231\346", 500, "\307\204\357\347\320l\0328\015\373G\336\271\322h\326\034\245\301,G\215Jf\031\177\355fhtW\034g\266\316V\034\222\042\346U\253Ac\036\304g$1\004\244\245VP=41\313\200\272FJe\374", 64 }, + { ".\246\322\250\363\276\370\266\342\207\226\210p\366P\025FM\371\232\203*\036\303", 24, "m\221\370\307\016\020\374\317", 600, "\252D\266\320\035\2649\007=\003\326\355p\332;\021\277\360\200\255\033\313w\366}\201a\325\377A\033\365\321\320S\357G\241e\344\375)\0303E;\256\017 \031'\223\204\2630\027\253\225\354\305T\366\360\005", 64 }, + { "\277\010D\025\241\325\032%\235\032y2A;H\020\214\333\306\356j$", 64 }, + { "\002\261>m$`\016\02494\263\307\353\263\252r\006\356x\223\215\321\236\037", 24, ".\222M\266\201\371\370\375\214\134\223)\242\011\371\225\365Y\203*\365\275\252\037\262\315\024;\032\256SuK\275hn\231\233HN", 600, "q\223\223]O\3412\371D\304\246Z\277P\267\307\247\327\213\036$\223\234Q\021e\332u\004\240\254\316_\012\036!\230\213\233~=\233Ay/\313\010\204\207\220\312j*\016\324\347\042=\017\217Qn4\302", 64 }, + { "\216i\036Z\247\365\202\373\255\243\035o\301\221\013\3434*r\347\214\002\342T", 24, "F-\311\364o3?M\260\205\340:)\302.>#\203O\340\245@6\375\356\313X\267\302c0\014\325\261{\013\267\253\277\027W\254\004a\353\350\255b", 600, "Uq\242\257\354/\372\365\027\376\020\267#S\277\237\300\314t\021\234\370\034\320\206-\357T\272\370\204r\002ZAsX\356j}\012\2259\247\231\211<6-\372\027V8ZM]\200\2344\227\276q\033\322", 64 }, + { "g,R\261\255\355\242\315\344\302\207\312\216\326$&\246\352\351\004\230\372\357\342", 24, "\011\237\227\033\026b\224\320Z\340\2019r\220\367\304m\256%&&\3424zt!CY F\014\347\345v\255\230Se\372\021\242\203YH\277\262\213\301\327\267\314\036\205\0020$", 600, "\020*\217~@\030\030z\241\300Cf\230\362\037\343r\203\344A\304Z\223\2310\331X\377\365k\237\245'l\223\024\012`\345*\324?\310L\344!\270\340>\001 aL\220\001\221KD\235n9\333\362\227", 64 }, + { "-^[\305D\215\276\210\007\255\365\315\023\340\343\011\212_\340?\215(\221|", 24, "'(\221\177\261K\003\247;*\201=\251?\240\345\026U\225\252\355lg\342\310\021-\006\004\270-\256\340&\007e\304\042;]K\306b ;h\222d\353\277\030\332}\355\030\001\347o\375a:#\207\232", 600, "\213{K\321\232\301\253\312\037\324\340\2454\262\376J\335\210J\235\252\220\370-\004\042\134C\316\025\275Te\250\333\212\227\324\035\006\244c\273\004Mq2\276\373\005w'\212f\266u\010\320(\361\332\217W\000", 64 }, + { "E\223\025>\255\312\337\310X\234\377\032\243\275\366\347~QmZ\027\013\257l", 24, "\202\021:\372K\001\252\250\363`\260Lk\255\042^|m\312\370\200,Gv'\255\024\022<\357\346\002\016b\252\315,\303\374\247\326\324\352\254\322\250L\306;\315\311\374\264\042z\354\256\304\021BD\231%\236s\321n\236\251\022\006\262", 600, "T\024\252$\261\307\0362\033@Y92dA\366\341\204\33236\265\357\205\232\266\027oI\245J\272\233O\215\317\302\246\374Ko\204\270z\356\236\042\315\360\312l\231{\274\026\225\221\345\377\343MG\321\320", 64 }, + { "ew\357\210D\321\347\2421\315\323\264_\036\253\332^\253\325\271I\211\212\250", 24, "h5\202`\361F\354\312", 700, "o\325\241\254!\217\211\331~e\346{\211Z5\371+\353\334\134\034\207\213\243\270I\334\317S\312X\344\326y\217f\261\021\243\223\251\015h\022C\303\026\036\222E,\203\366G\362Sy`\3241\3205\262\265", 64 }, + { "\275\247\376Y\223o+\2440\255\024e\351\324_\203\206\326t\333\134\332J7", 24, "trXoC\241\333\350\3415x\210\356\307]\243", 700, "gyBJl\234\206\356:\023K\310gd\312\200\346\320\2479V\272\340\000\024J\316\362PI\271\263\202\022Yhs\302L1\234\037\267\200\312\3641\0171\265\217\215\205S6\243\222\300d5x9\306\275", 64 }, + { "\001\024\003\337\276\355UDd\202\271\302\262m\021\205b\021\234\3108\220\226\343", 24, "<\015&\212c@\264\015n4z\261\252>\355\025\231\363C\224\311n\313-", 700, "g\2301\253WQM\014\240kG#\037t\014gaF\007\234\317:\261|C=\344+\252)~*Pr_\037\376\013y,\377\376\344\2419\266J\227\260\2123\225s\344s\224(\204\024\344@\001c\255", 64 }, + { ">\030*\353\341\240\203\312r\031t\260\265\012\345\331\354\016\014}\306SI\351", 24, "Z\020\013K\254\006\0164\347J\264)O0^a\025T_(\243\025p\261\210j\203\260\233\026\263\360", 700, "\223\3078V\010{G\373\301\030Ea\340\335\315\251\237\257W&B@\022+yHu\2165Y\377p2\344\003\340\341\326f\134\262\267\253\037\300d\312\030t\030\324\211\032Y\255\257T\237K\332\220\310\307P", 64 }, + { "\374\310\024\302\321W\213\250C\252\275\336\024\341i''\022\373xg\007\247x", 24, "\3404>\007'\303\215\331\2719\357\362\010\2146Nf,\272\304Hd\226%\251\2659\252\336\224@\355\357W\024\322\265\341\355\226", 700, "\273\207\247\374n\350\247\030\2469m\313-'\204\200h\022\356\320\341\302\001%ON\343\244\316\227W\212\3252\317\234\366\275,\033\261}\325\350\341\207\203\306y\010\034{%z]r\350\206\201{\017\330|\031", 64 }, + { "\240+\274h}\2040K(f\267\320\015\265CC\337\226\200\335\032E2[", 24, "\240\266\274n\2077\260C\005\223\036\004\011]\322q^*3\276\235\226\320\027=\344$M^\227N\370\022\234\313\007Wk\366.\205\016\365\350\200\020\217E", 700, "\212\232\234:U\323\302L(\362\221\016[\270\266\001v3\253\225\340t{\016\226|EC2Jx\377\264hn6\331\266\014W\245\233\277m\020\353\245\023\221\016H\000|c\307\362P\027)5\323\0230\344", 64 }, + { "\030\307\267{\345\270MM\201\325\330:O\224f\313\005\311\325\310\210tJa\022\002\010\374\335S/\247\253\270\010-\205f\257?\330\234\032", 24, "\335I!\203\271D\364\336OF\220\225]! \362\013%Bsp\326\341\343\360K\267\267\367L\354\370@\371\035\227\225\360Z\205mx\276\371F\247P\344.\223\264\221x}\322\225!\346\350\256\2742\253\265C\367\377\022\036;\017P", 700, "(\036gv\030n\0139/\250P\272\313\230\351\226\211\363\237\312Y\037\272\311\265=\351\343\305\374_\246\235A\264YD\304\334\202K>\037\274\336)\301%\366\242\246D\324\134A\303\2414\276*\031Y\376\357", 64 }, + { "#\0427\244K\257\006l\005*\256m~8+\317\373\325x`\224.\320\221", 24, "\261f\203\226F\362\245\334", 800, "\267c\357A}cz\243\206\233+\230\256=\203\034H\007[\32169\375\366\322J=hG\336o60\336{\244\037\2775\326\243\213\320)\337\003\370\323Q\232\242A\306ZRT\016\242\242\350\372\015\220\260", 64 }, + { "\347\377\324\375\314\303n\375%,\010\336{\375\3320\227\344\2662\0024\325\365", 24, "\361\311\366\227\314\275\335}\213\1773o\371\231\357K", 800, "\273\267\010\210e`\307P\264k\012\345K\247\362\367\033\310=\000\225\035V\220\312\213X\314\341\273|9\325\275\304\241m\012EI\271\302\2747\331A~\177\032#\233\376\353]N\301\365^Mh\272.+\260", 64 }, + { "\357\2528\231\262a\032ZJm\3157\260\331<[\232\27441\372\310\267\036", 24, "l\001\255\324\355\0220\246E\206G-~-\333\004\331Y\026\363\303R\010\324", 800, "\246\354\213\206<\223h\204\367\333W\021!2G\376\014:\373\013\327m\225\227\336\250\342\221\310\321\363\253z\354\022uk\342\177\302\213F\3758\021\341mgESmN\257\356\014\276\344ju\372\332\361\014\011", 64 }, + { "u\267\0421[S\023km]\353\002\364\331~J\3503\376Ay\335L\012", 24, "\352\204\321\301fO\005\370g\003m\307\304\344\354:\030\244\216\215\026\331\262\2267\223\3655qX\252x", 800, "\011\254b\343o*\216\240Dp\215\015A!.E0", 800, "\375\240\241\236\314\214\274}\266\250\225p\024zo\012\354\220\377#_\210\001\301\343KG2\362\312B\335\331\304L\224\205\267o\320E\305\233G\021\031\2726iE\267\257E\217\310\313\247\312\232\200p`\266\375", 64 }, + { "\255\032\237A_\223m\000!7E\226\354wSZ \375\207\316\2177d\031", 24, "\324\234\005\333;6(\316k9\134\271r_\035p%\350Rm6\2418\025\204vv\212b$\321\027\314\250_\3478\233y\303\301\370\016\200\301IZ\316", 800, "\316\312\267%f\212!y0\237 \243\207\371\274\321\134\274!\327\362\004\014\210D\250\232\307PbslaL:\252\262\201#\315<\220\232\275\273\246G\311\333/\032p;D\253\235\2401b\016\224\215\134\341", 64 }, + { "z\006\205PE\271u\361w$g\362u'\134\013\240U\303\0055\305!U", 24, "\0279\275\233\304 \031Fb\231\224\204\276\203\021\011kM@\341\223\236+ \262q\337\212\376\222\3471\243\3615\333\247\340`7\004\3137'\263\231\302\327\3253\353\326VP[\263", 800, "\011\253 \313\264\371\333\363\017o3(F\001\234\207\243\263\376G)Y>x\271\332`\270!\250I\375V\300$\000C\206}v\345{\247\257\314\276\017*\365%\332\374\242\242\343\271\243\210D\200{+\254;", 64 }, + { "\367\212\237\347\371`\021\024\317\363m\366\226P\240\271~\353l\015\204[\350\306", 24, "B\343\221\021\345\275\004\353ZB\274\223t7\313:\233\255\233\363\361\351\014\315\314\325\343^\370\301S\012\212\317>%\022\023\210\352<2(\224\311\312\027\232\327:\227\214\230\363\023\037\337.\024\010\372\317h\023", 800, "\327\304K\020\214\277B\366\002\330C:n\353t\334fXe\351P\033\032\311M+`\320/r\265!\301B\231\350`\001\013\311c?\220\333\326\202\216\243\365\245^\245j\377\372\210\307\272\303\342\216\370\210\355", 64 }, + { "\212\264Q\307\376[/\236\013n\346\243\030\322\026\321\205\216\324\214\360=\370}", 24, "\202e\341xV\033\272\236\340\342\216:\016\2516y2G\267D\211\375!\247I\342\021\277b\031P*\207\035P\205\244\235\311\310_2\346\023\354T\004\304\327.\332TR\312\346\034\212\302\251\134\005\310\016\004\200\257L|\205c\303\205", 800, "\220\242\272\200\024,\341E\312\361`\270\304\345\016\037\273\273\341\301\134\224\316\032\003\324$(\316\234o<\250\263?6\351\024\312\042d\373\366\320\036Pa\015'nX\213\033:\313N{i\134/s$=@", 64 }, + { "\274\322\370Z\025\306%\003\310\201(b\362P\000g\264\011\212\340{3\244\236", 24, "\256e\007,5\002=\262", 900, "\005\001w|\222\320\330\021\015P\305/k\244+(\002\366\277\207\243a\302\350\301\227;Mdc\250\024\370\006\311\007\226\302\037o\367Wg\377q?k\005\223u\021\036\375U\321@\363\232\317\363\225\177\3303", 64 }, + { "f\247\021,n\027\321:\311Y\243M\345.\204Qe\302\206\301(\205\031\235", 24, "\037^\213\344\352\177&\134\004\203\203{%&\027i", 900, "\253m\201\326M\344} \345K\2152,\245a\255\306'\265\353\216\011\217\004\207Y\271b\234\222\230m\016mu\340\231\035\235\215\3413:\004\332\015\310yR\260\023b\206\000\230\007\314\214\370 8\011\210\313", 64 }, + { "U\257m1\225~y\202\247\245\346\262\261&\252\253\261\375\022\303\247e\351\342\321\260\237\275L\220^)\3519\017\261\013\364\243\037\030\277\375MkIo\275y\004_j\241", 64 }, + { "\367B\325\214\226\364F9!\304<\320{\342kg\315I\315\023\316\372A\336", 24, "\240a\265\361\241\204\221O\347\345\026K2\336a\357\304\037F\311\341\276\216\343\360A\334\014E\317\265\203Ik\346]\317\031\272~\365\267ft\241\015\350GX\235\021\037;\024\033\354\2124J\337\377\304\203\250", 900, "\202\242\3013\2208U:\340\237\377\261,\312\016\251^\260\271l\324\213\034\311j4\011\236\254\360\251\341\347\310{H\017\320 }\232\274Jg{\217\324\257\363o\357\344\026\026G\277\310\004\242\235\263\357-\222", 64 }, + { "\016\270E&%\327f4\252\212>4r\344d\252\234\271'\254S\324\352\350", 24, "\375\306\361\014e1\036\264\033W\024j\367\214\265\027*\201\337\333\233\275y?\027\270~F\274\346dC\364w\211`L@\364PCo\257)#\346\343?)m(_k\252K\375\275\003\3456\376\2240\036\360\222\373C\265\217\322\251", 900, "\302\205\312\343Gl\252\336J7\013\234\355z\377E\3711U\311\204\213\332X07Z\222\333\017s\351k3\333\370\273\352\361nvB,w\315\202\214\327\367\351W\3560\350\377\016\2111\323\315Rd\360\241", 64 }, + { "X\241g:\042LD\026\033\305\2103\347%\313\222M%IxT\3311[", 24, "\354*\024\334zTk&", 1000, "TW\205I\026\261\327\304\271\241.\340\134\260\241U\257\312\000L\177\012\002\020c\266\333W\352q\331P\336\027\357\363j\356P\3036y\357\306.\361C\232\134\245[\366\203\213\307}r\255\350\324~\330J@", 64 }, + { "P\273\256\313\320\002{\007\246Q\235\261\314\225\325f+\265c\221f3\037|", 24, "\3772#\270\014I\036\251\274\343\270*\254r\244S", 64 }, + { "~\021+\245uZ\362\213\366\200\022\206\215\334\351NYt\355\377{\353m\027", 24, "\2447u\244\364\217\330\177\207zVy\210\026|h\302\255\343\012l\034W\235\214w\263\270\256\236\255\312\134j\272Z\350\134v\357", 1000, "\323\021P\223\322\235O\310\243\376\254\014W\021\250#\357\307'\305\362)z\177Y\177\354w\265\015qzf\333>\020G}\011\355\350O]\253<\221\251A\013\315:\023\201\267\010\210\372\277B6\241\244*\314", 64 }, + { "`\216\220\304\345\323\032\361\230\006\373k\0015w\247j2xL\303\242\021\301", 24, "\354\314=\001]\034\307\013\035\250P\231Pi&\031\205\203\027Y?\360\215nEQ\021\336\373\215\332O}h\264\207\253Ah\377\376a\264u\251\002z\252", 1000, "\321=R\262\037DS\377\205\222t\316\371\353\206\267\315\313\246\364\3673\010%\224\351\307z2\230\360\273\220\311aGp\2636\015l9\300\345\003\326r\356m\203Q\235\232O\227 \352\341\021{\267M;E", 64 }, + { "\354\004\006\232\301c\330+\321\346{\032\251+\226\274\273r\2126K\000\000\320", 24, "\244\371\011l\010r\042\231\366N\007\354\251\304\237\021\200\314\321d\330P\027Jgm\022NQ\015u\354\016\023s\363\0059\003x\243\366\361'\375s\330\266\310\334]\350\201\037\330\177", 1000, "\262\340\313\343-\0366\257\034\321\223hwX\317D\305h_\036\012\323\303\360(\016\014\351\244\256|;\031\316\355\317&\244\221\374Do\370\351\372\233\344\027\237x\225\212\032\026\321>\203\335{\263\343h\254\245", 64 }, + { "\306\321\026\304\337ii\326\313\346\326Vw\314&B=\233:\237?\221\201\353", 24, ")\344\304\012\2374O\241\033;\035\3024u\021\243\347\201\314\277u\304\210h\252\022\241\237y\031In&\3374\356\315b\214\004\277\370;\330~\237\335\262\275[\373\3121t\005',\211\201=I\321\216\334", 1000, "\376L\243\307O\223 ;d\203\232\017\217\324\246\260*=>\377\373z8\226\237\255\341\320\342Z\301\015m\363\005\201X\026\202\221\017\351\301\003M\366J\031\263\035\001{:\307R\026\356\367Ww\226\2106N", 64 }, + { "a\201~E\177k^\377\225\372\322\254\303%\007\300\327\315\250\025\257VA0", 24, "\270SB\012l\322\243\037q\035\317;\324\307\324\351\347\030]\245\265\366X\2650e\322e=P\205R4\344\245\227\221F\272\356\034&\323&\022m`z2\275\303\266:\207\212\213U:,\035\227I\275\347\257\023\211\206\211\324\377\364", 1000, "\224F\035\020\272\0235\366!5\234\200\355y^\042+\321\275nk\247\366\034#b\235o\214\277\020\375\344q\374\035\261\263\222\246TI\221 \240u\232[\214\346HB\221\322\003\377r\371wG\025\035y\345", 64 }, + { "(A\2328\302\034m\303m\265$2&\227\250\016Q\3779\275,\313\013h", 24, "\250\337%\227r\334&S", 2000, "\241}n\035\312\202l\273\322\352\272\252\212)\335\230\226\325\012\362eE\004\315\357\177\245'\022\0052\244\024\014\225\227\007\243As\277\251\351-\262\246u4\312Z\214\274\202O\376\324\262m\035\201\360*\343\006", 64 }, + { "\224\227\346\024\316\015\012\374\275#\026\307#\012\262Nr\313\353+ \216\372\032", 24, "t[\215\345V\325<\254\367\361\255\343\245\023\017C", 2000, "u-\242\357\275\260\2226\270\312\037\230\275\372rS\327\216l9\316Q\356\210\323\210E5@\217\347\036\032C\202)\033\230f<\227\023\256'o\233\247\006c\320j\244\341\020\134\177\313\177A\214\336\215\230\322", 64 }, + { "b\247o\224K\245\234t/\302\265\264>\310\225\024\015#\255\227>\225\022@", 24, "\211e\230C\273\3177\2211j\365\030\320\203H\255\017^\256\324S\212\266\372", 2000, "\302\004\0071\000\034\042\360R\205>\020.\016\334\042W\230c\250\222zs\337-\377\373r\333c\001\371\272z\363\0003'\362\202raS\244V\354\377\344\336$\201\336\322\372Uqy`>{B\021\234\030", 64 }, + { "\002,v\342\377\027yk\360b6]\032eS\242\353\011\353\204T\307\207\022", 24, "\236\177\303M\345\365\027T\017\323:\360\225z\271\361\220\265\017\300\273\030\223\2531U\316T\020)\225\375", 2000, "\340\214P\252yt\0126\301i\3054U\217\267\024\364\035\306\003\376!/\345\374?9\250\207,S\031K\276\223\257\364\346\367\241 &\256\271\314-:\272+n\367\023\272\311Y\346\004\225\315\016\236\205\306\350", 64 }, + { "\004\000\227\245\266\231UzT\033sW\240t\234\004\356\320xazQZ\033", 24, "\257\341\327r\023?z\022Y\205t\302{\252\341\027\341\333\260_d\030\206\354\367\026\302*M2\225\347\336N\253\251&Ad\276", 2000, "\353\364R\036\042\354w$=(^!\317\207\266\342\212\215\263\250+\307H#P\011\3448'\212'\030m\037V\021\212\375\3601\311B\233\361!9\036\2135\034\337\264T\331\346-k\222z6I;\303\360", 64 }, + { "\015\213l\014\376\305F\340\317\356[<8l\000\235L\361\327\3623\251,\032", 24, "\356~\011\332\242\011\203:\271\222\204xV\274#\0064\016\237\364[\377\231|j\031\336\272Q\007\331\371$\010\361\231\346\205\337\340U%\230\241\221\202f\267", 2000, "*\230O\020\204]\354H\245&VSOk\247\352Jd>\243\322\351(kX\302c\177UhS]\001hq\245K\320oB\201;\335 %\3164\256\024`\233\273\256\304\324\247\321\345|\023$?cJ", 64 }, + { "\203\371\026\261\020\021\004\370\246\244o\321\365\355j\004\200\367V\304>)\355\300", 24, "\260\347Jg9\373\303\270u\270\253\343C\300\336\010\307?\016bu\366<\334!\312\337v\240w\177[j\227\224AU'\037{\032\245\347n\343\011\370\342o)\214\354\265\236\234B", 2000, "G\345\0377\201\012\226\231\207F\224\006\035\236p9\303\365\3250\223\226>,\313\330d\317\237\312\3238BN.\257\0155h\377\034\236\331\223\037\307\3416\317]\203\302\252\356\234\230^\027\220\375|\0341\006", 64 }, + { "!\323\234\201\027.\265K1\243\334w\375W\367s\264\232]^\011\243'k", 24, "`C\241\225\020\3131\226V\311\257\355\361\313\326\304\003K\206\266\311L:\327'\370@\317U\300\027\207\012[\246h\247\004d Re\027\247\222\323\212\225\324\020v\252_\252\255\361\367\303\020(b\015\346\336", 2000, "\332\363\361a\364\375z\356\215\366N\256\330L\022H\2644\134I\362\373\310\212\213\262\326%\366\351`)\315\014\356a\266\037\352\262\236\365\326z)uU\374\364cq\307=\331\013\316\243\335\033{\273\244'c", 64 }, + { "\263\266\230s\247\032\243\235\271\203y\245\243\012\276\015\230C\230\262\213T\346", 24, "4GO\256\202.5\272\256\313\017\307\220\252\234E", 3000, "\223\021;\244\350D\254W\275\346\222\261N:\235\364\316N`V\307\134\004\037\005m\332\222J\324H\020^\325=\233\356\350'!\035^\245\025\263\022.\272\004\254\342\243?\010\011k\224\331\331\2322\336R\242", 64 }, + { "\237V\216}VW3\357\037qC\305\317\207\302\220\351\331\037\375L:\022 ", 24, "\336\277\323o\333\220q\304\274\313h\237|a\327\323\230\261(\371~\020\327d", 3000, "\211\017E*\360`\315\036-Q\374A^B\343\020\200y\034\177U7\340\260\371?U\221\323}\321\212\261\255\3411L\246\315\334\004%K\01749\207\341\027\313X\230v\300\032=\304\340\307\240\005cu\036", 64 }, + { "\277^\326\265S(\042\033\000\346Y\234M\000\310\025\344\3171\343\230\017s:", 24, "j\301\025\325\364\345h6p,\377h\322\372[\215\262\261\235{\355\352ae3:\042\337o^\270\226", 3000, "\367\314\334~\313\305\216R\375\313\317( W\2524\237\367t\006V\356l\270\305\025b\351\372\016\205\274\032yn\321\366B,Z\300\245\310\364\202\374\336y\325\015\221\342\343\223\254)\340GH\354\021\235u\354", 64 }, + { "oP\0024\027P6\376C\272\232\025\207\225\3616\361\26629\313\004\375$", 24, "\031r\357\216B\274\223?U\2367\002<&\2615Lj\012\276\303\327~\373\314\373\3762\010N\177\231\324\036n\334`\317\013\200", 3000, "&\322\212\306\227\365|H\226f\313\2425.p\030V\261j\350|\352\205:|L\316[\023\305\222`W\264\246-\232DO*+\343:\241\251\320\233\354\377\203\246\235S\027\341\250\316\327C<\226~\346o", 64 }, + { "O7\204\017\015\252\361\327R\030\367$\314\307\217\207\252\323\333\270\213\207]0", 24, "'\234\271/\326l\237\264-\337%\332\012n\372\276H\262\134\263\336\213\337\021M\234\321Q\227\333r\266\304XS\343\211\256T\322\303\234\211\260\241[\037\271", 3000, "_\203,Z\033\317!\350W\356\335\2426T\015IE\012s\331~\301D\012\374\306\235V\321p\340$\353\263\331\237(76I+\000P\342/\001N\345\313\241\214\377\333\377\360Z9}\3544\236\201\370\351", 64 }, + { "\244\350\3759f9f\300\002\015\214P\344\022\200\351[\134RvR\363\225~", 24, "\204\253i\244\217\223s=\217_\313\242\024<\252\241\3530\215,\212^\335S\257j\331\003DNLn\2414\035\017,p{\364\360\342U\032\254\007\021\036\256\345t\253\316M\021\254", 3000, "F\264\340\263\355%\367\007CHC\304!5o\030K^=\305\204P\305gIJ\274\177s\232?\341\000\364\014>\214n\236\004\363\250\323\324\211g\025\371\004Y\357c\351\033(O%\312\267\214\313\001\003\274", 64 }, + { " \373\314\232\000\2625\230_\303\350zD\210\252*\034\305\005\017\355\356\227\270", 24, "R)\032\244p\363 !9\274-\205\343'\231)X\346\025E\323r\032\357\024\020Fr@\013K\221M\376a\336$\024q1\310zU\031\271\274\325(\352\265\017\042\210\016\276\271]\330\252#\244X\261O", 3000, "\241\362\014\177\002\312\211G\001\312\001z5_3\207\232\300\227\245\201J\255\376n/\177(\371x<\303f$\353\210\014\232\232[\244\277h\353\341\022\320\325\002TF\352\037\264Tf\2676\370\271\321\363!\307", 64 }, + { "\333\025O\227@h\274\2608\237\300\004\377\223\022\320\341\312e\202`xN\263", 24, "a\042V\324\255~rU\355\206\366\202\005\354\002}w\033\215\266\010` \215\226-@\231\246\376\340\010\023\015\216)z\221\365\327\372\262\203\035j=5\265\243\242E\035n\036\014\0177\367\205\237\363\031\346\264!K\357Y\350d\375\373", 3000, "\003\242\243\204\364\011Z\213&\276\020\270\364\204\275&v\013\015?/d\352XM\302\306\371\242l\360\033/\247=\277c\331:\021OUK\262^l\270]qh\242\257b\213TJ4L1\364\366\253\201r", 64 }, + { "(n\026\312\205\343\005\033\363+;\013\305ww\340`ET\312*\2063\371", 24, "\327\336n\263\257uk\336", 4000, "Fj?_\352\260\304u^\354\210\205e\025_K\026\277\346Vrq(\224n\204\371\024\221\021dc\360\030z\270eu*\203\365\336p\32321\305w\347\245\265\337\212}S\302\247LR\377{\002\203\235", 64 }, + { "\275\277G\270\316\265\317Y\033\321\261\3341^\036)\235\253\253\274\014\227\327\374", 24, ":\311\227\357\355\353V\261iP\265L\354xr\262", 4000, "\021\332D\300\265\336P\356\226\215\014[=\000\234\027\224eX\022\260P\220\207\315\274~\030(e'\314\134\256KX\015\022\361`\315N7\021$\005\213\027\327\230\300\212\246\267\010UF\322}\260\276\006[\273", 64 }, + { "e\3241\366\225:\037\220p\032\242\346\364\341\237s\332\235+\033`\007\333\260$\241\007p\013j\007", 24, "q\326\233\230 \340\376\340\330\241\255\270}Qb\037\331L\363\243\021Fe\012\204\210\220 \246'e\323", 4000, "\233A\343!1\343\230\230\201Xu\272V\314L\330\204\217\301\265\376Ph\035s\321\253_\303\224\201\262M\350\365\375\302\325\217&D\234\314\320D\210S\370L\3674\217B\311\251\313\237\243\202)\030\022\307\336", 64 }, + { "\266\015\355@-\222\245\034\2232\353\327a\326[\223H>\212BBP\212\221", 24, "\207Q\350>\367*\313\020LH\353Ap\025/e\240\033\230\221=\367\325\243\326Bp\037KHzi\302\017\247\254\306\375@\346", 4000, "Ii\225\355?a\327\357\035d\007@`A\307M\214\027\304\205\376\343\2641.\325^\336\030g\275u\351\333_\205@Q2v\255\263\353O\243\006Q\243\303\031\252\252\036_\020\3739\202\307\177C\314{\271", 64 }, + { "\362\272&\200\012\014\365\001\341\023T\232,j\201\202\324\0042\256h\377L\250", 24, "=\013\254\322\351\270\307\341\322\310Y\262\211%\357\356\273\233\346'\265\277\350\313\342\263\244\017\361\005?\033\352\374+\305\244e\270\232$bB\375/k\355\316", 4000, "\222a\254\336Z1\3035)c\302\226\031v\216\345qr\234\247\211\134\004O\010\033\205\221YR\313\365\034`\244\276m8\204\255\217}\333\013p\017\307,\245\270\344~\037.\027@\243\3008\226\346\364\004^", 64 }, + { "g\027\243\247\030\210\246\017\355\022\306\212\347\226pup\007v\374H\261\006b", 24, "s\006v\241m\353\271\320{X]\346V\027\345\331\360\017\302\210\010\213\243\134\361`\235\306\265\036U\025\264\373T\373\324n\033\226\037\252\031\340s_xtA\310\335a|A\252\274", 4000, "l\247\361\333NE h\255\336\021\374\356\327}\347\314\347lZ\336\335\377\341\354\342\206\317\310\036\302G\2039-\374\005\027\204\313\304\340\334\032\032z{S\273\330\1772Q\220a\201\260\264\312\222\003\317\034U", 64 }, + { ":\243\340\307\302'\256\134\326\301W\356]\307\3327", 5000, "\205\254\255LW\275\210\264\205a\214\001\323\312\254\251\233%O\222!0\037\177\274:\212\357\354`\005\335W\254\265[\275>S\243s\225\032\341\313\214\321D\177*\246\001\366\005S\234\230\010\300\301\024\337\3777", 64 }, + { "i\347u\243(?];\2174p\027|w\252\232\374\252\031\360\013<\244\313", 24, "U\204\031A\265u\316;\325\340\215C\340\026\245\366\027V#\3607\320\223\315\352\364\316\240\020\276\034\342", 5000, "p\216\236P/^Q\034\303A/:C\012-V\363\242J\370\310\265\333b4\2267\177!pX:e\306\242(c\325\033\306\315\312B{\311\026\250k\026\257\207\217E\306\013\246>:@%\203\272\001A", 64 }, + { "#E2\2447&#\202\264\042-e\346\315\327\212S`\354\357T\373\374\356", 24, "}+\227\036\352<\035B\325jB\225\343w\237\034\206\255\235\260\233\336\204Sx\216\317\202\001\261\242wb\035\352\304\235D\221\267", 5000, "\242\246\366\007v\255\267\332>O\332\005\024)K>f\350\031\325)\224\236\277/j9\373w\375\224\207\327B\321\354\265!f\373\013\375\024o\3768\345c\351\202\305~\366\221\301\237\3504}\215\313\306aK", 64 }, + { "n\342f\266\256\206\242}}3\011Iw\350\264de\356\210\365.A\357I", 24, "\313\366\372-\305\017\251\134\366\265\2732\304\203\300\275\224\300\314ZKR\016\260\363\273\014\255\344\304kW\217\275\021\357\334*\342\022\243\312\303\265\016OM1", 5000, "9H\012\364@\023gk\224\324\007\340\017\215U\013\247(\006\007\305\335\006xAp\372\343\267\322\355\250\344#385;D\342\310Q\030\214\271b\275\265S\246A\020\247\030%\233,$C\267\334\036I\020", 64 }, + { "p\224\002t\321\207- x\331MZn\352\042*\220Cv\230\303\244u\233", 24, "DE.\236\2209#`\026\303\274.\352\300\310\230\216\032\216\214\307\254\024\253\317U\033b\327\3532\033\231\370\344<\376\013-\330\0032\260\264L\012\305\020\254\356N\375c\333\010\236", 5000, "\324\235\2268\20247\200[\222\042\315\006\244\002\207\367h\31422p\371\205\206Y\202\331\307V\227\210\024@\002q\226\225\345\305`iwI\274\334\373\310\345\330\271\226N\331\242\371g{\231\266\035F\330\263", 64 }, + { "I\2423\320\015(\222H\242\017\252\211\353\375Ja8\033\340\3765\314\322u", 24, "\346M\375k'| \307\351{\221\376\304T\026\0058)!\025\306\022\271\227\032G\254\200+\201\033\021e\032\334\002\301\317\201V\3658$\042\266\362\216i\217\266\021Y\312\017r-\354j9R\022\037\321)", 5000, "\224I\371i\265\005\262\257\262\253\373zV\250\240<\311\201\257\362\222UH\340\367\200Q\212\017\335\251J\020\002\341PB\202\030\022\017\277\032fT\256\013\266\355\227=\224!D\371\225\240J\215w\002\255>\300", 64 }, + { "\205\027X\235\021\3344\2458U\361\222k\375\353\370\226z\3140\321v\353\026", 24, "\254\365t\304\343\317\275\254\0273g\241\003\320C\326\264\034Ep\360\267\273\2332\210B'\222\210\303W\202\021\364\246\302\320\236\256#\3074\324\313\216V\231\242c*\003\2345l\0365\353n\347\276c^\366>\257\215\227\215-R\207", 5000, "\337F\336\013{\253\267\314\001wC\321\201G\344", 6000, "\226\341q(.\361\024R\272\037\201Z\202\300\271\002\216AM[g\263=\0039\034m\250pb\235_\205\3468A\007\213\276\366oK\273]\277k\010\011#\255\264V.)m\032_|\372x\230mnv", 64 }, + { ";\346\354\013\230\227\031F\357Nz\350\262\002\025\305\013\337\377\332\350\256\014\030", 24, "\222G\375\327\177$\353\274\353\357@\007\026\356\266\303\240\370\271\241h\241\003f\233\0061=U\264\177\320\311\312\334\036\031\025\275'\324\341QQ`\277A\347J|\012\3315\243\230\217", 6000, "\332\363q\304\333D\240\347\241\032i\333P\231b\271\344\317\024\355\314\301\267\316\021\237\321`\013\215\202l\365\330\311g\235\247\232\361\336\257\206,\321\317\330\006\253\233\302$T\357\324\035\241\0316\030\036(\204\251\331\376M^\2559.\225@\0110[j\201\350", 64 }, + { "7Y\231\310\325x\221\333\3057~t\254\265\325\335\247\326\227\363:\134\355\201", 24, "\340\341y\031.\267\217\264\012\020M\250\347\274l\311_\255\361o\232\260I\342", 7000, "\202\267\254}\0042\357\253\273\261\022\024H\020\203\013\032to}\347m\337\376\371$\250\255\321r\016\006\274\367\311\323\243^wsG\237Vw\004p]\325\261\365\027\356b\230\205\322L]\021\203\371\2709d", 64 }, + { "\177\335\200\3270AM\247Y\322\010*\234\035A\261C\366n\036>r`l", 24, "\214\014\337\257?\303=\024\240\307\343\00255#\326\0235\267\327K>\354\375\211\321b\021[i6>", 7000, "K\000\352K\222\245\260\275\361\361o\365\326\364\036\2770\207\331 \312LL\350c\006\226\247\014\217\217\261/;AP2N\327\343\013\246d@f\250-\364\304\013\002\314T\032\025\247\017\217c\366\003\305\037\362", 64 }, + { "\200s3/\021\217F\036\305x\321\206\215\004mk\314<\000\300\226(*\244", 24, "\247\250\3112z~\236L\327\215\003\367\022\244\217\201\373f\010$HE\221\026%w\326>\033\017\226\020\207G\367\352iL\322/", 7000, "\311\374\230\374$\026\042\360\254\307\307\252\207ZP\232\364", 24, "\207tG[%\035\246\377\337\325\331N\022~\365\236/\304\201\374\021@U\372] \226\375\037E8\007\254\354\370}5vZ\031\206`\366!\322\366\342^", 7000, "\245\210\355\305?\007\012\026-\377\272\025\2700\270\375T\332iM?\216$tT\216.}\356\005ExPe\005\262?\223\226,O'\365\000k\246E\202\021\213\324\035qRg'c\024'\200X\026\240o", 64 }, + { "\021\300\216*\364\017\360\1340\321\362\221`G\234W\363\333h\324\216b\217\307", 24, "+E\251\013\223\005\246S3R\255\016G`\212\214\246\352\012t\353\324\237\230\242\241c\227\021\374\316#\260\351\317\0252\243\007\002\346\026\237\023\216\3117\344S}.9\274\203h\371", 7000, "\362\315\306z\261\307\255\373\276u6\243\021\347\234C\370\206\306Bv\257\211\347\242", 7000, "\033\256\213\370\341\215jM\215\216\262\324d\007\316\365\227\371\2034\134\272\012\206h8\212\253Z\027\314\305\017z\371\010\216s\343\313\277{A\262>\312k\376`*d\300\360\2516\241:%aj\215\242\275\375", 64 }, + { "2\214\342\377V\332?\2433\233\177\347:\352\242\364\337\340\331X\237\257}6", 24, "\320\326\244\261\006:\026\037p\252$B\205\265\036`\362\327%w\241\271\317\367\004\026\215\364\260\023F\3245\220\276\367\347\260G&g$,\2219\015\177a\224\211\313\016\346\027+ \011\354\017`\026#>a\327\022\372\177|_\023\231", 7000, "\332\3414\351\013\042V\243\371\033\321o\023\023m7T^\220X\343\300H\010\306a\307+9\326\315\323\226\032\205\030\024b\371\365j\220n\014\312\024\003p\345X\017\341=\321\304\205\340Q\300\362`\307\314\365", 64 }, + { "55v.A\333M\011\253\244\245\331H\317t\353\235\243\306\200\307\241\330d", 24, "\301\032\244\327Z\351#\344", 8000, ">\334a\343\370\316\221c\363\253\306\042\325\007\310UU\351g\340|&\203l\034Q*\36754\206\134\264<\341q\342\332bg\014\000\301}yR:pI\342\301\343\250x\232p.\373\211\033o\016\015\300", 64 }, + { "u\034\247\2249\312\031?K\134\367\227\373\015w\005\303v\375\311\227Y\264P", 24, "\347\374w\031d0O\321\342+\036q\026\015+L", 8000, "\000\307\323\245\336\306|\361i\245\221\003\013Mn\233\211\227\230=\272\211Ybv.\007\256\244u\364\350\201k\274RA\022\327\212\325\234Or\0137gx\340$\365`\355\255\3310r\205CF\246\3554\003", 64 }, + { ">\372\324z\264\3456\210u\275\205\315\302%$\323\023\204.\245\305O\266\215", 24, "\210\036\242\335\310\002\367\363\365\034\003\030\207\017\007\022m\0369Z\322\032\272\213", 8000, "wO\311(\236\027@\354\006YJ\353\207~\360\237`Y\316\242\247\307uz)\307\023\267\262\340\007\307u\2256\0220\347\1774\274\042\271M\335\026D\342`\356\004\255\2702\21587\0270\346\310\231\303\215", 64 }, + { "\205\015pw\204\330\315l\327UI\003\134\005\033j!\202\007M9\030\017\257", 24, "\243\006_`Ge\333\270\232\361\256\305\266\204\351\231\232\310k\230}\035\225oh,F \177\213\3508", 8000, "|\206d\356K\204\337\023\357\324\325\377U\314\343\001\177Q{m\277Y\3232\347Z\264\343\032b\367\337\204\347\237\340\220\000\005\240\015\256\207\240\266\020{#p\216Kd\031\245\266\237\366\327\003\352\20096\270", 64 }, + { "\234\317\267X\261\316p\305\317\270\037\223\364s`)\266\360\255\372Cx\034\344", 24, "\037*ZQG\262z\310\302\331\247\036\355\331S\227\271\245\240=K\342\360}\015o\376\275\353\370v\326\011\352\366\011\035\346t\315", 8000, "X\246h\312\331\270l\217;7\371z\357\213}\021\200`\035\335\277S\211#\024\257\253\367\270$\306\334\346\236e\030r\031\356Z\314\340_\237\242\025\134\314z\360\216\020\337\205\272z\314\036L\216Y\217G>", 64 }, + { "\216\336\334\260\010\376\034\330\025Ilx\217\376+\341?A\303\320\212)\242[", 24, "\002\257\245\0163\344\244v\375\344\023\272\244;\353\242\371|\010H\337(\200ut\252\252W\260\256\355\251\244|\013H\257\350P\003\210\330Ji\026\361\230\313", 8000, "H\320\325\372\034/\365\265\000Z\356\250\353{\205\202\247\006\313|I\032\013+F\373\270\134S\015\036\3443\240\376\334\3018\3343h^\344\200\243\312Nk\264,\302K\365\267\315\346y\030!\020\313\373\241\272", 64 }, + { "\364[\025a\015\244\351\226\361\277\362RnY\016Vg\011\004\032\0243V\334", 24, "\303\035t\266\010\251('\331\304\035\276E2\030\216\305\330\026\3153\271\227szf\361\307Jg\217\003\200.\031\034ga{\247\042\021VG\262\216\264t\015\006\014\232\236\300\335\360", 8000, "\373Ng\266cw\232\023\340\345\134(\241\223\330\251P*.\251p\023I\216\222\016s\274\2610\2719-QX\017s'\364\367\203[z;\321\275\367N]\016\205\216\032\246\351\013\014\230u:a!\340\344", 64 }, + { "\036-\324\033\321\251\200\377\035C\2173\352\252);\211\025\316\215\375\214w\215", 24, "\300\007\353\005\230\026\313\261\017\376~\245\312\375R\275\336UpX\223\261R\321\012\257\305\361\354\305y\016[P\026\302\367\203\210\222\320\267\341A\374\323Lk\237\360\277\303\226v\214\362\372\303\363\2325\032Y\216", 8000, "G\277\034+\204mQ\037Jh\3735M\226yb\271T\333\216\320\233+\3414.\010\243\335\030vR\223r*\272O\263\222\310\204\366\266)\037\012o\344\333#\027\260\037\300F\010f\336\236\236\367\203\213\222", 64 }, + { "\266c\307\213\340;\202\254\364tO\370\023\221\332\006w3Q\352d\224\000a", 24, "p\035\261\247\274*,[\341\236\263\237,\272\361\301\232\301w\203\023\024}\265]\313E\203g\364\247o\005\134Az_\007G\007\010\220;\326RR\216\262\025\200\255\262>\330\321\276\316\331\356\310\334(\241e\345D\263\330Gx\324\325", 8000, "\253h\230\377\267\373 \214\322-\273\273~\336\356\177\024\205\277\240\277[\227\023\332\316\315\374\000\272\351\357Z\011\021\300\377\371\376o\223\336\235\312\021U\330\257mz\250N\206\210jB\134m%\276/o\357\354", 64 }, + { "\245\221f\320]\012k\303\031\336Wr\336'kl%\250\3559=\266P\274", 24, "\243 \351Hp\230\003\351", 9000, "Z0\012\276\353\351\232\246\223\035\333\243S\367\365\272\376;\035\314\004HG\030\213\275yU\355\005'\341\134\002O\014\310\134\21217\020\011\317\311\032\031\317\355/=h\201N\305\243\232\300\354\342\005\206\216\200", 64 }, + { "K\213x;{\306\322N-=\201\352v\366\255\013\005\012\221\2142\336\014\300", 24, "\200>\242~\026\241\226\204\221\351\213\303\223\237*\345", 9000, "\273\325T\251\032q\370\2077\310\220FF9e\204\342\226\374\247BP\370_\273\024%\314r/Y\270\231\343\323\353A{r\334\013$\315\224-\226\272\276\244x\337\220d*H\021G\307\271\347\251\304\360a", 64 }, + { "X8\022-Z\303\263\357\3236\371-\322\352\212}\226xVF\200KH\271", 24, "\352\321\241\333\217\016\012\344\245\240\216\017-\367\340\324\260i/\320\377{$Z", 9000, "\363\313A;\203\243u\267\276\002\327\036\2234\323\217o(k\372\333\023\240\221\300\254\2677\234\2040\300\350uv\327\371\262\215\272x'\213\274\010\021\034|\352\3338\353\273\027\272\265\376n\134\210r\300\006\247", 64 }, + { "\335y\005\355Q\326\204\360\222$g\356s\374o\200W\011\220\001\247\025'u", 24, "\035*\242\310`G,\244Q\372\256\301\305p\034\271)t4bW\2076\225\177y\335\322\317\245\256&", 9000, "f\326\017\227\016\302R\363\324\314\010\271\320U\341Y\222\370\265\277z\370\313\303TA\334b\371\226\254\264pq\336^D\330\134Q/n\324\320,`ay8\203-\035\223\351\301%3\032\355\217<\233\256\236", 64 }, + { " \250t\357\202 ;\3730`p\201\373k+r]\354;\370\244\030p?", 24, "\363\217\315\313~\351\231+$\215\216\362W\26569\223\027\300<\252\336=?\320\015t\333\004\265\316$'Z\010\337\032\300\356o", 9000, "\013\263\374\335\225\200S$\237\251\312#@\227@iE\373\364tpE_\342\203\204\364q\350\333\215\237\345\262n\217X\023\020`\257\327\257\236a\273\007\271\020\213`9\363:\011\240\014\257u\013B\302\365Z", 64 }, + { "\037\211\342J\233OL\256\313,\272\317E\355__\006\211\354\343)a\326\366", 24, "\3069v\303-\210\007`\270\242\024-\010\203d\242\210\250\347g\031\343\265}\035\317WY\2600n\342\263\317\300\010\007A\023\313\311\320\361Y\266\206\326\256", 9000, "\037\232\322\324l|\277\265I9\377\203-F\026`\202\206;f\256-6\312\374b\0152\016@p\017\374*\250\213\255i|\274.\326\364y\336}@\252\012\377D\202:LL\274'\010\222\304\265\360\324V", 64 }, + { ";I\027SS_\355\250\257M\025\034\252\332C*}=A{S\012\267\020", 24, "h\324z\036\2161^\373N\027iO\210.\344\361\370\213\300\274\204!q6\277rja\216tk\243\371#\353\201\272t\312j\206+L\005*fh\033?B\323K\213\300u\310", 9000, "\323\004\241\010\242'?&\207\347n\2659\262c\327\356\373Af{\363k\244u\315\271\257\215\002&#\350\244\253\345\004\362\245\341!\370\367\235L\324t\325V\232i\261\177\3241\010~\310\347z:\263\177\211", 64 }, + { "\331\363[@JRZ\206\223\334\330\027\234\035\3774\273l\316\322]\310\212`", 24, "\250\0109m\246\376;\177\2612T<\274\327\2363\344\324U\343\343\340\206%;\347()\364\322}?\376\214?\246\361\005#\273\020r\200\260\3608\335\217\017\202\212F7\202\325\353\323\367\305\034M\033\303{", 9000, "\205\373\010\365Z\241;\3701a\253D\025\351\374\254eX\244\037?u\372f\346\231g-t\274\325h\030\365X\363\322N\011@\270#\027\212\271\307\221\302\275(\033{\221\270^\264ku\017H\367H\201\002", 64 }, + { ".\354\201\342\256\244\227\276\215j(\026Va\3359\206l\377\020\253\376vu", 24, "\014\346\240i\217\206\263\300Aq\336\242;,,\240\035-\253\3070\367B\352\325\042\366\351\013\200\134\372\245\227u\233B\212\016\244.\021\362!\214\221\016%\224A\231\004f/\346\343|\007\3014K\334\015\2660\302\332\243\330\331\277\225", 9000, "?\341\377#\006\027\300O\217\020\267]\3708K\301b\177Flug\301\212T{\304\255>\260\357\266\2368\336^\134\326\335\0268\357\214\230R&&\372\223\315\212\374\341\320\234\224\203\017\310f\254\017\365\371", 64 }, + { "\035Uw\245\207fy\341\213Cf\313\250\356\333#\365\330\025\214V\365V\315C\301\312A;\265\324\333", 32, "\237\306\371M\211\275\020}", 100, "\277\325\220\301\016\372\256@NS\004\207\201\3778`\215_\211w%.\337\374\353\367\220Z\272\373\326]\275\224,^\036\311a\206\211\260\005\317U\0154\001\237\273\305\316\033uu\251Q\213z\351x\036\243\265", 64 }, + { "I\333\366\014@\0225Jgoz\373\270\002\020\037(\012\177V$\232\250(\264;\320\371!\324p\235", 32, "p\340\214\234\324\205\224\324\020h\221\357Ej\330J", 100, "\317]\000c\226\304\271\261\023h\365\3636ZV\016\353\356\222y4 \340\013\223\223\301\356<\004\234+\300\201V\230\370\375z(\177m\364\306\351\231s\254\360\227T\351ebLA\316\207\011\273\353n\323c", 64 }, + { "\342\206\301N\363g\353|\226Wd\356\240\3630,z\343\225\024\031\252a\275Jg\337\361\000\224_\273", 32, "F\342{{\365w\331/Pi,}$\303\260\344\265,\032\134r\362s?", 100, "A_o\223\300\360\016\264Z\223&\300D\2500\310\316U\347\004/\226\364\336\353\034\217\011](\237r\356hd\245\205k\037\252\042/n\241'eZ\316\310K\233\017{\247\234\303/\205,J\373l\362.", 64 }, + { "k\007z\262\2607\030\372\326\240\273\317\332\2406\031\203\014\211KOT\330H\001\356@\360:6\310\336", 32, "\301\261#\301\224\212~\323\326\237\037\202\036N\342\034\323\034\332\245s\002&n\035\265)kU\314+\244", 100, ":\276\200\342\261\1345\243N\265\304\334\375\364\323\371\304\213KB\336\372i$5\205\344\313\012.X\273\021\306n\222\025\224\207\321\365\265\333\304\363\225C\256Yf$\235\340d\026\027\207\216\267\006\361\030\353@", 64 }, + { "\212nj\377V\332\013\370O\246\366+\370\264\321V\252\246\341\232\000\250t\341\241y\217\2764\213\234\203", 32, "\210\370\011\356\265\343X\235\3101\255m],h\253[\347{\134B\360x\215\222\324\275=\212}\363\247\326\004m\034\003C\241t", 100, "pc\205\224\356\344\247b\310\251\222\224\357\315\277]\000\272/\303T'\371\336\221u\370\355*\264\226~L\357\004\237\345\215\236\224\310n\032n\345\357\347\204\231\2543\020\234\032\042'\014\361,o\134\305\2233", 64 }, + { "\227\222\262P\202\346\315\316\216#\250\032\346\007U\375-\317j\020<\220F\344\215X\234\004\374uM#", 32, "\215\215\254\311\351\001\253\313\331\364\304\315\032\276r6(\261\325\224\346 d\357\257\013\240T%\314\305\270\200\350\204\343\276\371\021\011\206\221(\310!+\034)", 100, "1W\302\356\244\310\375,&oW\334\355\230ipU/\026\236\352\250X\010p\335c$\032V=\375\316\037T&ja1{\225\262\177\313M\360Q\313\220\177M\307/.6\206\333\256@<[\331x\212", 64 }, + { "\016j\376}|\201\341\346\214\014}\023\353||\360K`\336\205\261\336\015J\243MP\341-Z\016\224", 32, "\013\350b=%\356\202\247\222\201\3362\222gr\331Lf\201\340=\365\002?>\011h\246\306C\361\274\306mK\002\005Z\230\267\372\0364\342\254<\032'\215FR\231\210re\035", 100, "Fr\342\330}\351*D4\314\003G\366\270z\016\345\233\241\331\225j\262\324\362o\016\306\205\272\333J\255\350G\001\365\225\2548c\202\036\275\353\375-\031\032\023m\220u\337\236\265f\357\033O\341\332\235\246", 64 }, + { "\037h\035C\201\200\227\347\245\205a\334g\343\330F\330\267\276\254\350\234=\317$\220e_?7\014\020", 32, "\363\34664\0316\003!\264\262\016C\225\026-\230(\363\007(R\347\013\014\012\304\244S\032\367\203\336x\251^\365\200\004G\354Vv\236\277S_2\363\260MU+\240\263p[\274\357\343\227\264TN\244", 100, "=\304\257c\200^\221\207\253\275\301\300\245\370\303\326Lt\026\235\337\334K\026B/&\0273\352q\024Pf\377\305\326\015\353\217~:\223bxyC\036/\021\134@\324,\337@O\024\356\252\352\314\001w", 64 }, + { "\350B\315\204\370D;A\224\200\004{,\202\302Ba\310=\214\012U\002\007\265h\007\262ou\251f\372\337\227\012\310\357\277\346\321\351\236?\310\303.\263\377`", 64 }, + { "\372\252\370u<\365\355\222\214g\324\027\302\020\214\357\013;\334A\042\331\227\267c\3001\035\215^\245\316", 32, "8Kt_\242\015\235\007d\013\376\241ml\211Bf\225k\357\226\031\042m", 200, "\214\323$\343\001&.\301\226\220\260R\263\253\207\226\321.\276E\233\267\351BW\230\365sc\273\034\005\342\006\033\2051\227*1\017\216\221\024\276Db\222\212Y\032\017X\333\320\210\177\356U\366\321\256\002\216", 64 }, + { "\203\000$\374>\2270*\334\000*\254(8\020o\311\213!\000\253q\333`r<\201IS\020\217\246", 32, "d\315\226\314\202\321\343\360\351\203\033\343\312\315\245\024x\351\274&\032\034\364m\241}\376}T\253]d", 200, "}1)\202\266\331\2179l!M\277\251\265=\3449\310\220\346\310w\330\210\026\305\251\375*\207\233\276s\277\273\202o\326wes\224\023\3222\223\365\304\375\371K\274\344t+S\314M\217d\320\221I'", 64 }, + { "\2519\015GJ\241\362a*\252\307\253B+\226\204\226\320\276TlW]xHr\244L\354<1\363", 32, "1\207\307\303\232\276\322\277\037}b\023\256\211A\371\333\220\217\342\216\304\011`\3450\270\207\343\365\277\311\301\351p\002\223\011\372\362", 200, "\354\034\351Z\226\347\033\212*\253\011X\355\254\336s\363\365\257]/\202\256c\305\203X>\251\027A\233\357s5\337\022wW\240A2\351\271v'D\376\205[\246\313\361\375\301\251\307c\202\365tf\000\305", 64 }, + { "+we\241*9\342\353\272\365\313\366\241\031\272\231R=\310#\372'\322s\014\253y\372ym\314\260", 32, "\230\327\217\225\203D\015\036\364D'2\042,\001&W\310\326*\375n\255\2530*\323\210~\203\361\234m\375\215\2151\342`\360\353\224\224\2510cW\260", 200, "\017\317\2567\134\357G\343 f\3122\011\377\334R<\365j\230\021_N\230\235\006\245\035\274\037-P\012P\225D\024\021Zy\256o\223\242\030\032Y\024\213z\265\012\374c\325\342\2735\370+\274\360&\020", 64 }, + { "\234T\251\237\350\325\232\3613\253\322p\252\327Y\212\213,\374\326\203\235\037\274\203\2665kO\025\356\012", 32, "\263Bg\330\260$a\243\027$\303M\2553\2347Qm^8\2041\011`\216@\013\011}\302%\352\360\316\352\370\003\220?\321F,\236\360\362F\327\350R@\327\247d\325\272I", 200, "\244\015\341\362\031\363\032!/\221\207\204\325\303\254xl=\267\373\336\357-\322\304o#\314\027Q\015G~\012\211l\314\265\3305T\005\247\324\000\2406vp\372t\352\204u\374O\347\032\010h\277[8\257", 64 }, + { "\257\330\002\330n\015\300\364\026\251V\016\3308\231\221\207m\003\024CL\271\251\364\324r\036\313[u&", 32, "\240\032\225W\314\311S\204\0351\027\177\361\367eO\224\260\214\274\266Yj\275#V\265\32533\244\00139m\356\256\363\312\221\015u\334\036r\205q\300\024\264\002\311\277Z\271\333\006a\326\206M\357\253B", 200, "\270\367\357\237\004\177T\024\266\332\342 g\261\336\024 \035\243\255a\336\2006Uq\217-\362\372\037S\301\314\314\327+n\252\235c\004\042\020f\311\337\177\211S\266]\346\033\210\244\254\377\333\305\314\007\355\311", 64 }, + { "\224!/\213\360\357\220!5,h\322LnTY\025{\334XqV\236qY\026A'`\021\364/", 32, "\247\213\203\223K\362\366\255\020\217\2265\222%\030T\265\313:SW\237Y\346\256\324\012\2358\235\257J\276\034\031a`\337\202\317\352Z\017\323\303 \264\042\016\015\012\253\004\264$i:F+\003\301\266)\270Im\234@\271\014\026\312", 200, "\207\261\336J\2314\262\330\025I\012\316}\354|\357\033t\006\361\326\333\232\031\325y\003K\277\3518\334\301\357\365\234\301.w\230K\256\201\266\350@~\340\222\310\014\376\355Fk\257x\242D\374\037gxU", 64 }, + { "_\005\231\003\225\334q\370mQ\321\252X\031\265=I\224{\343u)\217\201\370J?\364\013\315D\177", 32, "Q,\356e\355p\312\232\311\270O\333\024g\301vY\364\032\351\352Nw\320\247!\241\367\003\006", 64 }, + { "92\200 \224\243\3026Vp\376\270X,\300V\315\265\270$H`\262\324\271\337\320\253\367P\2525", 32, "\360\371\017\302\303~\016~\334\013(|S\017\315\2465\264\227\3060\334\014w6\235C\256I\346\022Z\012O\023\221\262\252\355\237\346\323F\3111>L.", 300, "\274\0251\006\345\321\275[id\316<\370{\026\210\350KjB\324,lS:\345O\263\301\355J\364\346\271/\3262\223j\347\231\245\234\022\241\254h\002\265\234J\275\2521V\325Xg)\215\300VFN", 64 }, + { "\224-3\372E\373y\366q6\375r\201\250\276\235\212\276R\275\347\317\331I\2572\031{k\354Sm", 32, "\335\213\324\011\243y'\302X`\317 \300nj\240\002\355\177\322\003\350\004\250\3265\333L\210\134\354\260\327Qty\007\033\337\350\234\216\340)\230/\321!|\361\2669\246\335\266\360", 300, "\240\270\256\340\027\016\010W\030L\305\234~\362\011C\234\022\267g\207\301\246p\216`\234>\245`0n\231\326\303\032\2464.\215\310\347\236\237i\220 \336i/\275q\315\205\034$Y\307\2310\326\276\252\224", 64 }, + { "\347w?8\316\356\356u\030FA\011cQ0\032\301{\322z\364\007\344\244P\003\312t\271\370\022g", 32, "\270\003\340}\246\274jA\267\033\366Z\275\177\227\331\205%v\323\260-\012\340\015?t\2752'i\302z\212\300\332\317\231\234\220\015\241\035\3523g\025\263\244\042y\340\274\322a\252\005\251\336:\275B\020E", 300, "v7\377au\016Z%\270\215\300\011\237\324S\021\207\014\357<\335-p\306\034\224\362Dn\331cK@Ji\354\217\324p\324\212\310\313Ho.\224\340\031/H\373*\335\033\357\253\037\222\204\234\265\037-", 64 }, + { "\255\002vG\234h\247N\257\033\370\323\353\003Z\352.\361\373!\003\304Z\374R\012\265\255K\273\223\005", 32, "\335'+\321\275\250\200\315\216I\235\253\307\266\310\357G\004\372\301\311\031\352y\004\247\252\277\325$-,\340\352j3\331\042\360S:}>\276\313:%N*\226\273\311\264\363W\217yBLK\225?\343W\020\360\261\347?\267\344\203", 300, "\212\336y\264\270\212\272\345y\231nX\323\343t\236|\334\370\346<\347\322[\013Z\036\200\267\333t\014\3361\347O\210\357\206\031?\314Q!\275\310)%_\325T9\376\204\260\241\223\003\363\334{K\360f", 64 }, + { "\257\324S\205\231\324\023n\317*\321\373\341\307p\302\300A\251\304\014\325\276&p=\307#\341\220\274\000", 32, "\203%ft\036\202Iv", 400, "5\213\375C\213\233\346\347\003\243\243\304\255\035\213xV\007\275\042\013\265\015\231\267\322\021~rZ\271\227~\010 T\277rS^\326\211\305\032]4\023G\224K%x\005\312\3131No\177\230O#\0423", 64 }, + { "\234$\001\017m\223\035\315\265X\360u&\202D&\321\020\216\334\261\236QA\302\004D\367R\302\255\341", 32, "\247\334\314\177\366|5\235\231h\323\217\332\364O\016", 400, ";\015\000\340\014\206\252\307\206\376\314v$\224x/\033g\027S\003\262\270\273bT\036\020\001!\261\003h\314u\003T\014\030\037V\202\005\327\216\324\213\336\020\303Le\3237B\012\374B\310\035\322\320\006\324", 64 }, + { "!B\007Pw^\277\024m\232\342jH\2722\376\326+?\3568\217WT\037\273\037\311\352\240\007\273", 32, "\374Vhd\263\246\255W\226\015\276h\241\253.\274*\012o\003D1\360\021", 400, "\0119\322\250\350\027\226G\260\203 \316\245\027[lV\313\005d6K/\217}L\353\337\273*\250]J~\223\320\266\331\225\222p\262\027\007\227DV\223\340\332\305|\211\303~N\211~\353U\340\324\261\042", 64 }, + { "`m\302\221<\360\306\306)\220)\2751sl\022\216\363\233*\257\000\251^m\006\261\367k\007\355?", 32, "\300_\016\250\265\234\3131\241\030\033L\253F\003B|\272\250\021\242z\235\011c\013\231ty\277M\027", 400, "Rb\332\252\340\0128\177\311\030p\330\0265\337\206\212\217\213\322c\240\370\200\016\370hC\012\026HB\275W\255l\316\354}\225\354M\310A(\307\372_\254\260mY\277\032\375F[{\323P\030\273\321.", 64 }, + { "\020\301r\264\274\330C\264`DH\360>V\370\005\234\013\270\273\223\234\02137\345\275{\042\326\236X", 32, "\274(\277C\310%D\305\035zk\212\360\020\324\324\223\212\234+\312$Y\221\250\006\357\325F>9\212\313n\250\2323\314\343 ", 400, "\276\012\347\225\301\271\344\223V\3001\004\212\033y\001\351\313vU\331\021C\036\360\343!\324\321%\222sh\221\232\313lo\3063\2471\354\335s\256\237.\241\267\323\247\261\340=\272\370c\276\336\134\214>\204", 64 }, + { "H\325\277\243\331\206\273\317R\005\324\030^,\370t\276j\0003\230~\370i\346\363!\223\273\244d\333", 32, "\367\241s\025\264\023%I\355:^XHr\003\230\177\331\245\347\025\372\234i\325\350-_\177\375\323\370#\320\332\320\311\241nED;\134\370:\012\026=", 400, "5\325\243\265{\033-\344\370u\020\1342B\017r\301\277\134+4\016\001+_T\367\354\012\325\311\257\023\200s \262[7jy,@\205\254\364\350\033\212\223\275\236\332o\031\350\026c\366%\377\272\333,", 64 }, + { "\012rD\010t\322\202\251\355\253W<\201J\363\312\206\323\337dN\244V\025zG\324\375\361\207RK", 32, "\207\227\350\201v\263\376\206\215\360\221\3046\022\217\002+\022[0\216G\225bQ)s\204\321,\225\352\256`!\250\333\216\364\217\30602i\017\262\013\352\326\301\250\022\244iLf", 400, "\034\033\242g\257\230{\316\363{U\253\0049\000\257\265\264\030\264\011E\320J1<\274)\201[c\252\323\266\353\222\022Jy\366\301\024\252\024m\272\261\307=\2047\371Ril\222/\230eL\003\325c\276", 64 }, + { "\207xrV%\324mBu\004\356\222\302;`T\347\0040\302\356\324\012\335\015#\324\330\214\335\221\205", 32, "\346)|\356\355q\266\340?\377\220\364\361\022\004\274eTvh>@\231\205\003\3354\234\001\337\260\031\225\3546C0i-\377\3657\021\340\354\225\352@\314\313\336\035\313\014\347\327\320\250\314\276\247#\356`", 400, "\341\017\177\253\177\265\002.\322\235\224\177\244$k\307H\245&fLi\354|u\241^^\0231#\300\317<\316\230\254\0302\264\134\011\016\275\356)\307\374\365\313\324\311\267\246\236\371Sl\366\327\254\333c!", 64 }, + { "\024\201\3045\325ty\362\270\271\253!\260hE4\220W\255\240\277\377\326\320\202\206t\264I\324\215\204", 32, "_\271\352z\017\375Q\326\256`\372g=\274\261c\367\033#\275\356\0242\315<\220[#\023\371\2636\3131\360:\324\375\242 mC\227\315\220\302\006#\204\273\011\252\245\002\026\030&_\241:T\215(\002\372\213\252\331lX\017\370", 400, "\242\304\265c@\230\004N\354\001\252\263\211\037\201\276-]\015g\365\204\323\252\355\272\3165iB\364\357HS\345\253\303+\006\251g]\370\323\204\267\346\031[#`\225\343\272\201\253Rxn\347l-\3050", 64 }, + { "A\316\347I\012\032\011\224\206\310LF}\377\212\035q.\031\206\241Tt\346\252\220(o\223\272\325\257", 32, "\011\025\200\201\221V\177\373", 500, "C\275\213\366A\324\330s\323\322\231\342\353\355F\226Z\253T| f\331\134\377\337K\325 ^[#\275\012\231\325\032\362S\371\027\312\223*\356\222\364\226\042\311\006\260s\360\236\034\253\310\357\365\265h\374\236", 64 }, + { "663\230\3430\362\027D#\210\010\013P\017\224>\020\005\216\272m\006\035\225\355Zly\221\005\223", 32, "\335\374\334\026Y\254Z\211\272\353\306L\354)\251\002", 500, "\022e\035\371\012\311q\335%W\011\312B\377\263=\376\214'\275}K\254\221R\205\321\212'X\221\354\337_e\327\362\372\323\320\311\300b\263\253\273\020\305\302\251\002\266\005|F\245g_?<\361\314P\201", 64 }, + { "\031\236|\263)\012v8?A\033\332\003\363\2020sLS\230&\353B\031\242\010\245=\027\217\037p", 32, "\012]\202\012\2107`\233\373\265r\217\234\273\213|M|\315\357Yue\327", 500, "g,v\236\024\021\267gL{\262\341\213\346\356B\250a\361\354\276\267-\313\201d\211[\001bu\314`T\036\134\212\022\330o\366_\254\3731\354\024Z\300\272\250>%Y&Y\354v\271K<\316\246H", 64 }, + { "\301\031\014\272\325+ \361B\361\360\204\343A\230\220l\221\017\337\250\316\134T\351\211\037eO\305.x", 32, "J\244-\214\267\363s8\302\242\237\204\351\274q\204\3478\227z\263\311u\312~\336\317\250\241\341\206q", 500, "\316\205\233\374\320\350\232\001\355\277E\227\230:\372q\230\024\373y\356\264\306F3\2551\320\246\275\025\036\206{\323\264\272f\276\330\1778\262?\235\204\363\363\261w\030\251\242\347}\002\305\223|)\340{\264\257", 64 }, + { "\364wG\247F\300\250\203\364rB\337\311\272Td\221\207\034\251\303\265\217\014\273P\034\377\342\254\363\037", 32, "\361\134\360\257\305\010\030w\345\030Y\244\236\002ge\324\326\340\276\022\362\335\353\366\362\205\307\020A\232\274\034\240\366\274\310C\242v", 500, "\260\311x\272\213L,\223\333U\363\022\355\366?\231Fr\227\025\253\321\203\025\013M(\033\300\302\226\256\272\344\370\217\034\256o\376\325[\004\035\007\004M\220\005\334y\234O\367\334wp\2750'\032y\306T", 64 }, + { "t\246\251p\322\247`B\337\225i\007\362\317\201\023\010\263H]\373\344\226\005\304^@z\226\210>\250", 32, "\315\310T\325\200ys9\324G\3320\034J\376\024\366\365\310\351\350\221\362\251u\372\334xiUD\205Q\247\206\276\232\204\015\2034\264\347x\303\270\375[", 500, ">F\372\306+\2150\024\263\031\340\226\215d\350\373!\237\272\263\340\362aBZ\354\263N\377!r\351\307\223\257\215\224\322\305\253j\016\201W\303\3706\177%\262$\212\334P\015uwj#\267\037(\254\204", 64 }, + { "\351\275\340\351\264\341\017\033f|\233\331pOK\277)\013\354\312\356\211\344@(\320\321\322,\367Z\212", 32, "\360\340\021bp\367\336\246\352\231\244.\232\370M\257\204\033/v\236\226I\215\033\243}#e\362\030>g\361\242'\334\220\177\003t\353<\370\023f\034\354\177\017\267\013\335\315\350\355", 500, "\001\266i\240c\265i\314\204Y\252!\335\042\373\211\332U\303(\273\304m\261\020l!\360\300\006\376j8\2547E\037+\242yO8\002\377]\256\245Q\032}R\343\311\344H\353/\227\3566\270V\263D", 64 }, + { "\217\025\363\021\024\006\013\355\005N2/\250-+\3704\354M\001t\245\000\233\361j\324:\340\266D\036", 32, "\177\226\351\134a]/i\247`\370\346\243\006Q8\302\211r\021gQb\006\244s\350\273\303\202\220\236\341:\372\026\335_\247f\203\254\303\010\231\035gG\252e\375 \326H\3469\270\014d\215\273{yw", 500, "\270\334>\273H\035}\215\322\350,\353r\212\020\362Hd\033\214\021g}\366\352\346\2725K\022K\217\220z\221n;M5\024\012\310\225Uv\377.\203\260\026W\351\000\263\003\266\017\202\324x\313~/\302", 64 }, + { "\214k\277\217\215\031\022\204\207\011_E\321BRrkE\020\015\375\223\367\346\370\013f2\306R\217\356", 32, "\307\337r\321\366\245\307A\013\015t\352\362\006?\245 \333\334\264f\260N\250\225\341\030J\334`#\263j\275\231WU8\366\203K\223\365X,\266?n(_v\347\303\305|\316\207\013\042\251\233\232\011\324\3714g\010#C\241\336", 500, "\007YI\203\310+\236\336\020\221YU\351\376\232\266DF@Y\006\226\242\256\270r\303eO'\366?+\323\032\225\345\320\015\227rsge\317\260\342jp\231\372\306nG\350Mx/\337f\2757\0121", 64 }, + { "\134\355\220\225k\203\013\271o\037N\364\237\343\352c\336:\335n0\213\247\365K\204A\253\005\205\211=", 32, "u\267\316\322\344I\327a", 600, "\263OO\366\217\232\213i\216se\234\231\2740!\311#\256~2\267\134\025\367\310\020\3541-T\223\227\025\010\276\212c~\265Sf1\200\017MO\002\006\352\374\316}\313\032\317\221\007\322]S\224jl", 64 }, + { "\014\274\263\346f\231?\005\223\3336\036u\301z\361\324\277\351\013\320\244\247_\365\315n\222\345s\023\134", 32, "\336I\3260\310g\341\234\3012\376\205\002\301f\311", 600, "\362\246 u\364\216c\037\232*\037\253\031\335\347\022[\007\256j\303O\225\270\204/\031E\244\253FdC\272\305\233i\343\357\327b\273\241j\243\261\321\255\345\304\365\363\337\277\222(&hL\325\361\011J\266", 64 }, + { "YC\314\276\211\370\003\272\320\325\232?v\203\001\274\2738qt\256\330\365\276Ad)\256$5\353v", 32, "g\346W\016*\233\311\344_\267D\346\261\322>\031\274J\300A:\355\232\330", 600, "\304\2457j\205\3131Z\021oA\234FI\254(O\026\334N\017\324\206\033_C\375\231$\314\270\212\245aV\035+\220GC\264\035@\241\231\0124\235\014<\334j\257d9\355\301(\236\226\210$\235\230", 64 }, + { "\207j\363\010\013\313\273v\326\270\265e\260\033\313\3237\211*tQ\366\215\216J\212\235\324 W\035\033", 32, "\303\374\023\372y\363\307\320(w\236\200H]\371\262\010\006\020\361M\030\346\222\361\216S!bc\3612", 600, "Y\301\037?z\341Y\350_\374@\210\324\274\014f\377\317\023\303lOh\032\253\035\332\217|\375.m\203\031\361^\320v\323^ s\031\347\215Z\012Zj\335\206\363\024:F\310\035\211\255\216\301\203\251M", 64 }, + { "\216PY\256\343yt=H\205\303\011\353\232\340\2630^\021\365\266\004r\001\307wV\251a3k\370", 32, "I\256\322\255atb\305@\004Z\352H\032\205\212\254\215", 32, "vU\273'/j`\351", 700, "\360\255\227x\024|z\360JY\364\273B\240\037+\027\376\346\207?\030A`K\216Ba\366\241^A\030n\027\363\225\301z]Y_e\012\273*0\222\274\242\313Q\003\201\336\034\210T\361\2268E\243\303", 64 }, + { "\352J\265\255z\256\252C\363\273\332\3044\351\214\311\012\2516~\226\355\225/\347T\264\260A\330\377\355", 32, "dv\016\032\340<\207.\260\037\354\234Csm\337", 700, "\360|\337\257\240\016)LW\230]\035T\016\001\256\252Ew\222\016\003{yE\025^A\274\377\346\265\370W\361\336`\352\0118~\241\356BW\272\315\260P\240\273\273v\322.P\322\301\177\033`\317\244\346", 64 }, + { "Q\026o\230\010\276b\336kNrzjJ\021D\302\364'\353'1\202\345\207\203\207\201\034\203\000\257", 32, "lwS\255\204\030M\357jIx\363\301\271q\304!r\215s\356\322\340$", 700, "Fx\263\350\210|\223Thrl\326\215A\366u\2168z\225U\255\314_v\020\017\314\025U\304S\023}N\021\363a\314\267G\2444\205C\200\011^Q\253{\216}[zfQG<\232\242r\314\334", 64 }, + { "Y+b\271\212\342\325\025\343\277\012\223\0121\243d\004\240\342<\205\013f0k\307\254\335\014e\364\261", 32, "\343j4%\254\352o \0116ksr)-\341\366\366P)\021\362\305\305\003T\204\302\317\312\313f", 700, "\016r\343>\207\376\003\177dw\037AN\262\334\017Y\236\374L\253<,\226\027d\317;\250`\216\326\334d\251\355\300i3eV\241Iy\220\001\356\035\364[\303\220:\242|eN\313\354\3039\3309\272", 64 }, + { "\354\261t\321\217\227\3512\321}N\214E\257\251~\006\014\372\200R\017\261\007\021\220\371\370@@P\222", 32, "\277\301+;*+3M\352\373\365\246\304\356\250nf\320-\241\325\244\306\357kXYX\325R/u\326*\277\265<\200\360\270", 700, "\265%\225}\007\257W\255.\306\000\201U>\271\330F*\253DD\317\021aj\374\223`3\367f;\026\010\342f\0150o\232\303\015\377\017\205\357%\277]\277\216m&\236\344\366\313?\373P\214\223\000\324", 64 }, + { "\310F\324\335\367\301A4\252\337\342\331\016\000\241V\341>\237\034C\204\301\276\255e\276q\341\3778\301", 32, "\214\222\134\343\224:\336\012B\323z\310\262\021\205\225\216<\313|\227L\267\024^s\316\257\014\2259\261\371tB\242\373\366\232\374\353\336[\343\026k\307\256", 700, "u:_q\370\012\235@\315X|\367\377C\217\353(\3051a\251\001\003\226\205\342\227\212\306\337$\274\201\212P\315\017\221\347\006\021\230\354\266\200.v\213\361'\320\227\331Wi\034\374\346)\332\273O\372\225", 64 }, + { "o\210\323\375q@\013U\011)\020\252TE\206\233\306\2058\324\371\354P\374?\212\235e;r\207\261", 32, "U[{7\230\215\213\276\344\336\223\322,P\214\360\205\007\202\276e\005\025H\2048\212\247Vq\232q\303\272r\273\001=\201\261\265I\311\266\323\206\203\207J\212\323\200A\375!\276", 700, "\211B\011\227\272\0275k\016\015\266\202B\0301\223\226@\037\005\377H#\302~B\020|\002\226\015\242C\342\273T\306\245\376\307\320I\301f\021f\316[_Q\356\210M!\271m\011p\027\361x\316\353]", 64 }, + { "\033\310\253\302A\013u\205\252\020.\233;\372vs\243\275\351 \015G\220l);\265\245\362c0[", 32, "\306\233y\253,\303\222I\343\335\211\242\243\026\320\253\177\211x\215\033\234\177*\333\343~\215\364\333t\326\005\240\256\300\362\015\022\344\212+)\237\277k\354;FFL\323\373\2342\022\001\254S\353\265\253\323\363", 700, "(#\342K\312\320\243\035\234y\366\000\333\023\256\305\042\361u\035\026\201?\252}Y\015=\203\332\235;&\344\027\235f\353\252\235\257Z\042k\377:\346\365l\236\335\035\274X\237WL\342\237U.y\003H", 64 }, + { "\003!:\341;,\031hr\233W\265|O\015!eO\352\272\355\210\304\360\3318q\004pw)\364", 32, "\317\243\314\370\315\317\025\017\002\273\020\344\354\222^\007\217\245\336\362\002\307c\207\376\236[\373`\257\226\332\025\202\246\010\230>\311|#\273\134\322A\364y\354V\021*=\344\326jb_:Z\221\214\203\011\277h\042v\212\211\241\303r", 700, "\252'\212\362^\0326\2114\216J#\367z\024KZIf{~\375\345C\302\307\236\030\002\262\346\012\033\317\272\230\244\320\220\272\242*\021\327\240>k`\222\263DT\231\204';\301i\027.\302\223\320\236", 64 }, + { "\321\334^\2313\347D\003\200\003RyA\002\241\321b\264d\337k]\005\260\265\226\001\017\3361$\341", 32, "6\327\246\342\376\260\013\303", 800, "\304\350\334c\025Q\240R\263\243M\320\011D\351\230\375\257Q\134\346V\303\267i\362\221\277?\323\363\207?`Qx\023\356H*wm\032\343F\017\304\033\327\204\242\2064^\214\204n3\000oqF3\347", 64 }, + { "<\204\330om\325\200\322\261\262\343\010\364z\017\317\223\366\313\311'\263\344V\270\134\2008\005'\267K", 32, "\015<\014\200\270\270\134\036\277\352\025\350Gk,\301", 800, "\331[p+\273\317\247\205\026\353\262\311\226D0Q\273U\014\366Rc\371\346>\255\206Z\253\260\267\226\200\321\357\134\3309\002X\014\015\241Wu2Y2$\331\265M\267\377\262\255r\252-\021d\201\341\217", 64 }, + { "\206\362\247\200tY~\344\264,\2113{Myk\366\370\3025\310_\343g6 \261nK ~\310", 32, "\323\372Uv{\243\026\035\350\261\323(B\257.\334v\024K\016\334\227\034\266", 800, "]\275\033\351\007\357\036\375\264\375$\360\322{\213Jaxg\027\21729\251\357\274\246\222\267K\271\351\237\321o\2451\035\310\2423\267|\272~\254\222\030\356c\003\240\337\373\231\033\270\340\277\240\3505V`", 64 }, + { "y\207\206\361\236\374\200\304St\364l\263z\244\375\270!\355\334\370\205\372(\027#\320!xij\313\314", 64 }, + { "\200\364\370;\271\323\015f\203%k\217\262E?*\305\243\211S\370\010fV\255\271IA\312sL\303", 32, "P'\305'\353+.\324[\364\241]\231\231_\215\357\004\345\322\2315\250F\335I\3471u\026\325{\204\241l\235\365\233\357x", 800, "\226v\235\300y\206\023\337\027\266B+1\377\312\214/\027\343m~\036\361\222R\024}\337S$\003\001\330\317cW\200iKJ\362sy\227\307\2670S\341;\252dE\343\217\375\270\206\373,1\020\352\312", 64 }, + { "ZN\344\3253\000'\217\224\223\206\257\3662\321\235j\204K\236\264'\312\030\327\276*\363\001q\272\223", 32, "\246\017~\226\231#gE\374\224\224E\374d\367\301\027\336XL\242+-\247\227\020F\215e\354\020i\272\214\271F>v\030\230t\007n\263\301\275\231\214", 800, "\332\003m>\274\2375.p0[\0234\037\245\256\227\2617%2\374u/\201,\316\324\200\323\225a\242\023c\332\233\211\342\254\011\230\032AV\235`\246PC\222\301\222/\342\354\261\251;\3505\357ey", 64 }, + { "\371\374\236\365\2432\210\021\205\300A[\365\017\207\2611\252\236`\015\031\205\326E\324\010\253\037\312\267\304", 32, "e\316\2516%\025\333\014\300QA\220O\343\366\001J5\251\353\300\262\262A\2748-R\025\027\263\227z\231E}Z\207\017\250\365\030\001\344\231\376\002j!\375\317\206 \347\3046", 800, "S]:v\220\373\206M\244y$\240\260>\030q\335+\206\205\305\361\251\326\0039\332.\034X\250x\004O\016\221\022\027\001\022\221,r\377F\262M\307=\033\042\341\312\014/\024v\224\265\200R\363\223|\360\235\200qp\225$o\201\020\2500\375\024^\217d\347*\355\257\211L \007", 64 }, + { "\206\307\0424\261\034\255\242\033\233\205VS*\003W8\226n\302\042\263\366YL\343\033\256'R\007\331", 32, "\035\241\217\002\364\341\305\313Cu\347@)\020\376\336\372\375\257Y3\202\237\266\365)J\270\351\265\310\212v$\201\207_@u\013\301\177j94\202\304k\345W_\324\310z\215_\304\2554U\236\245\314\330\313r\271\001\335\0075\322", 800, "\237\225\217\301\200\264\242I\240Z}\303\365n\227ps\365\302\013U3\373\311\273`KQ\354\360\335\212p\227\245h\332\225\374\375\374\300\261#[\240\246y\212\013\332/\342\212ns\243'\243\036\023\375\002[", 64 }, + { "d\375\042\033\372\337\277O4\004\270\037G|\234oY\032\214\211|6\374\374\207\221\205\261Z\034h\362", 32, "\332jcz)%\345\206", 900, "\312\233\266M|)\265Y\277UY\323MYj\034\203\011\353\215\361\247:(/o\270\321\362\034&\302$\2402\277\260\262\371\231\030\204\373\230;\276\371\000\323\302\025\314\027\205\035\2404\257]Kyl\363\203", 64 }, + { "\272\211\350\227\343N9\013\232\254RC\003\362)-M\324)\211\002\343l\331\300\177`\255\373\017r[", 32, "O[\2002X\323wW\374\204vg\355\270\003t", 900, "\243FM\260\206\333G\331\341\347\337\336\001;rr\306\343\211\360\272'g\207>'\224\334\2664nLA\311\221\321\030\024\015\036\246[\224\364P\270\223q\221QN\254\272+]\246G\337z@\211FQ~", 64 }, + { "x\357\024\247\310&1j\252\035r\024\301\217\241\012\336\300[\342\201\312\335<\307y(\273\321Wp\323", 32, "u#j\303\340\326h\242\367\023&\377\334M\201\202Y\342F\205\241\357\220\036", 900, "1\343\316\341e\365\233Z\355\313\013\021\302@\027\274\223\342\331\367\343z\353R\276r [\273\344\332~\015\311\255\324\325\014i\266dH\357s\3040\304\002\355\257\274\022\212\346\27511\300\272\215\210m\042|", 64 }, + { "Y}\011\134e\265|\3432\274gZi\334\340\320\011E\360\353\033\374\373\004\023n\025Z\325j\036\003", 32, "~\034V#\3239\346\017\020m\212/\203\370\372'\341\005\021\246\304\341v\352\275\224\036M\313S\211\257", 900, "\377\374\030KE\325Clh$K|\350#Ns\267X\3442\031%\270\012\024\17744_P\317Y\244\316s[\240\312\347F\305Q\322\021\013D\350\022V\014\2677\017q\306\361\222\260\306\037\257\236\010\263", 64 }, + { "\301\271z:r\325\332&s\200|W\361\220\270V\327\337\376\266Q\343/Z\224\245\021\226f\012\227\321", 32, "\1342m}<\220\234r\367W?\235p\234k\216.Z\260Q\304\212u\006\323\317\3103\300&@\257\354\276\245\311_9\004\252", 900, "\351\010\311ad_\347\271\204\243\007\377\311\236C\027,\215e\200\030\024=:B\253fp,1C\221\311d\214l \317T\027\376\030\320\204o:\362\235h\270\366\353\001eJu\004\202\300`\215%\355\201", 64 }, + { "\241\371#\267\251}\342\250k\275/\364dhP\000\340rX\010\006f\241\371\377>>\032\370\265h\253", 32, "\333/\273\006\213P\330\305\304\357\357\324.A!\002\250\210brD\302{\026n\007\350}\327,\371\260\240\322\253Q\243\266\254\037\001fm\233\257Z\315-", 900, "\030{p\375!\357\134*\353\017C%\217C+\225m\005_\206+\004 J:N\370\367\2041o7\241\236\222\261 \313\222\177\340\134\376r;l\224cC\035v?\022\316\321D \372K\214\317\216A>", 64 }, + { "\014b\217 (,\360\311\026\343\360yQ\215\363?\030\3467f\352\251%4\361Pt\037\261\371\014b", 32, "\032\257\353]'\003&l`\315\012\274\356L\346\001\255\303\3150{?/K\270\305\346\2311$O\244C--\351\004\206n\327S\217[\134\274c\372P}\243\355A\354\266\207\006", 900, "\007t\223\367\034\352H\312\205\030\314|\272\240\360\362\006\002(@\261\224\004\225\204Q,{qhp\240\271S\340B\015C\376f/\370B&Gf\024\022\312M\262O\316\177 \325i>\274\377E&\220\220", 64 }, + { "=`\230\314\234r\206\304\134\367\363!\023\2774\301\323\026\011\366\265\265/(\343!\007\335\242\214P\012", 32, "e\024\351\002y\227a\260\331\026\213Y\267\251\310*\230\030W\214p\255\230u\001j\3704\315\375MSX\030c\336\306w\325\346\262\2640\255\2465\253\3334\337Nex\234\334\216\316\314|-\257\017\022(", 900, "t\221\347C\244\016:\216QD[$r\347\227\325\256\343P\203.\012\277\3216N\241\351!\037\211\322U\017h\021\042\352\030\221=\317r\306 \367G\372\270\214\004\000\207n1\3646\344\034\371R\215K\305", 64 }, + { "\355\361\227|\310\247\256\014p\026\017\037?\364\277\355\314\030\236\306\032\306\240\321%\262\256\265\244Y\216\252", 32, "\263\354<\350\215\312\311\366\242xX'\234\312}f$>Ez\327\023x\320\355\331'\372uF\231\257\251^\034\364d\230\022\304\245\322\261>\325,\273\357\303\311N\3374~\323Q\014\342b\342\025\226y\307\245\026\231Q\266dm\215", 900, "\325\361\300\010\312\311\037\017Mh\310]\254@NC\324\205+Y6\027\362'b`x\353\007\211\035\264b\005\225|&\321AH+W\007z\377#\361\274\265:\371=\257\225\361ec]\315\203Jv\203R", 64 }, + { "\242\341U\355j\004k\356\204\330\351ufb\327\337\357A\223\341\233\3668\220\352\134\247\202\373\006\310\323", 32, "]\331\327\016\205\272\246\206", 1000, "?\230\007\216(\272\307M\015J\344W\242_\233\230\2201\243iM\254\362+\254\333\3658I'\335\241\377\2061\013d\212T<\327\201\257*U=\014\226\321\251\227y\370y\016\216=C\363$j\272\241\365", 64 }, + { "\017\376\364^4\254p\016=\353\344\366\352\006\227)\030\357\004\263R\373\177#\211 \335V*[\344\257", 32, "\3722\017\275\232\262\323fcgiW\232\224\262f", 1000, "\373P\274\357\005\026n\3021wkI\355\325\026\376\021", 64 }, + { "\042t\014\315\227K\273\323\237\220!\270\0172O?\2645\030\265J\325F\343!\241\344\323\301\241\024\272", 32, "\316\027A>\233\225\212m0\037Z\277d-f\017\200\303z\334Y@\261\230\254XT\227P\301\260\014\242\266\244\262f\334\365\324", 1000, "q2\353W\236\364\266\204\340G2\337\224;\220\223/|\2132\202%\215+\362\023\340>\210\360]\217n\374'\353-\010\217\000\212U\335,\012*_\325\001\370\037\322\007uCu\037\331\242\212eb\343\035", 64 }, + { "|{v\001\223\245`d\005\263$\321\225f\344\340\010,\305\273\025$\370\275<\315\373j\304\226\350\233", 32, "\224\263<\367\330\351A*\260\300\235\337))y\221\367\306\373G\324\266\227\372\027g\013OH\321f\326\025\333\334|\013\002e\005\025\205\004j\212\206\244\216", 1000, "\341\371\031\340\344\313\002M\255\020I\333\324\265\242ra\371mhr\017\214\366\274\337\200l\336R\305\276F\024\264\035:'Hg\231\245\217\350\306\251\376\032\310\010\311\250\013\354Tr\017c\367\241\300\031h\211", 64 }, + { "\303\341\317.\250\305\257\235F\324\011OjZ2\312s\224st\2041KS\233H\022gm\354\276<", 32, "%\264\212\004p\266<\314:\376\324\250\341\3151\251 F~\223\267\032\252\245\370\001[\257~v\363\242\253\240g\042j\306\233\336\312\042\345\257:\266Rc?\011$\344\313\267t|", 1000, ">a>\272\354,h\337\205\232\204Z\212\230\257e\307D\322\263\2539,\264\271!\034Rg=\201\334~\201\252@etE\326\241Q3f\205\314cc\237\216\373\272>,\0112\010\273 \307\332z\223\274", 64 }, + { "\211\211\354\215f\332\255Z\340\337P\031\217G\266c\200J\323\042\361\250[\210\022\007R\341A\017xD", 32, "\256\303\241\352Ij\317\253XL\262\221\031\375S\343\275\225\301\033\356\264\332'\014\004\326\230\036\275\002\325\260\301-2\223\247\0041m\251\210a\356\251\274\324\204\361AP,\312\025\247^\363t[\350\223WY", 1000, "\311\035\334V-zy\017\370\244\203\300W_f\2177\002\237T;\301\261\221G[S.\037\2030`1\321\010\300(b~\371\217\034\301\276\250\023\2462\342\374\332`\372\204x\035\247\012\237ju\275\224\362", 64 }, + { " \313\304\230\206\234\222pk\244\005\2711u \340 \223\322\345\002w\275\020\324\316\224\325\036r\223;", 32, "\372\344\357\324a\333\254c\215i\177\320\300\242\020\025[\005\3252;b\277&@I\270\015}F.;\242\304!\177\343\012=U\253\253o[qR\371\201n\357\361\330\277\253\346\177^\332\042\322$\201\377\340.IOk\273\363\005w", 1000, "\310\012_\254\372k\220\263\272\361\134l,\345/\371\371\357\237\301>\205\237\237m\036\272~^L\355\0210X\221x\331\0256LD\264(1f\357\014#?w\034\023'\210&\355\261\235\361^\004\277\313\014", 64 }, + { "\373\253'\357\233\227]\260\212\305\037\273`\364\001\032H\177\203\342\012\022\225\2572o`\240\277|\275M", 32, "U7%\340\031!\012%", 2000, "\024\2525\230j}\315\267\244\345e6oY\226\027\347\017\336\134\316\355*\252F,\034\247\267\270'\017\245\201I\2735\205^\205!\205\312\221\352\216\270\274\222\276\011 |-E\301#\240ifGA\375\210", 64 }, + { "\207K/>\226\027\221N{?\037s\003\323&S\243\355$R\361\254Q\026R9\2540\231Zx\374", 32, "\314\260\226\231\312\037\245u\230\345]T&\037>\375", 2000, "\010\267\374\351\370\303s,\323\030N\244\353\252e\275\205\253\206TL\340\3205E\004\253\204f\220\362\330\231\037?\204'D\274+\367\363\316\340\340x:\230\254\313U\016\347\023|G?\363\017\037M\177l\321", 64 }, + { "\215\3425\215\223\0224\311Y\251\213\337\240nw\233\343\320\335\244U!\300\023\023\347\012w1\222\011\263", 32, "\010uJ\261\030JR\357vV\257Wd\012\004i\257\351\360\266\303\200/\256", 2000, "\211\243QK\231\376\321\212\322\350\321*\245~\311+6S\013E$\351\217\227\224\217B\006\230\212\251L\264\245.ZJ\350$!u\000Q]\021}`\022\370U\364\224\215\274%\353\333Ys\177*\265#\314", 64 }, + { "O\2649\000z2\177w\372mk@\345\277\270$\231\330\246\001\334\350\271-\264\343\307\342Nw\231\221", 32, "\201VZ\223\246\217\224\263\241AO\325\367\251\031\322\221\200g\354BM\2600\340x\276\307\246zIT", 2000, "\316\341$\022\261\303\322yZh\227\205\310(\347\233\326g\031\220>\011\226.\352J\242\311\274\247\211\010\355\336\220\214,\2440\214\311\241\253I\042^\257\361\336\241\360\177UB\356G^\325\203A\3040,\042", 64 }, + { "\177\016\252\362g\010?|\0168\364*!(\042\343\015]m\253>\012\012/\3471\205\015\321\014jh", 32, "%$\263U\023\275\273\230SxJ\363o\373\241JK\234\252<)\207\026\302\267\215\016C\357\014V(\021J\336pq%\360\214", 2000, "\301\365\314\263\264K\025\305[161\030\015\211\207\0358h\020\231\042\351\031\323\253wC\320\330\351\205Nm\216\024\033\201e\324\037\354\006Z\331\305O\335\272\333\233\243\262\271b\023/\342\320l\177\311L\000", 64 }, + { "L\027CQ\252\262\232\343\237\205\245\344C\014F4\134\210\345\213G\256.~;\240\252<\332\202(\032", 32, "\313\376\250X\267T\235\320\236T\242[\255'\0117\207\332 \2130\242kz\246}\336\321\022_\316\377\323}\340_H.\001\337\327\205\372q\022\355\013m", 2000, "\302\002\343\242\245\365L\016\366\205WD\242\015\330\375\300\357\357\020\206\344j\237\022\002\036\247\265>\350\036\212\027\242\325\2135a\320\312\344\330O\366\335=h\253\330b\216\221\017\031\026\027\233 \260\254\204\345#", 64 }, + { "\013\207\005\265\235\252\020\354d\367\342\006\341\2004\311\021l\000\256\246\241\342v\342\026B\225\333&\214L", 32, "xW\265\230\242\345\002d\230\216\315\347!\232\272\3751J7\3271\011;-\3309:\207\374\204\244\203\244\333\026\011\344\366\134\364j\324\004y4\347^\005\313\202)_\030\217\236\355", 2000, "F<\236\376\203\266\204\306\361\367/\001:\220\350a\366\035\326\374\332\244\304`\202\367oA\335\331\013\330\204\361\353$\347\206\345\231\005\231l\215\013L\351\302\267]\244\006\335\374G\342\311)\245q\301B_I", 64 }, + { "\241\021vc\346\211\270V\212A\302t8\233G\232&c\001_\263\211k\232~\241\001\305z;}\204\371F<\200\350\260%E\036\374\013Nu\200\242>\321\234\316Y\232\375\220\036\243C\250)N\375\341\3775\336\357@O\232\304\225gH\351\270\316\003V\364\003\206;\352.\320", 2000, "\360\350\222\354\320\364\042y\245\343W\2413\024\250\221\377\245\325GH\277ZAu\274\026\265\275\231\304\2722.\010np\217\302f#\346Z\347]@\216a\302\177F\233k?\326\337x\301}\230ek\300\332", 64 }, + { "\030\344U\2107\244N\237\230d\255\376\324\213\343l\224\201\325\027Xb\201sH\200\245\263\244\035\005\300", 32, "]\371\274\014\217\177([--\347Z{\021\350\330\301\134\255n/&@N/\177?\2006\2026\360\241'\3025\215\362\253\322\027\034\201mA\353>3\247\366d\327\007g\335Z\367|L\026\234\301\340\016\325\204\261\244i\036\016*", 2000, "\225q\223-\325\221\257:\351t\266\032n\250\357\002\350\003:\020\242\302\236\311\245zi(\333\010B.\311\256>\265Uue7B\030-\243((%\332\362\303D\325\242\314\243\321g\264\201\331\001@\207{", 64 }, + { ".\356\217\343\212\004\001a\027\213\207[,\042\231Xj\221\315\276HB\037F+\372B\251|\265t\026", 32, "\330R]2\031E\351U", 3000, "Z\271\372U\365\246\007\342\272\236\251\271%V\347\027Q\303\237\356\304\242\220\231\026GJ\011\031R>\252Y\223\014\017]\311\365\265>8\370\211\323\014\2027\225\304\030\273\000[Jj\204\015\025c\211\302\361\331", 64 }, + { "\333?\003\246\275\035\007?\027Y\354w\012\344f$\3309\030Rf\263\366\306\350]\332\002\221\346/t", 32, "\361A\234}\315\361C\366\227\177h\325\235'\001\205", 3000, "f\367\374\346\006B\013x%\010]\371I]\256F\042\264\334\233#'\013\271|\347\355I?#7\266\257\253\353\027\217\025\276/G\334\020'\271\004>A\033\233WM\237\377S)\347}\2357\252=\277\313", 64 }, + { "\334\276\227$\003\200y\2567l0kC1\3330\310*x>V\273\021\015\305\246=\250\353\361Y\221", 32, "\364\023\034&\371R\363\231\003\342\350\236\0131\333u\266\314\327\266-8\243\374", 3000, "(\004s\333p/\003\201\333\376F\024K\313\004\374\371\310W{\037\313\377J!\304[\303:\3329\340\200E\204\177\212p\235^\221pu~\270\361Jvl\267;W\225\034\311Lm\371Yl\301Q\032f", 64 }, + { "\221\326\310\317\321-OH\334\006\007P\374uz\213\300\226h\231G\2220E\237\235\323\030\235=\316\267", 32, "ZO\241\0178\261\034\025\311\353E=t\353\331\003\364\243}\005\343\364\006\340\024t\341w\310\303\235\035", 3000, "\363Nm\010\373\315G\216_\354\021\200I\242]\014y\026u\301\346?\273/\304\213z\264\231e\322\304\010\217\205\303\204\277.\234\371\22699L\242\342\313\027\210\316\026z\252\215\235\307\347\361\002\306\037D\302", 64 }, + { "\032\370|S\365\270uTK\326O\353r\255\271\034#\327\307\370\242\262\374\266\312\263#\277J\215\251\362", 32, "\301\225\303\340w\312\303}~\011+\261z\216\320\220c\237\250\037\011\253\300%\267\011q\224\266z\271\025m\266\361|\341\374\301\007", 3000, "\364\037VE\343\326\327v\222\042\300\250\272Mr\036\023\270~o\316\314?Z\321\232c\261\374Rq\020~\032\344\333\134\272\223)\035\005Di\205\345\012;\3076\227\205Y/Z\350\016\236\317J\253\323`=", 64 }, + { "\245\223u0\342\000R\223\240\033e\340**\244\254K\302\031\363\177`M\240$\247\361\317Y\220\227\344", 32, "\372U\371\002\134:\304\002\023\314\037x\372\231\375\241\210\360\224_}r\334\302+\372t\2741I6\035\232\226\036\336\012\211\316\260\205\220\3374\316\256m\343", 3000, "\273\361\376/\034`\322Sy\031\333*\033\134U~$b\362\363\236\361$\313H\022\243\203\306\352\314\375\204\347\223S\246\314\230jB,%\241\000\335\237\364I\000\215\266\300DR\211`\322\271\306\026.\215\341", 64 }, + { "\273G\256e\220\336\234\0325]\177\324\012\204\230\031\322\023<\020~;\347J\355\027\244\032\342\304\340t", 32, "A\350>\021x_\311\275\017\322!\315\376\357\177t\236\001~\355\315Tg\344_\012\002j\2454\002 \233\012&\212g\224\221m\242\315\353\250e\322o\004L\005<)\220 \177R", 3000, "S:z\324\320\361s\320>bW\326\0118\026b\316[\021\265\375\273\021\343\031\205u7-.\307+\360W\237\321\236 z_\347H\256q\255\022\242%\2746\032\251B\224\2446^\266\261\177|\272\010\246", 64 }, + { "\367>aQ\260\374\262\260\020\201%\260[M\244G3\337H\200\025g:\002\275@\373H\364Q\030x", 32, "\321~\273\020-L\224;2\342G\223\025\235i {\256\342 =\316e\376\014\215\221\034\252\235\25762\007\210\3158\257(\235\277i\350\272\011\016\231fb\007\243)\307\376\2409\234\011\034\207\262\307\026\230", 3000, "\307\312QT\215\034\320`\314\352\251]\210w&\203\004\2716\352\251\311\311\261\001\220\276\224\301Y\020\241\245\364L\305\335NP#$]\251\023}z\304\351\304?\214\000\354r\323\000\300\220\003\343@Q4\366", 64 }, + { "1\211\332\336\2713\223\3103\310\247]\376\015\275K\036\233\266\036\275\362\211\343\013\312\134b\306v\227\272", 32, "\134\253eO\347\267\226\220n\360+a\374\362a\314\202\304\221oy\275\020\367\201}:Eu\214\303\2002[\2270jFO\245\237<\241\323N\032\200>\314\330\261V\342\364\361S\243\215.H\012gTu\345\212M\026\024q\236\337", 3000, "m\324)\245\253\323\022\134HK\340v\314\270\315)~Y5y\270,T\3453\366\376\360 @\234\362\006\012\216\210\216.\360G\233.\326\363\253\006\031\277q\303&\215O\203\257\214\002\037\223\365\023\022\303\361", 64 }, + { "v\352_\013\314\201C\025V\042\015h\374\375\272=\361\320\337\302i<\264\275H\002\2622\321\3266\265", 32, "\361H\3748\322\242\2249", 4000, "\025\332a\365\371\230\207\270h\260\011d5`\307%\235\311\354\337r\012P\323\005\214\330\202aT\356\202\225(Z1'\237\246\177:I_]@\327\317\332\266E\241\233h$\312q\217\325\256\230L>\353k", 64 }, + { ")2\223N,\364T\011\236\322\2671\214\240\220\306m,Xt\322\025\241\013\276'/\027\022A}\367", 32, "Pv\327\262\275\253WCP\010\004\341,\227\242\263", 4000, "\206\345\207oIg\320\275\200\246~\243\233S\303\330a(\301\367;wh\212\016\243\335/\034\202\201yN\352\200A\261;\226\277\222\230\256\243\342\021\340#\006T7=\324=\013\231\376\255\216\025\251C\224!", 64 }, + { "A\375*|\023?\215\251\2717\204\366\2310\356\004%\206\331\326]\022-\234\372q\243\371\231\314\207W", 32, "\031\003f\276o\314\232\2038@\307#z\312\222\376\007\376\351\346[g\005i", 4000, "\252e\003QJl\010#\235*5+8\210)A\251\250\032<6\003\215\221\364k\211\233\312\225\356\026f\220\254\303H0k\201\2565Adv\236\247Dt\3735](\3508\2602\315\035V\240\247\013\266", 64 }, + { "_\026N\013=\247\000\330\377\233a0!\007H\0054\021\337\027\242\315\361\004\373\360t\216\203\240qa", 32, "<\252\210&-\264*1\312\334\235q\316\011\024-Cm2bX&\356\033\233\207\001&\277t\311\325", 4000, "\002R\002W\3036\276\213w8\007Y\362\377y~#\347\207+\216\225\2272\271Jh9\354*\016\361\2554\233\263\025\353\267\015\026K\016Y\340\340\377\304\015=iz\341-\275q\315Ed2n:~4", 64 }, + { "\217\243/\333S*\205\365\302\330HZ\235\347C\007\003m\364\015,\316\032$\036\274\225\317\010,\244\213", 32, ":\226\370{n\035?\032\006(\257\302\366\036\301\275HI\342\230\303 \230\301\230\226k_2Ur\210=O\3602\253\277s\205", 4000, "\266x72y\026W\037Yu\222\207\244(0K\340\305\233\310s\021\011\275\022\004\213|\210D\002\240S\276\207\000\207v'\206w\271\320\362\302{q\231\355ff\361\374B\022\363\272;\223\316|[\301\217", 64 }, + { "Yf\027I8L\371^\314Y\006*BK\36582A\221\252\030\322\352D_\266ux\377\035\367\023", 32, "\362d\335&o`\242r@\363\2426n}\234\004t\275\213\254\236\020\341\021\304.\042\321\361'o.\002\223[\266\224\233?%\004\337\240\340<\323\267\3039\220u\334\330\242\3239", 4000, "d\315\310\234\260\364\012\230\023\235\2756I\352\305\247_F\260\3602\350\324\2067\353\341-\232\020?\247\302\014\232\253\006S\016\241\320\251\000\022!DA\022\011P\356\372qL\277\263o\303\242\007\347\225\370\331", 64 }, + { "@>\004\006\352\316\314\230\032\255\237\021\276h\037i\032/=^<}}R\313\265\001\270n\267\274\340", 32, "3\245B\276\234\220I\261\336\323\014\353\325?6\360_O/I#\270S\362\331\270\200\360\242Mp\213\361\356;2\316\304\251\227\003\352\327\027\003\271\026\275\230\237\233'\316\003\332j\260\032\014\323\243SO\006", 4000, "_\347Q\374R\016[\274\365~\217(\266\016\364\253\306\365~W\335\223:`Q\301L>\033\344(\253\027\211\372\352.\355\251\233\005\036\225\134\220\034\357'<\031\227\223f\253\240[>\031\344\300+\025\243\365", 64 }, + { "\017\024\253{G\272\276x`\224}\324\216\324W\363\357o\266{Z\347\200\342*s;\3159\036\320]", 32, "/\203\306Y\243\30672\2236\257\335\233\352,W\351R2\004\237n\325y*\3525\371!^r\222\364A\217\311\370\301\3677A#9\212\030q\220r\042\321\031\303\036\003\235\274F\252\134\327XKI\344\370\215\266\316\013\3704\352", 4000, "\216o\275\201\220\001\2209\010\241\307\260\352\274\220\020\004\352`'\3552\372T\204{M\221\202oy\226\223lhIe%\260\325\303\314BX\347\331\316TN\311\332\177\251;W12\006X\376\307\235^\227", 64 }, + { "\375\367\261\310P\032\253\300s\271\362\034Q\000\267\231wh\274[\367N\031\272\313\333Lg\016\233\032\246", 32, "w4\376Oe\334\337(", 5000, "\265\320\254NT0=/r<\341)\226*\376\345\364\004\134\201\024m\020\375Z\216t\212l\313G-\232%\321\272\256\336W$\371\310]m\335\334\242\306\241\367\220\263}F0\216\267\364\341D^\212\251\341", 64 }, + { "\341\3615\215\010Wr\235\353\224\272`%vA\336\2122KT\237t\233\321(\213\316$\340\206\237\001", 32, "\337\362\246Z\225\307J\215c\244\007W\221/m\027", 5000, "z\033/\267\300\001z\320\334\020\034\255m\3321\364d\227\012\247\032\017\370C\031\340$\307TCn\004Y$\017\220\371\274/\350\306\303\002\012,]T\034\301\017\3459\365\252\032\321\316j\231\245\341\322%)", 64 }, + { "\355p\310\241\334\272\230LP\241\235\324\302\312\202\002bm#\375\324\314\266L\212\016\340x\0370\333\304", 32, "\031\3057\204`\205\372\200;\320i\264\027I\007\027\267*-\365K\134\243Y", 5000, "mB\302\302\253l\313x;_y\012{\273N\340\303ohA\210TQ\310\321[lK\015lWL/\252\134iB\224a\265\207+[\016\241\330\005DRam\250\335}\356wZ\006\015\256\226a\216h", 64 }, + { "\240\367\032Y\306a\312*U\314\322\335\022\016\377\213jMmr\244\042\274\257)\267\220\3307\221\033A", 32, "\027\277\033\343S\023\203\300\354nzy\226\254a\307\2146\215\033 p\256\342 \016B1\015C\027\266", 5000, "j=:\035`\342S/}\343\240\311\033N\227\377\327\270|\215\353\241\310\206\042\265\367\206\243\222\315\023a\303\274G\037\245\345\323H`\010\231\344\342\351X\001^r\353\314 &\234\024\002\242\317\021\254\340.", 64 }, + { "\250\277w^\361\217\026b\210\177\306\3461%\252=\266\234A\211\002q\264\357e\232\3257;\036-\362", 32, "\261\363r\305^\275\322\224\3328\261\352\242\275\201O\317\275{\020\263{YD\241%2;\340\352?\366t\300\272h\351W\303+", 5000, "d\364y\350\264o\356\017\320\011\2317\326\027\254\033V\326/\200\276\374\360d\321\265\015\212_x\017\246bE\003\256\337F\265\260X!N\354\031o\216\335O\3278\202\027\222\266\262\356\311]Ok5=m", 64 }, + { "\374;\134\361\232\355\314\370sC\252\275N\372\2732\335\213*\232*\310\352\0312\0047\3758\230\022\010", 32, "\332\205i\265\023\022\002\372\234S\253,W*\303^o\204\316\360\332\353\237[x\030\210\2003eBX\342u\224\363\232Q\262\220\212`$\026l\207\330\302", 5000, "d\021\307\254\221XR\257$\322]9\306}\306aqr\333\224\337M\266\245-\001\2148\203\346\002\032\031ax2\336\230\024W8p\346\310\300!\213\203\241\306|\222\206i.\272\251\026\022O\007\207\262?", 64 }, + { "\204K\335O\134`\227I\204P\241\370G\324\350\313\305\346X\221\312\313S:\371t\341\011\275\327\301W", 32, ";h\002\331bk\375\014\232b:\334\367\341\361h\261\005\266\265\316!$N/i\201\002\272\005\351\212\031<\332Y3A\243\036\303\254\255\317\317\0356\020LD\210\337aU\007\023", 5000, "\002\036\314;\347rW\266\310(9\304\223\015\220\367\334~\3175W\354\233(\372\177n\304)\270\221\352\233\256[\370\320\222\042\202!\265\201\251\262\214m\234N\352\371\314\2724\201\001\272\3643\347\265/d\205", 64 }, + { "I\304\026\242\014M\013\255)\257wq\205\273\337\252\256\2626\233faR\365\262\257\010\010\333@~\322", 32, "\377\235?i\251n\222\2608\250N\304r\353\331\313Byx\236u\212\340\322\243\376y=fv\367\244\303\232A\214\244*p\253\333\134\335\250X\223\320\325R\311\243G\2524\337\344\134I\340E=\253\300\301", 5000, "\335\011\020j[V\242\266q\257^\2139\027XpWl\367G+\224\210\371\320\002\2170\007\223\361s\271\033\374\134\301A\320\234N\357\252:\343\275\025'\012\035]\311/H\341\315\310\303\310}Q\021\375r", 64 }, + { "Dml\351(\305\351#\355\004||\231$h\227j\361\3136\210l\375T\213\315\375\234~dF.", 32, "n\353',\204G\017\242\020\255N\026Io\221\224v$\324I(\246\016\036\035\374[\343\260]\326\021\013ne\371\356\301D\350\030k+\357nGJ\270E\262\035\351R\303\010f\233\246>\326\355|:\2552\003\021\234>dr\313", 5000, "\220\243\001\307\364\032\262\304\372\017\266%r\204;\301!\374\042[+,Z\321\373\020S\014\243s\305\335r\331\350\370\216\277\267\224GT\035\301\030\261\237kge\006\017|z\220\224\274\033\215\201\301\026uJ", 64 }, + { "\270\0170\011\344\012A%\357\323\236(t.v\263l\231\00450?bA\325*?<\251j\256\230", 32, ";\354h\272\035\251\026\346", 6000, "<\220\344\337G\206\302WjF\342\302\323\276\371\3105d\240\376QF\003 VL\024\357\217%\237\331\360g\326\362\224p\322\032\204Y\254\230\227A\2048\201\023AaN\363\264h\347F\222'\232\352\356\042", 64 }, + { "+\2547\326e\016\371\243\360E\373\0228\222sO\203\374\322\204\247\240\320f\227\201\364\371\223\323\216-", 32, "\215L\237\227\342\276aw\036\025\374\246\201\030\010\352", 6000, "oT:^\276\374\027\266\300\375v`Yz\330\206\325[~/\134\364o*hW\371\213\375w&\275\006\011\361\037!j\370\317\337\301\346\234\341\354\225\321\264\305\346iz\313&\324|O\305\317\2629?\022", 64 }, + { "\354\332\023}\256\222\332\241 \362\302\351MG\3479\276\332\334\023\362\271\253\211u\275\200\334/\246\013\244", 32, "\266\243\134H\272\356\332/\011\305Q\357n\371\354\001\020\307\177\333\037\362\315\242", 6000, "\306\231\246\333A\300/\22328l\017\305+\010\037\256\341\202\313pq9'X\264(Z\246m\177\300.\352 \372\20368*\274p\305\033\2251ar\211.\2624,\326B\031\134\335o\033\310\037\2469", 64 }, + { "\327'\333\2626\365\015l\373\244\377\016\314T\205\023\255T\244\217\346\304s\275\370\134o\226\241\000\3653", 32, "\204\340\237\333\347B Zh\352@\2206\262\303\002|\312\203\327\333<\372o\200\035\276G\210S\134Z", 6000, "\334B\327\177g\003$\351\375\134F\266\375\211\212\241\366y\323\375\373_\267\215l[\203\305\370\216\202$p>\241\264\377\032\022\211I\257,:&\317f\245\242w\364*q\037.\347\276\277\275\244\205?\034\317", 64 }, + { "\234>s\026\201USYC\367\314\261\324w\355\264\037\377\236\274\021\3211\006\372\354\201\250o\20011", 32, "'&A<4\356\331\213\213y\222#=_(\361\346\226\350\3564\177\261\024\350\3528 \331\235g?\007\361rYB\003\220}", 6000, "\304\232K\203\301\022\0351\220\354\260\350\311\321\337\023\264\354\256\365\333\215\373\325\201\274\204\216\310=\252y\006I7\250Y\210\204\226N]\036h<\016@\231$\234\134\271\357\307\225\273\331\245\272\2650\357q\203", 64 }, + { "\351\000z&j\354\276\2739+7\300\022\264\327\244\275\345\003\365>\204;\276\217\307)`XP:\345", 32, "\234\365\001{\277}\042\367\222\230\030\327\264\201\016>\241\001\037\336\340z%>\324\032#\352\204\351\212eC\304\027i\205\362\215Sn\226i\215\313\374\210\354", 6000, "?A\017\245L]\214\344\373i?\212\306\252\013Lg\277\015\256\260\001\306C\375\354D\025L\134\337\263\363\025V\336\227\013\237\353>F]_\035\314D\240ES\253\357\210\344\014r\220!\222\220\010\374-\265", 64 }, + { "T\217D\316|\373{}\037\354\234\177S\327\270\016-\231\316RE2\376E\030\245't\005)<\200", 32, "2\316\204\337k\213\260o\273\020-\351q,\220\202]e+\376ci\312\367L'\331\237\035\024\025,|\323\220z\332\211B\314\226\261E:.\002\0238\376\315\320\274.&\233\036", 6000, "\312X.<\3273\237\320\2349\267Rg'\337\230\326~\223\323}\204\010\005\352\035\221\223\244\374\262D;O\2356i0\311\333\360W\203%\321m\037\3220\267\0162\254w\0161\342\320\031u\206\032\370\271", 64 }, + { "D\243\026\222\253]\312\252\020% ^w\024\024\377\312~Q\221\334t\215\377\365#\353\305\340\273\341\364", 32, "r\012Vc\246\013\020\364\221>\227\273DJc\233\2373F\235\001\307G\223\210\260\033\236\361\365J\037K$\372\245\270\370\2402x|\360\033,\002b\307#\305\026\345\2572\325\241\321Sk#\364\035\342\363", 6000, "\342\3053\272\022\221\021F\344AvW~\350\355\314\342|\303\324\315\002U\311\236\315#\2776)\3219\033.T?0\035\264\207\350d\247\247\042w\365\371\262\217\2051\001E}\201\301\034\025\177\016\314\246\312", 64 }, + { ";\370<_m\217w\363\0054hx\333\347:\247\033\337\364\363n\370\042\244\303\014\306G\322\027\323U", 32, "4\331\020,\014\345\314\367~DR7\345\013\2001P\261\273\333\257\306\373\300\033\361\257\256\271\362\302\134\342<\320\301\224\034\034g\033\206\022\005\220N\260\014\207\347\265|\206'Q\323\214\276\305\357\356O\355Gr>\237\204Z\371\354\375", 6000, "\027\304\207\017\213\207_\0117\262Yu\004\012J.\274\307xu\273\372V\004z\243P\007n\363n\222:A\311\351\031\212\2748f\352@\217\347;[@\177:\023nq\260\221n\244\014\246*\361\033\212\042", 64 }, + { "~_\236f\256=\004\026S\320\325Tz\237U\327d2#w\202)Ir\003%\220>$u4\215", 32, "\372v\342\354;>9\312", 7000, "\134\017I=\243`|\314\225\014\263\254K\014r\372l4R\015<\3138'3Pw\214\3051 J!^G\364l\334\037\314\177m\220\247\321\001\307P\317B;\316\037BC\246\310@\250\250\367V\031\223", 64 }, + { "\371\311\302+J{\330+%\236\312\021P\377\377I\235\356\2664\000[\270Q\042\022\357\235\374\307.=", 32, "r\244\035~\327Y\310\266#\364\324D\203hd\266", 7000, "\272\304O|Wj\3136{g_+\347\355j\265/\300!lR+\341\231\2032\322:\032\272\350\331J\347Q\203DQc'4\335@i\347\334}))a\004(\313\255\3220\206\000\346\014\206\206\365\012", 64 }, + { "4\203\215\242\377.\236%\324\260\315@\275i\310C\241U\350\363\3107\337\371\2607\223\036\015:tQ", 32, "y;\315-J\314\274\357\264\210\020\222\007\240\272N\015\331\370\037\334Y\267\016", 7000, "\351\334\341R\305\301\022\273C8\001\000\270i\226\343\304\016z\322d\370_Q\377\2671\215Zu\376nS\245\030Za\374\353\255\305H\024\202\024\0110\037i9\003\363\337\377\304\214\331\207\366\226W\012\307\376", 64 }, + { "l?\242\3334\336\353R\233b\216|C!\013\000\022\274^$xfn\231\237!\037\357k\351\345\374", 32, "\005\276\347\3550\023\213\226w\2313\312\351\253PuJ+\027\003!\255\322\340\006\334__\017\317!\341", 7000, "=\015\237\267?\333$u\274\201\353e\204.Zls}H\344O\020!W\036@\222\362Qp\013\212\225T\274\265\256\024\2221#v\245\254\203K\202\020\355\0118\262\001\333\346\364\332\240\347\017\3227>\245", 64 }, + { "\027\344\376D\230{\335\276\012\027xc\247h\300\221\253\2004\231N\337XVPH\350\177\202\324\336(", 32, "\014;\3008\375\017N\372G\354\331\201\031\263A\027a\351\315\256\344rE\326P\247G\375\2502\262\375\353\344NA\035\317i\212", 7000, "Y\222\200\251;I<\227Q]\356\335\317\263\351\231\042Q\322s\313n\006-P'RKDZ\330\237q\213\332\374c\266\022\352,y6\231\226\001\233\354\027\245k22\312\331^i\026\2764\244\353\306\251", 64 }, + { "\267\366\277\006\327\363\330(~,Wd\275\303A\203\315\016\230\333\327X=*\326yB\364\213v&%", 32, "\274M\257\261N\266.k\356\343p \331wdX\324>\366a\031\362\207\3732\323\302\255\013\212r\003\321:d\220\200PI\010\0029HA\011\003\326\220", 7000, "i\364Q(V\223\200\223\340\007\374\330&H\342E\032\215\2515\3556X\022\215O\365\363\264\247Vwu>\371\320\332j\305\354\267R\323\022\274\232\216\262\361\301\225\3124\004\215=\236\237\341\347\365z(/", 64 }, + { ";~ \241\225\021\325\357\016\232\310=\214\261\3451\270\316\233-\303g\361\216\033Nxz\377\361.\236", 32, "\272x^\233\036p\375\304\204\200\034\306\224\352\307g\361\310\003K\224\276\211%\202\336\346;c\207\240A\021\005\206\255\006%6\312\233G\017,3\230\310\301\202\226A% \0341\353", 7000, "\331\326\014\373X\343aJI\247Cn-?\201B\223\271R\230\015\346\204\350\350w\012Y\373\240\265\020\274\232\000\366\207s\263\360\323\0254S\226i\007\371]\354\314\015aV>\337\303\260f\030\275\214\233\372", 64 }, + { "zt\362W\316\317\032\273\343zzZ\207)ZLm\224\345=\350_\361:\033X\324`\305\306\202-", 32, "\010\306xU:i\204\2235\375\346w6Q?\036\010M\267\275\265\240\223[p\022\255\213K-iKnR\263oP\263\002\036\331\200J\363\365\314\214\036\026\343\304\316\352=a\211\274*I\340.\266\015\265", 7000, "\337\242\214[V\263\350\233\377\006\301\201\275G-\365;\260\241\030\035\355\010\242k\361,\271\344\377bB<\304\242h\357\015\225\313\203\266b\031\322\270\235\376\365\351h\212b\2250\317\2567\254\033\223PLq", 64 }, + { "\004\221\352\003\252\354\313\377UT\030\207\205\362+\004\033\015\2140\004\261Yr\001\340jA2\241\2625", 32, "\256\300\3735\301\013\223\035\221Hl\304mj\340\375\215\254\337\0332\3472\274\254g(.\323\322g\0122\177\347\377\343\353\271t\010R\024\215\331\033\0027e\237\305{U\034k\357\220S\240v ;R\266\177\344p|Tw,\230", 7000, "\335\227U\002aP\016>\270\376g\266\312\211+\305&\013\273\312\262\364\365*\002\227\256/tg\007\341\3777 \351\323\337\031\246\025\227\301!\330\221\032;tX\007\030\004\353\004oX\277j\250\257\323J\230", 64 }, + { "\347\324\310U\204\323j\341\215\317&\325zo\327\025D\024&\352'gZ+>w5\256x\3500\353", 32, "\311b;\237!Zc\350", 8000, "\032\210\262\273W\324\134P\216\315\300\312\325\270\346\032^\031\022\260\372u\313\336\234\315h\005\264\2010\373$4u/\271\311VX\226V\304\261\042B\241A\227}\265jR@O\3651\364!\012w\246\335\200", 64 }, + { "Dn\207\341\204X\030\206\355vO@\340B\275\354\000\023\311\265\225T\237m\013\364\034\247\353\217\316w", 32, "\372\366\303\033\331\272uy\262\371j\302\256\356\334\257", 8000, "\250KJ\204a\031\225\204\016\325x\310?\230\013\2070\322\302\263\231r\264\001\240VR\237\270F#\330\353!\337\330V\256\223\357\262\030\2421\205\037x\272\305L\350Z\031\245W|\360\325\305w\223\020oc", 64 }, + { "\355\015e\250>p\225X\225*\011\316{\311\244f\364g\372\300\336\351=\216-W\324\257\316\373i\376", 32, "\226l\330`I\331\035r\203A\354~\251\373^yQK\322\343.Z E", 8000, "70`<\225^\221|\350*\017|\244\004`\317\221\134\376\352}%\245\324\360\216IY\042\311l|\201\350\230\210{\346\034\271\264R,&#\001\337\261[I\357kBl\336\335\213T\352;\015\024\301\033", 64 }, + { "\317|uV\275\303X\214t\250w\274\335\0028z\376\025\223^2\326F\250i\006\024\006Jm\303\017", 32, "\012\375\360\206\245\022J<\212H\177\267\247\370gr\326\322\251\011\324\331\010B^_IC\317JP\327", 8000, "`n\314\361\221\2161\263%w}y\006-\323\010S\354\240\332\026l)\325\266\023\013\036.\273\000u\247'\273Y\316j,ap\345\206*\264\324inn\022\203tj\260pb\023\210c\306R\234-\320", 64 }, + { "\231\230\221\276\330\2648\017\330v\311\346E\364\272<\037\243'\355\356\252*\210f\006\036\206Z\346[I", 32, "/Ws\213\262\202\020\005n\351i\334\233\303\375~\374\341\251]\227\247aeU\246H\263\031\035\015[\250\316\205\031{\222\016\205", 8000, "T(\016UCC$\370\236\251|\013s\237\023\325G\014\327\376Q\013\306\244*\233E;\014\264sZ\2449\242!m\200\243\264\342M\257\0350\370\357\224\373\262\201K\023\204\334\320\340\016y\272P\311A\217", 64 }, + { "\372\310Z\030\0367\234\257\361J\306F\267\310\216\2069+\013\224\275T/S\257\3554e\177P\243\134", 32, "p\237\036hc\362\305I\350\222\316\022\310v\240\240rE\200\277\241\212\245\330\260\035y_i\374\332\240\304\031w-QX\357\022Q\025\343n\371\273D\201", 8000, "c&\346\353\305F\004P\307\212\3268\356\255\252\225vy\214\213%\340Zz\242\252\301\263R\344qUhOG\334\363\177\203\030\014m\241\306\313\366m<\322\241\254{\334A\007\371\035\0210\211\320\357\042\014", 64 }, + { "\274\023\233g\226\220\266b~\011M\215\240\304:\345\216)\2338O\031\205c2nj\364\332\245\252\275", 32, "\023x\251\256\246*\363\004nr\336\240\357\031\011\315J\210\243:\023f\263\202H\333u0s\323\345\2516i\212\012>d\344\004\231:\217\371%P3\004\333\225M\037\321\036'z", 8000, "\305\373\334\202\333DvE\007\302L\246\273O1\312\006\327\203m 1\227\322\262\275\262$}\343n\377\275\325\034\323c\242\337e\352\247\217\264\200\276l\203\207*MG\245wI`4\261\200\025w\277\374\273", 64 }, + { "\310M\231/BX\015\3022,D\221\343\336{AB\373\305\232\223~\332\001$p%\236\311?\307\255", 32, "\346\237C\3322L\307\240\003+\342@\244\356\210\3652@\231uyajh\3672)\3133k\015\247\011\221\360\256$}G\232\326\344sB9\266\326a\273\276\273t\134\330Q)\2555O\212\204\207K\251", 8000, "Fg\027\253\252e\334-\306!7\300\374\277\235\274\261\350\005D\327\262\302\037\025\016\306|p3+\031\230\216\224\362\370&34\314\240LA\326\010\307b\371\177Pw\310\2605\210\275\305q$YPw\024", 64 }, + { "\243%\302\344P\210:6\271\3316\330|\234\377\325x\317\255\356u\266\204_\264\232\306\221H\235\323\233", 32, "\203\355\374\337L8\346\314\340\310\310)iB\261\313\303`\254\263\356\011\360LVf[\240\372\033\263\031 \237\361\263\264\007\257\323\224\205\207\366)\344\220\270H\216\005K\310\200\256~\341w\352\365m\305\316\231\315!\354\232\270\030\327\027", 8000, "/p\266KV\336\250\270\214\3752\255>\253\011\261\353Lu\022y\313+\300v\201\005^\333\310\370\016\375x\023N\340v&\222\042\353W'\277\014\226ss\240\314T/\020\347\2303\225i\337\255\217\275\310", 64 }, + { "\020\352\211\2704\337\355MK\251\237\315\207w=\345M\253j\013Q\312A\323v\256\212\273\346\314\206Z", 32, "\356\327\312\324\304XV\042", 9000, "<\252\305rA1WHK\030\310K\220\312\214/\225\222#\211\020y5J.\373.\375\250\246\344=U\326_\322\205\303\357\316\212*2\252\1347yP)/y\330\030q(;\275\222\316B\345N/'", 64 }, + { "\246\200\343|\000\363\320\004c1/\252 \230\027f\221\010\300L8<\315\333\014\000~\013=\224m`", 32, "\344h\347\244\325\331\22483=Nft\360\302\261", 9000, "\330Y+Q\337\302\005\230&\257\271\201\020\266\346rXi\310\342\234l\365\374}\242\365&\377\214Fn\240\315\272\026\322\326\2318\332\325\001\362\007G\316\346T\001\225\273\377\042\345?\377\330\302\361:\354Q\270", 64 }, + { "\300^\277,{\327^\347;\023\366\331\344\214@\224\226/\231\304z\212\024\264\343\305u\353Y\301\305\031", 32, "e0H}\001o\0238|<\317\200\275\255I\300\2211SZ\350\024\010x", 9000, "\346\352\302\366Gt<\261;\010((\022\360\232w\323\024~\3107\323\001\003\331X\006\245\235\364V\302\000\233~9\370\225\340\312\2120\011\362\274W\036\272\270\3168\311d\366\361\270\254E\363Zg\001\326\227", 64 }, + { "\302\3170F\365\303\367\304\340\000\332\3223F|\363\231o\336\315\010\334\000\327\225,\300\205\214\301\272)", 32, "\017\015*/]\217\334\262S\312\317\235r\371m\225\273\013\215N\360\016\324\003 \257\222\315\371\014\326t", 9000, "Q\213LROW\365\360C\375\251\233\235\237\273f\370\333&Qv\035\231bj|\2621\134\365\213\254\264\221\377N\321\305\036\272\236I\331K\375 \276\212\177R(T\370\030\376\322\201!a\230\014g2\330", 64 }, + { "VW\226?\011\206\237\332\316^\201\211F\363\242#\2414\260\034f\253F\020\015\356\022\026\030wy\207", 32, "\134X>oO\341\2221p\023\236\217\357\355\213qc\222\237$q\311\271\224\317\005\354\243\010'\365\246Q\371)N_\226\353m", 9000, "\310Z1\202\257\017\276\0118bF\322\213U\222~\243\033\323[\324\371\365(\344R\363\347\313\342\255\033\320\316\374]\207\371\004\353e\311+\316`%p\236\327\326o\017\235yu\234=+\216\303\3420\246\333", 64 }, + { "\265\321\227\226\355\037\225\225f\000`\331\364x_h\261\236\302F\356\277\305\203\337n\324\242XlX\276", 32, "\353\325\230[\314*\371$\233U\335d\302\356+M+\217K\255:\305i\217\315U5dmm1r\034`^\033\200\311\366\323\244\254\134\354*.C\261", 9000, "\203\205\206;\334K\261)~\005a\365\232$.\246\250\333\351\036\237\227T\326\007\266\277\337\267\012i\252\277f/\367", 64 }, + { "g\342u\261\360\205W\253\3757\224>\2007\261$\321\326[A\030Nl>\300\255\270\310j\230\000\317", 32, "\205R\344\134\355S;_$R9\207\216\351\035\355\344\246\230\347\305\225y\365'\264\273\273\002\3004\3074\321%j\237\246\352\345Y(\224\334\371\274\012WL\232$z\246\331m\020", 9000, "\042\307\336\011n\273.\027\006Z\200\335\244N)\210\325\177M\000\270U\2167\007\331\217\002u\262\030\257\223\325]\371WI\207\226\211\331s\007.\224P\3330\023E\273\3256\324\2250|h\332\134\306M}", 64 }, + { "\205\222\255d0\015\236\365\024\002w\355:\025Q\206(\000\014\315*`6\343\233\217\377\036\227\231\001\310", 32, "\031\345\002\252\206*\014\226\235[\012\333\340K\207$\010\010\332s8*\346|\245\323h}^\202`\233\200\2460\304H9\031H\2321x\013\033\363\322=B\223\224\321\2335\204\262#%\245#N\236\205\360", 9000, "\376\304\247X\265W\252\204.\025\177:\360\227\0259$\005h\205\364\030o\324p\023\206\006\325\302B:\311\252\240\015\253\000\370\313\007\002\276:\037/\001\240-T\241\221\007\247`Z\012|M\027\316\2303\004", 64 }, + { "\262\332x\2240\1348{\351ow\377\220.\005\010\351\313\365w\310\006\042\312O\234\256\254I\225P\236", 32, "\003\262\327\213\033E\352\255k\031x_V1\330\217\232\333TCjCG\257\222\207\302aA_&\303\022\242T2V\301l\230U=\204\255\013?9\212W\217R\254\246\264J\310\243\340\215\276\324\264\211\371H~d\334V\0048\210", 9000, "\2428\360\032\336\004$\015\303\304\203\271/\302\252\361\204\366\314\201\231\324\323\340\031E\355\205\372\201?JX\264\256\177\242L\362\001oc\310\134{pO\232\234\200x03\270\364@\346\134\214\330\202\010\254\350", 64 }, + { "`\210\003\226\023\271\363\251\376u\032@4R\227A\233\177\204+\331D\302jJ\035I~\033Va\334\306\134\337\3708\3159\374", 40, "g:\354\200:\353\237\314", 100, "\247\204y~\264\003\374\263YbJ1\265\256\370b\020\377?\034\240{\014\275Z\011\347\213\206\356\037Q\010^\306\207Q9\021\374q\270\242DI\034-\232o=\212\202\134\037+\305pB\2152CI\275[", 64 }, + { "\330\3067\035\364 \2267\266\226]\315\242\015X{\270Vn9\260\277\277\375a\014\251k2P\003f{Z\037[t|o=", 40, "\375\276EL5\306\235A\371\032\272\364\014\340\014\374", 100, "8\255\030MN[\002\3162\250\340\323\262\011O\0374\012V'\303a\010\026\372\337\022p\002\321*\032\255\205\217\377`\264\015\255\217\005\300`\352\261\313\370`\217en.\252\205V_\331b\261\302g\333\273", 64 }, + { "\247\3113>'\341Z\226\015E\235\221\200}d\217\021\263\134r\205NX\241\366\014\257\243\261y\212r\263D\272\243\021\207\235\216", 40, "(\213\353B\221\216\0302\003R}\310}\331\006\343\001\333\326\236\017x3\005", 100, "\261\201\255\301\037\027-\004\242}\361\027\264\250\210r\231\274=d\010\371\2662\357\017\233d\224\230\0300\356\273\264\245\212A*%\333 \326(c#\273X\026\312\226\317\031X\257,\353\213\307\254\304\337C\326", 64 }, + { "\024B\327M\362\134\210]Iu3\223\322\277\361\3646\276H\263\030\2348XC\271\206d5\242\231\263*\334w\317\015\376\002\014", 40, "\321\357!\351~\005{\304\267\313\205\027\005\307\232a\367\212r\302\306\032\231\26567\246\356\227!R2", 100, "`\236%\333\327{\331~X\022m\274\337\203\257\326\012\247\021\326\270l\3271W\244A:T\261\250\252n\230\327\231\305v\024\245\371\377\346\007\305\204\360\215\252\267G\007\005_E\0221\223\340\3714\243\220\303", 64 }, + { "\002\325\230\270\245\022\320|\042<\274\236\243{IF\255\2123~1\324NX\343\212\002\230+,\321\253\320\334\246\273\264\265\215\350", 40, "M\361.*\033\362\022\226*k\333\225B\320\377\266\011\307\034w4s\274\316\217\034\221W\373\003\256\244\210e\260\242)\206\254\223", 100, "\371d\211g\2024\010\257M\023f\177\247\376\000e\036\353\372\375%l4\272\370\026\343\330\240\022L\214y\025\235\360\0213\014\375B\326\331\300G\336\212}\342*,\254~\001B\204\370\200d\254 \303E\367", 64 }, + { "\243\035i\361t\264\370\31688\017\261Ph\267\224\271\357Y4\035gZ\2631\021\253\236\364\311\031E\364K\240\313xi\253o", 40, "\313h\035\345a9\260^n\335\014\337v'\371\330D\215`\332|1\357\023\253\215\213X,\215h\306X\244C\232\236h\256\372\247\020N\275\020d\360\005", 100, "{\320\345i\277g\336.\253(|\256\347\302\022\260\330\315\247j3\217\257\236\260\302\024\204\000,+}I\202Ow\321\205\013\315\324\001\332\331\003\367E%C\205\354\345\366E\314\351\032\340\314\2568\233=#", 64 }, + { "R.\220Q\306\005\331\013_\274\263\364\305\363\253ut\215T\042\354}\011\014\256\254J\245c\353f/R3s\342$<\205\366", 40, "\042L;\375\240\241\376\322\232GY\375\004PV\261\331}\305#d=\210T\261\233\246\322\377\365\350\365\304\202\256\264\003WX\021=\273\247;\007\215\377Y\360\212\004\324\2525\260\223", 100, "]\370(3IL\232v\357\336\347\350j\3428=\337\205g\331\211=w\023\373\311q\321fM\372\134\037o\312\270\207E\232$\246\224\0069q\245;_U\256\207\246\224~\265lfX\217+\241\177\012\000", 64 }, + { "\005F\364\361\037\250}\236\013\315z\330\022B\011U\222\372\236Z\033ZH|G\313j\247\263\363\222\350\362\243~;8\203\276Y", 40, "'\006e\223)\331-D/\272>1\236\236\202\360\034\015\253\305\312\036\202;\306\254\036\313)\235\011\217\270y\235 9'\355cs5\311\300I\042\235ls}\202\364\002\303S\223L\3528\262\305\001\203\011", 100, "NY\261\274\311\225i^\034\326=\353\301\204\312\357y\263r\031\234\240O<%\253\221\022\321\264\015rH\311\327\302\201yi\304\360\3748z\036\022\205\236W\026\023\006\256B\227mJ\234\231\263\253\3368\202", 64 }, + { "\006\336\254*o{\322\024\361\337\007S\353\357\243\370\244\033\261\024`\3159\311\001\027:\342h\275)R#_S\030\217V\336\024", 40, "\001/Wmb8\260\026\246\270#\346W\360\277/\347\177\233\322t%|\226\334\261~\001tJE\326+\204X\304\324&\036\134\252\004\362\020Y\347V\245\015\023\332EQ\345U\002F\321\202T\012\356\313\235f\206h\356]+\314\324", 100, "I\177\227\177z\320\023\255\352\036\233\272\216\032\231\236\236\220\034\304\263\006x\212\004\340~\371a\034\375R\254T\321\237,\351>\367Be\335\020d\343\363\216\271\011!\344\345\271\325u\006Jdv\004\350\277\301g\007\211_\336", 64 }, + { "\011d*\215\352[\313\3051?\362\360c\277?7\1771\306\221\271\022\275\205Y1E\240M\214T\225R\363\010\3130!*y", 40, "\310l3\2262\346\215Z\223\005\236\302\241\025~\276'\334r<\030Ou\273", 200, "\022\251\266\330\274\244\022\001\042g?\014Q\334^\032\320\203\004\023\231VI\236\351\032\234\200\220\272}/\255\356\322C\342\315\340mR/\024\003WvC\362}0\204\274x\315u\216\014\203\337\353\0350\216\241", 64 }, + { "N{\366HE\323\251BA2\337\035lQ9y\377\206_\354\217\210\210\237\301\277Tm\234\001\033\237\200\261:\314$\007Ro", 40, "\226L\252\227\244 P\217\303\022\353\351\357u|\367X\206\134h\354]\006\257\247b\277ug\266\371\305", 200, "\331\343\322@\363\303\324CF\204on\225pD1\260\342\250h\337\376<\376oqrOrC\260,\014\330\234@ \363\236v\206\201;\335\020+\253#\232x\267-\035\035P\010G\277\322\200d\241d\337", 64 }, + { "RjMU\235u\300\005\020s\3026\244C \010T\277\204\025}6\221\260t\030\347\262y\246\004\004\022nP\003E\224B\275", 40, "\361|Oc\337\006\334\314}y\037}5'L\363\3776(W\331\015+\005y\211\036X\006\33121\012Y\017\011c\016\353\025", 200, "\037^\036", 300, "^b\177X\310\203*\016\340f\343R\233\025\025\222\017l|R\203\227F\217\311@\261\207\325\013\273\042\375\260\256b\333\036\221\220\026\377\223X\336\243\217\235h\006\3110\231R\314\247\3401q\365>dA\010", 64 }, + { "\350$\307\023\016\225\330\3677\315F]9\3447F\306\036?w\000w\266\266\214\244|w\354\204*9~\331y\262x4\237E", 40, "\023*\200k:\322 \321O\214W\374R\223>\232G\202\230\223u\231.\266", 300, "z\223\217\302\200\321_U\300\304W\241/a~\367X\24385\244\207\224M/\255,\232\252\366C\377>5\312\210\273k\001\377\353>g\204\032>\017\303\207#1\021\373\257\031(M*\014 h\334P\370", 64 }, + { "\341\320\235C\357(E\316\332\224\353$\002\330\352{m\215\310l%\255\247\035>fQN\270\217\001\211\355\265@\2036W\263\210", 40, "\232\001\020\307\220Q\244C\312\213%\0206bK~y\272Bh\302\323D8OE\205\323\356\003\235\300", 300, "\227\366^\335\033\330\023e+w\242!B*~t\226\326\322\201\020\251\025O\336 \302\354\355b=\3732,\304\311\025\005y\032\376\005y\347I\031\260\336\360puq/\340\235\325(\337\023\344y\225Hs", 64 }, + { "E,\342\3250\250\275N5\307?b\016f\215\200E7\3260\2062z\026X\243R\245A\210R\014\262\240r\305Z\303\211\042", 40, "\213n0gD'Y$\2742\031\330\027\247\253\343Y\345\263Y\335\354\270\0275\205`\015\227\002\3527\336\367\354\337\024\204v0", 300, "\305\042\312\304t\351\241\223H<~\212\257N\201\022\363\032~\231\241\373\300L\344\333\302F\272\233\306\037\231\260\236\243\326\035\370lOM[v6N\214\042\362D\224\001\372\316Z\372\220t\177\301>\020}2", 64 }, + { "&\3372)\301\232E\222\030&{\236\272\013\210\011\034%1\352s\310\341^\310\251\352\177\257l*\3071}\343\011\317\377\012\221", 40, "\332%\357\310,%\202/Ei\2600\0219\256\305\225}\344F\273*\231\272\317\004@G\334\242\311\270F\0232\240\264\003\234JL\304P\2627\271\234U", 300, "\017\356\256\272\201\031Kf\300\365Z\246\362Z\2765b\346\272c\011\222\241\033\337L\356\323h\034%\001\270\020\016u5\251\030\013u\343%\361%c\005d\242\340p\224L\255\261\370\025\216=9S\225\027X", 64 }, + { "\023\225\225\225a\205\3544\023J\002\345\037\024\217$\252P\240\347\025-\206\0266wn\353*Jx\327\323\213qo\322~JV", 40, "<\225(\247f\351\21182x\003\036Z\333I\376\347\211\037\340{\241\0017jPQ\037\206N(\365\354$$\001X\253\3713\253?\263.W?]\260\327')\347\200\240%\354", 300, "\362wD\306Q!\204\002\0347J\363\256\214\210\3030\266\007\3170\323\346\375\301n+\300\010\025\345\010\0316\363\344%*\377\360\260#\212Ut\324\347\334;\011\356(&A\207\0332\013\320\3060\367\271\333", 64 }, + { "\267\244\274\263\273\230jf&\202Y\220\226\354\216\363\010\031\206\326p\363ux\3536%.~<\213\324;vCi\0217\004\311", 40, "\230\250\225\200\265%,\326\017\035?\274\237{D\272\224\303\3037ea\205:\042\022B1\272\017\275G\263\317\344 \306\204\233\244\273\254\235m/1\317\223\344Uf \273\372.\305\306?\005\011[\217\302p", 300, "\360\214I\303\037J\034r\211\204\333\023u\217\274\134\373G\024\327Z\016\331\022\210aOM\014\212\226\240\257N\215nH\266\343\006e?X\244\370&-\313|\252%\353\351{\345\340\004\345\271\004Q\314^0", 64 }, + { "G.\325\033\317\202j\005\253z1\227\033\207\2061<0\003\311+\3337L9\264\004h&\027@:\030H\331\313/N\270/", 40, "\006\032\324w1\247)\271\337H\335\312\316\2467\214\042\207\245\373\361\250J\207\354c\253f\371\001\276o\343\300h\010A\300\366\331\301NI\255\322\270\350lf\246\020\257\263m\231\311H\3175{>\257\223\313\262Y\245\254hghv", 300, "d8\023\233e\020}\215\007\036\002\367H\003\367\336\010\260\364\255 \360\200\223\265\252\203y\315\322\013\252\376E-gi\000IY\325\367\353)\322\311g\023\301\245\245\134\223n\211\324\245\301coXc.\320", 64 }, + { "\302\347\272e\366\307\3749\015< ^\330\275\344*\370\033\274_\361\227=-\350d\340[V\025#\225\255\017\252g\325;H9", 40, "\272w\001\242\254\207\370\351", 400, "\304>v\275T\012F\025\366\200\362K'\263v\211\232\267oM$\337\134R~&\262\205IM\300\372\3549\014\177\267H{!\241$\234S=t\355T\247O|?\310\247U\263\326y\000\221\214\2404\266", 64 }, + { "8\217\216\363!u\361\212Kw?\134\251\346\316\012\000\0055\042g\230\010T\374\365y\312\213\333\307z\022\363\313\330d\354\226\325", 40, "\331\326\007\325[\226\374\225\250\021\225\214\012c\240\310", 400, "\016e\302\330?9\223s=\3620\302X\221\336==v\365\351iF\340\227\223;?b\005;\010\201)\327\262\006\247\0077\345\224\250=\026\341tP\303-+M\025\014[\367\007\022w\013k\374\032\234&", 64 }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 19:46: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 D4787CE5F14; Sun, 19 Feb 2017 19:46:48 +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 A40651CE9; Sun, 19 Feb 2017 19:46:48 +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 v1JJkl97058946; Sun, 19 Feb 2017 19:46:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JJklSX058945; Sun, 19 Feb 2017 19:46:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702191946.v1JJklSX058945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Feb 2017 19:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313963 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 19:46:48 -0000 Author: mav Date: Sun Feb 19 19:46:47 2017 New Revision: 313963 URL: https://svnweb.freebsd.org/changeset/base/313963 Log: Document r313854 (kern.cam.ctl.iscsi.maxtags). MFC after: 12 days Modified: head/share/man/man4/ctl.4 Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Sun Feb 19 19:30:31 2017 (r313962) +++ head/share/man/man4/ctl.4 Sun Feb 19 19:46:47 2017 (r313963) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd September 27, 2015 +.Dd January 19, 2017 .Dt CTL 4 .Os .Sh NAME @@ -158,10 +158,9 @@ Verbosity level for log messages from th Set to 0 to disable logging or 1 to warn about potential problems. Larger values enable debugging output. Defaults to 1. -.It Va kern.cam.ctl.iscsi.maxcmdsn_delta -The number of outstanding commands to advertise to the iSCSI initiator. -Technically, it is the difference between ExpCmdSN and MaxCmdSN fields -in the iSCSI PDU. +.It Va kern.cam.ctl.iscsi.maxtags +The number of outstanding commands to advertise to each iSCSI initiator. +Current implementation is not very accurate, so do not set this below 2. Defaults to 256. .It Va kern.cam.ctl.iscsi.ping_timeout The number of seconds to wait for the iSCSI initiator to respond to a NOP-In From owner-svn-src-all@freebsd.org Sun Feb 19 19:56: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 39BD4CE5235; Sun, 19 Feb 2017 19:56:14 +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 E3A42868; Sun, 19 Feb 2017 19:56:13 +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 v1JJuDdw063148; Sun, 19 Feb 2017 19:56:13 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JJuCwv063147; Sun, 19 Feb 2017 19:56:12 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201702191956.v1JJuCwv063147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Feb 2017 19:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313964 - in head/sys: conf powerpc/mikrotik X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 19:56:14 -0000 Author: jhibbits Date: Sun Feb 19 19:56:12 2017 New Revision: 313964 URL: https://svnweb.freebsd.org/changeset/base/313964 Log: Add a driver for the RouterBoard RB800 User LED This may work on other RouterBoard PPC platforms, but I don't have any to test with. Added: head/sys/powerpc/mikrotik/rb_led.c (contents, props changed) Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Feb 19 19:46:47 2017 (r313963) +++ head/sys/conf/files.powerpc Sun Feb 19 19:56:12 2017 (r313964) @@ -134,6 +134,7 @@ powerpc/mambo/mambo.c optional mambo powerpc/mambo/mambo_console.c optional mambo powerpc/mambo/mambo_disk.c optional mambo powerpc/mikrotik/platform_rb.c optional mikrotik +powerpc/mikrotik/rb_led.c optional mikrotik powerpc/mpc85xx/atpic.c optional mpc85xx isa powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 Added: head/sys/powerpc/mikrotik/rb_led.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mikrotik/rb_led.c Sun Feb 19 19:56:12 2017 (r313964) @@ -0,0 +1,149 @@ +/*- + * Copyright (c) 2017 Justin Hibbits + * 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 "gpio_if.h" + +struct rbled_softc { + struct cdev *sc_led; + device_t sc_gpio; + uint32_t sc_ledpin; +}; + +static int rbled_probe(device_t); +static int rbled_attach(device_t); +static int rbled_detach(device_t); +static void rbled_toggle(void *, int); + +static device_method_t rbled_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rbled_probe), + DEVMETHOD(device_attach, rbled_attach), + DEVMETHOD(device_detach, rbled_detach), + + DEVMETHOD_END +}; + +static driver_t rbled_driver = { + "rbled", + rbled_methods, + sizeof(struct rbled_softc), +}; + +static devclass_t rbled_devclass; + +DRIVER_MODULE(rbled, simplebus, rbled_driver, rbled_devclass, 0, 0); + +static int +rbled_probe(device_t dev) +{ + phandle_t node; + const char *name; + cell_t gp[2]; + char model[6]; + + node = ofw_bus_get_node(dev); + + name = ofw_bus_get_name(dev); + if (name == NULL) + return (ENXIO); + if (strcmp(name, "led") != 0) + return (ENXIO); + + if (OF_getprop(node, "user_led", gp, sizeof(gp)) <= 0) + return (ENXIO); + + /* Check root model. */ + node = OF_peer(0); + if (OF_getprop(node, "model", model, sizeof(model)) <= 0) + return (ENXIO); + if (strcmp(model, "RB800") != 0) + return (ENXIO); + + device_set_desc(dev, "RouterBoard LED"); + return (0); +} + +static int +rbled_attach(device_t dev) +{ + struct rbled_softc *sc; + phandle_t node; + cell_t gp[2]; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + + if (OF_getprop(node, "user_led", gp, sizeof(gp)) <= 0) + return (ENXIO); + + sc->sc_gpio = OF_device_from_xref(gp[0]); + if (sc->sc_gpio == NULL) { + device_printf(dev, "No GPIO resource found!\n"); + return (ENXIO); + } + sc->sc_ledpin = gp[1]; + + sc->sc_led = led_create(rbled_toggle, sc, "user_led"); + + if (sc->sc_led == NULL) + return (ENXIO); + + return (0); +} + +static int +rbled_detach(device_t dev) +{ + struct rbled_softc *sc; + + sc = device_get_softc(dev); + led_destroy(sc->sc_led); + + return (0); +} + +static void +rbled_toggle(void *priv, int onoff) +{ + struct rbled_softc *sc = priv; + + GPIO_PIN_SET(sc->sc_gpio, sc->sc_ledpin, onoff); +} From owner-svn-src-all@freebsd.org Sun Feb 19 20:35: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 1850DCE5DD5; Sun, 19 Feb 2017 20:35:41 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D98BF1CFD; Sun, 19 Feb 2017 20:35:40 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1JKZdcL080792; Sun, 19 Feb 2017 20:35:39 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JKZdie080791; Sun, 19 Feb 2017 20:35:39 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201702192035.v1JKZdie080791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Sun, 19 Feb 2017 20:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313965 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 20:35:41 -0000 Author: lidl Date: Sun Feb 19 20:35:39 2017 New Revision: 313965 URL: https://svnweb.freebsd.org/changeset/base/313965 Log: Only notify blacklistd for successful logins in auth.c Reported by: Rick Adams Reviewed by: des MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/auth.c Modified: head/crypto/openssh/auth.c ============================================================================== --- head/crypto/openssh/auth.c Sun Feb 19 19:56:12 2017 (r313964) +++ head/crypto/openssh/auth.c Sun Feb 19 20:35:39 2017 (r313965) @@ -295,8 +295,8 @@ auth_log(Authctxt *authctxt, int authent authmsg = "Partial"; else { authmsg = authenticated ? "Accepted" : "Failed"; - BLACKLIST_NOTIFY(authenticated ? - BLACKLIST_AUTH_OK : BLACKLIST_AUTH_FAIL); + if (authenticated) + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); } authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s", From owner-svn-src-all@freebsd.org Sun Feb 19 20:40: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 B08ECCE5E7C; Sun, 19 Feb 2017 20:40: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 7D9461E5A; Sun, 19 Feb 2017 20:40: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 v1JKe762080996; Sun, 19 Feb 2017 20:40:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JKe7d6080995; Sun, 19 Feb 2017 20:40:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702192040.v1JKe7d6080995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Feb 2017 20:40:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313966 - 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: Sun, 19 Feb 2017 20:40:08 -0000 Author: kib Date: Sun Feb 19 20:40:07 2017 New Revision: 313966 URL: https://svnweb.freebsd.org/changeset/base/313966 Log: MFamd64 r313933: microoptimize pmap_protect_pte1(). Noted by: alc Tested by: mmel Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sun Feb 19 20:35:39 2017 (r313965) +++ head/sys/arm/arm/pmap-v6.c Sun Feb 19 20:40:07 2017 (r313966) @@ -4799,12 +4799,11 @@ pmap_protect_pte1(pmap_t pmap, pt1_entry ("%s: sva is not 1mpage aligned", __func__)); opte1 = npte1 = pte1_load(pte1p); - if (pte1_is_managed(opte1)) { + if (pte1_is_managed(opte1) && pte1_is_dirty(opte1)) { eva = sva + PTE1_SIZE; for (va = sva, m = PHYS_TO_VM_PAGE(pte1_pa(opte1)); va < eva; va += PAGE_SIZE, m++) - if (pte1_is_dirty(opte1)) - vm_page_dirty(m); + vm_page_dirty(m); } if ((prot & VM_PROT_WRITE) == 0) npte1 |= PTE1_RO | PTE1_NM; From owner-svn-src-all@freebsd.org Sun Feb 19 20: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 2FA60CE52E4; Sun, 19 Feb 2017 20:51: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 D3EC6823; Sun, 19 Feb 2017 20:51: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 v1JKp4Kf085622; Sun, 19 Feb 2017 20:51:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JKp48x085620; Sun, 19 Feb 2017 20:51:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702192051.v1JKp48x085620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Feb 2017 20:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313967 - in head/sys: fs/devfs 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, 19 Feb 2017 20:51:06 -0000 Author: kib Date: Sun Feb 19 20:51:04 2017 New Revision: 313967 URL: https://svnweb.freebsd.org/changeset/base/313967 Log: Apply noexec mount option for mmap(PROT_EXEC). Right now the noexec mount option disallows image activators to try execve the files on the mount point. Also, after r127187, noexec also limits max_prot map entries permissions for mappings of files from such mounts, but not the actual mapping permissions. As result, the API behaviour is inconsistent. The files from noexec mount can be mapped with PROT_EXEC, but if mprotect(2) drops execution permission, it cannot be re-enabled later. Make this consistent logically and aligned with behaviour of other systems, by disallowing PROT_EXEC for mmap(2). Note that this change only ensures aligned results from mmap(2) and mprotect(2), it does not prevent actual code execution from files coming from noexec mount. Such files can always be read into anonymous executable memory and executed from there. Reported by: shamaz.mazum@gmail.com PR: 217062 Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/devfs/devfs_vnops.c head/sys/kern/vfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Sun Feb 19 20:40:07 2017 (r313966) +++ head/sys/fs/devfs/devfs_vnops.c Sun Feb 19 20:51:04 2017 (r313967) @@ -1803,9 +1803,11 @@ devfs_mmap_f(struct file *fp, vm_map_t m * compatible. */ mp = vp->v_mount; - if (mp != NULL && (mp->mnt_flag & MNT_NOEXEC) != 0) + if (mp != NULL && (mp->mnt_flag & MNT_NOEXEC) != 0) { maxprot = VM_PROT_NONE; - else + if ((prot & VM_PROT_EXECUTE) != 0) + return (EACCES); + } else maxprot = VM_PROT_EXECUTE; if ((fp->f_flag & FREAD) != 0) maxprot |= VM_PROT_READ; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Feb 19 20:40:07 2017 (r313966) +++ head/sys/kern/vfs_vnops.c Sun Feb 19 20:51:04 2017 (r313967) @@ -2430,9 +2430,11 @@ vn_mmap(struct file *fp, vm_map_t map, v * proc does a setuid? */ mp = vp->v_mount; - if (mp != NULL && (mp->mnt_flag & MNT_NOEXEC) != 0) + if (mp != NULL && (mp->mnt_flag & MNT_NOEXEC) != 0) { maxprot = VM_PROT_NONE; - else + if ((prot & VM_PROT_EXECUTE) != 0) + return (EACCES); + } else maxprot = VM_PROT_EXECUTE; if ((fp->f_flag & FREAD) != 0) maxprot |= VM_PROT_READ; From owner-svn-src-all@freebsd.org Sun Feb 19 21:00: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 57043CE55E8; Sun, 19 Feb 2017 21:00:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E97A7DCB; Sun, 19 Feb 2017 21:00:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1JL0m9A088986; Sun, 19 Feb 2017 21:00:48 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JL0lNL088976; Sun, 19 Feb 2017 21:00:47 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702192100.v1JL0lNL088976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 19 Feb 2017 21:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313968 - in vendor/openpam/dist: . bin bin/openpam_dump_policy bin/pamtest bin/su doc doc/man include include/security lib lib/libpam m4 misc modules modules/pam_deny modules/pam_permi... 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, 19 Feb 2017 21:00:49 -0000 Author: des Date: Sun Feb 19 21:00:46 2017 New Revision: 313968 URL: https://svnweb.freebsd.org/changeset/base/313968 Log: Vendor import of OpenPAM Radula. Added: vendor/openpam/dist/m4/ vendor/openpam/dist/m4/libtool.m4 vendor/openpam/dist/m4/ltoptions.m4 vendor/openpam/dist/m4/ltsugar.m4 vendor/openpam/dist/m4/ltversion.m4 vendor/openpam/dist/m4/lt~obsolete.m4 vendor/openpam/dist/misc/Makefile.am vendor/openpam/dist/misc/Makefile.in vendor/openpam/dist/misc/coverage.sh.in vendor/openpam/dist/misc/coverity.sh.in vendor/openpam/dist/modules/pam_return/ vendor/openpam/dist/modules/pam_return/Makefile.am vendor/openpam/dist/modules/pam_return/Makefile.in vendor/openpam/dist/modules/pam_return/pam_return.c vendor/openpam/dist/t/t_openpam_dispatch.c vendor/openpam/dist/t/t_pam_conv.c vendor/openpam/dist/t/t_pam_conv.h Deleted: vendor/openpam/dist/pamgdb.in vendor/openpam/dist/t/t.h vendor/openpam/dist/t/t_file.c vendor/openpam/dist/t/t_main.c Modified: vendor/openpam/dist/CREDITS vendor/openpam/dist/HISTORY vendor/openpam/dist/LICENSE vendor/openpam/dist/Makefile.am vendor/openpam/dist/Makefile.in vendor/openpam/dist/README vendor/openpam/dist/RELNOTES vendor/openpam/dist/TODO vendor/openpam/dist/aclocal.m4 vendor/openpam/dist/autogen.sh vendor/openpam/dist/bin/Makefile.am vendor/openpam/dist/bin/Makefile.in vendor/openpam/dist/bin/openpam_dump_policy/Makefile.am vendor/openpam/dist/bin/openpam_dump_policy/Makefile.in vendor/openpam/dist/bin/openpam_dump_policy/openpam_dump_policy.c vendor/openpam/dist/bin/pamtest/Makefile.am vendor/openpam/dist/bin/pamtest/Makefile.in vendor/openpam/dist/bin/pamtest/pamtest.1 vendor/openpam/dist/bin/su/Makefile.am vendor/openpam/dist/bin/su/Makefile.in vendor/openpam/dist/bin/su/su.1 vendor/openpam/dist/compile vendor/openpam/dist/config.guess vendor/openpam/dist/config.h.in vendor/openpam/dist/config.sub vendor/openpam/dist/configure vendor/openpam/dist/configure.ac vendor/openpam/dist/depcomp vendor/openpam/dist/doc/Makefile.in vendor/openpam/dist/doc/man/Makefile.am vendor/openpam/dist/doc/man/Makefile.in vendor/openpam/dist/doc/man/openpam.3 vendor/openpam/dist/doc/man/openpam_borrow_cred.3 vendor/openpam/dist/doc/man/openpam_free_data.3 vendor/openpam/dist/doc/man/openpam_free_envlist.3 vendor/openpam/dist/doc/man/openpam_get_feature.3 vendor/openpam/dist/doc/man/openpam_get_option.3 vendor/openpam/dist/doc/man/openpam_log.3 vendor/openpam/dist/doc/man/openpam_nullconv.3 vendor/openpam/dist/doc/man/openpam_readline.3 vendor/openpam/dist/doc/man/openpam_readlinev.3 vendor/openpam/dist/doc/man/openpam_readword.3 vendor/openpam/dist/doc/man/openpam_restore_cred.3 vendor/openpam/dist/doc/man/openpam_set_feature.3 vendor/openpam/dist/doc/man/openpam_set_option.3 vendor/openpam/dist/doc/man/openpam_straddch.3 vendor/openpam/dist/doc/man/openpam_subst.3 vendor/openpam/dist/doc/man/openpam_ttyconv.3 vendor/openpam/dist/doc/man/pam.3 vendor/openpam/dist/doc/man/pam.conf.5 vendor/openpam/dist/doc/man/pam_acct_mgmt.3 vendor/openpam/dist/doc/man/pam_authenticate.3 vendor/openpam/dist/doc/man/pam_chauthtok.3 vendor/openpam/dist/doc/man/pam_close_session.3 vendor/openpam/dist/doc/man/pam_conv.3 vendor/openpam/dist/doc/man/pam_end.3 vendor/openpam/dist/doc/man/pam_error.3 vendor/openpam/dist/doc/man/pam_get_authtok.3 vendor/openpam/dist/doc/man/pam_get_data.3 vendor/openpam/dist/doc/man/pam_get_item.3 vendor/openpam/dist/doc/man/pam_get_user.3 vendor/openpam/dist/doc/man/pam_getenv.3 vendor/openpam/dist/doc/man/pam_getenvlist.3 vendor/openpam/dist/doc/man/pam_info.3 vendor/openpam/dist/doc/man/pam_open_session.3 vendor/openpam/dist/doc/man/pam_prompt.3 vendor/openpam/dist/doc/man/pam_putenv.3 vendor/openpam/dist/doc/man/pam_set_data.3 vendor/openpam/dist/doc/man/pam_set_item.3 vendor/openpam/dist/doc/man/pam_setcred.3 vendor/openpam/dist/doc/man/pam_setenv.3 vendor/openpam/dist/doc/man/pam_sm_acct_mgmt.3 vendor/openpam/dist/doc/man/pam_sm_authenticate.3 vendor/openpam/dist/doc/man/pam_sm_chauthtok.3 vendor/openpam/dist/doc/man/pam_sm_close_session.3 vendor/openpam/dist/doc/man/pam_sm_open_session.3 vendor/openpam/dist/doc/man/pam_sm_setcred.3 vendor/openpam/dist/doc/man/pam_start.3 vendor/openpam/dist/doc/man/pam_strerror.3 vendor/openpam/dist/doc/man/pam_verror.3 vendor/openpam/dist/doc/man/pam_vinfo.3 vendor/openpam/dist/doc/man/pam_vprompt.3 vendor/openpam/dist/include/Makefile.in vendor/openpam/dist/include/security/Makefile.am vendor/openpam/dist/include/security/Makefile.in vendor/openpam/dist/include/security/openpam.h vendor/openpam/dist/include/security/openpam_version.h vendor/openpam/dist/include/security/pam_appl.h vendor/openpam/dist/install-sh vendor/openpam/dist/lib/Makefile.am vendor/openpam/dist/lib/Makefile.in vendor/openpam/dist/lib/libpam/Makefile.am vendor/openpam/dist/lib/libpam/Makefile.in vendor/openpam/dist/lib/libpam/openpam_configure.c vendor/openpam/dist/lib/libpam/openpam_ctype.h vendor/openpam/dist/lib/libpam/openpam_dispatch.c vendor/openpam/dist/lib/libpam/openpam_dlfunc.h vendor/openpam/dist/lib/libpam/openpam_features.c vendor/openpam/dist/lib/libpam/openpam_findenv.c vendor/openpam/dist/lib/libpam/openpam_impl.h vendor/openpam/dist/lib/libpam/openpam_load.c vendor/openpam/dist/lib/libpam/openpam_readlinev.c vendor/openpam/dist/lib/libpam/openpam_readword.c vendor/openpam/dist/lib/libpam/openpam_strlset.c vendor/openpam/dist/lib/libpam/openpam_strlset.h vendor/openpam/dist/lib/libpam/openpam_ttyconv.c vendor/openpam/dist/lib/libpam/pam_end.c vendor/openpam/dist/lib/libpam/pam_get_authtok.c vendor/openpam/dist/lib/libpam/pam_get_data.c vendor/openpam/dist/lib/libpam/pam_get_item.c vendor/openpam/dist/lib/libpam/pam_get_user.c vendor/openpam/dist/lib/libpam/pam_getenv.c vendor/openpam/dist/lib/libpam/pam_getenvlist.c vendor/openpam/dist/lib/libpam/pam_putenv.c vendor/openpam/dist/lib/libpam/pam_set_data.c vendor/openpam/dist/lib/libpam/pam_set_item.c vendor/openpam/dist/lib/libpam/pam_setenv.c vendor/openpam/dist/ltmain.sh vendor/openpam/dist/misc/gendoc.pl vendor/openpam/dist/missing vendor/openpam/dist/mkpkgng.in vendor/openpam/dist/modules/Makefile.am vendor/openpam/dist/modules/Makefile.in vendor/openpam/dist/modules/pam_deny/Makefile.am vendor/openpam/dist/modules/pam_deny/Makefile.in vendor/openpam/dist/modules/pam_permit/Makefile.am vendor/openpam/dist/modules/pam_permit/Makefile.in vendor/openpam/dist/modules/pam_unix/Makefile.am vendor/openpam/dist/modules/pam_unix/Makefile.in vendor/openpam/dist/modules/pam_unix/pam_unix.c vendor/openpam/dist/t/Makefile.am vendor/openpam/dist/t/Makefile.in vendor/openpam/dist/t/t_openpam_ctype.c vendor/openpam/dist/t/t_openpam_readlinev.c vendor/openpam/dist/t/t_openpam_readword.c vendor/openpam/dist/test-driver Modified: vendor/openpam/dist/CREDITS ============================================================================== --- vendor/openpam/dist/CREDITS Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/CREDITS Sun Feb 19 21:00:46 2017 (r313968) @@ -21,6 +21,7 @@ ideas: Christos Zoulas Daniel Richard G. Darren J. Moffat + Dimitry Andric Dmitry V. Levin Don Lewis Emmanuel Dreyfus @@ -42,6 +43,7 @@ ideas: Mikhail Teterin Mikko Työläjärvi Nick Hibma + Patrick Bihan-Faou Robert Watson Ruslan Ermilov Sebastian Krahmer Modified: vendor/openpam/dist/HISTORY ============================================================================== --- vendor/openpam/dist/HISTORY Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/HISTORY Sun Feb 19 21:00:46 2017 (r313968) @@ -1,3 +1,22 @@ +OpenPAM Radula 2017-02-19 + + - BUGFIX: Fix an inverted test which prevented pam_get_authtok(3) and + pam_get_user(3) from using application-provided custom prompts. + + - BUGFIX: Plug a memory leak in pam_set_item(3). + + - BUGFIX: Plug a potential memory leak in openpam_readlinev(3). + + - BUGFIX: In openpam_readword(3), support line continuations within + whitespace. + + - ENHANCE: Add a feature flag to control fallback to "other" policy. + + - ENHANCE: Add a pam_return(8) module which returns an arbitrary + code specified in the module options. + + - ENHANCE: More and better unit tests. +============================================================================ OpenPAM Ourouparia 2014-09-12 - ENHANCE: When executing a chain, require at least one service Modified: vendor/openpam/dist/LICENSE ============================================================================== --- vendor/openpam/dist/LICENSE Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/LICENSE Sun Feb 19 21:00:46 2017 (r313968) @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2012 Dag-Erling Smørgrav +Copyright (c) 2004-2017 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and Modified: vendor/openpam/dist/Makefile.am ============================================================================== --- vendor/openpam/dist/Makefile.am Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/Makefile.am Sun Feb 19 21:00:46 2017 (r313968) @@ -1,8 +1,8 @@ -# $Id: Makefile.am 816 2014-09-12 07:50:22Z des $ +# $Id: Makefile.am 917 2017-02-18 14:45:27Z des $ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include +SUBDIRS = misc include lib bin modules if WITH_DOC SUBDIRS += doc Modified: vendor/openpam/dist/Makefile.in ============================================================================== --- vendor/openpam/dist/Makefile.in Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/Makefile.in Sun Feb 19 21:00:46 2017 (r313968) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,9 +14,19 @@ @SET_MAKE@ -# $Id: Makefile.am 816 2014-09-12 07:50:22Z des $ +# $Id: Makefile.am 917 2017-02-18 14:45:27Z des $ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,20 +91,20 @@ build_triplet = @build@ host_triplet = @host@ @WITH_DOC_TRUE@am__append_1 = doc subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/pamgdb.in $(srcdir)/mkpkgng.in \ - INSTALL README TODO compile config.guess config.sub install-sh \ - missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = pamgdb mkpkgng +CONFIG_CLEAN_FILES = mkpkgng CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -152,7 +162,10 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = lib bin modules include doc t +DIST_SUBDIRS = misc include lib bin modules doc t +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/mkpkgng.in INSTALL README TODO compile config.guess \ + config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -208,6 +221,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ CRYPTO_LIBS = @CRYPTO_LIBS@ CRYPT_LIBS = @CRYPT_LIBS@ CYGPATH_W = @CYGPATH_W@ @@ -238,6 +252,7 @@ LIB_MAJ = @LIB_MAJ@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -261,6 +276,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEM_LIBPAM = @SYSTEM_LIBPAM@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -315,7 +331,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include $(am__append_1) t +SUBDIRS = misc include lib bin modules $(am__append_1) t EXTRA_DIST = \ CREDITS \ HISTORY \ @@ -345,7 +361,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -379,8 +394,6 @@ $(srcdir)/config.h.in: $(am__configure_ distclean-hdr: -rm -f config.h stamp-h1 -pamgdb: $(top_builddir)/config.status $(srcdir)/pamgdb.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mkpkgng: $(top_builddir)/config.status $(srcdir)/mkpkgng.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -580,15 +593,15 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -624,16 +637,17 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -810,6 +824,8 @@ uninstall-am: mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Modified: vendor/openpam/dist/README ============================================================================== --- vendor/openpam/dist/README Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/README Sun Feb 19 21:00:46 2017 (r313968) @@ -7,19 +7,4 @@ implementations disagree, OpenPAM tries Solaris, at the expense of XSSO conformance and Linux-PAM compatibility. -These are some of OpenPAM's features: - - - Implements the complete PAM API as described in the original PAM - paper and in OSF-RFC 86.0; this corresponds to the full XSSO API - except for mappings and secondary authentication. Also - implements some extensions found in Solaris 9. - - - Extends the API with several useful and time-saving functions. - - - Performs strict checking of return values from service modules. - - - Reads configuration from /etc/pam.d/, /etc/pam.conf, - /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order; - this will be made configurable in a future release. - Please direct bug reports and inquiries to . Modified: vendor/openpam/dist/RELNOTES ============================================================================== --- vendor/openpam/dist/RELNOTES Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/RELNOTES Sun Feb 19 21:00:46 2017 (r313968) @@ -1,22 +1,21 @@ - Release notes for OpenPAM Ourouparia - ==================================== + Release notes for OpenPAM Radula + ================================ -This release corresponds to the code used in FreeBSD HEAD as of the -release date, and is also expected to work on almost any POSIX-like -platform that has GNU autotools, GNU make and the GNU compiler suite -installed. +OpenPAM is developed primarily on FreeBSD, but is expected to work on +almost any POSIX-like platform that has GNU autotools, GNU make and +the GNU compiler suite installed. -The distribution consists of the following components: +The OpenPAM distribution consists of the following components: - The PAM library itself, with complete API documentation. - Sample modules (pam_permit, pam_deny and pam_unix) and a sample - application (su) which demonstrate how to use PAM. + application (su) which demonstrate how to use the PAM library. - A test application (pamtest) which can be used to test policies and modules. - - Unit tests for limited portions of the libraries. + - Unit tests for limited portions of the library. Please direct bug reports and inquiries to . Modified: vendor/openpam/dist/TODO ============================================================================== --- vendor/openpam/dist/TODO Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/TODO Sun Feb 19 21:00:46 2017 (r313968) @@ -1,15 +1,9 @@ -Before the next release: +- Fix try_first_pass / use_first_pass (pam_get_authtok() code & + documentation are slightly incorrect, OpenPAM's pam_unix(8) is + incorrect, all FreeBSD modules are broken) - - Rewrite openpam_ttyconv(3). - - mostly done, needs review. +- Add loop detection to openpam_load_chain(). - - Fix try_first_pass / use_first_pass (pam_get_authtok() code & - documentation are slightly incorrect, OpenPAM's pam_unix(8) is - incorrect, all FreeBSD modules are broken) +- Complete unit tests for openpam_dispatch(). - - Add loop detection to openpam_load_chain(). - - - Look into the possibility of implementing a version of (or a - wrapper for) openpam_log() which respects the PAM_SILENT flag and - the no_warn module option. This would eliminate the need for - FreeBSD's _pam_verbose_error(). +- Stop using PAM_SYMBOL_ERR incorrectly. Modified: vendor/openpam/dist/aclocal.m4 ============================================================================== --- vendor/openpam/dist/aclocal.m4 Sun Feb 19 20:51:04 2017 (r313967) +++ vendor/openpam/dist/aclocal.m4 Sun Feb 19 21:00:46 2017 (r313968) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,8594 +20,7 @@ You have another version of autoconf. I If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Feb 19 21: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 7A198CE583A; Sun, 19 Feb 2017 21:01:18 +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 294D211D8; Sun, 19 Feb 2017 21:01:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 5so10225913pgj.0; Sun, 19 Feb 2017 13:01:18 -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=Tq4UB0haOuXacB3eBCQbBDACyBzlmx72TkWiD7jtaZQ=; b=OblfQhNQjIDSkgLSl4nNLFaKJQMBjXerDEKO47abeuXFCgm45SipqrRAzKA78h87ub pbmQiFKB59k5zDeZnFiT+4hi3vgFZXElJi2wexf8dm2S8QHDiTlE5bqYQ/3X+5+Yw9rr m4i56Ibzn+ERImT1iNSqS1gNlnlq+EqrwjRJhnC8PwqBlLU6PzRhwxulSIjIjS3qz61e /b6nfPXFiMZRBMf7NVn1dK9E7JIOon20w/gJb7CyjeTsWGxwBox/wy82T5mHG/Efc4+9 Q4BSyj+cwWIr1ctgNlydJlGopNu6ezh0Im4D9jZ3c8DvmX8HUutxt5y3Lq6LEV5n4Ku5 dndg== 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=Tq4UB0haOuXacB3eBCQbBDACyBzlmx72TkWiD7jtaZQ=; b=PWB1yx7R3x0+/aclUDV+ksuyNMpzThw2B5OvKMGwJxMAT22SK8M8VXVh/j+i0WEsJg /RHwJU5es4om58EJ4nGYoxuS9CetzybXUK+gl3cMIwHI5PvWPuXMNHD7OqQqxsSdbEZ/ ogtayVYrbol+oU4IWsQYnV4hhUxggvipyiZ/FyOovnOjHlkbCZejjI/HcdAPQffViPN5 kJMzI44bnOj6k+GbVUWHIUzaVsK/e0JI1Pr92ctEyRE99z28+Wh9bCuAZpJzYFY+9jem Xnspq5BH6RXEzdOFSPzkCrbx6RzoWrUILEVII53q2i5bCyieS+KMR0embgIh1tptiUyU IL8A== X-Gm-Message-State: AMke39lYg7suBK+7W3MsyEqMlcc9t84QnimDXGVA5TsfWdn8J2Bmb7Hx4t2CWLsV+N+obw== X-Received: by 10.99.102.135 with SMTP id a129mr23412605pgc.220.1487538077451; Sun, 19 Feb 2017 13:01:17 -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 t133sm31098465pgc.24.2017.02.19.13.01.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Feb 2017 13:01:16 -0800 (PST) Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_690F6A92-9D27-4313-A51D-220C98283BA3"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702191930.v1JJUW3q051018@repo.freebsd.org> Date: Sun, 19 Feb 2017 13:01:15 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702191930.v1JJUW3q051018@repo.freebsd.org> To: Allan Jude 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, 19 Feb 2017 21:01:18 -0000 --Apple-Mail=_690F6A92-9D27-4313-A51D-220C98283BA3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 19, 2017, at 11:30, Allan Jude wrote: >=20 > Author: allanjude > Date: Sun Feb 19 19:30:31 2017 > New Revision: 313962 > URL: https://svnweb.freebsd.org/changeset/base/313962 >=20 > Log: > improve PBKDF2 performance >=20 > The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it = could be >=20 > GELI's PBKDF2 uses a simple benchmark to determine a number of = iterations > that will takes approximately 2 seconds. The security provided is = actually > half what is expected, because an attacker could use the optimized > algorithm to brute force the key in half the expected time. >=20 > With this change, all newly generated GELI keys will be approximately = 2x > as strong. Previously generated keys will talk half as long to = calculate, > resulting in faster mounting of encrypted volumes. Users may choose = to > rekey, to generate a new key with the larger default number of = iterations > using the geli(8) setkey command. >=20 > Security of existing data is not compromised, as ~1 second per brute = force > attempt is still a very high threshold. >=20 > PR: 202365 > Original Research: = https://jbp.io/2015/08/11/pbkdf2-performance-matters/ > Submitted by: Joe Pixton (Original = Version), jmg (Later Version) > Reviewed by: ed, pjd, delphij > Approved by: secteam, pjd (maintainer) > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D8236 >=20 > Added: > head/tests/sys/geom/eli/ > head/tests/sys/geom/eli/Makefile (contents, props changed) > head/tests/sys/geom/eli/pbkdf2/ > head/tests/sys/geom/eli/pbkdf2/Makefile (contents, props changed) > head/tests/sys/geom/eli/pbkdf2/gentestvect.py (contents, props = changed) > head/tests/sys/geom/eli/pbkdf2/hmactest.c (contents, props changed) > head/tests/sys/geom/eli/pbkdf2/testvect.h (contents, props changed) > Modified: > head/etc/mtree/BSD.tests.dist > head/sys/boot/geli/Makefile > head/sys/geom/eli/g_eli.h > head/sys/geom/eli/g_eli_hmac.c > head/sys/geom/eli/pkcs5v2.c > head/tests/sys/geom/Makefile python (2.x) is now a requirement for the build after this = commit--this is problematic for a few reasons: 1. py3k is quickly becoming the defacto version upstream, and = sometime in the future will become the one and only version. 2. python is not in the limited path when the build is executed, = and unfortunately this path might be triggered if the file that=E2=80=99s = generated is older than the script. 3. Not everyone is guaranteed to install the python port. Could you please fix this? Thanks, -Ngie PS. The script that was committed is also not-PEP8 compliant (I see hard = tab indentation instead of 4-space indents). --Apple-Mail=_690F6A92-9D27-4313-A51D-220C98283BA3 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 iQIcBAEBCgAGBQJYqgebAAoJEPWDqSZpMIYVQggQAJoc9/+tD9w/utxTvlH42r4Z IPY49A6hWM57CCvUQ/REPuim5306Og/iK2iImXJaOjXNHFTK638dMhIJ+yXw/u+F cVIQke7TEJBi49whvAZhJ0sG3dlCx70jGRDgrNozjYXko5Eh3ewwXPTlk8DBjknR eYR0mnNZ7p3geKoQPMzuDKkzWS79cWrT2210B86IPPCnLKcpB2bB9Na6Q7jRVjr4 DNhRQzULLjkGe2/yoN8WZdpCElceTldrM7CbeyJ2nMm7neuTKdKaulQSd9gjV+8W eUcAsFLWkIbIrXOcS6kA6wFw4DOBJOFiJBedjI2+TsdPzpFQCLPSpmgnfWD/+5nJ jvWGXpI+pTpFHu6HimtYI/xK+b3erbcKXCzm+9GxfEnQ675CNKefSMoAsShVzoQt 21/gC3xrnua07MCuPxSlYMJpjqiEDDvYBXTdCf5//6Ma8Vhit3S16+7MpMgH+Jum SeiC7xWwQ82tsX6MALukgweRrlCK1EjDc+AGSwOgaEtKVx8UIb7c418JGKgRqjo0 1EPePdfG2bH7UXa1P7uhqw342L6bag2Zri7r5htVYW8rLyvytB7O2BAbdHzm73Vr a0DE5e79lfyyPYxcPwjFsRCAEETZq85L89TD0x1jtdAVsQuQaNaWqx4zhJxSbd2u bUHgb1c8MJDmFjZVn7Xt =3AH5 -----END PGP SIGNATURE----- --Apple-Mail=_690F6A92-9D27-4313-A51D-220C98283BA3-- From owner-svn-src-all@freebsd.org Sun Feb 19 21: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 C7DC1CE59FD; Sun, 19 Feb 2017 21:02:06 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B92915F3; Sun, 19 Feb 2017 21:02:06 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1JL250L091916; Sun, 19 Feb 2017 21:02:05 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JL25Vv091915; Sun, 19 Feb 2017 21:02:05 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702192102.v1JL25Vv091915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 19 Feb 2017 21:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313969 - vendor/openpam/RADULA 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, 19 Feb 2017 21:02:06 -0000 Author: des Date: Sun Feb 19 21:02:05 2017 New Revision: 313969 URL: https://svnweb.freebsd.org/changeset/base/313969 Log: Tag OpenPAM Radula. Added: vendor/openpam/RADULA/ - copied from r313968, vendor/openpam/dist/ From owner-svn-src-all@freebsd.org Sun Feb 19 21:07: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 B9FC0CE5D0C; Sun, 19 Feb 2017 21:07:02 +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 85BBE1863; Sun, 19 Feb 2017 21:07:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id c193so3072934pfb.3; Sun, 19 Feb 2017 13:07:02 -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=gq4XMkK7oYGeN7zY4u7XoF/jYwbGOC+QEWgMG9rHdVo=; b=L/NCF+hPiPtW6HLQfli5HtkVzprSAYZOPetuj8ABDL0WYl6nBDZfg+lKqOoLT7DFSG lc3Bv9STbvfia5ARrqRM3NXdbwX1yjK3MpgyF3LDLozYSBhIME5PLdlVEWE9qcX3sDy8 thwYhwBXVVZEut3+iuDk1AiPoqRAfg/2aaB6GNVrDockjdzOFHtGl0L9iNy+quL3816K Kxaf/zFZCO7NdGabqOZXt8d0c4pWiRffqqMFi+L7egLnwru26brnr5zksu2ml0XcQZVq FAmOqx7ndyw1/sWT9ygqK03cjC53jcNETZSmoQkMbUEUxFrkiOPH/CLzyq6T6B1jZ4WY ri8w== 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=gq4XMkK7oYGeN7zY4u7XoF/jYwbGOC+QEWgMG9rHdVo=; b=C0eemWBAUu8H1FSWwFGBot6Age9Mt3exujp6PPTn8hBtGR9bEYJZ85Era7AFZS3Y8n lrMNcdhyOWtnoMaA6tKWypwIM6WMk8QRmYU+F1RtkYqnge7BeuF5OtJ3F2t6IiWSAjhr XpSmyb3xgUz9ZJ96jonz0aJs93QXcliNDugoK0G7XI4tgjL1Yq41b8RF3UqvwtMNpQpF a6+kYPmTvVR58Y8JVqi/1ADlKICh8o/lyMV0M1sIpCmlDuZaLkrAikz0wiCABl3G+Rw+ OAHxT2Srjq4QMs0ouEBAMJtClaK5lrUzbv9atJ7J8sqUI/PAJlTI3o64aqejaPkdi+DB my0g== X-Gm-Message-State: AMke39npnQrbeyiyWVVPWnbgD6LJr24qmhH5YfVjQMvESE8n94AhXhiMzE92y+sYYbWyJQ== X-Received: by 10.99.115.71 with SMTP id d7mr23333946pgn.56.1487538421706; Sun, 19 Feb 2017 13:07:01 -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 p66sm30824426pfb.88.2017.02.19.13.07.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Feb 2017 13:07:00 -0800 (PST) Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_10773C72-170A-4915-BBEE-234171C04697"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Sun, 19 Feb 2017 13:06:59 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702191930.v1JJUW3q051018@repo.freebsd.org> To: Allan Jude 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, 19 Feb 2017 21:07:02 -0000 --Apple-Mail=_10773C72-170A-4915-BBEE-234171C04697 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 19, 2017, at 13:01, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Feb 19, 2017, at 11:30, Allan Jude wrote: >>=20 >> Author: allanjude >> Date: Sun Feb 19 19:30:31 2017 >> New Revision: 313962 >> URL: https://svnweb.freebsd.org/changeset/base/313962 >>=20 >> Log: >> improve PBKDF2 performance >>=20 >> The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it = could be >>=20 >> GELI's PBKDF2 uses a simple benchmark to determine a number of = iterations >> that will takes approximately 2 seconds. The security provided is = actually >> half what is expected, because an attacker could use the optimized >> algorithm to brute force the key in half the expected time. >>=20 >> With this change, all newly generated GELI keys will be approximately = 2x >> as strong. Previously generated keys will talk half as long to = calculate, >> resulting in faster mounting of encrypted volumes. Users may choose = to >> rekey, to generate a new key with the larger default number of = iterations >> using the geli(8) setkey command. >>=20 >> Security of existing data is not compromised, as ~1 second per brute = force >> attempt is still a very high threshold. >>=20 >> PR: 202365 >> Original Research: = https://jbp.io/2015/08/11/pbkdf2-performance-matters/ >> Submitted by: Joe Pixton (Original = Version), jmg (Later Version) >> Reviewed by: ed, pjd, delphij >> Approved by: secteam, pjd (maintainer) >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D8236 >>=20 >> Added: >> head/tests/sys/geom/eli/ >> head/tests/sys/geom/eli/Makefile (contents, props changed) >> head/tests/sys/geom/eli/pbkdf2/ >> head/tests/sys/geom/eli/pbkdf2/Makefile (contents, props changed) >> head/tests/sys/geom/eli/pbkdf2/gentestvect.py (contents, props = changed) >> head/tests/sys/geom/eli/pbkdf2/hmactest.c (contents, props changed) >> head/tests/sys/geom/eli/pbkdf2/testvect.h (contents, props changed) >> Modified: >> head/etc/mtree/BSD.tests.dist >> head/sys/boot/geli/Makefile >> head/sys/geom/eli/g_eli.h >> head/sys/geom/eli/g_eli_hmac.c >> head/sys/geom/eli/pkcs5v2.c >> head/tests/sys/geom/Makefile >=20 > python (2.x) is now a requirement for the build after this = commit--this is problematic for a few reasons: > 1. py3k is quickly becoming the defacto version upstream, and = sometime in the future will become the one and only version. > 2. python is not in the limited path when the build is executed, = and unfortunately this path might be triggered if the file that=E2=80=99s = generated is older than the script. > 3. Not everyone is guaranteed to install the python port. > Could you please fix this? > Thanks, > -Ngie >=20 > PS. The script that was committed is also not-PEP8 compliant (I see = hard tab indentation instead of 4-space indents). Also, why wasn=E2=80=99t this test instead committed to = =E2=80=A6/tests/sys/geom/class/eli/ instead of = =E2=80=A6/tests/sys/geom/eli/pbkdf2/ ? Thanks, -Ngie --Apple-Mail=_10773C72-170A-4915-BBEE-234171C04697 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 iQIcBAEBCgAGBQJYqgjzAAoJEPWDqSZpMIYVs0MP/15hNmHebJvm80c3bgJ20A48 4UfSNZgPsUY9Oh0ob04/8u18LsT2X4QK51HUwAVypMMArW+TZTiG4Z7hpEwZIry5 r1rge6TL/D+KjIsL4OwRdvvgY4z2erGc0+ktsSoBTzNi9roDF0AlmHF/szAxyJhD NRsT/wD4RLAqet2pwSsGcxJM56ZIQrOpCuz15a79mT6pb0HhoyEYZHOCpDssL2NJ wSrViq2IY8BN1kNFYQ4TetL7Fq7YCZYDCIbl1r1a6JsNs7SKPUFbuAXlno59kQES 8dZ6b2MuyWrNj9n56a86kf2/40Sw2FfCqP7b/L03U/qlrlBkX6WNmpp3bURAJHip fcVeRiIvONYSQWWRkbvER6cBvttYJq5oNMklmRc1WJUbPoi0qjr979JNXI6rCfNq cDFFLEddE4LNUeuT9x05/DLt+L9KBRl6OPhqKwSVPzrn0oUHHIzYHiTihSs38boA JnVlYr33XcpmW3BuonmQlpGfEo7DTTZAU8OSIsV6oN+22g14t3OweWLjdtZq6e+j /pzJHBkcEN/98yiyrYGVnNQ0n1MIUxbYJPThnutScOcLLD7D747Yzcu57Rd1PWUy G5TOWr6dBlhX1/EyfH0DAuE7Fdc8cEMVF4MsMWsXqm3aXZOD5oKYmo7x2QO6FwRL fru569MHMyz4b3hWsDq1 =rVk+ -----END PGP SIGNATURE----- --Apple-Mail=_10773C72-170A-4915-BBEE-234171C04697-- From owner-svn-src-all@freebsd.org Sun Feb 19 21:08: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 6DD33CE5DA7; Sun, 19 Feb 2017 21:08:11 +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 3D1E419AF; Sun, 19 Feb 2017 21:08:11 +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 v1JL8Amg093124; Sun, 19 Feb 2017 21:08:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JL8AwS093123; Sun, 19 Feb 2017 21:08:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702192108.v1JL8AwS093123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 19 Feb 2017 21:08:10 +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: r313970 - stable/11/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: Sun, 19 Feb 2017 21:08:11 -0000 Author: pfg Date: Sun Feb 19 21:08:10 2017 New Revision: 313970 URL: https://svnweb.freebsd.org/changeset/base/313970 Log: MFC r313819: Remove outdated claim. Despite wishful thinking the removal of these old functions hasn't happened yet. Modified: stable/11/include/stdlib.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/stdlib.h ============================================================================== --- stable/11/include/stdlib.h Sun Feb 19 21:02:05 2017 (r313969) +++ stable/11/include/stdlib.h Sun Feb 19 21:08:10 2017 (r313970) @@ -315,7 +315,7 @@ void srandomdev(void); long long strtonum(const char *, long long, long long, const char **); -/* Deprecated interfaces, to be removed in FreeBSD 6.0. */ +/* Deprecated interfaces, to be removed. */ __int64_t strtoq(const char *, char **, int); __uint64_t From owner-svn-src-all@freebsd.org Sun Feb 19 21:08: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 D1EEECE5DAC; Sun, 19 Feb 2017 21:08:11 +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 AA51219BC; Sun, 19 Feb 2017 21:08:11 +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 80C8513F22; Sun, 19 Feb 2017 21:08:09 +0000 (UTC) Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 To: "Ngie Cooper (yaneurabeya)" References: <201702191930.v1JJUW3q051018@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: Date: Sun, 19 Feb 2017 16:07:57 -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: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MvUVXPviLnRO6W18Wp1NtbnClPWs6fbTh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 21:08:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MvUVXPviLnRO6W18Wp1NtbnClPWs6fbTh Content-Type: multipart/mixed; boundary="QH7CWWFDu9XBIcTd4Oxnhd1AMCinI8HEr"; protected-headers="v1" From: Allan Jude To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 References: <201702191930.v1JJUW3q051018@repo.freebsd.org> In-Reply-To: --QH7CWWFDu9XBIcTd4Oxnhd1AMCinI8HEr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-02-19 16:01, Ngie Cooper (yaneurabeya) wrote: >=20 >> On Feb 19, 2017, at 11:30, Allan Jude wrote: >> >> Author: allanjude >> Date: Sun Feb 19 19:30:31 2017 >> New Revision: 313962 >> URL: https://svnweb.freebsd.org/changeset/base/313962 >> >> Log: >> improve PBKDF2 performance >> >> The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it coul= d be >> >> GELI's PBKDF2 uses a simple benchmark to determine a number of iterat= ions >> that will takes approximately 2 seconds. The security provided is act= ually >> half what is expected, because an attacker could use the optimized >> algorithm to brute force the key in half the expected time. >> >> With this change, all newly generated GELI keys will be approximately= 2x >> as strong. Previously generated keys will talk half as long to calcul= ate, >> resulting in faster mounting of encrypted volumes. Users may choose t= o >> rekey, to generate a new key with the larger default number of iterat= ions >> using the geli(8) setkey command. >> >> Security of existing data is not compromised, as ~1 second per brute = force >> attempt is still a very high threshold. >> >> PR: 202365 >> Original Research: https://jbp.io/2015/08/11/pbkdf2-performance-matte= rs/ >> Submitted by: Joe Pixton (Original Version), jmg = (Later Version) >> Reviewed by: ed, pjd, delphij >> Approved by: secteam, pjd (maintainer) >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D8236 >> >> Added: >> head/tests/sys/geom/eli/ >> head/tests/sys/geom/eli/Makefile (contents, props changed) >> head/tests/sys/geom/eli/pbkdf2/ >> head/tests/sys/geom/eli/pbkdf2/Makefile (contents, props changed) >> head/tests/sys/geom/eli/pbkdf2/gentestvect.py (contents, props chan= ged) >> head/tests/sys/geom/eli/pbkdf2/hmactest.c (contents, props changed)= >> head/tests/sys/geom/eli/pbkdf2/testvect.h (contents, props changed)= >> Modified: >> head/etc/mtree/BSD.tests.dist >> head/sys/boot/geli/Makefile >> head/sys/geom/eli/g_eli.h >> head/sys/geom/eli/g_eli_hmac.c >> head/sys/geom/eli/pkcs5v2.c >> head/tests/sys/geom/Makefile >=20 > python (2.x) is now a requirement for the build after this commit--thi= s is problematic for a few reasons: > 1. py3k is quickly becoming the defacto version upstream, and sometime= in the future will become the one and only version. > 2. python is not in the limited path when the build is executed, and u= nfortunately this path might be triggered if the file that=E2=80=99s gene= rated is older than the script. > 3. Not everyone is guaranteed to install the python port. > Could you please fix this? > Thanks, > -Ngie >=20 > PS. The script that was committed is also not-PEP8 compliant (I see har= d tab indentation instead of 4-space indents). >=20 Sorry, I didn't think it actually built these tests unless testvect.h did not exist. These tests were written by jmg@, years ago, but by me. What do you think the best course of action is? Just disconnect this test= ? --=20 Allan Jude --QH7CWWFDu9XBIcTd4Oxnhd1AMCinI8HEr-- --MvUVXPviLnRO6W18Wp1NtbnClPWs6fbTh 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) iQIcBAEBAgAGBQJYqgkwAAoJEBmVNT4SmAt+aRkQAMX2Xq79ShhTBaz+A7jXKMxr KF6wPyzCsDOMqUKe9rUJIXm6+UjGiH4llpbADf3O0z4GVO7m+MRpOomR1V4zWOF2 +YcszF6SlNMNOARKFWgKGX//TEr/JeiWaSwgZJNUZSEjbIxMbtu0I2Yr31wrD3IE Qr0whFe5YbgjslVeaGjBi8axKggxf+i9J4M0x7ZKh7o/mF4Pr768TvrCmHPd0l9H ozvSvTVpuN4gpf9Z/AZ6et8tfb85dm4oZbRKK1Hh+DmpGnoyR9G4XWaKtU/p2YkT /NtdoJ0wooHFcWkYBa9HUHSBeWk8Deobjk+3sztMBPMCCfXI0HVKiHOJq1PqdjgI Pho3/YyO8GztfIfmjsPSP7t/9hn5TPSbS/DmKxP/OLIIKiPpJugSnwlCK1zwhZIk Fauv3U/ETWSY1EQXoPf17kfcIE409NfaexsDH24rsUOgHKsP3vpD1MH6RL/HZak4 nK3LSZen/Y8W2bvw/2o7OykL+qMbm0d9Kv5HAtPrZat5pNmPal5y3O9qv6M2fQMm cQ8g/8/j1JwGgktaxAvDX4DhO0EYY1P7t0qEc82wb5qGlyYLPIYqk4RuJc/8BJH7 +FZds4d9d/arFOw1vJYHIlEvhIeoUXLGrXZR+WRFRcZPizow4Wu24jihwLbpJgsq vtUcquvm1UbA449zSQNB =X4QP -----END PGP SIGNATURE----- --MvUVXPviLnRO6W18Wp1NtbnClPWs6fbTh-- From owner-svn-src-all@freebsd.org Sun Feb 19 21:10: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 34ECDCE6042; Sun, 19 Feb 2017 21:10:36 +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 EEF241CB1; Sun, 19 Feb 2017 21:10:35 +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 v1JLAZoF093275; Sun, 19 Feb 2017 21:10:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JLAZM2093274; Sun, 19 Feb 2017 21:10:35 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702192110.v1JLAZM2093274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 19 Feb 2017 21:10: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: r313971 - stable/10/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 21:10:36 -0000 Author: pfg Date: Sun Feb 19 21:10:34 2017 New Revision: 313971 URL: https://svnweb.freebsd.org/changeset/base/313971 Log: MFC r313819: Remove outdated claim. Despite wishful thinking the removal of these old functions hasn't happened yet. Modified: stable/10/include/stdlib.h Directory Properties: stable/10/ (props changed) Modified: stable/10/include/stdlib.h ============================================================================== --- stable/10/include/stdlib.h Sun Feb 19 21:08:10 2017 (r313970) +++ stable/10/include/stdlib.h Sun Feb 19 21:10:34 2017 (r313971) @@ -298,7 +298,7 @@ void srandomdev(void); long long strtonum(const char *, long long, long long, const char **); -/* Deprecated interfaces, to be removed in FreeBSD 6.0. */ +/* Deprecated interfaces, to be removed. */ __int64_t strtoq(const char *, char **, int); __uint64_t From owner-svn-src-all@freebsd.org Sun Feb 19 21:12: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 6D2BACE60AA; Sun, 19 Feb 2017 21:12:18 +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 38FFE68; Sun, 19 Feb 2017 21:12:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id a123so7469954pgc.3; Sun, 19 Feb 2017 13:12:18 -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=VxOYfruWy+6YD9PyFuW5iaNAToNVcnS6VXQCLiCzH/U=; b=kkEaOiX0dSKboDnm1rqfMSDRcnQvyqCM3i8iEp0grVMxoAKBkn5lOBJqSKl1/ncbq2 K9ORZ+pbfPS8HTWbvsA1nJFMpZQzXSuDl6AyDmFP0Plvy3V6PpzJkgTR7BVVWPlCaRA3 +8b4ygRBW47MqCdi26wJh15KeKVhdilLO9QttwPi2c8UseEwlnZQkHK8BDdzvczpDK+u oUGHsoTGQrXTKYRd2OU1p0sClavZkzUyBFUKuSdZiYbmNThiT/MVKK8oljYuidCMRg32 /z9g18QQ+bhp5i5yo/Xp06jvbwy4UlVnuVWrCMn/eZyhFFyp+UnWst5Rue/cJmrA8QOz JXHQ== 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=VxOYfruWy+6YD9PyFuW5iaNAToNVcnS6VXQCLiCzH/U=; b=LAw3r7HvKOgqegckPfYOPbhq+oazrVTOz+lReEPWSgKb6Et4XzC0t31d/Pq9XmT34h R9kxWAFl00ETJb9o16+X2vNxE0cx8f1zyzoGqz3U2WiWX2o8SZhwBph5m0BNycCIq50B gjTLt04XwHOazUGs1Cbl++yNDIruAyOsNjWWR+uDmAq6JDiw9JxRau85fB899PSeoIVC p8CTFtD0UJxqD1d7SLjO7szZrh2PisvdLR9w3ASTurqD06GPlXOA8+hV+EVV3m8XD0SN ZI9z9tZSJ4/5qhdZjz7CXdHijbDqSlYsTNyUGSf75N6K+ZxYpzxQioPR/IZ7LFrAPVpG Hcyg== X-Gm-Message-State: AMke39mrRG1rFEmr3BbB1xSb2brKY/UDsz9N7t52pgRrUqstAW9UiyJuWSOa/+Dgzks5pw== X-Received: by 10.84.169.67 with SMTP id g61mr26974929plb.137.1487538737351; Sun, 19 Feb 2017 13:12:17 -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 188sm30790649pfg.99.2017.02.19.13.12.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Feb 2017 13:12:16 -0800 (PST) Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E4CFC40A-B2A9-496D-8FE1-7D7ED7E3AB09"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Sun, 19 Feb 2017 13:12:15 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702191930.v1JJUW3q051018@repo.freebsd.org> To: Allan Jude 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, 19 Feb 2017 21:12:18 -0000 --Apple-Mail=_E4CFC40A-B2A9-496D-8FE1-7D7ED7E3AB09 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 19, 2017, at 13:07, Allan Jude wrote: =E2=80=A6 > Sorry, I didn't think it actually built these tests unless testvect.h > did not exist. >=20 > These tests were written by jmg@, years ago, but by me. >=20 > What do you think the best course of action is? Just disconnect this = test? To be safe, I=E2=80=99d probably just disconnect the dependency = since the generated file (I assume) works by itself, e.g. $ svn diff tests/sys/geom/eli/pbkdf2/Makefile Index: tests/sys/geom/eli/pbkdf2/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 --- tests/sys/geom/eli/pbkdf2/Makefile (revision 313971) +++ tests/sys/geom/eli/pbkdf2/Makefile (working copy) @@ -22,7 +22,7 @@ LIBADD.pbkdf2=3D crypto -testvect.h: gentestvect.py +testvect.h: python gentestvect.py > $@ .include We can work on removing the python dependency in the interim. Thanks, -Ngie --Apple-Mail=_E4CFC40A-B2A9-496D-8FE1-7D7ED7E3AB09 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 iQIcBAEBCgAGBQJYqgowAAoJEPWDqSZpMIYV7lgQAK/tmzH1GPRKGFDBrRFNsuMc dG4Q5MKFZ9xGjuq5c/nv3DDbHfMxtAEH3zPlkqP2jXmDXrylgh1VrNg03wFyZAw0 nrgZJ+7cfZtDOnVWXveB8T77xH/9u68VGcJDCgiK0bdAu5R8IUie7X3KK+sfNR1L OHtVDi/97y1to6bvZ6x6gXe/6FzZ1uwKqsjGDFQA7nG+frFR0co5wt5ND8JVBkj+ sNPJqwdbp43AQ7ZA8dptrPr45qbj4jYSlbhCCoEPNrhQf/Djx0AskQATXHqMJKcU JYf/is63XqpjfUO1nyjKCgSowd8UJn0BkSflmkCHl/IG2wolvTdP6gXy6Y+K4VNm hYsUc6uN/3Vt/t7h6r8Bl3njda5wHedcW4q9T1aqMzNZmhHCeVFqyWCAdxRsphgu 1imUW5JAumqq2Yl3SRD3a96vCP/2bPQn9glv33gTZt3Zm7JJ8qkMFg5bx8DlB5/b jcuV6HxGixfgzGLBx8rGHqUVYd/YfoH45lVMfTIGVvPxvZy7wdf7qxrhJk8jYdY0 Fm7jY6H9HccbVbDOH/Dnm0kiBAUT6yb391WQ07/8KtIzWf9dOB1BozeJ6BUjzyAs MVR/e80chuNO77cs/uighutNScQNibnuRh+a9mWSuoiRN8LaOqfJ4sxcVSHpqMdT RzSdJ7kqkin/37900lHS =0DCX -----END PGP SIGNATURE----- --Apple-Mail=_E4CFC40A-B2A9-496D-8FE1-7D7ED7E3AB09-- From owner-svn-src-all@freebsd.org Sun Feb 19 21:19: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 DB3A7CE6125; Sun, 19 Feb 2017 21:19: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 9AD1B239; Sun, 19 Feb 2017 21:19: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 v1JLJi6f097306; Sun, 19 Feb 2017 21:19:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JLJikY097305; Sun, 19 Feb 2017 21:19:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702192119.v1JLJikY097305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 19 Feb 2017 21:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313972 - head/tests/sys/geom/eli/pbkdf2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 21:19:46 -0000 Author: ngie Date: Sun Feb 19 21:19:44 2017 New Revision: 313972 URL: https://svnweb.freebsd.org/changeset/base/313972 Log: Unbreak the build when "make obj" is executed beforehand Using relative paths imply working directory (in this case .OBJDIR), whereas the sources live in the .CURDIR-relative path. MFC after: 2 weeks X-MFC with: r313962 Pointyhat to: allanjude Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/eli/pbkdf2/Makefile Modified: head/tests/sys/geom/eli/pbkdf2/Makefile ============================================================================== --- head/tests/sys/geom/eli/pbkdf2/Makefile Sun Feb 19 21:10:34 2017 (r313971) +++ head/tests/sys/geom/eli/pbkdf2/Makefile Sun Feb 19 21:19:44 2017 (r313972) @@ -2,7 +2,7 @@ .include -SYSDIR = ../../../../../sys +SYSDIR = ${SRCTOP}/sys .PATH: ${SYSDIR}/geom/eli .PATH: ${SYSDIR}/crypto/sha2 @@ -22,7 +22,7 @@ SRCS.pbkdf2= \ LIBADD.pbkdf2= crypto -testvect.h: gentestvect.py +testvect.h: python gentestvect.py > $@ .include From owner-svn-src-all@freebsd.org Sun Feb 19 21:42: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 5EE82CE688D for ; Sun, 19 Feb 2017 21:42:33 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-ua0-x22d.google.com (mail-ua0-x22d.google.com [IPv6:2607:f8b0:400c:c08::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 1A37A1505 for ; Sun, 19 Feb 2017 21:42:33 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-ua0-x22d.google.com with SMTP id x12so55414970uax.0 for ; Sun, 19 Feb 2017 13:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x4zGEFMpm6oXfgYqfmF7vgXgAqF3RjXTcJtopQTfWTg=; b=NCMll4H2eUaW4RqiOExD3vGw4PgZkztIjUdAXWurRYU4QCFS0/P4C8/JqryMRVueFF I6hhzQz1UcR235nqfI3sE/2fM8P5sGEN08NNl6lcjf6HPAfCc2ci8rLIPSxs7+deXsM3 NdaV+F3h0NVZ37IJOaHwlUq2MBNW1kBqZHah1a5oT6g2fdGr46hG/NQGLZ7v6+D99FGt m6A5e3xvCvUKo5H8/3b+CcCqpF/QSojhAL7Z2dn0GjjULRF1B3dpgCrF6sQw61AmSpxb BNnxxnXYkV9O8tUMZmzKFcwSY/2ZYdhNT931yRxAevo5sXbHWACwrfyT5/vdppj1bw1s D5CQ== 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=x4zGEFMpm6oXfgYqfmF7vgXgAqF3RjXTcJtopQTfWTg=; b=FPplXvdhXLRDF/TqSWyIIAIOzSdjC6MJu0a61JpuGcBi/QzXmXUjuZBuyOpk4ShSZk Qyu4S8gIh8aSIBKROI867e64sDYQlAkBHYV+iWjGgv5nEkqMOmt60z8cIUOxdpKmIrDf 68YcU7nTRQW9f2sAtSf9xO7npaDroWM36MAZx9o96HPwNIQqSxsr08NMHt0Vao0fJwbw 9wQ2nmSD1H8FV/em/9m86vJpeHDROVSOZQ/7vH0Dm5nA5Fx3e73PNRqt8MPKnA+mKft/ Szht0zsDlXeCgUQ1fa++tftml78IT2xzQZITuaXxmgQ3R53Bw3thAgEWMG0Fvy9qUk9Q cPuA== X-Gm-Message-State: AMke39nKVqUSfXgc0zVHc1uGwx2P3WzVjLZKYTP3C9oNwYxzP80Kd+MsqkTBwlIiikakmJsmcZCV1xNWrj/uHLrq X-Received: by 10.176.4.117 with SMTP id 108mr2673610uav.16.1487540552177; Sun, 19 Feb 2017 13:42:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.45.2 with HTTP; Sun, 19 Feb 2017 13:42:31 -0800 (PST) In-Reply-To: <201702192035.v1JKZdie080791@repo.freebsd.org> References: <201702192035.v1JKZdie080791@repo.freebsd.org> From: Oliver Pinter Date: Sun, 19 Feb 2017 22:42:31 +0100 Message-ID: Subject: Re: svn commit: r313965 - head/crypto/openssh To: Kurt Lidl 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: Sun, 19 Feb 2017 21:42:33 -0000 Hello! On 2/19/17, Kurt Lidl wrote: > Author: lidl > Date: Sun Feb 19 20:35:39 2017 > New Revision: 313965 > URL: https://svnweb.freebsd.org/changeset/base/313965 > > Log: > Only notify blacklistd for successful logins in auth.c What's the rationale behind this change? > > Reported by: Rick Adams > Reviewed by: des > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > > Modified: > head/crypto/openssh/auth.c > > Modified: head/crypto/openssh/auth.c > ============================================================================== > --- head/crypto/openssh/auth.c Sun Feb 19 19:56:12 2017 (r313964) > +++ head/crypto/openssh/auth.c Sun Feb 19 20:35:39 2017 (r313965) > @@ -295,8 +295,8 @@ auth_log(Authctxt *authctxt, int authent > authmsg = "Partial"; > else { > authmsg = authenticated ? "Accepted" : "Failed"; > - BLACKLIST_NOTIFY(authenticated ? > - BLACKLIST_AUTH_OK : BLACKLIST_AUTH_FAIL); > + if (authenticated) > + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); > } > > authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s", > _______________________________________________ > 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" > From owner-svn-src-all@freebsd.org Sun Feb 19 22:00: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 6913BCE6B83; Sun, 19 Feb 2017 22:00: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 36B411B30; Sun, 19 Feb 2017 22:00: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 v1JM0BF9013452; Sun, 19 Feb 2017 22:00:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JM0B3e013451; Sun, 19 Feb 2017 22:00:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702192200.v1JM0B3e013451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 19 Feb 2017 22:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313973 - head/tests/sys/geom/eli/pbkdf2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 22:00:12 -0000 Author: ngie Date: Sun Feb 19 22:00:11 2017 New Revision: 313973 URL: https://svnweb.freebsd.org/changeset/base/313973 Log: A forced commit to note other portion of the Makefile change accidentally committed in r313972 The code committed in r313962 implicitly relies on python 2.x to generate testvect.h . There are a handful of issues with this approach: - python is not an explicit build dependency for FreeBSD - python 2.x is deprecated and will be removed sometime in the future (potentially before 11.x's EOL), and the script does not function with python 3.5 (it uses deprecated idioms and incompatible function calls). - python(1) (by default) lives in /usr/local/bin (${LOCALBASE}/bin) and gentestvect.py is a dependency of testvect.h (prior to r313972) which means that if the mtime of the generator script was newer than the mtime of the test vector, it could cause a spurious build failure in build time or at install time. A better solution using C/C++ should be devised. Discussed with: allanjude MFC after: 2 weeks X-MFC with: r313962, r313972 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/eli/pbkdf2/Makefile Modified: head/tests/sys/geom/eli/pbkdf2/Makefile ============================================================================== --- head/tests/sys/geom/eli/pbkdf2/Makefile Sun Feb 19 21:19:44 2017 (r313972) +++ head/tests/sys/geom/eli/pbkdf2/Makefile Sun Feb 19 22:00:11 2017 (r313973) @@ -23,6 +23,6 @@ SRCS.pbkdf2= \ LIBADD.pbkdf2= crypto testvect.h: - python gentestvect.py > $@ + python gentestvect.py > ${.TARGET} .include From owner-svn-src-all@freebsd.org Sun Feb 19 22:05: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 81B0ECE6D4A; Sun, 19 Feb 2017 22:05:15 +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 4F5E7196; Sun, 19 Feb 2017 22:05:14 +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 91017131EA; Sun, 19 Feb 2017 22:05:13 +0000 (UTC) Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 To: "Ngie Cooper (yaneurabeya)" References: <201702191930.v1JJUW3q051018@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: Date: Sun, 19 Feb 2017 17:04: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: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cx6GrkRAXwBHo7mlo5qkFOrCB301CSdeG" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 19 Feb 2017 22:05:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cx6GrkRAXwBHo7mlo5qkFOrCB301CSdeG Content-Type: multipart/mixed; boundary="MeKjeHqCW3wf3FfpfvbqQDScJ0IsH7L27"; protected-headers="v1" From: Allan Jude To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r313962 - in head: etc/mtree sys/boot/geli sys/geom/eli tests/sys/geom tests/sys/geom/eli tests/sys/geom/eli/pbkdf2 References: <201702191930.v1JJUW3q051018@repo.freebsd.org> In-Reply-To: --MeKjeHqCW3wf3FfpfvbqQDScJ0IsH7L27 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-02-19 16:06, Ngie Cooper (yaneurabeya) wrote: >=20 >> On Feb 19, 2017, at 13:01, Ngie Cooper (yaneurabeya) wrote: >> >>> >>> On Feb 19, 2017, at 11:30, Allan Jude wrote: >>> >>> Author: allanjude >>> Date: Sun Feb 19 19:30:31 2017 >>> New Revision: 313962 >>> URL: https://svnweb.freebsd.org/changeset/base/313962 >>> >>> Log: >>> improve PBKDF2 performance >>> >>> The PBKDF2 in sys/geom/eli/pkcs5v2.c is around half the speed it coul= d be >>> >>> GELI's PBKDF2 uses a simple benchmark to determine a number of iterat= ions >>> that will takes approximately 2 seconds. The security provided is act= ually >>> half what is expected, because an attacker could use the optimized >>> algorithm to brute force the key in half the expected time. >>> >>> With this change, all newly generated GELI keys will be approximately= 2x >>> as strong. Previously generated keys will talk half as long to calcul= ate, >>> resulting in faster mounting of encrypted volumes. Users may choose t= o >>> rekey, to generate a new key with the larger default number of iterat= ions >>> using the geli(8) setkey command. >>> >>> Security of existing data is not compromised, as ~1 second per brute = force >>> attempt is still a very high threshold. >>> >>> PR: 202365 >>> Original Research: https://jbp.io/2015/08/11/pbkdf2-performance-matte= rs/ >>> Submitted by: Joe Pixton (Original Version), jmg = (Later Version) >>> Reviewed by: ed, pjd, delphij >>> Approved by: secteam, pjd (maintainer) >>> MFC after: 2 weeks >>> Differential Revision: https://reviews.freebsd.org/D8236 >>> >>> Added: >>> head/tests/sys/geom/eli/ >>> head/tests/sys/geom/eli/Makefile (contents, props changed) >>> head/tests/sys/geom/eli/pbkdf2/ >>> head/tests/sys/geom/eli/pbkdf2/Makefile (contents, props changed) >>> head/tests/sys/geom/eli/pbkdf2/gentestvect.py (contents, props chan= ged) >>> head/tests/sys/geom/eli/pbkdf2/hmactest.c (contents, props changed)= >>> head/tests/sys/geom/eli/pbkdf2/testvect.h (contents, props changed)= >>> Modified: >>> head/etc/mtree/BSD.tests.dist >>> head/sys/boot/geli/Makefile >>> head/sys/geom/eli/g_eli.h >>> head/sys/geom/eli/g_eli_hmac.c >>> head/sys/geom/eli/pkcs5v2.c >>> head/tests/sys/geom/Makefile >> >> python (2.x) is now a requirement for the build after this commit--th= is is problematic for a few reasons: >> 1. py3k is quickly becoming the defacto version upstream, and sometim= e in the future will become the one and only version. >> 2. python is not in the limited path when the build is executed, and = unfortunately this path might be triggered if the file that=E2=80=99s gen= erated is older than the script. >> 3. Not everyone is guaranteed to install the python port. >> Could you please fix this? >> Thanks, >> -Ngie >> >> PS. The script that was committed is also not-PEP8 compliant (I see ha= rd tab indentation instead of 4-space indents). >=20 > Also, why wasn=E2=80=99t this test instead committed to =E2=80=A6/test= s/sys/geom/class/eli/ instead of =E2=80=A6/tests/sys/geom/eli/pbkdf2/ ? > Thanks, > -Ngie >=20 I think you are right, and this should be moved to geom/class/eli/pbkdf2 as well. --=20 Allan Jude --MeKjeHqCW3wf3FfpfvbqQDScJ0IsH7L27-- --cx6GrkRAXwBHo7mlo5qkFOrCB301CSdeG 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) iQIcBAEBAgAGBQJYqhaQAAoJEBmVNT4SmAt+XBwP/3JPUd94lpiuj4g8NafnzTKq OYUHNTIy3WwCysMrL1TXqsqduHbFdCu8fMUPDkROx5xagciuHqeQ15GRkZyx1TBz AWOodHWAvEpQt0Du4j3+sgoJ0opr3hYer0fJiaLrZDTT3qZmh4V+Gs1NJXDKZLkH Ip+QvV5tri37ZcQpKMzVA+obD4rni5pEH6jUmq6gcD3ug8u8H22W3E96LAJNeq1E JC81KXcDNUemXCuK+7tm4MvrompvLeZC3gSjX55VBvpFxuTG127EE41vv9qgF80O bugzb6OtQmbab9eE1UIrKhCS/zTbjvL3i4xiqZVfpyUIyHB15qE39+b4xOYoukX+ Iwku5ZppBfDCeCCwVXdBqsY/40IZKThYbIGfL0Trqb0Ijns/uqPVh3Bvek1OuqmB sEv7L2l9NsgO6YXn7qF8fhREdovRFPA8voV6p6dy6GUk/u9CfLm0OjvtS2BUiXlu kJYknyTwp3x6xo2HLuu2rzJgQjz8caU0GpAkJN7Tr01ArL9EABzHxf5aly1612uu Lk1kcOVvkpAONnaivECV6wk81hq3mdPZp9KRcxborP5/kXT5hzDRDne/d8U5S0iR MCoU9PqahJvFvcCapQG0Btwep9QYgvRMbZ9DqvZvtyki4jWsfiHTmt9HUIKHb2LE qjkM7+sGfwd8DbWaty4E =4JPa -----END PGP SIGNATURE----- --cx6GrkRAXwBHo7mlo5qkFOrCB301CSdeG-- From owner-svn-src-all@freebsd.org Sun Feb 19 23:06: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 3502ACE6649; Sun, 19 Feb 2017 23:06:31 +0000 (UTC) (envelope-from lidl@FreeBSD.org) 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 DD858667; Sun, 19 Feb 2017 23:06:30 +0000 (UTC) (envelope-from lidl@FreeBSD.org) 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 v1JN6TFI028564; Sun, 19 Feb 2017 18:06:29 -0500 (EST) (envelope-from lidl@FreeBSD.org) Reply-To: lidl@FreeBSD.org Subject: Re: svn commit: r313965 - head/crypto/openssh References: <201702192035.v1JKZdie080791@repo.freebsd.org> To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Kurt Lidl Message-ID: <72ddccfb-fa49-b9b1-c0fc-6fa896176091@FreeBSD.org> Date: Sun, 19 Feb 2017 18:06:29 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 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: Sun, 19 Feb 2017 23:06:31 -0000 On 2/19/17 4:42 PM, Oliver Pinter wrote: > Hello! > > On 2/19/17, Kurt Lidl wrote: >> Author: lidl >> Date: Sun Feb 19 20:35:39 2017 >> New Revision: 313965 >> URL: https://svnweb.freebsd.org/changeset/base/313965 >> >> Log: >> Only notify blacklistd for successful logins in auth.c > > What's the rationale behind this change? Without this change, every pass through auth.c results in a call to blacklist_notify(). So, in a normal remote login, you'd get a failed login flagged for the printing of the "xxx login:" prompt, before the remote user could enter a password. If the user successfully entered a good password, you'd get a good login flagged, and everything would be OK. If the user entered an incorrect password, you'd get another failed login in auth1.c (or auth2.c), and finally, when sshd got around to issuing the second "xxx login:" prompt, you'd have yet another failed login notice sent to blacklistd. So, if you had 3 bad logins set to the limit, you'd actually be blocking the address after the first bad login attempt. -Kurt > >> >> Reported by: Rick Adams >> Reviewed by: des >> MFC after: 3 days >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/crypto/openssh/auth.c >> >> Modified: head/crypto/openssh/auth.c >> ============================================================================== >> --- head/crypto/openssh/auth.c Sun Feb 19 19:56:12 2017 (r313964) >> +++ head/crypto/openssh/auth.c Sun Feb 19 20:35:39 2017 (r313965) >> @@ -295,8 +295,8 @@ auth_log(Authctxt *authctxt, int authent >> authmsg = "Partial"; >> else { >> authmsg = authenticated ? "Accepted" : "Failed"; >> - BLACKLIST_NOTIFY(authenticated ? >> - BLACKLIST_AUTH_OK : BLACKLIST_AUTH_FAIL); >> + if (authenticated) >> + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); >> } >> >> authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s", >> _______________________________________________ >> 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" >> From owner-svn-src-all@freebsd.org Sun Feb 19 23:18: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 DD5A6CE6941 for ; Sun, 19 Feb 2017 23:18:28 +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 C1953C96 for ; Sun, 19 Feb 2017 23:18:28 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bff74d44-f6f9-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 bff74d44-f6f9-11e6-ba57-8bc134ee460a; Sun, 19 Feb 2017 23:18:41 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1JNIJFU001140; Sun, 19 Feb 2017 16:18:19 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487546299.73144.110.camel@freebsd.org> Subject: Re: svn commit: r313965 - head/crypto/openssh From: Ian Lepore To: lidl@FreeBSD.org, Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 19 Feb 2017 16:18:19 -0700 In-Reply-To: <72ddccfb-fa49-b9b1-c0fc-6fa896176091@FreeBSD.org> References: <201702192035.v1JKZdie080791@repo.freebsd.org> <72ddccfb-fa49-b9b1-c0fc-6fa896176091@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: Sun, 19 Feb 2017 23:18:29 -0000 On Sun, 2017-02-19 at 18:06 -0500, Kurt Lidl wrote: > On 2/19/17 4:42 PM, Oliver Pinter wrote: > > > > Hello! > > > > On 2/19/17, Kurt Lidl wrote: > > > > > > Author: lidl > > > Date: Sun Feb 19 20:35:39 2017 > > > New Revision: 313965 > > > URL: https://svnweb.freebsd.org/changeset/base/313965 > > > > > > Log: > > >   Only notify blacklistd for successful logins in auth.c > > What's the rationale behind this change? > Without this change, every pass through auth.c results in a > call to blacklist_notify(). > > So, in a normal remote login, you'd get a failed > login flagged for the printing of the "xxx login:" prompt, > before the remote user could enter a password. > > If the user successfully entered a good password, > you'd get a good login flagged, and everything would be OK. > > If the user entered an incorrect password, you'd get > another failed login in auth1.c (or auth2.c), and finally, > when sshd got around to issuing the second "xxx login:" > prompt, you'd have yet another failed login notice sent > to blacklistd. > > So, if you had 3 bad logins set to the limit, you'd actually > be blocking the address after the first bad login attempt. > > -Kurt > I would contend that this explanation, exactly as written, should have been part of the commit message.  It's a perfect example of explaining *why* a change was made, instead of just saying what was changed. -- Ian > > > > > > > > > > > > >   Reported by: Rick Adams > > >   Reviewed by: des > > >   MFC after: 3 days > > >   Sponsored by: The FreeBSD Foundation > > > > > > Modified: > > >   head/crypto/openssh/auth.c > > > > > > Modified: head/crypto/openssh/auth.c > > > ================================================================= > > > ============= > > > --- head/crypto/openssh/auth.c Sun Feb 19 19:56:12 2017 > > > (r313964) > > > +++ head/crypto/openssh/auth.c Sun Feb 19 20:35:39 2017 > > > (r313965) > > > @@ -295,8 +295,8 @@ auth_log(Authctxt *authctxt, int authent > > >   authmsg = "Partial"; > > >   else { > > >   authmsg = authenticated ? "Accepted" : "Failed"; > > > - BLACKLIST_NOTIFY(authenticated ? > > > -     BLACKLIST_AUTH_OK : BLACKLIST_AUTH_FAIL); > > > + if (authenticated) > > > + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); > > >   } > > > > > >   authlog("%s %s%s%s for %s%.100s from %.200s port %d > > > %s%s%s", > > > _______________________________________________ > > > 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@freebs > > > d.org" > > > > From owner-svn-src-all@freebsd.org Sun Feb 19 23:22: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 090B0CE6AB5 for ; Sun, 19 Feb 2017 23:22:21 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com [IPv6:2607:f8b0:400c:c08::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 AE26E105C for ; Sun, 19 Feb 2017 23:22:20 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-ua0-x232.google.com with SMTP id 62so563800uar.0 for ; Sun, 19 Feb 2017 15:22:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jQCdeQ5PJdeNDyTc9X10UFNp9SF+R6QbfAljCks+gM4=; b=uwpaXA5DKKyVXsNYvrbrQuhOS6/8+3K8siJK8EhZaIu4vHK9HawwePiEFCEyCclTRk GG6EMRPkRnLFPMn79xWpk2NWF4l7yWLi+E2H1bjNAik/8lbBu1BC4GGUlMZ2lquhtdrj X/9fc+MmlXld7Axwgl9kbLQu2VtTYhh9VXtinnFl0KhqhIupvsvF9gvKw9RQKWHyfN7l 0eH8gdvvsdy1/BfHdUUxSFo7JpFtzGcjWjryR4Y/GOejWK6VxWFgxKlDrLEOs+xuNilm ZKWs8uB0ialEpW+rtI0b6DlkFdUrjBhJaRl2lBa11Rl1xL85q5PzY8vtz7CvR3RMfXe7 BmQA== 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=jQCdeQ5PJdeNDyTc9X10UFNp9SF+R6QbfAljCks+gM4=; b=KYEYb0Um2mlXLVc1HyuN3a8CpCIejMc+kKhpZ/oSXePem9bmZ24TrEhen8aRYui4A4 8s6i6FFxIydhmi4cU3t2Ld3FFo8N6v2xhqK1a3b3m1RZs4AMR1ERFqbgxmCNZMrsrLgE TVqhrk6QDbTjZnB21qrOWzS31xYNWK0dX8ZjSJcQrgZUtEYLs51n2rMefIdSQ2nwmkp4 PKPCTDKHA/+mCo+QJl3UV3Cfw5I/HXSUpCC2s+sPgM6nu15s6aOdP9DFMNJkn6M5p8H9 px/ei0wKMXUc4CJFHkz+CdBbuIP0PQKAT8F7pBS0+PTpihepXbrMPimJrayfWODd382V o2qA== X-Gm-Message-State: AMke39lrzVw0WaFPp+DQVGs7bkNvRO1Edd4uOPI5hZlJJ9LkXz/X21gkoSkVL/LvysUAqxGwHx93VJAa21sDe4Ru X-Received: by 10.176.75.149 with SMTP id v21mr8497807uaf.94.1487546539761; Sun, 19 Feb 2017 15:22:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.45.2 with HTTP; Sun, 19 Feb 2017 15:22:19 -0800 (PST) In-Reply-To: <72ddccfb-fa49-b9b1-c0fc-6fa896176091@FreeBSD.org> References: <201702192035.v1JKZdie080791@repo.freebsd.org> <72ddccfb-fa49-b9b1-c0fc-6fa896176091@FreeBSD.org> From: Oliver Pinter Date: Mon, 20 Feb 2017 00:22:19 +0100 Message-ID: Subject: Re: svn commit: r313965 - head/crypto/openssh To: lidl@freebsd.org 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: Sun, 19 Feb 2017 23:22:21 -0000 On 2/20/17, Kurt Lidl wrote: > On 2/19/17 4:42 PM, Oliver Pinter wrote: >> Hello! >> >> On 2/19/17, Kurt Lidl wrote: >>> Author: lidl >>> Date: Sun Feb 19 20:35:39 2017 >>> New Revision: 313965 >>> URL: https://svnweb.freebsd.org/changeset/base/313965 >>> >>> Log: >>> Only notify blacklistd for successful logins in auth.c >> >> What's the rationale behind this change? > > Without this change, every pass through auth.c results in a > call to blacklist_notify(). > > So, in a normal remote login, you'd get a failed > login flagged for the printing of the "xxx login:" prompt, > before the remote user could enter a password. > > If the user successfully entered a good password, > you'd get a good login flagged, and everything would be OK. > > If the user entered an incorrect password, you'd get > another failed login in auth1.c (or auth2.c), and finally, > when sshd got around to issuing the second "xxx login:" > prompt, you'd have yet another failed login notice sent > to blacklistd. > > So, if you had 3 bad logins set to the limit, you'd actually > be blocking the address after the first bad login attempt. > > -Kurt Thanks for the detailed answer. Could you please include these sentences when you MFC this change? > >> >>> >>> Reported by: Rick Adams >>> Reviewed by: des >>> MFC after: 3 days >>> Sponsored by: The FreeBSD Foundation >>> >>> Modified: >>> head/crypto/openssh/auth.c >>> >>> Modified: head/crypto/openssh/auth.c >>> ============================================================================== >>> --- head/crypto/openssh/auth.c Sun Feb 19 19:56:12 2017 (r313964) >>> +++ head/crypto/openssh/auth.c Sun Feb 19 20:35:39 2017 (r313965) >>> @@ -295,8 +295,8 @@ auth_log(Authctxt *authctxt, int authent >>> authmsg = "Partial"; >>> else { >>> authmsg = authenticated ? "Accepted" : "Failed"; >>> - BLACKLIST_NOTIFY(authenticated ? >>> - BLACKLIST_AUTH_OK : BLACKLIST_AUTH_FAIL); >>> + if (authenticated) >>> + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); >>> } >>> >>> authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s", >>> _______________________________________________ >>> 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" >>> > > From owner-svn-src-all@freebsd.org Sun Feb 19 23:31: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 E4DE2CE6BA9; Sun, 19 Feb 2017 23:31:33 +0000 (UTC) (envelope-from lidl@FreeBSD.org) 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 9867B132A; Sun, 19 Feb 2017 23:31:33 +0000 (UTC) (envelope-from lidl@FreeBSD.org) 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 v1JNVWGm029389; Sun, 19 Feb 2017 18:31:32 -0500 (EST) (envelope-from lidl@FreeBSD.org) Reply-To: lidl@FreeBSD.org Subject: Re: svn commit: r313965 - head/crypto/openssh References: <201702192035.v1JKZdie080791@repo.freebsd.org> <72ddccfb-fa49-b9b1-c0fc-6fa896176091@FreeBSD.org> To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Kurt Lidl Message-ID: Date: Sun, 19 Feb 2017 18:31:32 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 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: Sun, 19 Feb 2017 23:31:34 -0000 On 2/19/17 6:22 PM, Oliver Pinter wrote: > On 2/20/17, Kurt Lidl wrote: >> On 2/19/17 4:42 PM, Oliver Pinter wrote: >>> Hello! >>> >>> On 2/19/17, Kurt Lidl wrote: >>>> Author: lidl >>>> Date: Sun Feb 19 20:35:39 2017 >>>> New Revision: 313965 >>>> URL: https://svnweb.freebsd.org/changeset/base/313965 >>>> >>>> Log: >>>> Only notify blacklistd for successful logins in auth.c >>> >>> What's the rationale behind this change? >> >> Without this change, every pass through auth.c results in a >> call to blacklist_notify(). >> >> So, in a normal remote login, you'd get a failed >> login flagged for the printing of the "xxx login:" prompt, >> before the remote user could enter a password. >> >> If the user successfully entered a good password, >> you'd get a good login flagged, and everything would be OK. >> >> If the user entered an incorrect password, you'd get >> another failed login in auth1.c (or auth2.c), and finally, >> when sshd got around to issuing the second "xxx login:" >> prompt, you'd have yet another failed login notice sent >> to blacklistd. >> >> So, if you had 3 bad logins set to the limit, you'd actually >> be blocking the address after the first bad login attempt. >> >> -Kurt > > Thanks for the detailed answer. Could you please include these > sentences when you MFC this change? Sure, I will do that. -Kurt From owner-svn-src-all@freebsd.org Mon Feb 20 00:14: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 E9D22CE5A00; Mon, 20 Feb 2017 00:14:32 +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 9DBD2D3E; Mon, 20 Feb 2017 00:14:32 +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 v1K0EVxu069385; Mon, 20 Feb 2017 00:14:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K0EVcF069382; Mon, 20 Feb 2017 00:14:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702200014.v1K0EVcF069382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 20 Feb 2017 00:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313974 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 00:14:33 -0000 Author: bapt Date: Mon Feb 20 00:14:31 2017 New Revision: 313974 URL: https://svnweb.freebsd.org/changeset/base/313974 Log: Add a file descriptor in struct url for netrc When using libfetch in an application that drops privileges when fetching like pkg(8) then user complain because the application does not read anymore ${HOME}/.netrc. Now a caller can prepare a fd to the said file and manually assign it to the structure. It is also a first step to allow to capsicumize libfetch applications Reviewed by: allanjude, des Approved by: des Differential Revision: https://reviews.freebsd.org/D9678 Modified: head/lib/libfetch/common.c head/lib/libfetch/fetch.c head/lib/libfetch/fetch.h Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Sun Feb 19 22:00:11 2017 (r313973) +++ head/lib/libfetch/common.c Mon Feb 20 00:14:31 2017 (r313974) @@ -1339,16 +1339,11 @@ fetch_read_word(FILE *f) return (word); } -/* - * Get authentication data for a URL from .netrc - */ -int -fetch_netrc_auth(struct url *url) +static int +fetch_netrc_open(void) { + const char *p; char fn[PATH_MAX]; - const char *word; - char *p; - FILE *f; if ((p = getenv("NETRC")) != NULL) { if (snprintf(fn, sizeof(fn), "%s", p) >= (int)sizeof(fn)) { @@ -1368,8 +1363,25 @@ fetch_netrc_auth(struct url *url) return (-1); } - if ((f = fopen(fn, "r")) == NULL) + return (open(fn, O_RDONLY)); +} + +/* + * Get authentication data for a URL from .netrc + */ +int +fetch_netrc_auth(struct url *url) +{ + const char *word; + FILE *f; + + if (url->netrcfd == -2) + url->netrcfd = fetch_netrc_open(); + if (url->netrcfd < 0) + return (-1); + if ((f = fdopen(url->netrcfd, "r")) == NULL) return (-1); + rewind(f); while ((word = fetch_read_word(f)) != NULL) { if (strcmp(word, "default") == 0) { DEBUG(fetch_info("Using default .netrc settings")); Modified: head/lib/libfetch/fetch.c ============================================================================== --- head/lib/libfetch/fetch.c Sun Feb 19 22:00:11 2017 (r313973) +++ head/lib/libfetch/fetch.c Mon Feb 20 00:14:31 2017 (r313974) @@ -284,6 +284,7 @@ fetchMakeURL(const char *scheme, const c seturl(pwd); #undef seturl u->port = port; + u->netrcfd = -2; return (u); } Modified: head/lib/libfetch/fetch.h ============================================================================== --- head/lib/libfetch/fetch.h Sun Feb 19 22:00:11 2017 (r313973) +++ head/lib/libfetch/fetch.h Mon Feb 20 00:14:31 2017 (r313974) @@ -47,6 +47,7 @@ struct url { off_t offset; size_t length; time_t ims_time; + int netrcfd; }; struct url_stat { From owner-svn-src-all@freebsd.org Mon Feb 20 00:56: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 25238CE62DB; Mon, 20 Feb 2017 00:56:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA8FC1D88; Mon, 20 Feb 2017 00:56:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1K0ul1R085507; Mon, 20 Feb 2017 00:56:47 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K0ulYr085497; Mon, 20 Feb 2017 00:56:47 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702200056.v1K0ulYr085497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Mon, 20 Feb 2017 00:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313975 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 00:56:49 -0000 Author: des Date: Mon Feb 20 00:56:46 2017 New Revision: 313975 URL: https://svnweb.freebsd.org/changeset/base/313975 Log: Upgrade to OpenPAM Radula. Added: head/contrib/openpam/m4/ - copied from r313968, vendor/openpam/dist/m4/ head/contrib/openpam/misc/Makefile.am - copied unchanged from r313968, vendor/openpam/dist/misc/Makefile.am head/contrib/openpam/misc/Makefile.in - copied unchanged from r313968, vendor/openpam/dist/misc/Makefile.in head/contrib/openpam/misc/coverage.sh.in - copied unchanged from r313968, vendor/openpam/dist/misc/coverage.sh.in head/contrib/openpam/misc/coverity.sh.in - copied unchanged from r313968, vendor/openpam/dist/misc/coverity.sh.in head/contrib/openpam/modules/pam_return/ - copied from r313968, vendor/openpam/dist/modules/pam_return/ head/contrib/openpam/t/t_openpam_dispatch.c - copied unchanged from r313968, vendor/openpam/dist/t/t_openpam_dispatch.c head/contrib/openpam/t/t_pam_conv.c - copied unchanged from r313968, vendor/openpam/dist/t/t_pam_conv.c head/contrib/openpam/t/t_pam_conv.h - copied unchanged from r313968, vendor/openpam/dist/t/t_pam_conv.h Deleted: head/contrib/openpam/pamgdb.in head/contrib/openpam/t/t.h head/contrib/openpam/t/t_file.c head/contrib/openpam/t/t_main.c head/lib/libpam/libpam/tests/ Modified: head/contrib/openpam/CREDITS head/contrib/openpam/HISTORY head/contrib/openpam/LICENSE head/contrib/openpam/Makefile.am head/contrib/openpam/Makefile.in head/contrib/openpam/README head/contrib/openpam/RELNOTES head/contrib/openpam/TODO head/contrib/openpam/aclocal.m4 head/contrib/openpam/autogen.sh head/contrib/openpam/bin/Makefile.am head/contrib/openpam/bin/Makefile.in head/contrib/openpam/bin/openpam_dump_policy/Makefile.am head/contrib/openpam/bin/openpam_dump_policy/Makefile.in head/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c head/contrib/openpam/bin/pamtest/Makefile.am head/contrib/openpam/bin/pamtest/Makefile.in head/contrib/openpam/bin/pamtest/pamtest.1 head/contrib/openpam/bin/su/Makefile.am head/contrib/openpam/bin/su/Makefile.in head/contrib/openpam/bin/su/su.1 head/contrib/openpam/compile head/contrib/openpam/config.guess head/contrib/openpam/config.h.in head/contrib/openpam/config.sub head/contrib/openpam/configure head/contrib/openpam/configure.ac head/contrib/openpam/depcomp head/contrib/openpam/doc/Makefile.in head/contrib/openpam/doc/man/Makefile.am head/contrib/openpam/doc/man/Makefile.in head/contrib/openpam/doc/man/openpam.3 head/contrib/openpam/doc/man/openpam_borrow_cred.3 head/contrib/openpam/doc/man/openpam_free_data.3 head/contrib/openpam/doc/man/openpam_free_envlist.3 head/contrib/openpam/doc/man/openpam_get_feature.3 head/contrib/openpam/doc/man/openpam_get_option.3 head/contrib/openpam/doc/man/openpam_log.3 head/contrib/openpam/doc/man/openpam_nullconv.3 head/contrib/openpam/doc/man/openpam_readline.3 head/contrib/openpam/doc/man/openpam_readlinev.3 head/contrib/openpam/doc/man/openpam_readword.3 head/contrib/openpam/doc/man/openpam_restore_cred.3 head/contrib/openpam/doc/man/openpam_set_feature.3 head/contrib/openpam/doc/man/openpam_set_option.3 head/contrib/openpam/doc/man/openpam_straddch.3 head/contrib/openpam/doc/man/openpam_subst.3 head/contrib/openpam/doc/man/openpam_ttyconv.3 head/contrib/openpam/doc/man/pam.3 head/contrib/openpam/doc/man/pam.conf.5 head/contrib/openpam/doc/man/pam_acct_mgmt.3 head/contrib/openpam/doc/man/pam_authenticate.3 head/contrib/openpam/doc/man/pam_chauthtok.3 head/contrib/openpam/doc/man/pam_close_session.3 head/contrib/openpam/doc/man/pam_conv.3 head/contrib/openpam/doc/man/pam_end.3 head/contrib/openpam/doc/man/pam_error.3 head/contrib/openpam/doc/man/pam_get_authtok.3 head/contrib/openpam/doc/man/pam_get_data.3 head/contrib/openpam/doc/man/pam_get_item.3 head/contrib/openpam/doc/man/pam_get_user.3 head/contrib/openpam/doc/man/pam_getenv.3 head/contrib/openpam/doc/man/pam_getenvlist.3 head/contrib/openpam/doc/man/pam_info.3 head/contrib/openpam/doc/man/pam_open_session.3 head/contrib/openpam/doc/man/pam_prompt.3 head/contrib/openpam/doc/man/pam_putenv.3 head/contrib/openpam/doc/man/pam_set_data.3 head/contrib/openpam/doc/man/pam_set_item.3 head/contrib/openpam/doc/man/pam_setcred.3 head/contrib/openpam/doc/man/pam_setenv.3 head/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 head/contrib/openpam/doc/man/pam_sm_authenticate.3 head/contrib/openpam/doc/man/pam_sm_chauthtok.3 head/contrib/openpam/doc/man/pam_sm_close_session.3 head/contrib/openpam/doc/man/pam_sm_open_session.3 head/contrib/openpam/doc/man/pam_sm_setcred.3 head/contrib/openpam/doc/man/pam_start.3 head/contrib/openpam/doc/man/pam_strerror.3 head/contrib/openpam/doc/man/pam_verror.3 head/contrib/openpam/doc/man/pam_vinfo.3 head/contrib/openpam/doc/man/pam_vprompt.3 head/contrib/openpam/include/Makefile.in head/contrib/openpam/include/security/Makefile.am head/contrib/openpam/include/security/Makefile.in head/contrib/openpam/include/security/openpam.h head/contrib/openpam/include/security/openpam_version.h head/contrib/openpam/include/security/pam_appl.h head/contrib/openpam/install-sh head/contrib/openpam/lib/Makefile.am head/contrib/openpam/lib/Makefile.in head/contrib/openpam/lib/libpam/Makefile.am head/contrib/openpam/lib/libpam/Makefile.in head/contrib/openpam/lib/libpam/openpam_configure.c head/contrib/openpam/lib/libpam/openpam_ctype.h head/contrib/openpam/lib/libpam/openpam_dispatch.c head/contrib/openpam/lib/libpam/openpam_dlfunc.h head/contrib/openpam/lib/libpam/openpam_features.c head/contrib/openpam/lib/libpam/openpam_findenv.c head/contrib/openpam/lib/libpam/openpam_impl.h head/contrib/openpam/lib/libpam/openpam_load.c head/contrib/openpam/lib/libpam/openpam_readlinev.c head/contrib/openpam/lib/libpam/openpam_readword.c head/contrib/openpam/lib/libpam/openpam_strlset.c head/contrib/openpam/lib/libpam/openpam_strlset.h head/contrib/openpam/lib/libpam/openpam_ttyconv.c head/contrib/openpam/lib/libpam/pam_end.c head/contrib/openpam/lib/libpam/pam_get_authtok.c head/contrib/openpam/lib/libpam/pam_get_data.c head/contrib/openpam/lib/libpam/pam_get_item.c head/contrib/openpam/lib/libpam/pam_get_user.c head/contrib/openpam/lib/libpam/pam_getenv.c head/contrib/openpam/lib/libpam/pam_getenvlist.c head/contrib/openpam/lib/libpam/pam_putenv.c head/contrib/openpam/lib/libpam/pam_set_data.c head/contrib/openpam/lib/libpam/pam_set_item.c head/contrib/openpam/lib/libpam/pam_setenv.c head/contrib/openpam/ltmain.sh head/contrib/openpam/misc/gendoc.pl head/contrib/openpam/missing head/contrib/openpam/mkpkgng.in head/contrib/openpam/modules/Makefile.am head/contrib/openpam/modules/Makefile.in head/contrib/openpam/modules/pam_deny/Makefile.am head/contrib/openpam/modules/pam_deny/Makefile.in head/contrib/openpam/modules/pam_permit/Makefile.am head/contrib/openpam/modules/pam_permit/Makefile.in head/contrib/openpam/modules/pam_unix/Makefile.am head/contrib/openpam/modules/pam_unix/Makefile.in head/contrib/openpam/modules/pam_unix/pam_unix.c head/contrib/openpam/t/Makefile.am head/contrib/openpam/t/Makefile.in head/contrib/openpam/t/t_openpam_ctype.c head/contrib/openpam/t/t_openpam_readlinev.c head/contrib/openpam/t/t_openpam_readword.c head/contrib/openpam/test-driver head/lib/libpam/libpam/Makefile Directory Properties: head/contrib/openpam/ (props changed) Modified: head/contrib/openpam/CREDITS ============================================================================== --- head/contrib/openpam/CREDITS Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/CREDITS Mon Feb 20 00:56:46 2017 (r313975) @@ -43,6 +43,7 @@ ideas: Mikhail Teterin Mikko Työläjärvi Nick Hibma + Patrick Bihan-Faou Robert Watson Ruslan Ermilov Sebastian Krahmer Modified: head/contrib/openpam/HISTORY ============================================================================== --- head/contrib/openpam/HISTORY Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/HISTORY Mon Feb 20 00:56:46 2017 (r313975) @@ -1,3 +1,22 @@ +OpenPAM Radula 2017-02-19 + + - BUGFIX: Fix an inverted test which prevented pam_get_authtok(3) and + pam_get_user(3) from using application-provided custom prompts. + + - BUGFIX: Plug a memory leak in pam_set_item(3). + + - BUGFIX: Plug a potential memory leak in openpam_readlinev(3). + + - BUGFIX: In openpam_readword(3), support line continuations within + whitespace. + + - ENHANCE: Add a feature flag to control fallback to "other" policy. + + - ENHANCE: Add a pam_return(8) module which returns an arbitrary + code specified in the module options. + + - ENHANCE: More and better unit tests. +============================================================================ OpenPAM Ourouparia 2014-09-12 - ENHANCE: When executing a chain, require at least one service Modified: head/contrib/openpam/LICENSE ============================================================================== --- head/contrib/openpam/LICENSE Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/LICENSE Mon Feb 20 00:56:46 2017 (r313975) @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2012 Dag-Erling Smørgrav +Copyright (c) 2004-2017 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and Modified: head/contrib/openpam/Makefile.am ============================================================================== --- head/contrib/openpam/Makefile.am Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/Makefile.am Mon Feb 20 00:56:46 2017 (r313975) @@ -1,8 +1,8 @@ -# $Id: Makefile.am 816 2014-09-12 07:50:22Z des $ +# $Id: Makefile.am 917 2017-02-18 14:45:27Z des $ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include +SUBDIRS = misc include lib bin modules if WITH_DOC SUBDIRS += doc Modified: head/contrib/openpam/Makefile.in ============================================================================== --- head/contrib/openpam/Makefile.in Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/Makefile.in Mon Feb 20 00:56:46 2017 (r313975) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,9 +14,19 @@ @SET_MAKE@ -# $Id: Makefile.am 816 2014-09-12 07:50:22Z des $ +# $Id: Makefile.am 917 2017-02-18 14:45:27Z des $ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,20 +91,20 @@ build_triplet = @build@ host_triplet = @host@ @WITH_DOC_TRUE@am__append_1 = doc subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/pamgdb.in $(srcdir)/mkpkgng.in \ - INSTALL README TODO compile config.guess config.sub install-sh \ - missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = pamgdb mkpkgng +CONFIG_CLEAN_FILES = mkpkgng CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -152,7 +162,10 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = lib bin modules include doc t +DIST_SUBDIRS = misc include lib bin modules doc t +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/mkpkgng.in INSTALL README TODO compile config.guess \ + config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -208,6 +221,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ CRYPTO_LIBS = @CRYPTO_LIBS@ CRYPT_LIBS = @CRYPT_LIBS@ CYGPATH_W = @CYGPATH_W@ @@ -238,6 +252,7 @@ LIB_MAJ = @LIB_MAJ@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -261,6 +276,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEM_LIBPAM = @SYSTEM_LIBPAM@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -315,7 +331,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include $(am__append_1) t +SUBDIRS = misc include lib bin modules $(am__append_1) t EXTRA_DIST = \ CREDITS \ HISTORY \ @@ -345,7 +361,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -379,8 +394,6 @@ $(srcdir)/config.h.in: $(am__configure_ distclean-hdr: -rm -f config.h stamp-h1 -pamgdb: $(top_builddir)/config.status $(srcdir)/pamgdb.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mkpkgng: $(top_builddir)/config.status $(srcdir)/mkpkgng.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -580,15 +593,15 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -624,16 +637,17 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -810,6 +824,8 @@ uninstall-am: mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Modified: head/contrib/openpam/README ============================================================================== --- head/contrib/openpam/README Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/README Mon Feb 20 00:56:46 2017 (r313975) @@ -7,19 +7,4 @@ implementations disagree, OpenPAM tries Solaris, at the expense of XSSO conformance and Linux-PAM compatibility. -These are some of OpenPAM's features: - - - Implements the complete PAM API as described in the original PAM - paper and in OSF-RFC 86.0; this corresponds to the full XSSO API - except for mappings and secondary authentication. Also - implements some extensions found in Solaris 9. - - - Extends the API with several useful and time-saving functions. - - - Performs strict checking of return values from service modules. - - - Reads configuration from /etc/pam.d/, /etc/pam.conf, - /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order; - this will be made configurable in a future release. - Please direct bug reports and inquiries to . Modified: head/contrib/openpam/RELNOTES ============================================================================== --- head/contrib/openpam/RELNOTES Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/RELNOTES Mon Feb 20 00:56:46 2017 (r313975) @@ -1,22 +1,21 @@ - Release notes for OpenPAM Ourouparia - ==================================== + Release notes for OpenPAM Radula + ================================ -This release corresponds to the code used in FreeBSD HEAD as of the -release date, and is also expected to work on almost any POSIX-like -platform that has GNU autotools, GNU make and the GNU compiler suite -installed. +OpenPAM is developed primarily on FreeBSD, but is expected to work on +almost any POSIX-like platform that has GNU autotools, GNU make and +the GNU compiler suite installed. -The distribution consists of the following components: +The OpenPAM distribution consists of the following components: - The PAM library itself, with complete API documentation. - Sample modules (pam_permit, pam_deny and pam_unix) and a sample - application (su) which demonstrate how to use PAM. + application (su) which demonstrate how to use the PAM library. - A test application (pamtest) which can be used to test policies and modules. - - Unit tests for limited portions of the libraries. + - Unit tests for limited portions of the library. Please direct bug reports and inquiries to . Modified: head/contrib/openpam/TODO ============================================================================== --- head/contrib/openpam/TODO Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/TODO Mon Feb 20 00:56:46 2017 (r313975) @@ -1,15 +1,9 @@ -Before the next release: +- Fix try_first_pass / use_first_pass (pam_get_authtok() code & + documentation are slightly incorrect, OpenPAM's pam_unix(8) is + incorrect, all FreeBSD modules are broken) - - Rewrite openpam_ttyconv(3). - - mostly done, needs review. +- Add loop detection to openpam_load_chain(). - - Fix try_first_pass / use_first_pass (pam_get_authtok() code & - documentation are slightly incorrect, OpenPAM's pam_unix(8) is - incorrect, all FreeBSD modules are broken) +- Complete unit tests for openpam_dispatch(). - - Add loop detection to openpam_load_chain(). - - - Look into the possibility of implementing a version of (or a - wrapper for) openpam_log() which respects the PAM_SILENT flag and - the no_warn module option. This would eliminate the need for - FreeBSD's _pam_verbose_error(). +- Stop using PAM_SYMBOL_ERR incorrectly. Modified: head/contrib/openpam/aclocal.m4 ============================================================================== --- head/contrib/openpam/aclocal.m4 Mon Feb 20 00:14:31 2017 (r313974) +++ head/contrib/openpam/aclocal.m4 Mon Feb 20 00:56:46 2017 (r313975) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,8594 +20,7 @@ You have another version of autoconf. I If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 20 01:45: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 539E5CE6E11; Mon, 20 Feb 2017 01:45: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 20A3513C1; Mon, 20 Feb 2017 01:45: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 v1K1jDYh005701; Mon, 20 Feb 2017 01:45:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K1jDvr005699; Mon, 20 Feb 2017 01:45:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702200145.v1K1jDvr005699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 20 Feb 2017 01:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313976 - in head: . etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 01:45:14 -0000 Author: ngie Date: Mon Feb 20 01:45:12 2017 New Revision: 313976 URL: https://svnweb.freebsd.org/changeset/base/313976 Log: Remove lib/libpam tests after they were removed from the source tree in r313975 X-MFC with: r313975 Sponsored by: Dell EMC Isilon Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.tests.dist Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Feb 20 00:56:46 2017 (r313975) +++ head/ObsoleteFiles.inc Mon Feb 20 01:45:12 2017 (r313976) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20170219: OpenPAM RADULA upgrade removed the libpam tests +OLD_FILES+=usr/tests/lib/libpam/Kyuafile +OLD_FILES+=usr/tests/lib/libpam/t_openpam_ctype +OLD_FILES+=usr/tests/lib/libpam/t_openpam_readlinev +OLD_FILES+=usr/tests/lib/libpam/t_openpam_readword +OLD_DIRS+=usr/test/lib/libpam # 20170206: remove bdes(1) OLD_FILES+=usr/bin/bdes OLD_FILES+=usr/lib/debug/usr/bin/bdes.debug Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Feb 20 00:56:46 2017 (r313975) +++ head/etc/mtree/BSD.tests.dist Mon Feb 20 01:45:12 2017 (r313976) @@ -328,8 +328,6 @@ .. libnv .. - libpam - .. libproc .. librt From owner-svn-src-all@freebsd.org Mon Feb 20 02:08: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 6CC6FCE61BB; Mon, 20 Feb 2017 02:08: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 3B4CD1C2E; Mon, 20 Feb 2017 02:08: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 v1K289Iv013887; Mon, 20 Feb 2017 02:08:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K288ag013881; Mon, 20 Feb 2017 02:08:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200208.v1K288ag013881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 02:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313977 - in head: sbin/ifconfig sys/dev/iwn sys/dev/mwl 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: Mon, 20 Feb 2017 02:08:10 -0000 Author: adrian Date: Mon Feb 20 02:08:08 2017 New Revision: 313977 URL: https://svnweb.freebsd.org/changeset/base/313977 Log: [net80211] RX parameter shuffle in net80211 in preparation for 4x4 NICs and 160MHz channels. * Migrate the rx_params stuff out from ieee80211_freebsd.h where it doesn't belong - this isn't freebsd specific anymore. * Don't use a hard-coded number of chains in the ioctl header; now we can shuffle MAX_CHAINS around so it can be used in the right spot. * Extend the signal/noisefloor levels in the mimo stats struct to userland to include the signal and noisefloor levels for each 20MHz slice of a 160MHz channel. * Bump the number of EVM pilots in preparation for 4x4 and 160MHz channels. Tested: * ath(4), STA mode * iwn(4), STA mode * local ath10k port, STA mode TODO: * 11ax chips will come with 5GHz 8x8 hardware for lots of MU-MIMO - I'll re-bump it at that point. Note: * This breaks the driver and ifconfig ABI; please recompile the kernel, ifconfig and wpa_supplicant/hostapd. Modified: head/sbin/ifconfig/ifieee80211.c head/sys/dev/iwn/if_iwn.c head/sys/dev/mwl/if_mwl.c head/sys/net80211/_ieee80211.h head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_node.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Feb 20 01:45:12 2017 (r313976) +++ head/sbin/ifconfig/ifieee80211.c Mon Feb 20 02:08:08 2017 (r313977) @@ -3449,13 +3449,30 @@ printies(const u_int8_t *vp, int ielen, static void printmimo(const struct ieee80211_mimo_info *mi) { - /* NB: don't muddy display unless there's something to show */ - if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) { - /* XXX ignore EVM for now */ - printf(" (rssi %.1f:%.1f:%.1f nf %d:%d:%d)", - mi->rssi[0] / 2.0, mi->rssi[1] / 2.0, mi->rssi[2] / 2.0, - mi->noise[0], mi->noise[1], mi->noise[2]); + int i; + int r = 0; + + for (i = 0; i < IEEE80211_MAX_CHAINS; i++) { + if (mi->ch[i].rssi != 0) { + r = 1; + break; + } } + + /* NB: don't muddy display unless there's something to show */ + if (r == 0) + return; + + /* XXX TODO: ignore EVM; secondary channels for now */ + printf(" (rssi %.1f:%.1f:%.1f:%.1f nf %d:%d:%d:%d)", + mi->ch[0].rssi[0] / 2.0, + mi->ch[1].rssi[0] / 2.0, + mi->ch[2].rssi[0] / 2.0, + mi->ch[3].rssi[0] / 2.0, + mi->ch[0].noise[0], + mi->ch[1].noise[0], + mi->ch[2].noise[0], + mi->ch[3].noise[0]); } static void Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Feb 20 01:45:12 2017 (r313976) +++ head/sys/dev/iwn/if_iwn.c Mon Feb 20 02:08:08 2017 (r313977) @@ -4402,6 +4402,13 @@ iwn_tx_data(struct iwn_softc *sc, struct tid = 0; } ac = M_WME_GETAC(m); + + /* + * XXX TODO: Group addressed frames aren't aggregated and must + * go to the normal non-aggregation queue, and have a NONQOS TID + * assigned from net80211. + */ + if (m->m_flags & M_AMPDU_MPDU) { uint16_t seqno; struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac]; Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Mon Feb 20 01:45:12 2017 (r313976) +++ head/sys/dev/mwl/if_mwl.c Mon Feb 20 02:08:08 2017 (r313977) @@ -2434,13 +2434,13 @@ mwl_node_getmimoinfo(const struct ieee80 if (mn->mn_ai.rssi_c > rssi_max) rssi_max = mn->mn_ai.rssi_c; - CVT(mi->rssi[0], mn->mn_ai.rssi_a); - CVT(mi->rssi[1], mn->mn_ai.rssi_b); - CVT(mi->rssi[2], mn->mn_ai.rssi_c); - - mi->noise[0] = mn->mn_ai.nf_a; - mi->noise[1] = mn->mn_ai.nf_b; - mi->noise[2] = mn->mn_ai.nf_c; + CVT(mi->ch[0].rssi[0], mn->mn_ai.rssi_a); + CVT(mi->ch[1].rssi[0], mn->mn_ai.rssi_b); + CVT(mi->ch[2].rssi[0], mn->mn_ai.rssi_c); + + mi->ch[0].noise[0] = mn->mn_ai.nf_a; + mi->ch[1].noise[0] = mn->mn_ai.nf_b; + mi->ch[2].noise[0] = mn->mn_ai.nf_c; #undef CVT } Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Mon Feb 20 01:45:12 2017 (r313976) +++ head/sys/net80211/_ieee80211.h Mon Feb 20 02:08:08 2017 (r313977) @@ -443,17 +443,26 @@ struct ieee80211_regdomain { /* * MIMO antenna/radio state. */ - +#define IEEE80211_MAX_CHAINS 4 /* - * XXX This doesn't yet export both ctl/ext chain details - * XXX TODO: IEEE80211_MAX_CHAINS is defined in _freebsd.h, not here; - * figure out how to pull it in! + * This is the number of sub-channels for a channel. + * 0 - pri20 + * 1 - sec20 (HT40, VHT40) + * 2 - sec40 (VHT80) + * 3 - sec80 (VHT80+80, VHT160) */ +#define IEEE80211_MAX_CHAIN_PRISEC 4 +#define IEEE80211_MAX_EVM_DWORDS 16 /* 16 pilots, 4 chains */ +#define IEEE80211_MAX_EVM_PILOTS 16 /* 468 subcarriers, 16 pilots */ + +struct ieee80211_mimo_chan_info { + int8_t rssi[IEEE80211_MAX_CHAIN_PRISEC]; + int8_t noise[IEEE80211_MAX_CHAIN_PRISEC]; +}; + struct ieee80211_mimo_info { - int8_t rssi[3]; /* per-antenna rssi */ - int8_t noise[3]; /* per-antenna noise floor */ - uint8_t pad[2]; - uint32_t evm[3]; /* EVM data */ + struct ieee80211_mimo_chan_info ch[IEEE80211_MAX_CHAINS]; + uint32_t evm[IEEE80211_MAX_EVM_DWORDS]; }; /* @@ -523,4 +532,94 @@ struct ieee80211_mimo_info { "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS\32TXLDPC" +/* + * RX status notification - which fields are valid. + */ +#define IEEE80211_R_NF 0x00000001 /* global NF value valid */ +#define IEEE80211_R_RSSI 0x00000002 /* global RSSI value valid */ +#define IEEE80211_R_C_CHAIN 0x00000004 /* RX chain count valid */ +#define IEEE80211_R_C_NF 0x00000008 /* per-chain NF value valid */ +#define IEEE80211_R_C_RSSI 0x00000010 /* per-chain RSSI value valid */ +#define IEEE80211_R_C_EVM 0x00000020 /* per-chain EVM valid */ +#define IEEE80211_R_C_HT40 0x00000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ +#define IEEE80211_R_FREQ 0x00000080 /* Freq value populated, MHz */ +#define IEEE80211_R_IEEE 0x00000100 /* IEEE value populated */ +#define IEEE80211_R_BAND 0x00000200 /* Frequency band populated */ +#define IEEE80211_R_TSF32 0x00004000 /* 32 bit TSF */ +#define IEEE80211_R_TSF64 0x00008000 /* 64 bit TSF */ +#define IEEE80211_R_TSF_START 0x00010000 /* TSF is sampled at start of frame */ +#define IEEE80211_R_TSF_END 0x00020000 /* TSF is sampled at end of frame */ + +/* + * RX status notification - describe the packet. + */ +#define IEEE80211_RX_F_STBC 0x00000001 +#define IEEE80211_RX_F_LDPC 0x00000002 +#define IEEE80211_RX_F_AMSDU 0x00000004 /* This is the start of an decap AMSDU list */ +#define IEEE80211_RX_F_AMSDU_MORE 0x00000008 /* This is another decap AMSDU frame in the batch */ +#define IEEE80211_RX_F_AMPDU 0x00000010 /* This is the start of an decap AMPDU list */ +#define IEEE80211_RX_F_AMPDU_MORE 0x00000020 /* This is another decap AMPDU frame in the batch */ +#define IEEE80211_RX_F_FAIL_FCSCRC 0x00000040 /* Failed CRC/FCS */ +#define IEEE80211_RX_F_FAIL_MIC 0x00000080 /* Failed MIC check */ +#define IEEE80211_RX_F_DECRYPTED 0x00000100 /* Hardware decrypted */ +#define IEEE80211_RX_F_IV_STRIP 0x00000200 /* Decrypted; IV stripped */ +#define IEEE80211_RX_F_MMIC_STRIP 0x00000400 /* Decrypted; MMIC stripped */ +#define IEEE80211_RX_F_SHORTGI 0x00000800 /* This is a short-GI frame */ +#define IEEE80211_RX_F_CCK 0x00001000 +#define IEEE80211_RX_F_OFDM 0x00002000 +#define IEEE80211_RX_F_HT 0x00004000 +#define IEEE80211_RX_F_VHT 0x00008000 + +/* Channel width */ +#define IEEE80211_RX_FW_20MHZ 1 +#define IEEE80211_RX_FW_40MHZ 2 +#define IEEE80211_RX_FW_80MHZ 3 + +/* PHY type */ +#define IEEE80211_RX_FP_11B 1 +#define IEEE80211_RX_FP_11G 2 +#define IEEE80211_RX_FP_11A 3 +#define IEEE80211_RX_FP_11NA 4 +#define IEEE80211_RX_FP_11NG 5 + +struct ieee80211_rx_stats { + uint32_t r_flags; /* IEEE80211_R_* flags */ + uint32_t c_pktflags; /* IEEE80211_RX_F_* flags */ + + uint64_t c_rx_tsf; /* 32 or 64 bit TSF */ + + /* All DWORD aligned */ + int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + + /* 32 bits */ + uint8_t c_nf; /* global NF */ + uint8_t c_rssi; /* global RSSI */ + uint8_t c_chain; /* number of RX chains involved */ + uint8_t c_rate; /* legacy; 11n rate code; VHT MCS */ + + /* 32 bits */ + uint16_t c_freq; /* Frequency, MHz */ + uint8_t c_ieee; /* Channel */ + uint8_t c_width; /* channel width, FW flags above */ + + /* Force alignment to DWORD */ + union { + uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; + /* per-chain, per-pilot EVM values */ + uint32_t __aln[8]; + } evm; + + /* 32 bits */ + uint8_t c_phytype; /* PHY type, FW flags above */ + uint8_t c_vhtnss; /* VHT - number of spatial streams */ + uint8_t c_pad2[2]; +}; + +struct ieee80211_rx_params { + struct ieee80211_rx_stats params; +}; + #endif /* _NET80211__IEEE80211_H_ */ Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Mon Feb 20 01:45:12 2017 (r313976) +++ head/sys/net80211/ieee80211_freebsd.h Mon Feb 20 02:08:08 2017 (r313977) @@ -622,98 +622,9 @@ int ieee80211_add_xmit_params(struct mbu int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *); -/* - * Note: this is fine for 3x3 (and 4x4) 11n HT40; - * but getting EVM information for VHT80, VHT160 - * will involve more than 6 EVM pilots. - */ -#define IEEE80211_MAX_CHAINS 4 -#define IEEE80211_MAX_EVM_PILOTS 6 +struct ieee80211_rx_params; +struct ieee80211_rx_stats; -#define IEEE80211_R_NF 0x00000001 /* global NF value valid */ -#define IEEE80211_R_RSSI 0x00000002 /* global RSSI value valid */ -#define IEEE80211_R_C_CHAIN 0x00000004 /* RX chain count valid */ -#define IEEE80211_R_C_NF 0x00000008 /* per-chain NF value valid */ -#define IEEE80211_R_C_RSSI 0x00000010 /* per-chain RSSI value valid */ -#define IEEE80211_R_C_EVM 0x00000020 /* per-chain EVM valid */ -#define IEEE80211_R_C_HT40 0x00000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ -#define IEEE80211_R_FREQ 0x00000080 /* Freq value populated, MHz */ -#define IEEE80211_R_IEEE 0x00000100 /* IEEE value populated */ -#define IEEE80211_R_BAND 0x00000200 /* Frequency band populated */ -#define IEEE80211_R_TSF32 0x00004000 /* 32 bit TSF */ -#define IEEE80211_R_TSF64 0x00008000 /* 64 bit TSF */ -#define IEEE80211_R_TSF_START 0x00010000 /* TSF is sampled at start of frame */ -#define IEEE80211_R_TSF_END 0x00020000 /* TSF is sampled at end of frame */ - -/* RX packet flags - describe the kind of frame */ -#define IEEE80211_RX_F_STBC 0x00000001 -#define IEEE80211_RX_F_LDPC 0x00000002 -#define IEEE80211_RX_F_AMSDU 0x00000004 /* This is the start of an decap AMSDU list */ -#define IEEE80211_RX_F_AMSDU_MORE 0x00000008 /* This is another decap AMSDU frame in the batch */ -#define IEEE80211_RX_F_AMPDU 0x00000010 /* This is the start of an decap AMPDU list */ -#define IEEE80211_RX_F_AMPDU_MORE 0x00000020 /* This is another decap AMPDU frame in the batch */ -#define IEEE80211_RX_F_FAIL_FCSCRC 0x00000040 /* Failed CRC/FCS */ -#define IEEE80211_RX_F_FAIL_MIC 0x00000080 /* Failed MIC check */ -#define IEEE80211_RX_F_DECRYPTED 0x00000100 /* Hardware decrypted */ -#define IEEE80211_RX_F_IV_STRIP 0x00000200 /* Decrypted; IV stripped */ -#define IEEE80211_RX_F_MMIC_STRIP 0x00000400 /* Decrypted; MMIC stripped */ -#define IEEE80211_RX_F_SHORTGI 0x00000800 /* This is a short-GI frame */ -#define IEEE80211_RX_F_CCK 0x00001000 -#define IEEE80211_RX_F_OFDM 0x00002000 -#define IEEE80211_RX_F_HT 0x00004000 -#define IEEE80211_RX_F_VHT 0x00008000 - -/* Channel width */ -#define IEEE80211_RX_FW_20MHZ 1 -#define IEEE80211_RX_FW_40MHZ 2 -#define IEEE80211_RX_FW_80MHZ 3 - -/* PHY type */ -#define IEEE80211_RX_FP_11B 1 -#define IEEE80211_RX_FP_11G 2 -#define IEEE80211_RX_FP_11A 3 -#define IEEE80211_RX_FP_11NA 4 -#define IEEE80211_RX_FP_11NG 5 - -struct ieee80211_rx_stats { - uint32_t r_flags; /* IEEE80211_R_* flags */ - uint32_t c_pktflags; /* IEEE80211_RX_F_* flags */ - - uint64_t c_rx_tsf; /* 32 or 64 bit TSF */ - - /* All DWORD aligned */ - int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - - /* 32 bits */ - uint8_t c_nf; /* global NF */ - uint8_t c_rssi; /* global RSSI */ - uint8_t c_chain; /* number of RX chains involved */ - uint8_t c_rate; /* legacy; 11n rate code; VHT MCS */ - - /* 32 bits */ - uint16_t c_freq; /* Frequency, MHz */ - uint8_t c_ieee; /* Channel */ - uint8_t c_width; /* channel width, FW flags above */ - - /* Force alignment to DWORD */ - union { - uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; - /* per-chain, per-pilot EVM values */ - uint32_t __aln[8]; - } evm; - - /* 32 bits */ - uint8_t c_phytype; /* PHY type, FW flags above */ - uint8_t c_vhtnss; /* VHT - number of spatial streams */ - uint8_t c_pad2[2]; -}; - -struct ieee80211_rx_params { - struct ieee80211_rx_stats params; -}; int ieee80211_add_rx_params(struct mbuf *m, const struct ieee80211_rx_stats *rxs); int ieee80211_get_rx_params(struct mbuf *m, Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Mon Feb 20 01:45:12 2017 (r313976) +++ head/sys/net80211/ieee80211_node.c Mon Feb 20 02:08:08 2017 (r313977) @@ -1318,15 +1318,16 @@ node_getmimoinfo(const struct ieee80211_ bzero(info, sizeof(*info)); - for (i = 0; i < ni->ni_mimo_chains; i++) { + for (i = 0; i < MIN(IEEE80211_MAX_CHAINS, ni->ni_mimo_chains); i++) { + /* Note: for now, just pri20 channel info */ avgrssi = ni->ni_mimo_rssi_ctl[i]; if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) { - info->rssi[i] = 0; + info->ch[i].rssi[0] = 0; } else { rssi = IEEE80211_RSSI_GET(avgrssi); - info->rssi[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; + info->ch[i].rssi[0] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; } - info->noise[i] = ni->ni_mimo_noise_ctl[i]; + info->ch[i].noise[0] = ni->ni_mimo_noise_ctl[i]; } /* XXX ext radios? */ From owner-svn-src-all@freebsd.org Mon Feb 20 03:10: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 9617FCE3021; Mon, 20 Feb 2017 03:10: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 6300B1EA1; Mon, 20 Feb 2017 03:10: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 v1K3AuPW044276; Mon, 20 Feb 2017 03:10:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K3AuiK044275; Mon, 20 Feb 2017 03:10:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200310.v1K3AuiK044275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 03:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313978 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 03:10:57 -0000 Author: adrian Date: Mon Feb 20 03:10:56 2017 New Revision: 313978 URL: https://svnweb.freebsd.org/changeset/base/313978 Log: [ifconfig] fix a memory leak. Submitted by: Tom Rix Differential Revision: https://reviews.freebsd.org/D9654 Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Feb 20 02:08:08 2017 (r313977) +++ head/sbin/ifconfig/ifieee80211.c Mon Feb 20 03:10:56 2017 (r313978) @@ -1143,6 +1143,7 @@ set80211chanlist(const char *val, int d, cp = tp; } set80211(s, IEEE80211_IOC_CHANLIST, 0, sizeof(chanlist), &chanlist); + free(temp); } static void From owner-svn-src-all@freebsd.org Mon Feb 20 03:12: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 CE785CE3208; Mon, 20 Feb 2017 03:12:47 +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 9AC10117C; Mon, 20 Feb 2017 03:12:47 +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 v1K3CkwA048276; Mon, 20 Feb 2017 03:12:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K3Cks0048275; Mon, 20 Feb 2017 03:12:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200312.v1K3Cks0048275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 03:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313979 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 03:12:47 -0000 Author: adrian Date: Mon Feb 20 03:12:46 2017 New Revision: 313979 URL: https://svnweb.freebsd.org/changeset/base/313979 Log: [ifconfig] fix a memory leak! Submitted by: Tom Rix Differential Revision: https://reviews.freebsd.org/D9675 Modified: head/sbin/ifconfig/ifbridge.c Modified: head/sbin/ifconfig/ifbridge.c ============================================================================== --- head/sbin/ifconfig/ifbridge.c Mon Feb 20 03:10:56 2017 (r313978) +++ head/sbin/ifconfig/ifbridge.c Mon Feb 20 03:12:46 2017 (r313979) @@ -205,7 +205,7 @@ bridge_interfaces(int s, const char *pre } printf("\n"); } - + free(pad); free(inbuf); } From owner-svn-src-all@freebsd.org Mon Feb 20 03:26: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 63413CE34EE; Mon, 20 Feb 2017 03:26:21 +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 3B54717B4; Mon, 20 Feb 2017 03:26:21 +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 v1K3QKDR052685; Mon, 20 Feb 2017 03:26:20 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K3QJv1052675; Mon, 20 Feb 2017 03:26:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702200326.v1K3QJv1052675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Feb 2017 03:26: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: r313980 - in stable/11: contrib/openresolv sbin/resolvconf 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, 20 Feb 2017 03:26:21 -0000 Author: pfg Date: Mon Feb 20 03:26:19 2017 New Revision: 313980 URL: https://svnweb.freebsd.org/changeset/base/313980 Log: MFC r312992: MFV r312970, 313160: openresolv: update to version 3.9.0. It is now possible to drop the _WITH_ARG vars thanks to a change to the pdns_recursor upstreamed by Guy Yur. Modified: stable/11/contrib/openresolv/Makefile stable/11/contrib/openresolv/configure stable/11/contrib/openresolv/libc.in stable/11/contrib/openresolv/pdns_recursor.in stable/11/contrib/openresolv/resolvconf.8.in stable/11/contrib/openresolv/resolvconf.conf.5.in stable/11/contrib/openresolv/resolvconf.in stable/11/sbin/resolvconf/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/openresolv/Makefile ============================================================================== --- stable/11/contrib/openresolv/Makefile Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/Makefile Mon Feb 20 03:26:19 2017 (r313980) @@ -37,6 +37,11 @@ SED_STATUSARG= -e 's:@STATUSARG@:${STAT DISTPREFIX?= ${PKG}-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz +DISTINFO= ${DISTFILE}.distinfo +DISTINFOSIGN= ${DISTINFO}.asc +CKSUM?= cksum -a SHA256 +PGP?= netpgp + FOSSILID?= current .SUFFIXES: .in @@ -53,7 +58,7 @@ clean: rm -f ${TARGET} distclean: clean - rm -f config.mk ${DISTFILE} + rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} installdirs: @@ -83,3 +88,11 @@ dist: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} + +distinfo: dist + rm -f ${DISTINFO} ${DISTINFOSIGN} + ${CKSUM} ${DISTFILE} >${DISTINFO} + #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} + ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO} + chmod 644 ${DISTINFOSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} Modified: stable/11/contrib/openresolv/configure ============================================================================== --- stable/11/contrib/openresolv/configure Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/configure Mon Feb 20 03:26:19 2017 (r313980) @@ -120,14 +120,21 @@ echo "Configuring openresolv for ... $OS rm -rf $CONFIG_MK echo "# $OS" >$CONFIG_MK -# On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled -# regardless of if it's not running. -# So we force onestatus to work around this silly bug. -if [ -z "$STATUSARG" ]; then - case "$OS" in - freebsd*) STATUSARG="onestatus";; - esac -fi +case "$OS" in +freebsd*) + # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled + # regardless of if it's not running. + # So we force onestatus to work around this silly bug. + if [ -z "$STATUSARG" ]; then + STATUSARG="onestatus" + fi + ;; +linux*) + # cksum does't support -a and netpgp is rare + echo "CKSUM= sha256sum --tag" >>$CONFIG_MK + echo "PGP= gpg2" >>$CONFIG_MK + ;; +esac for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG do Modified: stable/11/contrib/openresolv/libc.in ============================================================================== --- stable/11/contrib/openresolv/libc.in Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/libc.in Mon Feb 20 03:26:19 2017 (r313980) @@ -216,7 +216,7 @@ fi if $backup; then if [ "$newconf" = "$signature$NL" ]; then if [ -e "$resolv_conf.bak" ]; then - newconf="$(cat "$resolv_conf.bak")" + newconf="$(cat "$resolv_conf.bak")$NL" fi elif [ -e "$resolv_conf" ]; then read line <"$resolv_conf" Modified: stable/11/contrib/openresolv/pdns_recursor.in ============================================================================== --- stable/11/contrib/openresolv/pdns_recursor.in Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/pdns_recursor.in Mon Feb 20 03:26:19 2017 (r313980) @@ -34,7 +34,6 @@ NL=" " : ${pdns_service:=pdns_recursor} -: ${pdns_restart:=@RESTARTCMD ${pdns_service}@} newzones= @@ -68,5 +67,12 @@ if [ ! -f "$pdns_zones" ] || \ [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ] then printf %s "$newzones" >"$pdns_zones" - eval $pdns_restart + if [ -n "$pdns_restart" ]; then + eval $pdns_restart + elif [ -n "$RESTARTCMD" ]; then + set -- ${pdns_service} + eval $RESTARTCMD + else + @SBINDIR@/resolvconf -r ${pdns_service} + fi fi Modified: stable/11/contrib/openresolv/resolvconf.8.in ============================================================================== --- stable/11/contrib/openresolv/resolvconf.8.in Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/resolvconf.8.in Mon Feb 20 03:26:19 2017 (r313980) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 7, 2016 +.Dd November 29, 2016 .Dt RESOLVCONF 8 .Os .Sh NAME @@ -45,6 +45,8 @@ .Fl il Ar pattern .Nm .Fl u +.Nm +.Fl Fl version .Sh DESCRIPTION .Nm manages @@ -106,7 +108,7 @@ See .Xr resolvconf.conf 5 for how to configure .Nm -to use a local name server. +to use a local name server and how to remove the private marking. .Pp .Nm can mark an interfaces @@ -126,7 +128,7 @@ on the .Ar interface . .Pp Here are some options for the above commands:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl f Ignore non existent interfaces. Only really useful for deleting interfaces. @@ -146,7 +148,7 @@ as exclusive when adding, otherwise only .Pp .Nm has some more commands for general usage:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl i Ar pattern List the interfaces and protocols, optionally matching .Ar pattern , @@ -168,12 +170,15 @@ to update all its subscribers. .Nm does not update the subscribers when adding a resolv.conf that matches what it already has for that interface. +.It Fl Fl version +Echo the resolvconf version to +.Em stdout . .El .Pp .Nm also has some commands designed to be used by it's subscribers and system startup:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl I Initialise the state directory .Pa @VARDIR@ . @@ -223,7 +228,7 @@ Here are some suggested protocol tags to .Pa resolv.conf file registered on an .Ar interface Ns No :- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It dhcp Dynamic Host Configuration Protocol. Initial versions of Modified: stable/11/contrib/openresolv/resolvconf.conf.5.in ============================================================================== --- stable/11/contrib/openresolv/resolvconf.conf.5.in Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/resolvconf.conf.5.in Mon Feb 20 03:26:19 2017 (r313980) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2016 +.Dd December 29, 2016 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -69,6 +69,11 @@ If unset, defaults to the following:- These interfaces will be processed next, unless they have a metric. If unset, defaults to the following:- .D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* +.It Sy inclusive_interfaces +Ignore any exlcusive marking for these interfaces. +This is handy when 3rd party integrations force the +.Nm resolvconf -x +option and you want to disable it easily. .It Sy local_nameservers If unset, defaults to the following:- .D1 127.* 0.0.0.0 255.255.255.255 ::1 @@ -102,6 +107,11 @@ Requires a local nameserver other than l This is equivalent to the .Nm resolvconf -p option. +.It Sy public_interfaces +Force these interface to be public, overriding the private marking. +This is handy when 3rd party integrations force the +.Nm resolvconf -p +option and you want to disable it easily. .It Sy replace Is a space separated list of replacement keywords. The syntax is this: Modified: stable/11/contrib/openresolv/resolvconf.in ============================================================================== --- stable/11/contrib/openresolv/resolvconf.in Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/contrib/openresolv/resolvconf.in Mon Feb 20 03:26:19 2017 (r313980) @@ -25,13 +25,19 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. RESOLVCONF="$0" -OPENRESOLV_VERSION="3.8.1" +OPENRESOLV_VERSION="3.9.0" SYSCONFDIR=@SYSCONFDIR@ LIBEXECDIR=@LIBEXECDIR@ VARDIR=@VARDIR@ RCDIR=@RCDIR@ RESTARTCMD=@RESTARTCMD@ +if [ "$1" = "--version" ]; then + echo "openresolv $OPENRESOLV_VERSION" + echo "Copyright (c) 2007-2016 Roy Marples" + exit 0 +fi + # Disregard dhcpcd setting unset interface_order state_dir @@ -90,6 +96,7 @@ usage() that match the specified pattern -u Run updates from our current DNS information + --version Echo the ${RESOLVCONF##*/} version Options: -f Ignore non existent interfaces @@ -129,6 +136,34 @@ strip_trailing_dots() printf "\n" } +private_iface() +{ + local p + + # Allow expansion + cd "$IFACEDIR" + + # Public interfaces override private ones. + for p in $public_interfaces; do + case "$iface" in + "$p"|"$p":*) return 1;; + esac + done + + if [ -e "$PRIVATEDIR/$iface" ]; then + return 0 + fi + + for p in $private_interfaces; do + case "$iface" in + "$p"|"$p":*) return 0;; + esac + done + + # Not a private interface + return 1 +} + # Parse resolv.conf's and make variables # for domain name servers, search name servers and global nameservers parse_resolv() @@ -144,20 +179,10 @@ parse_resolv() if ${new}; then iface="${line#\# resolv.conf from *}" new=false - if [ -e "$PRIVATEDIR/$iface" ]; then + if private_iface "$iface"; then private=true else - # Allow expansion - cd "$IFACEDIR" private=false - for p in $private_interfaces; do - case "$iface" in - "$p"|"$p":*) - private=true - break - ;; - esac - done fi fi ;; @@ -301,9 +326,9 @@ fi" /usr/sbin/service \$1 restart; fi" elif [ -x /bin/sv ]; then - RESTARTCMD="/bin/sv try-restart \$1" + RESTARTCMD="/bin/sv status \$1 >/dev/null 2>&1 && /bin/sv try-restart \$1" elif [ -x /usr/bin/sv ]; then - RESTARTCMD="/usr/bin/sv try-restart \$1" + RESTARTCMD="/usr/bin/sv status \$1 >/dev/null 2>&1 && /usr/bin/sv try-restart \$1" elif [ -e /etc/arch-release -a -d /etc/rc.d ]; then RCDIR=/etc/rc.d RESTARTCMD="if [ -e /var/run/daemons/\$1 ]; then @@ -378,6 +403,14 @@ list_resolv() done fi excl=true + cd "$IFACEDIR" + for i in $inclusive_interfaces; do + if [ -f "$i" -a "$list" = "$i" ]; then + list= + excl=false + break + fi + done ;; *) excl=false @@ -418,7 +451,6 @@ list_resolv() cd "$IFACEDIR" retval=1 - excl=true for i in $(uniqify $list); do # Only list interfaces which we really have if ! [ -f "$i" ]; then @@ -432,8 +464,7 @@ list_resolv() if [ "$cmd" = i -o "$cmd" = "-i" ]; then printf %s "$i " else - echo_resolv "$i" - echo + echo_resolv "$i" && echo fi [ $? = 0 -a "$retval" = 1 ] && retval=0 done Modified: stable/11/sbin/resolvconf/Makefile ============================================================================== --- stable/11/sbin/resolvconf/Makefile Mon Feb 20 03:12:46 2017 (r313979) +++ stable/11/sbin/resolvconf/Makefile Mon Feb 20 03:26:19 2017 (r313980) @@ -20,9 +20,6 @@ SBINDIR= /sbin # We don't assume to restart the services in /sbin. So, though # our service(8) is in /usr/sbin, we can use it, here. -CMD1_WITH_ARG= \1 onestatus >/dev/null 2>\&1 -CMD2_WITH_ARG= \1 restart -RESTARTCMD_WITH_ARG= /usr/sbin/service ${CMD1_WITH_ARG} \&\& /usr/sbin/service ${CMD2_WITH_ARG} CMD1= \\$$1 onestatus >/dev/null 2>\&1 CMD2= \\$$1 restart RESTARTCMD= "/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}" @@ -32,7 +29,6 @@ ${f}: ${f}.in sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ -e 's:@LIBEXECDIR@:${FILESDIR}:g' \ -e 's:@VARDIR@:${VARDIR}:g' \ - -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD_WITH_ARG}:g' \ -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \ -e 's:@RCDIR@:${RCDIR}:g' \ -e 's:@SBINDIR@:${SBINDIR}:g' \ From owner-svn-src-all@freebsd.org Mon Feb 20 03:34: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 A15AECE3731; Mon, 20 Feb 2017 03:34:01 +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 5F1DC1C4C; Mon, 20 Feb 2017 03:34:01 +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 v1K3Y0dM056611; Mon, 20 Feb 2017 03:34:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K3XxOO056595; Mon, 20 Feb 2017 03:33:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702200333.v1K3XxOO056595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Feb 2017 03:33:59 +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: r313981 - in stable/11/lib/libedit: . TEST edit/readline 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, 20 Feb 2017 03:34:01 -0000 Author: pfg Date: Mon Feb 20 03:33:59 2017 New Revision: 313981 URL: https://svnweb.freebsd.org/changeset/base/313981 Log: MFC r312997, r313002: Re-import libedit 2016-02-27 and update libedit with changes from NetBSD's 2016-03-21. Obtained from: NetBSD Modified: stable/11/lib/libedit/Makefile stable/11/lib/libedit/TEST/rl1.c stable/11/lib/libedit/TEST/tc1.c stable/11/lib/libedit/TEST/wtc1.c stable/11/lib/libedit/chared.c stable/11/lib/libedit/chared.h stable/11/lib/libedit/chartype.c stable/11/lib/libedit/chartype.h stable/11/lib/libedit/common.c stable/11/lib/libedit/config.h stable/11/lib/libedit/edit/readline/readline.h stable/11/lib/libedit/editline.3 stable/11/lib/libedit/el.c stable/11/lib/libedit/el.h stable/11/lib/libedit/eln.c stable/11/lib/libedit/emacs.c stable/11/lib/libedit/filecomplete.c stable/11/lib/libedit/hist.c stable/11/lib/libedit/hist.h stable/11/lib/libedit/histedit.h stable/11/lib/libedit/history.c stable/11/lib/libedit/keymacro.c stable/11/lib/libedit/makelist stable/11/lib/libedit/map.c stable/11/lib/libedit/parse.c stable/11/lib/libedit/prompt.c stable/11/lib/libedit/prompt.h stable/11/lib/libedit/read.c stable/11/lib/libedit/read.h stable/11/lib/libedit/readline.c stable/11/lib/libedit/refresh.c stable/11/lib/libedit/refresh.h stable/11/lib/libedit/search.c stable/11/lib/libedit/search.h stable/11/lib/libedit/sig.c stable/11/lib/libedit/sig.h stable/11/lib/libedit/sys.h stable/11/lib/libedit/terminal.c stable/11/lib/libedit/terminal.h stable/11/lib/libedit/tokenizer.c stable/11/lib/libedit/tty.c stable/11/lib/libedit/tty.h stable/11/lib/libedit/vi.c Modified: stable/11/lib/libedit/Makefile ============================================================================== --- stable/11/lib/libedit/Makefile Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/Makefile Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2009/01/18 12:17:49 lukem Exp $ +# $NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ @@ -7,7 +7,7 @@ LIB= edit SHLIB_MAJOR= 7 SHLIBDIR?= /lib -OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ +OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \ parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c @@ -35,12 +35,11 @@ CLEANFILES+= common.h editline.c emacs.h INCS= histedit.h -OSRCS+= eln.c SRCS+= tokenizern.c historyn.c CLEANFILES+= tokenizern.c historyn.c CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR -CFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH -CFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT +#CFLAGS+= -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH +#CFLAGS+= -DDEBUG_PASTE -DDEBUG_EDIT WARNS?= 1 Modified: stable/11/lib/libedit/TEST/rl1.c ============================================================================== --- stable/11/lib/libedit/TEST/rl1.c Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/TEST/rl1.c Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $ */ +/* $NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $"); +__RCSID("$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $"); #endif /* not lint */ __FBSDID("$FreeBSD$"); Modified: stable/11/lib/libedit/TEST/tc1.c ============================================================================== --- stable/11/lib/libedit/TEST/tc1.c Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/TEST/tc1.c Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ +/* $NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); +__RCSID("$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $"); #endif #endif /* not lint && not SCCSID */ __FBSDID("$FreeBSD$"); @@ -50,15 +50,15 @@ __FBSDID("$FreeBSD$"); /* * test.c: A little test program */ -#include -#include -#include #include #include -#include -#include #include #include +#include +#include +#include +#include +#include #include "histedit.h" @@ -158,7 +158,7 @@ main(int argc, char *argv[]) /* Add a user-defined function */ el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete); - /* Bind tab to it */ + /* Bind tab to it */ el_set(el, EL_BIND, "^I", "ed-complete", NULL); /* Modified: stable/11/lib/libedit/TEST/wtc1.c ============================================================================== --- stable/11/lib/libedit/TEST/wtc1.c Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/TEST/wtc1.c Mon Feb 20 03:33:59 2017 (r313981) @@ -5,13 +5,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include -#include #include +#include #include #include +#include +#include +#include +#include +#include #include "../histedit.h" Modified: stable/11/lib/libedit/chared.c ============================================================================== --- stable/11/lib/libedit/chared.c Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/chared.c Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); +__RCSID("$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -46,8 +46,12 @@ __FBSDID("$FreeBSD$"); /* * chared.c: Character editor utilities */ +#include #include +#include + #include "el.h" +#include "common.h" private void ch__clearmacro (EditLine *); @@ -201,7 +205,7 @@ c_delbefore1(EditLine *el) * Return if p is part of a word according to emacs */ protected int -ce__isword(Int p) +ce__isword(wint_t p) { return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; } @@ -211,7 +215,7 @@ ce__isword(Int p) * Return if p is part of a word according to vi */ protected int -cv__isword(Int p) +cv__isword(wint_t p) { if (Isalnum(p) || p == '_') return 1; @@ -225,7 +229,7 @@ cv__isword(Int p) * Return if p is part of a big word according to vi */ protected int -cv__isWord(Int p) +cv__isWord(wint_t p) { return !Isspace(p); } @@ -235,7 +239,7 @@ cv__isWord(Int p) * Find the previous word */ protected Char * -c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +c__prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { p--; @@ -259,7 +263,7 @@ c__prev_word(Char *p, Char *low, int n, * Find the next word */ protected Char * -c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) +c__next_word(Char *p, Char *high, int n, int (*wtest)(wint_t)) { while (n--) { while ((p < high) && !(*wtest)(*p)) @@ -277,7 +281,7 @@ c__next_word(Char *p, Char *high, int n, * Find the next word vi style */ protected Char * -cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) +cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -306,7 +310,7 @@ cv_next_word(EditLine *el, Char *p, Char * Find the previous word vi style */ protected Char * -cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +cv_prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { int test; @@ -370,7 +374,7 @@ cv_delfini(EditLine *el) * Go to the end of this word according to vi */ protected Char * -cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) +cv__endword(Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -524,7 +528,7 @@ ch_enlargebufs(EditLine *el, size_t addl /* zero the newly added memory, leave old data in */ (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - + oldbuf = el->el_line.buffer; el->el_line.buffer = newbuffer; @@ -573,7 +577,7 @@ ch_enlargebufs(EditLine *el, size_t addl el->el_chared.c_redo.lim = newbuffer + (el->el_chared.c_redo.lim - el->el_chared.c_redo.buf); el->el_chared.c_redo.buf = newbuffer; - + if (!hist_enlargebuf(el, sz, newsz)) return 0; @@ -673,9 +677,9 @@ out: protected int c_gets(EditLine *el, Char *buf, const Char *prompt) { - Char ch; + wchar_t wch; ssize_t len; - Char *cp = el->el_line.buffer; + Char *cp = el->el_line.buffer, ch; if (prompt) { len = (ssize_t)Strlen(prompt); @@ -690,26 +694,28 @@ c_gets(EditLine *el, Char *buf, const Ch el->el_line.lastchar = cp + 1; re_refresh(el); - if (FUN(el,getc)(el, &ch) != 1) { + if (el_wgetc(el, &wch) != 1) { ed_end_of_file(el, 0); len = -1; break; } + ch = (Char)wch; switch (ch) { - case 0010: /* Delete and backspace */ + case L'\b': /* Delete and backspace */ case 0177: if (len == 0) { len = -1; break; } + len--; cp--; continue; case 0033: /* ESC */ - case '\r': /* Newline */ - case '\n': + case L'\r': /* Newline */ + case L'\n': buf[len] = ch; break; Modified: stable/11/lib/libedit/chared.h ============================================================================== --- stable/11/lib/libedit/chared.h Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/chared.h Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.h,v 1.22 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: chared.h,v 1.27 2016/02/16 22:53:14 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,11 +41,6 @@ #ifndef _h_el_chared #define _h_el_chared -#include -#include - -#include "histedit.h" - #define EL_MAXMACRO 10 /* @@ -140,24 +135,18 @@ typedef struct el_chared_t { #define MODE_REPLACE 1 #define MODE_REPLACE_1 2 -#include "common.h" -#include "vi.h" -#include "emacs.h" -#include "search.h" -#include "fcns.h" - -protected int cv__isword(Int); -protected int cv__isWord(Int); +protected int cv__isword(wint_t); +protected int cv__isWord(wint_t); protected void cv_delfini(EditLine *); -protected Char *cv__endword(Char *, Char *, int, int (*)(Int)); -protected int ce__isword(Int); +protected Char *cv__endword(Char *, Char *, int, int (*)(wint_t)); +protected int ce__isword(wint_t); protected void cv_undo(EditLine *); protected void cv_yank(EditLine *, const Char *, int); -protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int)); -protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__next_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__prev_word(Char *, Char *, int, int (*)(Int)); +protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t)); +protected Char *cv_prev_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__next_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__prev_word(Char *, Char *, int, int (*)(wint_t)); protected void c_insert(EditLine *, int); protected void c_delbefore(EditLine *, int); protected void c_delbefore1(EditLine *); Modified: stable/11/lib/libedit/chartype.c ============================================================================== --- stable/11/lib/libedit/chartype.c Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/chartype.c Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $ */ +/* $NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -31,13 +31,16 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $"); +__RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); -#include "el.h" +#include #include +#include + +#include "el.h" #define CT_BUFSIZ ((size_t)1024) @@ -68,7 +71,7 @@ ct_conv_wbuff_resize(ct_buffer_t *conv, { void *p; - if (wsize <= conv->wsize) + if (wsize <= conv->wsize) return 0; conv->wsize = wsize; @@ -206,6 +209,28 @@ ct_encode_char(char *dst, size_t len, Ch } return l; } + +size_t +ct_mbrtowc(wchar_t *wc, const char *s, size_t n) +{ + mbstate_t mbs; + /* This only works because UTF-8 is stateless */ + memset(&mbs, 0, sizeof(mbs)); + return mbrtowc(wc, s, n, &mbs); +} + +#else + +size_t +ct_mbrtowc(wchar_t *wc, const char *s, size_t n) + if (s == NULL) + return 0; + if (n == 0) + return (size_t)-2; + if (wc != NULL) + *wc = *s; + return *s != '\0'; +} #endif protected const Char * @@ -329,7 +354,7 @@ ct_visual_char(Char *dst, size_t len, Ch return c > 0xffff ? 8 : 7; #else *dst++ = '\\'; -#define tooctaldigit(v) ((v) + '0') +#define tooctaldigit(v) (Char)((v) + '0') *dst++ = tooctaldigit(((unsigned int) c >> 6) & 0x7); *dst++ = tooctaldigit(((unsigned int) c >> 3) & 0x7); *dst++ = tooctaldigit(((unsigned int) c ) & 0x7); Modified: stable/11/lib/libedit/chartype.h ============================================================================== --- stable/11/lib/libedit/chartype.h Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/chartype.h Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.15 2015/05/17 13:14:41 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.25 2016/03/07 00:05:20 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -32,7 +32,6 @@ #define _h_chartype_f - #ifdef WIDECHAR /* Ideally we should also test the value of the define to see if it @@ -55,21 +54,19 @@ #warning Build environment does not support non-BMP characters #endif -#define ct_mbtowc mbtowc -#define ct_mbtowc_reset mbtowc(0,0,(size_t)0) +#define ct_wctob wctob #define ct_wctomb wctomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs #define Char wchar_t -#define Int wint_t #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W -#define FCHAR "%lc" #define FSTR "%ls" -#define STR(x) L ## x +#define FSTARSTR "%.*ls" +#define STR(x) L ## x #define UC(c) c #define Isalpha(x) iswalpha(x) #define Isalnum(x) iswalnum(x) @@ -110,21 +107,19 @@ Width(wchar_t c) #else /* NARROW */ -#define ct_mbtowc error -#define ct_mbtowc_reset +#define ct_wctob(w) ((int)(w)) #define ct_wctomb error -#define ct_wctomb_reset +#define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) #define Char char -#define Int int #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type -#define FCHAR "%c" #define FSTR "%s" -#define STR(x) x +#define FSTARSTR "%.*s" +#define STR(x) x #define UC(c) (unsigned char)(c) #define Isalpha(x) isalpha((unsigned char)x) @@ -213,7 +208,7 @@ protected size_t ct_enc_width(Char); #define VISUAL_WIDTH_MAX ((size_t)8) /* The terminal is thought of in terms of X columns by Y lines. In the cases - * where a wide character takes up more than one column, the adjacent + * where a wide character takes up more than one column, the adjacent * occupied column entries will contain this faux character. */ #define MB_FILL_CHAR ((Char)-1) @@ -245,5 +240,7 @@ protected const Char *ct_visual_string(c protected int ct_chr_class(Char c); #endif +size_t ct_mbrtowc(wchar_t *, const char *, size_t); + #endif /* _chartype_f */ Modified: stable/11/lib/libedit/common.c ============================================================================== --- stable/11/lib/libedit/common.c Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/common.c Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $ */ +/* $NetBSD: common.c,v 1.40 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.40 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -46,7 +46,13 @@ __FBSDID("$FreeBSD$"); /* * common.c: Common Editor functions */ +#include +#include + #include "el.h" +#include "common.h" +#include "parse.h" +#include "vi.h" /* ed_end_of_file(): * Indicate end of file @@ -54,7 +60,7 @@ __FBSDID("$FreeBSD$"); */ protected el_action_t /*ARGSUSED*/ -ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) +ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -68,7 +74,7 @@ ed_end_of_file(EditLine *el, Int c __att * Insert a character [bound to all insert keys] */ protected el_action_t -ed_insert(EditLine *el, Int c) +ed_insert(EditLine *el, wint_t c) { int count = el->el_state.argument; @@ -87,14 +93,14 @@ ed_insert(EditLine *el, Int c) || el->el_line.cursor >= el->el_line.lastchar) c_insert(el, 1); - *el->el_line.cursor++ = c; + *el->el_line.cursor++ = (Char)c; re_fastaddc(el); /* fast refresh for one char. */ } else { if (el->el_state.inputmode != MODE_REPLACE_1) c_insert(el, el->el_state.argument); while (count-- && el->el_line.cursor < el->el_line.lastchar) - *el->el_line.cursor++ = c; + *el->el_line.cursor++ = (Char)c; re_refresh(el); } @@ -111,7 +117,7 @@ ed_insert(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *p, *kp; @@ -139,12 +145,13 @@ ed_delete_prev_word(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { #ifdef DEBUG_EDIT #define EL el->el_line - (void) fprintf(el->el_errlfile, - "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n", + (void) fprintf(el->el_errfile, + "\nD(b: %p(" FSTR ") c: %p(" FSTR ") last: %p(" FSTR + ") limit: %p(" FSTR ")\n", EL.buffer, EL.buffer, EL.cursor, EL.cursor, EL.lastchar, EL.lastchar, EL.limit, EL.limit); #endif @@ -186,7 +193,7 @@ ed_delete_next_char(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) +ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -207,7 +214,7 @@ ed_kill_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.lastchar; @@ -230,7 +237,7 @@ ed_move_to_end(EditLine *el, Int c __att */ protected el_action_t /*ARGSUSED*/ -ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -253,7 +260,7 @@ ed_move_to_beg(EditLine *el, Int c __att * [^T] [^T] */ protected el_action_t -ed_transpose_chars(EditLine *el, Int c) +ed_transpose_chars(EditLine *el, wint_t c) { if (el->el_line.cursor < el->el_line.lastchar) { @@ -266,7 +273,7 @@ ed_transpose_chars(EditLine *el, Int c) /* must have at least two chars entered */ c = el->el_line.cursor[-2]; el->el_line.cursor[-2] = el->el_line.cursor[-1]; - el->el_line.cursor[-1] = c; + el->el_line.cursor[-1] = (Char)c; return CC_REFRESH; } else return CC_ERROR; @@ -279,7 +286,7 @@ ed_transpose_chars(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { Char *lim = el->el_line.lastchar; @@ -308,7 +315,7 @@ ed_next_char(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -334,7 +341,7 @@ ed_prev_word(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor > el->el_line.buffer) { @@ -358,14 +365,12 @@ ed_prev_char(EditLine *el, Int c __attri * [^V] [^V] */ protected el_action_t -ed_quoted_insert(EditLine *el, Int c) +ed_quoted_insert(EditLine *el, wint_t c) { int num; - Char tc; tty_quotemode(el); - num = FUN(el,getc)(el, &tc); - c = tc; + num = el_wgetc(el, &c); tty_noquotemode(el); if (num == 1) return ed_insert(el, c); @@ -378,7 +383,7 @@ ed_quoted_insert(EditLine *el, Int c) * Adds to argument or enters a digit */ protected el_action_t -ed_digit(EditLine *el, Int c) +ed_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -406,7 +411,7 @@ ed_digit(EditLine *el, Int c) * For ESC-n */ protected el_action_t -ed_argument_digit(EditLine *el, Int c) +ed_argument_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -432,7 +437,7 @@ ed_argument_digit(EditLine *el, Int c) protected el_action_t /*ARGSUSED*/ ed_unassigned(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_ERROR; @@ -449,8 +454,8 @@ ed_unassigned(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigint(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigint(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -463,8 +468,8 @@ ed_tty_sigint(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_dsusp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_dsusp(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -477,8 +482,8 @@ ed_tty_dsusp(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_tty_flush_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_flush_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -491,8 +496,8 @@ ed_tty_flush_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigquit(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigquit(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -505,8 +510,8 @@ ed_tty_sigquit(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -519,8 +524,8 @@ ed_tty_sigtstp(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_stop_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_stop_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -533,8 +538,8 @@ ed_tty_stop_output(EditLine *el __attrib */ protected el_action_t /*ARGSUSED*/ -ed_tty_start_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_start_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -547,7 +552,7 @@ ed_tty_start_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_newline(EditLine *el, Int c __attribute__((__unused__))) +ed_newline(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -563,7 +568,7 @@ ed_newline(EditLine *el, Int c __attribu */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) @@ -583,7 +588,7 @@ ed_delete_prev_char(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) +ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__))) { terminal_clear_screen(el); /* clear the whole real screen */ @@ -598,8 +603,8 @@ ed_clear_screen(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_redisplay(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_redisplay(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_REDISPLAY; @@ -612,7 +617,7 @@ ed_redisplay(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_start_over(EditLine *el, Int c __attribute__((__unused__))) +ed_start_over(EditLine *el, wint_t c __attribute__((__unused__))) { ch_reset(el, 0); @@ -626,8 +631,8 @@ ed_start_over(EditLine *el, Int c __attr */ protected el_action_t /*ARGSUSED*/ -ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -640,7 +645,7 @@ ed_sequence_lead_in(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { char beep = 0; int sv_event = el->el_history.eventno; @@ -660,7 +665,6 @@ ed_prev_history(EditLine *el, Int c __at if (hist_get(el) == CC_ERROR) { if (el->el_map.type == MAP_VI) { el->el_history.eventno = sv_event; - } beep = 1; /* el->el_history.eventno was fixed by first call */ @@ -678,7 +682,7 @@ ed_prev_history(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { el_action_t beep = CC_REFRESH, rval; @@ -705,11 +709,11 @@ ed_next_history(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; - bool_t found = 0; + int found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -748,7 +752,7 @@ ed_search_prev_history(EditLine *el, Int (el->el_line.lastchar - el->el_line.buffer)) || hp[el->el_line.lastchar - el->el_line.buffer]) && c_hmatch(el, hp)) { - found++; + found = 1; break; } h++; @@ -773,11 +777,11 @@ ed_search_prev_history(EditLine *el, Int */ protected el_action_t /*ARGSUSED*/ -ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; - bool_t found = 0; + int found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -827,7 +831,7 @@ ed_search_next_history(EditLine *el, Int */ protected el_action_t /*ARGSUSED*/ -ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -870,7 +874,7 @@ ed_prev_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_next_line(EditLine *el, Int c __attribute__((__unused__))) +ed_next_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -904,7 +908,7 @@ ed_next_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_command(EditLine *el, Int c __attribute__((__unused__))) +ed_command(EditLine *el, wint_t c __attribute__((__unused__))) { Char tmpbuf[EL_BUFSIZ]; int tmplen; Modified: stable/11/lib/libedit/config.h ============================================================================== --- stable/11/lib/libedit/config.h Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/config.h Mon Feb 20 03:33:59 2017 (r313981) @@ -21,8 +21,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have the `fgetln' function. */ -#define HAVE_FGETLN 1 +/* Define to 1 if you have the `getline' function. */ +#define HAVE_GETLINE 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 @@ -188,9 +188,6 @@ /* Define to 1 if you have the `vis' function. */ #define HAVE_VIS 1 -/* Define to 1 if you have the `wcsdup' function. */ -#define HAVE_WCSDUP 1 - /* Define to 1 if `fork' works. */ #define HAVE_WORKING_FORK 1 @@ -257,6 +254,9 @@ /* Version number of package */ #define VERSION "3.0" +/* Define to 1 if the system provides the SIZE_MAX constant */ +#define HAVE_SIZE_MAX 1 + /* Define to 1 if you want wide-character code */ /* #undef WIDECHAR */ Modified: stable/11/lib/libedit/edit/readline/readline.h ============================================================================== --- stable/11/lib/libedit/edit/readline/readline.h Mon Feb 20 03:26:19 2017 (r313980) +++ stable/11/lib/libedit/edit/readline/readline.h Mon Feb 20 03:33:59 2017 (r313981) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.37 2015/06/02 15:36:45 christos Exp $ */ +/* $NetBSD: readline.h,v 1.39 2016/02/17 19:47:49 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ typedef void *histdata_t; typedef struct _hist_entry { const char *line; - histdata_t data; + histdata_t data; } HIST_ENTRY; typedef struct _keymap_entry { @@ -89,7 +89,7 @@ typedef KEYMAP_ENTRY *Keymap; #define RUBOUT 0x7f #define ABORT_CHAR CTRL('G') -#define RL_READLINE_VERSION 0x0402 +#define RL_READLINE_VERSION 0x0402 #define RL_PROMPT_START_IGNORE '\1' #define RL_PROMPT_END_IGNORE '\2' @@ -98,7 +98,7 @@ typedef KEYMAP_ENTRY *Keymap; extern "C" { #endif extern const char *rl_library_version; -extern int rl_readline_version; +extern int rl_readline_version; extern char *rl_readline_name; extern FILE *rl_instream; extern FILE *rl_outstream; @@ -199,10 +199,10 @@ int rl_add_defun(const char *, rl_comm HISTORY_STATE *history_get_history_state(void); void rl_get_screen_size(int *, int *); void rl_set_screen_size(int, int); -char *rl_filename_completion_function (const char *, int); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 20 03:43: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 0A55BCE3977; Mon, 20 Feb 2017 03:43:19 +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 BFEC8139; Mon, 20 Feb 2017 03:43:18 +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 v1K3hHMM060765; Mon, 20 Feb 2017 03:43:17 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K3hCk3060716; Mon, 20 Feb 2017 03:43:12 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702200343.v1K3hCk3060716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Feb 2017 03:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 03:43:19 -0000 Author: pfg Date: Mon Feb 20 03:43:12 2017 New Revision: 313982 URL: https://svnweb.freebsd.org/changeset/base/313982 Log: sys/dev: Replace zero with NULL for pointers. Makes things easier to read, plus architectures may set NULL to something different than zero. Found with: devel/coccinelle MFC after: 3 weeks Modified: head/sys/dev/agp/agp.c head/sys/dev/al_eth/al_eth.c head/sys/dev/al_eth/al_init_eth_lm.c head/sys/dev/an/if_an.c head/sys/dev/arcmsr/arcmsr.c head/sys/dev/bce/if_bce.c head/sys/dev/beri/virtio/virtio_block.c head/sys/dev/bhnd/cores/usb/bhnd_usb.c head/sys/dev/buslogic/bt_pci.c head/sys/dev/ce/if_ce.c head/sys/dev/cm/smc90cx6.c head/sys/dev/cp/if_cp.c head/sys/dev/ctau/ctddk.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/cxddk.c head/sys/dev/cx/if_cx.c head/sys/dev/de/if_de.c head/sys/dev/ed/if_ed.c head/sys/dev/fatm/if_fatm.c head/sys/dev/fe/if_fe.c head/sys/dev/firewire/if_fwip.c head/sys/dev/hptiop/hptiop.c head/sys/dev/hptmv/entry.c head/sys/dev/hptmv/gui_lib.c head/sys/dev/hptmv/hptproc.c head/sys/dev/hptmv/ioctl.c head/sys/dev/iicbus/if_ic.c head/sys/dev/isp/isp_pci.c head/sys/dev/le/am7990.c head/sys/dev/le/am79900.c head/sys/dev/le/lance.c head/sys/dev/md/md.c head/sys/dev/ncr/ncr.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_mem2.c head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/patm/if_patm_tx.c head/sys/dev/pccard/pccard.c head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c head/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c head/sys/dev/ppbus/if_plip.c head/sys/dev/ppbus/ppbconf.c head/sys/dev/ppc/ppc.c head/sys/dev/sbni/if_sbni_isa.c head/sys/dev/sn/if_sn.c head/sys/dev/sym/sym_hipd.c head/sys/dev/vx/if_vx.c Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/agp/agp.c Mon Feb 20 03:43:12 2017 (r313982) @@ -820,7 +820,7 @@ agp_close(struct cdev *kdev, int fflag, /* * Clear the GATT and force release on last close */ - while ((mem = TAILQ_FIRST(&sc->as_memory)) != 0) { + while ((mem = TAILQ_FIRST(&sc->as_memory)) != NULL) { if (mem->am_is_bound) AGP_UNBIND_MEMORY(dev, mem); AGP_FREE_MEMORY(dev, mem); Modified: head/sys/dev/al_eth/al_eth.c ============================================================================== --- head/sys/dev/al_eth/al_eth.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/al_eth/al_eth.c Mon Feb 20 03:43:12 2017 (r313982) @@ -2009,7 +2009,7 @@ al_eth_enable_msix(struct al_eth_adapter adapter->msix_entries = malloc(msix_vecs*sizeof(*adapter->msix_entries), M_IFAL, M_ZERO | M_WAITOK); - if (adapter->msix_entries == 0) { + if (adapter->msix_entries == NULL) { device_printf_dbg(adapter->dev, "failed to allocate" " msix_entries %d\n", msix_vecs); rc = ENOMEM; @@ -3544,7 +3544,7 @@ al_miibus_linkchg(device_t dev) uint8_t duplex = 0; uint8_t speed = 0; - if (adapter->mii == 0) + if (adapter->mii == NULL) return; if ((adapter->netdev->if_flags & IFF_UP) == 0) Modified: head/sys/dev/al_eth/al_init_eth_lm.c ============================================================================== --- head/sys/dev/al_eth/al_init_eth_lm.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/al_eth/al_init_eth_lm.c Mon Feb 20 03:43:12 2017 (r313982) @@ -1168,7 +1168,7 @@ al_eth_lm_link_detection(struct al_eth_l boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); if (lm_pause == TRUE) { *new_mode = AL_ETH_LM_MODE_DISCONNECTED; - if (link_fault != 0) { + if (link_fault != NULL) { if (lm_context->link_state == AL_ETH_LM_LINK_UP) *link_fault = FALSE; else Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/an/if_an.c Mon Feb 20 03:43:12 2017 (r313982) @@ -3057,7 +3057,7 @@ static void an_cache_store(struct an_softc *sc, struct ether_header *eh, struct mbuf *m, u_int8_t rx_rssi, u_int8_t rx_quality) { - struct ip *ip = 0; + struct ip *ip = NULL; int i; static int cache_slot = 0; /* use this cache entry */ static int wrapindex = 0; /* next "free" cache entry */ Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/arcmsr/arcmsr.c Mon Feb 20 03:43:12 2017 (r313982) @@ -1398,8 +1398,8 @@ static u_int32_t arcmsr_Read_iop_rqbuffe struct QBUFFER *prbuffer) { u_int8_t *pQbuffer; - u_int8_t *buf1 = 0; - u_int32_t *iop_data, *buf2 = 0; + u_int8_t *buf1 = NULL; + u_int32_t *iop_data, *buf2 = NULL; u_int32_t iop_len, data_len; iop_data = (u_int32_t *)prbuffer->data; @@ -1494,8 +1494,8 @@ static void arcmsr_Write_data_2iop_wqbuf { u_int8_t *pQbuffer; struct QBUFFER *pwbuffer; - u_int8_t *buf1 = 0; - u_int32_t *iop_data, *buf2 = 0; + u_int8_t *buf1 = NULL; + u_int32_t *iop_data, *buf2 = NULL; u_int32_t allxfer_len = 0, data_len; if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READ) { Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/bce/if_bce.c Mon Feb 20 03:43:12 2017 (r313982) @@ -2800,7 +2800,7 @@ bce_nvram_write(struct bce_softc *sc, u3 if (align_start || align_end) { buf = malloc(len32, M_DEVBUF, M_NOWAIT); - if (buf == 0) { + if (buf == NULL) { rc = ENOMEM; goto bce_nvram_write_exit; } Modified: head/sys/dev/beri/virtio/virtio_block.c ============================================================================== --- head/sys/dev/beri/virtio/virtio_block.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/beri/virtio/virtio_block.c Mon Feb 20 03:43:12 2017 (r313982) @@ -457,7 +457,7 @@ beri_ioctl(struct cdev *dev, u_long cmd, sc->opened = 1; break; case MDIOCDETACH: - if (sc->vnode == 0) { + if (sc->vnode == NULL) { /* File not opened */ return (1); } Modified: head/sys/dev/bhnd/cores/usb/bhnd_usb.c ============================================================================== --- head/sys/dev/bhnd/cores/usb/bhnd_usb.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/bhnd/cores/usb/bhnd_usb.c Mon Feb 20 03:43:12 2017 (r313982) @@ -291,7 +291,7 @@ bhnd_usb_alloc_resource(device_t bus, de rv = rman_reserve_resource(&sc->mem_rman, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { BHND_ERROR_DEV(bus, "could not reserve resource"); return (0); } @@ -312,7 +312,7 @@ bhnd_usb_alloc_resource(device_t bus, de rv = rman_reserve_resource(&sc->irq_rman, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { BHND_ERROR_DEV(bus, "could not reserve resource"); return (0); } Modified: head/sys/dev/buslogic/bt_pci.c ============================================================================== --- head/sys/dev/buslogic/bt_pci.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/buslogic/bt_pci.c Mon Feb 20 03:43:12 2017 (r313982) @@ -58,8 +58,8 @@ static int bt_pci_alloc_resources(device_t dev) { int type = 0, rid, zero; - struct resource *regs = 0; - struct resource *irq = 0; + struct resource *regs = NULL; + struct resource *irq = NULL; #if 0 /* XXX Memory Mapped I/O seems to cause problems */ Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ce/if_ce.c Mon Feb 20 03:43:12 2017 (r313982) @@ -840,11 +840,11 @@ static int ce_detach (device_t dev) if (! d || ! d->chan) continue; callout_drain (&d->timeout_handle); - channel [b->num * NCHAN + c->num] = 0; + channel [b->num * NCHAN + c->num] = NULL; /* Deallocate buffers. */ ce_bus_dma_mem_free (&d->dmamem); } - adapter [b->num] = 0; + adapter [b->num] = NULL; ce_bus_dma_mem_free (&bd->dmamem); free (b, M_DEVBUF); #if __FreeBSD_version >= 504000 Modified: head/sys/dev/cm/smc90cx6.c ============================================================================== --- head/sys/dev/cm/smc90cx6.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/cm/smc90cx6.c Mon Feb 20 03:43:12 2017 (r313982) @@ -373,7 +373,7 @@ cm_start_locked(ifp) m = arc_frag_next(ifp); buffer = sc->sc_tx_act ^ 1; - if (m == 0) + if (m == NULL) return; #ifdef CM_DEBUG @@ -388,7 +388,7 @@ cm_start_locked(ifp) #endif cm_ram_ptr = buffer * 512; - if (m == 0) + if (m == NULL) return; /* write the addresses to RAM and throw them away */ @@ -505,7 +505,7 @@ cm_srint_locked(vsc) /* Allocate header mbuf */ MGETHDR(m, M_NOWAIT, MT_DATA); - if (m == 0) { + if (m == NULL) { /* * in case s.th. goes wrong with mem, drop it * to make sure the receiver can be started again @@ -546,7 +546,7 @@ cm_srint_locked(vsc) } } - if (m == 0) { + if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto cleanup; } Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/cp/if_cp.c Mon Feb 20 03:43:12 2017 (r313982) @@ -628,11 +628,11 @@ static int cp_detach (device_t dev) if (! d || ! d->chan->type) continue; callout_drain (&d->timeout_handle); - channel [b->num*NCHAN + c->num] = 0; + channel [b->num*NCHAN + c->num] = NULL; /* Deallocate buffers. */ cp_bus_dma_mem_free (&d->dmamem); } - adapter [b->num] = 0; + adapter [b->num] = NULL; cp_bus_dma_mem_free (&bd->dmamem); free (b, M_DEVBUF); mtx_destroy (&bd->cp_mtx); Modified: head/sys/dev/ctau/ctddk.c ============================================================================== --- head/sys/dev/ctau/ctddk.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ctau/ctddk.c Mon Feb 20 03:43:12 2017 (r313982) @@ -104,7 +104,7 @@ int ct_open_board (ct_board_t *b, int nu case B_TAU2_E1D: fw = ctau2_fw_data; flen = 0; - ft = 0; + ft = NULL; break; #ifndef CT_DDK_NO_G703 case B_TAU_G703: Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ctau/if_ct.c Mon Feb 20 03:43:12 2017 (r313982) @@ -839,8 +839,8 @@ static int ct_detach (device_t dev) /* Deallocate buffers. */ ct_bus_dma_mem_free (&d->dmamem); } - bd->board = 0; - adapter [b->num] = 0; + bd->board = NULL; + adapter [b->num] = NULL; free (b, M_DEVBUF); mtx_destroy (&bd->ct_mtx); Modified: head/sys/dev/cx/cxddk.c ============================================================================== --- head/sys/dev/cx/cxddk.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/cx/cxddk.c Mon Feb 20 03:43:12 2017 (r313982) @@ -440,7 +440,7 @@ static int cx_receive_interrupt (cx_chan if (c->mode == M_ASYNC && (risr & RISA_TIMEOUT)) { unsigned long rcbadr = (unsigned short) inw (RCBADRL(c->port)) | (long) inw (RCBADRU(c->port)) << 16; - unsigned char *buf = 0; + unsigned char *buf = NULL; port_t cnt_port = 0, sts_port = 0; if (rcbadr >= c->brphys && rcbadr < c->brphys+DMABUFSZ) { Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/cx/if_cx.c Mon Feb 20 03:43:12 2017 (r313982) @@ -991,8 +991,8 @@ static int cx_detach (device_t dev) /* Deallocate buffers. */ cx_bus_dma_mem_free (&d->dmamem); } - bd->board = 0; - adapter [b->num] = 0; + bd->board = NULL; + adapter [b->num] = NULL; free (b, M_DEVBUF); splx (s); Modified: head/sys/dev/de/if_de.c ============================================================================== --- head/sys/dev/de/if_de.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/de/if_de.c Mon Feb 20 03:43:12 2017 (r313982) @@ -4887,8 +4887,8 @@ tulip_pci_attach(device_t dev) rid = 0; res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); - if (res == 0 || bus_setup_intr(dev, res, INTR_TYPE_NET | - INTR_MPSAFE, NULL, intr_rtn, sc, &ih)) { + if (res == NULL || bus_setup_intr(dev, res, INTR_TYPE_NET | + INTR_MPSAFE, NULL, intr_rtn, sc, &ih)) { device_printf(dev, "couldn't map interrupt\n"); tulip_busdma_cleanup(sc); ether_ifdetach(sc->tulip_ifp); Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ed/if_ed.c Mon Feb 20 03:43:12 2017 (r313982) @@ -751,7 +751,7 @@ outloop: return; } IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - if (m == 0) { + if (m == NULL) { /* * We are using the !OACTIVE flag to indicate to the outside Modified: head/sys/dev/fatm/if_fatm.c ============================================================================== --- head/sys/dev/fatm/if_fatm.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/fatm/if_fatm.c Mon Feb 20 03:43:12 2017 (r313982) @@ -1501,7 +1501,7 @@ fatm_intr_drain_rx(struct fatm_softc *sc rpd->nseg = le32toh(rpd->nseg); mlen = 0; - m0 = last = 0; + m0 = last = NULL; for (i = 0; i < rpd->nseg; i++) { rb = sc->rbufs + rpd->segment[i].handle; if (m0 == NULL) { Modified: head/sys/dev/fe/if_fe.c ============================================================================== --- head/sys/dev/fe/if_fe.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/fe/if_fe.c Mon Feb 20 03:43:12 2017 (r313982) @@ -2002,7 +2002,7 @@ fe_write_mbufs (struct fe_softc *sc, str if ((sc->proto_dlcr6 & FE_D6_SBW) == FE_D6_SBW_BYTE) { /* 8-bit cards are easy. */ - for (mp = m; mp != 0; mp = mp->m_next) { + for (mp = m; mp != NULL; mp = mp->m_next) { if (mp->m_len) fe_outsb(sc, FE_BMPR8, mtod(mp, caddr_t), mp->m_len); @@ -2012,7 +2012,7 @@ fe_write_mbufs (struct fe_softc *sc, str { /* 16-bit cards are a pain. */ savebyte = NO_PENDING_BYTE; - for (mp = m; mp != 0; mp = mp->m_next) { + for (mp = m; mp != NULL; mp = mp->m_next) { /* Ignore empty mbuf. */ len = mp->m_len; Modified: head/sys/dev/firewire/if_fwip.c ============================================================================== --- head/sys/dev/firewire/if_fwip.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/firewire/if_fwip.c Mon Feb 20 03:43:12 2017 (r313982) @@ -575,7 +575,7 @@ fwip_async_output(struct fwip_softc *fwi */ mtag = m_tag_locate(m, MTAG_FIREWIRE, MTAG_FIREWIRE_HWADDR, 0); if (mtag == NULL) - destfw = 0; + destfw = NULL; else destfw = (struct fw_hwaddr *) (mtag + 1); Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/hptiop/hptiop.c Mon Feb 20 03:43:12 2017 (r313982) @@ -330,7 +330,7 @@ static void hptiop_request_callback_itl( u_int32_t index) { struct hpt_iop_srb *srb; - struct hpt_iop_request_scsi_command *req=0; + struct hpt_iop_request_scsi_command *req=NULL; union ccb *ccb; u_int8_t *cdb; u_int32_t result, temp, dxfer; Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/hptmv/entry.c Mon Feb 20 03:43:12 2017 (r313982) @@ -138,8 +138,8 @@ static MV_BOOLEAN hptmv_event_notify(MV_ static struct sx hptmv_list_lock; SX_SYSINIT(hptmv_list_lock, &hptmv_list_lock, "hptmv list"); -IAL_ADAPTER_T *gIal_Adapter = 0; -IAL_ADAPTER_T *pCurAdapter = 0; +IAL_ADAPTER_T *gIal_Adapter = NULL; +IAL_ADAPTER_T *pCurAdapter = NULL; static MV_SATA_CHANNEL gMvSataChannels[MAX_VBUS][MV_SATA_CHANNELS_NUM]; typedef struct st_HPT_DPC { @@ -1262,7 +1262,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) sx_xlock(&hptmv_list_lock); pAdapter->next = 0; - if(gIal_Adapter == 0){ + if(gIal_Adapter == NULL){ gIal_Adapter = pAdapter; pCurAdapter = gIal_Adapter; } @@ -2427,7 +2427,7 @@ static void hpt_worker_thread(void) sx_slock(&hptmv_list_lock); pAdapter = gIal_Adapter; - while(pAdapter != 0){ + while(pAdapter != NULL){ mtx_lock(&pAdapter->lock); _vbus_p = &pAdapter->VBus; Modified: head/sys/dev/hptmv/gui_lib.c ============================================================================== --- head/sys/dev/hptmv/gui_lib.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/hptmv/gui_lib.c Mon Feb 20 03:43:12 2017 (r313982) @@ -74,7 +74,7 @@ check_VDevice_valid(PVDevice p) PVBus _vbus_p; IAL_ADAPTER_T *pAdapter = gIal_Adapter; - while(pAdapter != 0) + while(pAdapter != NULL) { for (i = 0; i < MV_SATA_CHANNELS_NUM; i++) if(&(pAdapter->VDevices[i]) == p) return 0; @@ -83,7 +83,7 @@ check_VDevice_valid(PVDevice p) #ifdef SUPPORT_ARRAY pAdapter = gIal_Adapter; - while(pAdapter != 0) + while(pAdapter != NULL) { _vbus_p = &pAdapter->VBus; for (i=0;inext; @@ -448,7 +448,7 @@ int hpt_get_channel_info(int id, int bus IAL_ADAPTER_T *pAdapTemp = gIal_Adapter; int i,iControllerCount = 0; - while(pAdapTemp != 0) + while(pAdapTemp != NULL) { if (iControllerCount++==id) goto found; Modified: head/sys/dev/hptmv/hptproc.c ============================================================================== --- head/sys/dev/hptmv/hptproc.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/hptmv/hptproc.c Mon Feb 20 03:43:12 2017 (r313982) @@ -427,7 +427,7 @@ static void hpt_copy_array_info(HPT_GET_INFO *pinfo, int nld, PVDevice pArray) { int i; - char *sType=0, *sStatus=0; + char *sType = NULL, *sStatus = NULL; char buf[32]; PVDevice pTmpArray; Modified: head/sys/dev/hptmv/ioctl.c ============================================================================== --- head/sys/dev/hptmv/ioctl.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/hptmv/ioctl.c Mon Feb 20 03:43:12 2017 (r313982) @@ -691,7 +691,7 @@ hpt_rebuild_data_block(IAL_ADAPTER_T *pA PCommand pCmd; UINT result; int needsync=0, retry=0, needdelete=0; - void *buffer = 0; + void *buffer = NULL; _VBUS_INST(&pAdapter->VBus) Modified: head/sys/dev/iicbus/if_ic.c ============================================================================== --- head/sys/dev/iicbus/if_ic.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/iicbus/if_ic.c Mon Feb 20 03:43:12 2017 (r313982) @@ -251,7 +251,7 @@ icioctl(struct ifnet *ifp, u_long cmd, c case SIOCADDMULTI: case SIOCDELMULTI: - if (ifr == 0) + if (ifr == NULL) return (EAFNOSUPPORT); /* XXX */ switch (ifr->ifr_addr.sa_family) { case AF_INET: Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/isp/isp_pci.c Mon Feb 20 03:43:12 2017 (r313982) @@ -583,10 +583,10 @@ isp_get_specific_options(device_t dev, i name, &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_FULL_DUPLEX; } - sptr = 0; + sptr = NULL; snprintf(name, sizeof(name), "%stopology", prefix); if (resource_string_value(device_get_name(dev), device_get_unit(dev), - name, (const char **) &sptr) == 0 && sptr != 0) { + name, (const char **) &sptr) == 0 && sptr != NULL) { if (strcmp(sptr, "lport") == 0) { isp->isp_confopts |= ISP_CFG_LPORT; } else if (strcmp(sptr, "nport") == 0) { @@ -631,12 +631,12 @@ isp_get_specific_options(device_t dev, i * hint replacement to specify WWN strings with a leading * 'w' (e..g w50000000aaaa0001). Sigh. */ - sptr = 0; + sptr = NULL; snprintf(name, sizeof(name), "%sportwwn", prefix); tval = resource_string_value(device_get_name(dev), device_get_unit(dev), name, (const char **) &sptr); - if (tval == 0 && sptr != 0 && *sptr++ == 'w') { - char *eptr = 0; + if (tval == 0 && sptr != NULL && *sptr++ == 'w') { + char *eptr = NULL; ISP_FC_PC(isp, chan)->def_wwpn = strtouq(sptr, &eptr, 16); if (eptr < sptr + 16 || ISP_FC_PC(isp, chan)->def_wwpn == -1) { device_printf(dev, "mangled portwwn hint '%s'\n", sptr); @@ -644,12 +644,12 @@ isp_get_specific_options(device_t dev, i } } - sptr = 0; + sptr = NULL; snprintf(name, sizeof(name), "%snodewwn", prefix); tval = resource_string_value(device_get_name(dev), device_get_unit(dev), name, (const char **) &sptr); - if (tval == 0 && sptr != 0 && *sptr++ == 'w') { - char *eptr = 0; + if (tval == 0 && sptr != NULL && *sptr++ == 'w') { + char *eptr = NULL; ISP_FC_PC(isp, chan)->def_wwnn = strtouq(sptr, &eptr, 16); if (eptr < sptr + 16 || ISP_FC_PC(isp, chan)->def_wwnn == 0) { device_printf(dev, "mangled nodewwn hint '%s'\n", sptr); Modified: head/sys/dev/le/am7990.c ============================================================================== --- head/sys/dev/le/am7990.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/le/am7990.c Mon Feb 20 03:43:12 2017 (r313982) @@ -519,7 +519,7 @@ am7990_start_locked(struct lance_softc * } IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - if (m == 0) + if (m == NULL) break; /* Modified: head/sys/dev/le/am79900.c ============================================================================== --- head/sys/dev/le/am79900.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/le/am79900.c Mon Feb 20 03:43:12 2017 (r313982) @@ -557,7 +557,7 @@ am79900_start_locked(struct lance_softc } IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - if (m == 0) + if (m == NULL) break; /* Modified: head/sys/dev/le/lance.c ============================================================================== --- head/sys/dev/le/lance.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/le/lance.c Mon Feb 20 03:43:12 2017 (r313982) @@ -418,7 +418,7 @@ lance_get(struct lance_softc *sc, int bo totlen -= len; if (totlen > 0) { MGET(newm, M_NOWAIT, MT_DATA); - if (newm == 0) + if (newm == NULL) goto bad; len = MLEN; m = m->m_next = newm; Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/md/md.c Mon Feb 20 03:43:12 2017 (r313982) @@ -153,7 +153,7 @@ static g_access_t g_md_access; static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp); -static struct cdev *status_dev = 0; +static struct cdev *status_dev = NULL; static struct sx md_sx; static struct unrhdr *md_uh; Modified: head/sys/dev/ncr/ncr.c ============================================================================== --- head/sys/dev/ncr/ncr.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ncr/ncr.c Mon Feb 20 03:43:12 2017 (r313982) @@ -5206,7 +5206,7 @@ static void ncr_log_hard_error(ncb_p np, } else { script_ofs = dsp; script_size = 0; - script_base = 0; + script_base = NULL; script_name = "mem"; } @@ -5809,7 +5809,7 @@ static void ncr_int_sir (ncb_p np) u_char scntl3; u_char chg, ofs, per, fak, wide; u_char num = INB (nc_dsps); - nccb_p cp=0; + nccb_p cp = NULL; u_long dsa; u_int target = INB (nc_sdid) & 0x0f; tcb_p tp = &np->target[target]; Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/netmap/netmap_freebsd.c Mon Feb 20 03:43:12 2017 (r313982) @@ -648,7 +648,7 @@ nm_os_pt_memdev_iomap(struct ptnetmap_me &rid, 0, ~0, *mem_size, RF_ACTIVE); if (ptn_dev->pci_mem == NULL) { *nm_paddr = 0; - *nm_addr = 0; + *nm_addr = NULL; return ENOMEM; } Modified: head/sys/dev/netmap/netmap_mem2.c ============================================================================== --- head/sys/dev/netmap/netmap_mem2.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/netmap/netmap_mem2.c Mon Feb 20 03:43:12 2017 (r313982) @@ -2143,7 +2143,7 @@ netmap_mem_pt_guest_deref(struct netmap_ if (ptnmd->ptn_dev) { nm_os_pt_memdev_iounmap(ptnmd->ptn_dev); } - ptnmd->nm_addr = 0; + ptnmd->nm_addr = NULL; ptnmd->nm_paddr = 0; } } Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ofw/ofw_bus_subr.c Mon Feb 20 03:43:12 2017 (r313982) @@ -963,7 +963,7 @@ ofw_bus_string_list_to_array(phandle_t n i += len; tptr += len; } - array[cnt] = 0; + array[cnt] = NULL; *out_array = array; return (cnt); Modified: head/sys/dev/patm/if_patm_tx.c ============================================================================== --- head/sys/dev/patm/if_patm_tx.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/patm/if_patm_tx.c Mon Feb 20 03:43:12 2017 (r313982) @@ -440,7 +440,7 @@ patm_tx_pad(struct patm_softc *sc, struc } } MGET(m, M_NOWAIT, MT_DATA); - if (m == 0) { + if (m == NULL) { m_freem(m0); if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); return (NULL); Modified: head/sys/dev/pccard/pccard.c ============================================================================== --- head/sys/dev/pccard/pccard.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/pccard/pccard.c Mon Feb 20 03:43:12 2017 (r313982) @@ -470,7 +470,7 @@ pccard_function_init(struct pccard_funct struct pccard_ivar *devi = PCCARD_IVAR(pf->dev); struct resource_list *rl = &devi->resources; struct resource_list_entry *rle; - struct resource *r = 0; + struct resource *r = NULL; struct pccard_ce_iospace *ios; struct pccard_ce_memspace *mems; device_t bus; @@ -1115,7 +1115,7 @@ pccard_alloc_resource(device_t dev, devi rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pccard_ivar *dinfo; - struct resource_list_entry *rle = 0; + struct resource_list_entry *rle = NULL; int passthrough = (device_get_parent(child) != dev); int isdefault = (RMAN_IS_DEFAULT_RANGE(start, end) && count == 1); struct resource *r = NULL; @@ -1165,7 +1165,7 @@ pccard_release_resource(device_t dev, de { struct pccard_ivar *dinfo; int passthrough = (device_get_parent(child) != dev); - struct resource_list_entry *rle = 0; + struct resource_list_entry *rle = NULL; if (passthrough) return BUS_RELEASE_RESOURCE(device_get_parent(dev), child, Modified: head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c ============================================================================== --- head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c Mon Feb 20 03:43:12 2017 (r313982) @@ -48,7 +48,7 @@ bit32 gLLSoftResetCounter = 0; bit32 gPollForMissingInt; #ifdef FW_EVT_LOG_TST -void *eventLogAddress = 0; +void *eventLogAddress = NULL; #endif extern bit32 gWait_3; Modified: head/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c ============================================================================== --- head/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c Mon Feb 20 03:43:12 2017 (r313982) @@ -379,7 +379,7 @@ tiCOMMgntIOCTL( bit32 Offset = 0; bit32 RequestLength = 0; /* user request on how much data to pass to application */ agsaContext_t *agContext = NULL; - bit8 *loc = 0; + bit8 *loc = NULL; TI_DBG3(("tiCOMMgntIOCTL: start\n")); Modified: head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c ============================================================================== --- head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Mon Feb 20 03:43:12 2017 (r313982) @@ -5032,7 +5032,7 @@ STATIC void agtiapi_PrepCCBs( struct agt int i; U32 hdr_sz, ccb_sz; - ccb_t *pccb = 0; + ccb_t *pccb = NULL; int offset = 0; int nsegs = 0; int sgl_sz = 0; @@ -5159,7 +5159,7 @@ STATIC U32 agtiapi_InitCCBs(struct agtia U32 max_ccb, size, ccb_sz, hdr_sz; int no_allocs = 0, i; - ccb_hdr_t *hdr = 0; + ccb_hdr_t *hdr = NULL; AGTIAPI_PRINTK("agtiapi_InitCCBs: start\n"); AGTIAPI_PRINTK("agtiapi_InitCCBs: tgtCount %d tid %d\n", tgtCount, tid); @@ -5395,7 +5395,7 @@ STATIC U32 agtiapi_GetDevHandle( struct for ( devIdx = 0; devIdx < pCard->devDiscover; devIdx++ ) { - if ( agDev[devIdx] != 0 ) + if ( agDev[devIdx] != NULL ) { // AGTIAPI_PRINTK( "agtiapi_GetDevHandle: agDev %d not NULL %p\n", // devIdx, agDev[devIdx] ); @@ -5820,7 +5820,7 @@ STATIC void agtiapi_ReleaseCCBs( struct ccb_hdr_t *hdr; U32 hdr_sz; - ccb_t *pccb = 0; + ccb_t *pccb = NULL; AGTIAPI_PRINTK( "agtiapi_ReleaseCCBs: start\n" ); Modified: head/sys/dev/ppbus/if_plip.c ============================================================================== --- head/sys/dev/ppbus/if_plip.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ppbus/if_plip.c Mon Feb 20 03:43:12 2017 (r313982) @@ -245,7 +245,7 @@ lp_attach(device_t dev) */ lp->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); - if (lp->res_irq == 0) { + if (lp->res_irq == NULL) { device_printf(dev, "cannot reserve interrupt, failed.\n"); return (ENXIO); } @@ -453,7 +453,7 @@ lpioctl(struct ifnet *ifp, u_long cmd, c case SIOCADDMULTI: case SIOCDELMULTI: - if (ifr == 0) { + if (ifr == NULL) { return (EAFNOSUPPORT); /* XXX */ } switch (ifr->ifr_addr.sa_family) { Modified: head/sys/dev/ppbus/ppbconf.c ============================================================================== --- head/sys/dev/ppbus/ppbconf.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ppbus/ppbconf.c Mon Feb 20 03:43:12 2017 (r313982) @@ -206,7 +206,7 @@ search_token(char *str, int slen, char * static int ppb_pnp_detect(device_t bus) { - char *token, *class = 0; + char *token, *class = NULL; int i, len, error; int class_id = -1; char str[PPB_PnP_STRING_SIZE+1]; Modified: head/sys/dev/ppc/ppc.c ============================================================================== --- head/sys/dev/ppc/ppc.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/ppc/ppc.c Mon Feb 20 03:43:12 2017 (r313982) @@ -1324,9 +1324,9 @@ ppc_exec_microseq(device_t dev, struct p register int reg; register char mask; register int accum = 0; - register char *ptr = 0; + register char *ptr = NULL; - struct ppb_microseq *stack = 0; + struct ppb_microseq *stack = NULL; /* microsequence registers are equivalent to PC-like port registers */ @@ -1496,7 +1496,7 @@ ppc_exec_microseq(device_t dev, struct p mi = stack; /* reset the stack */ - stack = 0; + stack = NULL; /* XXX return code */ Modified: head/sys/dev/sbni/if_sbni_isa.c ============================================================================== --- head/sys/dev/sbni/if_sbni_isa.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/sbni/if_sbni_isa.c Mon Feb 20 03:43:12 2017 (r313982) @@ -132,7 +132,7 @@ sbni_attach_isa(device_t dev) } else { struct sbni_softc *master; - if ((master = connect_to_master(sc)) == 0) { + if ((master = connect_to_master(sc)) == NULL) { device_printf(dev, "failed to alloc irq\n"); sbni_release_resources(sc); return (ENXIO); Modified: head/sys/dev/sn/if_sn.c ============================================================================== --- head/sys/dev/sn/if_sn.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/sn/if_sn.c Mon Feb 20 03:43:12 2017 (r313982) @@ -393,7 +393,7 @@ startagain: * Sneak a peek at the next packet */ m = ifp->if_snd.ifq_head; - if (m == 0) + if (m == NULL) return; /* * Compute the frame length and set pad to give an overall even @@ -509,7 +509,7 @@ startagain: /* * Push out the data to the card. */ - for (top = m; m != 0; m = m->m_next) { + for (top = m; m != NULL; m = m->m_next) { /* * Push out words. @@ -607,7 +607,7 @@ snresume(struct ifnet *ifp) * Sneak a peek at the next packet */ m = ifp->if_snd.ifq_head; - if (m == 0) { + if (m == NULL) { if_printf(ifp, "snresume() with nothing to send\n"); return; } @@ -708,7 +708,7 @@ snresume(struct ifnet *ifp) /* * Push out the data to the card. */ - for (top = m; m != 0; m = m->m_next) { + for (top = m; m != NULL; m = m->m_next) { /* * Push out words. Modified: head/sys/dev/sym/sym_hipd.c ============================================================================== --- head/sys/dev/sym/sym_hipd.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/sym/sym_hipd.c Mon Feb 20 03:43:12 2017 (r313982) @@ -3710,7 +3710,7 @@ static void sym_log_hard_error(hcb_p np, } else { script_ofs = dsp; script_size = 0; - script_base = 0; + script_base = NULL; script_name = "mem"; } @@ -4296,7 +4296,7 @@ static void sym_int_ma (hcb_p np) * try to find the interrupted script command, * and the address at which to continue. */ - vdsp = 0; + vdsp = NULL; nxtdsp = 0; if (dsp > np->scripta_ba && dsp <= np->scripta_ba + np->scripta_sz) { @@ -6673,7 +6673,7 @@ static void sym_alloc_lcb_tags (hcb_p np lp->cb_tags = sym_calloc(SYM_CONF_MAX_TASK, "CB_TAGS"); if (!lp->cb_tags) { sym_mfree_dma(lp->itlq_tbl, SYM_CONF_MAX_TASK*4, "ITLQ_TBL"); - lp->itlq_tbl = 0; + lp->itlq_tbl = NULL; return; } Modified: head/sys/dev/vx/if_vx.c ============================================================================== --- head/sys/dev/vx/if_vx.c Mon Feb 20 03:33:59 2017 (r313981) +++ head/sys/dev/vx/if_vx.c Mon Feb 20 03:43:12 2017 (r313982) @@ -350,7 +350,7 @@ vx_setlink(struct vx_softc *sc) */ i = sc->vx_connector; /* default in EEPROM */ reason = "default"; - warning = 0; + warning = NULL; if (ifp->if_flags & IFF_LINK0) { if (sc->vx_connectors & conn_tab[CONNECTOR_AUI].bit) { @@ -729,7 +729,7 @@ again: /* Pull packet off interface. */ m = vx_get(sc, len); - if (m == 0) { + if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto abort; } From owner-svn-src-all@freebsd.org Mon Feb 20 03:45: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 B7094CE39F3; Mon, 20 Feb 2017 03:45:42 +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 841A031B; Mon, 20 Feb 2017 03:45: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 v1K3jfvO060902; Mon, 20 Feb 2017 03:45:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K3jft5060901; Mon, 20 Feb 2017 03:45:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200345.v1K3jft5060901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 03:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313983 - 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: Mon, 20 Feb 2017 03:45:42 -0000 Author: adrian Date: Mon Feb 20 03:45:41 2017 New Revision: 313983 URL: https://svnweb.freebsd.org/changeset/base/313983 Log: [net80211] fix NULL pointer dereference in VHT operation in hostap mode. The vht IEs are NULL at this point, so we shouldn't upgrade a node to VHT. I'll fix the upgrade after this! Tested: * ath10k, hostap mode Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Mon Feb 20 03:43:12 2017 (r313982) +++ head/sys/net80211/ieee80211_hostap.c Mon Feb 20 03:45:41 2017 (r313983) @@ -2151,7 +2151,9 @@ hostap_recv_mgmt(struct ieee80211_node * ni->ni_chan = vap->iv_bss->ni_chan; /* VHT */ - if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { + if (IEEE80211_IS_CHAN_VHT(ni->ni_chan) && + htcap != NULL && + vhtinfo != NULL) { /* XXX TODO; see below */ printf("%s: VHT TODO!\n", __func__); ieee80211_vht_node_init(ni); From owner-svn-src-all@freebsd.org Mon Feb 20 04:02: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 B8EF8CE3DD8; Mon, 20 Feb 2017 04:02: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 857ABCF6; Mon, 20 Feb 2017 04:02:30 +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 v1K42TXh068804; Mon, 20 Feb 2017 04:02:29 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K42Tvq068803; Mon, 20 Feb 2017 04:02:29 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200402.v1K42Tvq068803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 04:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313984 - 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: Mon, 20 Feb 2017 04:02:30 -0000 Author: adrian Date: Mon Feb 20 04:02:29 2017 New Revision: 313984 URL: https://svnweb.freebsd.org/changeset/base/313984 Log: [net80211] fix up VHT IE comparison typo Whilst here, add a comment that I need to validate VHT IEs. Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Mon Feb 20 03:45:41 2017 (r313983) +++ head/sys/net80211/ieee80211_hostap.c Mon Feb 20 04:02:29 2017 (r313984) @@ -2101,6 +2101,8 @@ hostap_recv_mgmt(struct ieee80211_node * return); /* XXX just NULL out? */ } + /* XXX validate VHT IEs */ + if ((vap->iv_flags & IEEE80211_F_WPA) && !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo)) return; @@ -2152,7 +2154,7 @@ hostap_recv_mgmt(struct ieee80211_node * /* VHT */ if (IEEE80211_IS_CHAN_VHT(ni->ni_chan) && - htcap != NULL && + vhtcap != NULL && vhtinfo != NULL) { /* XXX TODO; see below */ printf("%s: VHT TODO!\n", __func__); From owner-svn-src-all@freebsd.org Mon Feb 20 04:02: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 3FD68CE3E26; Mon, 20 Feb 2017 04:02:52 +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 0CFD6E3A; Mon, 20 Feb 2017 04:02: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 v1K42puo068860; Mon, 20 Feb 2017 04:02:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K42pHs068859; Mon, 20 Feb 2017 04:02:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200402.v1K42pHs068859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 04:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313985 - 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: Mon, 20 Feb 2017 04:02:52 -0000 Author: adrian Date: Mon Feb 20 04:02:50 2017 New Revision: 313985 URL: https://svnweb.freebsd.org/changeset/base/313985 Log: [net80211] teach the probe response routine to add VHT IEs as appropriate. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Feb 20 04:02:29 2017 (r313984) +++ head/sys/net80211/ieee80211_output.c Mon Feb 20 04:02:50 2017 (r313985) @@ -2733,6 +2733,8 @@ ieee80211_alloc_proberesp(struct ieee802 * [tlv] RSN (optional) * [tlv] HT capabilities * [tlv] HT information + * [tlv] VHT capabilities + * [tlv] VHT information * [tlv] WPA (optional) * [tlv] WME (optional) * [tlv] Vendor OUI HT capabilities (optional) @@ -2763,6 +2765,8 @@ ieee80211_alloc_proberesp(struct ieee802 + sizeof(struct ieee80211_wme_param) + 4 + sizeof(struct ieee80211_ie_htcap) + 4 + sizeof(struct ieee80211_ie_htinfo) + + sizeof(struct ieee80211_ie_vhtcap) + + sizeof(struct ieee80211_ie_vht_operation) #ifdef IEEE80211_SUPPORT_SUPERG + sizeof(struct ieee80211_ath_ie) #endif @@ -2842,6 +2846,11 @@ ieee80211_alloc_proberesp(struct ieee802 frm = ieee80211_add_htcap(frm, bss); frm = ieee80211_add_htinfo(frm, bss); } + if (IEEE80211_IS_CHAN_VHT(bss->ni_chan) && + legacy != IEEE80211_SEND_LEGACY_11B) { + frm = ieee80211_add_vhtcap(frm, bss); + frm = ieee80211_add_vhtinfo(frm, bss); + } frm = ieee80211_add_wpa(frm, vap); if (vap->iv_flags & IEEE80211_F_WME) frm = ieee80211_add_wme_param(frm, &ic->ic_wme); From owner-svn-src-all@freebsd.org Mon Feb 20 04:05: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 8F8AACE3EBC; Mon, 20 Feb 2017 04:05: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 5CE1AF93; Mon, 20 Feb 2017 04:05: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 v1K44x1s068966; Mon, 20 Feb 2017 04:04:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K44xGT068965; Mon, 20 Feb 2017 04:04:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200404.v1K44xGT068965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 04:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313986 - 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: Mon, 20 Feb 2017 04:05:00 -0000 Author: adrian Date: Mon Feb 20 04:04:59 2017 New Revision: 313986 URL: https://svnweb.freebsd.org/changeset/base/313986 Log: [net80211] validate VHT IEs. Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Mon Feb 20 04:02:50 2017 (r313985) +++ head/sys/net80211/ieee80211_hostap.c Mon Feb 20 04:04:59 2017 (r313986) @@ -2101,7 +2101,17 @@ hostap_recv_mgmt(struct ieee80211_node * return); /* XXX just NULL out? */ } - /* XXX validate VHT IEs */ + /* Validate VHT IEs */ + if (vhtcap != NULL) { + IEEE80211_VERIFY_LENGTH(vhtcap[1], + sizeof(struct ieee80211_ie_vhtcap) - 2, + return); + } + if (vhtinfo != NULL) { + IEEE80211_VERIFY_LENGTH(vhtinfo[1], + sizeof(struct ieee80211_ie_vht_operation) - 2, + return); + } if ((vap->iv_flags & IEEE80211_F_WPA) && !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo)) From owner-svn-src-all@freebsd.org Mon Feb 20 08:04: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 62427CE5952; Mon, 20 Feb 2017 08:04:07 +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 31A6A1E97; Mon, 20 Feb 2017 08:04:07 +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 v1K846g3065051; Mon, 20 Feb 2017 08:04:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K846AR065050; Mon, 20 Feb 2017 08:04:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702200804.v1K846AR065050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 20 Feb 2017 08:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313987 - head/tools/tools/net80211/wlanstats X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 08:04:07 -0000 Author: adrian Date: Mon Feb 20 08:04:06 2017 New Revision: 313987 URL: https://svnweb.freebsd.org/changeset/base/313987 Log: [wlanstats] We actually /do/ support per-STA stats! Modified: head/tools/tools/net80211/wlanstats/main.c Modified: head/tools/tools/net80211/wlanstats/main.c ============================================================================== --- head/tools/tools/net80211/wlanstats/main.c Mon Feb 20 04:04:59 2017 (r313986) +++ head/tools/tools/net80211/wlanstats/main.c Mon Feb 20 08:04:06 2017 (r313987) @@ -158,7 +158,7 @@ print_sta_stats(FILE *fd, const u_int8_t void usage(void) { - printf("wlanstats: [-ah] [-i ifname] [-l] [-o fmt] [interval]\n"); + printf("wlanstats: [-ah] [-i ifname] [-l] [-m station MAC address] [-o fmt] [interval]\n"); } int From owner-svn-src-all@freebsd.org Mon Feb 20 08:10: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 686B4CE5D90; Mon, 20 Feb 2017 08:10:43 +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 1C8301458; Mon, 20 Feb 2017 08:10:43 +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 v1K8Agch065312; Mon, 20 Feb 2017 08:10:42 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1K8AgXF065311; Mon, 20 Feb 2017 08:10:42 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201702200810.v1K8AgXF065311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Mon, 20 Feb 2017 08:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313988 - head/sys/dev/etherswitch/mtkswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 08:10:43 -0000 Author: sgalabov Date: Mon Feb 20 08:10:41 2017 New Revision: 313988 URL: https://svnweb.freebsd.org/changeset/base/313988 Log: etherswitch: Fix RT305x vlan group operation Fix an issue which prevents proper operation (addition/removal of members) of RT305x vlan groups. Tested by: yamori813@yahoo.co.jp Submitted by: yamori813@yahoo.co.jp (initial version) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9607 Modified: head/sys/dev/etherswitch/mtkswitch/mtkswitch_rt3050.c Modified: head/sys/dev/etherswitch/mtkswitch/mtkswitch_rt3050.c ============================================================================== --- head/sys/dev/etherswitch/mtkswitch/mtkswitch_rt3050.c Mon Feb 20 08:04:06 2017 (r313987) +++ head/sys/dev/etherswitch/mtkswitch/mtkswitch_rt3050.c Mon Feb 20 08:10:41 2017 (r313988) @@ -405,11 +405,38 @@ mtkswitch_vlan_setvgroup(struct mtkswitc MTKSWITCH_LOCK(sc); /* First, see if we can accomodate the request at all */ val = MTKSWITCH_READ(sc, MTKSWITCH_POC2); - if ((val & POC2_UNTAG_VLAN) == 0 || - sc->sc_switchtype == MTK_SWITCH_RT3050) { + if (sc->sc_switchtype == MTK_SWITCH_RT3050 || + (val & POC2_UNTAG_VLAN) == 0) { + /* + * There are 2 things we can't support in per-port untagging + * mode: + * 1. Adding a port as an untagged member if the port is not + * set up to do untagging. + * 2. Adding a port as a tagged member if the port is set up + * to do untagging. + */ val &= VUB_MASK; + + /* get all untagged members from the member list */ tmp = v->es_untagged_ports & v->es_member_ports; - if (val != tmp) { + /* fail if untagged members are not a subset of all members */ + if (tmp != v->es_untagged_ports) { + /* Cannot accomodate request */ + MTKSWITCH_UNLOCK(sc); + return (ENOTSUP); + } + + /* fail if any untagged member is set up to do tagging */ + if ((tmp & val) != tmp) { + /* Cannot accomodate request */ + MTKSWITCH_UNLOCK(sc); + return (ENOTSUP); + } + + /* now, get the list of all tagged members */ + tmp = v->es_member_ports & ~tmp; + /* fail if any tagged member is set up to do untagging */ + if ((tmp & val) != 0) { /* Cannot accomodate request */ MTKSWITCH_UNLOCK(sc); return (ENOTSUP); From owner-svn-src-all@freebsd.org Mon Feb 20 10:44: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 B2693CE5FA9; Mon, 20 Feb 2017 10:44:25 +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 8A67E1531; Mon, 20 Feb 2017 10:44:25 +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 v1KAiOXH029387; Mon, 20 Feb 2017 10:44:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KAiOXd029384; Mon, 20 Feb 2017 10:44:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702201044.v1KAiOXd029384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Feb 2017 10:44: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: r313989 - in stable/11/sys: arm/include arm64/include 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: Mon, 20 Feb 2017 10:44:25 -0000 Author: kib Date: Mon Feb 20 10:44:24 2017 New Revision: 313989 URL: https://svnweb.freebsd.org/changeset/base/313989 Log: MFC r313345: Update arm and arm64 counters MD bits. MFC r313394 (by manu): subr_sfbus.c need sys/proc.h for struct thread definition. Modified: stable/11/sys/arm/include/counter.h stable/11/sys/arm64/include/counter.h stable/11/sys/kern/subr_sfbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/counter.h ============================================================================== --- stable/11/sys/arm/include/counter.h Mon Feb 20 08:10:41 2017 (r313988) +++ stable/11/sys/arm/include/counter.h Mon Feb 20 10:44:24 2017 (r313989) @@ -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: stable/11/sys/arm64/include/counter.h ============================================================================== --- stable/11/sys/arm64/include/counter.h Mon Feb 20 08:10:41 2017 (r313988) +++ stable/11/sys/arm64/include/counter.h Mon Feb 20 10:44:24 2017 (r313989) @@ -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_ */ Modified: stable/11/sys/kern/subr_sfbuf.c ============================================================================== --- stable/11/sys/kern/subr_sfbuf.c Mon Feb 20 08:10:41 2017 (r313988) +++ stable/11/sys/kern/subr_sfbuf.c Mon Feb 20 10:44:24 2017 (r313989) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Mon Feb 20 10:49: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 EA2E1CE6065; Mon, 20 Feb 2017 10:49:05 +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 C24371743; Mon, 20 Feb 2017 10: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 v1KAn423029601; Mon, 20 Feb 2017 10:49:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KAn43c029600; Mon, 20 Feb 2017 10:49:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702201049.v1KAn43c029600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Feb 2017 10:49:04 +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: r313990 - 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: Mon, 20 Feb 2017 10:49:06 -0000 Author: kib Date: Mon Feb 20 10:49:04 2017 New Revision: 313990 URL: https://svnweb.freebsd.org/changeset/base/313990 Log: MFC r313693: Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers. Modified: stable/11/sys/vm/vm_mmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_mmap.c ============================================================================== --- stable/11/sys/vm/vm_mmap.c Mon Feb 20 10:44:24 2017 (r313989) +++ stable/11/sys/vm/vm_mmap.c Mon Feb 20 10:49:04 2017 (r313990) @@ -106,14 +106,8 @@ struct sbrk_args { }; #endif -/* - * MPSAFE - */ -/* ARGSUSED */ int -sys_sbrk(td, uap) - struct thread *td; - struct sbrk_args *uap; +sys_sbrk(struct thread *td, struct sbrk_args *uap) { /* Not yet implemented */ return (EOPNOTSUPP); @@ -125,14 +119,8 @@ struct sstk_args { }; #endif -/* - * MPSAFE - */ -/* ARGSUSED */ int -sys_sstk(td, uap) - struct thread *td; - struct sstk_args *uap; +sys_sstk(struct thread *td, struct sstk_args *uap) { /* Not yet implemented */ return (EOPNOTSUPP); @@ -146,11 +134,9 @@ struct getpagesize_args { #endif int -ogetpagesize(td, uap) - struct thread *td; - struct getpagesize_args *uap; +ogetpagesize(struct thread *td, struct getpagesize_args *uap) { - /* MP SAFE */ + td->td_retval[0] = PAGE_SIZE; return (0); } @@ -182,9 +168,6 @@ struct mmap_args { }; #endif -/* - * MPSAFE - */ int sys_mmap(td, uap) struct thread *td; @@ -458,9 +441,6 @@ struct msync_args { int flags; }; #endif -/* - * MPSAFE - */ int sys_msync(td, uap) struct thread *td; @@ -513,9 +493,6 @@ struct munmap_args { size_t len; }; #endif -/* - * MPSAFE - */ int sys_munmap(td, uap) struct thread *td; @@ -589,9 +566,6 @@ struct mprotect_args { int prot; }; #endif -/* - * MPSAFE - */ int sys_mprotect(td, uap) struct thread *td; @@ -631,13 +605,8 @@ struct minherit_args { int inherit; }; #endif -/* - * MPSAFE - */ int -sys_minherit(td, uap) - struct thread *td; - struct minherit_args *uap; +sys_minherit(struct thread *td, struct minherit_args *uap) { vm_offset_t addr; vm_size_t size, pageoff; @@ -672,13 +641,8 @@ struct madvise_args { }; #endif -/* - * MPSAFE - */ int -sys_madvise(td, uap) - struct thread *td; - struct madvise_args *uap; +sys_madvise(struct thread *td, struct madvise_args *uap) { vm_offset_t start, end; vm_map_t map; @@ -730,13 +694,8 @@ struct mincore_args { }; #endif -/* - * MPSAFE - */ int -sys_mincore(td, uap) - struct thread *td; - struct mincore_args *uap; +sys_mincore(struct thread *td, struct mincore_args *uap) { vm_offset_t addr, first_addr; vm_offset_t end, cend; @@ -989,13 +948,8 @@ struct mlock_args { size_t len; }; #endif -/* - * MPSAFE - */ int -sys_mlock(td, uap) - struct thread *td; - struct mlock_args *uap; +sys_mlock(struct thread *td, struct mlock_args *uap) { return (vm_mlock(td->td_proc, td->td_ucred, uap->addr, uap->len)); @@ -1061,13 +1015,8 @@ struct mlockall_args { }; #endif -/* - * MPSAFE - */ int -sys_mlockall(td, uap) - struct thread *td; - struct mlockall_args *uap; +sys_mlockall(struct thread *td, struct mlockall_args *uap) { vm_map_t map; int error; @@ -1138,13 +1087,8 @@ struct munlockall_args { }; #endif -/* - * MPSAFE - */ int -sys_munlockall(td, uap) - struct thread *td; - struct munlockall_args *uap; +sys_munlockall(struct thread *td, struct munlockall_args *uap) { vm_map_t map; int error; @@ -1179,9 +1123,6 @@ struct munlock_args { size_t len; }; #endif -/* - * MPSAFE - */ int sys_munlock(td, uap) struct thread *td; @@ -1332,8 +1273,6 @@ done: /* * vm_mmap_cdev() * - * MPSAFE - * * Helper function for vm_mmap. Perform sanity check specific for mmap * operations on cdevs. */ From owner-svn-src-all@freebsd.org Mon Feb 20 10:51: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 4C80ECE60F1; Mon, 20 Feb 2017 10:51: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 190FC1AE9; Mon, 20 Feb 2017 10:51: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 v1KApk1X033564; Mon, 20 Feb 2017 10:51:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KApkkS033563; Mon, 20 Feb 2017 10:51:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702201051.v1KApkkS033563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Feb 2017 10:51: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: r313991 - 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: Mon, 20 Feb 2017 10:51:47 -0000 Author: kib Date: Mon Feb 20 10:51:46 2017 New Revision: 313991 URL: https://svnweb.freebsd.org/changeset/base/313991 Log: MFC r313693: Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers. Modified: stable/10/sys/vm/vm_mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_mmap.c ============================================================================== --- stable/10/sys/vm/vm_mmap.c Mon Feb 20 10:49:04 2017 (r313990) +++ stable/10/sys/vm/vm_mmap.c Mon Feb 20 10:51:46 2017 (r313991) @@ -113,14 +113,8 @@ struct sbrk_args { }; #endif -/* - * MPSAFE - */ -/* ARGSUSED */ int -sys_sbrk(td, uap) - struct thread *td; - struct sbrk_args *uap; +sys_sbrk(struct thread *td, struct sbrk_args *uap) { /* Not yet implemented */ return (EOPNOTSUPP); @@ -132,14 +126,8 @@ struct sstk_args { }; #endif -/* - * MPSAFE - */ -/* ARGSUSED */ int -sys_sstk(td, uap) - struct thread *td; - struct sstk_args *uap; +sys_sstk(struct thread *td, struct sstk_args *uap) { /* Not yet implemented */ return (EOPNOTSUPP); @@ -153,11 +141,9 @@ struct getpagesize_args { #endif int -ogetpagesize(td, uap) - struct thread *td; - struct getpagesize_args *uap; +ogetpagesize(struct thread *td, struct getpagesize_args *uap) { - /* MP SAFE */ + td->td_retval[0] = PAGE_SIZE; return (0); } @@ -189,9 +175,6 @@ struct mmap_args { }; #endif -/* - * MPSAFE - */ int sys_mmap(td, uap) struct thread *td; @@ -519,9 +502,6 @@ struct msync_args { int flags; }; #endif -/* - * MPSAFE - */ int sys_msync(td, uap) struct thread *td; @@ -574,9 +554,6 @@ struct munmap_args { size_t len; }; #endif -/* - * MPSAFE - */ int sys_munmap(td, uap) struct thread *td; @@ -650,9 +627,6 @@ struct mprotect_args { int prot; }; #endif -/* - * MPSAFE - */ int sys_mprotect(td, uap) struct thread *td; @@ -692,13 +666,8 @@ struct minherit_args { int inherit; }; #endif -/* - * MPSAFE - */ int -sys_minherit(td, uap) - struct thread *td; - struct minherit_args *uap; +sys_minherit(struct thread *td, struct minherit_args *uap) { vm_offset_t addr; vm_size_t size, pageoff; @@ -733,13 +702,8 @@ struct madvise_args { }; #endif -/* - * MPSAFE - */ int -sys_madvise(td, uap) - struct thread *td; - struct madvise_args *uap; +sys_madvise(struct thread *td, struct madvise_args *uap) { vm_offset_t start, end; vm_map_t map; @@ -791,13 +755,8 @@ struct mincore_args { }; #endif -/* - * MPSAFE - */ int -sys_mincore(td, uap) - struct thread *td; - struct mincore_args *uap; +sys_mincore(struct thread *td, struct mincore_args *uap) { vm_offset_t addr, first_addr; vm_offset_t end, cend; @@ -1050,13 +1009,8 @@ struct mlock_args { size_t len; }; #endif -/* - * MPSAFE - */ int -sys_mlock(td, uap) - struct thread *td; - struct mlock_args *uap; +sys_mlock(struct thread *td, struct mlock_args *uap) { return (vm_mlock(td->td_proc, td->td_ucred, uap->addr, uap->len)); @@ -1122,13 +1076,8 @@ struct mlockall_args { }; #endif -/* - * MPSAFE - */ int -sys_mlockall(td, uap) - struct thread *td; - struct mlockall_args *uap; +sys_mlockall(struct thread *td, struct mlockall_args *uap) { vm_map_t map; int error; @@ -1199,13 +1148,8 @@ struct munlockall_args { }; #endif -/* - * MPSAFE - */ int -sys_munlockall(td, uap) - struct thread *td; - struct munlockall_args *uap; +sys_munlockall(struct thread *td, struct munlockall_args *uap) { vm_map_t map; int error; @@ -1240,9 +1184,6 @@ struct munlock_args { size_t len; }; #endif -/* - * MPSAFE - */ int sys_munlock(td, uap) struct thread *td; @@ -1397,8 +1338,6 @@ done: /* * vm_mmap_cdev() * - * MPSAFE - * * Helper function for vm_mmap. Perform sanity check specific for mmap * operations on cdevs. */ From owner-svn-src-all@freebsd.org Mon Feb 20 15:53: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 04BDFCE61FE; Mon, 20 Feb 2017 15:53:18 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C16821474; Mon, 20 Feb 2017 15:53:17 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1KFrG2s057880; Mon, 20 Feb 2017 15:53:16 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KFrGqx057871; Mon, 20 Feb 2017 15:53:16 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201702201553.v1KFrGqx057871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Mon, 20 Feb 2017 15:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 15:53:18 -0000 Author: badger Date: Mon Feb 20 15:53:16 2017 New Revision: 313992 URL: https://svnweb.freebsd.org/changeset/base/313992 Log: Defer ptracestop() signals that cannot be delivered immediately When a thread is stopped in ptracestop(), the ptrace(2) user may request a signal be delivered upon resumption of the thread. Heretofore, those signals were discarded unless ptracestop()'s caller was issignal(). Fix this by modifying ptracestop() to queue up signals requested by the ptrace user that will be delivered when possible. Take special care when the signal is SIGKILL (usually generated from a PT_KILL request); no new stop events should be triggered after a PT_KILL. Add a number of tests for the new functionality. Several tests were authored by jhb. PR: 212607 Reviewed by: kib Approved by: kib (mentor) MFC after: 2 weeks Sponsored by: Dell EMC In collaboration with: jhb Differential Revision: https://reviews.freebsd.org/D9260 Modified: head/sys/kern/kern_fork.c head/sys/kern/kern_sig.c head/sys/kern/kern_thr.c head/sys/kern/subr_syscall.c head/sys/kern/sys_process.c head/sys/sys/signalvar.h head/tests/sys/kern/Makefile head/tests/sys/kern/ptrace_test.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/kern_fork.c Mon Feb 20 15:53:16 2017 (r313992) @@ -1081,7 +1081,7 @@ fork_return(struct thread *td, struct tr proc_reparent(p, dbg); sx_xunlock(&proctree_lock); td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; - ptracestop(td, SIGSTOP); + ptracestop(td, SIGSTOP, NULL); td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); } else { /* @@ -1102,7 +1102,7 @@ fork_return(struct thread *td, struct tr _STOPEVENT(p, S_SCX, td->td_dbg_sc_code); if ((p->p_ptevents & PTRACE_SCX) != 0 || (td->td_dbgflags & TDB_BORN) != 0) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); td->td_dbgflags &= ~(TDB_SCX | TDB_BORN); PROC_UNLOCK(p); } Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/kern_sig.c Mon Feb 20 15:53:16 2017 (r313992) @@ -278,6 +278,7 @@ sigqueue_init(sigqueue_t *list, struct p { SIGEMPTYSET(list->sq_signals); SIGEMPTYSET(list->sq_kill); + SIGEMPTYSET(list->sq_ptrace); TAILQ_INIT(&list->sq_list); list->sq_proc = p; list->sq_flags = SQ_INIT; @@ -301,9 +302,15 @@ sigqueue_get(sigqueue_t *sq, int signo, if (!SIGISMEMBER(sq->sq_signals, signo)) return (0); + if (SIGISMEMBER(sq->sq_ptrace, signo)) { + count++; + SIGDELSET(sq->sq_ptrace, signo); + si->ksi_flags |= KSI_PTRACE; + } if (SIGISMEMBER(sq->sq_kill, signo)) { count++; - SIGDELSET(sq->sq_kill, signo); + if (count == 1) + SIGDELSET(sq->sq_kill, signo); } TAILQ_FOREACH_SAFE(ksi, &sq->sq_list, ksi_link, next) { @@ -347,7 +354,8 @@ sigqueue_take(ksiginfo_t *ksi) if (kp->ksi_signo == ksi->ksi_signo) break; } - if (kp == NULL && !SIGISMEMBER(sq->sq_kill, ksi->ksi_signo)) + if (kp == NULL && !SIGISMEMBER(sq->sq_kill, ksi->ksi_signo) && + !SIGISMEMBER(sq->sq_ptrace, ksi->ksi_signo)) SIGDELSET(sq->sq_signals, ksi->ksi_signo); } @@ -360,6 +368,10 @@ sigqueue_add(sigqueue_t *sq, int signo, KASSERT(sq->sq_flags & SQ_INIT, ("sigqueue not inited")); + /* + * SIGKILL/SIGSTOP cannot be caught or masked, so take the fast path + * for these signals. + */ if (signo == SIGKILL || signo == SIGSTOP || si == NULL) { SIGADDSET(sq->sq_kill, signo); goto out_set_bit; @@ -398,16 +410,19 @@ sigqueue_add(sigqueue_t *sq, int signo, ksi->ksi_sigq = sq; } - if ((si->ksi_flags & KSI_TRAP) != 0 || - (si->ksi_flags & KSI_SIGQ) == 0) { - if (ret != 0) + if (ret != 0) { + if ((si->ksi_flags & KSI_PTRACE) != 0) { + SIGADDSET(sq->sq_ptrace, signo); + ret = 0; + goto out_set_bit; + } else if ((si->ksi_flags & KSI_TRAP) != 0 || + (si->ksi_flags & KSI_SIGQ) == 0) { SIGADDSET(sq->sq_kill, signo); - ret = 0; - goto out_set_bit; - } - - if (ret != 0) + ret = 0; + goto out_set_bit; + } return (ret); + } out_set_bit: SIGADDSET(sq->sq_signals, signo); @@ -434,6 +449,7 @@ sigqueue_flush(sigqueue_t *sq) SIGEMPTYSET(sq->sq_signals); SIGEMPTYSET(sq->sq_kill); + SIGEMPTYSET(sq->sq_ptrace); } static void @@ -466,6 +482,11 @@ sigqueue_move_set(sigqueue_t *src, sigqu SIGSETOR(dst->sq_kill, tmp); SIGSETNAND(src->sq_kill, tmp); + tmp = src->sq_ptrace; + SIGSETAND(tmp, *set); + SIGSETOR(dst->sq_ptrace, tmp); + SIGSETNAND(src->sq_ptrace, tmp); + tmp = src->sq_signals; SIGSETAND(tmp, *set); SIGSETOR(dst->sq_signals, tmp); @@ -502,6 +523,7 @@ sigqueue_delete_set(sigqueue_t *sq, cons } } SIGSETNAND(sq->sq_kill, *set); + SIGSETNAND(sq->sq_ptrace, *set); SIGSETNAND(sq->sq_signals, *set); } @@ -2500,69 +2522,116 @@ sig_suspend_threads(struct thread *td, s return (wakeup_swapper); } +/* + * Stop the process for an event deemed interesting to the debugger. If si is + * non-NULL, this is a signal exchange; the new signal requested by the + * debugger will be returned for handling. If si is NULL, this is some other + * type of interesting event. The debugger may request a signal be delivered in + * that case as well, however it will be deferred until it can be handled. + */ int -ptracestop(struct thread *td, int sig) +ptracestop(struct thread *td, int sig, ksiginfo_t *si) { struct proc *p = td->td_proc; + struct thread *td2; + ksiginfo_t ksi; + int prop; PROC_LOCK_ASSERT(p, MA_OWNED); KASSERT(!(p->p_flag & P_WEXIT), ("Stopping exiting process")); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Stopping for traced signal"); - td->td_dbgflags |= TDB_XSIG; td->td_xsig = sig; - CTR4(KTR_PTRACE, "ptracestop: tid %d (pid %d) flags %#x sig %d", - td->td_tid, p->p_pid, td->td_dbgflags, sig); - PROC_SLOCK(p); - while ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_XSIG)) { - if (p->p_flag & P_SINGLE_EXIT && - !(td->td_dbgflags & TDB_EXIT)) { + + if (si == NULL || (si->ksi_flags & KSI_PTRACE) == 0) { + td->td_dbgflags |= TDB_XSIG; + CTR4(KTR_PTRACE, "ptracestop: tid %d (pid %d) flags %#x sig %d", + td->td_tid, p->p_pid, td->td_dbgflags, sig); + PROC_SLOCK(p); + while ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_XSIG)) { + if (P_KILLED(p)) { + /* + * Ensure that, if we've been PT_KILLed, the + * exit status reflects that. Another thread + * may also be in ptracestop(), having just + * received the SIGKILL, but this thread was + * unsuspended first. + */ + td->td_dbgflags &= ~TDB_XSIG; + td->td_xsig = SIGKILL; + p->p_ptevents = 0; + break; + } + if (p->p_flag & P_SINGLE_EXIT && + !(td->td_dbgflags & TDB_EXIT)) { + /* + * Ignore ptrace stops except for thread exit + * events when the process exits. + */ + td->td_dbgflags &= ~TDB_XSIG; + PROC_SUNLOCK(p); + return (0); + } + /* - * Ignore ptrace stops except for thread exit - * events when the process exits. + * Make wait(2) work. Ensure that right after the + * attach, the thread which was decided to become the + * leader of attach gets reported to the waiter. + * Otherwise, just avoid overwriting another thread's + * assignment to p_xthread. If another thread has + * already set p_xthread, the current thread will get + * a chance to report itself upon the next iteration. */ - td->td_dbgflags &= ~TDB_XSIG; - PROC_SUNLOCK(p); - return (sig); - } - - /* - * Make wait(2) work. Ensure that right after the - * attach, the thread which was decided to become the - * leader of attach gets reported to the waiter. - * Otherwise, just avoid overwriting another thread's - * assignment to p_xthread. If another thread has - * already set p_xthread, the current thread will get - * a chance to report itself upon the next iteration. - */ - if ((td->td_dbgflags & TDB_FSTP) != 0 || - ((p->p_flag2 & P2_PTRACE_FSTP) == 0 && - p->p_xthread == NULL)) { - p->p_xsig = sig; - p->p_xthread = td; - td->td_dbgflags &= ~TDB_FSTP; - p->p_flag2 &= ~P2_PTRACE_FSTP; - p->p_flag |= P_STOPPED_SIG | P_STOPPED_TRACE; - sig_suspend_threads(td, p, 0); - } - if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { - td->td_dbgflags &= ~TDB_STOPATFORK; - cv_broadcast(&p->p_dbgwait); - } + if ((td->td_dbgflags & TDB_FSTP) != 0 || + ((p->p_flag2 & P2_PTRACE_FSTP) == 0 && + p->p_xthread == NULL)) { + p->p_xsig = sig; + p->p_xthread = td; + td->td_dbgflags &= ~TDB_FSTP; + p->p_flag2 &= ~P2_PTRACE_FSTP; + p->p_flag |= P_STOPPED_SIG | P_STOPPED_TRACE; + sig_suspend_threads(td, p, 0); + } + if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { + td->td_dbgflags &= ~TDB_STOPATFORK; + cv_broadcast(&p->p_dbgwait); + } stopme: - thread_suspend_switch(td, p); - if (p->p_xthread == td) - p->p_xthread = NULL; - if (!(p->p_flag & P_TRACED)) - break; - if (td->td_dbgflags & TDB_SUSPEND) { - if (p->p_flag & P_SINGLE_EXIT) + thread_suspend_switch(td, p); + if (p->p_xthread == td) + p->p_xthread = NULL; + if (!(p->p_flag & P_TRACED)) break; - goto stopme; + if (td->td_dbgflags & TDB_SUSPEND) { + if (p->p_flag & P_SINGLE_EXIT) + break; + goto stopme; + } } + PROC_SUNLOCK(p); } - PROC_SUNLOCK(p); + + if (si != NULL && sig == td->td_xsig) { + /* Parent wants us to take the original signal unchanged. */ + si->ksi_flags |= KSI_HEAD; + if (sigqueue_add(&td->td_sigqueue, sig, si) != 0) + si->ksi_signo = 0; + } else if (td->td_xsig != 0) { + /* + * If parent wants us to take a new signal, then it will leave + * it in td->td_xsig; otherwise we just look for signals again. + */ + ksiginfo_init(&ksi); + ksi.ksi_signo = td->td_xsig; + ksi.ksi_flags |= KSI_PTRACE; + prop = sigprop(td->td_xsig); + td2 = sigtd(p, td->td_xsig, prop); + tdsendsignal(p, td2, td->td_xsig, &ksi); + if (td != td2) + return (0); + } + return (td->td_xsig); } @@ -2720,7 +2789,7 @@ issignal(struct thread *td) struct sigacts *ps; struct sigqueue *queue; sigset_t sigpending; - int sig, prop, newsig; + int sig, prop; p = td->td_proc; ps = p->p_sigacts; @@ -2783,47 +2852,18 @@ issignal(struct thread *td) } mtx_unlock(&ps->ps_mtx); - newsig = ptracestop(td, sig); + sig = ptracestop(td, sig, &td->td_dbgksi); mtx_lock(&ps->ps_mtx); - if (sig != newsig) { - - /* - * If parent wants us to take the signal, - * then it will leave it in p->p_xsig; - * otherwise we just look for signals again. - */ - if (newsig == 0) - continue; - sig = newsig; - - /* - * Put the new signal into td_sigqueue. If the - * signal is being masked, look for other - * signals. - */ - sigqueue_add(queue, sig, NULL); - if (SIGISMEMBER(td->td_sigmask, sig)) - continue; - signotify(td); - } else { - if (td->td_dbgksi.ksi_signo != 0) { - td->td_dbgksi.ksi_flags |= KSI_HEAD; - if (sigqueue_add(&td->td_sigqueue, sig, - &td->td_dbgksi) != 0) - td->td_dbgksi.ksi_signo = 0; - } - if (td->td_dbgksi.ksi_signo == 0) - sigqueue_add(&td->td_sigqueue, sig, - NULL); - } - - /* + /* + * Keep looking if the debugger discarded the signal + * or replaced it with a masked signal. + * * If the traced bit got turned off, go back up * to the top to rescan signals. This ensures * that p_sig* and p_sigact are consistent. */ - if ((p->p_flag & P_TRACED) == 0) + if (sig == 0 || (p->p_flag & P_TRACED) == 0) continue; } Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/kern_thr.c Mon Feb 20 15:53:16 2017 (r313992) @@ -356,7 +356,7 @@ kern_thr_exit(struct thread *td) p->p_pendingexits++; td->td_dbgflags |= TDB_EXIT; if (p->p_ptevents & PTRACE_LWP) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); PROC_UNLOCK(p); tidhash_remove(td); PROC_LOCK(p); Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/subr_syscall.c Mon Feb 20 15:53:16 2017 (r313992) @@ -88,7 +88,7 @@ syscallenter(struct thread *td, struct s td->td_dbg_sc_code = sa->code; td->td_dbg_sc_narg = sa->narg; if (p->p_ptevents & PTRACE_SCE) - ptracestop((td), SIGTRAP); + ptracestop((td), SIGTRAP, NULL); PROC_UNLOCK(p); } if (td->td_dbgflags & TDB_USERWR) { @@ -222,7 +222,7 @@ syscallret(struct thread *td, int error, if (traced && ((td->td_dbgflags & (TDB_FORK | TDB_EXEC)) != 0 || (p->p_ptevents & PTRACE_SCX) != 0)) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK); PROC_UNLOCK(p); } @@ -259,7 +259,7 @@ again: if (td->td_dbgflags & TDB_VFORK) { PROC_LOCK(p); if (p->p_ptevents & PTRACE_VFORK) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); td->td_dbgflags &= ~TDB_VFORK; PROC_UNLOCK(p); } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/sys_process.c Mon Feb 20 15:53:16 2017 (r313992) @@ -1125,6 +1125,16 @@ kern_ptrace(struct thread *td, int req, td2->td_dbgflags &= ~TDB_XSIG; td2->td_xsig = data; + /* + * P_WKILLED is insurance that a PT_KILL/SIGKILL always + * works immediately, even if another thread is + * unsuspended first and attempts to handle a different + * signal or if the POSIX.1b style signal queue cannot + * accommodate any new signals. + */ + if (data == SIGKILL) + p->p_flag |= P_WKILLED; + if (req == PT_DETACH) { FOREACH_THREAD_IN_PROC(p, td3) td3->td_dbgflags &= ~TDB_SUSPEND; Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/sys/signalvar.h Mon Feb 20 15:53:16 2017 (r313992) @@ -237,13 +237,15 @@ typedef struct ksiginfo { #define KSI_INS 0x04 /* Directly insert ksi, not the copy */ #define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EGAIN. */ #define KSI_HEAD 0x10 /* Insert into head, not tail. */ -#define KSI_COPYMASK (KSI_TRAP|KSI_SIGQ) +#define KSI_PTRACE 0x20 /* Generated by ptrace. */ +#define KSI_COPYMASK (KSI_TRAP | KSI_SIGQ | KSI_PTRACE) #define KSI_ONQ(ksi) ((ksi)->ksi_sigq != NULL) typedef struct sigqueue { sigset_t sq_signals; /* All pending signals. */ sigset_t sq_kill; /* Legacy depth 1 queue. */ + sigset_t sq_ptrace; /* Depth 1 queue for ptrace(2). */ TAILQ_HEAD(, ksiginfo) sq_list;/* Queued signal info. */ struct proc *sq_proc; int sq_flags; @@ -370,7 +372,7 @@ void pgsigio(struct sigio **sigiop, int void pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi); int postsig(int sig); void kern_psignal(struct proc *p, int sig); -int ptracestop(struct thread *td, int sig); +int ptracestop(struct thread *td, int sig, ksiginfo_t *si); void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *retmask); struct sigacts *sigacts_alloc(void); void sigacts_copy(struct sigacts *dest, struct sigacts *src); Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Feb 20 10:51:46 2017 (r313991) +++ head/tests/sys/kern/Makefile Mon Feb 20 15:53:16 2017 (r313992) @@ -8,6 +8,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= ptrace_test +TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper PLAIN_TESTS_C+= subr_unit_test ATF_TESTS_C+= unix_seqpacket_test Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/tests/sys/kern/ptrace_test.c Mon Feb 20 15:53:16 2017 (r313992) @@ -28,6 +28,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include #include #include #include @@ -35,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1673,6 +1677,1107 @@ ATF_TC_BODY(ptrace__ptrace_vfork_follow, ATF_REQUIRE(errno == ECHILD); } +/* + * Verify that no more events are reported after PT_KILL except for the + * process exit when stopped due to a breakpoint trap. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_breakpoint); +ATF_TC_BODY(ptrace__PT_KILL_breakpoint, tc) +{ + pid_t fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + __builtin_debugtrap(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report hitting the breakpoint. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that no more events are reported after PT_KILL except for the + * process exit when stopped inside of a system call. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_system_call); +ATF_TC_BODY(ptrace__PT_KILL_system_call, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + getpid(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP and tracing system calls. */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report a system call entry for getpid(). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that no more events are reported after PT_KILL except for the + * process exit when killing a multithreaded process. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_threads); +ATF_TC_BODY(ptrace__PT_KILL_threads, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + lwpid_t main_lwp; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + simple_thread_main(); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + main_lwp = pl.pl_lwpid; + + ATF_REQUIRE(ptrace(PT_LWP_EVENTS, wpid, NULL, 1) == 0); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The first event should be for the child thread's birth. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_BORN | PL_FLAG_SCX)) == + (PL_FLAG_BORN | PL_FLAG_SCX)); + ATF_REQUIRE(pl.pl_lwpid != main_lwp); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void * +mask_usr1_thread(void *arg) +{ + pthread_barrier_t *pbarrier; + sigset_t sigmask; + + pbarrier = (pthread_barrier_t*)arg; + + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGUSR1); + CHILD_REQUIRE(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == 0); + + /* Sync up with other thread after sigmask updated. */ + pthread_barrier_wait(pbarrier); + + for (;;) + sleep(60); + + return (NULL); +} + +/* + * Verify that the SIGKILL from PT_KILL takes priority over other signals + * and prevents spurious stops due to those other signals. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_signal); +ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc) +{ + pid_t fpid, wpid; + int status; + cpuset_t setmask; + pthread_t t; + pthread_barrier_t barrier; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + /* + * Bind to one CPU so only one thread at a time will run. This + * test expects that the first thread created (the main thread) + * will be unsuspended first and will block the second thread + * from running. + */ + CPU_ZERO(&setmask); + CPU_SET(0, &setmask); + cpusetid_t setid; + CHILD_REQUIRE(cpuset(&setid) == 0); + CHILD_REQUIRE(cpuset_setaffinity(CPU_LEVEL_CPUSET, + CPU_WHICH_CPUSET, setid, sizeof(setmask), &setmask) == 0); + + CHILD_REQUIRE(pthread_barrier_init(&barrier, NULL, 2) == 0); + + CHILD_REQUIRE(pthread_create(&t, NULL, mask_usr1_thread, + (void*)&barrier) == 0); + + sigset_t sigmask; + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGUSR2); + CHILD_REQUIRE(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == 0); + + /* Sync up with other thread after sigmask updated. */ + pthread_barrier_wait(&barrier); + + trace_me(); + + for (;;) + sleep(60); + + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* Send a signal that only the second thread can handle. */ + ATF_REQUIRE(kill(fpid, SIGUSR2) == 0); + + /* The second wait() should report the SIGUSR2. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGUSR2); + + /* Send a signal that only the first thread can handle. */ + ATF_REQUIRE(kill(fpid, SIGUSR1) == 0); + + /* Replace the SIGUSR2 with a kill. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL (not the SIGUSR signal). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that the SIGKILL from PT_KILL takes priority over other stop events + * and prevents spurious stops caused by those events. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_stop); +ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) +{ + pid_t fpid, wpid; + int status, i; + cpuset_t setmask; + pthread_t t; + pthread_barrier_t barrier; + lwpid_t main_lwp; + struct ptrace_lwpinfo pl; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + + /* + * Bind to one CPU so only one thread at a time will run. This + * test expects that the first thread created (the main thread) + * will be unsuspended first and will block the second thread + * from running. + */ + CPU_ZERO(&setmask); + CPU_SET(0, &setmask); + cpusetid_t setid; + CHILD_REQUIRE(cpuset(&setid) == 0); + CHILD_REQUIRE(cpuset_setaffinity(CPU_LEVEL_CPUSET, + CPU_WHICH_CPUSET, setid, sizeof(setmask), &setmask) == 0); + + CHILD_REQUIRE(pthread_barrier_init(&barrier, NULL, 2) == 0); + + CHILD_REQUIRE(pthread_create(&t, NULL, mask_usr1_thread, + (void*)&barrier) == 0); + + sigset_t sigmask; + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGUSR2); + CHILD_REQUIRE(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == 0); + + /* Sync up with other thread after sigmask updated. */ + pthread_barrier_wait(&barrier); + + /* Sync up with the test before doing the getpid(). */ + raise(SIGSTOP); + + getpid(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + main_lwp = pl.pl_lwpid; + + /* Continue the child ignoring the SIGSTOP and tracing system calls. */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* + * Continue until child is done with setup, which is indicated with + * SIGSTOP. Ignore system calls in the meantime. + */ + for (;;) { + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + if (WSTOPSIG(status) == SIGTRAP) { + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)); + } else { + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + break; + } + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + } + + /* Let both threads hit their syscall entries. */ + for (i = 0; i < 2; ++i) { + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + + /* + * Prevent the main thread from hitting its syscall exit for + * now. + */ + if (pl.pl_lwpid == main_lwp) + ATF_REQUIRE(ptrace(PT_SUSPEND, main_lwp, 0, 0) == 0); + + } + + /* Send a signal that only the second thread can handle. */ + ATF_REQUIRE(kill(fpid, SIGUSR2) == 0); + + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report the SIGUSR2. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGUSR2); + + /* Allow the main thread to try to finish its system call. */ + ATF_REQUIRE(ptrace(PT_RESUME, main_lwp, 0, 0) == 0); + + /* + * At this point, the main thread is in the middle of a system call and + * has been resumed. The second thread has taken a signal which will be + * replaced with a SIGKILL. We expect the main thread will get to run + * first. It should notice the kill request and exit accordingly and + * not stop for the system call exit event. + */ + + /* Replace the SIGUSR2 with a kill. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL (not a syscall exit). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void +sigusr1_handler(int sig) +{ + + CHILD_REQUIRE(sig == SIGUSR1); + _exit(2); +} + +/* + * Verify that even if the signal queue is full for a child process, + * a PT_KILL will kill the process. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_with_signal_full_sigqueue); +ATF_TC_BODY(ptrace__PT_KILL_with_signal_full_sigqueue, tc) +{ + pid_t fpid, wpid; + int status; + int max_pending_per_proc; + size_t len; + int i; + + ATF_REQUIRE(signal(SIGUSR1, sigusr1_handler) != SIG_ERR); + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + len = sizeof(max_pending_per_proc); + ATF_REQUIRE(sysctlbyname("kern.sigqueue.max_pending_per_proc", + &max_pending_per_proc, &len, NULL, 0) == 0); + + /* Fill the signal queue. */ + for (i = 0; i < max_pending_per_proc; ++i) + ATF_REQUIRE(kill(fpid, SIGUSR1) == 0); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that when stopped at a system call entry, a signal can be + * requested with PT_CONTINUE which will be delivered once the system + * call is complete. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_CONTINUE_with_signal_system_call_entry); +ATF_TC_BODY(ptrace__PT_CONTINUE_with_signal_system_call_entry, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int status; + + ATF_REQUIRE(signal(SIGUSR1, sigusr1_handler) != SIG_ERR); + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + getpid(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP and tracing system calls. */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report a system call entry for getpid(). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + + /* Continue the child process with a signal. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, SIGUSR1) == 0); + + for (;;) { + /* + * The last wait() should report exit 2, i.e., a normal _exit + * from the signal handler. In the meantime, catch and proceed + * past any syscall stops. + */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + if (WIFSTOPPED(status) && WSTOPSIG(status) == SIGTRAP) { + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)); + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + } else { + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 2); + break; + } + } + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void +sigusr1_counting_handler(int sig) +{ + static int counter = 0; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 20 16:13: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 9FF1CCE67B0; Mon, 20 Feb 2017 16:13:41 +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 551B210E3; Mon, 20 Feb 2017 16:13:41 +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 v1KGDeHR066612; Mon, 20 Feb 2017 16:13:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KGDe22066611; Mon, 20 Feb 2017 16:13:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702201613.v1KGDe22066611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 20 Feb 2017 16:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313993 - head/sys/amd64/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: Mon, 20 Feb 2017 16:13:41 -0000 Author: trasz Date: Mon Feb 20 16:13:40 2017 New Revision: 313993 URL: https://svnweb.freebsd.org/changeset/base/313993 Log: Reimplement linux_arch_prctl() as a wrapper around sysarch(2). This also adds support for LINUX_ARCH_SET_GS. Reviewed by: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9372 Modified: head/sys/amd64/linux/linux_machdep.c Modified: head/sys/amd64/linux/linux_machdep.c ============================================================================== --- head/sys/amd64/linux/linux_machdep.c Mon Feb 20 15:53:16 2017 (r313992) +++ head/sys/amd64/linux/linux_machdep.c Mon Feb 20 16:13:40 2017 (r313993) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include int linux_execve(struct thread *td, struct linux_execve_args *args) @@ -226,28 +227,34 @@ int linux_arch_prctl(struct thread *td, struct linux_arch_prctl_args *args) { int error; - struct pcb *pcb; + struct sysarch_args bsd_args; LINUX_CTR2(arch_prctl, "0x%x, %p", args->code, args->addr); - error = ENOTSUP; - pcb = td->td_pcb; - switch (args->code) { - case LINUX_ARCH_GET_GS: - error = copyout(&pcb->pcb_gsbase, (unsigned long *)args->addr, - sizeof(args->addr)); - break; case LINUX_ARCH_SET_GS: - if (args->addr >= VM_MAXUSER_ADDRESS) - return(EPERM); + bsd_args.op = AMD64_SET_GSBASE; + bsd_args.parms = (void *)args->addr; + error = sysarch(td, &bsd_args); + if (error == EINVAL) + error = EPERM; + break; + case LINUX_ARCH_SET_FS: + bsd_args.op = AMD64_SET_FSBASE; + bsd_args.parms = (void *)args->addr; + error = sysarch(td, &bsd_args); + if (error == EINVAL) + error = EPERM; break; case LINUX_ARCH_GET_FS: - error = copyout(&pcb->pcb_fsbase, (unsigned long *)args->addr, - sizeof(args->addr)); + bsd_args.op = AMD64_GET_FSBASE; + bsd_args.parms = (void *)args->addr; + error = sysarch(td, &bsd_args); break; - case LINUX_ARCH_SET_FS: - error = linux_set_cloned_tls(td, (void *)args->addr); + case LINUX_ARCH_GET_GS: + bsd_args.op = AMD64_GET_GSBASE; + bsd_args.parms = (void *)args->addr; + error = sysarch(td, &bsd_args); break; default: error = EINVAL; From owner-svn-src-all@freebsd.org Mon Feb 20 16:18: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 F1E4CCE687A; Mon, 20 Feb 2017 16:18:34 +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 B7CB81693; Mon, 20 Feb 2017 16:18:34 +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 v1KGIXvp066827; Mon, 20 Feb 2017 16:18:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KGIXxI066826; Mon, 20 Feb 2017 16:18:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702201618.v1KGIXxI066826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 20 Feb 2017 16:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313994 - head/sys/fs/devfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 16:18:35 -0000 Author: trasz Date: Mon Feb 20 16:18:33 2017 New Revision: 313994 URL: https://svnweb.freebsd.org/changeset/base/313994 Log: Simplify devfs_fsync() by removing it. This might also be a minor optimization, as vn_isdisk() needs to lock a global mutex. Reviewed by: imp Tested by: pho MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9628 Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Mon Feb 20 16:13:40 2017 (r313993) +++ head/sys/fs/devfs/devfs_vnops.c Mon Feb 20 16:18:33 2017 (r313994) @@ -677,32 +677,6 @@ devfs_close_f(struct file *fp, struct th } static int -devfs_fsync(struct vop_fsync_args *ap) -{ - int error; - struct bufobj *bo; - struct devfs_dirent *de; - - if (!vn_isdisk(ap->a_vp, &error)) { - bo = &ap->a_vp->v_bufobj; - de = ap->a_vp->v_data; - if (error == ENXIO && bo->bo_dirty.bv_cnt > 0) { - printf("Device %s went missing before all of the data " - "could be written to it; expect data loss.\n", - de->de_dirent->d_name); - - error = vop_stdfsync(ap); - if (bo->bo_dirty.bv_cnt != 0 || error != 0) - printf("devfs_fsync: vop_stdfsync failed."); - } - - return (0); - } - - return (vop_stdfsync(ap)); -} - -static int devfs_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; @@ -1912,7 +1886,7 @@ static struct vop_vector devfs_specops = .vop_bmap = VOP_PANIC, .vop_close = devfs_close, .vop_create = VOP_PANIC, - .vop_fsync = devfs_fsync, + .vop_fsync = vop_stdfsync, .vop_getattr = devfs_getattr, .vop_ioctl = devfs_ioctl, .vop_link = VOP_PANIC, From owner-svn-src-all@freebsd.org Mon Feb 20 17:33: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 8FAD5CE61CC; Mon, 20 Feb 2017 17:33:26 +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 5CA2875C; Mon, 20 Feb 2017 17:33: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 v1KHXPa9099052; Mon, 20 Feb 2017 17:33:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KHXPps099051; Mon, 20 Feb 2017 17:33:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702201733.v1KHXPps099051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 20 Feb 2017 17:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313995 - head/sys/compat/linprocfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 17:33:26 -0000 Author: trasz Date: Mon Feb 20 17:33:25 2017 New Revision: 313995 URL: https://svnweb.freebsd.org/changeset/base/313995 Log: Add /proc/self/mounts to linprocfs; some linux binaries need it. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Mon Feb 20 16:18:33 2017 (r313994) +++ head/sys/compat/linprocfs/linprocfs.c Mon Feb 20 17:33:25 2017 (r313995) @@ -1543,6 +1543,8 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "mem", &procfs_doprocmem, &procfs_attr, &procfs_candebug, NULL, PFS_RDWR|PFS_RAW); + pfs_create_file(dir, "mounts", &linprocfs_domtab, + NULL, NULL, NULL, PFS_RD); pfs_create_link(dir, "root", &linprocfs_doprocroot, NULL, NULL, NULL, 0); pfs_create_file(dir, "stat", &linprocfs_doprocstat, From owner-svn-src-all@freebsd.org Mon Feb 20 19:08: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 C262FCE6E3B; Mon, 20 Feb 2017 19:08:37 +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 920971D11; Mon, 20 Feb 2017 19:08: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 v1KJ8akw036717; Mon, 20 Feb 2017 19:08:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KJ8aEE036715; Mon, 20 Feb 2017 19:08:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702201908.v1KJ8aEE036715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 20 Feb 2017 19:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313996 - 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: Mon, 20 Feb 2017 19:08:37 -0000 Author: mjg Date: Mon Feb 20 19:08:36 2017 New Revision: 313996 URL: https://svnweb.freebsd.org/changeset/base/313996 Log: mtx: fix spin mutexes interaction with failed fcmpset While doing so move recursion support down to the fallback routine. 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 Mon Feb 20 17:33:25 2017 (r313995) +++ head/sys/kern/kern_mutex.c Mon Feb 20 19:08:36 2017 (r313996) @@ -696,6 +696,14 @@ _mtx_lock_spin_cookie(volatile uintptr_t lock_delay_arg_init(&lda, &mtx_spin_delay); m = mtxlock2mtx(c); + if (__predict_false(v == MTX_UNOWNED)) + v = MTX_READ_VALUE(m); + + if (__predict_false(v == tid)) { + m->mtx_recurse++; + return; + } + if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), Modified: head/sys/sys/mutex.h ============================================================================== --- head/sys/sys/mutex.h Mon Feb 20 17:33:25 2017 (r313995) +++ head/sys/sys/mutex.h Mon Feb 20 19:08:36 2017 (r313996) @@ -223,12 +223,9 @@ void thread_lock_flags_(struct thread *, uintptr_t _v = MTX_UNOWNED; \ \ spinlock_enter(); \ - if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ - if (_v == _tid) \ - (mp)->mtx_recurse++; \ - else \ - _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line));\ - } else \ + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ + _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line)); \ + else \ LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ mp, 0, 0, file, line); \ } while (0) From owner-svn-src-all@freebsd.org Mon Feb 20 19:22: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 1E5BACE65A2; Mon, 20 Feb 2017 19:22:21 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D6A5818E1; Mon, 20 Feb 2017 19:22:20 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id v1KJMG8U013570 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 20 Feb 2017 14:22:16 -0500 (EST) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id v1KJMG6h013569; Mon, 20 Feb 2017 14:22:16 -0500 (EST) (envelope-from ken) Date: Mon, 20 Feb 2017 14:22:16 -0500 From: "Kenneth D. Merry" To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r299182 - head/sys/dev/e1000 Message-ID: <20170220192216.GA12821@mithlond.kdm.org> References: <201605061541.u46FfcQo010183@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201605061541.u46FfcQo010183@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Mon, 20 Feb 2017 14:22:16 -0500 (EST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 19:22:21 -0000 On Fri, May 06, 2016 at 15:41:38 +0000, Sean Bruno wrote: > Author: sbruno > Date: Fri May 6 15:41:38 2016 > New Revision: 299182 > URL: https://svnweb.freebsd.org/changeset/base/299182 > > Log: > If ALTQ is defined in the kern conf, switch to Legacy Mode. > > PR: 208409 > Submitted by: freebsd@mcwest.org > MFC after: 2 weeks > > Modified: > head/sys/dev/e1000/if_igb.h Just for the mail archives (and hopefully for someone who is interested in fixing it), IGB_LEGACY_TX is broken. (It leads to panics.) See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213257 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212413 And some comments about it in this particular bug as well: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208409 This bit me last night on 10-stable. I have ALTQ in my kernel configuration, but I'm only using it on em(4) interfaces, not igb(4) interfaces. (I bought an em(4) NIC in mid-2015 because of this particular problem.) Some folks have been able to get around the problem by rate-limiting traffic on the igb(4) interfaces, but that is fairly kludgy. IMO, we shouldn't enable IGB_LEGACY_TX automatically when ALTQ is enabled when it can lead to crashes. There are several possible ways to fix things: 1. Actually fix IGB_LEGACY_TX so that it doesn't cause crashes. 2. If ALTQ is actually in use with igb(4), switch igb(4) into single queue mode. (Not sure how feasible that is.) 3. Come up with a way for ALTQ to generically and easily work on top of multiqueue interfaces. I'm sure other folks more well versed in the network stack will have additional ideas. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@freebsd.org Mon Feb 20 20:12: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 AE400CE6368; Mon, 20 Feb 2017 20:12:03 +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 73E8210BE; Mon, 20 Feb 2017 20:12:03 +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 v1KKC2gX062012; Mon, 20 Feb 2017 20:12:02 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KKC2ZG062011; Mon, 20 Feb 2017 20:12:02 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201702202012.v1KKC2ZG062011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 20 Feb 2017 20:12: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: r313997 - 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: Mon, 20 Feb 2017 20:12:03 -0000 Author: ken Date: Mon Feb 20 20:12:02 2017 New Revision: 313997 URL: https://svnweb.freebsd.org/changeset/base/313997 Log: MFC 313895: ------------------------------------------------------------------------ r313895 | ken | 2017-02-17 13:15:27 -0700 (Fri, 17 Feb 2017) | 9 lines Make ctl(4) build with CTL_IO_DELAY defined. sys/cam/ctl/ctl.c: In ctl_datamove(), inside CTL_IO_DELAY, add a lun variable and fill it in before trying to dereference it. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/11/sys/cam/ctl/ctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Mon Feb 20 19:08:36 2017 (r313996) +++ stable/11/sys/cam/ctl/ctl.c Mon Feb 20 20:12:02 2017 (r313997) @@ -12402,6 +12402,9 @@ ctl_datamove(union ctl_io *io) if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) { io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE; } else { + struct ctl_lun *lun; + + lun = CTL_LUN(io); if ((lun != NULL) && (lun->delay_info.datamove_delay > 0)) { From owner-svn-src-all@freebsd.org Mon Feb 20 20:16: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 E56F6CE64ED; Mon, 20 Feb 2017 20:16:12 +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 B46411313; Mon, 20 Feb 2017 20:16:12 +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 v1KKGBTN064962; Mon, 20 Feb 2017 20:16:11 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KKGBx4064961; Mon, 20 Feb 2017 20:16:11 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201702202016.v1KKGBx4064961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 20 Feb 2017 20:16: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: r313998 - 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: Mon, 20 Feb 2017 20:16:13 -0000 Author: ken Date: Mon Feb 20 20:16:11 2017 New Revision: 313998 URL: https://svnweb.freebsd.org/changeset/base/313998 Log: MFC 313895: ------------------------------------------------------------------------ r313895 | ken | 2017-02-17 13:15:27 -0700 (Fri, 17 Feb 2017) | 9 lines Make ctl(4) build with CTL_IO_DELAY defined. sys/cam/ctl/ctl.c: In ctl_datamove(), inside CTL_IO_DELAY, add a lun variable and fill it in before trying to dereference it. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Feb 20 20:12:02 2017 (r313997) +++ stable/10/sys/cam/ctl/ctl.c Mon Feb 20 20:16:11 2017 (r313998) @@ -12393,6 +12393,9 @@ ctl_datamove(union ctl_io *io) if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) { io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE; } else { + struct ctl_lun *lun; + + lun = CTL_LUN(io); if ((lun != NULL) && (lun->delay_info.datamove_delay > 0)) { From owner-svn-src-all@freebsd.org Mon Feb 20 20:37: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 70940CE6AE9; Mon, 20 Feb 2017 20:37:26 +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 2EBE11FA1; Mon, 20 Feb 2017 20:37:26 +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 v1KKbPeu073450; Mon, 20 Feb 2017 20:37:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KKbPNw073449; Mon, 20 Feb 2017 20:37:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702202037.v1KKbPNw073449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Feb 2017 20:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313999 - 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, 20 Feb 2017 20:37:26 -0000 Author: jhb Date: Mon Feb 20 20:37:25 2017 New Revision: 313999 URL: https://svnweb.freebsd.org/changeset/base/313999 Log: Consolidate statements to initialize files. Previously, the first lines of various generated files from system call tables were generated in two sections. Some of the initialization was done in BEGIN, and the rest was done when the first line was encountered. The main reason for this split before r313564 was that most of the initialization done in the second section depended on the $FreeBSD$ tag extracted from the system call table. Now that the $FreeBSD$ tag is no longer used, consolidate all of the file initialization in the BEGIN section. This change was tested by confirming that the content of generated files did not change. Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Mon Feb 20 20:16:11 2017 (r313998) +++ head/sys/kern/makesyscalls.sh Mon Feb 20 20:37:25 2017 (r313999) @@ -116,6 +116,9 @@ sed -e ' split(capenabled_string, capenabled, ","); + printf "\n/* The casts are bogus but will do for now. */\n" > sysent + printf "struct sysent %s[] = {\n",switchname > sysent + 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 @@ -125,35 +128,6 @@ sed -e ' 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 - printf "\n#ifdef %s\n\n", compat6 > syscompat6 - printf "\n#ifdef %s\n\n", compat7 > syscompat7 - printf "\n#ifdef %s\n\n", compat10 > syscompat10 - - 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 - - printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace - printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace - printf " * $%s$\n", "FreeBSD" > systrace - } - NR == 1 { - printf "\n/* The casts are bogus but will do for now. */\n" > sysent - printf "struct sysent %s[] = {\n",switchname > sysent - printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -176,10 +150,31 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg + printf "\n#ifdef %s\n\n", compat > syscompat + printf "\n#ifdef %s\n\n", compat4 > syscompat4 + printf "\n#ifdef %s\n\n", compat6 > syscompat6 + printf "\n#ifdef %s\n\n", compat7 > syscompat7 + printf "\n#ifdef %s\n\n", compat10 > syscompat10 + + 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 "const char *%s[] = {\n", namesname > 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 printf "MIASM = " > sysmk + printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace + printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace + printf " * $%s$\n", "FreeBSD" > systrace 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 printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace @@ -190,7 +185,8 @@ sed -e ' printf "static void\nsystrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systraceret printf "\tswitch (sysnum) {\n" > systraceret - + } + NR == 1 { next } NF == 0 || $1 ~ /^;/ { From owner-svn-src-all@freebsd.org Mon Feb 20 23:48: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 4CD0DCE6E07; Mon, 20 Feb 2017 23:48:52 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 011D91FED; Mon, 20 Feb 2017 23:48:51 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1KNmpGm050206; Mon, 20 Feb 2017 23:48:51 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1KNmocI050204; Mon, 20 Feb 2017 23:48:50 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201702202348.v1KNmocI050204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 20 Feb 2017 23:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314000 - in head: contrib/traceroute usr.sbin/traceroute X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 20 Feb 2017 23:48:52 -0000 Author: oshogbo Date: Mon Feb 20 23:48:50 2017 New Revision: 314000 URL: https://svnweb.freebsd.org/changeset/base/314000 Log: Capsicumize traceroute. PR: 193973 Submitted by: Mikhail Reviewed by: pjd, bapt, emaste, AllanJude Differential Revision: https://reviews.freebsd.org/D9303 Modified: head/contrib/traceroute/traceroute.c head/usr.sbin/traceroute/Makefile Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Mon Feb 20 20:37:25 2017 (r313999) +++ head/contrib/traceroute/traceroute.c Mon Feb 20 23:48:50 2017 (r314000) @@ -203,6 +203,7 @@ static const char rcsid[] = */ #include +#include #include #include #ifdef HAVE_SYS_SELECT_H @@ -226,6 +227,11 @@ static const char rcsid[] = #include +#ifdef HAVE_LIBCASPER +#include +#include +#endif + #ifdef IPSEC #include #include /* XXX */ @@ -362,6 +368,10 @@ extern int optind; extern int opterr; extern char *optarg; +#ifdef HAVE_LIBCASPER +static cap_channel_t *capdns; +#endif + /* Forwards */ double deltaT(struct timeval *, struct timeval *); void freehostinfo(struct hostinfo *); @@ -510,6 +520,13 @@ main(int argc, char **argv) int requestPort = -1; int sump = 0; int sockerrno; +#ifdef HAVE_LIBCASPER + const char *types[] = { "NAME", "ADDR" }; + int families[1]; + cap_channel_t *casper; +#endif + cap_rights_t rights; + bool cansandbox; /* Insure the socket fds won't be 0, 1 or 2 */ if (open(devnull, O_RDONLY) < 0 || @@ -538,6 +555,20 @@ main(int argc, char **argv) exit(1); } +#ifdef HAVE_LIBCASPER + casper = cap_init(); + if (casper == NULL) + errx(1, "unable to create casper process"); + capdns = cap_service_open(casper, "system.dns"); + if (capdns == NULL) + errx(1, "unable to open system.dns service"); + if (cap_dns_type_limit(capdns, types, 2) < 0) + errx(1, "unable to limit access to system.dns service"); + families[0] = AF_INET; + if (cap_dns_family_limit(capdns, families, 1) < 0) + errx(1, "unable to limit access to system.dns service"); +#endif /* HAVE_LIBCASPER */ + #ifdef IPCTL_DEFTTL { int mib[4] = { CTL_NET, PF_INET, IPPROTO_IP, IPCTL_DEFTTL }; @@ -548,10 +579,14 @@ main(int argc, char **argv) exit(1); } } -#else +#else /* !IPCTL_DEFTTL */ max_ttl = 30; #endif +#ifdef HAVE_LIBCASPER + cap_close(casper); +#endif + if (argv[0] == NULL) prog = "traceroute"; else if ((cp = strrchr(argv[0], '/')) != NULL) @@ -964,6 +999,45 @@ main(int argc, char **argv) } } + if (connect(sndsock, (struct sockaddr *)&whereto, + sizeof(whereto)) != 0) { + Fprintf(stderr, "%s: connect: %s\n", prog, strerror(errno)); + exit(1); + } + +#ifdef HAVE_LIBCASPER + cansandbox = true; +#else + if (nflag) + cansandbox = true; + else + cansandbox = false; +#endif + + /* + * Here we enter capability mode. Further down access to global + * namespaces (e.g filesystem) is restricted (see capsicum(4)). + * We must connect(2) our socket before this point. + */ + if (cansandbox && cap_enter() < 0) { + Fprintf(stderr, "%s: cap_enter: %s\n", prog, strerror(errno)); + exit(1); + } + + cap_rights_init(&rights, CAP_SEND, CAP_SETSOCKOPT); + if (cansandbox && cap_rights_limit(sndsock, &rights) < 0) { + Fprintf(stderr, "%s: cap_rights_limit sndsock: %s\n", prog, + strerror(errno)); + exit(1); + } + + cap_rights_init(&rights, CAP_RECV, CAP_EVENT); + if (cansandbox && cap_rights_limit(s, &rights) < 0) { + Fprintf(stderr, "%s: cap_rights_limit s: %s\n", prog, + strerror(errno)); + exit(1); + } + #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) if (setpolicy(sndsock, "in bypass") < 0) errx(1, "%s", ipsec_strerror()); @@ -1251,8 +1325,7 @@ send_probe(int seq, int ttl) } #endif - cc = sendto(sndsock, (char *)outip, - packlen, 0, &whereto, sizeof(whereto)); + cc = send(sndsock, (char *)outip, packlen, 0); if (cc < 0 || cc != packlen) { if (cc < 0) Fprintf(stderr, "%s: sendto: %s\n", @@ -1770,7 +1843,12 @@ inetname(struct in_addr in) else { cp = strchr(domain, '.'); if (cp == NULL) { - hp = gethostbyname(domain); +#ifdef HAVE_LIBCASPER + if (capdns != NULL) + hp = cap_gethostbyname(capdns, domain); + else +#endif + hp = gethostbyname(domain); if (hp != NULL) cp = strchr(hp->h_name, '.'); } @@ -1784,7 +1862,13 @@ inetname(struct in_addr in) } } if (!nflag && in.s_addr != INADDR_ANY) { - hp = gethostbyaddr((char *)&in, sizeof(in), AF_INET); +#ifdef HAVE_LIBCASPER + if (capdns != NULL) + hp = cap_gethostbyaddr(capdns, (char *)&in, sizeof(in), + AF_INET); + else +#endif + hp = gethostbyaddr((char *)&in, sizeof(in), AF_INET); if (hp != NULL) { if ((cp = strchr(hp->h_name, '.')) != NULL && strcmp(cp + 1, domain) == 0) @@ -1830,7 +1914,12 @@ gethostinfo(register char *hostname) return (hi); } - hp = gethostbyname(hostname); +#ifdef HAVE_LIBCASPER + if (capdns != NULL) + hp = cap_gethostbyname(capdns, hostname); + else +#endif + hp = gethostbyname(hostname); if (hp == NULL) { Fprintf(stderr, "%s: unknown host %s\n", prog, hostname); exit(1); Modified: head/usr.sbin/traceroute/Makefile ============================================================================== --- head/usr.sbin/traceroute/Makefile Mon Feb 20 20:37:25 2017 (r313999) +++ head/usr.sbin/traceroute/Makefile Mon Feb 20 23:48:50 2017 (r314000) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute .PATH: ${TRACEROUTE_DISTDIR} @@ -28,6 +30,12 @@ CFLAGS+= -DIPSEC LIBADD+= ipsec .endif +.if ${MK_CASPER} != "no" +LIBADD+= casper +LIBADD+= cap_dns +CFLAGS+=-DHAVE_LIBCASPER +.endif + CFLAGS+= -I${TRACEROUTE_DISTDIR} WARNS?= 3 From owner-svn-src-all@freebsd.org Tue Feb 21 00:03: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 7872CCE5B4A; Tue, 21 Feb 2017 00:03:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (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 17BE21505; Tue, 21 Feb 2017 00:03:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f47.google.com with SMTP id v186so94661342wmd.0; Mon, 20 Feb 2017 16:03:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=9EA9fL2/8Z0n2F7eiW0ZhUxBd++LxKkJAg1hSHsuQdg=; b=eyr7CAlF3WHJ0Q+iYQQoYZP7yRUSSt7bTJ1Wk3DVzmgg6YZ1ofT53s4nH5g2Z5ZZUz eihkYW1vYrHDXAUxQJb/leKKZfABia8aRyvLCaISMpilgXEEsMXHGGymRjEO5Wa/nvb/ GTQkac4vSM6EHJv2etvXfldqiRksyV1HrzyAKs738ICuE6Kg3Vqd/OFWNLLgAO7g50nx aLoibDdO1EGV/yT35Fu9CRG6m/tBm/7Gkrlhitt5Bx3ByQp7odaTvFVktuAKaHl8jMHn hV7uE5BUOv5dbc7wfdbwfD4L1mzeTWppao2kRP080Jej33S33dNnxznE8VUnkAjOHu9j CuyA== X-Gm-Message-State: AMke39nJtGjntR3xY/Faqlj3Np8ESyrlzu9ytTviRhrswFS9wviGJ5Z/GPEniNBYrwdCJA== X-Received: by 10.28.55.199 with SMTP id e190mr20632734wma.92.1487634031543; Mon, 20 Feb 2017 15:40:31 -0800 (PST) Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com. [209.85.128.176]) by smtp.gmail.com with ESMTPSA id m83sm15310629wmc.33.2017.02.20.15.40.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2017 15:40:31 -0800 (PST) Received: by mail-wr0-f176.google.com with SMTP id 89so68164367wrr.3; Mon, 20 Feb 2017 15:40:31 -0800 (PST) X-Received: by 10.223.145.163 with SMTP id 32mr19335882wri.198.1487634031306; Mon, 20 Feb 2017 15:40:31 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.152.82 with HTTP; Mon, 20 Feb 2017 15:40:30 -0800 (PST) In-Reply-To: <201702200343.v1K3hCk3060716@repo.freebsd.org> References: <201702200343.v1K3hCk3060716@repo.freebsd.org> From: Conrad Meyer Date: Mon, 20 Feb 2017 15:40:30 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... To: "Pedro F. Giffuni" 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: Tue, 21 Feb 2017 00:03:21 -0000 On Sun, Feb 19, 2017 at 7:43 PM, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Feb 20 03:43:12 2017 > New Revision: 313982 > URL: https://svnweb.freebsd.org/changeset/base/313982 > > Log: > sys/dev: Replace zero with NULL for pointers. > > Makes things easier to read, plus architectures may set NULL to something > different than zero. Hi Pedro, I like the change for style reasons. The comment about architectures with non-zero NULL is a little misleading, though. This change has no impact on non-zero bit pattern NULL architectures. The zero pointer value in C is NULL and NULL is the zero pointer value in C. It may have a bit pattern other than zero (i.e., printf("%p", NULL) may be non-zero and memset(&p, 0, sizeof(p)) is bogus in portable code) but assigning the logical zero value is always legitimate. After all, NULL is just a casted zero value: #define NULL ((void *)0) Maybe this is moot. I don't believe any architecture FreeBSD actually supports has non-zero bitpattern NULL, but something weird like CHERI might. Best, Conrad From owner-svn-src-all@freebsd.org Tue Feb 21 00:17: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 DE21CCE6004; Tue, 21 Feb 2017 00:17:59 +0000 (UTC) (envelope-from bdrewery@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 AD2131ABE; Tue, 21 Feb 2017 00:17:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id D71D6CAB; Tue, 21 Feb 2017 00:17:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 78F9A32037; Tue, 21 Feb 2017 00:17:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id rP9X5Bfydqec; Tue, 21 Feb 2017 00:17:39 +0000 (UTC) Subject: Re: svn commit: r313975 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 305D332025 To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, ngie@FreeBSD.org References: <201702200056.v1K0ulYr085497@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5910d260-a26f-5f99-ee80-22fb2078bda8@FreeBSD.org> Date: Mon, 20 Feb 2017 16:17:18 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201702200056.v1K0ulYr085497@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="26EcfTmwuB9HJcI8XTGjS9wSxRrAp5qQw" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 00:18:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --26EcfTmwuB9HJcI8XTGjS9wSxRrAp5qQw Content-Type: multipart/mixed; boundary="xvowfwmJs6nhxJTvbN64rLTrwLXJIr6sb"; protected-headers="v1" From: Bryan Drewery To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, ngie@FreeBSD.org Message-ID: <5910d260-a26f-5f99-ee80-22fb2078bda8@FreeBSD.org> Subject: Re: svn commit: r313975 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... References: <201702200056.v1K0ulYr085497@repo.freebsd.org> In-Reply-To: <201702200056.v1K0ulYr085497@repo.freebsd.org> --xvowfwmJs6nhxJTvbN64rLTrwLXJIr6sb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/19/2017 4:56 PM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Mon Feb 20 00:56:46 2017 > New Revision: 313975 > URL: https://svnweb.freebsd.org/changeset/base/313975 >=20 > Log: > Upgrade to OpenPAM Radula. >=20 > Added: > head/contrib/openpam/m4/ > - copied from r313968, vendor/openpam/dist/m4/ > head/contrib/openpam/misc/Makefile.am > - copied unchanged from r313968, vendor/openpam/dist/misc/Makefile= =2Eam > head/contrib/openpam/misc/Makefile.in > - copied unchanged from r313968, vendor/openpam/dist/misc/Makefile= =2Ein > head/contrib/openpam/misc/coverage.sh.in > - copied unchanged from r313968, vendor/openpam/dist/misc/coverage= =2Esh.in > head/contrib/openpam/misc/coverity.sh.in > - copied unchanged from r313968, vendor/openpam/dist/misc/coverity= =2Esh.in > head/contrib/openpam/modules/pam_return/ > - copied from r313968, vendor/openpam/dist/modules/pam_return/ > head/contrib/openpam/t/t_openpam_dispatch.c > - copied unchanged from r313968, vendor/openpam/dist/t/t_openpam_d= ispatch.c > head/contrib/openpam/t/t_pam_conv.c > - copied unchanged from r313968, vendor/openpam/dist/t/t_pam_conv.= c > head/contrib/openpam/t/t_pam_conv.h > - copied unchanged from r313968, vendor/openpam/dist/t/t_pam_conv.= h > Deleted: > head/contrib/openpam/pamgdb.in > head/contrib/openpam/t/t.h > head/contrib/openpam/t/t_file.c > head/contrib/openpam/t/t_main.c > head/lib/libpam/libpam/tests/ Did you intend to delete the tests? lib/libpam/libpam/tests/Makefile: =2Efor test in t_openpam_ctype t_openpam_readlinev t_openpam_readword I still see these in the tree and modified by this update: > head/contrib/openpam/t/Makefile.am > head/contrib/openpam/t/Makefile.in > head/contrib/openpam/t/t_openpam_ctype.c > head/contrib/openpam/t/t_openpam_readlinev.c > head/contrib/openpam/t/t_openpam_readword.c --=20 Regards, Bryan Drewery --xvowfwmJs6nhxJTvbN64rLTrwLXJIr6sb-- --26EcfTmwuB9HJcI8XTGjS9wSxRrAp5qQw 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 iQEcBAEBAgAGBQJYq4cSAAoJEDXXcbtuRpfPU2sIANgU934sStrHSb9ayRDNehmV NgWQpTWhtXXmJxt80OKPWFLdRdocKiNoQ0zTCfmAP/5TYdA66LdOh74VxZMr3qWI haVgHYtHPlpRVvY2qh18HFCNUxoLowgHm5QsGahPWR0vD3nf0KyqjnIZYJ4msLBH O4q9WI3LPeJ8lzv0Lhplx0yH7bRTa7Jin+A+SR/3q7kU8wNf9eS96YIJ8H/CISGh uQpp0pxGaFBOdo9R2kXJvuA78Zt3CM9D9Tq2Ti+yAZFZT8ovfVOcU+Z8C5ZZ/aLs gZQjjl6to8rXbkqsmysCCdVo1n9BdulIt6dp4uHsbLUgrj8Zn3YcNcfMmwxYfIg= =vaMx -----END PGP SIGNATURE----- --26EcfTmwuB9HJcI8XTGjS9wSxRrAp5qQw-- From owner-svn-src-all@freebsd.org Tue Feb 21 00:25: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 58CAFCE624E; Tue, 21 Feb 2017 00:25:26 +0000 (UTC) (envelope-from bdrewery@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 0B9181F12; Tue, 21 Feb 2017 00:25:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 348F1E47; Tue, 21 Feb 2017 00:25:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 4A76D3208E; Tue, 21 Feb 2017 00:25:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id emn0aPg7yNIX; Tue, 21 Feb 2017 00:25:05 +0000 (UTC) Subject: Re: svn commit: r313878 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6C87F32089 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702171540.v1HFeOAs074991@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Mon, 20 Feb 2017 16:24:50 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201702171540.v1HFeOAs074991@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kVEIfWq9SblPLUh7OsVUDtBiWAINK05s1" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 00:25:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kVEIfWq9SblPLUh7OsVUDtBiWAINK05s1 Content-Type: multipart/mixed; boundary="rKFqnbGm2nTr9E3MqE9oBvKT0EXpCE3ii"; protected-headers="v1" From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r313878 - head/sys/kern References: <201702171540.v1HFeOAs074991@repo.freebsd.org> In-Reply-To: <201702171540.v1HFeOAs074991@repo.freebsd.org> --rKFqnbGm2nTr9E3MqE9oBvKT0EXpCE3ii Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/17/2017 7:40 AM, Mateusz Guzik wrote: > Author: mjg > Date: Fri Feb 17 15:40:24 2017 > New Revision: 313878 > URL: https://svnweb.freebsd.org/changeset/base/313878 >=20 > Log: > mtx: get rid of file/line args from slow paths if they are unused > =20 > This denotes changes which went in by accident in r313877. I really wish people would just revert their changes and recommit them properly. The 'svn blame' on the code in r313877 will never show the commit message here (r313878). So a person would only find this explanation if they read 'svn log' on the file, which in the case of sys/kern/kern_mutex.c there are 273 commits for. Are we expected to read 'svn log' (in the future) for all changes in the hopes that a later commit happens to mention it? As someone who so often is 'svn blame'ing code to understand it better and to track regressions, commits like this that explain other commits might as well have never been done. > =20 > On most production kernels both said parameters are zeroed and have n= othing > reading them in either __mtx_lock_sleep or __mtx_unlock_sleep. Thus t= his change > stops passing them by internal consumers which this is the case. > =20 > Kernel modules use _flags variants which are not affected kbi-wise. >=20 > Modified: > head/sys/kern/kern_mutex.c >=20 > Modified: head/sys/kern/kern_mutex.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_mutex.c Fri Feb 17 15:34:40 2017 (r313877) > +++ head/sys/kern/kern_mutex.c Fri Feb 17 15:40:24 2017 (r313878) > @@ -622,7 +622,7 @@ __mtx_lock_sleep(volatile uintptr_t *c,=20 > LOCKSTAT_RECORD1(adaptive__block, m, sleep_time); > =20 > /* > - * Only record the loops spinning and not sleeping.=20 > + * Only record the loops spinning and not sleeping. > */ > if (lda.spin_cnt > sleep_cnt) > LOCKSTAT_RECORD1(adaptive__spin, m, all_time - sleep_time); >=20 --=20 Regards, Bryan Drewery --rKFqnbGm2nTr9E3MqE9oBvKT0EXpCE3ii-- --kVEIfWq9SblPLUh7OsVUDtBiWAINK05s1 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 iQEcBAEBAgAGBQJYq4jSAAoJEDXXcbtuRpfPGo8H/jz11bazy9RQvaXBS9FLsnjC +h3+UP7e0VsOY3OK5t6hCA1/7eOjrg8RunC1iULUD3Lg6GeGvWk7bSXjgJnEqMRF tToqXvyjh7X7QnyWUIJdaAEZb8XubFxdeYx4e0sQrjhLqpTuSngjh3G+T6Ou1ezR z1Fo0QHYvI+HDEAZ0/2Xi9pLZDMIMaab05vt4frnVNOocj1GFegeGIUj5zXmxeZQ gmt/Z++SAR8jFXqq3uEWkDEMsF/O5iTkB+6JNzhdNv8szC3yflQyQxrjydAsOcZH 60sL+VFRqH2T1jrtW8vGq72uiUB0B//QUsZCV3YT2oTA7qp/umcD1FL6pHR2CbU= =SLH4 -----END PGP SIGNATURE----- --kVEIfWq9SblPLUh7OsVUDtBiWAINK05s1-- From owner-svn-src-all@freebsd.org Tue Feb 21 00:32: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 2C1C8CE67AF for ; Tue, 21 Feb 2017 00:32:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm5-vm2.bullet.mail.ne1.yahoo.com (nm5-vm2.bullet.mail.ne1.yahoo.com [98.138.90.153]) (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 E9FA57BD for ; Tue, 21 Feb 2017 00:32:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487637160; bh=5OF11/NXmIVSunEUZdnToZ8ydoMECGFYfXZZVI1svKM=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=Dkc3RdY1KwPpQgrv2Dhvu3eQkZER/86jz708Gxy8mCeNCxKCGZpbQJHZxrfslgfx4ywWKE8ifM0/1yRd5sRZU2opwj8PBtckiNLnrK7le4Ddn/G8A9fiy9OEMnFEqWUq6Yxutsf6gZvxsz/OsWASUOzuHMwdeJ1HIsWJHB5pzGJjbrwHd+Ymk4z/NlIet02OmhJ5QCn4FAXRCYPkILF7P1feVelhya8jOlk3CtlJPv9sDfl6e++l/0hSXGqtjRDfkXKw8FED+LHAul7Ccgc++7CLqsYHmT17qFoSTfYQiJomx9xnqMaFLdpnNd3JKUGmDlhXH98bywOqMVzlEXC8rw== Received: from [98.138.100.117] by nm5.bullet.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 00:32:40 -0000 Received: from [98.138.226.131] by tm108.bullet.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 00:32:40 -0000 Received: from [127.0.0.1] by smtp218.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 00:32:40 -0000 X-Yahoo-Newman-Id: 204998.15825.bm@smtp218.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: JmNkBy4VM1ltnwx6kT3LTk8b4PI1dl5v2yJEc3gdQGhTm_f g7ZHCB.bq2LehrDOHny.DdLJuU6ioVuTZY6cPoiK3PRhE_Qhfp2qFD0L6_EP T9njRxJA90cBFE2i8Oug8Wrnin0cKpsAJPDUuOBenUF1OKsz0UqH1CXm8K.W zyoSeNOLYkP.4yexqim6RR0WQ4E7sBpzOKtzn0SP5MZg.1guxAENxxdccUYY zdWvevlQMCluO9kLbgW2VDVoZkbrN6W7Q3DUgUVAt28in_AUPbeuCnclE9_h V_0j.WP.wrhpKzpb2kDt7J1Cm2IrLnMSb3bRTy09_PvAC.uh9F4nH6Z4cH6Q 8QNCqJAgIkt95wKZMyzQOVjP0NnyC7URwWdx4Wnz.cA_kA2hGWzlt1VYa5tj qERAW99lSbahxBLBZjqGFHU6pKEKi7.I2u90RHsb3Jfv3wW386D2ocyS.r1U xxNzJAaxpMeE3ValcEwvkbFbHeYMjpCmZv5Lb0w.p6jK4IlfNuUTirJWk5pD l8aoQ7o4B6RzXn0eZFkkjqoha7QiM_LXlepa7E7a_.pZSiDA- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... To: cem@freebsd.org References: <201702200343.v1K3hCk3060716@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <1d213a3f-ea84-256c-e08b-e5e100ef83ba@FreeBSD.org> Date: Mon, 20 Feb 2017 19:35:20 -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: 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, 21 Feb 2017 00:32:42 -0000 Hello; Just been discussing the same issue in private as well ... On 2/20/2017 6:40 PM, Conrad Meyer wrote: > On Sun, Feb 19, 2017 at 7:43 PM, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Mon Feb 20 03:43:12 2017 >> New Revision: 313982 >> URL: https://svnweb.freebsd.org/changeset/base/313982 >> >> Log: >> sys/dev: Replace zero with NULL for pointers. >> >> Makes things easier to read, plus architectures may set NULL to something >> different than zero. > Hi Pedro, > > I like the change for style reasons. > > The comment about architectures with non-zero NULL is a little > misleading, though. This change has no impact on non-zero bit pattern > NULL architectures. The zero pointer value in C is NULL and NULL is > the zero pointer value in C. It may have a bit pattern other than > zero (i.e., printf("%p", NULL) may be non-zero and memset(&p, 0, > sizeof(p)) is bogus in portable code) but assigning the logical zero > value is always legitimate. Grrr ... yes the comment is/was misleading: I would undo it if I didn't have to revert the commit with it. Other project have SVN configured to permit changing the log message BTW. > After all, NULL is just a casted zero value: > > #define NULL ((void *)0) The compiler is pretty good at detecting when the value is a pointer though. The change has few (if any) effect on real life but coming from the days where most computer languages were somewhat stronger typed I really like to be able to distinguish between a zero valued pointer and a zero valued int. > Maybe this is moot. I don't believe any architecture FreeBSD actually > supports has non-zero bitpattern NULL, but something weird like CHERI > might. Such "weird" platforms are starting to appear: https://reviews.llvm.org/D26196 Regards, Pedro. From owner-svn-src-all@freebsd.org Tue Feb 21 00:40: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 EB1C4CE693C; Tue, 21 Feb 2017 00:40:50 +0000 (UTC) (envelope-from bdrewery@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 B6D72A24; Tue, 21 Feb 2017 00:40:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id F33AA1194; Tue, 21 Feb 2017 00:40:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 2068D320F5; Tue, 21 Feb 2017 00:40:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 5dPkfYQpW5ZZ; Tue, 21 Feb 2017 00:40:37 +0000 (UTC) Subject: Re: svn commit: r313878 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com BC960320ED To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702171540.v1HFeOAs074991@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5f23ee02-e200-5fcb-204d-fff24acfa171@FreeBSD.org> Date: Mon, 20 Feb 2017 16:40:36 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3dHeAkJpdw256mbN7WWqlpnvVsB05kKU0" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 00:40:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3dHeAkJpdw256mbN7WWqlpnvVsB05kKU0 Content-Type: multipart/mixed; boundary="F9Nm7SvxVGsOjk3mU4WfFNAl28o45lIDK"; protected-headers="v1" From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5f23ee02-e200-5fcb-204d-fff24acfa171@FreeBSD.org> Subject: Re: svn commit: r313878 - head/sys/kern References: <201702171540.v1HFeOAs074991@repo.freebsd.org> In-Reply-To: --F9Nm7SvxVGsOjk3mU4WfFNAl28o45lIDK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/20/2017 4:24 PM, Bryan Drewery wrote: > On 2/17/2017 7:40 AM, Mateusz Guzik wrote: >> Author: mjg >> Date: Fri Feb 17 15:40:24 2017 >> New Revision: 313878 >> URL: https://svnweb.freebsd.org/changeset/base/313878 >> >> Log: >> mtx: get rid of file/line args from slow paths if they are unused >> =20 >> This denotes changes which went in by accident in r313877. >=20 > I really wish people would just revert their changes and recommit them > properly. The 'svn blame' on the code in r313877 will never show the > commit message here (r313878). So a person would only find this > explanation if they read 'svn log' on the file, which in the case of > sys/kern/kern_mutex.c there are 273 commits for. Are we expected to > read 'svn log' (in the future) for all changes in the hopes that a late= r > commit happens to mention it? >=20 > As someone who so often is 'svn blame'ing code to understand it better > and to track regressions, commits like this that explain other commits > might as well have never been done. https://lists.freebsd.org/pipermail/svn-src-all/2017-February/139904.html= is a case just now that is similar here. Personally I do look in the list archives for svn-src-all for additional discussion on commits. In the case of r313982, the discussion and author's admission that the commit message wasn't quite right are documented along with the commit at least on lists.freebsd.org and our own archives. >=20 >> =20 >> On most production kernels both said parameters are zeroed and have = nothing >> reading them in either __mtx_lock_sleep or __mtx_unlock_sleep. Thus = this change >> stops passing them by internal consumers which this is the case. >> =20 >> Kernel modules use _flags variants which are not affected kbi-wise. >> >> Modified: >> head/sys/kern/kern_mutex.c >> >> Modified: head/sys/kern/kern_mutex.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/kern_mutex.c Fri Feb 17 15:34:40 2017 (r313877) >> +++ head/sys/kern/kern_mutex.c Fri Feb 17 15:40:24 2017 (r313878) >> @@ -622,7 +622,7 @@ __mtx_lock_sleep(volatile uintptr_t *c,=20 >> LOCKSTAT_RECORD1(adaptive__block, m, sleep_time); >> =20 >> /* >> - * Only record the loops spinning and not sleeping.=20 >> + * Only record the loops spinning and not sleeping. >> */ >> if (lda.spin_cnt > sleep_cnt) >> LOCKSTAT_RECORD1(adaptive__spin, m, all_time - sleep_time); >> >=20 >=20 --=20 Regards, Bryan Drewery --F9Nm7SvxVGsOjk3mU4WfFNAl28o45lIDK-- --3dHeAkJpdw256mbN7WWqlpnvVsB05kKU0 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 iQEcBAEBAgAGBQJYq4yEAAoJEDXXcbtuRpfPgf8H/0zedecPd9hVA/t/0d33iURy i3dUieRKxt57Q/kPZlC1wHb2YNRXq6yYrTVOS8DdM8P7SwqHraBgneo3SCx/yaw5 Jh+/thAEG67nVWjnzZFBjPTvV9jBjG3hFI4z+NgXkp7G7G0kIllJ6ITz2tXWylxU OEXnnEPFVg5iXNnbm6qCBowrD2rMXsBIkNyZ7B+V+59z1QBUyy3I9YFPsWoYYeip po+JTqVb07YikukNb6g5hAJiYvcNhQkDXnLOyyKWG3tmhXNM2WrXnYa+nXDkENVE 9Q8KmuMcbWCmG9PnlPZPlcN6A8X/nRDeBcXuvdIwhJnWHpJVWtU8nj/uG/3Q2xo= =Xw6X -----END PGP SIGNATURE----- --3dHeAkJpdw256mbN7WWqlpnvVsB05kKU0-- From owner-svn-src-all@freebsd.org Tue Feb 21 00:48: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 9DD70CE6DF4 for ; Tue, 21 Feb 2017 00:48:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm2-vm1.bullet.mail.ne1.yahoo.com (nm2-vm1.bullet.mail.ne1.yahoo.com [98.138.91.33]) (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 69EFF13BE for ; Tue, 21 Feb 2017 00:48:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487637707; bh=gk9zerFdF/3UwHKpIUpSajjr63FrHy8ogjmudDxFg8I=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=aYwC1guTRBdsap4O5ftnQbPRTMFKdXfGfO1QJA+JlZb89WlnKV4LAxLs+fNZOGnjgHS667X0YkhdQbu92dvbno2quHUqfx8Nc7YexVjHRTBKi7DpUFyB72jlJlPlU8SZRAkeMtD/am6uZSnL0X8NaxbNYCw0QjJADXvHlYKX6gy0bZnEVFPnYuoXmjGTJhEvs7DGlJ0UddNhhxblJLGkvVGb99+Yj09fVzTA8FyKVvHc8MusVH6AhtG83R3uGnv7ozjN6zI1bhTdFJUaNofjZb+RAfekOE/5QzxoPagcSnGuxRnfg4+TsT8RD66cEya15hHnEtTwhG/AVnlVkTZpjw== Received: from [98.138.100.103] by nm2.bullet.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 00:41:47 -0000 Received: from [98.138.84.46] by tm102.bullet.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 00:39:47 -0000 Received: from [127.0.0.1] by smtp114.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 00:39:47 -0000 X-Yahoo-Newman-Id: 760109.17557.bm@smtp114.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FMaEOocVM1mFpNZMPbn7dilriS6B_M0lnOw45sG4b5vt6k9 ThzJEIIftancrpH6yMIZjPzvK.QszTxgY620bObMrm2qD_xf4zhd3FxKP7zQ OZKTAKAEhHzab7NMbhXtdBuyK0pXcCNln4YHscHnhAlFLhpWTiDtUQBivGIv AmLPmk8HzrHoUTvMvGsKSFCTCNH_MFvWY_RiWeqekfwLmSlVtCyE0bqq7vzP _pVtTBd._XQ24lcyNe2Tba2Ypo.FkHNHjA4bJoqLrHZ21pLDnjBc5sqLrdcA MbMKjMyvLfUvRHinV_C_9v8I3kTsAfYi2Ozl2H9iFXYOoDeLj7GWpPtmIGyi Vqbah47xo60JQj8lCibcowAiL_7_eyVnNfK8F0cdapQDwg2NYH7esG.ZqeM3 Zi2q.xbu2BKdwk3S0HC1_ND3A5eQNHJ7tM_J40FLnaFyndSzYWzkrDbQFDZp SyvB4rhtue8iRPipcPgoxJ0zWjtLFAvUJbQ0urm2wP8cR3267.pkmGW3pk1L ShGbq4LZZvS6fVMVyaU_Adhgru9WD0V7D0z.EToC1GAck X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r313878 - head/sys/kern To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702171540.v1HFeOAs074991@repo.freebsd.org> From: Pedro Giffuni Message-ID: <7da9caa5-d938-d2d0-1228-0e8897dc5632@FreeBSD.org> Date: Mon, 20 Feb 2017 19:42:28 -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: 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, 21 Feb 2017 00:48:20 -0000 FWIW, On 2/20/2017 7:24 PM, Bryan Drewery wrote: > On 2/17/2017 7:40 AM, Mateusz Guzik wrote: >> Author: mjg >> Date: Fri Feb 17 15:40:24 2017 >> New Revision: 313878 >> URL: https://svnweb.freebsd.org/changeset/base/313878 >> >> Log: >> mtx: get rid of file/line args from slow paths if they are unused >> >> This denotes changes which went in by accident in r313877. > I really wish people would just revert their changes and recommit them > properly. The 'svn blame' on the code in r313877 will never show the > commit message here (r313878). So a person would only find this > explanation if they read 'svn log' on the file, which in the case of > sys/kern/kern_mutex.c there are 273 commits for. Are we expected to > read 'svn log' (in the future) for all changes in the hopes that a later > commit happens to mention it? > > As someone who so often is 'svn blame'ing code to understand it better > and to track regressions, commits like this that explain other commits > might as well have never been done. As I mentioned in another thread, other svn configurations (ASF, for example) permit editing the log message: http://help.collab.net/index.jsp?topic=/faq/changelog.html Cheers, Pedro. From owner-svn-src-all@freebsd.org Tue Feb 21 00: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 A317FCE62DB; Tue, 21 Feb 2017 00:56:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 380F21C34; Tue, 21 Feb 2017 00:56:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id c85so95433316wmi.1; Mon, 20 Feb 2017 16:56:05 -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=30X8Rrjb9tn49VaZdlvT5CwxLb8hgBpobtFg4wGDte8=; b=sYKK9MccTv5dvLwKiysmpUr8JoDJ89TdfFOEAuoqXZ0mQv82dw+oK3useRDeWxaJh6 vUUiSk6KREOOaHt/KxPyF3ZoX895R7c376VDAsfQo/gRKPHifUSfFpS3dAgN5dKEwFOI Mp8VpCCQgD9bULuEilGmd4s4OBmXJzKYjznmWY+e+ZIarkNQKSKev2eEEU+XQlPj+yts f4bL+/v5M8Rv+z/SOx4EYRxyv6XQN+65rxjwW0R2AJ8U7Skvul5jnq/NR1BnEhYtVMqi WHU2pwx1ZXGl2DZ8OehPpX2uJDd0cGne5MmvI2BgznUnlTK0ZTHp/19V9pg84i8TvZD9 KsEg== 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=30X8Rrjb9tn49VaZdlvT5CwxLb8hgBpobtFg4wGDte8=; b=UX40kQ8lGoLS0uEsvoAJtS67hcuoCJebpf0ddORqDxkNmxIDGq5H1kxI3xeqsllIaX CmCCVmyU7b4YZue8L5ArwNG1WzyOz9+ib5UgqtDtcKYWbo7uhPFg+e1ALEPaSqGdPU+0 SsQRPwoZxLPYdaaYKUcLsmkfX6lbRFj2f/EsT8rOYhyzV/KiVrJHarKx+avqZH7XFFnT 8jPvk5OiiHsrxmg751mOfwrBfC7tmZT4fZhQaDz6dhS8ae7MjdEsi7aj3S2YjciGi2Gg AyK5vq3uuO4bxcQlARLuzOugwEEAcWBnWcGOeqCZ8MDdDIUfncs0PksV+bP3Y7vs8ZuG odww== X-Gm-Message-State: AMke39nHf/OyG3yDs3bKro+5KEDJbyHMMJJ/7MdZMDW03iNzMPjrtlRlfEFLBp8bVBDUNg== X-Received: by 10.28.47.7 with SMTP id v7mr20765598wmv.138.1487638563490; Mon, 20 Feb 2017 16:56:03 -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 w30sm26783057wrb.5.2017.02.20.16.56.02 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 20 Feb 2017 16:56:02 -0800 (PST) Date: Tue, 21 Feb 2017 01:56:00 +0100 From: Mateusz Guzik To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313878 - head/sys/kern Message-ID: <20170221005600.GE26759@dft-labs.eu> References: <201702171540.v1HFeOAs074991@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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, 21 Feb 2017 00:56:05 -0000 On Mon, Feb 20, 2017 at 04:24:50PM -0800, Bryan Drewery wrote: > On 2/17/2017 7:40 AM, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Feb 17 15:40:24 2017 > > New Revision: 313878 > > URL: https://svnweb.freebsd.org/changeset/base/313878 > > > > Log: > > mtx: get rid of file/line args from slow paths if they are unused > > > > This denotes changes which went in by accident in r313877. > > I really wish people would just revert their changes and recommit them > properly. The 'svn blame' on the code in r313877 will never show the > commit message here (r313878). So a person would only find this > explanation if they read 'svn log' on the file, which in the case of > sys/kern/kern_mutex.c there are 273 commits for. Are we expected to > read 'svn log' (in the future) for all changes in the hopes that a later > commit happens to mention it? > > As someone who so often is 'svn blame'ing code to understand it better > and to track regressions, commits like this that explain other commits > might as well have never been done. > In general I agree, but also don't think the change was worth any additional churn. It only removed 2 args when not under LOCK_DEBUG. The commit message above is only to note KBI is covered as this could be of concern for a casual reader. I would not do this if the change was doing anything non-trivial. > > > > On most production kernels both said parameters are zeroed and have nothing > > reading them in either __mtx_lock_sleep or __mtx_unlock_sleep. Thus this change > > stops passing them by internal consumers which this is the case. > > > > Kernel modules use _flags variants which are not affected kbi-wise. > > > > Modified: > > head/sys/kern/kern_mutex.c > > > > Modified: head/sys/kern/kern_mutex.c > > ============================================================================== > > --- head/sys/kern/kern_mutex.c Fri Feb 17 15:34:40 2017 (r313877) > > +++ head/sys/kern/kern_mutex.c Fri Feb 17 15:40:24 2017 (r313878) > > @@ -622,7 +622,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, > > LOCKSTAT_RECORD1(adaptive__block, m, sleep_time); > > > > /* > > - * Only record the loops spinning and not sleeping. > > + * Only record the loops spinning and not sleeping. > > */ > > if (lda.spin_cnt > sleep_cnt) > > LOCKSTAT_RECORD1(adaptive__spin, m, all_time - sleep_time); > > > > > -- > Regards, > Bryan Drewery > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Feb 21 01:11: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 88C1ECE66F3; Tue, 21 Feb 2017 01:11:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50B8112F6; Tue, 21 Feb 2017 01:11:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L1BIDQ084822; Tue, 21 Feb 2017 01:11:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L1BIEs084821; Tue, 21 Feb 2017 01:11:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201702210111.v1L1BIEs084821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Feb 2017 01:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314001 - head/usr.bin/timeout X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 01:11:19 -0000 Author: bdrewery Date: Tue Feb 21 01:11:18 2017 New Revision: 314001 URL: https://svnweb.freebsd.org/changeset/base/314001 Log: Make it more clear that -k sends SIGKILL, not the -s signal. MFC after: 1 week Modified: head/usr.bin/timeout/timeout.1 Modified: head/usr.bin/timeout/timeout.1 ============================================================================== --- head/usr.bin/timeout/timeout.1 Mon Feb 20 23:48:50 2017 (r314000) +++ head/usr.bin/timeout/timeout.1 Tue Feb 21 01:11:18 2017 (r314001) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 17, 2017 +.Dd February 20, 2017 .Dt TIMEOUT 1 .Os .Sh NAME @@ -68,7 +68,9 @@ By default, .Ar SIGTERM . is sent. .It Fl k Ar time , Fl -kill-after Ar time -Send a second kill signal if +Send a +.Ar SIGKILL +signal if .Ar command is still running after .Ar time From owner-svn-src-all@freebsd.org Tue Feb 21 01:35: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 E28FACE7871; Tue, 21 Feb 2017 01:35:15 +0000 (UTC) (envelope-from mjguzik@gmail.com) 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 76A44672; Tue, 21 Feb 2017 01:35:15 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x229.google.com with SMTP id c85so96001123wmi.1; Mon, 20 Feb 2017 17:35:15 -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=s3LSJZYbIvPD+Tuz3cHSkIg4stv7oxSaT+djl6L2r7E=; b=dCPn16Kna7UhYInibC3YdlqsLRtBlzFxCBHfGSN5016mjqPosLIPXj0io1QSh+FJDi jDRH9enkkB1Zqd/XPgzdcagjJCDe49fZUlor5ETruiMZzFm5WgCOkeb5zCkWllyM0ghy OtpS8jVe35oK6Gd/pbv8aEqtfng2KbfCy3MYuRMLMAIdIPYIQG1BewH6SdwUVvil9PIT Y7PbttAE0gy/XXLGSMcCPB3VMS6mxs/xE9Rybj1s2ZMWLNVXXqRg9Icm3YQyKUEo24LE gea94tRIa+vfQmU4an5fywJ+PVGF01F/CH0WFw53Pp2MTeZLZWhqiVPL7/FwSy5V9feA cVhA== 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=s3LSJZYbIvPD+Tuz3cHSkIg4stv7oxSaT+djl6L2r7E=; b=adi1s/QCexYv5JoK7RUYxvoy4nteEizgH+nsSxesD8W2e4JSfsUpFJZ0gf7Iw+zPBg 0TlWg4d4aGLoY9mX7Mhabfa3UctjtROx2Jttb4irrxad1Cd54lHpRjdFWLfWAeppf6Jf Jp0L3PFwZOpgVMzuq0t7jeyjUPrvEa13YnZW0q8wAASBi7OPlReq8Vuj6KCf79MpLbFm BlQR50EXz8feB5XPbNgi5YN8Xp+oBpioFmYKZ0lJ/xkICGB3LqYSacymhHeTSwGFy329 JFpZTlElNdaG4+a8N8IkaM5DvwQRiKWEOzkHiztLL8Oj/N4VrW6Y2fO8JmJrq3z2yeMQ l9Tw== X-Gm-Message-State: AMke39lrb2Egq2uuFkSjQ61boRT09SA2lkh+rtx6rAyT5zpsZhfd1fNnbRyhcAanCMLQbg== X-Received: by 10.28.61.84 with SMTP id k81mr21303173wma.27.1487640913840; Mon, 20 Feb 2017 17:35:13 -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 d29sm15622621wmi.19.2017.02.20.17.35.12 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 20 Feb 2017 17:35:12 -0800 (PST) Date: Tue, 21 Feb 2017 02:35:10 +0100 From: Mateusz Guzik To: Bruce Evans Cc: Hans Petter Selasky , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313859 - in head/sys: kern sys Message-ID: <20170221013510.GF26759@dft-labs.eu> References: <201702170645.v1H6j4l6060548@repo.freebsd.org> <2c01557a-3412-8b46-ef4d-77214566b74a@selasky.org> <20170217203028.K2144@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170217203028.K2144@besplex.bde.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, 21 Feb 2017 01:35:16 -0000 On Fri, Feb 17, 2017 at 09:15:00PM +1100, Bruce Evans wrote: > On Fri, 17 Feb 2017, Hans Petter Selasky wrote: > > >>Log: > >> Introduce SCHEDULER_STOPPED_TD for use when the thread pointer > >>was already read > >> > >> Sprinkle in few places. > >> > >>Modified: > >> head/sys/kern/kern_condvar.c > >> head/sys/kern/kern_synch.c > >> head/sys/sys/systm.h > > > >Do these checks also cover panics? Or only shutdown? > > This is just an optimization. > > I don't like it because it moves further from moving the stopped flag > back out of the thread to a global. > I only did this to make it more feasible to remove the tid argument from primitives which I may or may not end up doing, undecided yet. As for changing the conditon to testing a global, I don't think this change affects feasibilitly. It onlly requires some more churn by hand which I'm happy to do if said change is implemented. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Feb 21 02:10: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 88F3BCE766E; Tue, 21 Feb 2017 02:10:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57F9017D6; Tue, 21 Feb 2017 02:10:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L2A2MY007589; Tue, 21 Feb 2017 02:10:02 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2A2RI007588; Tue, 21 Feb 2017 02:10:02 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201702210210.v1L2A2RI007588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 21 Feb 2017 02:10: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: r314002 - stable/11/sys/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, 21 Feb 2017 02:10:03 -0000 Author: sephe Date: Tue Feb 21 02:10:02 2017 New Revision: 314002 URL: https://svnweb.freebsd.org/changeset/base/314002 Log: MFC 311475 if: Defer the if_up until the ifnet.if_ioctl is called. This ensures the interface is initialized by the interface driver before it can be used by the rest of the system. Reviewed by: jhb, karels, gnn Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8905 Modified: stable/11/sys/net/if.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Tue Feb 21 01:11:18 2017 (r314001) +++ stable/11/sys/net/if.c Tue Feb 21 02:10:02 2017 (r314002) @@ -2300,7 +2300,7 @@ static int ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) { struct ifreq *ifr; - int error = 0; + int error = 0, do_ifup = 0; int new_flags, temp_flags; size_t namelen, onamelen; size_t descrlen; @@ -2427,7 +2427,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if_down(ifp); } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { - if_up(ifp); + do_ifup = 1; } /* See if permanently promiscuous mode bit is about to flip */ if ((ifp->if_flags ^ new_flags) & IFF_PPROMISC) { @@ -2446,6 +2446,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if (ifp->if_ioctl) { (void) (*ifp->if_ioctl)(ifp, cmd, data); } + if (do_ifup) + if_up(ifp); getmicrotime(&ifp->if_lastchange); break; From owner-svn-src-all@freebsd.org Tue Feb 21 02:16: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 BCA65CE7949; Tue, 21 Feb 2017 02:16:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F1921CD3; Tue, 21 Feb 2017 02:16:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L2FxTU011580; Tue, 21 Feb 2017 02:15:59 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2FxeT011575; Tue, 21 Feb 2017 02:15:59 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201702210215.v1L2FxeT011575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 21 Feb 2017 02:15:59 +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: r314003 - in stable/11/sys/dev/hyperv: include utilities vmbus vmbus/amd64 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, 21 Feb 2017 02:16:00 -0000 Author: sephe Date: Tue Feb 21 02:15:58 2017 New Revision: 314003 URL: https://svnweb.freebsd.org/changeset/base/314003 Log: MFC 311743 hyperv: Add method to read 64bit Hyper-V specific time value. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9057 Modified: stable/11/sys/dev/hyperv/include/hyperv.h stable/11/sys/dev/hyperv/utilities/vmbus_timesync.c stable/11/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c stable/11/sys/dev/hyperv/vmbus/hyperv.c stable/11/sys/dev/hyperv/vmbus/vmbus_et.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/include/hyperv.h ============================================================================== --- stable/11/sys/dev/hyperv/include/hyperv.h Tue Feb 21 02:10:02 2017 (r314002) +++ stable/11/sys/dev/hyperv/include/hyperv.h Tue Feb 21 02:15:58 2017 (r314003) @@ -79,9 +79,17 @@ struct hyperv_guid { #define HYPERV_GUID_STRLEN 40 -int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); +typedef uint64_t (*hyperv_tc64_t)(void); -extern u_int hyperv_features; /* CPUID_HV_MSR_ */ +int hyperv_guid2str(const struct hyperv_guid *, char *, + size_t); + +/* + * hyperv_tc64 could be NULL, if there were no suitable Hyper-V + * specific timecounter. + */ +extern hyperv_tc64_t hyperv_tc64; +extern u_int hyperv_features; /* CPUID_HV_MSR_ */ #endif /* _KERNEL */ Modified: stable/11/sys/dev/hyperv/utilities/vmbus_timesync.c ============================================================================== --- stable/11/sys/dev/hyperv/utilities/vmbus_timesync.c Tue Feb 21 02:10:02 2017 (r314002) +++ stable/11/sys/dev/hyperv/utilities/vmbus_timesync.c Tue Feb 21 02:15:58 2017 (r314003) @@ -52,8 +52,7 @@ __FBSDID("$FreeBSD$"); VMBUS_ICVER_LE(VMBUS_IC_VERSION(4, 0), (sc)->ic_msgver) #define VMBUS_TIMESYNC_DORTT(sc) \ - (VMBUS_TIMESYNC_MSGVER4((sc)) &&\ - (hyperv_features & CPUID_HV_MSR_TIME_REFCNT)) + (VMBUS_TIMESYNC_MSGVER4((sc)) && hyperv_tc64 != NULL) static int vmbus_timesync_probe(device_t); static int vmbus_timesync_attach(device_t); @@ -117,7 +116,7 @@ vmbus_timesync(struct vmbus_ic_softc *sc uint64_t hv_ns, vm_ns, rtt = 0; if (VMBUS_TIMESYNC_DORTT(sc)) - rtt = rdmsr(MSR_HV_TIME_REF_COUNT) - sent_tc; + rtt = hyperv_tc64() - sent_tc; hv_ns = (hvtime - VMBUS_ICMSG_TS_BASE + rtt) * HYPERV_TIMER_NS_FACTOR; nanotime(&vm_ts); Modified: stable/11/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c ============================================================================== --- stable/11/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Tue Feb 21 02:10:02 2017 (r314002) +++ stable/11/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Tue Feb 21 02:15:58 2017 (r314003) @@ -133,8 +133,8 @@ hyperv_tsc_vdso_timehands(struct vdso_ti } #define HYPERV_TSC_TIMECOUNT(fence) \ -static u_int \ -hyperv_tsc_timecount_##fence(struct timecounter *tc) \ +static uint64_t \ +hyperv_tc64_tsc_##fence(void) \ { \ struct hyperv_reftsc *tsc_ref = hyperv_ref_tsc.tsc_ref; \ uint32_t seq; \ @@ -162,6 +162,13 @@ hyperv_tsc_timecount_##fence(struct time /* Fallback to the generic timecounter, i.e. rdmsr. */ \ return (rdmsr(MSR_HV_TIME_REF_COUNT)); \ } \ + \ +static u_int \ +hyperv_tsc_timecount_##fence(struct timecounter *tc __unused) \ +{ \ + \ + return (hyperv_tc64_tsc_##fence()); \ +} \ struct __hack HYPERV_TSC_TIMECOUNT(lfence); @@ -170,6 +177,7 @@ HYPERV_TSC_TIMECOUNT(mfence); static void hyperv_tsc_tcinit(void *dummy __unused) { + hyperv_tc64_t tc64 = NULL; uint64_t val, orig; if ((hyperv_features & @@ -182,11 +190,13 @@ hyperv_tsc_tcinit(void *dummy __unused) case CPU_VENDOR_AMD: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_mfence; + tc64 = hyperv_tc64_tsc_mfence; break; case CPU_VENDOR_INTEL: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_lfence; + tc64 = hyperv_tc64_tsc_lfence; break; default: @@ -211,6 +221,10 @@ hyperv_tsc_tcinit(void *dummy __unused) /* Register "enlightened" timecounter. */ tc_init(&hyperv_tsc_timecounter); + /* Install 64 bits timecounter method for other modules to use. */ + KASSERT(tc64 != NULL, ("tc64 is not set")); + hyperv_tc64 = tc64; + /* Add device for mmap(2). */ make_dev(&hyperv_tsc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0444, HYPERV_REFTSC_DEVNAME); Modified: stable/11/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- stable/11/sys/dev/hyperv/vmbus/hyperv.c Tue Feb 21 02:10:02 2017 (r314002) +++ stable/11/sys/dev/hyperv/vmbus/hyperv.c Tue Feb 21 02:15:58 2017 (r314003) @@ -77,6 +77,8 @@ u_int hyperv_recommends; static u_int hyperv_pm_features; static u_int hyperv_features3; +hyperv_tc64_t hyperv_tc64; + static struct timecounter hyperv_timecounter = { .tc_get_timecount = hyperv_get_timecount, .tc_poll_pps = NULL, @@ -96,6 +98,13 @@ hyperv_get_timecount(struct timecounter return rdmsr(MSR_HV_TIME_REF_COUNT); } +static uint64_t +hyperv_tc64_rdmsr(void) +{ + + return (rdmsr(MSR_HV_TIME_REF_COUNT)); +} + uint64_t hypercall_post_message(bus_addr_t msg_paddr) { @@ -232,6 +241,12 @@ hyperv_init(void *dummy __unused) if (hyperv_features & CPUID_HV_MSR_TIME_REFCNT) { /* Register Hyper-V timecounter */ tc_init(&hyperv_timecounter); + + /* + * Install 64 bits timecounter method for other modules + * to use. + */ + hyperv_tc64 = hyperv_tc64_rdmsr; } } SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, Modified: stable/11/sys/dev/hyperv/vmbus/vmbus_et.c ============================================================================== --- stable/11/sys/dev/hyperv/vmbus/vmbus_et.c Tue Feb 21 02:10:02 2017 (r314002) +++ stable/11/sys/dev/hyperv/vmbus/vmbus_et.c Tue Feb 21 02:15:58 2017 (r314003) @@ -48,13 +48,10 @@ __FBSDID("$FreeBSD$"); MSR_HV_STIMER_CFG_SINT_MASK) /* - * Two additionally required features: + * Additionally required feature: * - SynIC is needed for interrupt generation. - * - Time reference counter is needed to set ABS reference count to - * STIMER0_COUNT. */ -#define CPUID_HV_ET_MASK (CPUID_HV_MSR_TIME_REFCNT | \ - CPUID_HV_MSR_SYNIC | \ +#define CPUID_HV_ET_MASK (CPUID_HV_MSR_SYNIC | \ CPUID_HV_MSR_SYNTIMER) static void vmbus_et_identify(driver_t *, device_t); @@ -102,7 +99,7 @@ vmbus_et_start(struct eventtimer *et __u { uint64_t current; - current = rdmsr(MSR_HV_TIME_REF_COUNT); + current = hyperv_tc64(); current += hyperv_sbintime2count(first); wrmsr(MSR_HV_STIMER0_COUNT, current); @@ -131,7 +128,8 @@ vmbus_et_identify(driver_t *driver, devi { if (device_get_unit(parent) != 0 || device_find_child(parent, VMBUS_ET_NAME, -1) != NULL || - (hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK) + (hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK || + hyperv_tc64 == NULL) return; device_add_child(parent, VMBUS_ET_NAME, -1); @@ -187,9 +185,8 @@ vmbus_et_attach(device_t dev) vmbus_et.et_start = vmbus_et_start; /* - * Delay a bit to make sure that MSR_HV_TIME_REF_COUNT will - * not return 0, since writing 0 to STIMER0_COUNT will disable - * STIMER0. + * Delay a bit to make sure that hyperv_tc64 will not return 0, + * since writing 0 to STIMER0_COUNT will disable STIMER0. */ DELAY(100); smp_rendezvous(NULL, vmbus_et_config, NULL, NULL); From owner-svn-src-all@freebsd.org Tue Feb 21 02:18: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 A2C09CE7AF7; Tue, 21 Feb 2017 02:18: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 54E891F23; Tue, 21 Feb 2017 02:18: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 v1L2IjpH011761; Tue, 21 Feb 2017 02:18:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2IjUp011759; Tue, 21 Feb 2017 02:18:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210218.v1L2IjUp011759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:18: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: r314004 - in stable/10: contrib/netbsd-tests/usr.bin/sed usr.bin/sed/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: Tue, 21 Feb 2017 02:18:46 -0000 Author: ngie Date: Tue Feb 21 02:18:45 2017 New Revision: 314004 URL: https://svnweb.freebsd.org/changeset/base/314004 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 Expect :preserve_leading_ws_ia to fail -- it fails on ^/stable/10, but not on ^/stable/11 or ^/head Modified: stable/10/contrib/netbsd-tests/usr.bin/sed/t_sed.sh stable/10/usr.bin/sed/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/usr.bin/sed/t_sed.sh ============================================================================== --- stable/10/contrib/netbsd-tests/usr.bin/sed/t_sed.sh Tue Feb 21 02:15:58 2017 (r314003) +++ stable/10/contrib/netbsd-tests/usr.bin/sed/t_sed.sh Tue Feb 21 02:18:45 2017 (r314004) @@ -126,6 +126,8 @@ preserve_leading_ws_ia_head() { } preserve_leading_ws_ia_body() { + atf_expect_fail "fails on ^/stable/10" + atf_check -o inline:" 1 2 3\n4 5 6\n 7 8 9\n\n" \ -x 'echo | sed -e "/^$/i\\ 1 2 3\\ Modified: stable/10/usr.bin/sed/tests/Makefile ============================================================================== --- stable/10/usr.bin/sed/tests/Makefile Tue Feb 21 02:15:58 2017 (r314003) +++ stable/10/usr.bin/sed/tests/Makefile Tue Feb 21 02:18:45 2017 (r314004) @@ -1,5 +1,6 @@ # $FreeBSD$ +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" @@ -31,7 +32,10 @@ FILES+= regress.s5.out FILES+= regress.sg.out FILES+= regress.sh FILES+= regress.y.out +ATF_TESTS_SH_SED_sed_test+= -e 's,atf_expect_fail "PR bin/28126",,g' +FILES+= d_c2048.in SUBDIR= regress.multitest.out +.include .include From owner-svn-src-all@freebsd.org Tue Feb 21 02: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 AC087CE7B4B; Tue, 21 Feb 2017 02:19:20 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 869661055; Tue, 21 Feb 2017 02:19:20 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L2JJwa011834; Tue, 21 Feb 2017 02:19:19 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2JJto011830; Tue, 21 Feb 2017 02:19:19 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201702210219.v1L2JJto011830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 21 Feb 2017 02:19: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: r314005 - in stable/11: share/man/man4 sys/dev/alc 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, 21 Feb 2017 02:19:20 -0000 Author: sephe Date: Tue Feb 21 02:19:19 2017 New Revision: 314005 URL: https://svnweb.freebsd.org/changeset/base/314005 Log: MFC 312250 alc: Add Killer E2500 support Reviewed by: jhb, yongari Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9058 Modified: stable/11/share/man/man4/alc.4 stable/11/sys/dev/alc/if_alc.c stable/11/sys/dev/alc/if_alcreg.h stable/11/sys/dev/pci/pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/alc.4 ============================================================================== --- stable/11/share/man/man4/alc.4 Tue Feb 21 02:18:45 2017 (r314004) +++ stable/11/share/man/man4/alc.4 Tue Feb 21 02:19:19 2017 (r314005) @@ -124,6 +124,8 @@ Atheros AR8172 PCI Express Fast Ethernet Killer E2200 Gigabit Ethernet controller .It Killer E2400 Gigabit Ethernet controller +.It +Killer E2500 Gigabit Ethernet controller .El .Sh LOADER TUNABLES Tunables can be set at the Modified: stable/11/sys/dev/alc/if_alc.c ============================================================================== --- stable/11/sys/dev/alc/if_alc.c Tue Feb 21 02:18:45 2017 (r314004) +++ stable/11/sys/dev/alc/if_alc.c Tue Feb 21 02:19:19 2017 (r314005) @@ -123,6 +123,8 @@ static struct alc_ident alc_ident_table[ "Killer E2200 Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2400, 9 * 1024, "Killer E2400 Gigabit Ethernet" }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2500, 9 * 1024, + "Killer E2500 Gigabit Ethernet" }, { 0, 0, 0, NULL} }; @@ -1083,6 +1085,7 @@ alc_phy_down(struct alc_softc *sc) case DEVICEID_ATHEROS_AR8161: case DEVICEID_ATHEROS_E2200: case DEVICEID_ATHEROS_E2400: + case DEVICEID_ATHEROS_E2500: case DEVICEID_ATHEROS_AR8162: case DEVICEID_ATHEROS_AR8171: case DEVICEID_ATHEROS_AR8172: @@ -1402,6 +1405,7 @@ alc_attach(device_t dev) switch (sc->alc_ident->deviceid) { case DEVICEID_ATHEROS_E2200: case DEVICEID_ATHEROS_E2400: + case DEVICEID_ATHEROS_E2500: sc->alc_flags |= ALC_FLAG_E2X00; /* FALLTHROUGH */ case DEVICEID_ATHEROS_AR8161: @@ -1480,7 +1484,8 @@ alc_attach(device_t dev) if (alc_dma_burst[sc->alc_dma_wr_burst] > 1024) sc->alc_dma_wr_burst = 3; /* - * Force maximum payload size to 128 bytes for E2200/E2400. + * Force maximum payload size to 128 bytes for + * E2200/E2400/E2500. * Otherwise it triggers DMA write error. */ if ((sc->alc_flags & ALC_FLAG_E2X00) != 0) Modified: stable/11/sys/dev/alc/if_alcreg.h ============================================================================== --- stable/11/sys/dev/alc/if_alcreg.h Tue Feb 21 02:18:45 2017 (r314004) +++ stable/11/sys/dev/alc/if_alcreg.h Tue Feb 21 02:19:19 2017 (r314005) @@ -50,6 +50,7 @@ #define DEVICEID_ATHEROS_AR8172 0x10A0 #define DEVICEID_ATHEROS_E2200 0xE091 #define DEVICEID_ATHEROS_E2400 0xE0A1 +#define DEVICEID_ATHEROS_E2500 0xE0B1 #define ATHEROS_AR8152_B_V10 0xC0 #define ATHEROS_AR8152_B_V11 0xC1 Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Tue Feb 21 02:18:45 2017 (r314004) +++ stable/11/sys/dev/pci/pci.c Tue Feb 21 02:19:19 2017 (r314005) @@ -281,13 +281,14 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200/E2400 Ethernet controllers have a - * bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit + * Atheros AR8161/AR8162/E2200/E2400/E2500 Ethernet controllers have + * a bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit * of the command register is set. */ { 0x10911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0xE0A11969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + { 0xE0B11969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* From owner-svn-src-all@freebsd.org Tue Feb 21 02:23: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 2F070CE7EBC; Tue, 21 Feb 2017 02:23: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 EFBE4163F; Tue, 21 Feb 2017 02:23: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 v1L2NSSx015692; Tue, 21 Feb 2017 02:23:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2NS9t015691; Tue, 21 Feb 2017 02:23:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210223.v1L2NS9t015691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:23: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: r314006 - stable/10/usr.bin/bluetooth 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, 21 Feb 2017 02:23:29 -0000 Author: ngie Date: Tue Feb 21 02:23:27 2017 New Revision: 314006 URL: https://svnweb.freebsd.org/changeset/base/314006 Log: MFC r313656: Use SRCTOP to define .include with usr.bin/Makefile.inc Modified: stable/10/usr.bin/bluetooth/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bluetooth/Makefile.inc ============================================================================== --- stable/10/usr.bin/bluetooth/Makefile.inc Tue Feb 21 02:19:19 2017 (r314005) +++ stable/10/usr.bin/bluetooth/Makefile.inc Tue Feb 21 02:23:27 2017 (r314006) @@ -1,4 +1,4 @@ # $FreeBSD$ -.include "${.CURDIR}/../../Makefile.inc" +.include "${SRCTOP}/usr.bin/Makefile.inc" From owner-svn-src-all@freebsd.org Tue Feb 21 02:23: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 144C5CE7F48; Tue, 21 Feb 2017 02:23: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 D516F178E; Tue, 21 Feb 2017 02:23: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 v1L2NvkN015765; Tue, 21 Feb 2017 02:23:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2NvBg015764; Tue, 21 Feb 2017 02:23:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210223.v1L2NvBg015764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:23: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: r314007 - stable/11/usr.bin/bluetooth 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, 21 Feb 2017 02:23:59 -0000 Author: ngie Date: Tue Feb 21 02:23:57 2017 New Revision: 314007 URL: https://svnweb.freebsd.org/changeset/base/314007 Log: MFC r313656: Use SRCTOP to define .include with usr.bin/Makefile.inc Modified: stable/11/usr.bin/bluetooth/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/bluetooth/Makefile.inc ============================================================================== --- stable/11/usr.bin/bluetooth/Makefile.inc Tue Feb 21 02:23:27 2017 (r314006) +++ stable/11/usr.bin/bluetooth/Makefile.inc Tue Feb 21 02:23:57 2017 (r314007) @@ -1,4 +1,4 @@ # $FreeBSD$ -.include "${.CURDIR}/../../Makefile.inc" +.include "${SRCTOP}/usr.bin/Makefile.inc" From owner-svn-src-all@freebsd.org Tue Feb 21 02:24: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 B5800CE7FCB; Tue, 21 Feb 2017 02:24: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 84A4218FA; Tue, 21 Feb 2017 02:24: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 v1L2OVFm015860; Tue, 21 Feb 2017 02:24:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2OVEa015859; Tue, 21 Feb 2017 02:24:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210224.v1L2OVEa015859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314008 - stable/10/usr.bin/atm/sscop 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, 21 Feb 2017 02:24:32 -0000 Author: ngie Date: Tue Feb 21 02:24:31 2017 New Revision: 314008 URL: https://svnweb.freebsd.org/changeset/base/314008 Log: MFC r313653: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output Modified: stable/10/usr.bin/atm/sscop/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/atm/sscop/Makefile ============================================================================== --- stable/10/usr.bin/atm/sscop/Makefile Tue Feb 21 02:23:57 2017 (r314007) +++ stable/10/usr.bin/atm/sscop/Makefile Tue Feb 21 02:24:31 2017 (r314008) @@ -1,6 +1,6 @@ # $FreeBSD$ -CONTRIB= ${.CURDIR}/../../../contrib/ngatm/sscop +CONTRIB= ${SRCTOP}/contrib/ngatm/sscop .PATH: ${CONTRIB} From owner-svn-src-all@freebsd.org Tue Feb 21 02:24: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 CB065CE7038; Tue, 21 Feb 2017 02:24: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 977551A24; Tue, 21 Feb 2017 02:24: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 v1L2Ojse015912; Tue, 21 Feb 2017 02:24:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2Ojv4015911; Tue, 21 Feb 2017 02:24:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210224.v1L2Ojv4015911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:24: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: r314009 - stable/11/usr.bin/atm/sscop 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, 21 Feb 2017 02:24:46 -0000 Author: ngie Date: Tue Feb 21 02:24:45 2017 New Revision: 314009 URL: https://svnweb.freebsd.org/changeset/base/314009 Log: MFC r313653: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output Modified: stable/11/usr.bin/atm/sscop/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/atm/sscop/Makefile ============================================================================== --- stable/11/usr.bin/atm/sscop/Makefile Tue Feb 21 02:24:31 2017 (r314008) +++ stable/11/usr.bin/atm/sscop/Makefile Tue Feb 21 02:24:45 2017 (r314009) @@ -1,6 +1,6 @@ # $FreeBSD$ -CONTRIB= ${.CURDIR}/../../../contrib/ngatm/sscop +CONTRIB= ${SRCTOP}/contrib/ngatm/sscop .PATH: ${CONTRIB} From owner-svn-src-all@freebsd.org Tue Feb 21 02:26: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 BA7E3CE7186; Tue, 21 Feb 2017 02:26: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 6FDC21C66; Tue, 21 Feb 2017 02:26: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 v1L2QvGB016067; Tue, 21 Feb 2017 02:26:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2QvJP016066; Tue, 21 Feb 2017 02:26:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210226.v1L2QvJP016066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:26: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: r314010 - stable/11/gnu/usr.bin/gdb 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, 21 Feb 2017 02:26:58 -0000 Author: ngie Date: Tue Feb 21 02:26:57 2017 New Revision: 314010 URL: https://svnweb.freebsd.org/changeset/base/314010 Log: MFC r313650: Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directory entries This simplifies pathing in make/displayed output Modified: stable/11/gnu/usr.bin/gdb/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- stable/11/gnu/usr.bin/gdb/Makefile.inc Tue Feb 21 02:24:45 2017 (r314009) +++ stable/11/gnu/usr.bin/gdb/Makefile.inc Tue Feb 21 02:26:57 2017 (r314010) @@ -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 Tue Feb 21 02:30: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 7CEABCE7277; Tue, 21 Feb 2017 02:30: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 4786F1E08; Tue, 21 Feb 2017 02:30:29 +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 v1L2USmg016324; Tue, 21 Feb 2017 02:30:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2URaZ016312; Tue, 21 Feb 2017 02:30:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210230.v1L2URaZ016312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:30:27 +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: r314011 - in stable/11/usr.bin/svn: . svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnmucc svnrdump svnserve svnsync svnversion 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, 21 Feb 2017 02:30:29 -0000 Author: ngie Date: Tue Feb 21 02:30:26 2017 New Revision: 314011 URL: https://svnweb.freebsd.org/changeset/base/314011 Log: MFC r313679: Use SRCTOP/OBJTOP relative paths where possible; use :H manipulation in lieu of ../ elsewhere This simplifies pathing in make/displayed output Modified: stable/11/usr.bin/svn/Makefile.inc stable/11/usr.bin/svn/svn/Makefile stable/11/usr.bin/svn/svnadmin/Makefile stable/11/usr.bin/svn/svnbench/Makefile stable/11/usr.bin/svn/svndumpfilter/Makefile stable/11/usr.bin/svn/svnfsfs/Makefile stable/11/usr.bin/svn/svnlook/Makefile stable/11/usr.bin/svn/svnmucc/Makefile stable/11/usr.bin/svn/svnrdump/Makefile stable/11/usr.bin/svn/svnserve/Makefile stable/11/usr.bin/svn/svnsync/Makefile stable/11/usr.bin/svn/svnversion/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/svn/Makefile.inc ============================================================================== --- stable/11/usr.bin/svn/Makefile.inc Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/Makefile.inc Tue Feb 21 02:30:26 2017 (r314011) @@ -12,33 +12,31 @@ PACKAGE= svn .if !defined(SVNDIR) -SVNDIR= ${.CURDIR}/../../../contrib/subversion/subversion -APRU= ${.CURDIR}/../../../contrib/apr-util -APR= ${.CURDIR}/../../../contrib/apr +SVNDIR= ${SRCTOP}/contrib/subversion/subversion +APRU= ${SRCTOP}/contrib/apr-util +APR= ${SRCTOP}/contrib/apr WARNS?= 0 # definitely not warns friendly -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" -.endif +.sinclude "${.CURDIR:H:H}/Makefile.inc" -LIBAPRDIR= ${.OBJDIR}/../lib/libapr -LIBAPR_UTILDIR= ${.OBJDIR}/../lib/libapr_util -LIBSERFDIR= ${.OBJDIR}/../lib/libserf - -LIBSVN_CLIENTDIR= ${.OBJDIR}/../lib/libsvn_client -LIBSVN_DELTADIR= ${.OBJDIR}/../lib/libsvn_delta -LIBSVN_DIFFDIR= ${.OBJDIR}/../lib/libsvn_diff -LIBSVN_FSDIR= ${.OBJDIR}/../lib/libsvn_fs -LIBSVN_FS_FSDIR= ${.OBJDIR}/../lib/libsvn_fs_fs -LIBSVN_FS_UTILDIR= ${.OBJDIR}/../lib/libsvn_fs_util -LIBSVN_FS_XDIR= ${.OBJDIR}/../lib/libsvn_fs_x -LIBSVN_RADIR= ${.OBJDIR}/../lib/libsvn_ra -LIBSVN_RA_LOCALDIR= ${.OBJDIR}/../lib/libsvn_ra_local -LIBSVN_RA_SVNDIR= ${.OBJDIR}/../lib/libsvn_ra_svn -LIBSVN_RA_SERFDIR= ${.OBJDIR}/../lib/libsvn_ra_serf -LIBSVN_REPOSDIR= ${.OBJDIR}/../lib/libsvn_repos -LIBSVN_SUBRDIR= ${.OBJDIR}/../lib/libsvn_subr -LIBSVN_WCDIR= ${.OBJDIR}/../lib/libsvn_wc +LIBAPRDIR= ${.OBJDIR:H}/lib/libapr +LIBAPR_UTILDIR= ${.OBJDIR:H}/lib/libapr_util +LIBSERFDIR= ${.OBJDIR:H}/lib/libserf + +LIBSVN_CLIENTDIR= ${.OBJDIR:H}/lib/libsvn_client +LIBSVN_DELTADIR= ${.OBJDIR:H}/lib/libsvn_delta +LIBSVN_DIFFDIR= ${.OBJDIR:H}/lib/libsvn_diff +LIBSVN_FSDIR= ${.OBJDIR:H}/lib/libsvn_fs +LIBSVN_FS_FSDIR= ${.OBJDIR:H}/lib/libsvn_fs_fs +LIBSVN_FS_UTILDIR= ${.OBJDIR:H}/lib/libsvn_fs_util +LIBSVN_FS_XDIR= ${.OBJDIR:H}/lib/libsvn_fs_x +LIBSVN_RADIR= ${.OBJDIR:H}/lib/libsvn_ra +LIBSVN_RA_LOCALDIR= ${.OBJDIR:H}/lib/libsvn_ra_local +LIBSVN_RA_SVNDIR= ${.OBJDIR:H}/lib/libsvn_ra_svn +LIBSVN_RA_SERFDIR= ${.OBJDIR:H}/lib/libsvn_ra_serf +LIBSVN_REPOSDIR= ${.OBJDIR:H}/lib/libsvn_repos +LIBSVN_SUBRDIR= ${.OBJDIR:H}/lib/libsvn_subr +LIBSVN_WCDIR= ${.OBJDIR:H}/lib/libsvn_wc LIBAPR= ${LIBAPRDIR}/libapr.a LIBAPR_UTIL= ${LIBAPR_UTILDIR}/libapr-util.a Modified: stable/11/usr.bin/svn/svn/Makefile ============================================================================== --- stable/11/usr.bin/svn/svn/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svn/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svn @@ -17,11 +17,11 @@ SRCS= add-cmd.c auth-cmd.c blame-cmd.c c resolved-cmd.c revert-cmd.c status-cmd.c similarity.c status.c \ svn.c switch-cmd.c unlock-cmd.c update-cmd.c upgrade-cmd.c util.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnadmin/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnadmin/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnadmin/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnadmin @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}admin SRCS= svnadmin.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnbench/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnbench/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnbench/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnbench @@ -11,11 +11,11 @@ PROG= svn${SVNLITE}bench SRCS= help-cmd.c notify.c null-blame-cmd.c null-export-cmd.c \ null-info-cmd.c null-list-cmd.c null-log-cmd.c svnbench.c util.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svndumpfilter/Makefile ============================================================================== --- stable/11/usr.bin/svn/svndumpfilter/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svndumpfilter/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svndumpfilter @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}dumpfilter SRCS= svndumpfilter.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnfsfs/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnfsfs/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnfsfs/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnfsfs @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}fsfs SRCS= dump-index-cmd.c load-index-cmd.c stats-cmd.c svnfsfs.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnlook/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnlook/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnlook/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnlook @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}look SRCS= svnlook.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnmucc/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnmucc/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnmucc/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnmucc @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}mucc SRCS= svnmucc.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnrdump/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnrdump/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnrdump/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnrdump @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}rdump SRCS= dump_editor.c load_editor.c svnrdump.c util.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnserve/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnserve/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnserve/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnserve @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}serve SRCS= cyrus_auth.c log-escape.c logger.c serve.c svnserve.c winservice.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnsync/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnsync/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnsync/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnsync @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}sync SRCS= svnsync.c sync.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/11/usr.bin/svn/svnversion/Makefile ============================================================================== --- stable/11/usr.bin/svn/svnversion/Makefile Tue Feb 21 02:26:57 2017 (r314010) +++ stable/11/usr.bin/svn/svnversion/Makefile Tue Feb 21 02:30:26 2017 (r314011) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnversion @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}version SRCS= svnversion.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include From owner-svn-src-all@freebsd.org Tue Feb 21 02:33: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 3EE32CE746E; Tue, 21 Feb 2017 02:33: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 0DFD535C; Tue, 21 Feb 2017 02:33:29 +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 v1L2XTRH020377; Tue, 21 Feb 2017 02:33:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2XTNt020376; Tue, 21 Feb 2017 02:33:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210233.v1L2XTNt020376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:33: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: r314012 - stable/11/usr.bin/awk 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, 21 Feb 2017 02:33:30 -0000 Author: ngie Date: Tue Feb 21 02:33:28 2017 New Revision: 314012 URL: https://svnweb.freebsd.org/changeset/base/314012 Log: MFC r313654: 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. Modified: stable/11/usr.bin/awk/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/awk/Makefile ============================================================================== --- stable/11/usr.bin/awk/Makefile Tue Feb 21 02:30:26 2017 (r314011) +++ stable/11/usr.bin/awk/Makefile Tue Feb 21 02:33:28 2017 (r314012) @@ -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 Tue Feb 21 02:33: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 57968CE74E2; Tue, 21 Feb 2017 02:33:44 +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 224AC65D; Tue, 21 Feb 2017 02:33:44 +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 v1L2XhkZ020451; Tue, 21 Feb 2017 02:33:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2Xgko020439; Tue, 21 Feb 2017 02:33:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210233.v1L2Xgko020439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314013 - in stable/10/usr.bin/svn: . svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnmucc svnrdump svnserve svnsync svnversion 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, 21 Feb 2017 02:33:44 -0000 Author: ngie Date: Tue Feb 21 02:33:41 2017 New Revision: 314013 URL: https://svnweb.freebsd.org/changeset/base/314013 Log: MFC r313679: Use SRCTOP/OBJTOP relative paths where possible; use :H manipulation in lieu of ../ elsewhere This simplifies pathing in make/displayed output Modified: stable/10/usr.bin/svn/Makefile.inc stable/10/usr.bin/svn/svn/Makefile stable/10/usr.bin/svn/svnadmin/Makefile stable/10/usr.bin/svn/svnbench/Makefile stable/10/usr.bin/svn/svndumpfilter/Makefile stable/10/usr.bin/svn/svnfsfs/Makefile stable/10/usr.bin/svn/svnlook/Makefile stable/10/usr.bin/svn/svnmucc/Makefile stable/10/usr.bin/svn/svnrdump/Makefile stable/10/usr.bin/svn/svnserve/Makefile stable/10/usr.bin/svn/svnsync/Makefile stable/10/usr.bin/svn/svnversion/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/svn/Makefile.inc ============================================================================== --- stable/10/usr.bin/svn/Makefile.inc Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/Makefile.inc Tue Feb 21 02:33:41 2017 (r314013) @@ -10,35 +10,33 @@ SVNLITE?= lite .if !defined(SVNDIR) -SVNDIR= ${.CURDIR}/../../../contrib/subversion/subversion -APRU= ${.CURDIR}/../../../contrib/apr-util -APR= ${.CURDIR}/../../../contrib/apr +SVNDIR= ${SRCTOP}/contrib/subversion/subversion +APRU= ${SRCTOP}/contrib/apr-util +APR= ${SRCTOP}/contrib/apr SQLITE= ${.CURDIR}/../../../contrib/sqlite3 WARNS?= 0 # definitely not warns friendly -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" -.endif +.sinclude "${.CURDIR:H:H}/Makefile.inc" -LIBAPRDIR= ${.OBJDIR}/../lib/libapr -LIBAPR_UTILDIR= ${.OBJDIR}/../lib/libapr_util -LIBSQLITEDIR= ${.OBJDIR}/../lib/libsqlite3 -LIBSERFDIR= ${.OBJDIR}/../lib/libserf - -LIBSVN_CLIENTDIR= ${.OBJDIR}/../lib/libsvn_client -LIBSVN_DELTADIR= ${.OBJDIR}/../lib/libsvn_delta -LIBSVN_DIFFDIR= ${.OBJDIR}/../lib/libsvn_diff -LIBSVN_FSDIR= ${.OBJDIR}/../lib/libsvn_fs -LIBSVN_FS_FSDIR= ${.OBJDIR}/../lib/libsvn_fs_fs -LIBSVN_FS_UTILDIR= ${.OBJDIR}/../lib/libsvn_fs_util -LIBSVN_FS_XDIR= ${.OBJDIR}/../lib/libsvn_fs_x -LIBSVN_RADIR= ${.OBJDIR}/../lib/libsvn_ra -LIBSVN_RA_LOCALDIR= ${.OBJDIR}/../lib/libsvn_ra_local -LIBSVN_RA_SVNDIR= ${.OBJDIR}/../lib/libsvn_ra_svn -LIBSVN_RA_SERFDIR= ${.OBJDIR}/../lib/libsvn_ra_serf -LIBSVN_REPOSDIR= ${.OBJDIR}/../lib/libsvn_repos -LIBSVN_SUBRDIR= ${.OBJDIR}/../lib/libsvn_subr -LIBSVN_WCDIR= ${.OBJDIR}/../lib/libsvn_wc +LIBAPRDIR= ${.OBJDIR:H}/lib/libapr +LIBAPR_UTILDIR= ${.OBJDIR:H}/lib/libapr_util +LIBSQLITEDIR= ${.OBJDIR:H}/lib/libsqlite3 +LIBSERFDIR= ${.OBJDIR:H}/lib/libserf + +LIBSVN_CLIENTDIR= ${.OBJDIR:H}/lib/libsvn_client +LIBSVN_DELTADIR= ${.OBJDIR:H}/lib/libsvn_delta +LIBSVN_DIFFDIR= ${.OBJDIR:H}/lib/libsvn_diff +LIBSVN_FSDIR= ${.OBJDIR:H}/lib/libsvn_fs +LIBSVN_FS_FSDIR= ${.OBJDIR:H}/lib/libsvn_fs_fs +LIBSVN_FS_UTILDIR= ${.OBJDIR:H}/lib/libsvn_fs_util +LIBSVN_FS_XDIR= ${.OBJDIR:H}/lib/libsvn_fs_x +LIBSVN_RADIR= ${.OBJDIR:H}/lib/libsvn_ra +LIBSVN_RA_LOCALDIR= ${.OBJDIR:H}/lib/libsvn_ra_local +LIBSVN_RA_SVNDIR= ${.OBJDIR:H}/lib/libsvn_ra_svn +LIBSVN_RA_SERFDIR= ${.OBJDIR:H}/lib/libsvn_ra_serf +LIBSVN_REPOSDIR= ${.OBJDIR:H}/lib/libsvn_repos +LIBSVN_SUBRDIR= ${.OBJDIR:H}/lib/libsvn_subr +LIBSVN_WCDIR= ${.OBJDIR:H}/lib/libsvn_wc LIBAPR= ${LIBAPRDIR}/libapr.a LIBAPR_UTIL= ${LIBAPR_UTILDIR}/libapr-util.a Modified: stable/10/usr.bin/svn/svn/Makefile ============================================================================== --- stable/10/usr.bin/svn/svn/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svn/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svn @@ -19,11 +19,11 @@ SRCS= add-cmd.c auth-cmd.c blame-cmd.c c resolved-cmd.c revert-cmd.c status-cmd.c similarity.c status.c \ svn.c switch-cmd.c unlock-cmd.c update-cmd.c upgrade-cmd.c util.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnadmin/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnadmin/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnadmin/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnadmin @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}admin SRCS= svnadmin.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnbench/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnbench/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnbench/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnbench @@ -11,11 +11,11 @@ PROG= svn${SVNLITE}bench SRCS= help-cmd.c notify.c null-blame-cmd.c null-export-cmd.c \ null-info-cmd.c null-list-cmd.c null-log-cmd.c svnbench.c util.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svndumpfilter/Makefile ============================================================================== --- stable/10/usr.bin/svn/svndumpfilter/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svndumpfilter/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svndumpfilter @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}dumpfilter SRCS= svndumpfilter.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnfsfs/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnfsfs/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnfsfs/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnfsfs @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}fsfs SRCS= dump-index-cmd.c load-index-cmd.c stats-cmd.c svnfsfs.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnlook/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnlook/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnlook/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnlook @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}look SRCS= svnlook.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnmucc/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnmucc/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnmucc/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnmucc @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}mucc SRCS= svnmucc.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnrdump/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnrdump/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnrdump/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnrdump @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}rdump SRCS= dump_editor.c load_editor.c svnrdump.c util.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnserve/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnserve/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnserve/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnserve @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}serve SRCS= cyrus_auth.c log-escape.c logger.c serve.c svnserve.c winservice.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnsync/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnsync/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnsync/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnsync @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}sync SRCS= svnsync.c sync.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include Modified: stable/10/usr.bin/svn/svnversion/Makefile ============================================================================== --- stable/10/usr.bin/svn/svnversion/Makefile Tue Feb 21 02:33:28 2017 (r314012) +++ stable/10/usr.bin/svn/svnversion/Makefile Tue Feb 21 02:33:41 2017 (r314013) @@ -2,7 +2,7 @@ MAN= -.include "${.CURDIR}/../Makefile.inc" +.include "${.CURDIR:H}/Makefile.inc" .PATH: ${SVNDIR}/svnversion @@ -10,11 +10,11 @@ PROG= svn${SVNLITE}version SRCS= svnversion.c -CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR}/.. \ - -I${.CURDIR}/../lib/libapr \ +CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \ + -I${.CURDIR:H}/lib/libapr \ -I${APR}/include/arch/unix \ -I${APR}/include \ - -I${.CURDIR}/../lib/libapr_util \ + -I${.CURDIR:H}/lib/libapr_util \ -I${APRU}/include/private \ -I${APRU}/include From owner-svn-src-all@freebsd.org Tue Feb 21 02: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 14DE5CE759F; Tue, 21 Feb 2017 02: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 D588F85A; Tue, 21 Feb 2017 02: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 v1L2YxVa020600; Tue, 21 Feb 2017 02:34:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2YxQY020599; Tue, 21 Feb 2017 02:34:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210234.v1L2YxQY020599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:34: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: r314014 - stable/10/usr.bin/awk 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, 21 Feb 2017 02:35:01 -0000 Author: ngie Date: Tue Feb 21 02:34:59 2017 New Revision: 314014 URL: https://svnweb.freebsd.org/changeset/base/314014 Log: MFC r313654: 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. Modified: stable/10/usr.bin/awk/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/awk/Makefile ============================================================================== --- stable/10/usr.bin/awk/Makefile Tue Feb 21 02:33:41 2017 (r314013) +++ stable/10/usr.bin/awk/Makefile Tue Feb 21 02:34:59 2017 (r314014) @@ -1,6 +1,6 @@ # $FreeBSD$ -AWKSRC= ${.CURDIR}/../../contrib/one-true-awk +AWKSRC= ${SRCTOP}/contrib/one-true-awk .PATH: ${AWKSRC} PROG= awk @@ -25,6 +25,6 @@ proctab.c: maketab ./maketab > proctab.c build-tools: maketab -maketab: ytab.h ${AWKSRC}/maketab.c +maketab: ytab.h maketab.c .include From owner-svn-src-all@freebsd.org Tue Feb 21 02: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 34829CE75FB; Tue, 21 Feb 2017 02:35: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 03E8598C; Tue, 21 Feb 2017 02:35: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 v1L2ZHJt020668; Tue, 21 Feb 2017 02:35:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2ZH5O020667; Tue, 21 Feb 2017 02:35:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210235.v1L2ZH5O020667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:35: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: r314015 - stable/11/usr.bin/bsdcat 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, 21 Feb 2017 02:35:18 -0000 Author: ngie Date: Tue Feb 21 02:35:16 2017 New Revision: 314015 URL: https://svnweb.freebsd.org/changeset/base/314015 Log: MFC r313652: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output Modified: stable/11/usr.bin/bsdcat/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/bsdcat/Makefile ============================================================================== --- stable/11/usr.bin/bsdcat/Makefile Tue Feb 21 02:34:59 2017 (r314014) +++ stable/11/usr.bin/bsdcat/Makefile Tue Feb 21 02:35:16 2017 (r314015) @@ -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 Tue Feb 21 02:38: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 E23B4CE784E; Tue, 21 Feb 2017 02:38: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 B1639DCD; Tue, 21 Feb 2017 02:38: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 v1L2cECr020962; Tue, 21 Feb 2017 02:38:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L2cEq4020961; Tue, 21 Feb 2017 02:38:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210238.v1L2cEq4020961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 02:38: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: r314016 - stable/10/usr.bin/bsdcat 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, 21 Feb 2017 02:38:16 -0000 Author: ngie Date: Tue Feb 21 02:38:14 2017 New Revision: 314016 URL: https://svnweb.freebsd.org/changeset/base/314016 Log: MFC r313652: Use SRCTOP instead of .CURDIR relative paths with ".." This simplifies pathing in make/displayed output Modified: stable/10/usr.bin/bsdcat/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bsdcat/Makefile ============================================================================== --- stable/10/usr.bin/bsdcat/Makefile Tue Feb 21 02:35:16 2017 (r314015) +++ stable/10/usr.bin/bsdcat/Makefile Tue Feb 21 02:38:14 2017 (r314016) @@ -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 Tue Feb 21 03:00: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 2806BCE7147; Tue, 21 Feb 2017 03:00:35 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E75F319C7; Tue, 21 Feb 2017 03:00:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L30XdH029201; Tue, 21 Feb 2017 03:00:33 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L30X2Y029200; Tue, 21 Feb 2017 03:00:33 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201702210300.v1L30X2Y029200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 21 Feb 2017 03:00: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: r314017 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 03:00:35 -0000 Author: sephe Date: Tue Feb 21 03:00:33 2017 New Revision: 314017 URL: https://svnweb.freebsd.org/changeset/base/314017 Log: MFC 311475 if: Defer the if_up until the ifnet.if_ioctl is called. This ensures the interface is initialized by the interface driver before it can be used by the rest of the system. Reviewed by: jhb, karels, gnn Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8905 Modified: stable/10/sys/net/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Tue Feb 21 02:38:14 2017 (r314016) +++ stable/10/sys/net/if.c Tue Feb 21 03:00:33 2017 (r314017) @@ -2266,7 +2266,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, { struct ifreq *ifr; struct ifstat *ifs; - int error = 0; + int error = 0, do_ifup = 0; int new_flags, temp_flags; size_t namelen, onamelen; size_t descrlen; @@ -2394,7 +2394,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if_down(ifp); } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { - if_up(ifp); + do_ifup = 1; } /* See if permanently promiscuous mode bit is about to flip */ if ((ifp->if_flags ^ new_flags) & IFF_PPROMISC) { @@ -2413,6 +2413,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, if (ifp->if_ioctl) { (void) (*ifp->if_ioctl)(ifp, cmd, data); } + if (do_ifup) + if_up(ifp); getmicrotime(&ifp->if_lastchange); break; From owner-svn-src-all@freebsd.org Tue Feb 21 03:14: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 B6225CE78D2; Tue, 21 Feb 2017 03:14:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73BB194E; Tue, 21 Feb 2017 03:14:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L3E6qW038035; Tue, 21 Feb 2017 03:14:06 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L3E63G038030; Tue, 21 Feb 2017 03:14:06 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201702210314.v1L3E63G038030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 21 Feb 2017 03:14: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: r314018 - in stable/10/sys/dev/hyperv: include utilities vmbus vmbus/amd64 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, 21 Feb 2017 03:14:07 -0000 Author: sephe Date: Tue Feb 21 03:14:05 2017 New Revision: 314018 URL: https://svnweb.freebsd.org/changeset/base/314018 Log: MFC 311743 hyperv: Add method to read 64bit Hyper-V specific time value. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9057 Modified: stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/utilities/vmbus_timesync.c stable/10/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c stable/10/sys/dev/hyperv/vmbus/hyperv.c stable/10/sys/dev/hyperv/vmbus/vmbus_et.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/include/hyperv.h ============================================================================== --- stable/10/sys/dev/hyperv/include/hyperv.h Tue Feb 21 03:00:33 2017 (r314017) +++ stable/10/sys/dev/hyperv/include/hyperv.h Tue Feb 21 03:14:05 2017 (r314018) @@ -79,9 +79,17 @@ struct hyperv_guid { #define HYPERV_GUID_STRLEN 40 -int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); +typedef uint64_t (*hyperv_tc64_t)(void); -extern u_int hyperv_features; /* CPUID_HV_MSR_ */ +int hyperv_guid2str(const struct hyperv_guid *, char *, + size_t); + +/* + * hyperv_tc64 could be NULL, if there were no suitable Hyper-V + * specific timecounter. + */ +extern hyperv_tc64_t hyperv_tc64; +extern u_int hyperv_features; /* CPUID_HV_MSR_ */ #endif /* _KERNEL */ Modified: stable/10/sys/dev/hyperv/utilities/vmbus_timesync.c ============================================================================== --- stable/10/sys/dev/hyperv/utilities/vmbus_timesync.c Tue Feb 21 03:00:33 2017 (r314017) +++ stable/10/sys/dev/hyperv/utilities/vmbus_timesync.c Tue Feb 21 03:14:05 2017 (r314018) @@ -52,8 +52,7 @@ __FBSDID("$FreeBSD$"); VMBUS_ICVER_LE(VMBUS_IC_VERSION(4, 0), (sc)->ic_msgver) #define VMBUS_TIMESYNC_DORTT(sc) \ - (VMBUS_TIMESYNC_MSGVER4((sc)) &&\ - (hyperv_features & CPUID_HV_MSR_TIME_REFCNT)) + (VMBUS_TIMESYNC_MSGVER4((sc)) && hyperv_tc64 != NULL) static int vmbus_timesync_probe(device_t); static int vmbus_timesync_attach(device_t); @@ -117,7 +116,7 @@ vmbus_timesync(struct vmbus_ic_softc *sc uint64_t hv_ns, vm_ns, rtt = 0; if (VMBUS_TIMESYNC_DORTT(sc)) - rtt = rdmsr(MSR_HV_TIME_REF_COUNT) - sent_tc; + rtt = hyperv_tc64() - sent_tc; hv_ns = (hvtime - VMBUS_ICMSG_TS_BASE + rtt) * HYPERV_TIMER_NS_FACTOR; nanotime(&vm_ts); Modified: stable/10/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Tue Feb 21 03:00:33 2017 (r314017) +++ stable/10/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Tue Feb 21 03:14:05 2017 (r314018) @@ -118,8 +118,8 @@ hyperv_tsc_mmap(struct cdev *dev __unuse } #define HYPERV_TSC_TIMECOUNT(fence) \ -static u_int \ -hyperv_tsc_timecount_##fence(struct timecounter *tc) \ +static uint64_t \ +hyperv_tc64_tsc_##fence(void) \ { \ struct hyperv_reftsc *tsc_ref = hyperv_ref_tsc.tsc_ref; \ uint32_t seq; \ @@ -150,6 +150,13 @@ hyperv_tsc_timecount_##fence(struct time /* Fallback to the generic timecounter, i.e. rdmsr. */ \ return (rdmsr(MSR_HV_TIME_REF_COUNT)); \ } \ + \ +static u_int \ +hyperv_tsc_timecount_##fence(struct timecounter *tc __unused) \ +{ \ + \ + return (hyperv_tc64_tsc_##fence()); \ +} \ struct __hack HYPERV_TSC_TIMECOUNT(lfence); @@ -158,6 +165,7 @@ HYPERV_TSC_TIMECOUNT(mfence); static void hyperv_tsc_tcinit(void *dummy __unused) { + hyperv_tc64_t tc64 = NULL; uint64_t val, orig; if ((hyperv_features & @@ -170,11 +178,13 @@ hyperv_tsc_tcinit(void *dummy __unused) case CPU_VENDOR_AMD: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_mfence; + tc64 = hyperv_tc64_tsc_mfence; break; case CPU_VENDOR_INTEL: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_lfence; + tc64 = hyperv_tc64_tsc_lfence; break; default: @@ -199,6 +209,10 @@ hyperv_tsc_tcinit(void *dummy __unused) /* Register "enlightened" timecounter. */ tc_init(&hyperv_tsc_timecounter); + /* Install 64 bits timecounter method for other modules to use. */ + KASSERT(tc64 != NULL, ("tc64 is not set")); + hyperv_tc64 = tc64; + /* Add device for mmap(2). */ make_dev(&hyperv_tsc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0444, HYPERV_REFTSC_DEVNAME); Modified: stable/10/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/hyperv.c Tue Feb 21 03:00:33 2017 (r314017) +++ stable/10/sys/dev/hyperv/vmbus/hyperv.c Tue Feb 21 03:14:05 2017 (r314018) @@ -77,6 +77,8 @@ u_int hyperv_recommends; static u_int hyperv_pm_features; static u_int hyperv_features3; +hyperv_tc64_t hyperv_tc64; + static struct timecounter hyperv_timecounter = { .tc_get_timecount = hyperv_get_timecount, .tc_poll_pps = NULL, @@ -96,6 +98,13 @@ hyperv_get_timecount(struct timecounter return rdmsr(MSR_HV_TIME_REF_COUNT); } +static uint64_t +hyperv_tc64_rdmsr(void) +{ + + return (rdmsr(MSR_HV_TIME_REF_COUNT)); +} + uint64_t hypercall_post_message(bus_addr_t msg_paddr) { @@ -232,6 +241,12 @@ hyperv_init(void *dummy __unused) if (hyperv_features & CPUID_HV_MSR_TIME_REFCNT) { /* Register Hyper-V timecounter */ tc_init(&hyperv_timecounter); + + /* + * Install 64 bits timecounter method for other modules + * to use. + */ + hyperv_tc64 = hyperv_tc64_rdmsr; } } SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, Modified: stable/10/sys/dev/hyperv/vmbus/vmbus_et.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/vmbus_et.c Tue Feb 21 03:00:33 2017 (r314017) +++ stable/10/sys/dev/hyperv/vmbus/vmbus_et.c Tue Feb 21 03:14:05 2017 (r314018) @@ -50,13 +50,10 @@ __FBSDID("$FreeBSD$"); MSR_HV_STIMER_CFG_SINT_MASK) /* - * Two additionally required features: + * Additionally required feature: * - SynIC is needed for interrupt generation. - * - Time reference counter is needed to set ABS reference count to - * STIMER0_COUNT. */ -#define CPUID_HV_ET_MASK (CPUID_HV_MSR_TIME_REFCNT | \ - CPUID_HV_MSR_SYNIC | \ +#define CPUID_HV_ET_MASK (CPUID_HV_MSR_SYNIC | \ CPUID_HV_MSR_SYNTIMER) static void vmbus_et_identify(driver_t *, device_t); @@ -104,7 +101,7 @@ vmbus_et_start(struct eventtimer *et __u { uint64_t current; - current = rdmsr(MSR_HV_TIME_REF_COUNT); + current = hyperv_tc64(); current += hyperv_sbintime2count(first); wrmsr(MSR_HV_STIMER0_COUNT, current); @@ -133,7 +130,8 @@ vmbus_et_identify(driver_t *driver, devi { if (device_get_unit(parent) != 0 || device_find_child(parent, VMBUS_ET_NAME, -1) != NULL || - (hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK) + (hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK || + hyperv_tc64 == NULL) return; device_add_child(parent, VMBUS_ET_NAME, -1); @@ -189,9 +187,8 @@ vmbus_et_attach(device_t dev) vmbus_et.et_start = vmbus_et_start; /* - * Delay a bit to make sure that MSR_HV_TIME_REF_COUNT will - * not return 0, since writing 0 to STIMER0_COUNT will disable - * STIMER0. + * Delay a bit to make sure that hyperv_tc64 will not return 0, + * since writing 0 to STIMER0_COUNT will disable STIMER0. */ DELAY(100); smp_rendezvous(NULL, vmbus_et_config, NULL, NULL); From owner-svn-src-all@freebsd.org Tue Feb 21 03:28: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 0CDE8CE7E30; Tue, 21 Feb 2017 03:28:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB96EF6C; Tue, 21 Feb 2017 03:28:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L3RxZT042049; Tue, 21 Feb 2017 03:27:59 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L3RxUM042045; Tue, 21 Feb 2017 03:27:59 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201702210327.v1L3RxUM042045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 21 Feb 2017 03:27: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: r314019 - in stable/10: share/man/man4 sys/dev/alc sys/dev/pci 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, 21 Feb 2017 03:28:01 -0000 Author: sephe Date: Tue Feb 21 03:27:59 2017 New Revision: 314019 URL: https://svnweb.freebsd.org/changeset/base/314019 Log: MFC 312250 alc: Add Killer E2500 support Reviewed by: jhb, yongari Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9058 Modified: stable/10/share/man/man4/alc.4 stable/10/sys/dev/alc/if_alc.c stable/10/sys/dev/alc/if_alcreg.h stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/alc.4 ============================================================================== --- stable/10/share/man/man4/alc.4 Tue Feb 21 03:14:05 2017 (r314018) +++ stable/10/share/man/man4/alc.4 Tue Feb 21 03:27:59 2017 (r314019) @@ -124,6 +124,8 @@ Atheros AR8172 PCI Express Fast Ethernet Killer E2200 Gigabit Ethernet controller .It Killer E2400 Gigabit Ethernet controller +.It +Killer E2500 Gigabit Ethernet controller .El .Sh LOADER TUNABLES Tunables can be set at the Modified: stable/10/sys/dev/alc/if_alc.c ============================================================================== --- stable/10/sys/dev/alc/if_alc.c Tue Feb 21 03:14:05 2017 (r314018) +++ stable/10/sys/dev/alc/if_alc.c Tue Feb 21 03:27:59 2017 (r314019) @@ -122,6 +122,8 @@ static struct alc_ident alc_ident_table[ "Killer E2200 Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2400, 9 * 1024, "Killer E2400 Gigabit Ethernet" }, + { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2500, 9 * 1024, + "Killer E2500 Gigabit Ethernet" }, { 0, 0, 0, NULL} }; @@ -1082,6 +1084,7 @@ alc_phy_down(struct alc_softc *sc) case DEVICEID_ATHEROS_AR8161: case DEVICEID_ATHEROS_E2200: case DEVICEID_ATHEROS_E2400: + case DEVICEID_ATHEROS_E2500: case DEVICEID_ATHEROS_AR8162: case DEVICEID_ATHEROS_AR8171: case DEVICEID_ATHEROS_AR8172: @@ -1401,6 +1404,7 @@ alc_attach(device_t dev) switch (sc->alc_ident->deviceid) { case DEVICEID_ATHEROS_E2200: case DEVICEID_ATHEROS_E2400: + case DEVICEID_ATHEROS_E2500: sc->alc_flags |= ALC_FLAG_E2X00; /* FALLTHROUGH */ case DEVICEID_ATHEROS_AR8161: @@ -1479,7 +1483,8 @@ alc_attach(device_t dev) if (alc_dma_burst[sc->alc_dma_wr_burst] > 1024) sc->alc_dma_wr_burst = 3; /* - * Force maximum payload size to 128 bytes for E2200/E2400. + * Force maximum payload size to 128 bytes for + * E2200/E2400/E2500. * Otherwise it triggers DMA write error. */ if ((sc->alc_flags & ALC_FLAG_E2X00) != 0) Modified: stable/10/sys/dev/alc/if_alcreg.h ============================================================================== --- stable/10/sys/dev/alc/if_alcreg.h Tue Feb 21 03:14:05 2017 (r314018) +++ stable/10/sys/dev/alc/if_alcreg.h Tue Feb 21 03:27:59 2017 (r314019) @@ -50,6 +50,7 @@ #define DEVICEID_ATHEROS_AR8172 0x10A0 #define DEVICEID_ATHEROS_E2200 0xE091 #define DEVICEID_ATHEROS_E2400 0xE0A1 +#define DEVICEID_ATHEROS_E2500 0xE0B1 #define ATHEROS_AR8152_B_V10 0xC0 #define ATHEROS_AR8152_B_V11 0xC1 Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Tue Feb 21 03:14:05 2017 (r314018) +++ stable/10/sys/dev/pci/pci.c Tue Feb 21 03:27:59 2017 (r314019) @@ -269,13 +269,14 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200/E2400 Ethernet controllers have a - * bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit + * Atheros AR8161/AR8162/E2200/E2400/E2500 Ethernet controllers have + * a bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit * of the command register is set. */ { 0x10911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0xE0A11969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + { 0xE0B11969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* From owner-svn-src-all@freebsd.org Tue Feb 21 03:46: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 4888FCE664C; Tue, 21 Feb 2017 03:46: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 16BEF19F2; Tue, 21 Feb 2017 03:46: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 v1L3kcoq050317; Tue, 21 Feb 2017 03:46:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L3kbx9050310; Tue, 21 Feb 2017 03:46:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210346.v1L3kbx9050310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 03:46: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: r314020 - in stable/10/lib/libnetbsd: . 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: Tue, 21 Feb 2017 03:46:39 -0000 Author: ngie Date: Tue Feb 21 03:46:37 2017 New Revision: 314020 URL: https://svnweb.freebsd.org/changeset/base/314020 Log: MFC r313404: 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. Added: stable/10/lib/libnetbsd/glob.h - copied unchanged from r313404, head/lib/libnetbsd/glob.h stable/10/lib/libnetbsd/pthread.h - copied unchanged from r313404, head/lib/libnetbsd/pthread.h stable/10/lib/libnetbsd/sys/event.h - copied unchanged from r313404, head/lib/libnetbsd/sys/event.h stable/10/lib/libnetbsd/sys/types.h - copied unchanged from r313404, head/lib/libnetbsd/sys/types.h stable/10/lib/libnetbsd/sys/wait.h - copied unchanged from r313404, head/lib/libnetbsd/sys/wait.h Modified: stable/10/lib/libnetbsd/sha1.h stable/10/lib/libnetbsd/sha2.h stable/10/lib/libnetbsd/util.h Directory Properties: stable/10/ (props changed) Copied: stable/10/lib/libnetbsd/glob.h (from r313404, head/lib/libnetbsd/glob.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libnetbsd/glob.h Tue Feb 21 03:46:37 2017 (r314020, copy of r313404, head/lib/libnetbsd/glob.h) @@ -0,0 +1,39 @@ +/*- + * 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 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 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_ +#define _LIBNETBSD_GLOB_H_ + +#include_next + +#ifndef __gl_stat_t +#define __gl_stat_t struct stat +#endif + +#endif Copied: stable/10/lib/libnetbsd/pthread.h (from r313404, head/lib/libnetbsd/pthread.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libnetbsd/pthread.h Tue Feb 21 03:46:37 2017 (r314020, copy of r313404, head/lib/libnetbsd/pthread.h) @@ -0,0 +1,36 @@ +/*- + * 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 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 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_PTHREAD_H_ +#define _LIBNETBSD_PTHREAD_H_ + +#include_next +#include + +#endif Modified: stable/10/lib/libnetbsd/sha1.h ============================================================================== --- stable/10/lib/libnetbsd/sha1.h Tue Feb 21 03:27:59 2017 (r314019) +++ stable/10/lib/libnetbsd/sha1.h Tue Feb 21 03:46:37 2017 (r314020) @@ -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: stable/10/lib/libnetbsd/sha2.h ============================================================================== --- stable/10/lib/libnetbsd/sha2.h Tue Feb 21 03:27:59 2017 (r314019) +++ stable/10/lib/libnetbsd/sha2.h Tue Feb 21 03:46:37 2017 (r314020) @@ -34,6 +34,7 @@ #define _SHA2_H_ #include +#include #include #endif /* _SHA2_H_ */ Copied: stable/10/lib/libnetbsd/sys/event.h (from r313404, head/lib/libnetbsd/sys/event.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libnetbsd/sys/event.h Tue Feb 21 03:46:37 2017 (r314020, copy of r313404, head/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: stable/10/lib/libnetbsd/sys/types.h (from r313404, head/lib/libnetbsd/sys/types.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libnetbsd/sys/types.h Tue Feb 21 03:46:37 2017 (r314020, copy of r313404, head/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: stable/10/lib/libnetbsd/sys/wait.h (from r313404, head/lib/libnetbsd/sys/wait.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libnetbsd/sys/wait.h Tue Feb 21 03:46:37 2017 (r314020, copy of r313404, head/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: stable/10/lib/libnetbsd/util.h ============================================================================== --- stable/10/lib/libnetbsd/util.h Tue Feb 21 03:27:59 2017 (r314019) +++ stable/10/lib/libnetbsd/util.h Tue Feb 21 03:46:37 2017 (r314020) @@ -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 21 03:46: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 A56E4CE6693; Tue, 21 Feb 2017 03:46: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 73C4E1A2D; Tue, 21 Feb 2017 03:46: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 v1L3ki6N050374; Tue, 21 Feb 2017 03:46:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L3khuT050366; Tue, 21 Feb 2017 03:46:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210346.v1L3khuT050366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 03:46: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: r314021 - in stable/11/lib/libnetbsd: . 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: Tue, 21 Feb 2017 03:46:45 -0000 Author: ngie Date: Tue Feb 21 03:46:43 2017 New Revision: 314021 URL: https://svnweb.freebsd.org/changeset/base/314021 Log: MFC r313404: 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. Added: stable/11/lib/libnetbsd/glob.h - copied unchanged from r313404, head/lib/libnetbsd/glob.h stable/11/lib/libnetbsd/pthread.h - copied unchanged from r313404, head/lib/libnetbsd/pthread.h stable/11/lib/libnetbsd/sys/event.h - copied unchanged from r313404, head/lib/libnetbsd/sys/event.h stable/11/lib/libnetbsd/sys/types.h - copied unchanged from r313404, head/lib/libnetbsd/sys/types.h stable/11/lib/libnetbsd/sys/wait.h - copied unchanged from r313404, head/lib/libnetbsd/sys/wait.h Modified: stable/11/lib/libnetbsd/sha1.h stable/11/lib/libnetbsd/sha2.h stable/11/lib/libnetbsd/util.h Directory Properties: stable/11/ (props changed) Copied: stable/11/lib/libnetbsd/glob.h (from r313404, head/lib/libnetbsd/glob.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libnetbsd/glob.h Tue Feb 21 03:46:43 2017 (r314021, copy of r313404, head/lib/libnetbsd/glob.h) @@ -0,0 +1,39 @@ +/*- + * 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 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 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_ +#define _LIBNETBSD_GLOB_H_ + +#include_next + +#ifndef __gl_stat_t +#define __gl_stat_t struct stat +#endif + +#endif Copied: stable/11/lib/libnetbsd/pthread.h (from r313404, head/lib/libnetbsd/pthread.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libnetbsd/pthread.h Tue Feb 21 03:46:43 2017 (r314021, copy of r313404, head/lib/libnetbsd/pthread.h) @@ -0,0 +1,36 @@ +/*- + * 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 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 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_PTHREAD_H_ +#define _LIBNETBSD_PTHREAD_H_ + +#include_next +#include + +#endif Modified: stable/11/lib/libnetbsd/sha1.h ============================================================================== --- stable/11/lib/libnetbsd/sha1.h Tue Feb 21 03:46:37 2017 (r314020) +++ stable/11/lib/libnetbsd/sha1.h Tue Feb 21 03:46:43 2017 (r314021) @@ -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: stable/11/lib/libnetbsd/sha2.h ============================================================================== --- stable/11/lib/libnetbsd/sha2.h Tue Feb 21 03:46:37 2017 (r314020) +++ stable/11/lib/libnetbsd/sha2.h Tue Feb 21 03:46:43 2017 (r314021) @@ -34,6 +34,7 @@ #define _SHA2_H_ #include +#include #include #endif /* _SHA2_H_ */ Copied: stable/11/lib/libnetbsd/sys/event.h (from r313404, head/lib/libnetbsd/sys/event.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libnetbsd/sys/event.h Tue Feb 21 03:46:43 2017 (r314021, copy of r313404, head/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: stable/11/lib/libnetbsd/sys/types.h (from r313404, head/lib/libnetbsd/sys/types.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libnetbsd/sys/types.h Tue Feb 21 03:46:43 2017 (r314021, copy of r313404, head/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: stable/11/lib/libnetbsd/sys/wait.h (from r313404, head/lib/libnetbsd/sys/wait.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libnetbsd/sys/wait.h Tue Feb 21 03:46:43 2017 (r314021, copy of r313404, head/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: stable/11/lib/libnetbsd/util.h ============================================================================== --- stable/11/lib/libnetbsd/util.h Tue Feb 21 03:46:37 2017 (r314020) +++ stable/11/lib/libnetbsd/util.h Tue Feb 21 03:46:43 2017 (r314021) @@ -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 21 03:49: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 2610FCE680E; Tue, 21 Feb 2017 03:49: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 E6EC11D08; Tue, 21 Feb 2017 03:49: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 v1L3nqk6050547; Tue, 21 Feb 2017 03:49:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L3nqI5050546; Tue, 21 Feb 2017 03:49:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210349.v1L3nqI5050546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 03:49:52 +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: r314022 - stable/11/lib/msun/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: Tue, 21 Feb 2017 03:49:54 -0000 Author: ngie Date: Tue Feb 21 03:49:52 2017 New Revision: 314022 URL: https://svnweb.freebsd.org/changeset/base/314022 Log: MFC r313713: Handle clang 4.x+ with the compile-time exception added in r312213 It also fails the assertions noted in bug 208703 PR: 208703 PR: 217084 Modified: stable/11/lib/msun/tests/fmaxmin_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/fmaxmin_test.c ============================================================================== --- stable/11/lib/msun/tests/fmaxmin_test.c Tue Feb 21 03:46:43 2017 (r314021) +++ stable/11/lib/msun/tests/fmaxmin_test.c Tue Feb 21 03:49:52 2017 (r314022) @@ -116,7 +116,8 @@ testall(int testnum, long double big, lo /* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */ #if defined(__clang__) && \ - (__clang_major__ >= 3 && __clang_minor__ >= 8 && __clang_patchlevel__ >= 0) + ((__clang_major__ > 3)) || \ + ((__clang_major__ == 3 && __clang_minor__ >= 8)) #define affected_by_bug_208703 #endif From owner-svn-src-all@freebsd.org Tue Feb 21 03:50: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 84596CE6A01; Tue, 21 Feb 2017 03:50: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 346C21FA6; Tue, 21 Feb 2017 03:50: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 v1L3ovWT051434; Tue, 21 Feb 2017 03:50:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L3ovRK051433; Tue, 21 Feb 2017 03:50:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210350.v1L3ovRK051433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 03:50: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: r314023 - stable/10/lib/msun/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: Tue, 21 Feb 2017 03:50:58 -0000 Author: ngie Date: Tue Feb 21 03:50:57 2017 New Revision: 314023 URL: https://svnweb.freebsd.org/changeset/base/314023 Log: MFC r312213,r313713: r312213: Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check of the clang version This works around breakage on ^/stable/10 when running installworld from a ^/stable/10 host where the test wouldn't be compiled on the first go-around and would be missing when make installworld is run. PR: 208703 r313713: Handle clang 4.x+ with the compile-time exception added in r312213 It also fails the assertions noted in bug 208703 PR: 208703 PR: 217084 Modified: stable/10/lib/msun/tests/fmaxmin_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/msun/tests/fmaxmin_test.c ============================================================================== --- stable/10/lib/msun/tests/fmaxmin_test.c Tue Feb 21 03:49:52 2017 (r314022) +++ stable/10/lib/msun/tests/fmaxmin_test.c Tue Feb 21 03:50:57 2017 (r314023) @@ -86,6 +86,8 @@ testall_r(long double big, long double s return (ok); } +const char *comment = NULL; + /* * Test all the functions: fmaxf, fmax, fmaxl, fminf, fmin, and fminl, * in all rounding modes and with the arguments in different orders. @@ -107,10 +109,18 @@ testall(int testnum, long double big, lo break; } } - printf("%sok %d - big = %.20Lg, small = %.20Lg\n", - (i == 4) ? "" : "not ", testnum, big, small); + printf("%sok %d - big = %.20Lg, small = %.20Lg%s\n", + (i == 4) ? "" : "not ", testnum, big, small, + comment == NULL ? "" : comment); } +/* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */ +#if defined(__clang__) && \ + ((__clang_major__ > 3)) || \ + ((__clang_major__ == 3 && __clang_minor__ >= 8)) +#define affected_by_bug_208703 +#endif + int main(int argc, char *argv[]) { @@ -122,15 +132,23 @@ main(int argc, char *argv[]) testall(3, nextafterf(42.0, INFINITY), 42.0); testall(4, -5.0, -5.0); testall(5, -3.0, -4.0); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 6-7 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(6, 1.0, NAN); testall(7, INFINITY, NAN); + comment = NULL; testall(8, INFINITY, 1.0); testall(9, -3.0, -INFINITY); testall(10, 3.0, -INFINITY); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 11-12 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(11, NAN, NAN); /* This test isn't strictly required to work by C99. */ testall(12, 0.0, -0.0); + comment = NULL; return (0); } From owner-svn-src-all@freebsd.org Tue Feb 21 05:08: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 52AE4CE7D0B; Tue, 21 Feb 2017 05:08:09 +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 1F4D71DF3; Tue, 21 Feb 2017 05:08:09 +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 v1L5884V082565; Tue, 21 Feb 2017 05:08:08 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L588hq082564; Tue, 21 Feb 2017 05:08:08 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201702210508.v1L588hq082564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 21 Feb 2017 05:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314024 - head/sys/powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 05:08:09 -0000 Author: jhibbits Date: Tue Feb 21 05:08:07 2017 New Revision: 314024 URL: https://svnweb.freebsd.org/changeset/base/314024 Log: Correct the return value for pmap_change_attr() pmap_change_attr() returns an error code, not a paddr. This function is currently unused for powerpc. MFC after: 2 weeks Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Feb 21 03:50:57 2017 (r314023) +++ head/sys/powerpc/booke/pmap.c Tue Feb 21 05:08:07 2017 (r314024) @@ -2973,7 +2973,7 @@ mmu_booke_change_attr(mmu_t mmu, vm_offs tlb_miss_unlock(); mtx_unlock_spin(&tlbivax_mutex); - return (pte_vatopa(mmu, kernel_pmap, va)); + return (0); } /**************************************************************************/ From owner-svn-src-all@freebsd.org Tue Feb 21 05:12: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 55E26CE7ED8; Tue, 21 Feb 2017 05:12:44 +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 1D04D286; Tue, 21 Feb 2017 05:12:44 +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 v1L5ChCg086294; Tue, 21 Feb 2017 05:12:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L5ChSj086293; Tue, 21 Feb 2017 05:12:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702210512.v1L5ChSj086293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Feb 2017 05:12: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: r314025 - 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, 21 Feb 2017 05:12:44 -0000 Author: mav Date: Tue Feb 21 05:12:42 2017 New Revision: 314025 URL: https://svnweb.freebsd.org/changeset/base/314025 Log: MFC r313736: Fix panic on shutdown of ramdisk LU with zero capacity. Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c 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 21 05:08:07 2017 (r314024) +++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 21 05:12:42 2017 (r314025) @@ -1120,8 +1120,10 @@ 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) + if (be_lun->cap_bytes == 0) { + be_lun->indir = 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); From owner-svn-src-all@freebsd.org Tue Feb 21 05:13: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 66CF8CE7F5C; Tue, 21 Feb 2017 05:13:17 +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 339B23F4; Tue, 21 Feb 2017 05:13:17 +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 v1L5DGGq086369; Tue, 21 Feb 2017 05:13:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L5DGTJ086368; Tue, 21 Feb 2017 05:13:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702210513.v1L5DGTJ086368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Feb 2017 05:13: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: r314026 - 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, 21 Feb 2017 05:13:17 -0000 Author: mav Date: Tue Feb 21 05:13:16 2017 New Revision: 314026 URL: https://svnweb.freebsd.org/changeset/base/314026 Log: MFC r313736: Fix panic on shutdown of ramdisk LU with zero capacity. Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c 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 21 05:12:42 2017 (r314025) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Tue Feb 21 05:13:16 2017 (r314026) @@ -1120,8 +1120,10 @@ 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) + if (be_lun->cap_bytes == 0) { + be_lun->indir = 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); From owner-svn-src-all@freebsd.org Tue Feb 21 06:10: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 1BBFECE71CC; Tue, 21 Feb 2017 06:10:13 +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 EA79E1B7; Tue, 21 Feb 2017 06:10:12 +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 v1L6ACpS007345; Tue, 21 Feb 2017 06:10:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L6ACmr007344; Tue, 21 Feb 2017 06:10:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702210610.v1L6ACmr007344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Feb 2017 06:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314027 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 06:10:13 -0000 Author: mav Date: Tue Feb 21 06:10:11 2017 New Revision: 314027 URL: https://svnweb.freebsd.org/changeset/base/314027 Log: Do not blindly free completed ATIOs/INOTs on invalidation. When LUN is disabled, SIM starts returning queued ATIOs/INOTs. But at the same time there can be some ATIOs/INOTs still carrying real new requests. If we free those, SIM may leak some resources, forever expecting for any response from us. So try to be careful, separating ATIOs/INOTs carrying requests which still must be processed, from ATIOs/INOTs completed with errors which can be freed. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Feb 21 05:13:16 2017 (r314026) +++ head/sys/cam/ctl/scsi_ctl.c Tue Feb 21 06:10:11 2017 (r314027) @@ -1096,6 +1096,7 @@ ctlfedone(struct cam_periph *periph, uni struct ccb_accept_tio *atio = NULL; union ctl_io *io = NULL; struct mtx *mtx; + cam_status status; KASSERT((done_ccb->ccb_h.flags & CAM_UNLOCKED) != 0, ("CCB in ctlfedone() without CAM_UNLOCKED flag")); @@ -1122,30 +1123,15 @@ ctlfedone(struct cam_periph *periph, uni mtx = cam_periph_mtx(periph); mtx_lock(mtx); - /* - * If the peripheral is invalid, ATIOs and immediate notify CCBs - * need to be freed. Most of the ATIOs and INOTs that come back - * will be CCBs that are being returned from the SIM as a result of - * our disabling the LUN. - * - * Other CCB types are handled in their respective cases below. - */ - if (periph->flags & CAM_PERIPH_INVALID) { - switch (done_ccb->ccb_h.func_code) { - case XPT_ACCEPT_TARGET_IO: - case XPT_IMMEDIATE_NOTIFY: - case XPT_NOTIFY_ACKNOWLEDGE: - ctlfe_free_ccb(periph, done_ccb); - goto out; - default: - break; - } - - } switch (done_ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: { atio = &done_ccb->atio; + status = atio->ccb_h.status & CAM_STATUS_MASK; + if (status != CAM_CDB_RECVD) { + ctlfe_free_ccb(periph, done_ccb); + goto out; + } resubmit: /* @@ -1424,14 +1410,9 @@ ctlfedone(struct cam_periph *periph, uni case XPT_IMMEDIATE_NOTIFY: { union ctl_io *io; struct ccb_immediate_notify *inot; - cam_status status; int send_ctl_io; inot = &done_ccb->cin1; - printf("%s: got XPT_IMMEDIATE_NOTIFY status %#x tag %#x " - "seq %#x\n", __func__, inot->ccb_h.status, - inot->tag_id, inot->seq_id); - io = done_ccb->ccb_h.io_ptr; ctl_zero_io(io); @@ -1497,40 +1478,22 @@ ctlfedone(struct cam_periph *periph, uni break; default: xpt_print(periph->path, - "%s: unsupported message 0x%x\n", - __func__, inot->arg); + "%s: unsupported INOT message 0x%x\n", + __func__, inot->arg); send_ctl_io = 0; break; } break; + default: + xpt_print(periph->path, + "%s: unsupported INOT status 0x%x\n", + __func__, status); + /* FALLTHROUGH */ case CAM_REQ_ABORTED: - /* - * This request was sent back by the driver. - * XXX KDM what do we do here? - */ - send_ctl_io = 0; - break; case CAM_REQ_INVALID: + case CAM_DEV_NOT_THERE: case CAM_PROVIDE_FAIL: - default: - /* - * We should only get here if we're talking - * to a talking to a SIM that is target - * capable but supports the old API. In - * that case, we need to just free the CCB. - * If we actually send a notify acknowledge, - * it will send that back with an error as - * well. - */ - - if ((status != CAM_REQ_INVALID) - && (status != CAM_PROVIDE_FAIL)) - xpt_print(periph->path, - "%s: unsupported CAM status 0x%x\n", - __func__, status); - ctlfe_free_ccb(periph, done_ccb); - goto out; } if (send_ctl_io != 0) { @@ -1543,6 +1506,11 @@ ctlfedone(struct cam_periph *periph, uni break; } case XPT_NOTIFY_ACKNOWLEDGE: + if (periph->flags & CAM_PERIPH_INVALID) { + ctlfe_free_ccb(periph, done_ccb); + goto out; + } + /* * Queue this back down to the SIM as an immediate notify. */ @@ -2024,14 +1992,6 @@ ctlfe_done(union ctl_io *io) if (io->io_hdr.io_type == CTL_IO_TASK) { /* - * Task management commands don't require any further - * communication back to the adapter. Requeue the CCB - * to the adapter, and free the CTL I/O. - */ - xpt_print(ccb->ccb_h.path, "%s: returning task I/O " - "tag %#x seq %#x\n", __func__, - ccb->cin1.tag_id, ccb->cin1.seq_id); - /* * Send the notify acknowledge down to the SIM, to let it * know we processed the task management command. */ From owner-svn-src-all@freebsd.org Tue Feb 21 07:02: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 199E2CE749D; Tue, 21 Feb 2017 07:02:53 +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 BE6F031C; Tue, 21 Feb 2017 07:02: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 v1L72pab031378; Tue, 21 Feb 2017 07:02:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L72pSi031375; Tue, 21 Feb 2017 07:02:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702210702.v1L72pSi031375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 21 Feb 2017 07:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314028 - in stable/10/lib/libnetbsd: . 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: Tue, 21 Feb 2017 07:02:53 -0000 Author: ngie Date: Tue Feb 21 07:02:51 2017 New Revision: 314028 URL: https://svnweb.freebsd.org/changeset/base/314028 Log: Revert r314020 The test build I ran unfortunately didn't catch the fact that the sha384.h compat header is missing on ^/stable/10 due to some code not being MFCed Deleted: stable/10/lib/libnetbsd/glob.h stable/10/lib/libnetbsd/pthread.h stable/10/lib/libnetbsd/sys/event.h stable/10/lib/libnetbsd/sys/types.h stable/10/lib/libnetbsd/sys/wait.h Modified: stable/10/lib/libnetbsd/sha1.h stable/10/lib/libnetbsd/sha2.h stable/10/lib/libnetbsd/util.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libnetbsd/sha1.h ============================================================================== --- stable/10/lib/libnetbsd/sha1.h Tue Feb 21 06:10:11 2017 (r314027) +++ stable/10/lib/libnetbsd/sha1.h Tue Feb 21 07:02:51 2017 (r314028) @@ -35,11 +35,8 @@ #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: stable/10/lib/libnetbsd/sha2.h ============================================================================== --- stable/10/lib/libnetbsd/sha2.h Tue Feb 21 06:10:11 2017 (r314027) +++ stable/10/lib/libnetbsd/sha2.h Tue Feb 21 07:02:51 2017 (r314028) @@ -34,7 +34,6 @@ #define _SHA2_H_ #include -#include #include #endif /* _SHA2_H_ */ Modified: stable/10/lib/libnetbsd/util.h ============================================================================== --- stable/10/lib/libnetbsd/util.h Tue Feb 21 06:10:11 2017 (r314027) +++ stable/10/lib/libnetbsd/util.h Tue Feb 21 07:02:51 2017 (r314028) @@ -30,13 +30,12 @@ * SUCH DAMAGE. */ -#ifndef _LIBNETBSD_UTIL_H_ -#define _LIBNETBSD_UTIL_H_ +#ifndef _UTIL_H_ +#define _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 +#endif /* _UTIL_H_ */ From owner-svn-src-all@freebsd.org Tue Feb 21 07:12: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 1C048CE7806; Tue, 21 Feb 2017 07:12:46 +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 8E4EDB05; Tue, 21 Feb 2017 07:12:40 +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 JAA22314; Tue, 21 Feb 2017 09:12:38 +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 1cg4co-000M8h-Ei; Tue, 21 Feb 2017 09:12:38 +0200 Subject: Re: svn commit: r313878 - head/sys/kern To: Pedro Giffuni , Bryan Drewery , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201702171540.v1HFeOAs074991@repo.freebsd.org> <7da9caa5-d938-d2d0-1228-0e8897dc5632@FreeBSD.org> From: Andriy Gapon Message-ID: <56ca9623-dc6f-41fc-ba81-e7486a4ba8e3@FreeBSD.org> Date: Tue, 21 Feb 2017 09:11:42 +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: <7da9caa5-d938-d2d0-1228-0e8897dc5632@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 07:12:46 -0000 On 21/02/2017 02:42, Pedro Giffuni wrote: > FWIW, > > > On 2/20/2017 7:24 PM, Bryan Drewery wrote: >> On 2/17/2017 7:40 AM, Mateusz Guzik wrote: >>> Author: mjg >>> Date: Fri Feb 17 15:40:24 2017 >>> New Revision: 313878 >>> URL: https://svnweb.freebsd.org/changeset/base/313878 >>> >>> Log: >>> mtx: get rid of file/line args from slow paths if they are unused >>> This denotes changes which went in by accident in r313877. >> I really wish people would just revert their changes and recommit them >> properly. The 'svn blame' on the code in r313877 will never show the >> commit message here (r313878). So a person would only find this >> explanation if they read 'svn log' on the file, which in the case of >> sys/kern/kern_mutex.c there are 273 commits for. Are we expected to >> read 'svn log' (in the future) for all changes in the hopes that a later >> commit happens to mention it? >> >> As someone who so often is 'svn blame'ing code to understand it better >> and to track regressions, commits like this that explain other commits >> might as well have never been done. > > As I mentioned in another thread, other svn configurations (ASF, for example) > permit editing the log message: > > http://help.collab.net/index.jsp?topic=/faq/changelog.html How well do various svn exporters handle that? Specifically, svn-> git ? -- Andriy Gapon From owner-svn-src-all@freebsd.org Tue Feb 21 08:57: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 50DFCCE729C; Tue, 21 Feb 2017 08:57:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05EA696C; Tue, 21 Feb 2017 08:57:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L8vSos077159; Tue, 21 Feb 2017 08:57:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L8vSAB077156; Tue, 21 Feb 2017 08:57:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210857.v1L8vSAB077156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 08:57: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: r314029 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 08:57:29 -0000 Author: avg Date: Tue Feb 21 08:57:27 2017 New Revision: 314029 URL: https://svnweb.freebsd.org/changeset/base/314029 Log: MFC r313686: check remaining space in zfs implementations of vptocnp PR: 216939 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 21 07:02:51 2017 (r314028) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 21 08:57:27 2017 (r314029) @@ -1604,16 +1604,21 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc } if (sep == NULL) { mutex_exit(&sdp->sd_lock); - error = ENOENT; + error = SET_ERROR(ENOENT); } else { size_t len; len = strlen(sep->se_name); - *ap->a_buflen -= len; - bcopy(sep->se_name, ap->a_buf + *ap->a_buflen, len); - mutex_exit(&sdp->sd_lock); - vref(dvp); - *ap->a_vpp = dvp; + if (*ap->a_buflen < len) { + mutex_exit(&sdp->sd_lock); + error = SET_ERROR(ENOMEM); + } else { + *ap->a_buflen -= len; + bcopy(sep->se_name, ap->a_buf + *ap->a_buflen, len); + mutex_exit(&sdp->sd_lock); + vref(dvp); + *ap->a_vpp = dvp; + } } VN_RELE(dvp); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 21 07:02:51 2017 (r314028) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 21 08:57:27 2017 (r314029) @@ -5984,6 +5984,10 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) error = zfs_znode_parent_and_name(zp, &dzp, name); if (error == 0) { len = strlen(name); + if (*ap->a_buflen < len) + error = SET_ERROR(ENOMEM); + } + if (error == 0) { *ap->a_buflen -= len; bcopy(name, ap->a_buf + *ap->a_buflen, len); *ap->a_vpp = ZTOV(dzp); From owner-svn-src-all@freebsd.org Tue Feb 21 08: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 7322BCE72A3; Tue, 21 Feb 2017 08:57:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27D9096F; Tue, 21 Feb 2017 08:57:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L8vTUS077216; Tue, 21 Feb 2017 08:57:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L8vT7F077214; Tue, 21 Feb 2017 08:57:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210857.v1L8vT7F077214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 08: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: r314030 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 21 Feb 2017 08:57:30 -0000 Author: avg Date: Tue Feb 21 08:57:28 2017 New Revision: 314030 URL: https://svnweb.freebsd.org/changeset/base/314030 Log: MFC r313686: check remaining space in zfs implementations of vptocnp PR: 216939 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 21 08:57:27 2017 (r314029) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 21 08:57:28 2017 (r314030) @@ -1604,16 +1604,21 @@ zfsctl_snapshot_vptocnp(struct vop_vptoc } if (sep == NULL) { mutex_exit(&sdp->sd_lock); - error = ENOENT; + error = SET_ERROR(ENOENT); } else { size_t len; len = strlen(sep->se_name); - *ap->a_buflen -= len; - bcopy(sep->se_name, ap->a_buf + *ap->a_buflen, len); - mutex_exit(&sdp->sd_lock); - vref(dvp); - *ap->a_vpp = dvp; + if (*ap->a_buflen < len) { + mutex_exit(&sdp->sd_lock); + error = SET_ERROR(ENOMEM); + } else { + *ap->a_buflen -= len; + bcopy(sep->se_name, ap->a_buf + *ap->a_buflen, len); + mutex_exit(&sdp->sd_lock); + vref(dvp); + *ap->a_vpp = dvp; + } } VN_RELE(dvp); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 21 08:57:27 2017 (r314029) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 21 08:57:28 2017 (r314030) @@ -5941,6 +5941,10 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) error = zfs_znode_parent_and_name(zp, &dzp, name); if (error == 0) { len = strlen(name); + if (*ap->a_buflen < len) + error = SET_ERROR(ENOMEM); + } + if (error == 0) { *ap->a_buflen -= len; bcopy(name, ap->a_buf + *ap->a_buflen, len); *ap->a_vpp = ZTOV(dzp); From owner-svn-src-all@freebsd.org Tue Feb 21 09:13: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 6B6BDCE7C7B; Tue, 21 Feb 2017 09:13:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39FCD171D; Tue, 21 Feb 2017 09:13:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L9DY1B085434; Tue, 21 Feb 2017 09:13:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L9DYBP085433; Tue, 21 Feb 2017 09:13:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210913.v1L9DYBP085433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 09:13:34 +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: r314031 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 21 Feb 2017 09:13:35 -0000 Author: avg Date: Tue Feb 21 09:13:34 2017 New Revision: 314031 URL: https://svnweb.freebsd.org/changeset/base/314031 Log: MFC r313687: remove l2_padding_needed statistic from zfs arc Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 21 08:57:28 2017 (r314030) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 21 09:13:34 2017 (r314031) @@ -711,7 +711,6 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_size; kstat_named_t arcstat_l2_asize; kstat_named_t arcstat_l2_hdr_size; - kstat_named_t arcstat_l2_padding_needed; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; kstat_named_t arcstat_l2_write_spa_mismatch; @@ -809,7 +808,6 @@ static arc_stats_t arc_stats = { { "l2_size", KSTAT_DATA_UINT64 }, { "l2_asize", KSTAT_DATA_UINT64 }, { "l2_hdr_size", KSTAT_DATA_UINT64 }, - { "l2_padding_needed", KSTAT_DATA_UINT64 }, { "l2_write_trylock_fail", KSTAT_DATA_UINT64 }, { "l2_write_passed_headroom", KSTAT_DATA_UINT64 }, { "l2_write_spa_mismatch", KSTAT_DATA_UINT64 }, From owner-svn-src-all@freebsd.org Tue Feb 21 09:13: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 4423BCE7CB3; Tue, 21 Feb 2017 09:13:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2CF1750; Tue, 21 Feb 2017 09:13:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L9DdDt085482; Tue, 21 Feb 2017 09:13:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L9Ddm6085481; Tue, 21 Feb 2017 09:13:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210913.v1L9Ddm6085481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 09:13: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: r314032 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 09:13:40 -0000 Author: avg Date: Tue Feb 21 09:13:38 2017 New Revision: 314032 URL: https://svnweb.freebsd.org/changeset/base/314032 Log: MFC r313687: remove l2_padding_needed statistic from zfs arc Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 21 09:13:34 2017 (r314031) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 21 09:13:38 2017 (r314032) @@ -709,7 +709,6 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_size; kstat_named_t arcstat_l2_asize; kstat_named_t arcstat_l2_hdr_size; - kstat_named_t arcstat_l2_padding_needed; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; kstat_named_t arcstat_l2_write_spa_mismatch; @@ -807,7 +806,6 @@ static arc_stats_t arc_stats = { { "l2_size", KSTAT_DATA_UINT64 }, { "l2_asize", KSTAT_DATA_UINT64 }, { "l2_hdr_size", KSTAT_DATA_UINT64 }, - { "l2_padding_needed", KSTAT_DATA_UINT64 }, { "l2_write_trylock_fail", KSTAT_DATA_UINT64 }, { "l2_write_passed_headroom", KSTAT_DATA_UINT64 }, { "l2_write_spa_mismatch", KSTAT_DATA_UINT64 }, From owner-svn-src-all@freebsd.org Tue Feb 21 09:29: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 F1D84CE6245; Tue, 21 Feb 2017 09:29:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C999AAB; Tue, 21 Feb 2017 09:29:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L9TBM4089578; Tue, 21 Feb 2017 09:29:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L9TBDG089575; Tue, 21 Feb 2017 09:29:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210929.v1L9TBDG089575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 09:29:11 +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: r314033 - in stable/11/sys: fs/nfsserver rpc 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, 21 Feb 2017 09:29:13 -0000 Author: avg Date: Tue Feb 21 09:29:11 2017 New Revision: 314033 URL: https://svnweb.freebsd.org/changeset/base/314033 Log: MFC r313735: add svcpool_close to handle killed nfsd threads PR: 204340 Reported by: Panzura Approved by: rmacklem Obtained from: rmacklem Modified: stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/11/sys/rpc/svc.c stable/11/sys/rpc/svc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Feb 21 09:13:38 2017 (r314032) +++ stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Feb 21 09:29:11 2017 (r314033) @@ -551,18 +551,16 @@ nfsrvd_init(int terminating) nfsd_master_proc = NULL; NFSD_UNLOCK(); nfsrv_freeallbackchannel_xprts(); - svcpool_destroy(nfsrvd_pool); - nfsrvd_pool = NULL; + svcpool_close(nfsrvd_pool); + NFSD_LOCK(); + } else { + NFSD_UNLOCK(); + nfsrvd_pool = svcpool_create("nfsd", + SYSCTL_STATIC_CHILDREN(_vfs_nfsd)); + nfsrvd_pool->sp_rcache = NULL; + nfsrvd_pool->sp_assign = fhanew_assign; + nfsrvd_pool->sp_done = fha_nd_complete; NFSD_LOCK(); } - - NFSD_UNLOCK(); - - nfsrvd_pool = svcpool_create("nfsd", SYSCTL_STATIC_CHILDREN(_vfs_nfsd)); - nfsrvd_pool->sp_rcache = NULL; - nfsrvd_pool->sp_assign = fhanew_assign; - nfsrvd_pool->sp_done = fha_nd_complete; - - NFSD_LOCK(); } Modified: stable/11/sys/rpc/svc.c ============================================================================== --- stable/11/sys/rpc/svc.c Tue Feb 21 09:13:38 2017 (r314032) +++ stable/11/sys/rpc/svc.c Tue Feb 21 09:29:11 2017 (r314033) @@ -75,6 +75,7 @@ static void svc_new_thread(SVCGROUP *grp static void xprt_unregister_locked(SVCXPRT *xprt); static void svc_change_space_used(SVCPOOL *pool, long delta); static bool_t svc_request_space_available(SVCPOOL *pool); +static void svcpool_cleanup(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -174,8 +175,12 @@ svcpool_create(const char *name, struct return pool; } -void -svcpool_destroy(SVCPOOL *pool) +/* + * Code common to svcpool_destroy() and svcpool_close(), which cleans up + * the pool data structures. + */ +static void +svcpool_cleanup(SVCPOOL *pool) { SVCGROUP *grp; SVCXPRT *xprt, *nxprt; @@ -211,6 +216,15 @@ svcpool_destroy(SVCPOOL *pool) mtx_lock(&pool->sp_lock); } mtx_unlock(&pool->sp_lock); +} + +void +svcpool_destroy(SVCPOOL *pool) +{ + SVCGROUP *grp; + int g; + + svcpool_cleanup(pool); for (g = 0; g < SVC_MAXGROUPS; g++) { grp = &pool->sp_groups[g]; @@ -226,6 +240,30 @@ svcpool_destroy(SVCPOOL *pool) } /* + * Similar to svcpool_destroy(), except that it does not destroy the actual + * data structures. As such, "pool" may be used again. + */ +void +svcpool_close(SVCPOOL *pool) +{ + SVCGROUP *grp; + int g; + + svcpool_cleanup(pool); + + /* Now, initialize the pool's state for a fresh svc_run() call. */ + mtx_lock(&pool->sp_lock); + pool->sp_state = SVCPOOL_INIT; + mtx_unlock(&pool->sp_lock); + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + grp->sg_state = SVCPOOL_ACTIVE; + mtx_unlock(&grp->sg_lock); + } +} + +/* * Sysctl handler to get the present thread count on a pool */ static int Modified: stable/11/sys/rpc/svc.h ============================================================================== --- stable/11/sys/rpc/svc.h Tue Feb 21 09:13:38 2017 (r314032) +++ stable/11/sys/rpc/svc.h Tue Feb 21 09:29:11 2017 (r314033) @@ -729,6 +729,12 @@ extern SVCPOOL* svcpool_create(const cha extern void svcpool_destroy(SVCPOOL *pool); /* + * Close a service pool. Similar to svcpool_destroy(), but it does not + * free the data structures. As such, the pool can be used again. + */ +extern void svcpool_close(SVCPOOL *pool); + +/* * Transport independent svc_create routine. */ extern int svc_create(SVCPOOL *, void (*)(struct svc_req *, SVCXPRT *), From owner-svn-src-all@freebsd.org Tue Feb 21 09:29: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 3C35FCE62B3; Tue, 21 Feb 2017 09:29:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16E19226; Tue, 21 Feb 2017 09:29:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L9Tlhr089652; Tue, 21 Feb 2017 09:29:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L9Tksl089649; Tue, 21 Feb 2017 09:29:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210929.v1L9Tksl089649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 09:29: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: r314034 - in stable/10/sys: fs/nfsserver 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: Tue, 21 Feb 2017 09:29:48 -0000 Author: avg Date: Tue Feb 21 09:29:46 2017 New Revision: 314034 URL: https://svnweb.freebsd.org/changeset/base/314034 Log: MFC r313735: add svcpool_close to handle killed nfsd threads PR: 204340 Reported by: Panzura Reviewed by: rmacklem Approved by: rmacklem Modified: stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Feb 21 09:29:11 2017 (r314033) +++ stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Feb 21 09:29:46 2017 (r314034) @@ -554,18 +554,16 @@ nfsrvd_init(int terminating) nfsd_master_proc = NULL; NFSD_UNLOCK(); nfsrv_freeallbackchannel_xprts(); - svcpool_destroy(nfsrvd_pool); - nfsrvd_pool = NULL; + svcpool_close(nfsrvd_pool); + NFSD_LOCK(); + } else { + NFSD_UNLOCK(); + nfsrvd_pool = svcpool_create("nfsd", + SYSCTL_STATIC_CHILDREN(_vfs_nfsd)); + nfsrvd_pool->sp_rcache = NULL; + nfsrvd_pool->sp_assign = fhanew_assign; + nfsrvd_pool->sp_done = fha_nd_complete; NFSD_LOCK(); } - - NFSD_UNLOCK(); - - nfsrvd_pool = svcpool_create("nfsd", SYSCTL_STATIC_CHILDREN(_vfs_nfsd)); - nfsrvd_pool->sp_rcache = NULL; - nfsrvd_pool->sp_assign = fhanew_assign; - nfsrvd_pool->sp_done = fha_nd_complete; - - NFSD_LOCK(); } Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Tue Feb 21 09:29:11 2017 (r314033) +++ stable/10/sys/rpc/svc.c Tue Feb 21 09:29:46 2017 (r314034) @@ -75,6 +75,7 @@ static void svc_new_thread(SVCGROUP *grp static void xprt_unregister_locked(SVCXPRT *xprt); static void svc_change_space_used(SVCPOOL *pool, long delta); static bool_t svc_request_space_available(SVCPOOL *pool); +static void svcpool_cleanup(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -174,8 +175,12 @@ svcpool_create(const char *name, struct return pool; } -void -svcpool_destroy(SVCPOOL *pool) +/* + * Code common to svcpool_destroy() and svcpool_close(), which cleans up + * the pool data structures. + */ +static void +svcpool_cleanup(SVCPOOL *pool) { SVCGROUP *grp; SVCXPRT *xprt, *nxprt; @@ -211,6 +216,15 @@ svcpool_destroy(SVCPOOL *pool) mtx_lock(&pool->sp_lock); } mtx_unlock(&pool->sp_lock); +} + +void +svcpool_destroy(SVCPOOL *pool) +{ + SVCGROUP *grp; + int g; + + svcpool_cleanup(pool); for (g = 0; g < SVC_MAXGROUPS; g++) { grp = &pool->sp_groups[g]; @@ -226,6 +240,30 @@ svcpool_destroy(SVCPOOL *pool) } /* + * Similar to svcpool_destroy(), except that it does not destroy the actual + * data structures. As such, "pool" may be used again. + */ +void +svcpool_close(SVCPOOL *pool) +{ + SVCGROUP *grp; + int g; + + svcpool_cleanup(pool); + + /* Now, initialize the pool's state for a fresh svc_run() call. */ + mtx_lock(&pool->sp_lock); + pool->sp_state = SVCPOOL_INIT; + mtx_unlock(&pool->sp_lock); + for (g = 0; g < SVC_MAXGROUPS; g++) { + grp = &pool->sp_groups[g]; + mtx_lock(&grp->sg_lock); + grp->sg_state = SVCPOOL_ACTIVE; + mtx_unlock(&grp->sg_lock); + } +} + +/* * Sysctl handler to get the present thread count on a pool */ static int Modified: stable/10/sys/rpc/svc.h ============================================================================== --- stable/10/sys/rpc/svc.h Tue Feb 21 09:29:11 2017 (r314033) +++ stable/10/sys/rpc/svc.h Tue Feb 21 09:29:46 2017 (r314034) @@ -729,6 +729,12 @@ extern SVCPOOL* svcpool_create(const cha extern void svcpool_destroy(SVCPOOL *pool); /* + * Close a service pool. Similar to svcpool_destroy(), but it does not + * free the data structures. As such, the pool can be used again. + */ +extern void svcpool_close(SVCPOOL *pool); + +/* * Transport independent svc_create routine. */ extern int svc_create(SVCPOOL *, void (*)(struct svc_req *, SVCXPRT *), From owner-svn-src-all@freebsd.org Tue Feb 21 09:33: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 BF477CE66B4; Tue, 21 Feb 2017 09:33:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C96EC39; Tue, 21 Feb 2017 09:33:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L9XLGi093655; Tue, 21 Feb 2017 09:33:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L9XLVp093654; Tue, 21 Feb 2017 09:33:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702210933.v1L9XLVp093654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 09:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314035 - head/sys/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: Tue, 21 Feb 2017 09:33:22 -0000 Author: avg Date: Tue Feb 21 09:33:21 2017 New Revision: 314035 URL: https://svnweb.freebsd.org/changeset/base/314035 Log: mca: change type of last_intr to time_t for consinstency time_uptime is time_t MFC after: 1 day X-MFC with: r313752 Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Tue Feb 21 09:29:46 2017 (r314034) +++ head/sys/x86/x86/mca.c Tue Feb 21 09:33:21 2017 (r314035) @@ -73,7 +73,7 @@ enum scan_mode { */ struct cmc_state { int max_threshold; - int last_intr; + time_t last_intr; }; #endif From owner-svn-src-all@freebsd.org Tue Feb 21 09:37: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 6E762CE68F6; Tue, 21 Feb 2017 09:37:35 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 207D8F73; Tue, 21 Feb 2017 09:37:35 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1L9bYeZ093837; Tue, 21 Feb 2017 09:37:34 GMT (envelope-from robak@FreeBSD.org) Received: (from robak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1L9bY6V093836; Tue, 21 Feb 2017 09:37:34 GMT (envelope-from robak@FreeBSD.org) Message-Id: <201702210937.v1L9bY6V093836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: robak set sender to robak@FreeBSD.org using -f From: Bartek Rutkowski Date: Tue, 21 Feb 2017 09:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314036 - 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: Tue, 21 Feb 2017 09:37:35 -0000 Author: robak (ports committer) Date: Tue Feb 21 09:37:33 2017 New Revision: 314036 URL: https://svnweb.freebsd.org/changeset/base/314036 Log: Enable bsdinstall hardening options by default. As discussed previously, in order to introduce new OS hardening defaults, we've added them to bsdinstall in 'off by default' mode. It has been there for a while, so the next step is to change them to 'on by defaul' mode, so that in future we could simply enable them in base OS. Reviewed by: brd Approved by: adrian Differential Revision: https://reviews.freebsd.org/D9641 Modified: head/usr.sbin/bsdinstall/scripts/hardening Modified: head/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:33:21 2017 (r314035) +++ head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:37:33 2017 (r314036) @@ -36,15 +36,15 @@ FEATURES=$( dialog --backtitle "FreeBSD --title "System Hardening" --nocancel --separate-output \ --checklist "Choose system security hardening options:" \ 0 0 0 \ - "0 hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ - "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ - "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ - "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ - "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ - "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ - "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ - "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ - "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ + "0 hide_uids" "Hide processes running as other users" ${hide_uids:-on} \ + "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-on} \ + "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-on} \ + "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-on} \ + "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-on} \ + "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-on} \ + "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-on} \ + "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-on} \ + "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-on} \ 2>&1 1>&3 ) exec 3>&- From owner-svn-src-all@freebsd.org Tue Feb 21 12:24: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 8E9DACE8EF8; Tue, 21 Feb 2017 12:24:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BAC3637; Tue, 21 Feb 2017 12:24:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LCOVMP062846; Tue, 21 Feb 2017 12:24:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LCOVDK062845; Tue, 21 Feb 2017 12:24:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702211224.v1LCOVDK062845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 12:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314037 - head/sys/dev/jedec_ts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 12:24:32 -0000 Author: avg Date: Tue Feb 21 12:24:31 2017 New Revision: 314037 URL: https://svnweb.freebsd.org/changeset/base/314037 Log: jedec_ts: fix slave address check The mask should cover all bits that can not vary. MFC after: 3 days Modified: head/sys/dev/jedec_ts/jedec_ts.c Modified: head/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- head/sys/dev/jedec_ts/jedec_ts.c Tue Feb 21 09:37:33 2017 (r314036) +++ head/sys/dev/jedec_ts/jedec_ts.c Tue Feb 21 12:24:31 2017 (r314037) @@ -104,7 +104,7 @@ ts_attach(device_t dev) uint8_t addr; addr = smbus_get_addr(dev); - if ((addr & 0x30) != 0x30) { + if ((addr & 0xf0) != 0x30) { /* Up to 8 slave devices starting at 0x30. */ return (ENXIO); } From owner-svn-src-all@freebsd.org Tue Feb 21 12: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 99E82CE5067; Tue, 21 Feb 2017 12:29:08 +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 4FC6096B; Tue, 21 Feb 2017 12:29:08 +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 v1LCT7ng063171; Tue, 21 Feb 2017 12:29:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LCT7WD063169; Tue, 21 Feb 2017 12:29:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702211229.v1LCT7WD063169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Feb 2017 12:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314038 - 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: Tue, 21 Feb 2017 12:29:08 -0000 Author: mav Date: Tue Feb 21 12:29:07 2017 New Revision: 314038 URL: https://svnweb.freebsd.org/changeset/base/314038 Log: Remove ancient __FreeBSD_version checks. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Feb 21 12:24:31 2017 (r314037) +++ head/sys/dev/isp/isp_freebsd.c Tue Feb 21 12:29:07 2017 (r314038) @@ -41,12 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version < 800002 -#define THREAD_CREATE kthread_create -#else -#define THREAD_CREATE kproc_create -#endif - MODULE_VERSION(isp, 1); MODULE_DEPEND(isp, cam, 1, 1, 1); int isp_announced = 0; @@ -176,7 +170,8 @@ isp_attach_chan(ispsoftc_t *isp, struct #endif isp_loop_changed(isp, chan); ISP_UNLOCK(isp); - if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { + if (kproc_create(isp_kthread, fc, &fc->kproc, 0, 0, + "%s_%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { xpt_free_path(fc->path); ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(fc->sim)); Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Tue Feb 21 12:24:31 2017 (r314037) +++ head/sys/dev/isp/isp_freebsd.h Tue Feb 21 12:29:07 2017 (r314038) @@ -88,14 +88,6 @@ isp_ecmd_t * isp_get_ecmd(struct ispsoft void isp_put_ecmd(struct ispsoftc *, isp_ecmd_t *); #ifdef ISP_TARGET_MODE -/* Not quite right, but there was no bump for this change */ -#if __FreeBSD_version < 225469 -#define SDFIXED(x) (&x) -#else -#define SDFIXED(x) ((struct scsi_sense_data_fixed *)(&x)) -#endif - -#define ISP_TARGET_FUNCTIONS 1 #define ATPDPSIZE 4096 #define ATPDPHASHSIZE 32 #define ATPDPHASH(x) ((((x) >> 24) ^ ((x) >> 16) ^ ((x) >> 8) ^ (x)) & \ From owner-svn-src-all@freebsd.org Tue Feb 21 12:38: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 4292DCE534B; Tue, 21 Feb 2017 12:38:01 +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 01ABEEF9; Tue, 21 Feb 2017 12:38:00 +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 v1LCc0lR067441; Tue, 21 Feb 2017 12:38:00 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LCc05l067440; Tue, 21 Feb 2017 12:38:00 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702211238.v1LCc05l067440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 21 Feb 2017 12:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314039 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 12:38:01 -0000 Author: garga (ports committer) Date: Tue Feb 21 12:37:59 2017 New Revision: 314039 URL: https://svnweb.freebsd.org/changeset/base/314039 Log: Fix style(9) Reviewed by: ngie, tuexen, vangyzen, allanjude Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9588 Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Tue Feb 21 12:29:07 2017 (r314038) +++ head/usr.bin/sockstat/sockstat.c Tue Feb 21 12:37:59 2017 (r314039) @@ -88,9 +88,9 @@ static size_t numprotos; /* allocated s static int *ports; -#define INT_BIT (sizeof(int)*CHAR_BIT) -#define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0) -#define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT))) +#define INT_BIT (sizeof(int)*CHAR_BIT) +#define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0) +#define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT))) struct addr { struct sockaddr_storage address; @@ -111,7 +111,7 @@ struct sock { struct sock *next; }; -#define HASHSIZE 1009 +#define HASHSIZE 1009 static struct sock *sockhash[HASHSIZE]; static struct xfile *xfiles; @@ -131,7 +131,6 @@ xprintf(const char *fmt, ...) return (len); } - static int get_proto_type(const char *proto) { @@ -147,7 +146,6 @@ get_proto_type(const char *proto) return (pent->p_proto); } - static void init_protos(int num) { @@ -167,7 +165,6 @@ init_protos(int num) numprotos = proto_count; } - static int parse_protos(char *protospec) { @@ -190,7 +187,6 @@ parse_protos(char *protospec) return (proto_index); } - static void parse_ports(const char *portspec) { @@ -359,27 +355,27 @@ gather_sctp(void) err(1, "malloc()"); switch (xladdr->address.sa.sa_family) { case AF_INET: -#define __IN_IS_ADDR_LOOPBACK(pina) \ +#define __IN_IS_ADDR_LOOPBACK(pina) \ ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) - if (!__IN_IS_ADDR_LOOPBACK(&xladdr->address.sin.sin_addr)) + if (!__IN_IS_ADDR_LOOPBACK( + &xladdr->address.sin.sin_addr)) local_all_loopback = 0; -#undef __IN_IS_ADDR_LOOPBACK - sockaddr(&laddr->address, - AF_INET, - &xladdr->address.sin.sin_addr, - htons(xinpcb->local_port)); +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(&laddr->address, AF_INET, + &xladdr->address.sin.sin_addr, + htons(xinpcb->local_port)); break; case AF_INET6: - if (!IN6_IS_ADDR_LOOPBACK(&xladdr->address.sin6.sin6_addr)) + if (!IN6_IS_ADDR_LOOPBACK( + &xladdr->address.sin6.sin6_addr)) local_all_loopback = 0; - sockaddr(&laddr->address, - AF_INET6, - &xladdr->address.sin6.sin6_addr, - htons(xinpcb->local_port)); + sockaddr(&laddr->address, AF_INET6, + &xladdr->address.sin6.sin6_addr, + htons(xinpcb->local_port)); break; default: errx(1, "address family %d not supported", - xladdr->address.sa.sa_family); + xladdr->address.sa.sa_family); } laddr->next = NULL; if (prev_laddr == NULL) @@ -389,33 +385,38 @@ gather_sctp(void) prev_laddr = laddr; } if (sock->laddr == NULL) { - if ((sock->laddr = calloc(1, sizeof(struct addr))) == NULL) + if ((sock->laddr = + calloc(1, sizeof(struct addr))) == NULL) err(1, "malloc()"); sock->laddr->address.ss_family = sock->family; if (sock->family == AF_INET) - sock->laddr->address.ss_len = sizeof(struct sockaddr_in); + sock->laddr->address.ss_len = + sizeof(struct sockaddr_in); else - sock->laddr->address.ss_len = sizeof(struct sockaddr_in6); + sock->laddr->address.ss_len = + sizeof(struct sockaddr_in6); local_all_loopback = 0; } if ((sock->faddr = calloc(1, sizeof(struct addr))) == NULL) err(1, "malloc()"); sock->faddr->address.ss_family = sock->family; if (sock->family == AF_INET) - sock->faddr->address.ss_len = sizeof(struct sockaddr_in); + sock->faddr->address.ss_len = + sizeof(struct sockaddr_in); else - sock->faddr->address.ss_len = sizeof(struct sockaddr_in6); + sock->faddr->address.ss_len = + sizeof(struct sockaddr_in6); no_stcb = 1; while (offset < len) { xstcb = (struct xsctp_tcb *)(void *)(buf + offset); offset += sizeof(struct xsctp_tcb); if (no_stcb) { - if (opt_l && - (sock->vflag & vflag) && + if (opt_l && (sock->vflag & vflag) && (!opt_L || !local_all_loopback) && ((xinpcb->flags & SCTP_PCB_FLAGS_UDPTYPE) || (xstcb->last == 1))) { - hash = (int)((uintptr_t)sock->socket % HASHSIZE); + hash = (int)((uintptr_t)sock->socket % + HASHSIZE); sock->next = sockhash[hash]; sockhash[hash] = sock; } else { @@ -448,37 +449,40 @@ gather_sctp(void) prev_laddr = NULL; local_all_loopback = 1; while (offset < len) { - xladdr = (struct xsctp_laddr *)(void *)(buf + offset); + xladdr = (struct xsctp_laddr *)(void *)(buf + + offset); offset += sizeof(struct xsctp_laddr); if (xladdr->last == 1) break; if (!opt_c) continue; - if ((laddr = calloc(1, sizeof(struct addr))) == NULL) + laddr = calloc(1, sizeof(struct addr)); + if (laddr == NULL) err(1, "malloc()"); switch (xladdr->address.sa.sa_family) { case AF_INET: -#define __IN_IS_ADDR_LOOPBACK(pina) \ +#define __IN_IS_ADDR_LOOPBACK(pina) \ ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) - if (!__IN_IS_ADDR_LOOPBACK(&xladdr->address.sin.sin_addr)) + if (!__IN_IS_ADDR_LOOPBACK( + &xladdr->address.sin.sin_addr)) local_all_loopback = 0; -#undef __IN_IS_ADDR_LOOPBACK - sockaddr(&laddr->address, - AF_INET, - &xladdr->address.sin.sin_addr, - htons(xstcb->local_port)); +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(&laddr->address, AF_INET, + &xladdr->address.sin.sin_addr, + htons(xstcb->local_port)); break; case AF_INET6: - if (!IN6_IS_ADDR_LOOPBACK(&xladdr->address.sin6.sin6_addr)) + if (!IN6_IS_ADDR_LOOPBACK( + &xladdr->address.sin6.sin6_addr)) local_all_loopback = 0; - sockaddr(&laddr->address, - AF_INET6, - &xladdr->address.sin6.sin6_addr, - htons(xstcb->local_port)); + sockaddr(&laddr->address, AF_INET6, + &xladdr->address.sin6.sin6_addr, + htons(xstcb->local_port)); break; default: - errx(1, "address family %d not supported", - xladdr->address.sa.sa_family); + errx(1, + "address family %d not supported", + xladdr->address.sa.sa_family); } laddr->next = NULL; if (prev_laddr == NULL) @@ -490,37 +494,40 @@ gather_sctp(void) prev_faddr = NULL; foreign_all_loopback = 1; while (offset < len) { - xraddr = (struct xsctp_raddr *)(void *)(buf + offset); + xraddr = (struct xsctp_raddr *)(void *)(buf + + offset); offset += sizeof(struct xsctp_raddr); if (xraddr->last == 1) break; if (!opt_c) continue; - if ((faddr = calloc(1, sizeof(struct addr))) == NULL) + faddr = calloc(1, sizeof(struct addr)); + if (faddr == NULL) err(1, "malloc()"); switch (xraddr->address.sa.sa_family) { case AF_INET: -#define __IN_IS_ADDR_LOOPBACK(pina) \ +#define __IN_IS_ADDR_LOOPBACK(pina) \ ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) - if (!__IN_IS_ADDR_LOOPBACK(&xraddr->address.sin.sin_addr)) + if (!__IN_IS_ADDR_LOOPBACK( + &xraddr->address.sin.sin_addr)) foreign_all_loopback = 0; -#undef __IN_IS_ADDR_LOOPBACK - sockaddr(&faddr->address, - AF_INET, - &xraddr->address.sin.sin_addr, - htons(xstcb->remote_port)); +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(&faddr->address, AF_INET, + &xraddr->address.sin.sin_addr, + htons(xstcb->remote_port)); break; case AF_INET6: - if (!IN6_IS_ADDR_LOOPBACK(&xraddr->address.sin6.sin6_addr)) + if (!IN6_IS_ADDR_LOOPBACK( + &xraddr->address.sin6.sin6_addr)) foreign_all_loopback = 0; - sockaddr(&faddr->address, - AF_INET6, - &xraddr->address.sin6.sin6_addr, - htons(xstcb->remote_port)); + sockaddr(&faddr->address, AF_INET6, + &xraddr->address.sin6.sin6_addr, + htons(xstcb->remote_port)); break; default: - errx(1, "address family %d not supported", - xraddr->address.sa.sa_family); + errx(1, + "address family %d not supported", + xraddr->address.sa.sa_family); } faddr->next = NULL; if (prev_faddr == NULL) @@ -532,8 +539,10 @@ gather_sctp(void) if (opt_c) { if ((sock->vflag & vflag) && (!opt_L || - !(local_all_loopback || foreign_all_loopback))) { - hash = (int)((uintptr_t)sock->socket % HASHSIZE); + !(local_all_loopback || + foreign_all_loopback))) { + hash = (int)((uintptr_t)sock->socket % + HASHSIZE); sock->next = sockhash[hash]; sockhash[hash] = sock; } else { @@ -646,13 +655,13 @@ gather_inet(int proto) if ((inp->inp_fport == 0 && !opt_l) || (inp->inp_fport != 0 && !opt_c)) continue; -#define __IN_IS_ADDR_LOOPBACK(pina) \ +#define __IN_IS_ADDR_LOOPBACK(pina) \ ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) if (opt_L && (__IN_IS_ADDR_LOOPBACK(&inp->inp_faddr) || __IN_IS_ADDR_LOOPBACK(&inp->inp_laddr))) continue; -#undef __IN_IS_ADDR_LOOPBACK +#undef __IN_IS_ADDR_LOOPBACK } else if (inp->inp_vflag & INP_IPV6) { if ((inp->inp_fport == 0 && !opt_l) || (inp->inp_fport != 0 && !opt_c)) @@ -1003,7 +1012,7 @@ displaysock(struct sock *s, int pos) case AF_UNIX: if ((laddr == NULL) || (faddr == NULL)) errx(1, "laddr = %p or faddr = %p is NULL", - (void *)laddr, (void *)faddr); + (void *)laddr, (void *)faddr); /* server */ if (laddr->address.ss_len > 0) { pos += printaddr(&laddr->address); @@ -1018,15 +1027,14 @@ displaysock(struct sock *s, int pos) pos += xprintf("-> "); for (hash = 0; hash < HASHSIZE; ++hash) { for (s_tmp = sockhash[hash]; - s_tmp != NULL; - s_tmp = s_tmp->next) + s_tmp != NULL; + s_tmp = s_tmp->next) if (s_tmp->pcb == p) break; if (s_tmp != NULL) break; } - if (s_tmp == NULL || - s_tmp->laddr == NULL || + if (s_tmp == NULL || s_tmp->laddr == NULL || s_tmp->laddr->address.ss_len == 0) pos += xprintf("??"); else @@ -1144,7 +1152,6 @@ static int set_default_protos(void) return (pindex); } - static void usage(void) { From owner-svn-src-all@freebsd.org Tue Feb 21 12:43: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 4D386CE55D3; Tue, 21 Feb 2017 12:43:06 +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 D466B13E5; Tue, 21 Feb 2017 12:43:05 +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 v1LCh5rj071195; Tue, 21 Feb 2017 12:43:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LCh202071172; Tue, 21 Feb 2017 12:43:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702211243.v1LCh202071172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Feb 2017 12:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314040 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi 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, 21 Feb 2017 12:43:06 -0000 Author: hselasky Date: Tue Feb 21 12:43:02 2017 New Revision: 314040 URL: https://svnweb.freebsd.org/changeset/base/314040 Log: Make the LinuxKPI task struct persistent accross system calls. A set of helper functions have been added to manage the life of the LinuxKPI task struct. When an external system call or task is invoked, a check is made to create the task struct by demand. A thread destructor callback is registered to free the task struct when a thread exits to avoid memory leaks. This change lays the ground for emulating the Linux kernel more closely which is a dependency by the code using the LinuxKPI APIs. Add new dedicated td_lkpi_task field has been added to struct thread instead of abusing td_retval[1]. Fix some header file inclusions to make LINT kernel build properly after this change. Bump the __FreeBSD_version to force a rebuild of all kernel modules. MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/src/linux_current.c (contents, props changed) head/sys/compat/linuxkpi/common/src/linux_kthread.c (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h head/sys/compat/linuxkpi/common/include/linux/compat.h head/sys/compat/linuxkpi/common/include/linux/file.h head/sys/compat/linuxkpi/common/include/linux/jiffies.h head/sys/compat/linuxkpi/common/include/linux/kdev_t.h head/sys/compat/linuxkpi/common/include/linux/kernel.h head/sys/compat/linuxkpi/common/include/linux/kthread.h head/sys/compat/linuxkpi/common/include/linux/rwlock.h head/sys/compat/linuxkpi/common/include/linux/rwsem.h head/sys/compat/linuxkpi/common/include/linux/sched.h head/sys/compat/linuxkpi/common/include/linux/semaphore.h head/sys/compat/linuxkpi/common/include/linux/spinlock.h head/sys/compat/linuxkpi/common/include/linux/types.h head/sys/compat/linuxkpi/common/include/linux/wait.h head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/compat/linuxkpi/common/src/linux_pci.c head/sys/conf/files head/sys/modules/linuxkpi/Makefile head/sys/sys/param.h head/sys/sys/proc.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Feb 21 12:43:02 2017 (r314040) @@ -31,6 +31,7 @@ #ifndef _LINUX_BITOPS_H_ #define _LINUX_BITOPS_H_ +#include #include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/compat.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/compat.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/compat.h Tue Feb 21 12:43:02 2017 (r314040) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,29 @@ #ifndef _LINUX_COMPAT_H_ #define _LINUX_COMPAT_H_ +#include +#include +#include + struct thread; struct task_struct; -void linux_set_current(struct thread *td, struct task_struct *t); -void linux_clear_current(struct thread *td); +extern int linux_alloc_current(struct thread *, int flags); +extern void linux_free_current(struct task_struct *); + +static inline void +linux_set_current(struct thread *td) +{ + if (__predict_false(td->td_lkpi_task == NULL)) + linux_alloc_current(td, M_WAITOK); +} + +static inline int +linux_set_current_flags(struct thread *td, int flags) +{ + if (__predict_false(td->td_lkpi_task == NULL)) + return (linux_alloc_current(td, flags)); + return (0); +} #endif /* _LINUX_COMPAT_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/file.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/file.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/file.h Tue Feb 21 12:43:02 2017 (r314040) @@ -39,6 +39,7 @@ #include #include +#include struct linux_file; Modified: head/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/jiffies.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/jiffies.h Tue Feb 21 12:43:02 2017 (r314040) @@ -32,7 +32,6 @@ #define _LINUX_JIFFIES_H_ #include -#include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/kdev_t.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kdev_t.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/kdev_t.h Tue Feb 21 12:43:02 2017 (r314040) @@ -31,6 +31,8 @@ #ifndef _LINUX_KDEV_T_H_ #define _LINUX_KDEV_T_H_ +#include + #define MAJOR(dev) major((dev)) #define MINOR(dev) minor((dev)) #define MKDEV(ma, mi) makedev((ma), (mi)) Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Feb 21 12:43:02 2017 (r314040) @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include Modified: head/sys/compat/linuxkpi/common/include/linux/kthread.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kthread.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/kthread.h Tue Feb 21 12:43:02 2017 (r314040) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,74 +31,27 @@ #ifndef _LINUX_KTHREAD_H_ #define _LINUX_KTHREAD_H_ -#include -#include -#include -#include -#include -#include - -#include #include -static inline void -linux_kthread_fn(void *arg) -{ - struct task_struct *task; - struct thread *td = curthread; - - task = arg; - task_struct_fill(td, task); - task_struct_set(td, task); - if (task->should_stop == 0) - task->task_ret = task->task_fn(task->task_data); - PROC_LOCK(td->td_proc); - task->should_stop = TASK_STOPPED; - wakeup(task); - PROC_UNLOCK(td->td_proc); - task_struct_set(td, NULL); - kthread_exit(); -} - -static inline struct task_struct * -linux_kthread_create(int (*threadfn)(void *data), void *data) -{ - struct task_struct *task; - - task = kzalloc(sizeof(*task), GFP_KERNEL); - task->task_fn = threadfn; - task->task_data = data; - - return (task); -} +#include +#include -#define kthread_run(fn, data, fmt, ...) \ -({ \ - struct task_struct *_task; \ +#define kthread_run(fn, data, fmt, ...) ({ \ + struct task_struct *__task; \ + struct thread *__td; \ \ - _task = linux_kthread_create((fn), (data)); \ - if (kthread_add(linux_kthread_fn, _task, NULL, &_task->task_thread, \ - 0, 0, fmt, ## __VA_ARGS__)) { \ - kfree(_task); \ - _task = NULL; \ - } \ - _task; \ + if (kthread_add(linux_kthread_fn, NULL, NULL, &__td, \ + RFSTOPPED, 0, fmt, ## __VA_ARGS__)) \ + __task = NULL; \ + else \ + __task = linux_kthread_setup_and_run(__td, fn, data); \ + __task; \ }) -#define kthread_should_stop() current->should_stop - -static inline int -kthread_stop(struct task_struct *task) -{ - - PROC_LOCK(task->task_thread->td_proc); - task->should_stop = TASK_SHOULD_STOP; - wake_up_process(task); - while (task->should_stop != TASK_STOPPED) - msleep(task, &task->task_thread->td_proc->p_mtx, PWAIT, - "kstop", hz); - PROC_UNLOCK(task->task_thread->td_proc); - return task->task_ret; -} +extern int kthread_stop(struct task_struct *); +extern bool kthread_should_stop_task(struct task_struct *); +extern bool kthread_should_stop(void); +extern void linux_kthread_fn(void *); +extern struct task_struct *linux_kthread_setup_and_run(struct thread *, linux_task_fn_t *, void *arg); #endif /* _LINUX_KTHREAD_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/rwlock.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rwlock.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/rwlock.h Tue Feb 21 12:43:02 2017 (r314040) @@ -34,6 +34,7 @@ #include #include #include +#include typedef struct { struct rwlock rw; Modified: head/sys/compat/linuxkpi/common/include/linux/rwsem.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rwsem.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/rwsem.h Tue Feb 21 12:43:02 2017 (r314040) @@ -34,6 +34,7 @@ #include #include #include +#include struct rw_semaphore { struct sx sx; Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Tue Feb 21 12:43:02 2017 (r314040) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,12 @@ #include #include +#include +#include +#include + +#include + #define MAX_SCHEDULE_TIMEOUT LONG_MAX #define TASK_RUNNING 0 @@ -46,41 +52,22 @@ #define TASK_WAKEKILL 128 #define TASK_WAKING 256 -#define TASK_SHOULD_STOP 1 -#define TASK_STOPPED 2 - -/* - * A task_struct is only provided for threads created by kthread() and - * file operation callbacks. - * - * Using these routines outside the above mentioned contexts will - * cause panics because no task_struct is assigned and td_retval[1] is - * overwritten by syscalls. - */ struct task_struct { - struct thread *task_thread; - int (*task_fn)(void *data); - void *task_data; + struct thread *task_thread; + linux_task_fn_t *task_fn; + void *task_data; int task_ret; int state; - int should_stop; + atomic_t kthread_flags; pid_t pid; const char *comm; - void *bsd_ioctl_data; - unsigned bsd_ioctl_len; + void *bsd_ioctl_data; + unsigned bsd_ioctl_len; + struct completion parked; + struct completion exited; }; -#define current task_struct_get(curthread) -#define task_struct_get(x) ((struct task_struct *)(uintptr_t)(x)->td_retval[1]) -#define task_struct_fill(x, y) do { \ - (y)->task_thread = (x); \ - (y)->comm = (x)->td_name; \ - (y)->pid = (x)->td_tid; \ -} while (0) -#define task_struct_set(x, y) (x)->td_retval[1] = (uintptr_t)(y) - -/* ensure the task_struct pointer fits into the td_retval[1] field */ -CTASSERT(sizeof(((struct thread *)0)->td_retval[1]) >= sizeof(uintptr_t)); +#define current ((struct task_struct *)curthread->td_lkpi_task) #define set_current_state(x) \ atomic_store_rel_int((volatile int *)¤t->state, (x)) Modified: head/sys/compat/linuxkpi/common/include/linux/semaphore.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/semaphore.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/semaphore.h Tue Feb 21 12:43:02 2017 (r314040) @@ -34,6 +34,7 @@ #include #include #include +#include /* * XXX BSD semaphores are disused and slow. They also do not provide a Modified: head/sys/compat/linuxkpi/common/include/linux/spinlock.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/spinlock.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/spinlock.h Tue Feb 21 12:43:02 2017 (r314040) @@ -35,9 +35,9 @@ #include #include #include +#include #include -#include #include typedef struct { Modified: head/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/types.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/types.h Tue Feb 21 12:43:02 2017 (r314040) @@ -63,4 +63,6 @@ typedef u64 phys_addr_t; #define DECLARE_BITMAP(n, bits) \ unsigned long n[howmany(bits, sizeof(long) * 8)] +typedef int linux_task_fn_t(void *data); + #endif /* _LINUX_TYPES_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/wait.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/include/linux/wait.h Tue Feb 21 12:43:02 2017 (r314040) @@ -32,8 +32,6 @@ #define _LINUX_WAIT_H_ #include -#include -#include #include #include Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Feb 21 12:43:02 2017 (r314040) @@ -384,32 +384,14 @@ kobject_init_and_add(struct kobject *kob return kobject_add_complete(kobj, parent); } -void -linux_set_current(struct thread *td, struct task_struct *t) -{ - memset(t, 0, sizeof(*t)); - task_struct_fill(td, t); - task_struct_set(td, t); -} - -void -linux_clear_current(struct thread *td) -{ - task_struct_set(td, NULL); -} - static void linux_file_dtor(void *cdp) { struct linux_file *filp; - struct task_struct t; - struct thread *td; - td = curthread; + linux_set_current(curthread); filp = cdp; - linux_set_current(td, &t); filp->f_op->release(filp->f_vnode, filp); - linux_clear_current(td); vdrop(filp->f_vnode); kfree(filp); } @@ -419,7 +401,6 @@ linux_dev_open(struct cdev *dev, int ofl { struct linux_cdev *ldev; struct linux_file *filp; - struct task_struct t; struct file *file; int error; @@ -433,7 +414,7 @@ linux_dev_open(struct cdev *dev, int ofl filp->f_flags = file->f_flag; vhold(file->f_vnode); filp->f_vnode = file->f_vnode; - linux_set_current(td, &t); + linux_set_current(td); if (filp->f_op->open) { error = -filp->f_op->open(file->f_vnode, filp); if (error) { @@ -447,7 +428,6 @@ linux_dev_open(struct cdev *dev, int ofl kfree(filp); } done: - linux_clear_current(td); return (error); } @@ -538,7 +518,6 @@ linux_dev_ioctl(struct cdev *dev, u_long { struct linux_cdev *ldev; struct linux_file *filp; - struct task_struct t; struct file *file; unsigned size; int error; @@ -550,7 +529,8 @@ linux_dev_ioctl(struct cdev *dev, u_long if ((error = devfs_get_cdevpriv((void **)&filp)) != 0) return (error); filp->f_flags = file->f_flag; - linux_set_current(td, &t); + + linux_set_current(td); size = IOCPARM_LEN(cmd); /* refer to logic in sys_ioctl() */ if (size > 0) { @@ -560,8 +540,8 @@ linux_dev_ioctl(struct cdev *dev, u_long * Background: Linux code expects a user-space address * while FreeBSD supplies a kernel-space address. */ - t.bsd_ioctl_data = data; - t.bsd_ioctl_len = size; + current->bsd_ioctl_data = data; + current->bsd_ioctl_len = size; data = (void *)LINUX_IOCTL_MIN_PTR; } else { /* fetch user-space pointer */ @@ -571,7 +551,10 @@ linux_dev_ioctl(struct cdev *dev, u_long error = -filp->f_op->unlocked_ioctl(filp, cmd, (u_long)data); else error = ENOTTY; - linux_clear_current(td); + if (size > 0) { + current->bsd_ioctl_data = NULL; + current->bsd_ioctl_len = 0; + } return (error); } @@ -581,7 +564,6 @@ linux_dev_read(struct cdev *dev, struct { struct linux_cdev *ldev; struct linux_file *filp; - struct task_struct t; struct thread *td; struct file *file; ssize_t bytes; @@ -598,7 +580,7 @@ linux_dev_read(struct cdev *dev, struct /* XXX no support for I/O vectors currently */ if (uio->uio_iovcnt != 1) return (EOPNOTSUPP); - linux_set_current(td, &t); + linux_set_current(td); if (filp->f_op->read) { bytes = filp->f_op->read(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); @@ -611,7 +593,6 @@ linux_dev_read(struct cdev *dev, struct error = -bytes; } else error = ENXIO; - linux_clear_current(td); return (error); } @@ -621,7 +602,6 @@ linux_dev_write(struct cdev *dev, struct { struct linux_cdev *ldev; struct linux_file *filp; - struct task_struct t; struct thread *td; struct file *file; ssize_t bytes; @@ -638,7 +618,7 @@ linux_dev_write(struct cdev *dev, struct /* XXX no support for I/O vectors currently */ if (uio->uio_iovcnt != 1) return (EOPNOTSUPP); - linux_set_current(td, &t); + linux_set_current(td); if (filp->f_op->write) { bytes = filp->f_op->write(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); @@ -651,7 +631,6 @@ linux_dev_write(struct cdev *dev, struct error = -bytes; } else error = ENXIO; - linux_clear_current(td); return (error); } @@ -661,7 +640,6 @@ linux_dev_poll(struct cdev *dev, int eve { struct linux_cdev *ldev; struct linux_file *filp; - struct task_struct t; struct file *file; int revents; int error; @@ -673,12 +651,11 @@ linux_dev_poll(struct cdev *dev, int eve if ((error = devfs_get_cdevpriv((void **)&filp)) != 0) return (error); filp->f_flags = file->f_flag; - linux_set_current(td, &t); + linux_set_current(td); if (filp->f_op->poll) revents = filp->f_op->poll(filp, NULL) & events; else revents = 0; - linux_clear_current(td); return (revents); } @@ -690,7 +667,6 @@ linux_dev_mmap_single(struct cdev *dev, struct linux_cdev *ldev; struct linux_file *filp; struct thread *td; - struct task_struct t; struct file *file; struct vm_area_struct vma; int error; @@ -703,7 +679,7 @@ linux_dev_mmap_single(struct cdev *dev, if ((error = devfs_get_cdevpriv((void **)&filp)) != 0) return (error); filp->f_flags = file->f_flag; - linux_set_current(td, &t); + linux_set_current(td); vma.vm_start = 0; vma.vm_end = size; vma.vm_pgoff = *offset / PAGE_SIZE; @@ -735,7 +711,6 @@ linux_dev_mmap_single(struct cdev *dev, } else error = ENODEV; done: - linux_clear_current(td); return (error); } @@ -756,7 +731,6 @@ linux_file_read(struct file *file, struc int flags, struct thread *td) { struct linux_file *filp; - struct task_struct t; ssize_t bytes; int error; @@ -766,7 +740,7 @@ linux_file_read(struct file *file, struc /* XXX no support for I/O vectors currently */ if (uio->uio_iovcnt != 1) return (EOPNOTSUPP); - linux_set_current(td, &t); + linux_set_current(td); if (filp->f_op->read) { bytes = filp->f_op->read(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); @@ -779,7 +753,6 @@ linux_file_read(struct file *file, struc error = -bytes; } else error = ENXIO; - linux_clear_current(td); return (error); } @@ -789,17 +762,15 @@ linux_file_poll(struct file *file, int e struct thread *td) { struct linux_file *filp; - struct task_struct t; int revents; filp = (struct linux_file *)file->f_data; filp->f_flags = file->f_flag; - linux_set_current(td, &t); + linux_set_current(td); if (filp->f_op->poll) revents = filp->f_op->poll(filp, NULL) & events; else revents = 0; - linux_clear_current(td); return (revents); } @@ -808,14 +779,12 @@ static int linux_file_close(struct file *file, struct thread *td) { struct linux_file *filp; - struct task_struct t; int error; filp = (struct linux_file *)file->f_data; filp->f_flags = file->f_flag; - linux_set_current(td, &t); + linux_set_current(td); error = -filp->f_op->release(NULL, filp); - linux_clear_current(td); funsetown(&filp->f_sigio); kfree(filp); @@ -827,14 +796,13 @@ linux_file_ioctl(struct file *fp, u_long struct thread *td) { struct linux_file *filp; - struct task_struct t; int error; filp = (struct linux_file *)fp->f_data; filp->f_flags = fp->f_flag; error = 0; - linux_set_current(td, &t); + linux_set_current(td); switch (cmd) { case FIONBIO: break; @@ -856,7 +824,6 @@ linux_file_ioctl(struct file *fp, u_long error = ENOTTY; break; } - linux_clear_current(td); return (error); } Added: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Tue Feb 21 12:43:02 2017 (r314040) @@ -0,0 +1,94 @@ +/*- + * Copyright (c) 2017 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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 + +static eventhandler_tag linuxkpi_thread_dtor_tag; + +static MALLOC_DEFINE(M_LINUX_CURRENT, "linuxcurrent", "LinuxKPI task structure"); + +int +linux_alloc_current(struct thread *td, int flags) +{ + struct task_struct *ts; + + MPASS(td->td_lkpi_task == NULL); + + ts = malloc(sizeof(*ts), M_LINUX_CURRENT, flags | M_ZERO); + if (ts == NULL) + return (ENOMEM); + + atomic_set(&ts->kthread_flags, 0); + ts->task_thread = td; + ts->comm = td->td_name; + ts->pid = td->td_tid; + ts->state = TASK_RUNNING; + td->td_lkpi_task = ts; + return (0); +} + +void +linux_free_current(struct task_struct *ts) +{ + free(ts, M_LINUX_CURRENT); +} + +static void +linuxkpi_thread_dtor(void *arg __unused, struct thread *td) +{ + struct task_struct *ts; + + ts = td->td_lkpi_task; + if (ts == NULL) + return; + + td->td_lkpi_task = NULL; + free(ts, M_LINUX_CURRENT); +} + +static void +linux_current_init(void *arg __unused) +{ + linuxkpi_thread_dtor_tag = EVENTHANDLER_REGISTER(thread_dtor, + linuxkpi_thread_dtor, NULL, EVENTHANDLER_PRI_ANY); +} +SYSINIT(linux_current, SI_SUB_EVENTHANDLER, SI_ORDER_SECOND, linux_current_init, NULL); + +static void +linux_current_uninit(void *arg __unused) +{ + EVENTHANDLER_DEREGISTER(thread_dtor, linuxkpi_thread_dtor_tag); +} +SYSUNINIT(linux_current, SI_SUB_EVENTHANDLER, SI_ORDER_SECOND, linux_current_uninit, NULL); Added: head/sys/compat/linuxkpi/common/src/linux_kthread.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_kthread.c Tue Feb 21 12:43:02 2017 (r314040) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2017 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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 + +enum { + KTHREAD_SHOULD_STOP_MASK = (1 << 0), + KTHREAD_SHOULD_PARK_MASK = (1 << 1), + KTHREAD_IS_PARKED_MASK = (1 << 2), +}; + +bool +kthread_should_stop_task(struct task_struct *task) +{ + + return (atomic_read(&task->kthread_flags) & KTHREAD_SHOULD_STOP_MASK); +} + +bool +kthread_should_stop(void) +{ + + return (atomic_read(¤t->kthread_flags) & KTHREAD_SHOULD_STOP_MASK); +} + +int +kthread_stop(struct task_struct *task) +{ + int retval; + + /* + * Assume task is still alive else caller should not call + * kthread_stop(): + */ + atomic_or(KTHREAD_SHOULD_STOP_MASK, &task->kthread_flags); + wake_up_process(task); + wait_for_completion(&task->exited); + + /* + * Get return code and free task structure: + */ + retval = task->task_ret; + linux_free_current(task); + + return (retval); +} + +struct task_struct * +linux_kthread_setup_and_run(struct thread *td, linux_task_fn_t *task_fn, void *arg) +{ + struct task_struct *task; + + linux_set_current(td); + + task = td->td_lkpi_task; + task->task_fn = task_fn; + task->task_data = arg; + + thread_lock(td); + /* make sure the scheduler priority is raised */ + sched_prio(td, PI_SWI(SWI_NET)); + /* put thread into run-queue */ + sched_add(td, SRQ_BORING); + thread_unlock(td); + + return (task); +} + +void +linux_kthread_fn(void *arg __unused) +{ + struct task_struct *task = current; + + if (kthread_should_stop_task(task) == 0) + task->task_ret = task->task_fn(task->task_data); + + if (kthread_should_stop_task(task) != 0) { + struct thread *td = curthread; + + /* let kthread_stop() free data */ + td->td_lkpi_task = NULL; + + /* wakeup kthread_stop() */ + complete(&task->exited); + } + kthread_exit(); +} + Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Feb 21 12:43:02 2017 (r314040) @@ -121,12 +121,9 @@ linux_pci_attach(device_t dev) struct pci_dev *pdev; struct pci_driver *pdrv; const struct pci_device_id *id; - struct task_struct t; - struct thread *td; int error; - td = curthread; - linux_set_current(td, &t); + linux_set_current(curthread); pdrv = linux_pci_find(dev, &id); pdev = device_get_softc(dev); pdev->dev.parent = &linux_root_device; @@ -159,7 +156,6 @@ linux_pci_attach(device_t dev) put_device(&pdev->dev); error = -error; } - linux_clear_current(td); return (error); } @@ -167,11 +163,8 @@ static int linux_pci_detach(device_t dev) { struct pci_dev *pdev; - struct task_struct t; - struct thread *td; - td = curthread; - linux_set_current(td, &t); + linux_set_current(curthread); pdev = device_get_softc(dev); DROP_GIANT(); pdev->pdrv->remove(pdev); @@ -180,7 +173,6 @@ linux_pci_detach(device_t dev) list_del(&pdev->links); spin_unlock(&pci_lock); put_device(&pdev->dev); - linux_clear_current(td); return (0); } @@ -190,18 +182,14 @@ linux_pci_suspend(device_t dev) { struct pm_message pm = { }; struct pci_dev *pdev; - struct task_struct t; - struct thread *td; int err; - td = curthread; - linux_set_current(td, &t); + linux_set_current(curthread); pdev = device_get_softc(dev); if (pdev->pdrv->suspend != NULL) err = -pdev->pdrv->suspend(pdev, pm); else err = 0; - linux_clear_current(td); return (err); } @@ -209,18 +197,14 @@ static int linux_pci_resume(device_t dev) { struct pci_dev *pdev; - struct task_struct t; - struct thread *td; int err; - td = curthread; - linux_set_current(td, &t); + linux_set_current(curthread); pdev = device_get_softc(dev); if (pdev->pdrv->resume != NULL) err = -pdev->pdrv->resume(pdev); else err = 0; - linux_clear_current(td); return (err); } @@ -228,18 +212,14 @@ static int linux_pci_shutdown(device_t dev) { struct pci_dev *pdev; - struct task_struct t; - struct thread *td; - td = curthread; - linux_set_current(td, &t); + linux_set_current(curthread); pdev = device_get_softc(dev); if (pdev->pdrv->shutdown != NULL) { DROP_GIANT(); pdev->pdrv->shutdown(pdev); PICKUP_GIANT(); } - linux_clear_current(td); return (0); } @@ -251,6 +231,7 @@ pci_register_driver(struct pci_driver *p bus = devclass_find("pci"); + linux_set_current(curthread); spin_lock(&pci_lock); list_add(&pdrv->links, &pci_drivers); spin_unlock(&pci_lock); Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/conf/files Tue Feb 21 12:43:02 2017 (r314040) @@ -4266,6 +4266,10 @@ compat/linuxkpi/common/src/linux_kmod.c compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_compat.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_current.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \ Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/modules/linuxkpi/Makefile Tue Feb 21 12:43:02 2017 (r314040) @@ -4,6 +4,8 @@ KMOD= linuxkpi SRCS= linux_kmod.c \ linux_compat.c \ + linux_current.c \ + linux_kthread.c \ linux_pci.c \ linux_radix.c \ linux_idr.c \ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/sys/param.h Tue Feb 21 12:43:02 2017 (r314040) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200021 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200022 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Feb 21 12:37:59 2017 (r314039) +++ head/sys/sys/proc.h Tue Feb 21 12:43:02 2017 (r314040) @@ -339,6 +339,7 @@ struct thread { void *td_emuldata; /* Emulator state data */ int td_lastcpu; /* (t) Last cpu we were on. */ int td_oncpu; /* (t) Which cpu we are on. */ + void *td_lkpi_task; /* LinuxKPI task struct pointer */ }; struct thread0_storage { From owner-svn-src-all@freebsd.org Tue Feb 21 12:45: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 EA14ECE5821; Tue, 21 Feb 2017 12:45:57 +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 A94A9171B; Tue, 21 Feb 2017 12:45:57 +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 v1LCju6V071350; Tue, 21 Feb 2017 12:45:56 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LCjujf071349; Tue, 21 Feb 2017 12:45:56 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702211245.v1LCjujf071349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 21 Feb 2017 12:45:56 +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: r314041 - stable/11/usr.sbin/ndp 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, 21 Feb 2017 12:45:58 -0000 Author: garga (ports committer) Date: Tue Feb 21 12:45:56 2017 New Revision: 314041 URL: https://svnweb.freebsd.org/changeset/base/314041 Log: MFC r313737: Fix style(9) Reviewed by: allanjude, vangyzen Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9510 Modified: stable/11/usr.sbin/ndp/ndp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ndp/ndp.c ============================================================================== --- stable/11/usr.sbin/ndp/ndp.c Tue Feb 21 12:43:02 2017 (r314040) +++ stable/11/usr.sbin/ndp/ndp.c Tue Feb 21 12:45:56 2017 (r314041) @@ -109,10 +109,11 @@ #include #include "gmt2local.h" -#define NEXTADDR(w, s) \ - if (rtm->rtm_addrs & (w)) { \ - bcopy((char *)&s, cp, sizeof(s)); cp += SA_SIZE(&s);} - +#define NEXTADDR(w, s) \ + if (rtm->rtm_addrs & (w)) { \ + bcopy((char *)&s, cp, sizeof(s)); \ + cp += SA_SIZE(&s); \ + } static pid_t pid; static int nflag; @@ -529,10 +530,10 @@ delete: printf("cannot locate %s\n", host); return (1); } - /* - * need to reinit the field because it has rt_key - * but we want the actual address - */ + /* + * need to reinit the field because it has rt_key + * but we want the actual address + */ NEXTADDR(RTA_DST, sin_m); rtm->rtm_flags |= RTF_LLDATA; if (rtmsg(RTM_DELETE) == 0) { @@ -604,7 +605,8 @@ again:; rtm = (struct rt_msghdr *)next; sin = (struct sockaddr_in6 *)(rtm + 1); - sdl = (struct sockaddr_dl *)((char *)sin + ALIGN(sin->sin6_len)); + sdl = (struct sockaddr_dl *)((char *)sin + + ALIGN(sin->sin6_len)); /* * Some OSes can produce a route that has the LINK flag but @@ -724,7 +726,7 @@ again:; isrouter ? "R" : "", (rtm->rtm_flags & RTF_ANNOUNCE) ? "p" : ""); } else { -#if 0 /* W and P are mystery even for us */ +#if 0 /* W and P are mystery even for us */ sin = (struct sockaddr_in6 *) (sdl->sdl_len + (char *)sdl); snprintf(flgbuf, sizeof(flgbuf), "%s%s%s%s", @@ -855,7 +857,7 @@ rtmsg(int cmd) rtm->rtm_inits = RTV_EXPIRE; } rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA); -#if 0 /* we don't support ipv6addr/128 type proxying */ +#if 0 /* we don't support ipv6addr/128 type proxying */ if (rtm->rtm_flags & RTF_ANNOUNCE) { rtm->rtm_flags &= ~RTF_HOST; rtm->rtm_addrs |= RTA_NETMASK; @@ -868,7 +870,7 @@ rtmsg(int cmd) NEXTADDR(RTA_DST, sin_m); NEXTADDR(RTA_GATEWAY, sdl_m); -#if 0 /* we don't support ipv6addr/128 type proxying */ +#if 0 /* we don't support ipv6addr/128 type proxying */ memset(&so_mask.sin6_addr, 0xff, sizeof(so_mask.sin6_addr)); NEXTADDR(RTA_NETMASK, so_mask); #endif @@ -913,7 +915,7 @@ ifinfo(char *ifname, int argc, char **ar err(1, "ioctl(SIOCGIFINFO_IN6)"); /* NOTREACHED */ } -#define ND nd.ndi +#define ND nd.ndi newflags = ND.flags; for (i = 0; i < argc; i++) { int clear = 0; @@ -924,35 +926,33 @@ ifinfo(char *ifname, int argc, char **ar cp++; } -#define SETFLAG(s, f) \ - do {\ - if (strcmp(cp, (s)) == 0) {\ - if (clear)\ - newflags &= ~(f);\ - else\ - newflags |= (f);\ - }\ - } while (0) +#define SETFLAG(s, f) do { \ + if (strcmp(cp, (s)) == 0) { \ + if (clear) \ + newflags &= ~(f); \ + else \ + newflags |= (f); \ + } \ +} while (0) /* * XXX: this macro is not 100% correct, in that it matches "nud" against * "nudbogus". But we just let it go since this is minor. */ -#define SETVALUE(f, v) \ - do { \ - char *valptr; \ - unsigned long newval; \ - v = 0; /* unspecified */ \ - if (strncmp(cp, f, strlen(f)) == 0) { \ - valptr = strchr(cp, '='); \ - if (valptr == NULL) \ - err(1, "syntax error in %s field", (f)); \ - errno = 0; \ - newval = strtoul(++valptr, NULL, 0); \ - if (errno) \ - err(1, "syntax error in %s's value", (f)); \ - v = newval; \ - } \ - } while (0) +#define SETVALUE(f, v) do { \ + char *valptr; \ + unsigned long newval; \ + v = 0; /* unspecified */ \ + if (strncmp(cp, f, strlen(f)) == 0) { \ + valptr = strchr(cp, '='); \ + if (valptr == NULL) \ + err(1, "syntax error in %s field", (f)); \ + errno = 0; \ + newval = strtoul(++valptr, NULL, 0); \ + if (errno) \ + err(1, "syntax error in %s's value", (f)); \ + v = newval; \ + } \ +} while (0) SETFLAG("disabled", ND6_IFF_IFDISABLED); SETFLAG("nud", ND6_IFF_PERFORMNUD); @@ -1021,7 +1021,7 @@ ifinfo(char *ifname, int argc, char **ar printf("%02x", rbuf[j]); } } -#endif +#endif /* IPV6CTL_USETEMPADDR */ if (ND.flags) { printf("\nFlags: "); #ifdef ND6_IFF_IFDISABLED @@ -1314,7 +1314,7 @@ getdefif() close(s); } -#endif +#endif /* SIOCSDEFIFACE_IN6 */ static char * sec2str(time_t total) From owner-svn-src-all@freebsd.org Tue Feb 21 12: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 D80C0CE5A8D; Tue, 21 Feb 2017 12:51:46 +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 989B01D3E; Tue, 21 Feb 2017 12:51:46 +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 v1LCpjkH075314; Tue, 21 Feb 2017 12:51:45 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LCpjfM075312; Tue, 21 Feb 2017 12:51:45 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201702211251.v1LCpjfM075312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 21 Feb 2017 12:51: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: r314042 - stable/11/sbin/fsck_ffs 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, 21 Feb 2017 12:51:47 -0000 Author: garga (ports committer) Date: Tue Feb 21 12:51:45 2017 New Revision: 314042 URL: https://svnweb.freebsd.org/changeset/base/314042 Log: MFC r313745: * Add missing parameters to usage() * Add missing parameters to manpage synopsis * Add missing description of -d flag * Sort flags descriptions Reviewed by: allanjude, kib Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9152 Modified: stable/11/sbin/fsck_ffs/fsck_ffs.8 stable/11/sbin/fsck_ffs/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- stable/11/sbin/fsck_ffs/fsck_ffs.8 Tue Feb 21 12:45:56 2017 (r314041) +++ stable/11/sbin/fsck_ffs/fsck_ffs.8 Tue Feb 21 12:51:45 2017 (r314042) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd October 5, 2016 +.Dd February 14, 2017 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl BEFfnpRryZ +.Op Fl BCdEFfnpRrSyZ .Op Fl b Ar block .Op Fl c Ar level .Op Fl m Ar mode @@ -149,45 +149,6 @@ If unexpected errors are found, the file system is marked as needing a foreground check and .Nm exits without attempting any further cleaning. -.It Fl E -Clear unallocated blocks, notifying the underlying device that they -are not used and that their contents may be discarded. -This is useful for filesystems which have been mounted on systems -without TRIM support, or with TRIM support disabled, as well as -filesystems which have been copied from one device to another. -.Pp -See the -.Fl E -and -.Fl t -flags of -.Xr newfs 8 , -and -the -.Fl t -flag of -.Xr tunefs 8 . -.It Fl F -Determine whether the file system needs to be cleaned immediately -in foreground, or if its cleaning can be deferred to background. -To be eligible for background cleaning it must have been running -with soft updates, not have been marked as needing a foreground check, -and be mounted and writable when the background check is to be done. -If these conditions are met, then -.Nm -exits with a zero exit status. -Otherwise it exits with a non-zero exit status. -If the file system is clean, -it will exit with a non-zero exit status so that the clean status -of the file system can be verified and reported during the foreground -checks. -Note that when invoked with the -.Fl F -flag, no cleanups are done. -The only thing that -.Nm -does is to determine whether a foreground or background -check is needed and exit with an appropriate status code. .It Fl b Use the block specified immediately after the flag as the super block for the file system. @@ -243,6 +204,47 @@ first line of output from This option implies the .Fl f flag. +.It Fl d +Enable debugging messages. +.It Fl E +Clear unallocated blocks, notifying the underlying device that they +are not used and that their contents may be discarded. +This is useful for filesystems which have been mounted on systems +without TRIM support, or with TRIM support disabled, as well as +filesystems which have been copied from one device to another. +.Pp +See the +.Fl E +and +.Fl t +flags of +.Xr newfs 8 , +and +the +.Fl t +flag of +.Xr tunefs 8 . +.It Fl F +Determine whether the file system needs to be cleaned immediately +in foreground, or if its cleaning can be deferred to background. +To be eligible for background cleaning it must have been running +with soft updates, not have been marked as needing a foreground check, +and be mounted and writable when the background check is to be done. +If these conditions are met, then +.Nm +exits with a zero exit status. +Otherwise it exits with a non-zero exit status. +If the file system is clean, +it will exit with a non-zero exit status so that the clean status +of the file system can be verified and reported during the foreground +checks. +Note that when invoked with the +.Fl F +flag, no cleanups are done. +The only thing that +.Nm +does is to determine whether a foreground or background +check is needed and exit with an appropriate status code. .It Fl f Force .Nm Modified: stable/11/sbin/fsck_ffs/main.c ============================================================================== --- stable/11/sbin/fsck_ffs/main.c Tue Feb 21 12:45:56 2017 (r314041) +++ stable/11/sbin/fsck_ffs/main.c Tue Feb 21 12:51:45 2017 (r314042) @@ -670,7 +670,7 @@ static void usage(void) { (void) fprintf(stderr, -"usage: %s [-BEFfnpry] [-b block] [-c level] [-m mode] filesystem ...\n", +"usage: %s [-BCdEFfnpRrSyZ] [-b block] [-c level] [-m mode] filesystem ...\n", getprogname()); exit(1); } From owner-svn-src-all@freebsd.org Tue Feb 21 13:23: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 304B4CE66F9; Tue, 21 Feb 2017 13:23:55 +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 E583E17D1; Tue, 21 Feb 2017 13:23:54 +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 v1LDNsFM087422; Tue, 21 Feb 2017 13:23:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LDNrJw087417; Tue, 21 Feb 2017 13:23:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702211323.v1LDNrJw087417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Feb 2017 13:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314043 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 13:23:55 -0000 Author: hselasky Date: Tue Feb 21 13:23:53 2017 New Revision: 314043 URL: https://svnweb.freebsd.org/changeset/base/314043 Log: Add support for LinuxKPI tasklets. Tasklets are implemented using a taskqueue and a small statemachine on top. The additional statemachine is required to ensure all LinuxKPI tasklets get serialized. FreeBSD taskqueues do not guarantee serialisation of its tasks, except when there is only one worker thread configured. MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/linux/bottom_half.h (contents, props changed) head/sys/compat/linuxkpi/common/src/linux_tasklet.c (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h head/sys/conf/files head/sys/modules/linuxkpi/Makefile Added: head/sys/compat/linuxkpi/common/include/linux/bottom_half.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/include/linux/bottom_half.h Tue Feb 21 13:23:53 2017 (r314043) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2017 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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 _LINUX_BOTTOM_HALF_H_ +#define _LINUX_BOTTOM_HALF_H_ + +extern void local_bh_enable(void); +extern void local_bh_disable(void); + +#endif /* _LINUX_BOTTOM_HALF_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Tue Feb 21 12:51:45 2017 (r314042) +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Tue Feb 21 13:23:53 2017 (r314043) @@ -148,4 +148,25 @@ free_irq(unsigned int irq, void *device) kfree(irqe); } +/* + * LinuxKPI tasklet support + */ +typedef void tasklet_func_t(unsigned long); + +struct tasklet_struct { + TAILQ_ENTRY(tasklet_struct) entry; + tasklet_func_t *func; + unsigned long data; +}; + +#define DECLARE_TASKLET(name, func, data) \ +struct tasklet_struct name = { { NULL, NULL }, func, data } + +#define tasklet_hi_schedule(t) tasklet_schedule(t) + +extern void tasklet_schedule(struct tasklet_struct *); +extern void tasklet_kill(struct tasklet_struct *); +extern void tasklet_init(struct tasklet_struct *, tasklet_func_t *, + unsigned long data); + #endif /* _LINUX_INTERRUPT_H_ */ Added: head/sys/compat/linuxkpi/common/src/linux_tasklet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_tasklet.c Tue Feb 21 13:23:53 2017 (r314043) @@ -0,0 +1,183 @@ +/*- + * Copyright (c) 2017 Hans Petter Selasky + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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 + +#define TASKLET_ST_IDLE 0 +#define TASKLET_ST_BUSY 1 +#define TASKLET_ST_EXEC 2 +#define TASKLET_ST_LOOP 3 + +#define TASKLET_ST_CMPSET(ts, old, new) \ + atomic_cmpset_ptr((volatile uintptr_t *)&(ts)->entry.tqe_prev, old, new) + +#define TASKLET_ST_SET(ts, new) \ + atomic_store_rel_ptr((volatile uintptr_t *)&(ts)->entry.tqe_prev, new) + +#define TASKLET_ST_GET(ts) \ + atomic_load_acq_ptr((volatile uintptr_t *)&(ts)->entry.tqe_prev) + +struct tasklet_worker { + struct mtx mtx; + TAILQ_HEAD(, tasklet_struct) head; + struct taskqueue *taskqueue; + struct task task; +} __aligned(CACHE_LINE_SIZE); + +#define TASKLET_WORKER_LOCK(tw) mtx_lock(&(tw)->mtx) +#define TASKLET_WORKER_UNLOCK(tw) mtx_unlock(&(tw)->mtx) + +static struct tasklet_worker tasklet_worker; + +static void +tasklet_handler(void *arg, int pending) +{ + struct tasklet_worker *tw = (struct tasklet_worker *)arg; + struct tasklet_struct *ts; + + linux_set_current(curthread); + + TASKLET_WORKER_LOCK(tw); + local_bh_disable(); /* pin thread to CPU */ + while (1) { + ts = TAILQ_FIRST(&tw->head); + if (ts == NULL) + break; + TAILQ_REMOVE(&tw->head, ts, entry); + + TASKLET_WORKER_UNLOCK(tw); + do { + /* reset executing state */ + TASKLET_ST_SET(ts, TASKLET_ST_EXEC); + + ts->func(ts->data); + + } while (TASKLET_ST_CMPSET(ts, TASKLET_ST_EXEC, TASKLET_ST_IDLE) == 0); + TASKLET_WORKER_LOCK(tw); + } + local_bh_enable(); /* unpin thread from CPU */ + TASKLET_WORKER_UNLOCK(tw); +} + +static void +tasklet_subsystem_init(void *arg __unused) +{ + struct tasklet_worker *tw = &tasklet_worker; + + tw->taskqueue = taskqueue_create("tasklet", M_WAITOK, + taskqueue_thread_enqueue, &tw->taskqueue); + mtx_init(&tw->mtx, "linux_tasklet", NULL, MTX_DEF); + TAILQ_INIT(&tw->head); + TASK_INIT(&tw->task, 0, tasklet_handler, tw); + taskqueue_start_threads(&tw->taskqueue, 1, PI_NET, "tasklet"); +} +SYSINIT(linux_tasklet, SI_SUB_INIT_IF, SI_ORDER_THIRD, tasklet_subsystem_init, NULL); + +static void +tasklet_subsystem_uninit(void *arg __unused) +{ + struct tasklet_worker *tw = &tasklet_worker; + + taskqueue_free(tw->taskqueue); + tw->taskqueue = NULL; + mtx_destroy(&tw->mtx); +} +SYSUNINIT(linux_tasklet, SI_SUB_INIT_IF, SI_ORDER_THIRD, tasklet_subsystem_uninit, NULL); + +void +tasklet_init(struct tasklet_struct *ts, + tasklet_func_t *func, unsigned long data) +{ + ts->entry.tqe_prev = NULL; + ts->entry.tqe_next = NULL; + ts->func = func; + ts->data = data; +} + +void +local_bh_enable(void) +{ + sched_unpin(); +} + +void +local_bh_disable(void) +{ + sched_pin(); +} + +void +tasklet_schedule(struct tasklet_struct *ts) +{ + + if (TASKLET_ST_CMPSET(ts, TASKLET_ST_EXEC, TASKLET_ST_LOOP)) { + /* tasklet_handler() will loop */ + } else if (TASKLET_ST_CMPSET(ts, TASKLET_ST_IDLE, TASKLET_ST_BUSY)) { + struct tasklet_worker *tw = &tasklet_worker; + + /* tasklet_handler() was not queued */ + TASKLET_WORKER_LOCK(tw); + /* enqueue tasklet */ + TAILQ_INSERT_TAIL(&tw->head, ts, entry); + /* schedule worker */ + taskqueue_enqueue(tw->taskqueue, &tw->task); + TASKLET_WORKER_UNLOCK(tw); + } else { + /* + * tasklet_handler() is already executing + * + * If the state is neither EXEC nor IDLE, it is either + * LOOP or BUSY. If the state changed between the two + * CMPSET's above the only possible transitions by + * elimination are LOOP->EXEC and BUSY->EXEC. If a + * EXEC->LOOP transition was missed that is not a + * problem because the callback function is then + * already about to be called again. + */ + } +} + +void +tasklet_kill(struct tasklet_struct *ts) +{ + + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "tasklet_kill() can sleep"); + + /* wait until tasklet is no longer busy */ + while (TASKLET_ST_GET(ts) != TASKLET_ST_IDLE) + pause("W", 1); +} Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Feb 21 12:51:45 2017 (r314042) +++ head/sys/conf/files Tue Feb 21 13:23:53 2017 (r314043) @@ -4272,6 +4272,8 @@ compat/linuxkpi/common/src/linux_kthread compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_tasklet.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_radix.c optional compat_linuxkpi \ Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Tue Feb 21 12:51:45 2017 (r314042) +++ head/sys/modules/linuxkpi/Makefile Tue Feb 21 13:23:53 2017 (r314043) @@ -8,6 +8,7 @@ SRCS= linux_kmod.c \ linux_kthread.c \ linux_pci.c \ linux_radix.c \ + linux_tasklet.c \ linux_idr.c \ linux_usb.c From owner-svn-src-all@freebsd.org Tue Feb 21 13:43: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 B04FCCE6D97; Tue, 21 Feb 2017 13:43:26 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 77CC81C7; Tue, 21 Feb 2017 13:43:26 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 62AF780E6; Tue, 21 Feb 2017 13:43:19 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id ADEFE2E7A; Tue, 21 Feb 2017 14:41:45 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, ngie@FreeBSD.org Subject: Re: svn commit: r313975 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... References: <201702200056.v1K0ulYr085497@repo.freebsd.org> <5910d260-a26f-5f99-ee80-22fb2078bda8@FreeBSD.org> Date: Tue, 21 Feb 2017 14:41:45 +0100 In-Reply-To: <5910d260-a26f-5f99-ee80-22fb2078bda8@FreeBSD.org> (Bryan Drewery's message of "Mon, 20 Feb 2017 16:17:18 -0800") Message-ID: <86wpcjy82u.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 13:43:26 -0000 Bryan Drewery writes: > Did you intend to delete the tests? Yes. It just occurred to me that they should probably be added to ObsoleteFiles.inc... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Tue Feb 21 13:46: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 881CACE6E6E; Tue, 21 Feb 2017 13:46:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2930038A; Tue, 21 Feb 2017 13:46:41 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 18A933C4D65; Wed, 22 Feb 2017 00:46:31 +1100 (AEDT) Date: Wed, 22 Feb 2017 00:46:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: "Pedro F. Giffuni" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... In-Reply-To: Message-ID: <20170221234517.L3157@besplex.bde.org> References: <201702200343.v1K3hCk3060716@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=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=Vr6Wp3CjCwVzRyYK444A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 13:46:42 -0000 On Mon, 20 Feb 2017, Conrad Meyer wrote: > On Sun, Feb 19, 2017 at 7:43 PM, Pedro F. Giffuni wrote: >> ... >> Log: >> sys/dev: Replace zero with NULL for pointers. >> >> Makes things easier to read, plus architectures may set NULL to something >> different than zero. > ... > I like the change for style reasons. > > The comment about architectures with non-zero NULL is a little > misleading, though. This change has no impact on non-zero bit pattern > NULL architectures. The zero pointer value in C is NULL and NULL is > the zero pointer value in C. It may have a bit pattern other than > zero (i.e., printf("%p", NULL) may be non-zero and memset(&p, 0, > sizeof(p)) is bogus in portable code) but assigning the logical zero > value is always legitimate. This is well known. Some details in the above are mis-stated: - that this change has no effect might depend on using prototypes. The changed areas sometimes used NULL for function args near plain 0 in assignments. This is just a larger style bug than using either 0 or NULL consistently, since everything in the kernel uses prototypes. This was a bug in K&R code. Correct K&R has cast 0 or NULL in function args, but this is painful, so nearby assignments shouldn't use the same style. NULL can be: (a) an integer constant expression with value 0. E.g., (2 + 2L - 4ULL) (b) ((void *)(a)) So for unprototypes functions taking a pointer arg, uncast NULL is only correct if NULL happens to be ((void *)(a)) and the type that the function takes is 'void *' or possibly 'qualified void *'. (I forget if there is magic to allow qualifiers.) - there is no such thing as the zero pointer value. There are only null pointer constants. Null pointer constants are (a) and (b) as above. These arq quite different from null pointers. (a) only has value 0 as an integer. Casting this to (void *) gives a pointer, but I think it is still magic, so can have a different representation than when it is converted to a null pointer: np = (void *)0; may either retain all-bits-0 or change them to a nonzero magic value in the cast of 0, then convert to different magic bits (even back to all-bits 0) in np. - printf("%p", NULL) is not just unportable, but undefined in general, since printf() is variadic so this is broken like the unprototyped case. It is undefined even if pointers have all bits 0, since NULL - the changed code retains the style bug of explicit initialization of static null pointers. It is implicitly to null pointer constants which get converted in the same way as integer 0 or NULL. > After all, NULL is just a casted zero value: > > #define NULL ((void *)0) Hmm, that is correct for C, but this is an implementation detail. NULL is actually a convoluted mess: from sys/_null.h X #ifndef NULL X X #if !defined(__cplusplus) X #define NULL ((void *)0) The non-C++ case is now simple, but this defeats the excuse for existence of this file. This file was originally just to support C and allow defining NULL in a central place as 0L for __LP64__ only, while keeping the old definition as 0 for other cases, with extra complications for __KERNEL. Only broken programs noticed the difference. Mainly ones not using prototypes which has mostly gone away before this change was made. The ifdef allowed exposing type errors by changing the definition to weirder ones. 0L for __LP64__ and 0 for !__LP64__ did the reverse. ((void *)0) is even more forgiving, except it exposes the type error of using NULL for integer 0. Eventually the definition was changed to ((void *)0) as above. I don't like this since it only helps broken C programs and is wrong for C++. The file was retained to support C++, and grew messes. X #else X #if __cplusplus >= 201103L X #define NULL nullptr X #elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 X #define NULL __null X #else X #if defined(__LP64__) X #define NULL (0L) The commit that changed the C case to use ((void *)0) was missing parentheses. The commit that fixed this also added parentheses that were not missing to 0L. This remains as a style bug. X #else X #define NULL 0 X #endif /* __LP64__ */ X #endif /* __GNUG__ */ X #endif /* !__cplusplus */ Style bugs: - tab instead of space after #endif - no comment on any #else, and perhaps too comments on too many #endif's. Comments on the inner ifdefs unimprove readabilty, but the set of ifdefs is so convoluted that it is hard to see which #else or #elseif is inner. > Maybe this is moot. I don't believe any architecture FreeBSD actually > supports has non-zero bitpattern NULL, but something weird like CHERI > might. Compilers should do portability checks on it. In fact, the convolutions in this file do little except define nullptr and __null to let compilers do more checking. Only the C++ case even has them. Compilers can do most checks using just the C90 definition of null pointer constants. Bruce From owner-svn-src-all@freebsd.org Tue Feb 21 14:22: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 88AB4CE7B8F; Tue, 21 Feb 2017 14:22:15 +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 4B1461DB9; Tue, 21 Feb 2017 14:22:15 +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 v1LEMEvs012079; Tue, 21 Feb 2017 14:22:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LEMEJC012078; Tue, 21 Feb 2017 14:22:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702211422.v1LEMEJC012078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Feb 2017 14:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314044 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 14:22:15 -0000 Author: hselasky Date: Tue Feb 21 14:22:14 2017 New Revision: 314044 URL: https://svnweb.freebsd.org/changeset/base/314044 Log: Streamline the LinuxKPI spinlock wrappers. 1) Add better spinlock debug names when WITNESS_ALL is defined. 2) Make sure that the calling thread gets bound to the current CPU while a spinlock is locked. Some Linux kernel code depends on that the CPU ID doesn't change while a spinlock is locked. 3) Add support for using LinuxKPI spinlocks during a panic(). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/spinlock.h Modified: head/sys/compat/linuxkpi/common/include/linux/spinlock.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/spinlock.h Tue Feb 21 13:23:53 2017 (r314043) +++ head/sys/compat/linuxkpi/common/include/linux/spinlock.h Tue Feb 21 14:22:14 2017 (r314044) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,36 +35,126 @@ #include #include #include -#include +#include #include #include +#include typedef struct { struct mtx m; } spinlock_t; -#define spin_lock(_l) mtx_lock(&(_l)->m) -#define spin_unlock(_l) mtx_unlock(&(_l)->m) -#define spin_trylock(_l) mtx_trylock(&(_l)->m) -#define spin_lock_nested(_l, _n) mtx_lock_flags(&(_l)->m, MTX_DUPOK) -#define spin_lock_irq(lock) spin_lock(lock) -#define spin_unlock_irq(lock) spin_unlock(lock) -#define spin_lock_irqsave(lock, flags) \ - do {(flags) = 0; spin_lock(lock); } while (0) -#define spin_unlock_irqrestore(lock, flags) \ - do { spin_unlock(lock); } while (0) +/* + * By defining CONFIG_SPIN_SKIP LinuxKPI spinlocks and asserts will be + * skipped during panic(). By default it is disabled due to + * performance reasons. + */ +#ifdef CONFIG_SPIN_SKIP +#define SPIN_SKIP(void) unlikely(SCHEDULER_STOPPED() || kdb_active) +#else +#define SPIN_SKIP(void) 0 +#endif + +#define spin_lock(_l) do { \ + if (SPIN_SKIP()) \ + break; \ + mtx_lock(&(_l)->m); \ + local_bh_disable(); \ +} while (0) + +#define spin_lock_bh(_l) do { \ + spin_lock(_l); \ +} while (0) + +#define spin_lock_irq(_l) do { \ + spin_lock(_l); \ +} while (0) + +#define spin_unlock(_l) do { \ + if (SPIN_SKIP()) \ + break; \ + local_bh_enable(); \ + mtx_unlock(&(_l)->m); \ +} while (0) + +#define spin_unlock_bh(_l) do { \ + spin_unlock(_l); \ +} while (0) + +#define spin_unlock_irq(_l) do { \ + spin_unlock(_l); \ +} while (0) + +#define spin_trylock(_l) ({ \ + int __ret; \ + if (SPIN_SKIP()) { \ + __ret = 1; \ + } else { \ + __ret = mtx_trylock(&(_l)->m); \ + if (likely(__ret != 0)) \ + local_bh_disable(); \ + } \ + __ret; \ +}) + +#define spin_lock_nested(_l, _n) do { \ + if (SPIN_SKIP()) \ + break; \ + mtx_lock_flags(&(_l)->m, MTX_DUPOK); \ + local_bh_disable(); \ +} while (0) + +#define spin_lock_irqsave(_l, flags) do { \ + (flags) = 0; \ + spin_lock(_l); \ +} while (0) + +#define spin_lock_irqsave_nested(_l, flags, _n) do { \ + (flags) = 0; \ + spin_lock_nested(_l, _n); \ +} while (0) + +#define spin_unlock_irqrestore(_l, flags) do { \ + spin_unlock(_l); \ +} while (0) + +#ifdef WITNESS_ALL +/* NOTE: the maximum WITNESS name is 64 chars */ +#define __spin_lock_name(name, file, line) \ + (((const char *){file ":" #line "-" name}) + \ + (sizeof(file) > 16 ? sizeof(file) - 16 : 0)) +#else +#define __spin_lock_name(name, file, line) name +#endif +#define _spin_lock_name(...) __spin_lock_name(__VA_ARGS__) +#define spin_lock_name(name) _spin_lock_name(name, __FILE__, __LINE__) + +#define spin_lock_init(lock) linux_spin_lock_init(lock, spin_lock_name("lnxspin")) + +static inline void +linux_spin_lock_init(spinlock_t *lock, const char *name) +{ + + memset(lock, 0, sizeof(*lock)); + mtx_init(&lock->m, name, NULL, MTX_DEF | MTX_NOWITNESS); +} static inline void -spin_lock_init(spinlock_t *lock) +spin_lock_destroy(spinlock_t *lock) { - memset(&lock->m, 0, sizeof(lock->m)); - mtx_init(&lock->m, "lnxspin", NULL, MTX_DEF | MTX_NOWITNESS); + mtx_destroy(&lock->m); } -#define DEFINE_SPINLOCK(lock) \ - spinlock_t lock; \ - MTX_SYSINIT(lock, &(lock).m, "lnxspin", MTX_DEF) +#define DEFINE_SPINLOCK(lock) \ + spinlock_t lock; \ + MTX_SYSINIT(lock, &(lock).m, spin_lock_name("lnxspin"), MTX_DEF) + +#define assert_spin_locked(_l) do { \ + if (SPIN_SKIP()) \ + break; \ + mtx_assert(&(_l)->m, MA_OWNED); \ +} while (0) -#endif /* _LINUX_SPINLOCK_H_ */ +#endif /* _LINUX_SPINLOCK_H_ */ From owner-svn-src-all@freebsd.org Tue Feb 21 14:31: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 7F861CE7ECE; Tue, 21 Feb 2017 14:31:59 +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 3DC936AC; Tue, 21 Feb 2017 14:31:59 +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 v1LEVwjh016166; Tue, 21 Feb 2017 14:31:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LEVwnP016165; Tue, 21 Feb 2017 14:31:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702211431.v1LEVwnP016165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Feb 2017 14:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314045 - 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: Tue, 21 Feb 2017 14:31:59 -0000 Author: mav Date: Tue Feb 21 14:31:58 2017 New Revision: 314045 URL: https://svnweb.freebsd.org/changeset/base/314045 Log: Remove duplicate INOT allocation. For some reason isp_handle_platform_notify_fc() allocated INOT just before calling isp_handle_platform_target_tmf(), which also allocates INOT. It seems to be a braino introduced in r196008. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Feb 21 14:22:14 2017 (r314044) +++ head/sys/dev/isp/isp_freebsd.c Tue Feb 21 14:31:58 2017 (r314045) @@ -2564,13 +2564,11 @@ isp_handle_platform_notify_fc(ispsoftc_t break; case IN_ABORT_TASK: { - tstate_t *tptr; uint16_t nphdl, lun; uint32_t sid; uint64_t wwn; - atio_private_data_t *atp; fcportdb_t *lp; - struct ccb_immediate_notify *inot = NULL; + isp_notify_t tmp, *nt = &tmp; if (ISP_CAP_SCCFW(isp)) { lun = inp->in_scclun; @@ -2592,47 +2590,25 @@ isp_handle_platform_notify_fc(ispsoftc_t wwn = INI_ANY; sid = PORT_ANY; } - tptr = get_lun_statep(isp, 0, lun); - if (tptr == NULL) { - tptr = get_lun_statep(isp, 0, CAM_LUN_WILDCARD); - if (tptr == NULL) { - isp_prt(isp, ISP_LOGWARN, "ABORT TASK for lun %x, but no tstate", lun); - return; - } - } - atp = isp_find_atpd(isp, tptr, inp->in_seqid); - - if (atp) { - inot = (struct ccb_immediate_notify *) SLIST_FIRST(&tptr->inots); - isp_prt(isp, ISP_LOGTDEBUG0, "ABORT TASK RX_ID %x WWN 0x%016llx state %d", inp->in_seqid, (unsigned long long) wwn, atp->state); - if (inot) { - tptr->inot_count--; - SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, inot->ccb_h.path, "%s: Take FREE INOT count now %d\n", __func__, tptr->inot_count); - } else { - ISP_PATH_PRT(isp, ISP_LOGWARN, tptr->owner, "out of INOT structures\n"); - } - } else { - ISP_PATH_PRT(isp, ISP_LOGWARN, tptr->owner, "abort task RX_ID %x from wwn 0x%016llx, state unknown\n", inp->in_seqid, wwn); - } - if (inot) { - isp_notify_t tmp, *nt = &tmp; - ISP_MEMZERO(nt, sizeof (isp_notify_t)); - nt->nt_hba = isp; - nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn; - nt->nt_wwn = wwn; - nt->nt_nphdl = nphdl; - nt->nt_sid = sid; - nt->nt_did = PORT_ANY; - nt->nt_lun = lun; - nt->nt_need_ack = 1; - nt->nt_channel = 0; - nt->nt_ncode = NT_ABORT_TASK; - nt->nt_lreserved = inot; - isp_handle_platform_target_tmf(isp, nt); - needack = 0; - } - rls_lun_statep(isp, tptr); + isp_prt(isp, ISP_LOGTDEBUG0, "ABORT TASK RX_ID %x WWN 0x%016llx", + inp->in_seqid, (unsigned long long) wwn); + + ISP_MEMZERO(nt, sizeof (isp_notify_t)); + nt->nt_hba = isp; + nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn; + nt->nt_wwn = wwn; + nt->nt_nphdl = nphdl; + nt->nt_sid = sid; + nt->nt_did = PORT_ANY; + nt->nt_lun = lun; + nt->nt_tagval = inp->in_seqid; + nt->nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); + nt->nt_need_ack = 1; + nt->nt_channel = 0; + nt->nt_ncode = NT_ABORT_TASK; + nt->nt_lreserved = inp; + isp_handle_platform_target_tmf(isp, nt); + needack = 0; break; } default: From owner-svn-src-all@freebsd.org Tue Feb 21 14:34: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 B8A77CE8192; Tue, 21 Feb 2017 14:34:39 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 777DFDB1; Tue, 21 Feb 2017 14:34:39 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id ACCF867651; Tue, 21 Feb 2017 09:34:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=bg3zU5NNCQ/O ExeUeP30WI2R8Sw=; b=XL1z8EGnN2xrmdBfbAGvoKQoJ56+WCdvynI4nlDjiuYt sI9/KMfeDwfd90oGUVmzv8BZ0Rm5e1L98A00gSdXMBFKL66PK8wku2tKHrMZcsCo NwvcLJ3LU67IB6IIdR02WhtgaX9oTTdn0BZZgfht0VrwcVUJt7sAk6T+KXSyyeQ= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id A429367650; Tue, 21 Feb 2017 09:34:31 -0500 (EST) Received: from [192.168.1.103] (unknown [24.7.205.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id D1DE56764E; Tue, 21 Feb 2017 09:34:30 -0500 (EST) Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702210937.v1L9bY6V093836@repo.freebsd.org> From: Eric Badger Message-ID: <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> Date: Tue, 21 Feb 2017 08:34:29 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <201702210937.v1L9bY6V093836@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: DB34F036-F842-11E6-A756-A7617B1B28F4-46178211!pb-smtp2.pobox.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 14:34:39 -0000 On 02/21/2017 03:37 AM, Bartek Rutkowski wrote: > Author: robak (ports committer) > Date: Tue Feb 21 09:37:33 2017 > New Revision: 314036 > URL: https://svnweb.freebsd.org/changeset/base/314036 > > Log: > Enable bsdinstall hardening options by default. > > As discussed previously, in order to introduce new OS hardening > defaults, we've added them to bsdinstall in 'off by default' mode. > It has been there for a while, so the next step is to change them > to 'on by defaul' mode, so that in future we could simply enable > them in base OS. > > Reviewed by: brd > Approved by: adrian > Differential Revision: https://reviews.freebsd.org/D9641 > > Modified: > head/usr.sbin/bsdinstall/scripts/hardening > > Modified: head/usr.sbin/bsdinstall/scripts/hardening > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:33:21 2017 (r314035) > +++ head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:37:33 2017 (r314036) > @@ -36,15 +36,15 @@ FEATURES=$( dialog --backtitle "FreeBSD > --title "System Hardening" --nocancel --separate-output \ > --checklist "Choose system security hardening options:" \ > 0 0 0 \ > - "0 hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ > - "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ > - "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ > - "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ > - "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ > - "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ > - "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ > - "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ > - "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ > + "0 hide_uids" "Hide processes running as other users" ${hide_uids:-on} \ > + "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-on} \ > + "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-on} \ > + "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-on} \ > + "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-on} \ > + "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-on} \ > + "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-on} \ > + "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-on} \ > + "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-on} \ > 2>&1 1>&3 ) > exec 3>&- > > Hi Bartek, Thanks for working on making it easier to harden FreeBSD. While defaulting some of these options to "on" seem pretty harmless (e.g. random_pid), others are likely to cause confusion for new and experienced users alike (e.g. proc_debug. I've never used that option before, so I gave it a try. It simply causes gdb to hang when attempting to start a process, with no obvious indication of why). I think more discussion is merited before they are turned on by default; personally I think they have potential to sour a first impression of FreeBSD by making things people are used to doing on other OSes hard. Eric From owner-svn-src-all@freebsd.org Tue Feb 21 14:40: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 CEF92CE8450; Tue, 21 Feb 2017 14:40:03 +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 AF5A914B9; Tue, 21 Feb 2017 14:40:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 036BA741B; Tue, 21 Feb 2017 14:40:02 +0000 (UTC) Date: Tue, 21 Feb 2017 14:40:02 +0000 From: Alexey Dokuchaev To: Eric Badger Cc: Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170221144002.GA87822@FreeBSD.org> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@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: Tue, 21 Feb 2017 14:40:03 -0000 On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: > Thanks for working on making it easier to harden FreeBSD. While > defaulting some of these options to "on" seem pretty harmless (e.g. > random_pid), others are likely to cause confusion for new and > experienced users alike (e.g. proc_debug. I've never used that option > before, so I gave it a try. It simply causes gdb to hang when attempting > to start a process, with no obvious indication of why). I concur. In fact, harmless knobs should probably be turned on by default in FreeBSD itself (i.e., without any "hardening" help from the installer), while more intrusive ones should be opt-in, not opt-out. ./danfe From owner-svn-src-all@freebsd.org Tue Feb 21 14:44: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 C2BEECE88A4; Tue, 21 Feb 2017 14:44:08 +0000 (UTC) (envelope-from kevans91@ksu.edu) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0064.outbound.protection.outlook.com [104.47.38.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE4C61BDC; Tue, 21 Feb 2017 14:44:07 +0000 (UTC) (envelope-from kevans91@ksu.edu) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ksu.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MuNrbYYOx5Uk/zI+eIq7Gc27YUC6NhF0VE9+vb3TqXk=; b=doG8oEyvJQgoe3Wvrt3eEsZF/vqbgx6Tke4AB7O9wZKxn3sZ2Z8pUNAdsnjvnw4bIK5L+qKvA0vbvLpSN1flyS7KVHv7TpSBb9Z9fx7WOLTFHbYAiddCGUD7zJYnHBu+6u9ui5+VbjOMB5vcRiVu1eD6d1vFVxeGZsx6IEIEJxc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kevans91@ksu.edu; Received: from mail-wm0-f47.google.com (74.125.82.47) by BN3PR0501MB1316.namprd05.prod.outlook.com (10.160.183.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.7; Tue, 21 Feb 2017 14:44:02 +0000 Received: by mail-wm0-f47.google.com with SMTP id r141so77389339wmg.1; Tue, 21 Feb 2017 06:44:02 -0800 (PST) X-Gm-Message-State: AMke39luAhlda6vXd/xmnDtBPATjVmFd9PU+h8jnd3SuFiAF23ZcjPP0nclfqKPVPczzwspnPBEifUpMmAPjBA== X-Received: by 10.28.137.203 with SMTP id l194mr25520217wmd.63.1487688230927; Tue, 21 Feb 2017 06:43:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.59.136 with HTTP; Tue, 21 Feb 2017 06:43:30 -0800 (PST) In-Reply-To: <56ca9623-dc6f-41fc-ba81-e7486a4ba8e3@FreeBSD.org> References: <201702171540.v1HFeOAs074991@repo.freebsd.org> <7da9caa5-d938-d2d0-1228-0e8897dc5632@FreeBSD.org> <56ca9623-dc6f-41fc-ba81-e7486a4ba8e3@FreeBSD.org> From: Kyle Evans Date: Tue, 21 Feb 2017 08:43:30 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r313878 - head/sys/kern To: Andriy Gapon CC: Pedro Giffuni , Bryan Drewery , , , Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [74.125.82.47] X-ClientProxiedBy: BN6PR02CA0046.namprd02.prod.outlook.com (10.173.146.160) To BN3PR0501MB1316.namprd05.prod.outlook.com (10.160.183.17) X-MS-Office365-Filtering-Correlation-Id: 5e3e2ca1-c869-4136-2b06-08d45a68141f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0501MB1316; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0501MB1316; 3:jloQ7E2eozIjGBtMl14oCHJN1U4Jwun+vkicGL8EMX9ZsZJw65JiDPlxPvK50uBI7WURnmE36qx2xBoq+koutWtx34EUwJmx5usvROoNsfy0wFCU4dmtOOpHqr9Jcti5799QENIwHeelUjUo6OyFHPheJ9VWKyKLNejyMLWtAtjCzql9vowGZhOeHs+JFPIaPEMm/f7SmGMeBVAr9+9dYZoVSznbqZFVIzV8VgeKoETERZGpV4vNtfUpXuleOYTt5+GXDlPGMwEbh18ty9nGPA==; 25:Cf7C9Qx78BTXiRmf94XFC+tjNkpEy/tDqTxiaAWI/b89GDKHHOxiHYb7CwfhbTc6Peu+s1jwZIBQv6L1kDbQAMjJudURhNAEyDXnDuxx747xB1dnonz2y2ik0ECE4jmpRf9FSDHOmCu9a6+yBfao1p7X9flS0MsJJKww1CBn0KOnws7qvV9zZJ+ukSq3x30cvmYEtCm9x1bhqbfBFe9aEDBBYkHgLS7oeZ7QbgVbTY1/tbSoRSEV66P+NRudM6052XwZ9QVe7z+V2ZwLnA8umv4c4DM1ozKtzpPoS1WL9a7+CW//SjdqqCz7+371y/gOhbasFw5TBMDYuzTu354uiGgJ2tRsvf8iYAGybGCX9AmgS4ueVVYCAleA6bBUzxUr0nz2/Lh/UcaTjvaFMkLyn5cok6Sy1zN4dTgbv7vuvYx6EiEY3VvYEt0aBB1KtJaPrnHx09ouIgAe9x6taGlaTQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0501MB1316; 31:QEKIB7+uQ+vgxWF0bv5tkca83oD7GEEn+R/SNhGl6UlInFrDO7YS0zJw19JEp/ePIJiGjC66IvwMGJlkMgL1m0YcaYCyIw5PVSr6ukjhc8UUFC0tHaPaieV8xyRWAMO7QIswwxKg3tCufyyJCbpR4n6jA+YMmXpbSfdAmYIfVRdwhkuk1MYnzZsTc7s9VfcIb9wsPD9dc4kq11CFIotu7ruIHKYKtqVtVIekK7WORSBvzFJLAWomJmXrB5ppwlDXif3wsIIJmIkr/R3RWl8mbA==; 20:4yvhcrg5cW02BG0Sq8M4Tja2tuVn6pXVd+1RYZjhgP3fDp6A81KKn0Jt/cMwP9JW9ov1EZrVNx+fTI8+zq65YE0nFZHL2taFgqDLcAsT4okDF4VIsiehKgpiUu/6tSK5kzcSAmiJ5pROAgb7NntOsw5KZiCUVDtag+aazBgRo6VYCaGwY4rHYvWauwIsOv+OkCDpAA89oihqd0L68X93EcYU7tbIm7iVLECXYVI4z4d/CnWGxtUc+nLFj/nH8437uds98gkyeWxLF5sgRmYykhMTJ/hzEl2aVsZYMKxCcBAIgC9fN/8rvGiWOxaWPX4saN2oy2zYN3apCXjJbK32Sym6O8KSIKfzMsKxPEX8Bnl4tFM9DKhRpfBYnKCyDXL3/1tiFEy3UqPgen5lky8U4q6CMihC/gPlRx0b2EStDJcqP/j7HtM1FPdibtPTzfxHodyB17kP740X8c6LSznfoCu4k+d3nsVxMw6tCuTaU6dujCoG+9vmn3RVwCNGZLTB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(20161123558025)(6072148); SRVR:BN3PR0501MB1316; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0501MB1316; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0501MB1316; 4:rBjZDfMCgjlJJIXwH+QEmN3+iZG3A7QoxkJznY8bWtwXFf8EQdE5YUs3yLD0CUQypip/JAX5YmVEPYCSVVQs7q44zbu+POPm9DqM6v5bBVZWlwXBKBjOfGN0x7779ZtubQNrVjT4ZVfTVpsvP+f9PBU3ylSU6LvIpcnZoo3Hstlo1dRJzi2cSyD1oN9DwWyu7oX7ofYwQ1epaEjkI+oqA5Z+7xp8yv4IZAtxtHBcor/ryra8zxKUeS9GSFfo/VQbCED7WcdgaTHL2kV2BYtpRHWMJ9Ca10AlWuohO1BkGULl+6MrL2hPeG5u6zbIEPs3KIvILhi78JSFyqS4ENMllgWgbpz+CIC7BXFjce2p5AC0X6sAsOgRdSgpTFndINBgfqNbeKum/PLsTRaETGoLhl8V3j9yzQpZ4GWxxOSTyuuXKuvBww1O81J3A9NUSv9jFQp2ly1r6pL3f1DOjiFQyGH4UiXzEdLwNFzwXu6x3jazP1in8fGqOu12Cqz9lYLFsx+ENJaX9qG72PRkevnuwz+FhAUDw44QSeEgV+XCwdlF/dSwVJ2BAPEo6V5vLt0p4/mDf3GEnT+7vcil4h/VrE6hsGppthIvht+UysHusDA= X-Forefront-PRVS: 0225B0D5BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(199003)(54534003)(24454002)(189002)(377454003)(86362001)(4326007)(53936002)(38730400002)(122856001)(966004)(110136004)(42186005)(101416001)(76176999)(54356999)(105586002)(2950100002)(66066001)(6246003)(23676002)(93516999)(106356001)(93886004)(50986999)(61266001)(47776003)(63696999)(54906002)(229853002)(6916009)(9686003)(498394004)(6306002)(55446002)(5660300001)(97736004)(69596002)(50466002)(92566002)(53546006)(88552002)(68736007)(2906002)(9896002)(54206008)(189998001)(81166006)(81156014)(3846002)(8676002)(61726006)(305945005)(450100001)(6116002)(75432002)(5820100001)(7736002)(55456009); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0501MB1316; H:mail-wm0-f47.google.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: ksu.edu does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjNQUjA1MDFNQjEzMTY7MjM6VGNtNzU4OTltc2NUMGZJZTdBaEZvRnNq?= =?utf-8?B?YlNyWFdaclovY0pmdER1TnZzcytlRXoxbEZKSytXL2xIQ1NJVjVrZktEd01L?= =?utf-8?B?MHRpVHIxYnpTeEVCdmprb29vSUlkd2dBcmZmRUhzZVgxZVlIMUNEaXFKTWg3?= =?utf-8?B?U0lUQzIzMlZ5MWVjNnZoVTBKYXZ3WTBhVDIzUzlYeFNxYTRmZTIwRUZpSzZ4?= =?utf-8?B?WmFlSEI4aWxGVzhHMStJbGkyVTFEbGNjMEMrUkVwcnh5Z2VmUHlMMFdiOUFr?= =?utf-8?B?dlpIRkpzbDRWTnFpZnY2SUt4RFpmaUdURjdvK25QOGNTc1lITHhqRHE2ZURr?= =?utf-8?B?WmRLcG1teUdwM1JPWkU0OHY4dzhwN0VCNEZqeGM4QnBrT1VIT21aS3Z5WUdQ?= =?utf-8?B?U2E2NGNEZHAyckltSEFZK05JNXh5SzZqckJlV1hVZFJuNlM1OGxla01EeDl5?= =?utf-8?B?Q0R5YWJWc1d5MXBlL0t1eUU0c3JrelUrY05TUlRpTFZzazZ5WW1lNVJFSmtV?= =?utf-8?B?N3lLMWMvbGoxRHVCckMrR1BqZGpFZGRENldTNmlnU0lWRk91S1NGS0Q3NFZ5?= =?utf-8?B?K2paWWlUU3ozS2trYmh5ZzdUSmhSRGRkd3UyMmlTQXY2VjFTNGszeDdhbnQr?= =?utf-8?B?VnRWRUUySGJFMmNqL1VYOTcxVzhGc0JRSDhaOUVLcmU5dmdNODZab00wVk1Z?= =?utf-8?B?QmRpOHErMTVVa1VJdmppSWIvRnpkMngxZlcrRllBY0F2c1h5bDBFUHVFS2l4?= =?utf-8?B?M0RTc3RQbDZOVVpGS1hKMkV1NWtWR2FxZk5KT1pLYm5jVUwwTXpTdE5jNEVN?= =?utf-8?B?L0ZGdzFjYm11c01WOEp4ZW9wL2ZtSGJtUndLZ1g1Ri9xNW9GYTI4SnBuWHl2?= =?utf-8?B?NGJpNnFCeFJqQnNxK3dEU2Q1YUNRVzJuV1kwWEV6MUt4aDBLZEhkTytPM1JX?= =?utf-8?B?WTNSUXdLQ29PeVNLdkM1dGhCaVNadG1vQzFWQ0lIb0lkcWwwODNFcVBwdmIw?= =?utf-8?B?dG9uc1NKNUFUZlJyRXFQN0VReGR3WEFoU1dtZC9XaDhPNkhvZllBb3hrcW02?= =?utf-8?B?eXNSa0Q2UndGZ2NQOE9KR1kzUmt3RysrRUoyN2RQcEdUK3krWkVhRElISHNp?= =?utf-8?B?TnY1TGd6QmRzdzBQMEh2YXgvNnQxRzRnQkZ3dVhSSCszZytRUGpXcFRNaGtE?= =?utf-8?B?NmlNV1hZSTBQdGdwbUQzOWswUGRyWFZSTlhBZFB3S2tkNG4xSGhHazd3RUZv?= =?utf-8?B?MzY5WVludXZXWDRVeDdEWUVZSlJQNldrZlZhUE9Nb1MzTEpkdnNwMTN1MitW?= =?utf-8?B?MytobW9VQXRONU1ZOUZaNUVKZVlROUs0RVAwMkFSRmpCZEk2S093Z3VxejJ5?= =?utf-8?B?ZER5c1hUbHA2ZTBzcmxDUkVZc0NyNnJsdHdDOXlYVWlqbG4yQjZReVhORGJL?= =?utf-8?B?TGtmQ1FaZ3E1bE5aTmdDYmhFZDRXbVN1S0RoQys2K1Vpd0M5WnNnNk9pOXNy?= =?utf-8?B?L1l3WW1rV0VmMW9FcEV1SG1wTHR0UUZuaW9HMFRMRy85YmNPQVZTb21DMUlh?= =?utf-8?B?d0JnTkQ2dHdRTkRRNUhnZTkxSDNnUVp2Z3p5YjBJc3BlMVB5Q0VnOUZ3dFF2?= =?utf-8?B?U0g0SnA5dTlMWjFqSWZwWGhMU1l1Vk9OcWIzMlpyY1FDdXljREFPL3I3T2xl?= =?utf-8?B?MHl0d2I3aEZOSGp1OFZpTFNTVCtJazVHWkt6Wi9OTkRROFlqUVdvK2VYc09K?= =?utf-8?B?NkVBQ1pST3hiRXl2TDkvQ2luUzlQc1dVT3Qyc0hWK3FIVDFkbFEvaHl5eFYv?= =?utf-8?B?ajE2TW5TK1RzeGhDUnEvaDVzTEJQeE0rZ3FQQTR5L29WZDlxQU5yR2RYbDRa?= =?utf-8?B?T1dWYyswT0tRNHRydmZCYllZdmJPdTN3ZytFR0FSZnMvUGZIL1NabmxhMkV0?= =?utf-8?B?dm1SWWIwK0l5K0M3M0hxMThQNzlWS2EvRXl4V0YvY2tqVE1qVmlVcFhqV1dT?= =?utf-8?B?aGJWSm5haXZYbWh1TS8vbWpCRUUzeFQzT25BMzhnPT0=?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0501MB1316; 6:vts+JjPUn2v5tEE8XW2dV2l/BArEltnuONxMhmnVt/G8hvxbY3Fop/YC5v+xlmuLj16RlpsoOYefy/zC1tOErf2/4d54roc9WUdWXp8NsVj1N0vh+TnBu1cM7+Xht9aqZTjIXOIqRneVrJze+8YLS0Sjelw1fqi0Vy0g1UGVQnOkfhSMQtLubETfKXVIvAxpzt6VGGil3rVKCgGWtJFFxqMr8dMV5CZOhWVN+9QB2CDRII4fhPT3MlitWFgLktUF5W6Nky7xooZkS6A3XfAIqdIb5m+Eu2qKGF0Fgi6p7P/nRjkpSuUsUR8CDA3nzD0vNs+b034sI649p1uQigZgrFc+UAI2FqOKPaRkU4mwe+zUPD2iPcxLvjA/QoUiC84N1ifYZ5bbMfsVujLQL/Zl8g==; 5:RMe3o9sEcQ4bZI4Lxu8f+fZIdKNzxjLGOh8cghSc51uxWyyN+uoAfHE+dNKuxR0JysNlZNB7zuLS01ITnnFDSjTCcDjLnhmIYWtRxL49syvsNFYZyhtWWdRz95gH78++ErxIlxvLBEUBZwUEpvKk9Q==; 24:GaV5GUK1f2MIkXwScMgU4fQZV3AB6/u5jppsjV20+0wobw6y4a4Y9Z28KQfaxsg4K3VWXeSyUjJMxauTHNP50tIbSuWHU3GKxckO3EKcnGE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0501MB1316; 7:JkqZLVFfyEYlU1zPTUmXjZPxZvjJStsKzaoTpVnOFZU4n1OOTvhk5bWgJ0LgW5XbTtQI8JNgDQ/G6n4NDFtXpdLiJuOJ66bfu0bqKYeqBl8J30B+nETr3lCN+xglTY1iZmuTYviV7TEwzWop58ljVnxVi1ted/qobaRuL7whJ42UIe0CSncPsFP8dfYZ/IgB5/SqTe/le8aVtsudgLRCvDYb75iDQITbSzIlfJbhLuvW+m2aNdkeyOBRHEIiBZMIPKJIyd87atPbKWCibnUyHdzf4DP63QXtVc6HMweMpktEDvfKfolFleFiwfAPPTh1rCkuPqK7T0v4bU2Rmc8jlw==; 20:vXhg18EX7DaFVOf61c49Sfas25eJM8tXaxCeedF9eYvsJtlWfIFJD2xwbDctcCis9y9o02uiQqTog2VfrVBuZgayUN2AUQLCFYB3OknUOjOir3DFQ/IFeBUcOzoE9mjCeEil1s6hfLltGafAQWJRbjW3prUFBB/OCyPYJe1JMc4= X-OriginatorOrg: ksu.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 14:44:02.6768 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1316 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 14:44:08 -0000 On Tue, Feb 21, 2017 at 1:11 AM, Andriy Gapon wrote: > On 21/02/2017 02:42, Pedro Giffuni wrote: >> [...] >> >> As I mentioned in another thread, other svn configurations (ASF, for example) >> permit editing the log message: >> >> http://help.collab.net/index.jsp?topic=/faq/changelog.html > > How well do various svn exporters handle that? > Specifically, svn-> git ? git in general would not handle this well if it's already pushed commits at or after the one you're changing, since a change in commit message requires a change in commit hash. I'd guess that the exporter would be fine with it, but you'd run into problems as it's trying to rewrite history and push to Github. From owner-svn-src-all@freebsd.org Tue Feb 21 15: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 B5845CE8EC6 for ; Tue, 21 Feb 2017 15:05:10 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm5-vm4.bullet.mail.ne1.yahoo.com (nm5-vm4.bullet.mail.ne1.yahoo.com [98.138.91.165]) (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 6AF57CB8 for ; Tue, 21 Feb 2017 15:05:10 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487689508; bh=WD+1NlH/QHRp2pgeTfZJ0m1kQ2JFRIbuJVdNotFOSpU=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=LMM78BpcQdLzCjLh77379a/SOAVVshW2jBL0xB8zEFmO/PeLcWssVM5u2UwGyH8obuTHv+k5F8Ps8/RmqQcBFX8qIb6mQe9EoEHclvgpflwCPZA7QzFyeGo/9bZb+u/1y0zwZ35kzKQsn7n7j354pOQZSs5IVQ7Tlnn72C2p4BpxTJc7EiknNrgdkQF6Rur8AL0YLrX78vifwHxL3Xi4Ch81V9zKGOiDjZv8W9J6ynGJujeLlb55XKXRRUncO2FlvDgtztgF8ly0KKsWHwcD8vgV1ahSYQlFfw4fK2EICd4oAeOBcBsoyl7CHXw0xgpDO0n2cl/M9soUgsL9Nf2C3A== Received: from [98.138.100.117] by nm5.bullet.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 15:05:08 -0000 Received: from [98.138.104.116] by tm108.bullet.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 15:05:08 -0000 Received: from [127.0.0.1] by smtp225.mail.ne1.yahoo.com with NNFMP; 21 Feb 2017 15:05:08 -0000 X-Yahoo-Newman-Id: 744113.46007.bm@smtp225.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tWJ46TIVM1mMzotLfi8S1V7MdS0HkMzmSggCQTSmAPJyMbU GbFyu_Jt2d10DxVqznTvl5xYzQKJ05oT_jD_D4JhRz7srhSQA2BjWIeSOoLM ESTlbcOTvpMlzGEAsxxYl7Qv9vX5DN404ShIZCIpXnG5jS_YTxDWr3OAurFi aGBc0F8TuEYCmaNbohCpZN2xwqkmMhEjxhUHsYkxmD8usvZSxBNxZmITZ_pY MU7ZnIVnzltyAeUSGvFAqvEQ.B9xOwMV1E98F0.xYuNOcVi1.PCZQLlU0zt3 Vf_EYwjqgvfp23Lyj6iu3_bBdJ5rqFNZLnZCqWQZdo3dTUGzHeoDtIZ7ixEo Z5xr5XCaaFoWr9CHpcEZqrYQCvAtfpN483gGaBdL3kX0Jeab6EpEShrzJGq9 Ksov8fSDmfoj96qlbjTFZ29C_okSbpez7EfTK9vsCSDZd3hKH.G4mF5tsoNW yhfp2uJPWgPwoIibUtBM6flSngCAmvSlKG.c95gyMV_n.KDt1vF2.byiL5Wz tT86rExE_1r9BLNcv5NaQ9FPOEb3vP.0gPVqqE9LFC_u5 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r313878 - head/sys/kern To: Andriy Gapon , Bryan Drewery , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201702171540.v1HFeOAs074991@repo.freebsd.org> <7da9caa5-d938-d2d0-1228-0e8897dc5632@FreeBSD.org> <56ca9623-dc6f-41fc-ba81-e7486a4ba8e3@FreeBSD.org> From: Pedro Giffuni Message-ID: <7cd90b98-8749-a775-b5f2-3961e59bf5ed@FreeBSD.org> Date: Tue, 21 Feb 2017 10:07:49 -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: <56ca9623-dc6f-41fc-ba81-e7486a4ba8e3@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: Tue, 21 Feb 2017 15:05:10 -0000 On 2/21/2017 2:11 AM, Andriy Gapon wrote: > On 21/02/2017 02:42, Pedro Giffuni wrote: >> FWIW, >> >> >> On 2/20/2017 7:24 PM, Bryan Drewery wrote: >>> On 2/17/2017 7:40 AM, Mateusz Guzik wrote: >>>> Author: mjg >>>> Date: Fri Feb 17 15:40:24 2017 >>>> New Revision: 313878 >>>> URL: https://svnweb.freebsd.org/changeset/base/313878 >>>> >>>> Log: >>>> mtx: get rid of file/line args from slow paths if they are unused >>>> This denotes changes which went in by accident in r313877. >>> I really wish people would just revert their changes and recommit them >>> properly. The 'svn blame' on the code in r313877 will never show the >>> commit message here (r313878). So a person would only find this >>> explanation if they read 'svn log' on the file, which in the case of >>> sys/kern/kern_mutex.c there are 273 commits for. Are we expected to >>> read 'svn log' (in the future) for all changes in the hopes that a later >>> commit happens to mention it? >>> >>> As someone who so often is 'svn blame'ing code to understand it better >>> and to track regressions, commits like this that explain other commits >>> might as well have never been done. >> As I mentioned in another thread, other svn configurations (ASF, for example) >> permit editing the log message: >> >> http://help.collab.net/index.jsp?topic=/faq/changelog.html > How well do various svn exporters handle that? > Specifically, svn-> git ? > Good point: it doesn't. The change gets ignored but it doesn't break the converter. At least not immediately, the github converter in AOO breaks frequently but it is probably unrelated. Pedro. From owner-svn-src-all@freebsd.org Tue Feb 21 15:15: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 C019ECE823B; Tue, 21 Feb 2017 15:15:53 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::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 8673F14CB; Tue, 21 Feb 2017 15:15:53 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-it0-x232.google.com with SMTP id 203so112102231ith.0; Tue, 21 Feb 2017 07:15:53 -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=7l+h2yXi6MfYR/6KAHv7QQY9boLy+DAY87YWjSYhBgs=; b=D3la0+WXINhE/maYHjC29bIqEvQebYVtGX/16yq5avwm2uCg38Qi+ZjYg06bFsSjTT h0stLNE9C9PA4sYwAcrLFGmU4blH7vRLGxmo9M4Nj2+/VoO5BujOsOs/z/mGYmDxrRns TA5ietJ1JYpBGiL5RVKXLvu19jNbBN8Ae4nd+vdyW+F+/3cEfhElTIDczoVja5x+4Ki3 EQCiGqu52dSfvCULns4FiBhaTmihulCPdImUcvnaQTGFola2Ekltslj6AWFbnZHBascV 47hJ05dZG6rKePWZ5B01b48oPwF3DPyutiuvkKRhQa08PgT9ZKfQ456IgaaflJF1dBMt JS6Q== 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=7l+h2yXi6MfYR/6KAHv7QQY9boLy+DAY87YWjSYhBgs=; b=qswdSgRxJDoojTQLQSb9jQjn+EV83P+6gbvVA2cdzB3T0zfqbUgoq59Y32TTf6iXUv IiiE9bInCEoznemWVD2Vq/xwNkW3WDGBeMVA1i4Uvt4Y4hudfnV+kUxMRhvvlCQFvUoK oTKgtRRBro+3Qbe+3gUVsb6KDPx6IQ2VPu8ngiQ0rgr7henkwr4RCGjsKIGLwgE4hVHb vaQUpdfXIZptvf/oosBOj7WaXhIynkFzChXCw2KeoR8AMKQU1jyktQo+IlFn4l5O5VDL ybW0OYye7/YnnEoEUERTzKS/xLal/KTmtVOSBMMvw8b0QXRsaYaUJa9jGx7BqO/6BIgx VKAQ== X-Gm-Message-State: AMke39mmXC1riTYMiy8fC0yZBIe/dAmTsnny8JMvfBR1g4AsiWOiVRYiyYo4ywhjLwtu6MFhoxPORyzPcJ2tnw== X-Received: by 10.36.25.83 with SMTP id b80mr15870126itb.98.1487690119502; Tue, 21 Feb 2017 07:15:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.190.71 with HTTP; Tue, 21 Feb 2017 07:15:19 -0800 (PST) In-Reply-To: <7cd90b98-8749-a775-b5f2-3961e59bf5ed@FreeBSD.org> References: <201702171540.v1HFeOAs074991@repo.freebsd.org> <7da9caa5-d938-d2d0-1228-0e8897dc5632@FreeBSD.org> <56ca9623-dc6f-41fc-ba81-e7486a4ba8e3@FreeBSD.org> <7cd90b98-8749-a775-b5f2-3961e59bf5ed@FreeBSD.org> From: Ryan Stone Date: Tue, 21 Feb 2017 10:15:19 -0500 Message-ID: Subject: Re: svn commit: r313878 - head/sys/kern To: Pedro Giffuni Cc: Andriy Gapon , Bryan Drewery , "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: Tue, 21 Feb 2017 15:15:53 -0000 On Tue, Feb 21, 2017 at 10:07 AM, Pedro Giffuni wrote: > Good point: it doesn't. > > The change gets ignored but it doesn't break the converter. At least not > immediately, the github converter in AOO breaks frequently but it is > probably unrelated. > It wouldn't "break" the converter but it would prevent reproducible conversions. From owner-svn-src-all@freebsd.org Tue Feb 21 15:57: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 2108ECE8F36; Tue, 21 Feb 2017 15:57:03 +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 E20B81D41; Tue, 21 Feb 2017 15:57:02 +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 v1LFv1lX049487; Tue, 21 Feb 2017 15:57:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LFv1qv049486; Tue, 21 Feb 2017 15:57:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702211557.v1LFv1qv049486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 Feb 2017 15:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314046 - 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: Tue, 21 Feb 2017 15:57:03 -0000 Author: trasz Date: Tue Feb 21 15:57:01 2017 New Revision: 314046 URL: https://svnweb.freebsd.org/changeset/base/314046 Log: Get rid of foo_sys() in linuxulator code. It was commented out, and it would be useless anyway - there is no point in pretending to have block devices; our "block" devices are in fact character ones, and can only be accessed as such. Discussed with: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/compat/linux/linux_stats.c Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Tue Feb 21 14:31:58 2017 (r314045) +++ head/sys/compat/linux/linux_stats.c Tue Feb 21 15:57:01 2017 (r314046) @@ -98,42 +98,6 @@ linux_kern_lstat(struct thread *td, char pathseg, sbp)); } -/* - * XXX: This was removed from newstat_copyout(), and almost identical - * XXX: code was in stat64_copyout(). findcdev() needs to be replaced - * XXX: with something that does lookup and locking properly. - * XXX: When somebody fixes this: please try to avoid duplicating it. - */ -#if 0 -static void -disk_foo(struct somestat *tbuf) -{ - struct cdevsw *cdevsw; - struct cdev *dev; - - /* Lie about disk drives which are character devices - * in FreeBSD but block devices under Linux. - */ - if (S_ISCHR(tbuf.st_mode) && - (dev = findcdev(buf->st_rdev)) != NULL) { - cdevsw = dev_refthread(dev); - if (cdevsw != NULL) { - if (cdevsw->d_flags & D_DISK) { - tbuf.st_mode &= ~S_IFMT; - tbuf.st_mode |= S_IFBLK; - - /* XXX this may not be quite right */ - /* Map major number to 0 */ - tbuf.st_dev = minor(buf->st_dev) & 0xf; - tbuf.st_rdev = buf->st_rdev & 0xff; - } - dev_relthread(dev); - } - } - -} -#endif - static void translate_fd_major_minor(struct thread *td, int fd, struct stat *buf) { From owner-svn-src-all@freebsd.org Tue Feb 21 17:00: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 2663FCE8394; Tue, 21 Feb 2017 17:00:37 +0000 (UTC) (envelope-from bdrewery@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 DB71C1D88; Tue, 21 Feb 2017 17:00:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 1FD0B3C69; Tue, 21 Feb 2017 17:00:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id E94B030E48; Tue, 21 Feb 2017 17:00:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id mSHE1YD21SaA; Tue, 21 Feb 2017 17:00:10 +0000 (UTC) Subject: Re: svn commit: r313909 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7AEDB30E42 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702180507.v1I57rOM008704@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <9e48d2b2-5064-3293-e8e0-b4959f58507b@FreeBSD.org> Date: Tue, 21 Feb 2017 08:59:42 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201702180507.v1I57rOM008704@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 17:00:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t Content-Type: multipart/mixed; boundary="7k03QUvuRuMOUpr5ifn7kqWaP2Sg2mxkI"; protected-headers="v1" From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <9e48d2b2-5064-3293-e8e0-b4959f58507b@FreeBSD.org> Subject: Re: svn commit: r313909 - head/sys/kern References: <201702180507.v1I57rOM008704@repo.freebsd.org> In-Reply-To: <201702180507.v1I57rOM008704@repo.freebsd.org> --7k03QUvuRuMOUpr5ifn7kqWaP2Sg2mxkI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/17/2017 9:07 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Feb 18 05:07:53 2017 > New Revision: 313909 > URL: https://svnweb.freebsd.org/changeset/base/313909 >=20 > Log: > Fix panic with unlocked vnode to vrecycle(). > =20 > MFC after: 2 weeks >=20 > Modified: > head/sys/kern/uipc_mqueue.c >=20 > Modified: head/sys/kern/uipc_mqueue.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/uipc_mqueue.c Sat Feb 18 01:52:10 2017 (r313908) > +++ head/sys/kern/uipc_mqueue.c Sat Feb 18 05:07:53 2017 (r313909) > @@ -714,7 +714,9 @@ do_recycle(void *context, int pending __ > { > struct vnode *vp =3D (struct vnode *)context; > =20 > + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > vrecycle(vp); > + VOP_UNLOCK(vp, 0); > vdrop(vp); > } > =20 >=20 Just looking at this, it seemed questionable and most likely bitrotted. I added the lock to avoid an assertion to unblock me and allow the module to be used by others with INVARIANTS. Most of the vnode handling here is from the initial commit, long before a lot of refactoring around vnode lifecycle management. It does appear to need someone more familiar with vnode handling to go through and clean it up. --=20 Regards, Bryan Drewery --7k03QUvuRuMOUpr5ifn7kqWaP2Sg2mxkI-- --DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t 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 iQEcBAEBAgAGBQJYrHH+AAoJEDXXcbtuRpfPAn0H/iIm6+SBCboLL/G+5A0/8EBb 1hajAQ7RoXJoWYbeNy4XF2EaHUeWTAb/zCxj33l9AeVLTMRUdENCP9fU/YWdvtGZ 0vFB9fcphVJfRGoTq6reY7CUuwBTXItg+9onVV7ntC4s18e7zneSSyW1GTtC+Nt/ KOj0A6DkziphW1UHvMf1X+yapjU1Dc3QVZMKCIzWnRSCc1CN4rUPVZg0ZXsxJBhQ u7pxo6QygIvxNrODdqPPblDsGQJOLUINIhjw0GwT7KgKi4fMNJ4cNpKSXc48CUg9 1MS6OPc2so8uRTzCZ3PQNRHnbvD7eYzhWsg8DFrMNCfsTkXu4L6EB+i99aq4CXc= =yR4F -----END PGP SIGNATURE----- --DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t-- From owner-svn-src-all@freebsd.org Tue Feb 21 17:34: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 E6EABCE8124; Tue, 21 Feb 2017 17:34:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D76B18B8; Tue, 21 Feb 2017 17:34:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LHYRRu090763; Tue, 21 Feb 2017 17:34:27 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LHYRXW090758; Tue, 21 Feb 2017 17:34:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201702211734.v1LHYRXW090758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 21 Feb 2017 17:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314047 - 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: Tue, 21 Feb 2017 17:34:29 -0000 Author: brooks Date: Tue Feb 21 17:34:27 2017 New Revision: 314047 URL: https://svnweb.freebsd.org/changeset/base/314047 Log: Rename BERI_TEMPLATE to std.BERI to be more like other configs. Sponsored by: DARPA, AFRL Added: head/sys/mips/conf/std.BERI - copied, changed from r314046, head/sys/mips/conf/BERI_TEMPLATE Deleted: head/sys/mips/conf/BERI_TEMPLATE Modified: head/sys/mips/conf/BERI_DE4_BASE head/sys/mips/conf/BERI_NETFPGA_MDROOT head/sys/mips/conf/BERI_SIM_BASE head/sys/mips/conf/BERI_SOCKIT Modified: head/sys/mips/conf/BERI_DE4_BASE ============================================================================== --- head/sys/mips/conf/BERI_DE4_BASE Tue Feb 21 15:57:01 2017 (r314046) +++ head/sys/mips/conf/BERI_DE4_BASE Tue Feb 21 17:34:27 2017 (r314047) @@ -7,7 +7,7 @@ # $FreeBSD$ # -include "BERI_TEMPLATE" +include "std.BERI" ident BERI_DE4_BASE Modified: head/sys/mips/conf/BERI_NETFPGA_MDROOT ============================================================================== --- head/sys/mips/conf/BERI_NETFPGA_MDROOT Tue Feb 21 15:57:01 2017 (r314046) +++ head/sys/mips/conf/BERI_NETFPGA_MDROOT Tue Feb 21 17:34:27 2017 (r314047) @@ -6,7 +6,7 @@ # $FreeBSD$ # -include "BERI_TEMPLATE" +include "std.BERI" ident BERI_NETFPGA_MDROOT Modified: head/sys/mips/conf/BERI_SIM_BASE ============================================================================== --- head/sys/mips/conf/BERI_SIM_BASE Tue Feb 21 15:57:01 2017 (r314046) +++ head/sys/mips/conf/BERI_SIM_BASE Tue Feb 21 17:34:27 2017 (r314047) @@ -6,7 +6,7 @@ # $FreeBSD$ # -include "BERI_TEMPLATE" +include "std.BERI" options FDT options FDT_DTB_STATIC Modified: head/sys/mips/conf/BERI_SOCKIT ============================================================================== --- head/sys/mips/conf/BERI_SOCKIT Tue Feb 21 15:57:01 2017 (r314046) +++ head/sys/mips/conf/BERI_SOCKIT Tue Feb 21 17:34:27 2017 (r314047) @@ -7,7 +7,7 @@ # $FreeBSD$ # -include "BERI_TEMPLATE" +include "std.BERI" ident BERI_SOCKIT Copied and modified: head/sys/mips/conf/std.BERI (from r314046, head/sys/mips/conf/BERI_TEMPLATE) ============================================================================== --- head/sys/mips/conf/BERI_TEMPLATE Tue Feb 21 15:57:01 2017 (r314046, copy source) +++ head/sys/mips/conf/std.BERI Tue Feb 21 17:34:27 2017 (r314047) @@ -7,8 +7,6 @@ # $FreeBSD$ # -ident BERI_TEMPLATE - machine mips mips64 cpu CPU_BERI From owner-svn-src-all@freebsd.org Tue Feb 21 17:47: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 86841CE83D3; Tue, 21 Feb 2017 17:47:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ABEF1E31; Tue, 21 Feb 2017 17:47:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LHl9ll094784; Tue, 21 Feb 2017 17:47:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LHl9t1094779; Tue, 21 Feb 2017 17:47:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702211747.v1LHl9t1094779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 17:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314048 - in head/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/fs/zfs 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: Tue, 21 Feb 2017 17:47:10 -0000 Author: avg Date: Tue Feb 21 17:47:08 2017 New Revision: 314048 URL: https://svnweb.freebsd.org/changeset/base/314048 Log: reimplement zfsctl (.zfs) support The current code is written on top of GFS, a library with the generic support for writing filesystems, which was ported from illumos. Because of significant differences between illumos VFS and FreeBSD VFS models, both the GFS and zfsctl code were heavily modified to work on FreeBSD. Nonetheless, they still contain quite a few ugly hacks and bugs. This is a reimplementation of the zfsctl code where the VFS-specific bits are written from scratch and only the code that interacts with the rest of ZFS is reused. Some highlights. We use two types of nodes, static and on-demand. The static nodes are used for permanent directories like .zfs, .zfs/snapshot, etc. The on-demand nodes are used for ephemeral directories that act as snapshot mount points. Initially only static nodes are created. Their vnodes are instantiated when they are looked up. The on-demand nodes and vnodes are instantiated as needed and the nodes are destroyed as soon as the corresponding vnodes are reclaimed. We also try very hard to ensure that uncovered snapshot vnodes do not linger. They are supposed to become inactive as soon as they are uncovered and we try to recycle them immediately. When a filesystem is unmounted all snapshots under .zfs are unmounted first, then all vnodes are flushed and finally the static .zfs nodes are destroyed. There are some changes outside of zfsctl code too. z_ctldir is never used directly (as it is an opaque pointer), zfsctl_root() has to be used instead. The function returns a locked vnode now, so it accepts a lock flags parameter. The function can also fail now, e.g. during force unmounting, whereas previously it was infallible. zfsctl_root_lookup() is retired, instead of it VOP_LOOKUP() on the .zfs vnode (obtained with zfsctl_root) is used. Some ideas are picked from an independent work by will. Reviewed by: asomers, smh MFC after: 1 month Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D7421 Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Tue Feb 21 17:34:27 2017 (r314047) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c Tue Feb 21 17:47:08 2017 (r314048) @@ -196,10 +196,17 @@ mount_snapshot(kthread_t *td, vnode_t ** td->td_ucred = cr; if (error != 0) { + /* + * Clear VI_MOUNT and decrement the use count "atomically", + * under the vnode lock. This is not strictly required, + * but makes it easier to reason about the life-cycle and + * ownership of the covered vnode. + */ + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; VI_UNLOCK(vp); - vrele(vp); + vput(vp); vfs_unbusy(mp); vfs_freeopts(mp->mnt_optnew); vfs_mount_destroy(mp); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Tue Feb 21 17:34:27 2017 (r314047) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h Tue Feb 21 17:47:08 2017 (r314048) @@ -44,7 +44,7 @@ extern "C" { void zfsctl_create(zfsvfs_t *); void zfsctl_destroy(zfsvfs_t *); -vnode_t *zfsctl_root(znode_t *); +int zfsctl_root(zfsvfs_t *, int, vnode_t **); void zfsctl_init(void); void zfsctl_fini(void); boolean_t zfsctl_is_node(vnode_t *); @@ -53,10 +53,6 @@ int zfsctl_rename_snapshot(const char *f int zfsctl_destroy_snapshot(const char *snapname, int force); int zfsctl_umount_snapshots(vfs_t *, int, cred_t *); -int zfsctl_root_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp, - int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct, - int *direntflags, pathname_t *realpnp); - int zfsctl_lookup_objset(vfs_t *vfsp, uint64_t objsetid, zfsvfs_t **zfsvfsp); #define ZFSCTL_INO_ROOT 0x1 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Feb 21 17:34:27 2017 (r314047) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Feb 21 17:47:08 2017 (r314048) @@ -68,7 +68,7 @@ struct zfsvfs { krwlock_t z_teardown_inactive_lock; list_t z_all_znodes; /* all vnodes in the fs */ kmutex_t z_znodes_lock; /* lock for z_all_znodes */ - vnode_t *z_ctldir; /* .zfs directory pointer */ + struct zfsctl_root *z_ctldir; /* .zfs directory pointer */ boolean_t z_show_ctldir; /* expose .zfs in the root dir */ boolean_t z_issnap; /* true if this is a snapshot */ boolean_t z_vscan; /* virus scan on/off */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 21 17:34:27 2017 (r314047) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 21 17:47:08 2017 (r314048) @@ -70,136 +70,249 @@ #include #include #include -#include #include #include +#include #include #include #include -#include +#include #include "zfs_namecheck.h" -typedef struct zfsctl_node { - gfs_dir_t zc_gfs_private; - uint64_t zc_id; - timestruc_t zc_cmtime; /* ctime and mtime, always the same */ -} zfsctl_node_t; - -typedef struct zfsctl_snapdir { - zfsctl_node_t sd_node; - kmutex_t sd_lock; - avl_tree_t sd_snaps; -} zfsctl_snapdir_t; +/* + * "Synthetic" filesystem implementation. + */ -typedef struct { - char *se_name; - vnode_t *se_root; - avl_node_t se_node; -} zfs_snapentry_t; - -static int -snapentry_compare(const void *a, const void *b) -{ - const zfs_snapentry_t *sa = a; - const zfs_snapentry_t *sb = b; - int ret = strcmp(sa->se_name, sb->se_name); - - if (ret < 0) - return (-1); - else if (ret > 0) - return (1); - else - return (0); -} - -#ifdef illumos -vnodeops_t *zfsctl_ops_root; -vnodeops_t *zfsctl_ops_snapdir; -vnodeops_t *zfsctl_ops_snapshot; -vnodeops_t *zfsctl_ops_shares; -vnodeops_t *zfsctl_ops_shares_dir; - -static const fs_operation_def_t zfsctl_tops_root[]; -static const fs_operation_def_t zfsctl_tops_snapdir[]; -static const fs_operation_def_t zfsctl_tops_snapshot[]; -static const fs_operation_def_t zfsctl_tops_shares[]; -#else -static struct vop_vector zfsctl_ops_root; -static struct vop_vector zfsctl_ops_snapdir; -static struct vop_vector zfsctl_ops_snapshot; -static struct vop_vector zfsctl_ops_shares; -static struct vop_vector zfsctl_ops_shares_dir; -#endif +/* + * Assert that A implies B. + */ +#define KASSERT_IMPLY(A, B, msg) KASSERT(!(A) || (B), (msg)); -static vnode_t *zfsctl_mknode_snapdir(vnode_t *); -static vnode_t *zfsctl_mknode_shares(vnode_t *); -static vnode_t *zfsctl_snapshot_mknode(vnode_t *, uint64_t objset); -static int zfsctl_unmount_snap(zfs_snapentry_t *, int, cred_t *); - -#ifdef illumos -static gfs_opsvec_t zfsctl_opsvec[] = { - { ".zfs", zfsctl_tops_root, &zfsctl_ops_root }, - { ".zfs/snapshot", zfsctl_tops_snapdir, &zfsctl_ops_snapdir }, - { ".zfs/snapshot/vnode", zfsctl_tops_snapshot, &zfsctl_ops_snapshot }, - { ".zfs/shares", zfsctl_tops_shares, &zfsctl_ops_shares_dir }, - { ".zfs/shares/vnode", zfsctl_tops_shares, &zfsctl_ops_shares }, - { NULL } -}; -#endif +static MALLOC_DEFINE(M_SFSNODES, "sfs_nodes", "synthetic-fs nodes"); + +typedef struct sfs_node { + char sn_name[ZFS_MAX_DATASET_NAME_LEN]; + uint64_t sn_parent_id; + uint64_t sn_id; +} sfs_node_t; /* - * Root directory elements. We only have two entries - * snapshot and shares. + * Check the parent's ID as well as the node's to account for a chance + * that IDs originating from different domains (snapshot IDs, artifical + * IDs, znode IDs) may clash. */ -static gfs_dirent_t zfsctl_root_entries[] = { - { "snapshot", zfsctl_mknode_snapdir, GFS_CACHE_VNODE }, - { "shares", zfsctl_mknode_shares, GFS_CACHE_VNODE }, - { NULL } -}; +static int +sfs_compare_ids(struct vnode *vp, void *arg) +{ + sfs_node_t *n1 = vp->v_data; + sfs_node_t *n2 = arg; + bool equal; + + equal = n1->sn_id == n2->sn_id && + n1->sn_parent_id == n2->sn_parent_id; + + /* Zero means equality. */ + return (!equal); +} + +static int +sfs_vnode_get(const struct mount *mp, int flags, uint64_t parent_id, + uint64_t id, struct vnode **vpp) +{ + sfs_node_t search; + int err; + + search.sn_id = id; + search.sn_parent_id = parent_id; + err = vfs_hash_get(mp, (u_int)id, flags, curthread, vpp, + sfs_compare_ids, &search); + return (err); +} + +static int +sfs_vnode_insert(struct vnode *vp, int flags, uint64_t parent_id, + uint64_t id, struct vnode **vpp) +{ + int err; + + KASSERT(vp->v_data != NULL, ("sfs_vnode_insert with NULL v_data")); + err = vfs_hash_insert(vp, (u_int)id, flags, curthread, vpp, + sfs_compare_ids, vp->v_data); + return (err); +} + +static void +sfs_vnode_remove(struct vnode *vp) +{ + vfs_hash_remove(vp); +} + +typedef void sfs_vnode_setup_fn(vnode_t *vp, void *arg); + +static int +sfs_vgetx(struct mount *mp, int flags, uint64_t parent_id, uint64_t id, + const char *tag, struct vop_vector *vops, + sfs_vnode_setup_fn setup, void *arg, + struct vnode **vpp) +{ + struct vnode *vp; + int error; + + error = sfs_vnode_get(mp, flags, parent_id, id, vpp); + if (error != 0 || *vpp != NULL) { + KASSERT_IMPLY(error == 0, (*vpp)->v_data != NULL, + "sfs vnode with no data"); + return (error); + } + + /* Allocate a new vnode/inode. */ + error = getnewvnode(tag, mp, vops, &vp); + if (error != 0) { + *vpp = NULL; + return (error); + } + + /* + * Exclusively lock the vnode vnode while it's being constructed. + */ + lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); + error = insmntque(vp, mp); + if (error != 0) { + *vpp = NULL; + return (error); + } + + setup(vp, arg); + + error = sfs_vnode_insert(vp, flags, parent_id, id, vpp); + if (error != 0 || *vpp != NULL) { + KASSERT_IMPLY(error == 0, (*vpp)->v_data != NULL, + "sfs vnode with no data"); + return (error); + } + + *vpp = vp; + return (0); +} + +static void +sfs_print_node(sfs_node_t *node) +{ + printf("\tname = %s\n", node->sn_name); + printf("\tparent_id = %ju\n", (uintmax_t)node->sn_parent_id); + printf("\tid = %ju\n", (uintmax_t)node->sn_id); +} + +static sfs_node_t * +sfs_alloc_node(size_t size, const char *name, uint64_t parent_id, uint64_t id) +{ + struct sfs_node *node; + + KASSERT(strlen(name) < sizeof(node->sn_name), + ("sfs node name is too long")); + KASSERT(size >= sizeof(*node), ("sfs node size is too small")); + node = malloc(size, M_SFSNODES, M_WAITOK | M_ZERO); + strlcpy(node->sn_name, name, sizeof(node->sn_name)); + node->sn_parent_id = parent_id; + node->sn_id = id; + + return (node); +} + +static void +sfs_destroy_node(sfs_node_t *node) +{ + free(node, M_SFSNODES); +} + +static void * +sfs_reclaim_vnode(vnode_t *vp) +{ + sfs_node_t *node; + void *data; + + sfs_vnode_remove(vp); + data = vp->v_data; + vp->v_data = NULL; + return (data); +} + +static int +sfs_readdir_common(uint64_t parent_id, uint64_t id, struct vop_readdir_args *ap, + uio_t *uio, off_t *offp) +{ + struct dirent entry; + int error; + + /* Reset ncookies for subsequent use of vfs_read_dirent. */ + if (ap->a_ncookies != NULL) + *ap->a_ncookies = 0; + + if (uio->uio_resid < sizeof(entry)) + return (SET_ERROR(EINVAL)); + + if (uio->uio_offset < 0) + return (SET_ERROR(EINVAL)); + if (uio->uio_offset == 0) { + entry.d_fileno = id; + entry.d_type = DT_DIR; + entry.d_name[0] = '.'; + entry.d_name[1] = '\0'; + entry.d_namlen = 1; + entry.d_reclen = sizeof(entry); + error = vfs_read_dirent(ap, &entry, uio->uio_offset); + if (error != 0) + return (SET_ERROR(error)); + } + + if (uio->uio_offset < sizeof(entry)) + return (SET_ERROR(EINVAL)); + if (uio->uio_offset == sizeof(entry)) { + entry.d_fileno = parent_id; + entry.d_type = DT_DIR; + entry.d_name[0] = '.'; + entry.d_name[1] = '.'; + entry.d_name[2] = '\0'; + entry.d_namlen = 2; + entry.d_reclen = sizeof(entry); + error = vfs_read_dirent(ap, &entry, uio->uio_offset); + if (error != 0) + return (SET_ERROR(error)); + } -/* include . and .. in the calculation */ -#define NROOT_ENTRIES ((sizeof (zfsctl_root_entries) / \ - sizeof (gfs_dirent_t)) + 1) + if (offp != NULL) + *offp = 2 * sizeof(entry); + return (0); +} /* - * Initialize the various GFS pieces we'll need to create and manipulate .zfs - * directories. This is called from the ZFS init routine, and initializes the - * vnode ops vectors that we'll be using. + * .zfs inode namespace + * + * We need to generate unique inode numbers for all files and directories + * within the .zfs pseudo-filesystem. We use the following scheme: + * + * ENTRY ZFSCTL_INODE + * .zfs 1 + * .zfs/snapshot 2 + * .zfs/snapshot/ objectid(snap) */ +#define ZFSCTL_INO_SNAP(id) (id) + +static struct vop_vector zfsctl_ops_root; +static struct vop_vector zfsctl_ops_snapdir; +static struct vop_vector zfsctl_ops_snapshot; +static struct vop_vector zfsctl_ops_shares_dir; + void zfsctl_init(void) { -#ifdef illumos - VERIFY(gfs_make_opsvec(zfsctl_opsvec) == 0); -#endif } void zfsctl_fini(void) { -#ifdef illumos - /* - * Remove vfsctl vnode ops - */ - if (zfsctl_ops_root) - vn_freevnodeops(zfsctl_ops_root); - if (zfsctl_ops_snapdir) - vn_freevnodeops(zfsctl_ops_snapdir); - if (zfsctl_ops_snapshot) - vn_freevnodeops(zfsctl_ops_snapshot); - if (zfsctl_ops_shares) - vn_freevnodeops(zfsctl_ops_shares); - if (zfsctl_ops_shares_dir) - vn_freevnodeops(zfsctl_ops_shares_dir); - - zfsctl_ops_root = NULL; - zfsctl_ops_snapdir = NULL; - zfsctl_ops_snapshot = NULL; - zfsctl_ops_shares = NULL; - zfsctl_ops_shares_dir = NULL; -#endif /* illumos */ } boolean_t @@ -208,106 +321,114 @@ zfsctl_is_node(vnode_t *vp) return (vn_matchops(vp, zfsctl_ops_root) || vn_matchops(vp, zfsctl_ops_snapdir) || vn_matchops(vp, zfsctl_ops_snapshot) || - vn_matchops(vp, zfsctl_ops_shares) || vn_matchops(vp, zfsctl_ops_shares_dir)); } -/* - * Return the inode number associated with the 'snapshot' or - * 'shares' directory. - */ -/* ARGSUSED */ -static ino64_t -zfsctl_root_inode_cb(vnode_t *vp, int index) -{ - zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - - ASSERT(index < 2); - - if (index == 0) - return (ZFSCTL_INO_SNAPDIR); +typedef struct zfsctl_root { + sfs_node_t node; + sfs_node_t *snapdir; + timestruc_t cmtime; +} zfsctl_root_t; - return (zfsvfs->z_shares_dir); -} /* - * Create the '.zfs' directory. This directory is cached as part of the VFS - * structure. This results in a hold on the vfs_t. The code in zfs_umount() - * therefore checks against a vfs_count of 2 instead of 1. This reference - * is removed when the ctldir is destroyed in the unmount. + * Create the '.zfs' directory. */ void zfsctl_create(zfsvfs_t *zfsvfs) { - vnode_t *vp, *rvp; - zfsctl_node_t *zcp; + zfsctl_root_t *dot_zfs; + sfs_node_t *snapdir; + vnode_t *rvp; uint64_t crtime[2]; ASSERT(zfsvfs->z_ctldir == NULL); - vp = gfs_root_create(sizeof (zfsctl_node_t), zfsvfs->z_vfs, - &zfsctl_ops_root, ZFSCTL_INO_ROOT, zfsctl_root_entries, - zfsctl_root_inode_cb, MAXNAMELEN, NULL, NULL); - zcp = vp->v_data; - zcp->zc_id = ZFSCTL_INO_ROOT; + snapdir = sfs_alloc_node(sizeof(*snapdir), "snapshot", ZFSCTL_INO_ROOT, + ZFSCTL_INO_SNAPDIR); + dot_zfs = (zfsctl_root_t *)sfs_alloc_node(sizeof(*dot_zfs), ".zfs", 0, + ZFSCTL_INO_ROOT); + dot_zfs->snapdir = snapdir; VERIFY(VFS_ROOT(zfsvfs->z_vfs, LK_EXCLUSIVE, &rvp) == 0); VERIFY(0 == sa_lookup(VTOZ(rvp)->z_sa_hdl, SA_ZPL_CRTIME(zfsvfs), - &crtime, sizeof (crtime))); - ZFS_TIME_DECODE(&zcp->zc_cmtime, crtime); - VN_URELE(rvp); - - /* - * We're only faking the fact that we have a root of a filesystem for - * the sake of the GFS interfaces. Undo the flag manipulation it did - * for us. - */ - vp->v_vflag &= ~VV_ROOT; + &crtime, sizeof(crtime))); + ZFS_TIME_DECODE(&dot_zfs->cmtime, crtime); + vput(rvp); - zfsvfs->z_ctldir = vp; - - VOP_UNLOCK(vp, 0); + zfsvfs->z_ctldir = dot_zfs; } /* * Destroy the '.zfs' directory. Only called when the filesystem is unmounted. - * There might still be more references if we were force unmounted, but only - * new zfs_inactive() calls can occur and they don't reference .zfs + * The nodes must not have any associated vnodes by now as they should be + * vflush-ed. */ void zfsctl_destroy(zfsvfs_t *zfsvfs) { - VN_RELE(zfsvfs->z_ctldir); + sfs_destroy_node(zfsvfs->z_ctldir->snapdir); + sfs_destroy_node((sfs_node_t *)zfsvfs->z_ctldir); zfsvfs->z_ctldir = NULL; } -/* - * Given a root znode, retrieve the associated .zfs directory. - * Add a hold to the vnode and return it. - */ -vnode_t * -zfsctl_root(znode_t *zp) +static int +zfsctl_fs_root_vnode(struct mount *mp, void *arg __unused, int flags, + struct vnode **vpp) +{ + return (VFS_ROOT(mp, flags, vpp)); +} + +static void +zfsctl_common_vnode_setup(vnode_t *vp, void *arg) { - ASSERT(zfs_has_ctldir(zp)); - VN_HOLD(zp->z_zfsvfs->z_ctldir); - return (zp->z_zfsvfs->z_ctldir); + ASSERT_VOP_ELOCKED(vp, __func__); + + /* We support shared locking. */ + VN_LOCK_ASHARE(vp); + vp->v_type = VDIR; + vp->v_data = arg; } static int -zfsctl_common_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; +zfsctl_root_vnode(struct mount *mp, void *arg __unused, int flags, + struct vnode **vpp) { - vnode_t *vp = ap->a_vp; - gfs_file_t *fp = vp->v_data; + void *node; + int err; - printf(" parent = %p\n", fp->gfs_parent); - printf(" type = %d\n", fp->gfs_type); - printf(" index = %d\n", fp->gfs_index); - printf(" ino = %ju\n", (uintmax_t)fp->gfs_ino); - return (0); + node = ((zfsvfs_t*)mp->mnt_data)->z_ctldir; + err = sfs_vgetx(mp, flags, 0, ZFSCTL_INO_ROOT, "zfs", &zfsctl_ops_root, + zfsctl_common_vnode_setup, node, vpp); + return (err); +} + +static int +zfsctl_snapdir_vnode(struct mount *mp, void *arg __unused, int flags, + struct vnode **vpp) +{ + void *node; + int err; + + node = ((zfsvfs_t*)mp->mnt_data)->z_ctldir->snapdir; + err = sfs_vgetx(mp, flags, ZFSCTL_INO_ROOT, ZFSCTL_INO_SNAPDIR, "zfs", + &zfsctl_ops_snapdir, zfsctl_common_vnode_setup, node, vpp); + return (err); +} + +/* + * Given a root znode, retrieve the associated .zfs directory. + * Add a hold to the vnode and return it. + */ +int +zfsctl_root(zfsvfs_t *zfsvfs, int flags, vnode_t **vpp) +{ + vnode_t *vp; + int error; + + error = zfsctl_root_vnode(zfsvfs->z_vfs, NULL, flags, vpp); + return (error); } /* @@ -350,18 +471,8 @@ zfsctl_common_access(ap) { accmode_t accmode = ap->a_accmode; -#ifdef TODO - if (flags & V_ACE_MASK) { - if (accmode & ACE_ALL_WRITE_PERMS) - return (SET_ERROR(EACCES)); - } else { -#endif - if (accmode & VWRITE) - return (SET_ERROR(EACCES)); -#ifdef TODO - } -#endif - + if (accmode & VWRITE) + return (SET_ERROR(EACCES)); return (0); } @@ -372,6 +483,9 @@ static void zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) { timestruc_t now; + sfs_node_t *node; + + node = vp->v_data; vap->va_uid = 0; vap->va_gid = 0; @@ -394,6 +508,11 @@ zfsctl_common_getattr(vnode_t *vp, vattr vap->va_atime = now; /* FreeBSD: Reset chflags(2) flags. */ vap->va_flags = 0; + + vap->va_nodeid = node->sn_id; + + /* At least '.' and '..'. */ + vap->va_nlink = 2; } /*ARGSUSED*/ @@ -406,81 +525,46 @@ zfsctl_common_fid(ap) { vnode_t *vp = ap->a_vp; fid_t *fidp = (void *)ap->a_fid; - zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - zfsctl_node_t *zcp = vp->v_data; - uint64_t object = zcp->zc_id; + sfs_node_t *node = vp->v_data; + uint64_t object = node->sn_id; zfid_short_t *zfid; int i; - ZFS_ENTER(zfsvfs); - -#ifdef illumos - if (fidp->fid_len < SHORT_FID_LEN) { - fidp->fid_len = SHORT_FID_LEN; - ZFS_EXIT(zfsvfs); - return (SET_ERROR(ENOSPC)); - } -#endif - zfid = (zfid_short_t *)fidp; - zfid->zf_len = SHORT_FID_LEN; - for (i = 0; i < sizeof (zfid->zf_object); i++) + for (i = 0; i < sizeof(zfid->zf_object); i++) zfid->zf_object[i] = (uint8_t)(object >> (8 * i)); - /* .zfs znodes always have a generation number of 0 */ - for (i = 0; i < sizeof (zfid->zf_gen); i++) + /* .zfs nodes always have a generation number of 0 */ + for (i = 0; i < sizeof(zfid->zf_gen); i++) zfid->zf_gen[i] = 0; - ZFS_EXIT(zfsvfs); return (0); } - -/*ARGSUSED*/ static int -zfsctl_shares_fid(ap) - struct vop_fid_args /* { +zfsctl_common_reclaim(ap) + struct vop_reclaim_args /* { struct vnode *a_vp; - struct fid *a_fid; + struct thread *a_td; } */ *ap; { - vnode_t *vp = ap->a_vp; - fid_t *fidp = (void *)ap->a_fid; - zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - znode_t *dzp; - int error; - - ZFS_ENTER(zfsvfs); - - if (zfsvfs->z_shares_dir == 0) { - ZFS_EXIT(zfsvfs); - return (SET_ERROR(ENOTSUP)); - } - - if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { - error = VOP_FID(ZTOV(dzp), fidp); - VN_RELE(ZTOV(dzp)); - } + vnode_t *vp = ap->a_vp; - ZFS_EXIT(zfsvfs); - return (error); + (void) sfs_reclaim_vnode(vp); + return (0); } -/* - * .zfs inode namespace - * - * We need to generate unique inode numbers for all files and directories - * within the .zfs pseudo-filesystem. We use the following scheme: - * - * ENTRY ZFSCTL_INODE - * .zfs 1 - * .zfs/snapshot 2 - * .zfs/snapshot/ objectid(snap) - */ - -#define ZFSCTL_INO_SNAP(id) (id) +static int +zfsctl_common_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; +{ + sfs_print_node(ap->a_vp->v_data); + return (0); +} /* * Get root directory attributes. @@ -496,156 +580,132 @@ zfsctl_root_getattr(ap) { struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - zfsctl_node_t *zcp = vp->v_data; - - ZFS_ENTER(zfsvfs); - vap->va_nodeid = ZFSCTL_INO_ROOT; - vap->va_nlink = vap->va_size = NROOT_ENTRIES; - vap->va_mtime = vap->va_ctime = zcp->zc_cmtime; - vap->va_birthtime = vap->va_ctime; + zfsctl_root_t *node = vp->v_data; zfsctl_common_getattr(vp, vap); - ZFS_EXIT(zfsvfs); - + vap->va_ctime = node->cmtime; + vap->va_mtime = vap->va_ctime; + vap->va_birthtime = vap->va_ctime; + vap->va_nlink += 1; /* snapdir */ + vap->va_size = vap->va_nlink; return (0); } /* - * Special case the handling of "..". + * When we lookup "." we still can be asked to lock it + * differently, can't we? */ -/* ARGSUSED */ int -zfsctl_root_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp, - int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct, - int *direntflags, pathname_t *realpnp) +zfsctl_relock_dot(vnode_t *dvp, int ltype) { - zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; - int err; - - /* - * No extended attributes allowed under .zfs - */ - if (flags & LOOKUP_XATTR) - return (SET_ERROR(EINVAL)); - - ZFS_ENTER(zfsvfs); - - if (strcmp(nm, "..") == 0) { -#ifdef illumos - err = VFS_ROOT(dvp->v_vfsp, LK_EXCLUSIVE, vpp); -#else - /* - * NB: can not use VFS_ROOT here as it would acquire - * the vnode lock of the parent (root) vnode while - * holding the child's (.zfs) lock. - */ - znode_t *rootzp; - - err = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); - if (err == 0) - *vpp = ZTOV(rootzp); -#endif - } else { - err = gfs_vop_lookup(dvp, nm, vpp, pnp, flags, rdir, - cr, ct, direntflags, realpnp); + vref(dvp); + if (ltype != VOP_ISLOCKED(dvp)) { + if (ltype == LK_EXCLUSIVE) + vn_lock(dvp, LK_UPGRADE | LK_RETRY); + else /* if (ltype == LK_SHARED) */ + vn_lock(dvp, LK_DOWNGRADE | LK_RETRY); + + /* Relock for the "." case may left us with reclaimed vnode. */ + if ((dvp->v_iflag & VI_DOOMED) != 0) { + vrele(dvp); + return (SET_ERROR(ENOENT)); + } } - - ZFS_EXIT(zfsvfs); - - return (err); + return (0); } -static int -zfsctl_freebsd_root_lookup(ap) +/* + * Special case the handling of "..". + */ +int +zfsctl_root_lookup(ap) struct vop_lookup_args /* { struct vnode *a_dvp; struct vnode **a_vpp; struct componentname *a_cnp; } */ *ap; { + struct componentname *cnp = ap->a_cnp; vnode_t *dvp = ap->a_dvp; vnode_t **vpp = ap->a_vpp; cred_t *cr = ap->a_cnp->cn_cred; int flags = ap->a_cnp->cn_flags; int lkflags = ap->a_cnp->cn_lkflags; int nameiop = ap->a_cnp->cn_nameiop; - char nm[NAME_MAX + 1]; int err; + int ltype; - if ((flags & ISLASTCN) && (nameiop == RENAME || nameiop == CREATE)) - return (EOPNOTSUPP); + ASSERT(dvp->v_type == VDIR); - ASSERT(ap->a_cnp->cn_namelen < sizeof(nm)); - strlcpy(nm, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen + 1); -relookup: - err = zfsctl_root_lookup(dvp, nm, vpp, NULL, 0, NULL, cr, NULL, NULL, NULL); - if (err == 0 && (nm[0] != '.' || nm[1] != '\0')) { - if (flags & ISDOTDOT) { - VOP_UNLOCK(dvp, 0); - err = vn_lock(*vpp, lkflags); - if (err != 0) { - vrele(*vpp); - *vpp = NULL; - } - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); - } else { - err = vn_lock(*vpp, LK_EXCLUSIVE); - if (err != 0) { - VERIFY3S(err, ==, ENOENT); - goto relookup; - } - } - } - return (err); -} + if ((flags & ISLASTCN) != 0 && nameiop != LOOKUP) + return (SET_ERROR(ENOTSUP)); -static int -zfsctl_root_print(ap) - struct vop_print_args /* { + if (cnp->cn_namelen == 1 && *cnp->cn_nameptr == '.') { + err = zfsctl_relock_dot(dvp, lkflags & LK_TYPE_MASK); + if (err == 0) + *vpp = dvp; + } else if ((flags & ISDOTDOT) != 0) { + err = vn_vget_ino_gen(dvp, zfsctl_fs_root_vnode, NULL, + lkflags, vpp); + } else if (strncmp(cnp->cn_nameptr, "snapshot", cnp->cn_namelen) == 0) { + err = zfsctl_snapdir_vnode(dvp->v_mount, NULL, lkflags, vpp); + } else { + err = SET_ERROR(ENOENT); + } + if (err != 0) + *vpp = NULL; + return (err); +} + +static int +zfsctl_root_readdir(ap) + struct vop_readdir_args /* { struct vnode *a_vp; + struct uio *a_uio; + struct ucred *a_cred; + int *a_eofflag; + int *ncookies; + u_long **a_cookies; } */ *ap; { - printf(" .zfs node\n"); - zfsctl_common_print(ap); + struct dirent entry; + vnode_t *vp = ap->a_vp; + zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; + zfsctl_root_t *node = vp->v_data; + uio_t *uio = ap->a_uio; + int *eofp = ap->a_eofflag; + off_t dots_offset; + int error; + + ASSERT(vp->v_type == VDIR); + + error = sfs_readdir_common(zfsvfs->z_root, ZFSCTL_INO_ROOT, ap, uio, + &dots_offset); + if (error != 0) { + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; + return (error); + } + if (uio->uio_offset != dots_offset) + return (SET_ERROR(EINVAL)); + + CTASSERT(sizeof(node->snapdir->sn_name) <= sizeof(entry.d_name)); + entry.d_fileno = node->snapdir->sn_id; + entry.d_type = DT_DIR; + strcpy(entry.d_name, node->snapdir->sn_name); + entry.d_namlen = strlen(entry.d_name); + entry.d_reclen = sizeof(entry); + error = vfs_read_dirent(ap, &entry, uio->uio_offset); + if (error != 0) { + if (error == ENAMETOOLONG) + error = 0; + return (SET_ERROR(error)); + } + if (eofp != NULL) + *eofp = 1; return (0); } -#ifdef illumos -static int -zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, - caller_context_t *ct) -{ - /* - * We only care about ACL_ENABLED so that libsec can - * display ACL correctly and not default to POSIX draft. - */ - if (cmd == _PC_ACL_ENABLED) { - *valp = _ACL_ACE_ENABLED; - return (0); - } - - return (fs_pathconf(vp, cmd, valp, cr, ct)); -} -#endif /* illumos */ - -#ifdef illumos -static const fs_operation_def_t zfsctl_tops_root[] = { - { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } }, - { VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } }, - { VOPNAME_IOCTL, { .error = fs_inval } }, - { VOPNAME_GETATTR, { .vop_getattr = zfsctl_root_getattr } }, - { VOPNAME_ACCESS, { .vop_access = zfsctl_common_access } }, - { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } }, - { VOPNAME_LOOKUP, { .vop_lookup = zfsctl_root_lookup } }, - { VOPNAME_SEEK, { .vop_seek = fs_seek } }, - { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } }, - { VOPNAME_PATHCONF, { .vop_pathconf = zfsctl_pathconf } }, - { VOPNAME_FID, { .vop_fid = zfsctl_common_fid } }, - { NULL } -}; -#endif /* illumos */ - static struct vop_vector zfsctl_ops_root = { .vop_default = &default_vnodeops, .vop_open = zfsctl_common_open, @@ -653,29 +713,19 @@ static struct vop_vector zfsctl_ops_root .vop_ioctl = VOP_EINVAL, .vop_getattr = zfsctl_root_getattr, .vop_access = zfsctl_common_access, - .vop_readdir = gfs_vop_readdir, - .vop_lookup = zfsctl_freebsd_root_lookup, + .vop_readdir = zfsctl_root_readdir, + .vop_lookup = zfsctl_root_lookup, .vop_inactive = VOP_NULL, - .vop_reclaim = gfs_vop_reclaim, -#ifdef TODO - .vop_pathconf = zfsctl_pathconf, -#endif + .vop_reclaim = zfsctl_common_reclaim, .vop_fid = zfsctl_common_fid, - .vop_print = zfsctl_root_print, + .vop_print = zfsctl_common_print, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 21 17:54: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 D3CC7CE85A1; Tue, 21 Feb 2017 17:54:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A39C5394; Tue, 21 Feb 2017 17:54:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LHscx5098744; Tue, 21 Feb 2017 17:54:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LHscVI098743; Tue, 21 Feb 2017 17:54:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702211754.v1LHscVI098743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 17:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314049 - 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: Tue, 21 Feb 2017 17:54:39 -0000 Author: avg Date: Tue Feb 21 17:54:38 2017 New Revision: 314049 URL: https://svnweb.freebsd.org/changeset/base/314049 Log: add UPDATING entry for r314048, re-work of .zfs code Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Feb 21 17:47:08 2017 (r314048) +++ head/UPDATING Tue Feb 21 17:54:38 2017 (r314049) @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170221: + The code that provides support for ZFS .zfs/ directory functionality + has been reimplemented. It's not possible now to create a snapshot + by mkdir under .zfs/snapshot/. That should be the only user visible + change. + 20170216: EISA bus support has been removed. The WITH_EISA option is no longer valid. From owner-svn-src-all@freebsd.org Tue Feb 21 18:04: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 39075CE87DD; Tue, 21 Feb 2017 18:04:23 +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 01966AA4; Tue, 21 Feb 2017 18:04: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 v1LI4MgN003079; Tue, 21 Feb 2017 18:04:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LI4Lti003071; Tue, 21 Feb 2017 18:04:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702211804.v1LI4Lti003071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Feb 2017 18:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314050 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 18:04:23 -0000 Author: hselasky Date: Tue Feb 21 18:04:21 2017 New Revision: 314050 URL: https://svnweb.freebsd.org/changeset/base/314050 Log: Replace dummy implementation of RCU in the LinuxKPI with one based on the in-kernel concurrency kit's ck_epoch API. Factor RCU hlist_xxx() functions into own rculist.h header file. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/linux/rculist.h (contents, props changed) head/sys/compat/linuxkpi/common/src/linux_rcu.c (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/linux/rcupdate.h head/sys/compat/linuxkpi/common/include/linux/srcu.h head/sys/compat/linuxkpi/common/include/linux/types.h head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/conf/files head/sys/modules/linuxkpi/Makefile Added: head/sys/compat/linuxkpi/common/include/linux/rculist.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/include/linux/rculist.h Tue Feb 21 18:04:21 2017 (r314050) @@ -0,0 +1,85 @@ +/*- + * Copyright (c) 2015 François Tigeot + * Copyright (c) 2016-2017 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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 _LINUX_RCULIST_H_ +#define _LINUX_RCULIST_H_ + +#include +#include + +#define hlist_first_rcu(head) (*((struct hlist_node **)(&(head)->first))) +#define hlist_next_rcu(node) (*((struct hlist_node **)(&(node)->next))) +#define hlist_pprev_rcu(node) (*((struct hlist_node **)((node)->pprev))) + +static inline void +hlist_add_behind_rcu(struct hlist_node *n, struct hlist_node *prev) +{ + n->next = prev->next; + n->pprev = &prev->next; + rcu_assign_pointer(hlist_next_rcu(prev), n); + if (n->next) + n->next->pprev = &n->next; +} + +#define hlist_for_each_entry_rcu(pos, head, member) \ + hlist_for_each_entry(pos, head, member) + +static inline void +hlist_del_rcu(struct hlist_node *n) +{ + struct hlist_node *next = n->next; + struct hlist_node **pprev = n->pprev; + + WRITE_ONCE(*pprev, next); + if (next) + next->pprev = pprev; +} + +static inline void +hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h) +{ + struct hlist_node *first = h->first; + + n->next = first; + n->pprev = &h->first; + rcu_assign_pointer(hlist_first_rcu(h), n); + if (first) + first->pprev = &n->next; +} + +static inline void +hlist_del_init_rcu(struct hlist_node *n) +{ + if (!hlist_unhashed(n)) { + hlist_del_rcu(n); + n->pprev = NULL; + } +} + +#endif /* _LINUX_RCULIST_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/rcupdate.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rcupdate.h Tue Feb 21 17:54:38 2017 (r314049) +++ head/sys/compat/linuxkpi/common/include/linux/rcupdate.h Tue Feb 21 18:04:21 2017 (r314050) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Mellanox Technologies, Ltd. + * Copyright (c) 2016-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,70 +28,73 @@ #ifndef _LINUX_RCUPDATE_H_ #define _LINUX_RCUPDATE_H_ -#include -#include -#include - -extern struct sx linux_global_rcu_lock; - -struct rcu_head { -}; - -typedef void (*rcu_callback_t)(struct rcu_head *); - -static inline void -call_rcu(struct rcu_head *ptr, rcu_callback_t func) -{ - sx_xlock(&linux_global_rcu_lock); - func(ptr); - sx_xunlock(&linux_global_rcu_lock); -} - -static inline void -rcu_read_lock(void) -{ - sx_slock(&linux_global_rcu_lock); -} - -static inline void -rcu_read_unlock(void) -{ - sx_sunlock(&linux_global_rcu_lock); -} - -static inline void -rcu_barrier(void) -{ - sx_xlock(&linux_global_rcu_lock); - sx_xunlock(&linux_global_rcu_lock); -} - -static inline void -synchronize_rcu(void) -{ - sx_xlock(&linux_global_rcu_lock); - sx_xunlock(&linux_global_rcu_lock); -} - -#define hlist_add_head_rcu(n, h) \ -do { \ - sx_xlock(&linux_global_rcu_lock); \ - hlist_add_head(n, h); \ - sx_xunlock(&linux_global_rcu_lock); \ -} while (0) - -#define hlist_del_init_rcu(n) \ -do { \ - sx_xlock(&linux_global_rcu_lock); \ - hlist_del_init(n); \ - sx_xunlock(&linux_global_rcu_lock); \ -} while (0) - -#define hlist_del_rcu(n) \ -do { \ - sx_xlock(&linux_global_rcu_lock); \ - hlist_del(n); \ - sx_xunlock(&linux_global_rcu_lock); \ +#include +#include + +#include + +#define LINUX_KFREE_RCU_OFFSET_MAX 4096 /* exclusive */ + +#define RCU_INITIALIZER(v) \ + ((typeof(*(v)) __force __rcu *)(v)) + +#define RCU_INIT_POINTER(p, v) do { \ + (p) = (v); \ +} while (0) + +#define call_rcu(ptr, func) do { \ + linux_call_rcu(ptr, func); \ +} while (0) + +#define rcu_barrier(void) do { \ + linux_rcu_barrier(); \ +} while (0) + +#define rcu_read_lock(void) do { \ + linux_rcu_read_lock(); \ +} while (0) + +#define rcu_read_unlock(void) do { \ + linux_rcu_read_unlock(); \ +} while (0) + +#define synchronize_rcu(void) do { \ + linux_synchronize_rcu(); \ +} while (0) + +#define synchronize_rcu_expedited(void) do { \ + linux_synchronize_rcu(); \ } while (0) +#define kfree_rcu(ptr, rcu_head) do { \ + CTASSERT(offsetof(__typeof(*(ptr)), rcu_head) < \ + LINUX_KFREE_RCU_OFFSET_MAX); \ + call_rcu(&(ptr)->rcu_head, (rcu_callback_t)(uintptr_t) \ + offsetof(__typeof(*(ptr)), rcu_head)); \ +} while (0) + +#define rcu_access_pointer(p) \ + ((typeof(*p) __force __kernel *)(READ_ONCE(p))) + +#define rcu_dereference_protected(p, c) \ + ((typeof(*p) __force __kernel *)(p)) + +#define rcu_dereference(p) \ + rcu_dereference_protected(p, 0) + +#define rcu_pointer_handoff(p) (p) + +#define rcu_assign_pointer(p, v) do { \ + atomic_store_rel_ptr((volatile uintptr_t *)&(p), \ + (uintptr_t)(v)); \ +} while (0) + +/* prototypes */ + +extern void linux_call_rcu(struct rcu_head *ptr, rcu_callback_t func); +extern void linux_rcu_barrier(void); +extern void linux_rcu_read_lock(void); +extern void linux_rcu_read_unlock(void); +extern void linux_synchronize_rcu(void); + #endif /* _LINUX_RCUPDATE_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/srcu.h Tue Feb 21 17:54:38 2017 (r314049) +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h Tue Feb 21 18:04:21 2017 (r314050) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,48 +25,22 @@ * * $FreeBSD$ */ + #ifndef _LINUX_SRCU_H_ #define _LINUX_SRCU_H_ -#include -#include -#include - +struct ck_epoch_record; struct srcu_struct { - struct sx sx; + struct ck_epoch_record *ss_epoch_record; }; -static inline int -init_srcu_struct(struct srcu_struct *srcu) -{ - sx_init(&srcu->sx, "SleepableRCU"); - return (0); -} - -static inline void -cleanup_srcu_struct(struct srcu_struct *srcu) -{ - sx_destroy(&srcu->sx); -} - -static inline int -srcu_read_lock(struct srcu_struct *srcu) -{ - sx_slock(&srcu->sx); - return (0); -} - -static inline void -srcu_read_unlock(struct srcu_struct *srcu, int key) -{ - sx_sunlock(&srcu->sx); -} +/* prototypes */ -static inline void -synchronize_srcu(struct srcu_struct *srcu) -{ - sx_xlock(&srcu->sx); - sx_xunlock(&srcu->sx); -} +extern int srcu_read_lock(struct srcu_struct *); +extern void srcu_read_unlock(struct srcu_struct *, int index); +extern void synchronize_srcu(struct srcu_struct *); +extern int init_srcu_struct(struct srcu_struct *); +extern void cleanup_srcu_struct(struct srcu_struct *); +extern void srcu_barrier(struct srcu_struct *); #endif /* _LINUX_SRCU_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/types.h Tue Feb 21 17:54:38 2017 (r314049) +++ head/sys/compat/linuxkpi/common/include/linux/types.h Tue Feb 21 18:04:21 2017 (r314050) @@ -63,6 +63,12 @@ typedef u64 phys_addr_t; #define DECLARE_BITMAP(n, bits) \ unsigned long n[howmany(bits, sizeof(long) * 8)] +struct rcu_head { + void *raw[8]; +} __aligned(sizeof(void *)); + +typedef void (*rcu_callback_t)(struct rcu_head *head); +typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func); typedef int linux_task_fn_t(void *data); #endif /* _LINUX_TYPES_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Feb 21 17:54:38 2017 (r314049) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Feb 21 18:04:21 2017 (r314050) @@ -96,7 +96,6 @@ struct list_head pci_drivers; struct list_head pci_devices; struct net init_net; spinlock_t pci_lock; -struct sx linux_global_rcu_lock; unsigned long linux_timer_hz_mask; @@ -1474,7 +1473,6 @@ linux_compat_init(void *arg) #if defined(__i386__) || defined(__amd64__) linux_cpu_has_clflush = (cpu_feature & CPUID_CLFSH); #endif - sx_init(&linux_global_rcu_lock, "LinuxGlobalRCU"); rootoid = SYSCTL_ADD_ROOT_NODE(NULL, OID_AUTO, "sys", CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, "sys"); @@ -1507,7 +1505,6 @@ linux_compat_uninit(void *arg) linux_kobject_kfree_name(&linux_class_misc.kobj); synchronize_rcu(); - sx_destroy(&linux_global_rcu_lock); } SYSUNINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_uninit, NULL); Added: head/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_rcu.c Tue Feb 21 18:04:21 2017 (r314050) @@ -0,0 +1,259 @@ +/*- + * Copyright (c) 2016 Matt Macy (mmacy@nextbsd.org) + * 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 unmodified, 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 + +struct callback_head { + ck_epoch_entry_t epoch_entry; + rcu_callback_t func; + ck_epoch_record_t *epoch_record; + struct task task; +}; + +/* + * Verify that "struct rcu_head" is big enough to hold "struct + * callback_head". This has been done to avoid having to add special + * compile flags for including ck_epoch.h to all clients of the + * LinuxKPI. + */ +CTASSERT(sizeof(struct rcu_head) >= sizeof(struct callback_head)); + +static ck_epoch_t linux_epoch; +static MALLOC_DEFINE(M_LRCU, "lrcu", "Linux RCU"); +static DPCPU_DEFINE(ck_epoch_record_t *, epoch_record); + +static void +linux_rcu_runtime_init(void *arg __unused) +{ + ck_epoch_record_t **pcpu_record; + ck_epoch_record_t *record; + int i; + + ck_epoch_init(&linux_epoch); + + CPU_FOREACH(i) { + record = malloc(sizeof(*record), M_LRCU, M_WAITOK | M_ZERO); + ck_epoch_register(&linux_epoch, record); + pcpu_record = DPCPU_ID_PTR(i, epoch_record); + *pcpu_record = record; + } + + /* + * Populate the epoch with 5 * ncpus # of records + */ + for (i = 0; i < 5 * mp_ncpus; i++) { + record = malloc(sizeof(*record), M_LRCU, M_WAITOK | M_ZERO); + ck_epoch_register(&linux_epoch, record); + ck_epoch_unregister(record); + } +} +SYSINIT(linux_rcu_runtime, SI_SUB_LOCK, SI_ORDER_SECOND, linux_rcu_runtime_init, NULL); + +static void +linux_rcu_runtime_uninit(void *arg __unused) +{ + ck_epoch_record_t **pcpu_record; + ck_epoch_record_t *record; + int i; + + while ((record = ck_epoch_recycle(&linux_epoch)) != NULL) + free(record, M_LRCU); + + CPU_FOREACH(i) { + pcpu_record = DPCPU_ID_PTR(i, epoch_record); + record = *pcpu_record; + *pcpu_record = NULL; + free(record, M_LRCU); + } +} +SYSUNINIT(linux_rcu_runtime, SI_SUB_LOCK, SI_ORDER_SECOND, linux_rcu_runtime_uninit, NULL); + +static ck_epoch_record_t * +linux_rcu_get_record(int canblock) +{ + ck_epoch_record_t *record; + + if (__predict_true((record = ck_epoch_recycle(&linux_epoch)) != NULL)) + return (record); + if ((record = malloc(sizeof(*record), M_LRCU, M_NOWAIT | M_ZERO)) != NULL) { + ck_epoch_register(&linux_epoch, record); + return (record); + } else if (!canblock) + return (NULL); + + record = malloc(sizeof(*record), M_LRCU, M_WAITOK | M_ZERO); + ck_epoch_register(&linux_epoch, record); + return (record); +} + +static void +linux_rcu_destroy_object(ck_epoch_entry_t *e) +{ + struct callback_head *rcu; + uintptr_t offset; + + rcu = container_of(e, struct callback_head, epoch_entry); + + offset = (uintptr_t)rcu->func; + + MPASS(rcu->task.ta_pending == 0); + + if (offset < LINUX_KFREE_RCU_OFFSET_MAX) + kfree((char *)rcu - offset); + else + rcu->func((struct rcu_head *)rcu); +} + +static void +linux_rcu_cleaner_func(void *context, int pending __unused) +{ + struct callback_head *rcu = context; + ck_epoch_record_t *record = rcu->epoch_record; + + ck_epoch_barrier(record); + ck_epoch_unregister(record); +} + +void +linux_rcu_read_lock(void) +{ + ck_epoch_record_t *record; + + sched_pin(); + record = DPCPU_GET(epoch_record); + MPASS(record != NULL); + + ck_epoch_begin(record, NULL); +} + +void +linux_rcu_read_unlock(void) +{ + ck_epoch_record_t *record; + + record = DPCPU_GET(epoch_record); + ck_epoch_end(record, NULL); + sched_unpin(); +} + +void +linux_synchronize_rcu(void) +{ + ck_epoch_record_t *record; + + sched_pin(); + record = DPCPU_GET(epoch_record); + MPASS(record != NULL); + ck_epoch_synchronize(record); + sched_unpin(); +} + +void +linux_rcu_barrier(void) +{ + ck_epoch_record_t *record; + + record = linux_rcu_get_record(0); + ck_epoch_barrier(record); + ck_epoch_unregister(record); +} + +void +linux_call_rcu(struct rcu_head *context, rcu_callback_t func) +{ + struct callback_head *ptr = (struct callback_head *)context; + ck_epoch_record_t *record; + + record = linux_rcu_get_record(0); + + sched_pin(); + MPASS(record != NULL); + ptr->func = func; + ptr->epoch_record = record; + ck_epoch_call(record, &ptr->epoch_entry, linux_rcu_destroy_object); + TASK_INIT(&ptr->task, 0, linux_rcu_cleaner_func, ptr); + taskqueue_enqueue(taskqueue_fast, &ptr->task); + sched_unpin(); +} + +int +init_srcu_struct(struct srcu_struct *srcu) +{ + ck_epoch_record_t *record; + + record = linux_rcu_get_record(0); + srcu->ss_epoch_record = record; + return (0); +} + +void +cleanup_srcu_struct(struct srcu_struct *srcu) +{ + ck_epoch_record_t *record; + + record = srcu->ss_epoch_record; + srcu->ss_epoch_record = NULL; + ck_epoch_unregister(record); +} + +int +srcu_read_lock(struct srcu_struct *srcu) +{ + ck_epoch_begin(srcu->ss_epoch_record, NULL); + return (0); +} + +void +srcu_read_unlock(struct srcu_struct *srcu, int key __unused) +{ + ck_epoch_end(srcu->ss_epoch_record, NULL); +} + +void +synchronize_srcu(struct srcu_struct *srcu) +{ + ck_epoch_synchronize(srcu->ss_epoch_record); +} Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Feb 21 17:54:38 2017 (r314049) +++ head/sys/conf/files Tue Feb 21 18:04:21 2017 (r314050) @@ -4278,6 +4278,8 @@ compat/linuxkpi/common/src/linux_idr.c compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_radix.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_rcu.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C} -I$S/contrib/ck/include" compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \ compile-with "${LINUXKPI_C}" Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Tue Feb 21 17:54:38 2017 (r314049) +++ head/sys/modules/linuxkpi/Makefile Tue Feb 21 18:04:21 2017 (r314050) @@ -8,6 +8,7 @@ SRCS= linux_kmod.c \ linux_kthread.c \ linux_pci.c \ linux_radix.c \ + linux_rcu.c \ linux_tasklet.c \ linux_idr.c \ linux_usb.c @@ -20,5 +21,6 @@ SRCS+= bus_if.h \ opt_usb.h CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include +CFLAGS+= -I${.CURDIR}/../../contrib/ck/include .include From owner-svn-src-all@freebsd.org Tue Feb 21 18:49: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 78EB4CE72CE; Tue, 21 Feb 2017 18:49:31 +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 45ED9DC; Tue, 21 Feb 2017 18:49:31 +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 v1LInUTU020839; Tue, 21 Feb 2017 18:49:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LInU8L020838; Tue, 21 Feb 2017 18:49:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702211849.v1LInU8L020838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 21 Feb 2017 18:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314051 - 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: Tue, 21 Feb 2017 18:49:31 -0000 Author: imp Date: Tue Feb 21 18:49:30 2017 New Revision: 314051 URL: https://svnweb.freebsd.org/changeset/base/314051 Log: Document why cat is a bootstrap tool. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Feb 21 18:04:21 2017 (r314050) +++ head/Makefile.inc1 Tue Feb 21 18:49:30 2017 (r314051) @@ -1625,6 +1625,7 @@ _nmtree= lib/libnetbsd \ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd .endif +# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l .if ${BOOTSTRAPPING} < 1000027 _cat= bin/cat .endif From owner-svn-src-all@freebsd.org Tue Feb 21 18:49: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 E9939CE733B; Tue, 21 Feb 2017 18:49:52 +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 B987726C; Tue, 21 Feb 2017 18:49:52 +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 v1LInpDH020907; Tue, 21 Feb 2017 18:49:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LInpWl020906; Tue, 21 Feb 2017 18:49:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702211849.v1LInpWl020906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 21 Feb 2017 18:49:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314052 - 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: Tue, 21 Feb 2017 18:49:53 -0000 Author: imp Date: Tue Feb 21 18:49:51 2017 New Revision: 314052 URL: https://svnweb.freebsd.org/changeset/base/314052 Log: Document what the different flags mean for locking. Modified: head/sys/sys/bufobj.h Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Tue Feb 21 18:49:30 2017 (r314051) +++ head/sys/sys/bufobj.h Tue Feb 21 18:49:51 2017 (r314052) @@ -88,6 +88,12 @@ struct buf_ops { #define BO_WRITE(bo, bp) ((bo)->bo_ops->bop_write((bp))) #define BO_BDFLUSH(bo, bp) ((bo)->bo_ops->bop_bdflush((bo), (bp))) +/* + * Locking notes: + * 'S' is sync_mtx + * 'v' is the vnode lock which embeds the bufobj. + * '-' Constant and unchanging after initialization. + */ struct bufobj { struct rwlock bo_lock; /* Lock which protects "i" things */ struct buf_ops *bo_ops; /* - Buffer operations */ From owner-svn-src-all@freebsd.org Tue Feb 21 18:53: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 6861ECE757F; Tue, 21 Feb 2017 18:53:23 +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 35B2593E; Tue, 21 Feb 2017 18:53:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id s67so8984170pgb.1; Tue, 21 Feb 2017 10:53: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=SvYYKh2wmuut4/ZRq64NzPNVceAmkRqtUdS/B0QKFgU=; b=KXwGuY40IaKcZKlrCCW7rzOwruIZX9sOWOj+D+2gfElLj5LngMDkRpo+v2SAr6/EPg wnnjR2hsOGWbHl8/orlND12LwkbFENzAzt7Hjp4aJMniHye0OMI0JBrvAV5Eb54HNNOi XQRipl+pP6t+ObuWPIYkKFd6zA5F9RF6BY0OXZ4TatXfhR0AQK9aKVaK3tPu6LYp8FO6 QLMaDpT68wL4SIxA07HcHR6cUOHvOy/lqZvFwlnIRHt6jFUA7YVMKCfCtdSsiLtNnm1f UMDUpCtC+4a/r/NEiGKaKJrXrFOqCDwqYi/tGqRfZOAUX+T33XelQX/ChknYIB0LJlp4 kFVw== 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=SvYYKh2wmuut4/ZRq64NzPNVceAmkRqtUdS/B0QKFgU=; b=UccV4BURel7SV7ik8d/bASFTHZZIA0LWn5cSAk6V4TV+97pks0Owo47ROnLznikf4+ rfNica72bbuGcm2HXbeCDM14gk1iY7FiwnY40sYEcTbusLLfmHuCuQJptW6Cks4BEvwc VP5SdCw9Hs0KsU4cqJszNQgMlHa6MkyiCSZcnqU2YCaTBD+RYC7+UYtWs38rcSx6ddNj zsJOqqIwTZIkPahG6Ntp2xDvxiPtV8vFv/F8hDUSQNBWjl/wnclMVu1E1el9JLctUJA/ 1F0jRn9uLrHcr3Fq3ka41xCLMYgbD6B+QMuwgVrNgyFsf+SDjHLPcxtrVG7M7EjTcN2b 5g0g== X-Gm-Message-State: AMke39lneKC435S+Go0K+O1xNEiMSAjoCREtYFzQpFEm407tXUQvGyZ/BTTcZTD7jTsEFw== X-Received: by 10.99.56.82 with SMTP id h18mr17154962pgn.23.1487703202641; Tue, 21 Feb 2017 10:53: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 m20sm42722656pgd.17.2017.02.21.10.53.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 10:53:22 -0800 (PST) Subject: Re: svn commit: r313938 - head/usr.bin/lam Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_97979A53-C2E7-4C35-AB23-40B8469BD046"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702190602.v1J62fPd027653@repo.freebsd.org> Date: Tue, 21 Feb 2017 10:53:20 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <3FF8AB7A-D7EC-459B-961C-1E7AAF1A04D4@gmail.com> References: <201702190602.v1J62fPd027653@repo.freebsd.org> To: Allan Jude 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, 21 Feb 2017 18:53:23 -0000 --Apple-Mail=_97979A53-C2E7-4C35-AB23-40B8469BD046 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 18, 2017, at 22:02, Allan Jude wrote: >=20 > Author: allanjude > Date: Sun Feb 19 06:02:41 2017 > New Revision: 313938 > URL: https://svnweb.freebsd.org/changeset/base/313938 >=20 > Log: > Capsicum-ize lam(1) >=20 > lam(1) is used in portsnap(8), so lock it down >=20 > Reviewed by: emaste, cem, jonathan > Sponsored by: ScaleEngine Inc. > Differential Revision: https://reviews.freebsd.org/D8076 Hi, There are multiple reports of portsnap being broken after this = change. Could you please revise the change or back it out if need be? Thank you, -Ngie --Apple-Mail=_97979A53-C2E7-4C35-AB23-40B8469BD046 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 iQIcBAEBCgAGBQJYrIyhAAoJEPWDqSZpMIYVwqUP/0VRbmRlQ/h2Ur3JDHmqlnuN rqvf668thWtRp8YY/P52ckaMBeZhQ2rQPcmyPuLVDav5+h5J3FPUSQ8CE1cCXCzQ BevQd64wkf7Xr65D/zllto+2eVxWBSf8Ay86wEG/nw5wYrYsJVyxxUx2ETzpTnEG /AFydPCSwEner9r5npgtFOEV8Dk3NncR73bKuz51JwYZZDeIef0z80gospzuDQji UT9Oo0cdmtMypN6SAEnRd5DMPoVDx4d9oFV/W4ZEIzdBZtE80dNNpdWENlI1MA4z 0dXefWDNovQN7Frole6/BZ8gdtuferleBvQdRnuMMagQuVLlOvQ1fAVGQ6B9t0e2 f56tkcTCb0TAeb1PsrTR9kO4Jz2+kQUJWg/c76igNS9UpPFtdHJmfvICAAFXoQPA NOQXpasI8jt0dS9JFvaVyRKVE9uR5UK73fLnBbHgXfbguyf9vCapdKRUdHz3jYA0 IPjejK0PirQUZA1STgRlqQ1mULt5E9mrkCFbkCudHMVQGd804auZEWaFVW8kf9in sCQgyp68InKXMkWqUZVAuuRyJ/GlrEV9FV6gO8pMj1jMdPRK4nffto+Rv1IkIlp+ 0S7jEk0csE5mbvQRqjjSFtcOfOKAhnvMmhBfH/v7P1rYyDcGe80T8WvLgqE+uViP nh0YFbByfG6RSTLxa1Cl =Dv2o -----END PGP SIGNATURE----- --Apple-Mail=_97979A53-C2E7-4C35-AB23-40B8469BD046-- From owner-svn-src-all@freebsd.org Tue Feb 21 18:56: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 0C587CE77B1; Tue, 21 Feb 2017 18:56:08 +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 CDA41D27; Tue, 21 Feb 2017 18:56:07 +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 v1LIu6R3024699; Tue, 21 Feb 2017 18:56:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LIu61a024698; Tue, 21 Feb 2017 18:56:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702211856.v1LIu61a024698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 21 Feb 2017 18:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314053 - 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, 21 Feb 2017 18:56:08 -0000 Author: imp Date: Tue Feb 21 18:56:06 2017 New Revision: 314053 URL: https://svnweb.freebsd.org/changeset/base/314053 Log: Make the code match the comments: If we have ANY buf's that failed then return EAGAIN. The current code just returns that if the LAST buf failed. Reviewed by: kib@, trasz@ Differential Revision: https://reviews.freebsd.org/D9677 Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Tue Feb 21 18:49:51 2017 (r314052) +++ head/sys/kern/vfs_default.c Tue Feb 21 18:56:06 2017 (r314053) @@ -718,8 +718,8 @@ loop2: * to write them out. */ TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) - if ((error = bp->b_error) == 0) - continue; + if ((error = bp->b_error) != 0) + break; if (error == 0 && --maxretry >= 0) goto loop1; error = EAGAIN; From owner-svn-src-all@freebsd.org Tue Feb 21 18:57: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 A162DCE785A; Tue, 21 Feb 2017 18:57: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 6C2B3EA2; Tue, 21 Feb 2017 18:57:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 1so12344487pgz.2; Tue, 21 Feb 2017 10:57: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=xn38Ble3xI5m4JeIMyMsKi0m6KJFaTWOe0E9Md4NLQI=; b=j5IeQHkYLFv7GyhT4MgBG3WKwOlDIpi1eA2oNhOvDPzOO40k5aUxHMpeNDRm4sr5Xn 8LVkClsKxpdjjdBSYus4GFbMZXXzcDV6awAQIj7uQMzJh90XjupeIAbzeD232TlkQjOw UONaatfTdUYk7kvYy0hMykaSiBLbbZlaLr2BzgmSvMjZwDVuh6SCanNMjEXCHnfFg5GL YCsEvZj8eDiF7MjKgCDZpaTHMrV2OdlUHcpDbBsTvhrRVAQAj+74rp7U7Zih9OY1wiqS IrRvRNVnmgRtK5VYcNLqtQGe3VOm63vd921RhcLpaiIXbPaAjTHLEvGF63SmzCaI79bV VMGg== 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=xn38Ble3xI5m4JeIMyMsKi0m6KJFaTWOe0E9Md4NLQI=; b=IYZ4DMWuYthMEUvsf5bmalNOCVR39O2pUZUlijFQZhsYMswZ11tzTs8UfeM/GUTZaw z08IrXQpCZK4DRp6bxSysWIEvowvQ7b7smW+yvcQCFj6QpcONi54NnOZ4SePGl+ISQ7C V19l271VywxqmIU1l4KejiLdInwNEF7w+/qlFyAqio3wA5mgx2AAytLNd5bGFA2Mjqa6 /B1ymFm1Ju/808vvvEpkATUkv6k5sInFxU74WeRtvyZ/579hf5Miw8k5LshWEzQBkovg vArx6h0Z2xuaxoOPcxzF/n7hWgUdpRDPXXY5ojcgXo/vfvJCNMxsPo023FWxHy0Bgs6w ZrEQ== X-Gm-Message-State: AMke39noHMlHByLvDbzLtfaNFbtHmpMcUUcZZ+zx72fpC9z2xzIeYA+U3o40d/k4RI7dqw== X-Received: by 10.99.105.66 with SMTP id e63mr36858274pgc.104.1487703448111; Tue, 21 Feb 2017 10:57: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 t15sm10439701pgn.62.2017.02.21.10.57.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 10:57:27 -0800 (PST) Subject: Re: svn commit: r313975 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EAB15C53-A971-499E-8290-1C25F00262F5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <86wpcjy82u.fsf@desk.des.no> Date: Tue, 21 Feb 2017 10:57:26 -0800 Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, ngie@FreeBSD.org Message-Id: References: <201702200056.v1K0ulYr085497@repo.freebsd.org> <5910d260-a26f-5f99-ee80-22fb2078bda8@FreeBSD.org> <86wpcjy82u.fsf@desk.des.no> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 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, 21 Feb 2017 18:57:28 -0000 --Apple-Mail=_EAB15C53-A971-499E-8290-1C25F00262F5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 21, 2017, at 05:41, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Bryan Drewery writes: >> Did you intend to delete the tests? >=20 > Yes. It just occurred to me that they should probably be added to > ObsoleteFiles.inc=E2=80=A6 Already done :). I figured that you had good reasons for doing = this after some of the discussion we had off-list about testing in = general, but I=E2=80=99ll see what I can do to bring back coverage in = lib/libpam. Thanks! -Ngie r313976 | ngie | 2017-02-19 17:45:12 -0800 (Sun, 19 Feb 2017) | 5 lines Remove lib/libpam tests after they were removed from the source tree in = r313975 X-MFC with: r313975 Sponsored by: Dell EMC Isilon --Apple-Mail=_EAB15C53-A971-499E-8290-1C25F00262F5 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 iQIcBAEBCgAGBQJYrI2WAAoJEPWDqSZpMIYVeV8P/R1TUVT005lyxe4fw+iXrau1 d2G3LvK9YNNnYNVLz9NJiD3BXldCKIYQzxj90x0Zrx5DpgNPbuRUbYAhYJic79Mm T1hV7n9VsDrGVwXM6BhWv6RRcPNOh2SH9Y8CCvDtzrYuUsUO0uz8qULek53fLUfz SSWbfkx4wmaA48HTvx0ePdgss2yeeHWqfC9CP/wQpxrJqokZdo8friYNhBYrR6xX U5qUjwN8sApUBot/Vcg4EQi2CxA2XkOWBVCfT5chGyzzgBmJgqLc9dHktJ13bHEn yZDp00q1J90YDBrNkZyeLLRsI4rVzvf62XdvYecKh3FYVahtubGWpyq5F8FfoIOd ikdwwXl0s2vR6qdvfX2AMGnpwCB5l9FP2uCCM8Bb/QfQMxsP3iM65DOhJfzN4r9T aB3JcDVXcqInsLoWZzowIpL6nOZZ5xHej2cKlIExFBiJaT7j5yV1FUFZgmoApyf4 5rcjhjs1vf3kgQdR+AkMqyVfp/4ROfJw90y98Ldc+gY0/kmEsfSNu0fDuumuYAt2 zf8KxqvPCEzgfuCkeOa4WPGgCGlr+JTySgrZRAEDKoghMghOiSh81i8SrSNPTfJO LQ749IOH4ecPqUup+EmmC3ldO+YwMgTi1ooMWwYKh+z7DedMlVfGphKHGK/+x5js W/3Ueug0f/+cIYpRFtqT =lfB5 -----END PGP SIGNATURE----- --Apple-Mail=_EAB15C53-A971-499E-8290-1C25F00262F5-- From owner-svn-src-all@freebsd.org Tue Feb 21 18:59: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 31E03CE790D; Tue, 21 Feb 2017 18:59:19 +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 0C4201020; Tue, 21 Feb 2017 18:59:18 +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 v1LIxIYP024848; Tue, 21 Feb 2017 18:59:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LIxH7O024839; Tue, 21 Feb 2017 18:59:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702211859.v1LIxH7O024839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 21 Feb 2017 18:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314054 - in head/sys: conf modules/linux modules/linux64 modules/svr4 modules/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 18:59:19 -0000 Author: emaste Date: Tue Feb 21 18:59:17 2017 New Revision: 314054 URL: https://svnweb.freebsd.org/changeset/base/314054 Log: Exclude -flto when building *genassym.o The build process generates *assym.h using nm from *genassym.o (which is in turn created from *genassym.c). When compiling with link-time optimization (LTO) using -flto, .o files are LLVM bitcode, not ELF objects. This is not usable by genassym.sh, so remove -flto from those ${CC} invocations. Submitted by: George Rimar Reviewed by: dim MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9659 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/kern.post.mk head/sys/conf/kmod.mk head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile head/sys/modules/svr4/Makefile head/sys/modules/vmm/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/conf/files.amd64 Tue Feb 21 18:59:17 2017 (r314054) @@ -34,7 +34,7 @@ cloudabi64_vdso_blob.o optional compat_ # linux32_genassym.o optional compat_linux32 \ dependency "$S/amd64/linux32/linux32_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux32_genassym.o" # @@ -58,7 +58,7 @@ linux32_vdso.so optional compat_linux32 # ia32_genassym.o standard \ dependency "$S/compat/ia32/ia32_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/conf/files.i386 Tue Feb 21 18:59:17 2017 (r314054) @@ -21,7 +21,7 @@ cloudabi32_vdso_blob.o optional compat_ # linux_genassym.o optional compat_linux \ dependency "$S/i386/linux/linux_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # @@ -45,7 +45,7 @@ linux_vdso.so optional compat_linux \ # svr4_genassym.o optional compat_svr4 \ dependency "$S/i386/svr4/svr4_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "svr4_genassym.o" # Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/conf/kern.post.mk Tue Feb 21 18:59:17 2017 (r314054) @@ -189,7 +189,7 @@ assym.s: $S/kern/genassym.sh genassym.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c - ${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/conf/kmod.mk Tue Feb 21 18:59:17 2017 (r314054) @@ -461,7 +461,7 @@ assym.s: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c .endif Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/modules/linux/Makefile Tue Feb 21 18:59:17 2017 (r314054) @@ -71,7 +71,7 @@ ${VDSO}.so: linux${SFX}_locore.o .endif linux${SFX}_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(KTR) Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/modules/linux64/Makefile Tue Feb 21 18:59:17 2017 (r314054) @@ -44,7 +44,7 @@ linux_support.o: assym.s linux_assym.h ${.IMPSRC} -o ${.TARGET} linux_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(DEBUG) Modified: head/sys/modules/svr4/Makefile ============================================================================== --- head/sys/modules/svr4/Makefile Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/modules/svr4/Makefile Tue Feb 21 18:59:17 2017 (r314054) @@ -22,7 +22,7 @@ svr4_locore.o: svr4_locore.s svr4_assym. ${.IMPSRC} -o ${.TARGET} svr4_genassym.o: svr4_genassym.c svr4.h - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) && defined(DEBUG) opt_svr4.h: Modified: head/sys/modules/vmm/Makefile ============================================================================== --- head/sys/modules/vmm/Makefile Tue Feb 21 18:56:06 2017 (r314053) +++ head/sys/modules/vmm/Makefile Tue Feb 21 18:59:17 2017 (r314054) @@ -71,9 +71,9 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} svm_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .include From owner-svn-src-all@freebsd.org Tue Feb 21 19:51: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 F1EB4CE8752; Tue, 21 Feb 2017 19:51:42 +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 C9F5FC44; Tue, 21 Feb 2017 19:51:42 +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 v1LJpfvx048805; Tue, 21 Feb 2017 19:51:41 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LJpfUh048804; Tue, 21 Feb 2017 19:51:41 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702211951.v1LJpfUh048804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 21 Feb 2017 19:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314055 - head/lib/libc/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, 21 Feb 2017 19:51:43 -0000 Author: vangyzen Date: Tue Feb 21 19:51:41 2017 New Revision: 314055 URL: https://svnweb.freebsd.org/changeset/base/314055 Log: Make several improvements and corrections in the kenv(2) man page MFC after: 3 days Sponsored by: Dell EMC Modified: head/lib/libc/sys/kenv.2 Modified: head/lib/libc/sys/kenv.2 ============================================================================== --- head/lib/libc/sys/kenv.2 Tue Feb 21 18:59:17 2017 (r314054) +++ head/lib/libc/sys/kenv.2 Tue Feb 21 19:51:41 2017 (r314055) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 17, 2002 +.Dd February 20, 2017 .Dt KENV 2 .Os .Sh NAME @@ -51,71 +51,59 @@ The argument can be one of the following: .Bl -tag -width ".Dv KENV_UNSET" .It Dv KENV_GET -Returns the value associated with the named kernel environment variable. -If the variable is not found, \-1 is returned and -the global variable -.Va errno -is set to -.Er ENOENT . -Only the number of bytes available in +Get the +.Fa value +of the variable with the given +.Fa name . +The size of the .Fa value -are copied out. +buffer is given by +.Fa len , +which should be at least +.Dv KENV_MVALLEN ++ 1 bytes to avoid truncation and to ensure NUL termination. .It Dv KENV_SET -Sets or adds a new kernel environment variable. +Set or add a variable. +The +.Fa name +and +.Fa value +are limited to +.Dv KENV_MNAMELEN +and +.Dv KENV_MVALLEN +characters, respectively +.Pq not including the NUL terminator. +The +.Fa len +argument indicates the length of the +.Fa value +and must include the NUL terminator. This option is only available to the superuser. .It Dv KENV_UNSET -Unsets the kernel environment variable +Unset the variable with the given .Fa name . -If the variable does not exist, \-1 is returned and -the global variable -.Va errno -is set to -.Er EINVAL . +The +.Fa value +and +.Fa len +arguments are ignored. This option is only available to the superuser. .It Dv KENV_DUMP -Dumps as much of the kernel environment as will fit in -.Fa value . +Dump as much of the kernel environment as will fit in +.Fa value , +whose size is given in +.Fa len . If .Fa value is .Dv NULL , .Fn kenv will return the number of bytes required to copy out the entire environment. -.El -.Pp -The -.Fa name -argument is the name of the environment variable to be affected. -In the case of -.Dv KENV_DUMP -it is ignored. -.Pp The -.Fa value -argument contains either the value to set the environment variable .Fa name -to in the case of -.Dv KENV_SET , -or it points to the location where -.Fn kenv -should copy return data to in the case of -.Dv KENV_DUMP -and -.Dv KENV_GET . -If -.Fa value -is -.Dv NULL -in the case of -.Dv KENV_DUMP , -.Fn kenv -will return the number of bytes required to copy out the entire environment. -.Pp -The -.Fa len -argument indicates how many bytes of storage -.Fa value -points to. +is ignored. +.El .Sh RETURN VALUES The .Fn kenv @@ -148,23 +136,31 @@ is not a valid option, or the length of is less than 1 for a .Dv KENV_SET . .It Bq Er ENOENT -no value could be found for +No value could be found for .Fa name for a -.Dv KENV_SET +.Dv KENV_GET or .Dv KENV_UNSET . .It Bq Er EPERM -a user other than the superuser attempted to set or unset a kernel +A user other than the superuser attempted to set or unset a kernel environment variable. .It Bq Er EFAULT -bad address was encountered while attempting to copy in user arguments, +A bad address was encountered while attempting to copy in user arguments or copy out value(s). .It Bq Er ENAMETOOLONG -the name of a variable supplied by the user is longer than +The +.Fa name +or the +.Fa value +is longer than .Dv KENV_MNAMELEN -or the value of a variable is longer than -.Dv KENV_MVALLEN . +or +.Dv KENV_MVALLEN +characters, respectively, or +.Fa len +did not include the NUL terminator for a +.Dv KENV_SET . .El .Sh SEE ALSO .Xr kenv 1 From owner-svn-src-all@freebsd.org Tue Feb 21 20:59: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 EF348CE8CD1; Tue, 21 Feb 2017 20:59:47 +0000 (UTC) (envelope-from pstef@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 CAF9B14AC; Tue, 21 Feb 2017 20:59:47 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id 1E0247304; Tue, 21 Feb 2017 20:59:47 +0000 (UTC) Date: Tue, 21 Feb 2017 21:59:47 +0100 From: "Piotr P. Stefaniak" To: Bruce Evans Cc: Conrad Meyer , "Pedro F. Giffuni" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... Message-ID: <20170221205947.GG87692@freefall.freebsd.org> References: <201702200343.v1K3hCk3060716@repo.freebsd.org> <20170221234517.L3157@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9Iq5ULCa7nGtWwZS" Content-Disposition: inline In-Reply-To: <20170221234517.L3157@besplex.bde.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: Tue, 21 Feb 2017 20:59:48 -0000 --9Iq5ULCa7nGtWwZS Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On 2017-02-22 00:46:31, Bruce Evans wrote: >On Mon, 20 Feb 2017, Conrad Meyer wrote: >> Maybe this is moot. I don't believe any architecture FreeBSD actually >> supports has non-zero bitpattern NULL, but something weird like CHERI >> might. > >Compilers should do portability checks on it. In fact, the convolutions >in this file do little except define nullptr and __null to let compilers >do more checking. Only the C++ case even has them. Compilers can do >most checks using just the C90 definition of null pointer constants. tcc(1) of the TenDRA project can set the null pointer representation to 0x55555555 via -f option of trans(1) (but only on x86): $ cat test.c #include int main(void) { char *x = NULL; unsigned long int y = (unsigned long int)x; printf("%lx\n", y); return 0; } $ tcc ./test.c -o test $ ./test 0 $ tcc -Wt,f ./test.c -o test $ ./test 55555555 See http://www.tendra.org/trans.1/ for more details. --9Iq5ULCa7nGtWwZS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEElaLNZulp/QcHQR2KSnkqwcVL7lkFAlisqjEACgkQSnkqwcVL 7lng3Af/QsjDNjA/K1M1EOkvUqNgU0iOD6fkMk4brIkBUjXQnfp4r4hmZVy2nYxN X3bsJEzyNMm5Wv0U9S5sXDqCp9+kYbEJICHFEnbf4u/LbNMyf4D/3BRdx/dboXm7 AbaTMFiXmJ4/udjpYVJbaJnUxOgK4Ys820aN2zlt0IIXsy3VLYk+h9Je/avuXBGA FbLjGsmDe2jCdDarLuoSmJ0dxR4qkr5/nI+ROm0DwgIPaLYQUkndaq6Ovm2L6fx5 0sGbGlT1mFMAZkozlnhFeXdHvmEKHq6qgYgrxxXCYShTV/nURYYffeNReuJxA1Ii kv4Fu0AUrf2FV105cj7AwaeZO9a5oA== =Fnpe -----END PGP SIGNATURE----- --9Iq5ULCa7nGtWwZS-- From owner-svn-src-all@freebsd.org Tue Feb 21 21:01: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 96570CE8D69; Tue, 21 Feb 2017 21:01:02 +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 57DFF16A8; Tue, 21 Feb 2017 21:01:02 +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 v1LL11Mt073440; Tue, 21 Feb 2017 21:01:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LL11m7073438; Tue, 21 Feb 2017 21:01:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702212101.v1LL11m7073438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 21 Feb 2017 21:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314056 - in head: share/doc/pjdfstest tests/sys/pjdfstest/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, 21 Feb 2017 21:01:02 -0000 Author: asomers Date: Tue Feb 21 21:01:01 2017 New Revision: 314056 URL: https://svnweb.freebsd.org/changeset/base/314056 Log: Improve pjdfstest run instructions In the Kyua era, it's no longer necessary to set PJDFSTEST_TEST_PATH. Just use TMPDIR instead. Reviewed by: ngie MFC after: 3 weeks Relnotes: yes Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9340 Modified: head/share/doc/pjdfstest/README head/tests/sys/pjdfstest/tests/conf Modified: head/share/doc/pjdfstest/README ============================================================================== --- head/share/doc/pjdfstest/README Tue Feb 21 19:51:41 2017 (r314055) +++ head/share/doc/pjdfstest/README Tue Feb 21 21:01:01 2017 (r314056) @@ -1,6 +1,6 @@ -pjdfstest test suite execution is integrated into kyua. This README describes -how to use pjdfstest in the default configuration (kyua work directory), and -with a specific filesystem path. +The pjdfstest test suite is normally run by kyua. It requires kyua 0.11 or +newer. This README describes how to use pjdfstest in the default configuration +(kyua work directory), with a specific filesystem path, and with prove(1). Method 1. Executing with default configuration (kyua work directory) @@ -23,14 +23,17 @@ Method 2. Executing with a specific file 2. cd to the tests directory: % cd /usr/tests/sys/pjdfstest 3. Run kyua: - % env PJDFSTEST_TEST_PATH=/mnt kyua test + % env TMPDIR=/mnt kyua test - WARNING: the above method violates the test program isolation algorithm - described in kyua(1); as such, $PJDFSTEST_TEST_PATH must be cleaned up after - executing the testcases. - - It's highly recommended that $PJDFSTEST_TEST_PATH be pointed to a sandboxed - filesystem, e.g. a small UFS-formatted memory disk or ZFS dataset with - quotas enabled, so the filesystem can be easily destroyed after the test - execution is complete, and the testcases are properly bounded both in terms - of time and space. + Note that if HOME is undefined, this will result in kyua's logfile being + placed in TMPDIR, which may not be what you want. You can always use + --logfile to explicitly select the log location. + +Method 3. Executing pjdfstest with prove + + 1. Elevate privileges: + % su - + 2. cd to the temporary directory of your choice + % cd /mnt + 3. Invoke a specific test manually + % prove -rv /usr/tests/sys/pjdfstest/chmod/00 Modified: head/tests/sys/pjdfstest/tests/conf ============================================================================== --- head/tests/sys/pjdfstest/tests/conf Tue Feb 21 19:51:41 2017 (r314055) +++ head/tests/sys/pjdfstest/tests/conf Tue Feb 21 21:01:01 2017 (r314056) @@ -2,13 +2,6 @@ # # $FreeBSD$ -: ${PJDFSTEST_TEST_PATH=.} -if ! cd ${PJDFSTEST_TEST_PATH}/; then - echo 'Please set PJDFSTEST_TEST_PATH to a valid filesystem path' - echo 'Bail out!' - exit 1 -fi - GREP=grep mountpoint=$(df . | tail -1 | awk '{print $6}') fs=$(mount -p | awk '$2 == "'$mountpoint'" { print toupper($3) }') From owner-svn-src-all@freebsd.org Tue Feb 21 21:06: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 3AA4DCE8FE4; Tue, 21 Feb 2017 21:06:14 +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 07B7C1B65; Tue, 21 Feb 2017 21:06: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 v1LL6DKb077435; Tue, 21 Feb 2017 21:06:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LL6DCi077434; Tue, 21 Feb 2017 21:06:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702212106.v1LL6DCi077434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Feb 2017 21:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314057 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 21:06:14 -0000 Author: markj Date: Tue Feb 21 21:06:12 2017 New Revision: 314057 URL: https://svnweb.freebsd.org/changeset/base/314057 Log: ddb show pte: use pmap of kdb_thread show pte from the pmap of the process of the current DDB thread, instead of necessarily the PCPU pmap. Submitted by: Ryan Libby Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9645 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Feb 21 21:01:01 2017 (r314056) +++ head/sys/amd64/amd64/pmap.c Tue Feb 21 21:06:12 2017 (r314057) @@ -7239,6 +7239,7 @@ pmap_quick_remove_page(vm_offset_t addr) #include "opt_ddb.h" #ifdef DDB +#include #include DB_SHOW_COMMAND(pte, pmap_print_pte) @@ -7250,13 +7251,17 @@ DB_SHOW_COMMAND(pte, pmap_print_pte) pt_entry_t *pte, PG_V; vm_offset_t va; - if (have_addr) { - va = (vm_offset_t)addr; - pmap = PCPU_GET(curpmap); /* XXX */ - } else { + if (!have_addr) { db_printf("show pte addr\n"); return; } + va = (vm_offset_t)addr; + + if (kdb_thread != NULL) + pmap = vmspace_pmap(kdb_thread->td_proc->p_vmspace); + else + pmap = PCPU_GET(curpmap); + PG_V = pmap_valid_bit(pmap); pml4 = pmap_pml4e(pmap, va); db_printf("VA %#016lx pml4e %#016lx", va, *pml4); From owner-svn-src-all@freebsd.org Tue Feb 21 21: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 6F706CE80D5; Tue, 21 Feb 2017 21:09:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C3201D6D; Tue, 21 Feb 2017 21:09:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LL9LKo077635; Tue, 21 Feb 2017 21:09:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LL9Lr5077634; Tue, 21 Feb 2017 21:09:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702212109.v1LL9Lr5077634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 21:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314058 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 21:09:22 -0000 Author: avg Date: Tue Feb 21 21:09:21 2017 New Revision: 314058 URL: https://svnweb.freebsd.org/changeset/base/314058 Log: zfs: lower priority of zio_write_issue threads by four The difference of one was insignificant because zio_write_issue threads ended up on the same run queues as other zio threads. See sys/priority.h and sys/runq.h for more details. Add a comment describing FreeBSD priority considerations and restore the illumos variant of the code for comparison. Obtained from: Panzura MFC after: 2 weeks Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Feb 21 21:06:12 2017 (r314057) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Feb 21 21:09:21 2017 (r314058) @@ -922,9 +922,17 @@ spa_taskqs_init(spa_t *spa, zio_type_t t * The write issue taskq can be extremely CPU * intensive. Run it at slightly lower priority * than the other taskqs. + * FreeBSD notes: + * - numerically higher priorities are lower priorities; + * - if priorities divided by four (RQ_PPQ) are equal + * then a difference between them is insignificant. */ if (t == ZIO_TYPE_WRITE && q == ZIO_TASKQ_ISSUE) - pri++; +#ifdef illumos + pri--; +#else + pri += 4; +#endif tq = taskq_create_proc(name, value, pri, 50, INT_MAX, spa->spa_proc, flags); From owner-svn-src-all@freebsd.org Tue Feb 21 21:12: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 056E2CE8370; Tue, 21 Feb 2017 21:12:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C903724C; Tue, 21 Feb 2017 21:11:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LLBwo7080714; Tue, 21 Feb 2017 21:11:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LLBw9r080712; Tue, 21 Feb 2017 21:11:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702212111.v1LLBw9r080712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 21:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314059 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 21:12:00 -0000 Author: avg Date: Tue Feb 21 21:11:58 2017 New Revision: 314059 URL: https://svnweb.freebsd.org/changeset/base/314059 Log: zfs: move zio_taskq_basedc under SYSDC That knob is useless without SDC (or alike) scheduling class support. That is, it's unused on FreeBSD. MFC after: 4 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Feb 21 21:09:21 2017 (r314058) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Feb 21 21:11:58 2017 (r314059) @@ -168,8 +168,8 @@ id_t zio_taskq_psrset_bind = PS_NONE; #endif #ifdef SYSDC boolean_t zio_taskq_sysdc = B_TRUE; /* use SDC scheduling class */ -#endif uint_t zio_taskq_basedc = 80; /* base duty cycle */ +#endif boolean_t spa_create_process = B_TRUE; /* no process ==> no sysdc */ extern int zfs_sync_pass_deferred_free; From owner-svn-src-all@freebsd.org Tue Feb 21 21:21: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 172D5CE87C4; Tue, 21 Feb 2017 21:21:57 +0000 (UTC) (envelope-from markjdb@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 C4734D8A; Tue, 21 Feb 2017 21:21:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id n127so9182143qkf.2; Tue, 21 Feb 2017 13:21:56 -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=UJAJXjJ44NJdPbcxoZ0U2rsmWRdpVzyRint1lRZvc3E=; b=HSDmo+8FKEI5IuNxPI6c/DlZm5uyydFH1Ioq/V21Oev2JDpUtK5JniU/myFIuddtRo /C07u9H23Nx8GjP8jsNAKcVAf0USYwE7Se42A7qexhOs/aC/jzCpbJHsQcqkM1rKGqYP 9ciwuMYKtXTd91QkXkevTMxGu9u8SzgTg2WNJOGeWVQd589GJepO+klEng3lM/H+80Mm xgLwzRs98zjryu2zhz2K1zyMZccstcBGapi3/LWKHoMbGuFISZvRVf5XEyDdEwZdMbqt Cotg3opwjjEMyXBB8APzRm+0XmhCCGZK8KK36vpH7dw2Xt6o3omvpd7NajQUvVP5I3Ma dYFg== 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=UJAJXjJ44NJdPbcxoZ0U2rsmWRdpVzyRint1lRZvc3E=; b=OpX87gPGk67gnME8HTzE4w6auoma+fERbSEbqomqcIBpDzfXcM/awY+FpLXeM75Ptt by1gsdr1WvtE4E6I9Qnz8YyH9F9/63H4AT3gJO6W4gUKuQhRezTTUpQ/EenDJ7lhBjha VXk+AtitfgfBDVj0Sz4FWvpC5wGgu8dbPUkR25qJFQ7nlf/sTB7j8aHl3huRLcL8kO1i dRvg1UVr6EPiK2dgKaZGAoPw57m05sVTNtC6m9CltFtduaN10J5eNV1y89H6RMspQe7e HRjYClpK9uINhdEsXseDfUl7npti7GXGtalvjEuk8E2tYaJ96M8B+70Y7nu7IWKNpJBv aHhA== X-Gm-Message-State: AMke39k+xTBWPnBoFBCnSadJEvJvtJpiBzOznTCLcBiNHn7HfW8kYm+jxbUxvG21MPmuaQ== X-Received: by 10.55.135.1 with SMTP id j1mr29058859qkd.107.1487712115959; Tue, 21 Feb 2017 13:21:55 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id a70sm14735281qkc.1.2017.02.21.13.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 13:21:55 -0800 (PST) Sender: Mark Johnston Date: Tue, 21 Feb 2017 13:29:06 -0800 From: Mark Johnston To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313850 - in head/sys/cddl/dev/dtrace: amd64 i386 Message-ID: <20170221212906.GA46447@wkstn-mjohnston.west.isilon.com> References: <201702170327.v1H3RKK4078742@repo.freebsd.org> <20170217160016.D1386@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170217160016.D1386@besplex.bde.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: Tue, 21 Feb 2017 21:21:57 -0000 On Fri, Feb 17, 2017 at 05:05:54PM +1100, Bruce Evans wrote: > On Fri, 17 Feb 2017, Mark Johnston wrote: > > > Log: > > Directly include needed headers rather than relying on pollution. > > > > We get machine/cpu.h via kmem.h -> proc.h -> _vm_domain.h -> seq.h. > > machine/cpu.h is not added here. Do you mean machine/cpufnc.h? > > > Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > > ============================================================================== > > --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Fri Feb 17 00:50:00 2017 (r313849) > > +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Fri Feb 17 03:27:20 2017 (r313850) > > @@ -41,7 +41,9 @@ > > #include > > #include > > #include > > +#include > > This was correct. is standard pollution in , > and it is a style bug to include it directly, and a bug to not include > after and before all other headers in kernel > .c files. > > It is pollution to include in any header except > . kmem.h has grosser pollution (param, proc, malloc, vmem, > vm/uma, vm/vm, vm/vm_extern, but not systm which is a prerequisite for > most of the other headers that kmem.h includes). Most of the other headers > also have gross pollution, ending with seq.h which includes systm.h and > its standard pollution. > > seq.h also includes machine/cpu.h. Apparently kmem.h does depend on this, > and this commit doesn't fix it. This commit was intended to address an issue with r313841, which added a "KASSERT((read_rflags() & PSL_I) == 0, ...);" to dtrace_subr.c. That change fails to compile when ported to a kernel that predates seq.h; it's only because we include kmem.h and thus seq.h that r313841 compiles on HEAD - kmem.h itself doesn't depend on cpufunc.h as far as I know. > > > #include > > +#include > > This include is not mentioned in the log message. > > machine/psl.h is stamdard pollution in machine/cpu.h (on at least amd64 and > i386), so would not be needed here if machine/cpu.h had been spelled > correctly. Sorry, my commit log message wasn't very good. psl.h is needed for the definition of PSL_I. I take it then that the diff below is the correct fix, since sys/systm.h isn't sufficient. diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index 717f4557a64d..e180f4d0a57c 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -41,9 +41,8 @@ #include #include #include -#include +#include #include -#include #include extern void dtrace_getnanotime(struct timespec *tsp); diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c index 3801c1ba772c..c266f27bbd52 100644 --- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -42,9 +42,8 @@ #include #include #include -#include +#include #include -#include #include extern uintptr_t kernelbase; From owner-svn-src-all@freebsd.org Tue Feb 21 21: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 B86DBCE87DE; Tue, 21 Feb 2017 21:21:59 +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 883C8D9C; Tue, 21 Feb 2017 21:21:59 +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 v1LLLwD5085401; Tue, 21 Feb 2017 21:21:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LLLwb3085400; Tue, 21 Feb 2017 21:21:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702212121.v1LLLwb3085400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 21 Feb 2017 21:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314060 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 21:21:59 -0000 Author: ian Date: Tue Feb 21 21:21:58 2017 New Revision: 314060 URL: https://svnweb.freebsd.org/changeset/base/314060 Log: Fix typos in bootverbose printfs... display the write-protect pin info, not the card-detect pin info. Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt_gpio.c Tue Feb 21 21:11:58 2017 (r314059) +++ head/sys/dev/sdhci/sdhci_fdt_gpio.c Tue Feb 21 21:21:58 2017 (r314060) @@ -192,7 +192,7 @@ wp_setup(struct sdhci_fdt_gpio *gpio, ph if (bootverbose) device_printf(dev, "Write protect switch on %s pin %u\n", - device_get_nameunit(gpio->cd_pin->dev), gpio->cd_pin->pin); + device_get_nameunit(gpio->wp_pin->dev), gpio->wp_pin->pin); } struct sdhci_fdt_gpio * From owner-svn-src-all@freebsd.org Tue Feb 21 21:22: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 7BEA0CE88AA; Tue, 21 Feb 2017 21:22:28 +0000 (UTC) (envelope-from pstef@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 546EB1058; Tue, 21 Feb 2017 21:22:28 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id A3CC27F65; Tue, 21 Feb 2017 21:22:19 +0000 (UTC) Date: Tue, 21 Feb 2017 22:22:19 +0100 From: "Piotr P. Stefaniak" To: Bruce Evans Cc: Conrad Meyer , "Pedro F. Giffuni" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313982 - in head/sys/dev: agp al_eth an arcmsr bce beri/virtio bhnd/cores/usb buslogic ce cm cp ctau cx de ed fatm fe firewire hptiop hptmv iicbus isp le md ncr netmap ofw patm pccard ... Message-ID: <20170221212219.GH87692@freefall.freebsd.org> References: <201702200343.v1K3hCk3060716@repo.freebsd.org> <20170221234517.L3157@besplex.bde.org> <20170221205947.GG87692@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fmEUq8M7S0s+Fl0V" Content-Disposition: inline In-Reply-To: <20170221205947.GG87692@freefall.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: Tue, 21 Feb 2017 21:22:28 -0000 --fmEUq8M7S0s+Fl0V Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2017-02-21 21:59:47, Piotr P. Stefaniak wrote: >$ tcc -Wt,f ./test.c -o test Oops, of course it's "-Wt,-f".=20 --fmEUq8M7S0s+Fl0V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEElaLNZulp/QcHQR2KSnkqwcVL7lkFAlisr4QACgkQSnkqwcVL 7lkQqAf/Y/PE9rB+7IVGgD15jQRxbV3IkVAGvBdBudn/+BrBMQ4kOOefS+1kWuQI Y8iKO5Y0MS6kq/LTcEvTIwEiRcrAMr+tlVqUMM2j0o6UIxm9gcrstym4VRUaHZ6p G//D25c8zlwAZdmPhFibOHPONs9ZeRyggLyXzKAEXd505mpTNvSru0oHMUEELi99 hyPD2p8cuo4AkiV5I2zCwFZzduFdma+K9Z+/eDOyo3BbtH85oK5cryQv5AIt0g6I WbYF4Hqq0vod7vtzNDTv7KskRQC5ItFwnNcyXK8xPx2hyHBqEGpZSNGEy/vOGdL4 YeiJgpIxNAV3ko+dq61HWUAfjEvs5g== =h0Gy -----END PGP SIGNATURE----- --fmEUq8M7S0s+Fl0V-- From owner-svn-src-all@freebsd.org Tue Feb 21 21:48: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 A2BA0CE8FC8; Tue, 21 Feb 2017 21:48:46 +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 652A41C13; Tue, 21 Feb 2017 21:48:46 +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 v1LLmjjI093692; Tue, 21 Feb 2017 21:48:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LLmjds093691; Tue, 21 Feb 2017 21:48:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702212148.v1LLmjds093691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 21 Feb 2017 21:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314061 - head/lib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 21:48:46 -0000 Author: dim Date: Tue Feb 21 21:48:45 2017 New Revision: 314061 URL: https://svnweb.freebsd.org/changeset/base/314061 Log: Add __int128-related symbols to libcxxrt's version map. Put these into the same CXXABI verions as recent libstdc++. Note that __int128 types are only available on arches where long long is 128 bit wide. Noticed by: harti MFC after: 2 weeks Modified: head/lib/libcxxrt/Version.map Modified: head/lib/libcxxrt/Version.map ============================================================================== --- head/lib/libcxxrt/Version.map Tue Feb 21 21:21:58 2017 (r314060) +++ head/lib/libcxxrt/Version.map Tue Feb 21 21:48:45 2017 (r314061) @@ -254,10 +254,27 @@ CXXABI_1.3.1 { __cxa_get_exception_ptr; } CXXABI_1.3; +CXXABI_1.3.5 { + "typeinfo for __int128 const*"; + "typeinfo for __int128"; + "typeinfo for __int128*"; + "typeinfo for unsigned __int128 const*"; + "typeinfo for unsigned __int128"; + "typeinfo for unsigned __int128*"; +} CXXABI_1.3.1; + CXXABI_1.3.6 { __cxa_deleted_virtual; -} CXXABI_1.3.1; +} CXXABI_1.3.5; +CXXABI_1.3.9 { + "typeinfo name for __int128 const*"; + "typeinfo name for __int128"; + "typeinfo name for __int128*"; + "typeinfo name for unsigned __int128 const*"; + "typeinfo name for unsigned __int128"; + "typeinfo name for unsigned __int128*"; +} CXXABI_1.3.6; CXXRT_1.0 { From owner-svn-src-all@freebsd.org Tue Feb 21 23:19: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 72280CE8CAA; Tue, 21 Feb 2017 23:19:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) 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 08BCFE0C; Tue, 21 Feb 2017 23:19:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id v186so126408237wmd.0; Tue, 21 Feb 2017 15:19:00 -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=F2dkxx5MbQX0t+q5zNsi2rEs/D6wY2HhR0teP8aDUZM=; b=mmwoSQr8fJq/gjdGdNvo8dhsidcR26lXdPSbrZveMnBDaCrqEC/KA29aiYhYtmy5XT inF9A1ZTk9KgmqUgFPhBrJv1qOLjgD/KhXuGK6jj4hudQ6Pg48m0XOrdW42zPdAhAPF7 ZFCjIZdjLowqftRk2Lchld6ly690fPmQUcuO7cj5GHcw6cLxor0p+O0SEuVqT25gf+o6 B2dGBsxfTZzSK1sguoSgADY5sz9hBBr/EZiuIIMf4XW0QbPzGN8QJzUXAwkb8cwFTdKX QPcivB9mjl+ZOtpfU1VB3ZS9DO3rT1IZogEHM+3EBxtjYkcoWWjeoIgsn8YdCXJLUVpU 8uaw== 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=F2dkxx5MbQX0t+q5zNsi2rEs/D6wY2HhR0teP8aDUZM=; b=JeM+56mHwB4lUEynhlz0xZk60YFehM5Y6rLOqvY93LI7YM4PCqqSpCtTfpU4R3dlFL pWsYu+78vlKPOO369EWqvwbilqubhpTnKl8kzZjQuv+mx1rVExzsZNnATTBzOhk9q107 POcZ6i+o2EQ7o+JVR21n2DxeKkdy2fDC2osPK7am36UXHsLtboG59k3pibegg6gNLd7D OvBCFYV5yjR+Av1pOQrI+x9ZmYWzRbKpy1Gtbiz5pRJUjflTIUIazxlH+FXO1VHvNiq+ fOS9sLHxJ9L4bNy6WgyO2nFHZi/qQFGrbWVQag9I81iOWnki1SgAOyM+RXXiltu1XcVh +0XQ== X-Gm-Message-State: AMke39lngPlwQTb0LA4h7ZHWPOJEWB5CVPAm2EniVHSzDcQAL9FYqgwvLT/Y/q6tuafZkiQax8J3RPOoGdJ1KA== X-Received: by 10.28.150.202 with SMTP id y193mr16713277wmd.106.1487719139317; Tue, 21 Feb 2017 15:18:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.135 with HTTP; Tue, 21 Feb 2017 15:18:58 -0800 (PST) In-Reply-To: <201702211323.v1LDNrJw087417@repo.freebsd.org> References: <201702211323.v1LDNrJw087417@repo.freebsd.org> From: Adrian Chadd Date: Tue, 21 Feb 2017 15:18:58 -0800 Message-ID: Subject: Re: svn commit: r314043 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi To: Hans Petter Selasky 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, 21 Feb 2017 23:19:01 -0000 Hiya, My understanding of tasklets is that they run on the CPU that they were scheduled on, rather than there being a single tasklet thread? Is that the direction you're thinking of heading in, or? -adrian From owner-svn-src-all@freebsd.org Tue Feb 21 23:32: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 6639CCE8235; Tue, 21 Feb 2017 23:32:28 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 332A21619; Tue, 21 Feb 2017 23:32:28 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LNWRKl037567; Tue, 21 Feb 2017 23:32:27 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LNWRTx037566; Tue, 21 Feb 2017 23:32:27 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201702212332.v1LNWRTx037566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 21 Feb 2017 23:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314062 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 21 Feb 2017 23:32:28 -0000 Author: davidcs Date: Tue Feb 21 23:32:27 2017 New Revision: 314062 URL: https://svnweb.freebsd.org/changeset/base/314062 Log: add bus_dmamap_unload in ql_free_dmabuf() MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Tue Feb 21 21:48:45 2017 (r314061) +++ head/sys/dev/qlxgbe/ql_os.c Tue Feb 21 23:32:27 2017 (r314062) @@ -735,6 +735,7 @@ ql_alloc_dmabuf_exit: void ql_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf) { + bus_dmamap_unload(dma_buf->dma_tag, dma_buf->dma_map); bus_dmamem_free(dma_buf->dma_tag, dma_buf->dma_b, dma_buf->dma_map); bus_dma_tag_destroy(dma_buf->dma_tag); } From owner-svn-src-all@freebsd.org Tue Feb 21 23: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 91E9CCE85C6; Tue, 21 Feb 2017 23:46:01 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (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 75FBF1CB4; Tue, 21 Feb 2017 23:46:01 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OLQ00G00YQ4PD00@mr11p00im-asmtp004.me.com>; Tue, 21 Feb 2017 23:45:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1487720745; bh=5KnarRJjm3iR1Vm/KUiGRo0Iv5Vns7k3HYyIYBiaH4o=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=fORB4xiEemibaahkFGZfRWvvZ/+zTYp0Ox4466EfOF8oM5onCjp73uY1Kudp0b8nX aK2xZUMTuFpliX4WHBwZOawI1ufbkUgZ7eTF4l8TPYE+7L8FP1jUokOILmrcJQJ2bn FpQtJHuBlNp0DT7l+Nsu++dmPggyOfPY2F3bgAfpy44o3wkTY92u6Czc6SvscwfVww vZZYw4a5vw+BDFxkZjw+3t+7NpJLCY+jAeOAMeypKyv53FFnazbDHKCenIG8pTyQSX u8cJlJw3KjEC4ATC0Fjqo13VU1av5kyqsP0puwzTyxzYBminxM+LZOKtxBssEo/3SU Zmuwg14cbSSCA== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OLR00CEV0O7CU20@mr11p00im-asmtp004.me.com>; Tue, 21 Feb 2017 23:45:44 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-21_21:,, 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-1701120000 definitions=main-1702210219 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Tue, 21 Feb 2017 15:45:42 -0800 Subject: Re: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern From: Ravi Pokala Sender: "Pokala, Ravi" To: Eric Badger , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <69055A2F-849B-496B-94BE-0724E0957B81@panasas.com> Thread-topic: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern References: <201702201553.v1KFrGqx057871@repo.freebsd.org> In-reply-to: <201702201553.v1KFrGqx057871@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: Tue, 21 Feb 2017 23:46:01 -0000 Hi Eric, This appears to break buildworld for a bunch of platforms -- possibly all the ones that use gcc rather than clang? A representative example from sparc64: /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c: In function 'atfu_ptrace__PT_KILL_breakpoint_body': /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c:1693: warning: implicit declaration of function '__builtin_debugtrap' *** [ptrace_test.o] Error code 1 Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Eric Badger Date: 2017-02-20, Monday at 07:53 To: , , Subject: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern Author: badger Date: Mon Feb 20 15:53:16 2017 New Revision: 313992 URL: https://svnweb.freebsd.org/changeset/base/313992 Log: Defer ptracestop() signals that cannot be delivered immediately When a thread is stopped in ptracestop(), the ptrace(2) user may request a signal be delivered upon resumption of the thread. Heretofore, those signals were discarded unless ptracestop()'s caller was issignal(). Fix this by modifying ptracestop() to queue up signals requested by the ptrace user that will be delivered when possible. Take special care when the signal is SIGKILL (usually generated from a PT_KILL request); no new stop events should be triggered after a PT_KILL. Add a number of tests for the new functionality. Several tests were authored by jhb. PR: 212607 Reviewed by: kib Approved by: kib (mentor) MFC after: 2 weeks Sponsored by: Dell EMC In collaboration with: jhb Differential Revision: https://reviews.freebsd.org/D9260 Modified: head/sys/kern/kern_fork.c head/sys/kern/kern_sig.c head/sys/kern/kern_thr.c head/sys/kern/subr_syscall.c head/sys/kern/sys_process.c head/sys/sys/signalvar.h head/tests/sys/kern/Makefile head/tests/sys/kern/ptrace_test.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/kern_fork.c Mon Feb 20 15:53:16 2017 (r313992) @@ -1081,7 +1081,7 @@ fork_return(struct thread *td, struct tr proc_reparent(p, dbg); sx_xunlock(&proctree_lock); td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; - ptracestop(td, SIGSTOP); + ptracestop(td, SIGSTOP, NULL); td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); } else { /* @@ -1102,7 +1102,7 @@ fork_return(struct thread *td, struct tr _STOPEVENT(p, S_SCX, td->td_dbg_sc_code); if ((p->p_ptevents & PTRACE_SCX) != 0 || (td->td_dbgflags & TDB_BORN) != 0) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); td->td_dbgflags &= ~(TDB_SCX | TDB_BORN); PROC_UNLOCK(p); } Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/kern_sig.c Mon Feb 20 15:53:16 2017 (r313992) @@ -278,6 +278,7 @@ sigqueue_init(sigqueue_t *list, struct p { SIGEMPTYSET(list->sq_signals); SIGEMPTYSET(list->sq_kill); + SIGEMPTYSET(list->sq_ptrace); TAILQ_INIT(&list->sq_list); list->sq_proc = p; list->sq_flags = SQ_INIT; @@ -301,9 +302,15 @@ sigqueue_get(sigqueue_t *sq, int signo, if (!SIGISMEMBER(sq->sq_signals, signo)) return (0); + if (SIGISMEMBER(sq->sq_ptrace, signo)) { + count++; + SIGDELSET(sq->sq_ptrace, signo); + si->ksi_flags |= KSI_PTRACE; + } if (SIGISMEMBER(sq->sq_kill, signo)) { count++; - SIGDELSET(sq->sq_kill, signo); + if (count == 1) + SIGDELSET(sq->sq_kill, signo); } TAILQ_FOREACH_SAFE(ksi, &sq->sq_list, ksi_link, next) { @@ -347,7 +354,8 @@ sigqueue_take(ksiginfo_t *ksi) if (kp->ksi_signo == ksi->ksi_signo) break; } - if (kp == NULL && !SIGISMEMBER(sq->sq_kill, ksi->ksi_signo)) + if (kp == NULL && !SIGISMEMBER(sq->sq_kill, ksi->ksi_signo) && + !SIGISMEMBER(sq->sq_ptrace, ksi->ksi_signo)) SIGDELSET(sq->sq_signals, ksi->ksi_signo); } @@ -360,6 +368,10 @@ sigqueue_add(sigqueue_t *sq, int signo, KASSERT(sq->sq_flags & SQ_INIT, ("sigqueue not inited")); + /* + * SIGKILL/SIGSTOP cannot be caught or masked, so take the fast path + * for these signals. + */ if (signo == SIGKILL || signo == SIGSTOP || si == NULL) { SIGADDSET(sq->sq_kill, signo); goto out_set_bit; @@ -398,16 +410,19 @@ sigqueue_add(sigqueue_t *sq, int signo, ksi->ksi_sigq = sq; } - if ((si->ksi_flags & KSI_TRAP) != 0 || - (si->ksi_flags & KSI_SIGQ) == 0) { - if (ret != 0) + if (ret != 0) { + if ((si->ksi_flags & KSI_PTRACE) != 0) { + SIGADDSET(sq->sq_ptrace, signo); + ret = 0; + goto out_set_bit; + } else if ((si->ksi_flags & KSI_TRAP) != 0 || + (si->ksi_flags & KSI_SIGQ) == 0) { SIGADDSET(sq->sq_kill, signo); - ret = 0; - goto out_set_bit; - } - - if (ret != 0) + ret = 0; + goto out_set_bit; + } return (ret); + } out_set_bit: SIGADDSET(sq->sq_signals, signo); @@ -434,6 +449,7 @@ sigqueue_flush(sigqueue_t *sq) SIGEMPTYSET(sq->sq_signals); SIGEMPTYSET(sq->sq_kill); + SIGEMPTYSET(sq->sq_ptrace); } static void @@ -466,6 +482,11 @@ sigqueue_move_set(sigqueue_t *src, sigqu SIGSETOR(dst->sq_kill, tmp); SIGSETNAND(src->sq_kill, tmp); + tmp = src->sq_ptrace; + SIGSETAND(tmp, *set); + SIGSETOR(dst->sq_ptrace, tmp); + SIGSETNAND(src->sq_ptrace, tmp); + tmp = src->sq_signals; SIGSETAND(tmp, *set); SIGSETOR(dst->sq_signals, tmp); @@ -502,6 +523,7 @@ sigqueue_delete_set(sigqueue_t *sq, cons } } SIGSETNAND(sq->sq_kill, *set); + SIGSETNAND(sq->sq_ptrace, *set); SIGSETNAND(sq->sq_signals, *set); } @@ -2500,69 +2522,116 @@ sig_suspend_threads(struct thread *td, s return (wakeup_swapper); } +/* + * Stop the process for an event deemed interesting to the debugger. If si is + * non-NULL, this is a signal exchange; the new signal requested by the + * debugger will be returned for handling. If si is NULL, this is some other + * type of interesting event. The debugger may request a signal be delivered in + * that case as well, however it will be deferred until it can be handled. + */ int -ptracestop(struct thread *td, int sig) +ptracestop(struct thread *td, int sig, ksiginfo_t *si) { struct proc *p = td->td_proc; + struct thread *td2; + ksiginfo_t ksi; + int prop; PROC_LOCK_ASSERT(p, MA_OWNED); KASSERT(!(p->p_flag & P_WEXIT), ("Stopping exiting process")); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Stopping for traced signal"); - td->td_dbgflags |= TDB_XSIG; td->td_xsig = sig; - CTR4(KTR_PTRACE, "ptracestop: tid %d (pid %d) flags %#x sig %d", - td->td_tid, p->p_pid, td->td_dbgflags, sig); - PROC_SLOCK(p); - while ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_XSIG)) { - if (p->p_flag & P_SINGLE_EXIT && - !(td->td_dbgflags & TDB_EXIT)) { + + if (si == NULL || (si->ksi_flags & KSI_PTRACE) == 0) { + td->td_dbgflags |= TDB_XSIG; + CTR4(KTR_PTRACE, "ptracestop: tid %d (pid %d) flags %#x sig %d", + td->td_tid, p->p_pid, td->td_dbgflags, sig); + PROC_SLOCK(p); + while ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_XSIG)) { + if (P_KILLED(p)) { + /* + * Ensure that, if we've been PT_KILLed, the + * exit status reflects that. Another thread + * may also be in ptracestop(), having just + * received the SIGKILL, but this thread was + * unsuspended first. + */ + td->td_dbgflags &= ~TDB_XSIG; + td->td_xsig = SIGKILL; + p->p_ptevents = 0; + break; + } + if (p->p_flag & P_SINGLE_EXIT && + !(td->td_dbgflags & TDB_EXIT)) { + /* + * Ignore ptrace stops except for thread exit + * events when the process exits. + */ + td->td_dbgflags &= ~TDB_XSIG; + PROC_SUNLOCK(p); + return (0); + } + /* - * Ignore ptrace stops except for thread exit - * events when the process exits. + * Make wait(2) work. Ensure that right after the + * attach, the thread which was decided to become the + * leader of attach gets reported to the waiter. + * Otherwise, just avoid overwriting another thread's + * assignment to p_xthread. If another thread has + * already set p_xthread, the current thread will get + * a chance to report itself upon the next iteration. */ - td->td_dbgflags &= ~TDB_XSIG; - PROC_SUNLOCK(p); - return (sig); - } - - /* - * Make wait(2) work. Ensure that right after the - * attach, the thread which was decided to become the - * leader of attach gets reported to the waiter. - * Otherwise, just avoid overwriting another thread's - * assignment to p_xthread. If another thread has - * already set p_xthread, the current thread will get - * a chance to report itself upon the next iteration. - */ - if ((td->td_dbgflags & TDB_FSTP) != 0 || - ((p->p_flag2 & P2_PTRACE_FSTP) == 0 && - p->p_xthread == NULL)) { - p->p_xsig = sig; - p->p_xthread = td; - td->td_dbgflags &= ~TDB_FSTP; - p->p_flag2 &= ~P2_PTRACE_FSTP; - p->p_flag |= P_STOPPED_SIG | P_STOPPED_TRACE; - sig_suspend_threads(td, p, 0); - } - if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { - td->td_dbgflags &= ~TDB_STOPATFORK; - cv_broadcast(&p->p_dbgwait); - } + if ((td->td_dbgflags & TDB_FSTP) != 0 || + ((p->p_flag2 & P2_PTRACE_FSTP) == 0 && + p->p_xthread == NULL)) { + p->p_xsig = sig; + p->p_xthread = td; + td->td_dbgflags &= ~TDB_FSTP; + p->p_flag2 &= ~P2_PTRACE_FSTP; + p->p_flag |= P_STOPPED_SIG | P_STOPPED_TRACE; + sig_suspend_threads(td, p, 0); + } + if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { + td->td_dbgflags &= ~TDB_STOPATFORK; + cv_broadcast(&p->p_dbgwait); + } stopme: - thread_suspend_switch(td, p); - if (p->p_xthread == td) - p->p_xthread = NULL; - if (!(p->p_flag & P_TRACED)) - break; - if (td->td_dbgflags & TDB_SUSPEND) { - if (p->p_flag & P_SINGLE_EXIT) + thread_suspend_switch(td, p); + if (p->p_xthread == td) + p->p_xthread = NULL; + if (!(p->p_flag & P_TRACED)) break; - goto stopme; + if (td->td_dbgflags & TDB_SUSPEND) { + if (p->p_flag & P_SINGLE_EXIT) + break; + goto stopme; + } } + PROC_SUNLOCK(p); } - PROC_SUNLOCK(p); + + if (si != NULL && sig == td->td_xsig) { + /* Parent wants us to take the original signal unchanged. */ + si->ksi_flags |= KSI_HEAD; + if (sigqueue_add(&td->td_sigqueue, sig, si) != 0) + si->ksi_signo = 0; + } else if (td->td_xsig != 0) { + /* + * If parent wants us to take a new signal, then it will leave + * it in td->td_xsig; otherwise we just look for signals again. + */ + ksiginfo_init(&ksi); + ksi.ksi_signo = td->td_xsig; + ksi.ksi_flags |= KSI_PTRACE; + prop = sigprop(td->td_xsig); + td2 = sigtd(p, td->td_xsig, prop); + tdsendsignal(p, td2, td->td_xsig, &ksi); + if (td != td2) + return (0); + } + return (td->td_xsig); } @@ -2720,7 +2789,7 @@ issignal(struct thread *td) struct sigacts *ps; struct sigqueue *queue; sigset_t sigpending; - int sig, prop, newsig; + int sig, prop; p = td->td_proc; ps = p->p_sigacts; @@ -2783,47 +2852,18 @@ issignal(struct thread *td) } mtx_unlock(&ps->ps_mtx); - newsig = ptracestop(td, sig); + sig = ptracestop(td, sig, &td->td_dbgksi); mtx_lock(&ps->ps_mtx); - if (sig != newsig) { - - /* - * If parent wants us to take the signal, - * then it will leave it in p->p_xsig; - * otherwise we just look for signals again. - */ - if (newsig == 0) - continue; - sig = newsig; - - /* - * Put the new signal into td_sigqueue. If the - * signal is being masked, look for other - * signals. - */ - sigqueue_add(queue, sig, NULL); - if (SIGISMEMBER(td->td_sigmask, sig)) - continue; - signotify(td); - } else { - if (td->td_dbgksi.ksi_signo != 0) { - td->td_dbgksi.ksi_flags |= KSI_HEAD; - if (sigqueue_add(&td->td_sigqueue, sig, - &td->td_dbgksi) != 0) - td->td_dbgksi.ksi_signo = 0; - } - if (td->td_dbgksi.ksi_signo == 0) - sigqueue_add(&td->td_sigqueue, sig, - NULL); - } - - /* + /* + * Keep looking if the debugger discarded the signal + * or replaced it with a masked signal. + * * If the traced bit got turned off, go back up * to the top to rescan signals. This ensures * that p_sig* and p_sigact are consistent. */ - if ((p->p_flag & P_TRACED) == 0) + if (sig == 0 || (p->p_flag & P_TRACED) == 0) continue; } Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/kern_thr.c Mon Feb 20 15:53:16 2017 (r313992) @@ -356,7 +356,7 @@ kern_thr_exit(struct thread *td) p->p_pendingexits++; td->td_dbgflags |= TDB_EXIT; if (p->p_ptevents & PTRACE_LWP) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); PROC_UNLOCK(p); tidhash_remove(td); PROC_LOCK(p); Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/subr_syscall.c Mon Feb 20 15:53:16 2017 (r313992) @@ -88,7 +88,7 @@ syscallenter(struct thread *td, struct s td->td_dbg_sc_code = sa->code; td->td_dbg_sc_narg = sa->narg; if (p->p_ptevents & PTRACE_SCE) - ptracestop((td), SIGTRAP); + ptracestop((td), SIGTRAP, NULL); PROC_UNLOCK(p); } if (td->td_dbgflags & TDB_USERWR) { @@ -222,7 +222,7 @@ syscallret(struct thread *td, int error, if (traced && ((td->td_dbgflags & (TDB_FORK | TDB_EXEC)) != 0 || (p->p_ptevents & PTRACE_SCX) != 0)) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK); PROC_UNLOCK(p); } @@ -259,7 +259,7 @@ again: if (td->td_dbgflags & TDB_VFORK) { PROC_LOCK(p); if (p->p_ptevents & PTRACE_VFORK) - ptracestop(td, SIGTRAP); + ptracestop(td, SIGTRAP, NULL); td->td_dbgflags &= ~TDB_VFORK; PROC_UNLOCK(p); } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/kern/sys_process.c Mon Feb 20 15:53:16 2017 (r313992) @@ -1125,6 +1125,16 @@ kern_ptrace(struct thread *td, int req, td2->td_dbgflags &= ~TDB_XSIG; td2->td_xsig = data; + /* + * P_WKILLED is insurance that a PT_KILL/SIGKILL always + * works immediately, even if another thread is + * unsuspended first and attempts to handle a different + * signal or if the POSIX.1b style signal queue cannot + * accommodate any new signals. + */ + if (data == SIGKILL) + p->p_flag |= P_WKILLED; + if (req == PT_DETACH) { FOREACH_THREAD_IN_PROC(p, td3) td3->td_dbgflags &= ~TDB_SUSPEND; Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Mon Feb 20 10:51:46 2017 (r313991) +++ head/sys/sys/signalvar.h Mon Feb 20 15:53:16 2017 (r313992) @@ -237,13 +237,15 @@ typedef struct ksiginfo { #define KSI_INS 0x04 /* Directly insert ksi, not the copy */ #define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EGAIN. */ #define KSI_HEAD 0x10 /* Insert into head, not tail. */ -#define KSI_COPYMASK (KSI_TRAP|KSI_SIGQ) +#define KSI_PTRACE 0x20 /* Generated by ptrace. */ +#define KSI_COPYMASK (KSI_TRAP | KSI_SIGQ | KSI_PTRACE) #define KSI_ONQ(ksi) ((ksi)->ksi_sigq != NULL) typedef struct sigqueue { sigset_t sq_signals; /* All pending signals. */ sigset_t sq_kill; /* Legacy depth 1 queue. */ + sigset_t sq_ptrace; /* Depth 1 queue for ptrace(2). */ TAILQ_HEAD(, ksiginfo) sq_list;/* Queued signal info. */ struct proc *sq_proc; int sq_flags; @@ -370,7 +372,7 @@ void pgsigio(struct sigio **sigiop, int void pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi); int postsig(int sig); void kern_psignal(struct proc *p, int sig); -int ptracestop(struct thread *td, int sig); +int ptracestop(struct thread *td, int sig, ksiginfo_t *si); void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *retmask); struct sigacts *sigacts_alloc(void); void sigacts_copy(struct sigacts *dest, struct sigacts *src); Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Feb 20 10:51:46 2017 (r313991) +++ head/tests/sys/kern/Makefile Mon Feb 20 15:53:16 2017 (r313992) @@ -8,6 +8,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= ptrace_test +TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper PLAIN_TESTS_C+= subr_unit_test ATF_TESTS_C+= unix_seqpacket_test Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Mon Feb 20 10:51:46 2017 (r313991) +++ head/tests/sys/kern/ptrace_test.c Mon Feb 20 15:53:16 2017 (r313992) @@ -28,6 +28,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include #include #include #include @@ -35,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1673,6 +1677,1107 @@ ATF_TC_BODY(ptrace__ptrace_vfork_follow, ATF_REQUIRE(errno == ECHILD); } +/* + * Verify that no more events are reported after PT_KILL except for the + * process exit when stopped due to a breakpoint trap. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_breakpoint); +ATF_TC_BODY(ptrace__PT_KILL_breakpoint, tc) +{ + pid_t fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + __builtin_debugtrap(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report hitting the breakpoint. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that no more events are reported after PT_KILL except for the + * process exit when stopped inside of a system call. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_system_call); +ATF_TC_BODY(ptrace__PT_KILL_system_call, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + getpid(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP and tracing system calls. */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report a system call entry for getpid(). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that no more events are reported after PT_KILL except for the + * process exit when killing a multithreaded process. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_threads); +ATF_TC_BODY(ptrace__PT_KILL_threads, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + lwpid_t main_lwp; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + simple_thread_main(); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + main_lwp = pl.pl_lwpid; + + ATF_REQUIRE(ptrace(PT_LWP_EVENTS, wpid, NULL, 1) == 0); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The first event should be for the child thread's birth. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_BORN | PL_FLAG_SCX)) == + (PL_FLAG_BORN | PL_FLAG_SCX)); + ATF_REQUIRE(pl.pl_lwpid != main_lwp); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void * +mask_usr1_thread(void *arg) +{ + pthread_barrier_t *pbarrier; + sigset_t sigmask; + + pbarrier = (pthread_barrier_t*)arg; + + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGUSR1); + CHILD_REQUIRE(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == 0); + + /* Sync up with other thread after sigmask updated. */ + pthread_barrier_wait(pbarrier); + + for (;;) + sleep(60); + + return (NULL); +} + +/* + * Verify that the SIGKILL from PT_KILL takes priority over other signals + * and prevents spurious stops due to those other signals. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_signal); +ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc) +{ + pid_t fpid, wpid; + int status; + cpuset_t setmask; + pthread_t t; + pthread_barrier_t barrier; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + /* + * Bind to one CPU so only one thread at a time will run. This + * test expects that the first thread created (the main thread) + * will be unsuspended first and will block the second thread + * from running. + */ + CPU_ZERO(&setmask); + CPU_SET(0, &setmask); + cpusetid_t setid; + CHILD_REQUIRE(cpuset(&setid) == 0); + CHILD_REQUIRE(cpuset_setaffinity(CPU_LEVEL_CPUSET, + CPU_WHICH_CPUSET, setid, sizeof(setmask), &setmask) == 0); + + CHILD_REQUIRE(pthread_barrier_init(&barrier, NULL, 2) == 0); + + CHILD_REQUIRE(pthread_create(&t, NULL, mask_usr1_thread, + (void*)&barrier) == 0); + + sigset_t sigmask; + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGUSR2); + CHILD_REQUIRE(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == 0); + + /* Sync up with other thread after sigmask updated. */ + pthread_barrier_wait(&barrier); + + trace_me(); + + for (;;) + sleep(60); + + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* Send a signal that only the second thread can handle. */ + ATF_REQUIRE(kill(fpid, SIGUSR2) == 0); + + /* The second wait() should report the SIGUSR2. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGUSR2); + + /* Send a signal that only the first thread can handle. */ + ATF_REQUIRE(kill(fpid, SIGUSR1) == 0); + + /* Replace the SIGUSR2 with a kill. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL (not the SIGUSR signal). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that the SIGKILL from PT_KILL takes priority over other stop events + * and prevents spurious stops caused by those events. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_stop); +ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) +{ + pid_t fpid, wpid; + int status, i; + cpuset_t setmask; + pthread_t t; + pthread_barrier_t barrier; + lwpid_t main_lwp; + struct ptrace_lwpinfo pl; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + + /* + * Bind to one CPU so only one thread at a time will run. This + * test expects that the first thread created (the main thread) + * will be unsuspended first and will block the second thread + * from running. + */ + CPU_ZERO(&setmask); + CPU_SET(0, &setmask); + cpusetid_t setid; + CHILD_REQUIRE(cpuset(&setid) == 0); + CHILD_REQUIRE(cpuset_setaffinity(CPU_LEVEL_CPUSET, + CPU_WHICH_CPUSET, setid, sizeof(setmask), &setmask) == 0); + + CHILD_REQUIRE(pthread_barrier_init(&barrier, NULL, 2) == 0); + + CHILD_REQUIRE(pthread_create(&t, NULL, mask_usr1_thread, + (void*)&barrier) == 0); + + sigset_t sigmask; + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGUSR2); + CHILD_REQUIRE(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == 0); + + /* Sync up with other thread after sigmask updated. */ + pthread_barrier_wait(&barrier); + + /* Sync up with the test before doing the getpid(). */ + raise(SIGSTOP); + + getpid(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + main_lwp = pl.pl_lwpid; + + /* Continue the child ignoring the SIGSTOP and tracing system calls. */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* + * Continue until child is done with setup, which is indicated with + * SIGSTOP. Ignore system calls in the meantime. + */ + for (;;) { + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + if (WSTOPSIG(status) == SIGTRAP) { + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)); + } else { + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + break; + } + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + } + + /* Let both threads hit their syscall entries. */ + for (i = 0; i < 2; ++i) { + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + + /* + * Prevent the main thread from hitting its syscall exit for + * now. + */ + if (pl.pl_lwpid == main_lwp) + ATF_REQUIRE(ptrace(PT_SUSPEND, main_lwp, 0, 0) == 0); + + } + + /* Send a signal that only the second thread can handle. */ + ATF_REQUIRE(kill(fpid, SIGUSR2) == 0); + + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report the SIGUSR2. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGUSR2); + + /* Allow the main thread to try to finish its system call. */ + ATF_REQUIRE(ptrace(PT_RESUME, main_lwp, 0, 0) == 0); + + /* + * At this point, the main thread is in the middle of a system call and + * has been resumed. The second thread has taken a signal which will be + * replaced with a SIGKILL. We expect the main thread will get to run + * first. It should notice the kill request and exit accordingly and + * not stop for the system call exit event. + */ + + /* Replace the SIGUSR2 with a kill. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL (not a syscall exit). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void +sigusr1_handler(int sig) +{ + + CHILD_REQUIRE(sig == SIGUSR1); + _exit(2); +} + +/* + * Verify that even if the signal queue is full for a child process, + * a PT_KILL will kill the process. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_with_signal_full_sigqueue); +ATF_TC_BODY(ptrace__PT_KILL_with_signal_full_sigqueue, tc) +{ + pid_t fpid, wpid; + int status; + int max_pending_per_proc; + size_t len; + int i; + + ATF_REQUIRE(signal(SIGUSR1, sigusr1_handler) != SIG_ERR); + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + len = sizeof(max_pending_per_proc); + ATF_REQUIRE(sysctlbyname("kern.sigqueue.max_pending_per_proc", + &max_pending_per_proc, &len, NULL, 0) == 0); + + /* Fill the signal queue. */ + for (i = 0; i < max_pending_per_proc; ++i) + ATF_REQUIRE(kill(fpid, SIGUSR1) == 0); + + /* Kill the child process. */ + ATF_REQUIRE(ptrace(PT_KILL, fpid, 0, 0) == 0); + + /* The last wait() should report the SIGKILL. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE(WTERMSIG(status) == SIGKILL); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that when stopped at a system call entry, a signal can be + * requested with PT_CONTINUE which will be delivered once the system + * call is complete. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_CONTINUE_with_signal_system_call_entry); +ATF_TC_BODY(ptrace__PT_CONTINUE_with_signal_system_call_entry, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int status; + + ATF_REQUIRE(signal(SIGUSR1, sigusr1_handler) != SIG_ERR); + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + getpid(); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + /* Continue the child ignoring the SIGSTOP and tracing system calls. */ + ATF_REQUIRE(ptrace(PT_SYSCALL, fpid, (caddr_t)1, 0) == 0); + + /* The second wait() should report a system call entry for getpid(). */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); + + /* Continue the child process with a signal. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, SIGUSR1) == 0); + + for (;;) { + /* + * The last wait() should report exit 2, i.e., a normal _exit + * from the signal handler. In the meantime, catch and proceed + * past any syscall stops. + */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + if (WIFSTOPPED(status) && WSTOPSIG(status) == SIGTRAP) { + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)); + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + } else { + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 2); + break; + } + } + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void +sigusr1_counting_handler(int sig) +{ + static int counter = 0; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 22 00:50: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 B21DACE5E3E; Wed, 22 Feb 2017 00:50:37 +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 8153E1DC5; Wed, 22 Feb 2017 00:50:37 +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 v1M0oaJ3065984; Wed, 22 Feb 2017 00:50:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M0oa1t065983; Wed, 22 Feb 2017 00:50:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702220050.v1M0oa1t065983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 Feb 2017 00:50: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: r314063 - 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: Wed, 22 Feb 2017 00:50:37 -0000 Author: markj Date: Wed Feb 22 00:50:36 2017 New Revision: 314063 URL: https://svnweb.freebsd.org/changeset/base/314063 Log: MFC r313261: Make witness_warn() always print to the console. Modified: stable/11/sys/kern/subr_witness.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_witness.c ============================================================================== --- stable/11/sys/kern/subr_witness.c Tue Feb 21 23:32:27 2017 (r314062) +++ stable/11/sys/kern/subr_witness.c Wed Feb 22 00:50:36 2017 (r314063) @@ -1733,15 +1733,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); } /* @@ -1766,11 +1765,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 Wed Feb 22 01:07: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 6236ECE721A; Wed, 22 Feb 2017 01:07:05 +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 3200B812; Wed, 22 Feb 2017 01:07:05 +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 v1M174W9073751; Wed, 22 Feb 2017 01:07:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M174cD073750; Wed, 22 Feb 2017 01:07:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702220107.v1M174cD073750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 22 Feb 2017 01:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314064 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 01:07:05 -0000 Author: ian Date: Wed Feb 22 01:07:04 2017 New Revision: 314064 URL: https://svnweb.freebsd.org/changeset/base/314064 Log: Remove a variable that has been unused since r311735 (it should have been removed as part of those changes). Modified: head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Wed Feb 22 00:50:36 2017 (r314063) +++ head/sys/arm/ti/ti_sdhci.c Wed Feb 22 01:07:04 2017 (r314064) @@ -71,7 +71,6 @@ struct ti_sdhci_softc { uint32_t mmchs_reg_off; uint32_t sdhci_reg_off; uint32_t baseclk_hz; - uint32_t wp_gpio_pin; uint32_t cmd_and_mode; uint32_t sdhci_clkdiv; boolean_t disable_highspeed; From owner-svn-src-all@freebsd.org Wed Feb 22 02:18: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 F1AD3CE934B; Wed, 22 Feb 2017 02:18:05 +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 B6038676; Wed, 22 Feb 2017 02:18:05 +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 v1M2I4hL001958; Wed, 22 Feb 2017 02:18:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M2I4Zk001956; Wed, 22 Feb 2017 02:18:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220218.v1M2I4Zk001956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 02:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314065 - 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, 22 Feb 2017 02:18:06 -0000 Author: adrian Date: Wed Feb 22 02:18:04 2017 New Revision: 314065 URL: https://svnweb.freebsd.org/changeset/base/314065 Log: [iwm] Synchronize firmware loading code with Linux iwlwifi. * While there, rename some functions to match the names and functionality of the similarly named functions in Linux iwlwifi. Obtained from: dragonflybsd.git e98ee77a816bfd8b4912047b93dfb2c560788f24 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 22 01:07:04 2017 (r314064) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 02:18:04 2017 (r314065) @@ -353,15 +353,20 @@ static void iwm_set_radio_cfg(const stru 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); -static int iwm_firmware_load_chunk(struct iwm_softc *, uint32_t, - const uint8_t *, uint32_t); -static int iwm_load_firmware_7000(struct iwm_softc *, enum iwm_ucode_type); -static int iwm_load_cpu_sections_8000(struct iwm_softc *, - struct iwm_fw_sects *, int , int *); -static int iwm_load_firmware_8000(struct iwm_softc *, enum iwm_ucode_type); -static int iwm_load_firmware(struct iwm_softc *, enum iwm_ucode_type); +static int iwm_pcie_load_section(struct iwm_softc *, uint8_t, + const struct iwm_fw_desc *); +static int iwm_pcie_load_firmware_chunk(struct iwm_softc *, uint32_t, + bus_addr_t, uint32_t); +static int iwm_pcie_load_cpu_sections_8000(struct iwm_softc *sc, + const struct iwm_fw_sects *, + int, int *); +static int iwm_pcie_load_cpu_sections(struct iwm_softc *, + const struct iwm_fw_sects *, + int, int *); +static int iwm_pcie_load_given_ucode_8000(struct iwm_softc *, + const struct iwm_fw_sects *); +static int iwm_pcie_load_given_ucode(struct iwm_softc *, + const struct iwm_fw_sects *); static int iwm_start_fw(struct iwm_softc *, enum iwm_ucode_type); static int iwm_send_tx_ant_cfg(struct iwm_softc *, uint8_t); static int iwm_send_phy_cfg_cmd(struct iwm_softc *); @@ -485,7 +490,7 @@ iwm_firmware_store_section(struct iwm_so enum iwm_ucode_type type, const uint8_t *data, size_t dlen) { struct iwm_fw_sects *fws; - struct iwm_fw_onesect *fwone; + struct iwm_fw_desc *fwone; if (type >= IWM_UCODE_TYPE_MAX) return EINVAL; @@ -499,11 +504,11 @@ iwm_firmware_store_section(struct iwm_so fwone = &fws->fw_sect[fws->fw_count]; /* first 32bit are device load offset */ - memcpy(&fwone->fws_devoff, data, sizeof(uint32_t)); + memcpy(&fwone->offset, data, sizeof(uint32_t)); /* rest is data */ - fwone->fws_data = data + sizeof(uint32_t); - fwone->fws_len = dlen - sizeof(uint32_t); + fwone->data = data + sizeof(uint32_t); + fwone->len = dlen - sizeof(uint32_t); fws->fw_count++; @@ -559,6 +564,7 @@ iwm_read_firmware(struct iwm_softc *sc, const uint8_t *data; uint32_t usniffer_img; uint32_t paging_mem_size; + int num_of_cpus; int error = 0; size_t len; @@ -699,18 +705,24 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } break; - case IWM_UCODE_TLV_NUM_OF_CPU: { - uint32_t num_cpu; + case IWM_UCODE_TLV_NUM_OF_CPU: if (tlv_len != sizeof(uint32_t)) { device_printf(sc->sc_dev, - "%s: IWM_UCODE_TLV_NUM_OF_CPU: tlv_len (%d) < sizeof(uint32_t)\n", + "%s: IWM_UCODE_TLV_NUM_OF_CPU: tlv_len (%d) != sizeof(uint32_t)\n", __func__, (int) tlv_len); error = EINVAL; goto parse_out; } - num_cpu = le32toh(*(const uint32_t *)tlv_data); - if (num_cpu < 1 || num_cpu > 2) { + num_of_cpus = le32toh(*(const uint32_t *)tlv_data); + if (num_of_cpus == 2) { + fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus = + TRUE; + fw->fw_sects[IWM_UCODE_INIT].is_dual_cpus = + TRUE; + fw->fw_sects[IWM_UCODE_WOWLAN].is_dual_cpus = + TRUE; + } else if ((num_of_cpus > 2) || (num_of_cpus < 1)) { device_printf(sc->sc_dev, "%s: Driver supports only 1 or 2 CPUs\n", __func__); @@ -718,7 +730,6 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } break; - } case IWM_UCODE_TLV_SEC_RT: if ((error = iwm_firmware_store_section(sc, IWM_UCODE_REGULAR, tlv_data, tlv_len)) != 0) { @@ -2414,52 +2425,67 @@ iwm_nvm_init(struct iwm_softc *sc) return 0; } -/* - * Firmware loading gunk. This is kind of a weird hybrid between the - * iwn driver and the Linux iwlwifi driver. - */ - static int -iwm_firmware_load_sect(struct iwm_softc *sc, uint32_t dst_addr, - const uint8_t *section, uint32_t byte_cnt) +iwm_pcie_load_section(struct iwm_softc *sc, uint8_t section_num, + const struct iwm_fw_desc *section) { - int error = EINVAL; - uint32_t chunk_sz, offset; + struct iwm_dma_info *dma = &sc->fw_dma; + uint8_t *v_addr; + bus_addr_t p_addr; + uint32_t offset, chunk_sz = MIN(IWM_FH_MEM_TB_MAX_LENGTH, section->len); + int ret = 0; - chunk_sz = MIN(IWM_FH_MEM_TB_MAX_LENGTH, byte_cnt); + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "%s: [%d] uCode section being loaded...\n", + __func__, section_num); - for (offset = 0; offset < byte_cnt; offset += chunk_sz) { - uint32_t addr, len; - const uint8_t *data; + v_addr = dma->vaddr; + p_addr = dma->paddr; - addr = dst_addr + offset; - len = MIN(chunk_sz, byte_cnt - offset); - data = section + offset; + for (offset = 0; offset < section->len; offset += chunk_sz) { + uint32_t copy_size, dst_addr; + int extended_addr = FALSE; + + copy_size = MIN(chunk_sz, section->len - offset); + dst_addr = section->offset + offset; + + if (dst_addr >= IWM_FW_MEM_EXTENDED_START && + dst_addr <= IWM_FW_MEM_EXTENDED_END) + extended_addr = TRUE; + + if (extended_addr) + iwm_set_bits_prph(sc, IWM_LMPM_CHICK, + IWM_LMPM_CHICK_EXTENDED_ADDR_SPACE); + + memcpy(v_addr, (const uint8_t *)section->data + offset, + copy_size); + bus_dmamap_sync(dma->tag, dma->map, BUS_DMASYNC_PREWRITE); + ret = iwm_pcie_load_firmware_chunk(sc, dst_addr, p_addr, + copy_size); + + if (extended_addr) + iwm_clear_bits_prph(sc, IWM_LMPM_CHICK, + IWM_LMPM_CHICK_EXTENDED_ADDR_SPACE); - error = iwm_firmware_load_chunk(sc, addr, data, len); - if (error) + if (ret) { + device_printf(sc->sc_dev, + "%s: Could not load the [%d] uCode section\n", + __func__, section_num); break; + } } - return error; + return ret; } +/* + * ucode + */ static int -iwm_firmware_load_chunk(struct iwm_softc *sc, uint32_t dst_addr, - const uint8_t *chunk, uint32_t byte_cnt) +iwm_pcie_load_firmware_chunk(struct iwm_softc *sc, uint32_t dst_addr, + bus_addr_t phy_addr, uint32_t byte_cnt) { - struct iwm_dma_info *dma = &sc->fw_dma; - int error; - - /* Copy firmware chunk into pre-allocated DMA-safe memory. */ - memcpy(dma->vaddr, chunk, byte_cnt); - bus_dmamap_sync(dma->tag, dma->map, BUS_DMASYNC_PREWRITE); - - if (dst_addr >= IWM_FW_MEM_EXTENDED_START && - dst_addr <= IWM_FW_MEM_EXTENDED_END) { - iwm_set_bits_prph(sc, IWM_LMPM_CHICK, - IWM_LMPM_CHICK_EXTENDED_ADDR_SPACE); - } + int ret; sc->sc_fw_chunk_done = 0; @@ -2468,17 +2494,22 @@ iwm_firmware_load_chunk(struct iwm_softc IWM_WRITE(sc, IWM_FH_TCSR_CHNL_TX_CONFIG_REG(IWM_FH_SRVC_CHNL), IWM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE); + IWM_WRITE(sc, IWM_FH_SRVC_CHNL_SRAM_ADDR_REG(IWM_FH_SRVC_CHNL), dst_addr); + IWM_WRITE(sc, IWM_FH_TFDIB_CTRL0_REG(IWM_FH_SRVC_CHNL), - dma->paddr & IWM_FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK); + phy_addr & IWM_FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK); + IWM_WRITE(sc, IWM_FH_TFDIB_CTRL1_REG(IWM_FH_SRVC_CHNL), - (iwm_get_dma_hi_addr(dma->paddr) - << IWM_FH_MEM_TFDIB_REG1_ADDR_BITSHIFT) | byte_cnt); + (iwm_get_dma_hi_addr(phy_addr) + << IWM_FH_MEM_TFDIB_REG1_ADDR_BITSHIFT) | byte_cnt); + IWM_WRITE(sc, IWM_FH_TCSR_CHNL_TX_BUF_STS_REG(IWM_FH_SRVC_CHNL), 1 << IWM_FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM | 1 << IWM_FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_IDX | IWM_FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID); + IWM_WRITE(sc, IWM_FH_TCSR_CHNL_TX_CONFIG_REG(IWM_FH_SRVC_CHNL), IWM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE | IWM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE | @@ -2486,37 +2517,31 @@ iwm_firmware_load_chunk(struct iwm_softc iwm_nic_unlock(sc); - /* wait 1s for this segment to load */ - while (!sc->sc_fw_chunk_done) - if ((error = msleep(&sc->sc_fw, &sc->sc_mtx, 0, "iwmfw", hz)) != 0) + /* wait up to 5s for this segment to load */ + ret = 0; + while (!sc->sc_fw_chunk_done) { + ret = msleep(&sc->sc_fw, &sc->sc_mtx, 0, "iwmfw", hz); + if (ret) break; + } - if (!sc->sc_fw_chunk_done) { + if (ret != 0) { device_printf(sc->sc_dev, "fw chunk addr 0x%x len %d failed to load\n", dst_addr, byte_cnt); + return ETIMEDOUT; } - if (dst_addr >= IWM_FW_MEM_EXTENDED_START && - dst_addr <= IWM_FW_MEM_EXTENDED_END && iwm_nic_lock(sc)) { - iwm_clear_bits_prph(sc, IWM_LMPM_CHICK, - IWM_LMPM_CHICK_EXTENDED_ADDR_SPACE); - iwm_nic_unlock(sc); - } - - return error; + return 0; } -int -iwm_load_cpu_sections_8000(struct iwm_softc *sc, struct iwm_fw_sects *fws, - int cpu, int *first_ucode_section) +static int +iwm_pcie_load_cpu_sections_8000(struct iwm_softc *sc, + const struct iwm_fw_sects *image, int cpu, int *first_ucode_section) { int shift_param; - int i, error = 0, sec_num = 0x1; + int i, ret = 0, sec_num = 0x1; uint32_t val, last_read_idx = 0; - const void *data; - uint32_t dlen; - uint32_t offset; if (cpu == 1) { shift_param = 0; @@ -2528,9 +2553,6 @@ iwm_load_cpu_sections_8000(struct iwm_so 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; - offset = fws->fw_sect[i].fws_devoff; /* * CPU1_CPU2_SEPARATOR_SECTION delimiter - separate between @@ -2538,27 +2560,17 @@ iwm_load_cpu_sections_8000(struct iwm_so * PAGING_SEPARATOR_SECTION delimiter - separate between * CPU2 non paged to CPU2 paging sec. */ - if (!data || offset == IWM_CPU1_CPU2_SEPARATOR_SECTION || - offset == IWM_PAGING_SEPARATOR_SECTION) - break; - - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "LOAD FIRMWARE chunk %d offset 0x%x len %d for cpu %d\n", - i, offset, dlen, cpu); - - if (dlen > sc->sc_fwdmasegsz) { + if (!image->fw_sect[i].data || + image->fw_sect[i].offset == IWM_CPU1_CPU2_SEPARATOR_SECTION || + image->fw_sect[i].offset == IWM_PAGING_SEPARATOR_SECTION) { IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "chunk %d too large (%d bytes)\n", i, dlen); - error = EFBIG; - } else { - error = iwm_firmware_load_sect(sc, offset, data, dlen); - } - if (error) { - device_printf(sc->sc_dev, - "could not load firmware chunk %d (error %d)\n", - i, error); - return error; + "Break since Data not valid or Empty section, sec = %d\n", + i); + break; } + ret = iwm_pcie_load_section(sc, i, &image->fw_sect[i]); + if (ret) + return ret; /* Notify the ucode of the loaded section number and status */ if (iwm_nic_lock(sc)) { @@ -2588,63 +2600,85 @@ iwm_load_cpu_sections_8000(struct iwm_so return 0; } -int -iwm_load_firmware_8000(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) +static int +iwm_pcie_load_cpu_sections(struct iwm_softc *sc, + const struct iwm_fw_sects *image, int cpu, int *first_ucode_section) { - struct iwm_fw_sects *fws; - int error = 0; - int first_ucode_section; + int shift_param; + int i, ret = 0; + uint32_t last_read_idx = 0; - IWM_DPRINTF(sc, IWM_DEBUG_RESET, "loading ucode type %d\n", - ucode_type); + if (cpu == 1) { + shift_param = 0; + *first_ucode_section = 0; + } else { + shift_param = 16; + (*first_ucode_section)++; + } - fws = &sc->sc_fw.fw_sects[ucode_type]; + for (i = *first_ucode_section; i < IWM_UCODE_SECTION_MAX; i++) { + last_read_idx = i; - /* configure the ucode to be ready to get the secured image */ - /* release CPU reset */ - iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT); + /* + * CPU1_CPU2_SEPARATOR_SECTION delimiter - separate between + * CPU1 to CPU2. + * PAGING_SEPARATOR_SECTION delimiter - separate between + * CPU2 non paged to CPU2 paging sec. + */ + if (!image->fw_sect[i].data || + image->fw_sect[i].offset == IWM_CPU1_CPU2_SEPARATOR_SECTION || + image->fw_sect[i].offset == IWM_PAGING_SEPARATOR_SECTION) { + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "Break since Data not valid or Empty section, sec = %d\n", + i); + break; + } - /* load to FW the binary Secured sections of CPU1 */ - error = iwm_load_cpu_sections_8000(sc, fws, 1, &first_ucode_section); - if (error) - return error; + ret = iwm_pcie_load_section(sc, i, &image->fw_sect[i]); + if (ret) + return ret; + } + + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) + iwm_set_bits_prph(sc, + IWM_CSR_UCODE_LOAD_STATUS_ADDR, + (IWM_LMPM_CPU_UCODE_LOADING_COMPLETED | + IWM_LMPM_CPU_HDRS_LOADING_COMPLETED | + IWM_LMPM_CPU_UCODE_LOADING_STARTED) << + shift_param); + + *first_ucode_section = last_read_idx; + + return 0; - /* load to FW the binary sections of CPU2 */ - return iwm_load_cpu_sections_8000(sc, fws, 2, &first_ucode_section); } static int -iwm_load_firmware_7000(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) +iwm_pcie_load_given_ucode(struct iwm_softc *sc, + const struct iwm_fw_sects *image) { - struct iwm_fw_sects *fws; - int error, i; - const void *data; - uint32_t dlen; - uint32_t offset; - - sc->sc_uc.uc_intr = 0; - - fws = &sc->sc_fw.fw_sects[ucode_type]; - for (i = 0; i < fws->fw_count; i++) { - data = fws->fw_sect[i].fws_data; - dlen = fws->fw_sect[i].fws_len; - offset = fws->fw_sect[i].fws_devoff; - IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, - "LOAD FIRMWARE type %d offset %u len %d\n", - ucode_type, offset, dlen); - if (dlen > sc->sc_fwdmasegsz) { - IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, - "chunk %d too large (%d bytes)\n", i, dlen); - error = EFBIG; - } else { - error = iwm_firmware_load_sect(sc, offset, data, dlen); - } - if (error) { - device_printf(sc->sc_dev, - "could not load firmware chunk %u of %u " - "(error=%d)\n", i, fws->fw_count, error); - return error; - } + int ret = 0; + int first_ucode_section; + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, "working with %s CPU\n", + image->is_dual_cpus ? "Dual" : "Single"); + + /* load to FW the binary non secured sections of CPU1 */ + ret = iwm_pcie_load_cpu_sections(sc, image, 1, &first_ucode_section); + if (ret) + return ret; + + if (image->is_dual_cpus) { + /* set CPU2 header address */ + iwm_write_prph(sc, + IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, + IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + + /* load to FW the binary sections of CPU2 */ + ret = iwm_pcie_load_cpu_sections(sc, image, 2, + &first_ucode_section); + if (ret) + return ret; } IWM_WRITE(sc, IWM_CSR_RESET, 0); @@ -2652,15 +2686,43 @@ iwm_load_firmware_7000(struct iwm_softc return 0; } +int +iwm_pcie_load_given_ucode_8000(struct iwm_softc *sc, + const struct iwm_fw_sects *image) +{ + int ret = 0; + int first_ucode_section; + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, "working with %s CPU\n", + image->is_dual_cpus ? "Dual" : "Single"); + + /* configure the ucode to be ready to get the secured image */ + /* release CPU reset */ + iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT); + + /* load to FW the binary Secured sections of CPU1 */ + ret = iwm_pcie_load_cpu_sections_8000(sc, image, 1, + &first_ucode_section); + if (ret) + return ret; + + /* load to FW the binary sections of CPU2 */ + return iwm_pcie_load_cpu_sections_8000(sc, image, 2, + &first_ucode_section); +} + static int iwm_load_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) { int error, w; - 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); + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { + error = iwm_pcie_load_given_ucode_8000(sc, + &sc->sc_fw.fw_sects[ucode_type]); + } else { + error = iwm_pcie_load_given_ucode(sc, + &sc->sc_fw.fw_sects[ucode_type]); + } if (error) return error; Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 01:07:04 2017 (r314064) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 02:18:04 2017 (r314065) @@ -170,17 +170,21 @@ enum iwm_ucode_type { IWM_UCODE_TYPE_MAX }; +/* one for each uCode image (inst/data, init/runtime/wowlan) */ +struct iwm_fw_desc { + const void *data; /* vmalloc'ed data */ + uint32_t len; /* size in bytes */ + uint32_t offset; /* offset in the device */ +}; + struct iwm_fw_info { const struct firmware *fw_fp; int fw_status; struct iwm_fw_sects { - struct iwm_fw_onesect { - const void *fws_data; - uint32_t fws_len; - uint32_t fws_devoff; - } fw_sect[IWM_UCODE_SECTION_MAX]; + struct iwm_fw_desc fw_sect[IWM_UCODE_SECTION_MAX]; int fw_count; + int is_dual_cpus; uint32_t paging_mem_size; } fw_sects[IWM_UCODE_TYPE_MAX]; From owner-svn-src-all@freebsd.org Wed Feb 22 02:23: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 28733CE9671; Wed, 22 Feb 2017 02:23:16 +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 E1390BF3; Wed, 22 Feb 2017 02:23:15 +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 v1M2NFSR005992; Wed, 22 Feb 2017 02:23:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M2NEua005989; Wed, 22 Feb 2017 02:23:14 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220223.v1M2NEua005989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 02:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314066 - 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, 22 Feb 2017 02:23:16 -0000 Author: adrian Date: Wed Feb 22 02:23:14 2017 New Revision: 314066 URL: https://svnweb.freebsd.org/changeset/base/314066 Log: [iwm] Sync IWM_MVM_ALIVE waiting and start_fw handling with iwlwifi. * Use the notification wait API, like it's done in the Linux iwlwifi code, to wait for the IWM_MVM_ALIVE notification. * This also should fix some firmware load interrupt issues, and errors in the nic lock using. Tested: * (adrian) Intel 7260, STA mode Obtained from: dragonflybsd.git a7697ea01c11fd493aec52260a02f31df680eb91 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 Wed Feb 22 02:18:04 2017 (r314065) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 02:23:14 2017 (r314066) @@ -285,8 +285,14 @@ struct iwm_nvm_section { uint8_t *data; }; +#define IWM_MVM_UCODE_ALIVE_TIMEOUT hz #define IWM_MVM_UCODE_CALIB_TIMEOUT (2*hz) +struct iwm_mvm_alive_data { + int valid; + uint32_t scd_base_addr; +}; + 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, @@ -320,7 +326,7 @@ static int iwm_nic_rx_init(struct iwm_so static int iwm_nic_tx_init(struct iwm_softc *); static int iwm_nic_init(struct iwm_softc *); static int iwm_enable_txq(struct iwm_softc *, int, int, int); -static int iwm_post_alive(struct iwm_softc *); +static int iwm_trans_pcie_fw_alive(struct iwm_softc *, uint32_t); 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 *, @@ -367,7 +373,7 @@ static int iwm_pcie_load_given_ucode_800 const struct iwm_fw_sects *); static int iwm_pcie_load_given_ucode(struct iwm_softc *, const struct iwm_fw_sects *); -static int iwm_start_fw(struct iwm_softc *, enum iwm_ucode_type); +static int iwm_start_fw(struct iwm_softc *, const struct iwm_fw_sects *); static int iwm_send_tx_ant_cfg(struct iwm_softc *, uint8_t); static int iwm_send_phy_cfg_cmd(struct iwm_softc *); static int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *, @@ -1633,20 +1639,33 @@ iwm_enable_txq(struct iwm_softc *sc, int (0 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (1 << IWM_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN)); + iwm_nic_unlock(sc); + iwm_clear_bits_prph(sc, IWM_SCD_AGGR_SEL, (1 << qid)); + if (!iwm_nic_lock(sc)) { + device_printf(sc->sc_dev, + "%s: cannot enable txq %d\n", __func__, qid); + return EBUSY; + } iwm_write_prph(sc, IWM_SCD_QUEUE_RDPTR(qid), 0); + iwm_nic_unlock(sc); - iwm_write_mem32(sc, sc->sched_base + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid), 0); + iwm_write_mem32(sc, sc->scd_base_addr + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid), 0); /* Set scheduler window size and frame limit. */ iwm_write_mem32(sc, - sc->sched_base + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid) + + sc->scd_base_addr + IWM_SCD_CONTEXT_QUEUE_OFFSET(qid) + sizeof(uint32_t), ((IWM_FRAME_LIMIT << IWM_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) & IWM_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) | ((IWM_FRAME_LIMIT << IWM_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) & IWM_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK)); + if (!iwm_nic_lock(sc)) { + device_printf(sc->sc_dev, + "%s: cannot enable txq %d\n", __func__, qid); + return EBUSY; + } iwm_write_prph(sc, IWM_SCD_QUEUE_STATUS_BITS(qid), (1 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (fifo << IWM_SCD_QUEUE_STTS_REG_POS_TXF) | @@ -1690,33 +1709,37 @@ iwm_enable_txq(struct iwm_softc *sc, int } static int -iwm_post_alive(struct iwm_softc *sc) +iwm_trans_pcie_fw_alive(struct iwm_softc *sc, uint32_t scd_base_addr) { - int nwords; int error, chnl; - uint32_t base; + + int clear_dwords = (IWM_SCD_TRANS_TBL_MEM_UPPER_BOUND - + IWM_SCD_CONTEXT_MEM_LOWER_BOUND) / sizeof(uint32_t); if (!iwm_nic_lock(sc)) return EBUSY; - base = iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR); - if (sc->sched_base != base) { + iwm_ict_reset(sc); + + iwm_nic_unlock(sc); + + sc->scd_base_addr = iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR); + if (scd_base_addr != 0 && + scd_base_addr != sc->scd_base_addr) { device_printf(sc->sc_dev, "%s: sched addr mismatch: alive: 0x%x prph: 0x%x\n", - __func__, sc->sched_base, base); + __func__, sc->scd_base_addr, scd_base_addr); } - iwm_ict_reset(sc); - - /* Clear TX scheduler state in SRAM. */ - nwords = (IWM_SCD_TRANS_TBL_MEM_UPPER_BOUND - - IWM_SCD_CONTEXT_MEM_LOWER_BOUND) - / sizeof(uint32_t); + /* reset context data, TX status and translation data */ error = iwm_write_mem(sc, - sc->sched_base + IWM_SCD_CONTEXT_MEM_LOWER_BOUND, - NULL, nwords); + sc->scd_base_addr + IWM_SCD_CONTEXT_MEM_LOWER_BOUND, + NULL, clear_dwords); if (error) - goto out; + return EBUSY; + + if (!iwm_nic_lock(sc)) + return EBUSY; /* Set physical address of TX scheduler rings (1KB aligned). */ iwm_write_prph(sc, IWM_SCD_DRAM_BASE_ADDR, sc->sched_dma.paddr >> 10); @@ -1745,14 +1768,14 @@ iwm_post_alive(struct iwm_softc *sc) IWM_SETBITS(sc, IWM_FH_TX_CHICKEN_BITS_REG, IWM_FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); + iwm_nic_unlock(sc); + /* Enable L1-Active */ 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); } - out: - iwm_nic_unlock(sc); return error; } @@ -2589,6 +2612,8 @@ iwm_pcie_load_cpu_sections_8000(struct i *first_ucode_section = last_read_idx; + iwm_enable_interrupts(sc); + if (iwm_nic_lock(sc)) { if (cpu == 1) IWM_WRITE(sc, IWM_FH_UCODE_LOAD_STATUS, 0xFFFF); @@ -2681,6 +2706,9 @@ iwm_pcie_load_given_ucode(struct iwm_sof return ret; } + iwm_enable_interrupts(sc); + + /* release CPU reset */ IWM_WRITE(sc, IWM_CSR_RESET, 0); return 0; @@ -2711,59 +2739,56 @@ iwm_pcie_load_given_ucode_8000(struct iw &first_ucode_section); } -static int -iwm_load_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) +/* XXX Get rid of this definition */ +static inline void +iwm_enable_fw_load_int(struct iwm_softc *sc) { - int error, w; - - if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { - error = iwm_pcie_load_given_ucode_8000(sc, - &sc->sc_fw.fw_sects[ucode_type]); - } else { - error = iwm_pcie_load_given_ucode(sc, - &sc->sc_fw.fw_sects[ucode_type]); - } - if (error) - return error; - - /* wait for the firmware to load */ - for (w = 0; !sc->sc_uc.uc_intr && w < 10; w++) { - error = msleep(&sc->sc_uc, &sc->sc_mtx, 0, "iwmuc", hz/10); - } - if (error || !sc->sc_uc.uc_ok) { - device_printf(sc->sc_dev, "could not load firmware\n"); - 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", - iwm_read_prph(sc, IWM_SB_CPU_2_STATUS)); - } - } - - return error; + IWM_DPRINTF(sc, IWM_DEBUG_INTR, "Enabling FW load interrupt\n"); + sc->sc_intmask = IWM_CSR_INT_BIT_FH_TX; + IWM_WRITE(sc, IWM_CSR_INT_MASK, sc->sc_intmask); } -/* iwlwifi: pcie/trans.c */ +/* XXX Add proper rfkill support code */ static int -iwm_start_fw(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) +iwm_start_fw(struct iwm_softc *sc, + const struct iwm_fw_sects *fw) { - int error; - - IWM_WRITE(sc, IWM_CSR_INT, ~0); + int ret; - if ((error = iwm_nic_init(sc)) != 0) { - device_printf(sc->sc_dev, "unable to init nic\n"); - return error; + /* This may fail if AMT took ownership of the device */ + if (iwm_prepare_card_hw(sc)) { + device_printf(sc->sc_dev, + "%s: Exit HW not ready\n", __func__); + ret = EIO; + goto out; } + IWM_WRITE(sc, IWM_CSR_INT, 0xFFFFFFFF); + + iwm_disable_interrupts(sc); + /* make sure rfkill handshake bits are cleared */ IWM_WRITE(sc, IWM_CSR_UCODE_DRV_GP1_CLR, IWM_CSR_UCODE_SW_BIT_RFKILL); IWM_WRITE(sc, IWM_CSR_UCODE_DRV_GP1_CLR, IWM_CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); /* clear (again), then enable host interrupts */ - IWM_WRITE(sc, IWM_CSR_INT, ~0); - iwm_enable_interrupts(sc); + IWM_WRITE(sc, IWM_CSR_INT, 0xFFFFFFFF); + + ret = iwm_nic_init(sc); + if (ret) { + device_printf(sc->sc_dev, "%s: Unable to init nic\n", __func__); + goto out; + } + + /* + * Now, we load the firmware and don't want to be interrupted, even + * by the RF-Kill interrupt (hence mask all the interrupt besides the + * FH_TX interrupt which is needed to load the firmware). If the + * RF-Kill switch is toggled, we will find out after having loaded + * the firmware and return the proper value to the caller. + */ + iwm_enable_fw_load_int(sc); /* really make sure rfkill handshake bits are cleared */ /* maybe we should write a few times more? just to make sure */ @@ -2771,7 +2796,15 @@ iwm_start_fw(struct iwm_softc *sc, enum IWM_WRITE(sc, IWM_CSR_UCODE_DRV_GP1_CLR, IWM_CSR_UCODE_SW_BIT_RFKILL); /* Load the given image to the HW */ - return iwm_load_firmware(sc, ucode_type); + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) + ret = iwm_pcie_load_given_ucode_8000(sc, fw); + else + ret = iwm_pcie_load_given_ucode(sc, fw); + + /* XXX re-check RF-Kill state */ + +out: + return ret; } static int @@ -2790,7 +2823,7 @@ static int iwm_send_phy_cfg_cmd(struct iwm_softc *sc) { struct iwm_phy_cfg_cmd phy_cfg_cmd; - enum iwm_ucode_type ucode_type = sc->sc_uc_current; + enum iwm_ucode_type ucode_type = sc->cur_ucode; /* Set parameters */ phy_cfg_cmd.phy_cfg = htole32(iwm_mvm_get_phy_config(sc)); @@ -2806,6 +2839,83 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *s } static int +iwm_alive_fn(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data) +{ + struct iwm_mvm_alive_data *alive_data = data; + struct iwm_mvm_alive_resp_ver1 *palive1; + struct iwm_mvm_alive_resp_ver2 *palive2; + struct iwm_mvm_alive_resp *palive; + + if (iwm_rx_packet_payload_len(pkt) == sizeof(*palive1)) { + palive1 = (void *)pkt->data; + + sc->support_umac_log = FALSE; + sc->error_event_table = + le32toh(palive1->error_event_table_ptr); + sc->log_event_table = + le32toh(palive1->log_event_table_ptr); + alive_data->scd_base_addr = le32toh(palive1->scd_base_ptr); + + alive_data->valid = le16toh(palive1->status) == + IWM_ALIVE_STATUS_OK; + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "Alive VER1 ucode status 0x%04x revision 0x%01X 0x%01X flags 0x%01X\n", + le16toh(palive1->status), palive1->ver_type, + palive1->ver_subtype, palive1->flags); + } else if (iwm_rx_packet_payload_len(pkt) == sizeof(*palive2)) { + palive2 = (void *)pkt->data; + sc->error_event_table = + le32toh(palive2->error_event_table_ptr); + sc->log_event_table = + le32toh(palive2->log_event_table_ptr); + alive_data->scd_base_addr = le32toh(palive2->scd_base_ptr); + sc->umac_error_event_table = + le32toh(palive2->error_info_addr); + + alive_data->valid = le16toh(palive2->status) == + IWM_ALIVE_STATUS_OK; + if (sc->umac_error_event_table) + sc->support_umac_log = TRUE; + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "Alive VER2 ucode status 0x%04x revision 0x%01X 0x%01X flags 0x%01X\n", + le16toh(palive2->status), palive2->ver_type, + palive2->ver_subtype, palive2->flags); + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "UMAC version: Major - 0x%x, Minor - 0x%x\n", + palive2->umac_major, palive2->umac_minor); + } else if (iwm_rx_packet_payload_len(pkt) == sizeof(*palive)) { + palive = (void *)pkt->data; + + sc->error_event_table = + le32toh(palive->error_event_table_ptr); + sc->log_event_table = + le32toh(palive->log_event_table_ptr); + alive_data->scd_base_addr = le32toh(palive->scd_base_ptr); + sc->umac_error_event_table = + le32toh(palive->error_info_addr); + + alive_data->valid = le16toh(palive->status) == + IWM_ALIVE_STATUS_OK; + if (sc->umac_error_event_table) + sc->support_umac_log = TRUE; + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "Alive VER3 ucode status 0x%04x revision 0x%01X 0x%01X flags 0x%01X\n", + le16toh(palive->status), palive->ver_type, + palive->ver_subtype, palive->flags); + + IWM_DPRINTF(sc, IWM_DEBUG_RESET, + "UMAC version: Major - 0x%x, Minor - 0x%x\n", + le32toh(palive->umac_major), + le32toh(palive->umac_minor)); + } + + return TRUE; +} + +static int iwm_wait_phy_db_entry(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data) { @@ -2831,27 +2941,76 @@ static int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) { - enum iwm_ucode_type old_type = sc->sc_uc_current; + struct iwm_notification_wait alive_wait; + struct iwm_mvm_alive_data alive_data; + const struct iwm_fw_sects *fw; + enum iwm_ucode_type old_type = sc->cur_ucode; int error; + static const uint16_t alive_cmd[] = { IWM_MVM_ALIVE }; if ((error = iwm_read_firmware(sc, ucode_type)) != 0) { device_printf(sc->sc_dev, "iwm_read_firmware: failed %d\n", error); return error; } + fw = &sc->sc_fw.fw_sects[ucode_type]; + sc->cur_ucode = ucode_type; + sc->ucode_loaded = FALSE; + + memset(&alive_data, 0, sizeof(alive_data)); + iwm_init_notification_wait(sc->sc_notif_wait, &alive_wait, + alive_cmd, nitems(alive_cmd), + iwm_alive_fn, &alive_data); - sc->sc_uc_current = ucode_type; - error = iwm_start_fw(sc, ucode_type); + error = iwm_start_fw(sc, fw); if (error) { device_printf(sc->sc_dev, "iwm_start_fw: failed %d\n", error); - sc->sc_uc_current = old_type; + sc->cur_ucode = old_type; + iwm_remove_notification(sc->sc_notif_wait, &alive_wait); return error; } - error = iwm_post_alive(sc); + /* + * Some things may run in the background now, but we + * just wait for the ALIVE notification here. + */ + IWM_UNLOCK(sc); + error = iwm_wait_notification(sc->sc_notif_wait, &alive_wait, + IWM_MVM_UCODE_ALIVE_TIMEOUT); + IWM_LOCK(sc); if (error) { - device_printf(sc->sc_dev, "iwm_fw_alive: failed %d\n", error); + if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { + device_printf(sc->sc_dev, + "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n", + iwm_read_prph(sc, IWM_SB_CPU_1_STATUS), + iwm_read_prph(sc, IWM_SB_CPU_2_STATUS)); + } + sc->cur_ucode = old_type; + return error; } + + if (!alive_data.valid) { + device_printf(sc->sc_dev, "%s: Loaded ucode is not valid\n", + __func__); + sc->cur_ucode = old_type; + return EIO; + } + + iwm_trans_pcie_fw_alive(sc, alive_data.scd_base_addr); + + /* + * configure and operate fw paging mechanism. + * driver configures the paging flow only once, CPU2 paging image + * included in the IWM_UCODE_INIT image. + */ + if (fw->paging_mem_size) { + /* XXX implement FW paging */ + device_printf(sc->sc_dev, + "%s: XXX FW paging not implemented yet\n", __func__); + } + + if (!error) + sc->ucode_loaded = TRUE; return error; } @@ -5201,7 +5360,7 @@ iwm_nic_umac_error(struct iwm_softc *sc) struct iwm_umac_error_event_table table; uint32_t base; - base = sc->sc_uc.uc_umac_error_event_table; + base = sc->umac_error_event_table; if (base < 0x800000) { device_printf(sc->sc_dev, "Invalid error log pointer 0x%08x\n", @@ -5256,7 +5415,7 @@ iwm_nic_error(struct iwm_softc *sc) uint32_t base; device_printf(sc->sc_dev, "dumping device error log\n"); - base = sc->sc_uc.uc_error_event_table; + base = sc->umac_error_event_table; if (base < 0x800000) { device_printf(sc->sc_dev, "Invalid error log pointer 0x%08x\n", base); @@ -5318,7 +5477,7 @@ iwm_nic_error(struct iwm_softc *sc) device_printf(sc->sc_dev, "%08X | timestamp\n", table.u_timestamp); device_printf(sc->sc_dev, "%08X | flow_handler\n", table.flow_handler); - if (sc->sc_uc.uc_umac_error_event_table) + if (sc->umac_error_event_table) iwm_nic_umac_error(sc); } #endif @@ -5428,57 +5587,8 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_MFUART_LOAD_NOTIFICATION: break; - case IWM_MVM_ALIVE: { - struct iwm_mvm_alive_resp_v1 *resp1; - struct iwm_mvm_alive_resp_v2 *resp2; - struct iwm_mvm_alive_resp_v3 *resp3; - - if (iwm_rx_packet_payload_len(pkt) == sizeof(*resp1)) { - resp1 = (void *)pkt->data; - sc->sc_uc.uc_error_event_table - = le32toh(resp1->error_event_table_ptr); - sc->sc_uc.uc_log_event_table - = le32toh(resp1->log_event_table_ptr); - sc->sched_base = le32toh(resp1->scd_base_ptr); - if (resp1->status == IWM_ALIVE_STATUS_OK) - sc->sc_uc.uc_ok = 1; - else - sc->sc_uc.uc_ok = 0; - } - - if (iwm_rx_packet_payload_len(pkt) == sizeof(*resp2)) { - resp2 = (void *)pkt->data; - sc->sc_uc.uc_error_event_table - = le32toh(resp2->error_event_table_ptr); - sc->sc_uc.uc_log_event_table - = le32toh(resp2->log_event_table_ptr); - sc->sched_base = le32toh(resp2->scd_base_ptr); - sc->sc_uc.uc_umac_error_event_table - = le32toh(resp2->error_info_addr); - if (resp2->status == IWM_ALIVE_STATUS_OK) - sc->sc_uc.uc_ok = 1; - else - sc->sc_uc.uc_ok = 0; - } - - if (iwm_rx_packet_payload_len(pkt) == sizeof(*resp3)) { - resp3 = (void *)pkt->data; - sc->sc_uc.uc_error_event_table - = le32toh(resp3->error_event_table_ptr); - sc->sc_uc.uc_log_event_table - = le32toh(resp3->log_event_table_ptr); - sc->sched_base = le32toh(resp3->scd_base_ptr); - sc->sc_uc.uc_umac_error_event_table - = le32toh(resp3->error_info_addr); - if (resp3->status == IWM_ALIVE_STATUS_OK) - sc->sc_uc.uc_ok = 1; - else - sc->sc_uc.uc_ok = 0; - } - - sc->sc_uc.uc_intr = 1; - wakeup(&sc->sc_uc); - break; } + case IWM_MVM_ALIVE: + break; case IWM_CALIB_RES_NOTIF_PHY_DB: break; @@ -5730,8 +5840,8 @@ iwm_intr(void *arg) IWM_WRITE(sc, IWM_CSR_INT, r1 | ~sc->sc_intmask); - /* ignored */ - handled |= (r1 & (IWM_CSR_INT_BIT_ALIVE /*| IWM_CSR_INT_BIT_SCD*/)); + /* Safely ignore these bits for debug checks below */ + r1 &= ~(IWM_CSR_INT_BIT_ALIVE | IWM_CSR_INT_BIT_SCD); if (r1 & IWM_CSR_INT_BIT_SW_ERR) { int i; Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Wed Feb 22 02:18:04 2017 (r314065) +++ head/sys/dev/iwm/if_iwmreg.h Wed Feb 22 02:23:14 2017 (r314066) @@ -2141,7 +2141,7 @@ enum { #define IWM_ALIVE_FLG_RFKILL (1 << 0) -struct iwm_mvm_alive_resp_v1 { +struct iwm_mvm_alive_resp_ver1 { uint16_t status; uint16_t flags; uint8_t ucode_minor; @@ -2163,7 +2163,7 @@ struct iwm_mvm_alive_resp_v1 { uint32_t scd_base_ptr; /* SRAM address for SCD */ } __packed; /* IWM_ALIVE_RES_API_S_VER_1 */ -struct iwm_mvm_alive_resp_v2 { +struct iwm_mvm_alive_resp_ver2 { uint16_t status; uint16_t flags; uint8_t ucode_minor; @@ -2185,14 +2185,14 @@ struct iwm_mvm_alive_resp_v2 { uint32_t scd_base_ptr; /* SRAM address for SCD */ uint32_t st_fwrd_addr; /* pointer to Store and forward */ uint32_t st_fwrd_size; - uint8_t umac_minor; /* UMAC version: minor */ - uint8_t umac_major; /* UMAC version: major */ - uint16_t umac_id; /* UMAC version: id */ - uint32_t error_info_addr; /* SRAM address for UMAC error log */ + uint8_t umac_minor; /* UMAC version: minor */ + uint8_t umac_major; /* UMAC version: major */ + uint16_t umac_id; /* UMAC version: id */ + uint32_t error_info_addr; /* SRAM address for UMAC error log */ uint32_t dbg_print_buff_addr; } __packed; /* ALIVE_RES_API_S_VER_2 */ -struct iwm_mvm_alive_resp_v3 { +struct iwm_mvm_alive_resp { uint16_t status; uint16_t flags; uint32_t ucode_minor; @@ -2212,7 +2212,7 @@ struct iwm_mvm_alive_resp_v3 { uint32_t st_fwrd_size; uint32_t umac_minor; /* UMAC version: minor */ uint32_t umac_major; /* UMAC version: major */ - uint32_t error_info_addr; /* SRAM address for UMAC error log */ + uint32_t error_info_addr; /* SRAM address for UMAC error log */ uint32_t dbg_print_buff_addr; } __packed; /* ALIVE_RES_API_S_VER_3 */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 02:18:04 2017 (r314065) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 02:23:14 2017 (r314066) @@ -299,15 +299,6 @@ struct iwm_rx_ring { int cur; }; -struct iwm_ucode_status { - uint32_t uc_error_event_table; - uint32_t uc_umac_error_event_table; - uint32_t uc_log_event_table; - - int uc_ok; - int uc_intr; -}; - #define IWM_CMD_RESP_MAX PAGE_SIZE #define IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 500 @@ -440,7 +431,7 @@ struct iwm_softc { /* TX scheduler rings. */ struct iwm_dma_info sched_dma; - uint32_t sched_base; + uint32_t scd_base_addr; /* TX/RX rings. */ struct iwm_tx_ring txq[IWM_MVM_MAX_QUEUES]; @@ -461,8 +452,8 @@ struct iwm_softc { int sc_fw_chunk_done; - struct iwm_ucode_status sc_uc; - enum iwm_ucode_type sc_uc_current; + enum iwm_ucode_type cur_ucode; + int ucode_loaded; char sc_fwver[32]; int sc_capaflags; @@ -530,6 +521,12 @@ struct iwm_softc { struct iwm_notif_wait_data *sc_notif_wait; int cmd_hold_nic_awake; + + /* Firmware status */ + uint32_t error_event_table; + uint32_t log_event_table; + uint32_t umac_error_event_table; + int support_umac_log; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-all@freebsd.org Wed Feb 22 02:24: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 BDE25CE96FB; Wed, 22 Feb 2017 02:24: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 8D99BD60; Wed, 22 Feb 2017 02:24: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 v1M2Og8w006083; Wed, 22 Feb 2017 02:24:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M2OgFl006082; Wed, 22 Feb 2017 02:24:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220224.v1M2OgFl006082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 02:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314067 - 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, 22 Feb 2017 02:24:43 -0000 Author: adrian Date: Wed Feb 22 02:24:42 2017 New Revision: 314067 URL: https://svnweb.freebsd.org/changeset/base/314067 Log: [iwm] With the previous commits, this DELAY no longer seems to be needed. Obtained from: dragonflybsd.git 516272d3d02c821ace16a91cfdeb28540ac74ecc 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 22 02:23:14 2017 (r314066) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 02:24:42 2017 (r314067) @@ -2602,11 +2602,6 @@ iwm_pcie_load_cpu_sections_8000(struct i IWM_WRITE(sc, IWM_FH_UCODE_LOAD_STATUS, val); sec_num = (sec_num << 1) | 0x1; iwm_nic_unlock(sc); - - /* - * The firmware won't load correctly without this delay. - */ - DELAY(8000); } } From owner-svn-src-all@freebsd.org Wed Feb 22 02:36: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 E5F25CE9A6C; Wed, 22 Feb 2017 02:36:02 +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 C09521568; Wed, 22 Feb 2017 02:36:02 +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 v1M2a1Rb010509; Wed, 22 Feb 2017 02:36:01 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M2a0im010487; Wed, 22 Feb 2017 02:36:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702220236.v1M2a0im010487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Feb 2017 02:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314068 - in head/sys: amd64/amd64 boot/common boot/efi/libefi boot/fdt boot/ficl boot/kshim boot/ofw/libofw boot/sparc64/loader boot/userboot/userboot boot/zfs libkern mips/atheros/ar5... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 02:36:03 -0000 Author: pfg Date: Wed Feb 22 02:35:59 2017 New Revision: 314068 URL: https://svnweb.freebsd.org/changeset/base/314068 Log: sys: Replace zero with NULL for pointers. Found with: devel/coccinelle MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D9694 Modified: head/sys/amd64/amd64/db_disasm.c head/sys/amd64/amd64/pmap.c head/sys/boot/common/md.c head/sys/boot/efi/libefi/efinet.c head/sys/boot/fdt/fdt_overlay.c head/sys/boot/ficl/ficl.c head/sys/boot/kshim/bsd_kernel.c head/sys/boot/ofw/libofw/ofw_memory.c head/sys/boot/sparc64/loader/main.c head/sys/boot/userboot/userboot/userboot_disk.c head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c head/sys/libkern/iconv_xlat16.c head/sys/mips/atheros/ar531x/apb.c head/sys/net/if_fddisubr.c head/sys/net/if_iso88025subr.c head/sys/net/iflib.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/amd64/amd64/db_disasm.c ============================================================================== --- head/sys/amd64/amd64/db_disasm.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/amd64/amd64/db_disasm.c Wed Feb 22 02:35:59 2017 (r314068) @@ -1044,7 +1044,7 @@ db_read_address(loc, short_addr, rex, re return (loc); } addrp->is_reg = FALSE; - addrp->index = 0; + addrp->index = NULL; if (short_addr) size = LONG; @@ -1067,7 +1067,7 @@ db_read_address(loc, short_addr, rex, re if (rm == 5) { get_value_inc(addrp->disp, loc, 4, FALSE); if (have_sib) - addrp->base = 0; + addrp->base = NULL; else if (short_addr) addrp->base = "%eip"; else @@ -1109,9 +1109,9 @@ db_print_address(seg, size, rex, addrp) db_printf("%s:", seg); } - if (addrp->disp != 0 || (addrp->base == 0 && addrp->index == 0)) + if (addrp->disp != 0 || (addrp->base == NULL && addrp->index == NULL)) db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); - if (addrp->base != 0 || addrp->index != 0) { + if (addrp->base != NULL || addrp->index != NULL) { db_printf("("); if (addrp->base) db_printf("%s", addrp->base); @@ -1248,7 +1248,7 @@ db_disasm(db_addr_t loc, bool altfmt) get_value_inc(inst, loc, 1, FALSE); short_addr = FALSE; size = LONG; - seg = 0; + seg = NULL; /* * Get prefixes @@ -1313,7 +1313,7 @@ db_disasm(db_addr_t loc, bool altfmt) while (ip->i_size == ESC) { get_value_inc(inst, loc, 1, FALSE); ip = ((const struct inst * const *)ip->i_extra)[inst>>4]; - if (ip == 0) { + if (ip == NULL) { ip = &db_bad_inst; } else { Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/amd64/amd64/pmap.c Wed Feb 22 02:35:59 2017 (r314068) @@ -391,7 +391,7 @@ static struct md_page pv_dummy; /* * All those kernel PT submaps that BSD is so fond of */ -pt_entry_t *CMAP1 = 0; +pt_entry_t *CMAP1 = NULL; caddr_t CADDR1 = 0; static vm_offset_t qframe = 0; static struct mtx qframe_mtx; Modified: head/sys/boot/common/md.c ============================================================================== --- head/sys/boot/common/md.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/common/md.c Wed Feb 22 02:35:59 2017 (r314068) @@ -103,7 +103,7 @@ md_strategy(void *devdata, int rw, daddr if ((ofs + size) > MD_IMAGE_SIZE) size = MD_IMAGE_SIZE - ofs; - if (rsize != 0) + if (rsize != NULL) *rsize = size; switch (rw) { Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/efi/libefi/efinet.c Wed Feb 22 02:35:59 2017 (r314068) @@ -131,13 +131,13 @@ efinet_put(struct iodesc *desc, void *pk /* Wait for the buffer to be transmitted */ do { - buf = 0; /* XXX Is this needed? */ + buf = NULL; /* XXX Is this needed? */ status = net->GetStatus(net, 0, &buf); /* * XXX EFI1.1 and the E1000 card returns a different * address than we gave. Sigh. */ - } while (status == EFI_SUCCESS && buf == 0); + } while (status == EFI_SUCCESS && buf == NULL); /* XXX How do we deal with status != EFI_SUCCESS now? */ return ((status == EFI_SUCCESS) ? len : -1); Modified: head/sys/boot/fdt/fdt_overlay.c ============================================================================== --- head/sys/boot/fdt/fdt_overlay.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/fdt/fdt_overlay.c Wed Feb 22 02:35:59 2017 (r314068) @@ -64,7 +64,7 @@ fdt_get_fixup_location(void *fdtp, const int prop_offset, o, proplen; void *result; - result = 0; + result = NULL; path = strdup(fixup); prop = strchr(path, ':'); Modified: head/sys/boot/ficl/ficl.c ============================================================================== --- head/sys/boot/ficl/ficl.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/ficl/ficl.c Wed Feb 22 02:35:59 2017 (r314068) @@ -276,7 +276,7 @@ void ficlFreeVM(FICL_VM *pVM) FICL_SYSTEM *pSys = pVM->pSys; FICL_VM *pList = pSys->vmList; - assert(pVM != 0); + assert(pVM != NULL); if (pSys->vmList == pVM) { Modified: head/sys/boot/kshim/bsd_kernel.c ============================================================================== --- head/sys/boot/kshim/bsd_kernel.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/kshim/bsd_kernel.c Wed Feb 22 02:35:59 2017 (r314068) @@ -75,7 +75,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi void *addr; addr = malloc(dmat->maxsize + dmat->alignment, XXX, XXX); - if (addr == 0) + if (addr == NULL) return (ENOMEM); *mapp = addr; Modified: head/sys/boot/ofw/libofw/ofw_memory.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_memory.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/ofw/libofw/ofw_memory.c Wed Feb 22 02:35:59 2017 (r314068) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "openfirm.h" -static void *heap_base = 0; +static void *heap_base = NULL; static unsigned int heap_size = 0; struct ofw_mapping { Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/sparc64/loader/main.c Wed Feb 22 02:35:59 2017 (r314068) @@ -859,7 +859,7 @@ main(int (*openfirm)(void *)) /* * Initialize devices. */ - for (dp = devsw; *dp != 0; dp++) + for (dp = devsw; *dp != NULL; dp++) if ((*dp)->dv_init != 0) (*dp)->dv_init(); Modified: head/sys/boot/userboot/userboot/userboot_disk.c ============================================================================== --- head/sys/boot/userboot/userboot/userboot_disk.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/userboot/userboot/userboot_disk.c Wed Feb 22 02:35:59 2017 (r314068) @@ -91,8 +91,8 @@ userdisk_init(void) return (ENOMEM); for (i = 0; i < userdisk_maxunit; i++) { if (CALLBACK(diskioctl, i, DIOCGSECTORSIZE, - §orsize) != 0 || CALLBACK(diskioctl, i, - DIOCGMEDIASIZE, &mediasize) != 0) + §orsize) != NULL || CALLBACK(diskioctl, i, + DIOCGMEDIASIZE, &mediasize) != NULL) return (ENXIO); ud_info[i].mediasize = mediasize; ud_info[i].sectorsize = sectorsize; Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/zfs/zfs.c Wed Feb 22 02:35:59 2017 (r314068) @@ -126,7 +126,7 @@ zfs_close(struct open_file *f) { struct file *fp = (struct file *)f->f_fsdata; - dnode_cache_obj = 0; + dnode_cache_obj = NULL; f->f_fsdata = (void *)0; if (fp == (struct file *)0) return (0); Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/boot/zfs/zfsimpl.c Wed Feb 22 02:35:59 2017 (r314068) @@ -69,7 +69,7 @@ static const char *features_for_read[] = static spa_list_t zfs_pools; static uint64_t zfs_crc64_table[256]; -static const dnode_phys_t *dnode_cache_obj = 0; +static const dnode_phys_t *dnode_cache_obj = NULL; static uint64_t dnode_cache_bn; static char *dnode_cache_buf; static char *zap_scratch; @@ -1527,7 +1527,7 @@ fzap_lookup(const spa_t *spa, const dnod zc = &ZAP_LEAF_CHUNK(&zl, h); while (zc->l_entry.le_hash != hash) { if (zc->l_entry.le_next == 0xffff) { - zc = 0; + zc = NULL; break; } zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); @@ -2316,7 +2316,7 @@ zfs_lookup(const struct zfsmount *mount, p = q; } else { strcpy(element, p); - p = 0; + p = NULL; } rc = zfs_dnode_stat(spa, &dn, &sb); Modified: head/sys/libkern/iconv_xlat16.c ============================================================================== --- head/sys/libkern/iconv_xlat16.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/libkern/iconv_xlat16.c Wed Feb 22 02:35:59 2017 (r314068) @@ -268,7 +268,7 @@ iconv_xlat16_conv(void *d2p, const char * there is a case that inbuf char is a single * byte char while inlen == 2 */ - if ((u_char)*(src+1) == 0 && !nullin ) { + if ((u_char)*(src+1) == '\0' && !nullin ) { src++; ir--; } else { Modified: head/sys/mips/atheros/ar531x/apb.c ============================================================================== --- head/sys/mips/atheros/ar531x/apb.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/mips/atheros/ar531x/apb.c Wed Feb 22 02:35:59 2017 (r314068) @@ -329,7 +329,7 @@ apb_alloc_resource(device_t bus, device_ } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource %d\n", __func__, type); return (0); } Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/net/if_fddisubr.c Wed Feb 22 02:35:59 2017 (r314068) @@ -400,7 +400,7 @@ fddi_input(ifp, m) m_adj(m, FDDI_HDR_LEN); m = m_pullup(m, LLC_SNAPFRAMELEN); - if (m == 0) { + if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto dropanyway; } Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/net/if_iso88025subr.c Wed Feb 22 02:35:59 2017 (r314068) @@ -487,7 +487,7 @@ iso88025_input(ifp, m) m_adj(m, mac_hdr_len); m = m_pullup(m, LLC_SNAPFRAMELEN); - if (m == 0) { + if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto dropanyway; } Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/net/iflib.c Wed Feb 22 02:35:59 2017 (r314068) @@ -1003,7 +1003,7 @@ iflib_netmap_txq_init(if_ctx_t ctx, ifli struct netmap_slot *slot; slot = netmap_reset(na, NR_TX, txq->ift_id, 0); - if (slot == 0) + if (slot == NULL) return; for (int i = 0; i < ctx->ifc_softc_ctx.isc_ntxd[0]; i++) { @@ -1028,7 +1028,7 @@ iflib_netmap_rxq_init(if_ctx_t ctx, ifli int nrxd; slot = netmap_reset(na, NR_RX, rxq->ifr_id, 0); - if (slot == 0) + if (slot == NULL) return; map = rxq->ifr_fl[0].ifl_sds.ifsd_map; nrxd = ctx->ifc_softc_ctx.isc_nrxd[0]; Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Feb 22 02:24:42 2017 (r314067) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Feb 22 02:35:59 2017 (r314068) @@ -3135,7 +3135,7 @@ int classify_opcode_kidx(ipfw_insn *cmd, uint16_t *puidx) { - if (find_op_rw(cmd, puidx, NULL) == 0) + if (find_op_rw(cmd, puidx, NULL) == NULL) return (1); return (0); } From owner-svn-src-all@freebsd.org Wed Feb 22 02:49: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 0DDC1CE9D99; Wed, 22 Feb 2017 02:49: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 AEA391BA6; Wed, 22 Feb 2017 02:49: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 v1M2nvid014491; Wed, 22 Feb 2017 02:49:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M2nvIn014489; Wed, 22 Feb 2017 02:49:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220249.v1M2nvIn014489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 02:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314069 - 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, 22 Feb 2017 02:49:59 -0000 Author: adrian Date: Wed Feb 22 02:49:57 2017 New Revision: 314069 URL: https://svnweb.freebsd.org/changeset/base/314069 Log: [iwm] Get rid of unneeded IWM_FWDMASEGSZ and IWM_FWMAXSIZE constants * We only need IWM_FH_MEM_TB_MAX_LENGTH bytes for the fw_dma memory. Obtained from: dragonflybsd.git f414b8da30816705e32573cc58097cacac34f161 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 22 02:35:59 2017 (r314068) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 02:49:57 2017 (r314069) @@ -1025,7 +1025,7 @@ iwm_alloc_fwmem(struct iwm_softc *sc) { /* Must be aligned on a 16-byte boundary. */ return iwm_dma_contig_alloc(sc->sc_dmat, &sc->fw_dma, - sc->sc_fwdmasegsz, 16); + IWM_FH_MEM_TB_MAX_LENGTH, 16); } /* tx scheduler rings. not used? */ @@ -5997,27 +5997,22 @@ iwm_dev_check(device_t dev) case PCI_PRODUCT_INTEL_WL_3160_1: case PCI_PRODUCT_INTEL_WL_3160_2: 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->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->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->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->cfg = &iwm8260_cfg; - sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; return (0); default: device_printf(dev, "unknown adapter type\n"); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 02:35:59 2017 (r314068) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 02:49:57 2017 (r314069) @@ -138,10 +138,6 @@ struct iwm_tx_radiotap_header { #define IWM_UCODE_SECTION_MAX 16 -#define IWM_FWDMASEGSZ (192*1024) -#define IWM_FWDMASEGSZ_8000 (320*1024) -/* sanity check value */ -#define IWM_FWMAXSIZE (2*1024*1024) /* * fw_status is used to determine if we've already parsed the firmware file @@ -476,7 +472,6 @@ struct iwm_softc { */ int sc_generation; - bus_size_t sc_fwdmasegsz; struct iwm_fw_info sc_fw; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; From owner-svn-src-all@freebsd.org Wed Feb 22 02:51: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 1534ECE9E1E; Wed, 22 Feb 2017 02:51:32 +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 D8EDF1EA4; Wed, 22 Feb 2017 02:51: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 v1M2pUgx014607; Wed, 22 Feb 2017 02:51:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M2pUUA014606; Wed, 22 Feb 2017 02:51:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220251.v1M2pUUA014606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 02:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314070 - 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, 22 Feb 2017 02:51:32 -0000 Author: adrian Date: Wed Feb 22 02:51:30 2017 New Revision: 314070 URL: https://svnweb.freebsd.org/changeset/base/314070 Log: [iwm] Fix typo in commit a7697ea01c11fd493aec52260a02f31df680eb91. * The sc->sc_uc.uc_error_event_table value is now at sc->error_event_table, and not sc->umac_error_event_table. Obtained from: dragonflybsd.git 612855b1a8c321ec9ba34f63edf913e7ecff8363 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 22 02:49:57 2017 (r314069) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 02:51:30 2017 (r314070) @@ -5410,7 +5410,7 @@ iwm_nic_error(struct iwm_softc *sc) uint32_t base; device_printf(sc->sc_dev, "dumping device error log\n"); - base = sc->umac_error_event_table; + base = sc->error_event_table; if (base < 0x800000) { device_printf(sc->sc_dev, "Invalid error log pointer 0x%08x\n", base); From owner-svn-src-all@freebsd.org Wed Feb 22 03:49: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 4218ECE7E93; Wed, 22 Feb 2017 03:49: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 021E56C4; Wed, 22 Feb 2017 03:49:47 +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 v1M3nlQ8039841; Wed, 22 Feb 2017 03:49:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M3nllv039840; Wed, 22 Feb 2017 03:49:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201702220349.v1M3nllv039840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 22 Feb 2017 03:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314071 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 03:49:48 -0000 Author: ian Date: Wed Feb 22 03:49:46 2017 New Revision: 314071 URL: https://svnweb.freebsd.org/changeset/base/314071 Log: Revert to this driver's historic behavior: assume an sd card is writable if the fdt data doesn't provide a gpio pin for reading the write protect switch and also doesn't contain a "wp-disable" property. In r311735 the long-bitrotted code in this driver for using the non- standard fdt "mmchs-wp-gpio-pin" property was replaced with new common support code for handling write-protect and card-detect gpio pins. The old code never found a property with that name, and the logic was to assume that no gpio pin meant that the card was not write protected. The new common code behaves differently. If there is no fdt data saying what to do about sensing write protect, the value in the standard SDHCI PRESENT_STATE register is used. On this hardware, if there is no signal for write protect muxed into the sd controller then that bit in the register indicates write protect. The real problem here is the fdt data, which should contain "wp-disable" properties for eMMC and micro-sd slots where write protect is not even an option in the hardware, but we are not in control of that data, it comes from linux. So we have to make the same flawed assumption in our driver that the corresponding linux driver has: no info means no protect. Reported by: several users on the arm@ list Pointy hat: me, for not testing enough before committing r311735 Modified: head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Wed Feb 22 02:51:30 2017 (r314070) +++ head/sys/arm/ti/ti_sdhci.c Wed Feb 22 03:49:46 2017 (r314071) @@ -75,6 +75,7 @@ struct ti_sdhci_softc { uint32_t sdhci_clkdiv; boolean_t disable_highspeed; boolean_t force_card_present; + boolean_t disable_readonly; }; /* @@ -363,6 +364,9 @@ ti_sdhci_get_ro(device_t brdev, device_t { struct ti_sdhci_softc *sc = device_get_softc(brdev); + if (sc->disable_readonly) + return (0); + return (sdhci_fdt_gpio_get_readonly(sc->gpio)); } @@ -557,8 +561,21 @@ ti_sdhci_attach(device_t dev) goto fail; } + /* + * Set up handling of card-detect and write-protect gpio lines. + * + * If there is no write protect info in the fdt data, fall back to the + * historical practice of assuming that the card is writable. This + * works around bad fdt data from the upstream source. The alternative + * would be to trust the sdhci controller's PRESENT_STATE register WP + * bit, but it may say write protect is in effect when it's not if the + * pinmux setup doesn't route the WP signal into the sdchi block. + */ sc->gpio = sdhci_fdt_gpio_setup(sc->dev, &sc->slot); + if (!OF_hasprop(node, "wp-gpios") && !OF_hasprop(node, "wp-disable")) + sc->disable_readonly = true; + /* Initialise the MMCHS hardware. */ ti_sdhci_hw_init(dev); From owner-svn-src-all@freebsd.org Wed Feb 22 04: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 CC753CE94EC; Wed, 22 Feb 2017 04:15:40 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9893F1235; Wed, 22 Feb 2017 04:15:40 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M4Fd43051597; Wed, 22 Feb 2017 04:15:39 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4FdmW051596; Wed, 22 Feb 2017 04:15:39 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201702220415.v1M4FdmW051596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 22 Feb 2017 04:15: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: r314072 - stable/11/crypto/openssh 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, 22 Feb 2017 04:15:40 -0000 Author: lidl Date: Wed Feb 22 04:15:39 2017 New Revision: 314072 URL: https://svnweb.freebsd.org/changeset/base/314072 Log: MFC r313965: Only notify blacklistd for successful logins in auth.c Before this change, every pass through auth.c resulted in a call to blacklist_notify(). In a normal remote login, there would be a failed login flagged for the printing of the "xxx login:" prompt, before the remote user could enter a password. If the user successfully entered a good password, then a good login would be flagged, and everything would be OK. If the user entered an incorrect password, there would be another failed login flagged in auth1.c (or auth2.c) for the actual bad password attempt. Finally, when sshd got around to issuing the second "xxx login:" prompt, there would be yet another failed login notice sent to blacklistd. So, if there was a 3 bad logins limit set (the default), the system would actually block the address after the first bad password attempt. Reported by: Rick Adams Reviewed by: des Sponsored by: The FreeBSD Foundation Modified: stable/11/crypto/openssh/auth.c Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssh/auth.c ============================================================================== --- stable/11/crypto/openssh/auth.c Wed Feb 22 03:49:46 2017 (r314071) +++ stable/11/crypto/openssh/auth.c Wed Feb 22 04:15:39 2017 (r314072) @@ -295,8 +295,8 @@ auth_log(Authctxt *authctxt, int authent authmsg = "Partial"; else { authmsg = authenticated ? "Accepted" : "Failed"; - BLACKLIST_NOTIFY(authenticated ? - BLACKLIST_AUTH_OK : BLACKLIST_AUTH_FAIL); + if (authenticated) + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); } authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s", From owner-svn-src-all@freebsd.org Wed Feb 22 04: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 39431CE96BE; Wed, 22 Feb 2017 04: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 E100416BC; Wed, 22 Feb 2017 04:27: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 v1M4R72F055759; Wed, 22 Feb 2017 04:27:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4R7pv055758; Wed, 22 Feb 2017 04:27:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220427.v1M4R7pv055758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314073 - 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, 22 Feb 2017 04:27:09 -0000 Author: adrian Date: Wed Feb 22 04:27:07 2017 New Revision: 314073 URL: https://svnweb.freebsd.org/changeset/base/314073 Log: [iwm] Remove OpenBSD-specific comment. Beautify pci cfg space accesses. Obtained from: dragonflybsd.git 710fdd011c30a1bd9f53b87c843fb8907c4a6cfd 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 22 04:15:39 2017 (r314072) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 04:27:07 2017 (r314073) @@ -3511,11 +3511,6 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, if (--ring->queued < IWM_TX_RING_LOMARK) { sc->qfullmsk &= ~(1 << ring->qid); if (sc->qfullmsk == 0) { - /* - * Well, we're in interrupt context, but then again - * I guess net80211 does all sorts of stunts in - * interrupt context, so maybe this is no biggie. - */ iwm_start(sc); } } @@ -6020,6 +6015,9 @@ iwm_dev_check(device_t dev) } } +/* PCI registers */ +#define PCI_CFG_RETRY_TIMEOUT 0x041 + static int iwm_pci_attach(device_t dev) { @@ -6029,9 +6027,9 @@ iwm_pci_attach(device_t dev) sc = device_get_softc(dev); - /* Clear device-specific "PCI retry timeout" register (41h). */ - reg = pci_read_config(dev, 0x40, sizeof(reg)); - pci_write_config(dev, 0x40, reg & ~0xff00, sizeof(reg)); + /* We disable the RETRY_TIMEOUT register (0x41) to keep + * PCI Tx retries from interfering with C3 CPU state */ + pci_write_config(dev, PCI_CFG_RETRY_TIMEOUT, 0x00, 1); /* Enable bus-mastering and hardware bug workaround. */ pci_enable_busmaster(dev); @@ -6539,11 +6537,12 @@ iwm_resume(device_t dev) { struct iwm_softc *sc = device_get_softc(dev); int do_reinit = 0; - uint16_t reg; - /* Clear device-specific "PCI retry timeout" register (41h). */ - reg = pci_read_config(dev, 0x40, sizeof(reg)); - pci_write_config(dev, 0x40, reg & ~0xff00, sizeof(reg)); + /* + * We disable the RETRY_TIMEOUT register (0x41) to keep + * PCI Tx retries from interfering with C3 CPU state. + */ + pci_write_config(dev, PCI_CFG_RETRY_TIMEOUT, 0x00, 1); iwm_init_task(device_get_softc(dev)); IWM_LOCK(sc); From owner-svn-src-all@freebsd.org Wed Feb 22 04:28: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 AC4B5CE9716; Wed, 22 Feb 2017 04:28: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 870541823; Wed, 22 Feb 2017 04:28: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 v1M4SAMX055839; Wed, 22 Feb 2017 04:28:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4SAPi055838; Wed, 22 Feb 2017 04:28:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220428.v1M4SAPi055838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314074 - 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, 22 Feb 2017 04:28:11 -0000 Author: adrian Date: Wed Feb 22 04:28:10 2017 New Revision: 314074 URL: https://svnweb.freebsd.org/changeset/base/314074 Log: [iwm] Simplify device id matching code a bit. * Just add the struct iwm_cfg pointers to the iwm_devices array, to get rid of the large switch clause. Obtained from: dragonflybsd.git 35f0e6c86c1654323d6b19f7a077f4ab8ac85868 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 22 04:27:07 2017 (r314073) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 04:28:10 2017 (r314074) @@ -5950,19 +5950,30 @@ iwm_intr(void *arg) #define PCI_PRODUCT_INTEL_WL_8260_2 0x24f4 static const struct iwm_devices { - uint16_t device; - const char *name; + uint16_t device; + const char *name; + const struct iwm_cfg *cfg; } iwm_devices[] = { - { PCI_PRODUCT_INTEL_WL_3160_1, "Intel Dual Band Wireless AC 3160" }, - { PCI_PRODUCT_INTEL_WL_3160_2, "Intel Dual Band Wireless AC 3160" }, - { PCI_PRODUCT_INTEL_WL_3165_1, "Intel Dual Band Wireless AC 3165" }, - { PCI_PRODUCT_INTEL_WL_3165_2, "Intel Dual Band Wireless AC 3165" }, - { PCI_PRODUCT_INTEL_WL_7260_1, "Intel Dual Band Wireless AC 7260" }, - { PCI_PRODUCT_INTEL_WL_7260_2, "Intel Dual Band Wireless AC 7260" }, - { PCI_PRODUCT_INTEL_WL_7265_1, "Intel Dual Band Wireless AC 7265" }, - { PCI_PRODUCT_INTEL_WL_7265_2, "Intel Dual Band Wireless AC 7265" }, - { PCI_PRODUCT_INTEL_WL_8260_1, "Intel Dual Band Wireless AC 8260" }, - { PCI_PRODUCT_INTEL_WL_8260_2, "Intel Dual Band Wireless AC 8260" }, + { PCI_PRODUCT_INTEL_WL_3160_1, "Intel Dual Band Wireless AC 3160", + &iwm3160_cfg }, + { PCI_PRODUCT_INTEL_WL_3160_2, "Intel Dual Band Wireless AC 3160", + &iwm3160_cfg }, + { PCI_PRODUCT_INTEL_WL_3165_1, "Intel Dual Band Wireless AC 3165", + &iwm3165_cfg }, + { PCI_PRODUCT_INTEL_WL_3165_2, "Intel Dual Band Wireless AC 3165", + &iwm3165_cfg }, + { PCI_PRODUCT_INTEL_WL_7260_1, "Intel Dual Band Wireless AC 7260", + &iwm7260_cfg }, + { PCI_PRODUCT_INTEL_WL_7260_2, "Intel Dual Band Wireless AC 7260", + &iwm7260_cfg }, + { PCI_PRODUCT_INTEL_WL_7265_1, "Intel Dual Band Wireless AC 7265", + &iwm7265_cfg }, + { PCI_PRODUCT_INTEL_WL_7265_2, "Intel Dual Band Wireless AC 7265", + &iwm7265_cfg }, + { PCI_PRODUCT_INTEL_WL_8260_1, "Intel Dual Band Wireless AC 8260", + &iwm8260_cfg }, + { PCI_PRODUCT_INTEL_WL_8260_2, "Intel Dual Band Wireless AC 8260", + &iwm8260_cfg }, }; static int @@ -5985,34 +5996,20 @@ static int iwm_dev_check(device_t dev) { struct iwm_softc *sc; + uint16_t devid; + int i; sc = device_get_softc(dev); - switch (pci_get_device(dev)) { - case PCI_PRODUCT_INTEL_WL_3160_1: - case PCI_PRODUCT_INTEL_WL_3160_2: - sc->cfg = &iwm3160_cfg; - return (0); - case PCI_PRODUCT_INTEL_WL_3165_1: - case PCI_PRODUCT_INTEL_WL_3165_2: - sc->cfg = &iwm3165_cfg; - return (0); - case PCI_PRODUCT_INTEL_WL_7260_1: - case PCI_PRODUCT_INTEL_WL_7260_2: - sc->cfg = &iwm7260_cfg; - return (0); - case PCI_PRODUCT_INTEL_WL_7265_1: - case PCI_PRODUCT_INTEL_WL_7265_2: - sc->cfg = &iwm7265_cfg; - return (0); - case PCI_PRODUCT_INTEL_WL_8260_1: - case PCI_PRODUCT_INTEL_WL_8260_2: - sc->cfg = &iwm8260_cfg; - return (0); - default: - device_printf(dev, "unknown adapter type\n"); - return ENXIO; + devid = pci_get_device(dev); + for (i = 0; i < nitems(iwm_devices); i++) { + if (iwm_devices[i].device == devid) { + sc->cfg = iwm_devices[i].cfg; + return (0); + } } + device_printf(dev, "unknown adapter type\n"); + return ENXIO; } /* PCI registers */ From owner-svn-src-all@freebsd.org Wed Feb 22 04:35: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 31952CE98B4; Wed, 22 Feb 2017 04:35:09 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00FE51CD0; Wed, 22 Feb 2017 04:35:08 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M4Z8qJ059728; Wed, 22 Feb 2017 04:35:08 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4Z8iT059727; Wed, 22 Feb 2017 04:35:08 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201702220435.v1M4Z8iT059727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Wed, 22 Feb 2017 04:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314075 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 04:35:09 -0000 Author: badger Date: Wed Feb 22 04:35:07 2017 New Revision: 314075 URL: https://svnweb.freebsd.org/changeset/base/314075 Log: Fix world build for archs where __builtin_debugtrap() does not work. The offending code was introduced in r313992. Reported by: rpokala Approved by: kib (mentor) Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Wed Feb 22 04:28:10 2017 (r314074) +++ head/tests/sys/kern/ptrace_test.c Wed Feb 22 04:35:07 2017 (r314075) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1690,7 +1691,7 @@ ATF_TC_BODY(ptrace__PT_KILL_breakpoint, ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - __builtin_debugtrap(); + breakpoint(); exit(1); } From owner-svn-src-all@freebsd.org Wed Feb 22 04:35: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 D5272CE990A; Wed, 22 Feb 2017 04:35:54 +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 9DAF91E0D; Wed, 22 Feb 2017 04:35:54 +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 v1M4Zraq059811; Wed, 22 Feb 2017 04:35:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4ZruZ059804; Wed, 22 Feb 2017 04:35:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220435.v1M4ZruZ059804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314076 - in head/sys: conf 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, 22 Feb 2017 04:35:54 -0000 Author: adrian Date: Wed Feb 22 04:35:53 2017 New Revision: 314076 URL: https://svnweb.freebsd.org/changeset/base/314076 Log: [iwm] Move struct iwm_cfg chipset configs to if_iwm_7000.c and _8000.c * This is more similar to how code/definitions are distributed in Linux's iwlwifi. * This should make recognizing new chipset variants, and adding additional flags from the Linux iwlwifi code easier, without blowing up if_iwm.c Obtained from: dragonflybsd.git 27d11320e707d2c41424efc1983762f6799941d6 Added: head/sys/dev/iwm/if_iwm_7000.c (contents, props changed) head/sys/dev/iwm/if_iwm_8000.c (contents, props changed) head/sys/dev/iwm/if_iwm_config.h (contents, props changed) Modified: head/sys/conf/files 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/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 22 04:35:07 2017 (r314075) +++ head/sys/conf/files Wed Feb 22 04:35:53 2017 (r314076) @@ -1861,6 +1861,8 @@ iwi_monitor.fw optional iwimonitorfw | no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwm/if_iwm.c optional iwm +dev/iwm/if_iwm_7000.c optional iwm +dev/iwm/if_iwm_8000.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 Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 22 04:35:07 2017 (r314075) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 04:35:53 2017 (r314076) @@ -152,6 +152,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -166,68 +167,6 @@ __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, \ - .apmg_wake_up_wa = 1 - -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, @@ -5951,29 +5890,18 @@ iwm_intr(void *arg) static const struct iwm_devices { uint16_t device; - const char *name; const struct iwm_cfg *cfg; } iwm_devices[] = { - { PCI_PRODUCT_INTEL_WL_3160_1, "Intel Dual Band Wireless AC 3160", - &iwm3160_cfg }, - { PCI_PRODUCT_INTEL_WL_3160_2, "Intel Dual Band Wireless AC 3160", - &iwm3160_cfg }, - { PCI_PRODUCT_INTEL_WL_3165_1, "Intel Dual Band Wireless AC 3165", - &iwm3165_cfg }, - { PCI_PRODUCT_INTEL_WL_3165_2, "Intel Dual Band Wireless AC 3165", - &iwm3165_cfg }, - { PCI_PRODUCT_INTEL_WL_7260_1, "Intel Dual Band Wireless AC 7260", - &iwm7260_cfg }, - { PCI_PRODUCT_INTEL_WL_7260_2, "Intel Dual Band Wireless AC 7260", - &iwm7260_cfg }, - { PCI_PRODUCT_INTEL_WL_7265_1, "Intel Dual Band Wireless AC 7265", - &iwm7265_cfg }, - { PCI_PRODUCT_INTEL_WL_7265_2, "Intel Dual Band Wireless AC 7265", - &iwm7265_cfg }, - { PCI_PRODUCT_INTEL_WL_8260_1, "Intel Dual Band Wireless AC 8260", - &iwm8260_cfg }, - { PCI_PRODUCT_INTEL_WL_8260_2, "Intel Dual Band Wireless AC 8260", - &iwm8260_cfg }, + { PCI_PRODUCT_INTEL_WL_3160_1, &iwm3160_cfg }, + { PCI_PRODUCT_INTEL_WL_3160_2, &iwm3160_cfg }, + { PCI_PRODUCT_INTEL_WL_3165_1, &iwm3165_cfg }, + { PCI_PRODUCT_INTEL_WL_3165_2, &iwm3165_cfg }, + { PCI_PRODUCT_INTEL_WL_7260_1, &iwm7260_cfg }, + { PCI_PRODUCT_INTEL_WL_7260_2, &iwm7260_cfg }, + { PCI_PRODUCT_INTEL_WL_7265_1, &iwm7265_cfg }, + { PCI_PRODUCT_INTEL_WL_7265_2, &iwm7265_cfg }, + { PCI_PRODUCT_INTEL_WL_8260_1, &iwm8260_cfg }, + { PCI_PRODUCT_INTEL_WL_8260_2, &iwm8260_cfg }, }; static int @@ -5984,7 +5912,7 @@ iwm_probe(device_t dev) for (i = 0; i < nitems(iwm_devices); i++) { if (pci_get_vendor(dev) == PCI_VENDOR_INTEL && pci_get_device(dev) == iwm_devices[i].device) { - device_set_desc(dev, iwm_devices[i].name); + device_set_desc(dev, iwm_devices[i].cfg->name); return (BUS_PROBE_DEFAULT); } } Added: head/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_7000.c Wed Feb 22 04:35:53 2017 (r314076) @@ -0,0 +1,128 @@ +/*- + * 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) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH + * 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) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH + * Copyright(c) 2015 Intel Deutschland GmbH + * 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 + +#include "if_iwm_config.h" + +#define IWM7260_FW "iwm7260fw" +#define IWM3160_FW "iwm3160fw" +#define IWM7265_FW "iwm7265fw" +#define IWM7265D_FW "iwm7265Dfw" + +#define IWM_NVM_HW_SECTION_NUM_FAMILY_7000 0 + +#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, \ + .apmg_wake_up_wa = 1 + +const struct iwm_cfg iwm7260_cfg = { + .name = "Intel(R) Dual Band Wireless AC 7260", + .fw_name = IWM7260_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 1, +}; + +const struct iwm_cfg iwm3160_cfg = { + .name = "Intel(R) Dual Band Wireless AC 3160", + .fw_name = IWM3160_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 1, +}; + +const struct iwm_cfg iwm3165_cfg = { + .name = "Intel(R) Dual Band Wireless AC 3165", + /* 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 = { + .name = "Intel(R) Dual Band Wireless AC 7265", + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + +const struct iwm_cfg iwm7265d_cfg = { + .name = "Intel(R) Dual Band Wireless AC 7265", + /* XXX IWM7265D_FW doesn't seem to work properly yet */ + .fw_name = IWM7265_FW, + IWM_DEVICE_7000_COMMON, + .host_interrupt_operation_mode = 0, +}; + Added: head/sys/dev/iwm/if_iwm_8000.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_8000.c Wed Feb 22 04:35:53 2017 (r314076) @@ -0,0 +1,92 @@ +/*- + * 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) 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 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) 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH + * 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 + +#include "if_iwm_config.h" + +#define IWM8000_FW "iwm8000Cfw" + +#define IWM_NVM_HW_SECTION_NUM_FAMILY_8000 10 + +#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 = { + .name = "Intel(R) Dual Band Wireless AC 8260", + .fw_name = IWM8000_FW, + IWM_DEVICE_8000_COMMON, + .host_interrupt_operation_mode = 0, +}; Added: head/sys/dev/iwm/if_iwm_config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_config.h Wed Feb 22 04:35:53 2017 (r314076) @@ -0,0 +1,135 @@ +/*- + * 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) 2016 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. + * Copyright (C) 2016 Intel Deutschland GmbH + * 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 __IWM_CONFIG_H__ +#define __IWM_CONFIG_H__ + +enum iwm_device_family { + IWM_DEVICE_FAMILY_UNDEFINED, + IWM_DEVICE_FAMILY_7000, + IWM_DEVICE_FAMILY_8000, +}; + +/* Antenna presence definitions */ +#define IWM_ANT_NONE 0x0 +#define IWM_ANT_A (1 << 0) +#define IWM_ANT_B (1 << 1) +#define IWM_ANT_C (1 << 2) +#define IWM_ANT_AB (IWM_ANT_A | IWM_ANT_B) +#define IWM_ANT_AC (IWM_ANT_A | IWM_ANT_C) +#define IWM_ANT_BC (IWM_ANT_B | IWM_ANT_C) +#define IWM_ANT_ABC (IWM_ANT_A | IWM_ANT_B | IWM_ANT_C) + +static inline uint8_t num_of_ant(uint8_t mask) +{ + return !!((mask) & IWM_ANT_A) + + !!((mask) & IWM_ANT_B) + + !!((mask) & IWM_ANT_C); +} + +/* 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 IWM_OTP_LOW_IMAGE_SIZE_FAMILY_9000 IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 + +/** + * struct iwm_cfg + * @name: Official name of the device + * @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 + * @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 *name; + 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; + int apmg_wake_up_wa; +}; + +/* + * This list declares the config structures for all devices. + */ +extern const struct iwm_cfg iwm7260_cfg; +extern const struct iwm_cfg iwm3160_cfg; +extern const struct iwm_cfg iwm3165_cfg; +extern const struct iwm_cfg iwm7265_cfg; +extern const struct iwm_cfg iwm7265d_cfg; +extern const struct iwm_cfg iwm8260_cfg; + +#endif /* __IWM_CONFIG_H__ */ Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 22 04:35:07 2017 (r314075) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Wed Feb 22 04:35:53 2017 (r314076) @@ -152,6 +152,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 04:35:07 2017 (r314075) +++ head/sys/dev/iwm/if_iwmvar.h Wed Feb 22 04:35:53 2017 (r314076) @@ -368,29 +368,7 @@ 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 - * @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; - uint16_t eeprom_size; - enum iwm_device_family device_family; - int host_interrupt_operation_mode; - uint8_t nvm_hw_section_num; - int apmg_wake_up_wa; -}; +struct iwm_cfg; struct iwm_softc { device_t sc_dev; From owner-svn-src-all@freebsd.org Wed Feb 22 04: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 F08A2CE9984; Wed, 22 Feb 2017 04:37:59 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82CE1FA0; Wed, 22 Feb 2017 04:37:59 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 5DFDD6C29B; Tue, 21 Feb 2017 23:37:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=tdxzJe5je2rM jwT7JOy6GCmMcvs=; b=rj4re+b1Vix6n3irCl0wHjV2ja8iST+rTT8ydEvsmqjM O3TBR1YFze/PXZbHThZwX1EvXJIQlQIJZG8R7Bw8SZVfox4ps6EaFKJADRAbSwSB VuNIBeUnq+11cAlLUyyh+NeOqo3B1ovcpampf/IBweqHIKod12v+czAS7Yja+nA= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 5659C6C29A; Tue, 21 Feb 2017 23:37:58 -0500 (EST) Received: from [192.168.1.103] (unknown [24.7.205.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 9A7976C299; Tue, 21 Feb 2017 23:37:57 -0500 (EST) Subject: Re: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern To: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702201553.v1KFrGqx057871@repo.freebsd.org> <69055A2F-849B-496B-94BE-0724E0957B81@panasas.com> From: Eric Badger Message-ID: <4825881c-0199-1224-b46b-ab2a78f02392@FreeBSD.org> Date: Tue, 21 Feb 2017 22:37:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <69055A2F-849B-496B-94BE-0724E0957B81@panasas.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: AF31C6F0-F8B8-11E6-A71B-FE3F13518317-46178211!pb-smtp1.pobox.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 04:38:00 -0000 On 02/21/2017 05:45 PM, Ravi Pokala wrote: > Hi Eric, > > This appears to break buildworld for a bunch of platforms -- possibly all the ones that use gcc rather than clang? > > A representative example from sparc64: > > /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c: In function 'atfu_ptrace__PT_KILL_breakpoint_body': > /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c:1693: warning: implicit declaration of function '__builtin_debugtrap' > *** [ptrace_test.o] Error code 1 > > Thanks, > > Ravi (rpokala@) Hi Ravi, Thanks for letting me know, and sorry for the breakage. It should be fixed as of r314075. Eric From owner-svn-src-all@freebsd.org Wed Feb 22 04:42: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 B2A52CE9B84; Wed, 22 Feb 2017 04:42: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 56FA9753; Wed, 22 Feb 2017 04:42: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 v1M4g2LR063741; Wed, 22 Feb 2017 04:42:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4g2J2063740; Wed, 22 Feb 2017 04:42:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220442.v1M4g2J2063740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314077 - 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, 22 Feb 2017 04:42:03 -0000 Author: adrian Date: Wed Feb 22 04:42:02 2017 New Revision: 314077 URL: https://svnweb.freebsd.org/changeset/base/314077 Log: Add 7265D firmware. Added: head/sys/contrib/dev/iwm/iwm-7265D-17.fw.uu Added: head/sys/contrib/dev/iwm/iwm-7265D-17.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwm/iwm-7265D-17.fw.uu Wed Feb 22 04:42:02 2017 (r314077) @@ -0,0 +1,30750 @@ +begin 644 iwm-7265D-17.fw +M`````$E73`IS=')E86TZ3&EN=7A?0V]R94-Y8VQE,31?````"`````(`````````'````!`````````` +M````````````````&P````0````!````$P````2``0```(```````!$```#B +M804```$```````"`O8``5#2``"ST@`#DY(``"!Z```#G@``````````````` +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```&$L-H"!``#`%@(!$V1"`1,D!"C` +M$>C"@($``,`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)/``#H!@L`>`!@!P\`%``<#1$`&`!,"A(` +MI`$``!,`#`!`#10``P!,#14`!`!0#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'_````````````````V#````H````$````=+^````````` +M`````````#@Q```%````!````'2_@``````````````````````````````` +M```!````Y,D``'C+``!(RP``<,L``)3)``",R0``U'4$`$AV!`"4=@0````` +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```````````````````````````````'"V@``!``-LMH`` +M`0`#"!Z```$``52Y@``!``-8N8```0`#<`8!``(`!````````%52``!'10`` +M3$D``$Y#``!$20``4U4``%I:``!:6@``6EH``%I:``!:6@``6EH``%I:``!: +M6@``6EH``%I:``````````@$#`(*!@X!"04-`PL'#P&1```!/P```I$``#X] +M```#D0``/3T```21```_`P``!9$```D0```&D0``%AP```>1```?'P``")$` +M`!P6```)D0``$`D```J1```#/P``"Y$``#T]```,D0``/3X```V1```_`0`` +M$1`^2$@`X!`$````#2`$````81`B````($,Y`````."$`0``X1`!`````A"7 +MRP4`,&`+````#]($````&-+\__\?`7,0````">")AH2$"N"$A```"^"F5=<@ +M#.`BBRPR#>"JB8>^PQ%^"2C(N*&."*B@``&>!^2><@&N`BBRPR&^"3 +M3;>^PQ)&`"`````G,`````$2`4A0$`&1`&````$=(#````,>#_MW8` +M,N#D)3\`,^`B4@X`-.`N````->``````-N`V-C8V-^`V-@``"1!N7P``&A`` +M````,1"&`0``,A"0`0``,Q#(````-!!0````-1"`````.A!I````.Q#````` +MP1``````)(``/```*N#YY>`>>^PQ*."+BXF)*>") +MB0``#&"#)0``.!!2````.1"6````08`!`````D;@<[G2X'.1P.![?;S08V +MFZT&-1KM!KO?\`C,Y7()2F4R"4@D\@C'X_$(1J.Q"$4BD0A$(G$(P^%0"$)A +M,`C!8#`(P6`0"$#@[P>_W^\'O]_O!S^?SP<^G\\'/I_/!SZ?KP>]7J\'O9[/ +M!SZ?KP>]7J\'O9[/!SZ?SP<^G\\'/I_/![_?[P>_W^\'O]\/"$!@,`C!8#`( +MP6!0"$+A<`C#(9$(1"*1",6BT0C&X_$(QR,2"YG$X'N]V.!SQ>KP>^WP\(0&`P"$*B,0WI=#H-S6:S"_G\\'O]_O![\?$`A`8#`(P6`P",%@$`A`(/`'/Y_/ +M![T>CP>\W6X'NYU.!SJ=;@>[W6X'/!ZO!SV?SP>_'Q`(0&`P",%@,`C!8!`( +M0"#P![_?[P<_G^\'O]\/",!@4`A#HO$(R66S"XFZT&M)E,!K%8#`8T'`\(1"*Q",5BT0A&H_$(Q^/Q +M",?CT0A&8[$(12)Q",.A4`C!8#`(0"`0"$`@$`C`8#`(0:%P",,AD0C%8M$( +M1N/Q",?C\0C'H]$(1F.Q",4BD0A`'HX&,%@L!C&9;`:TFNT&.-UN![O=;@>U +M6JT&-=IL!C)9+`8Q&HX'P*+1",;C$0G(9%()2N5R"'1L:&AHB(B`?'AT;&AH:(B(B +M(B`?'AT;&AH:(B(@'QX=&QH:&B(B(B(@'QX=&QH:&B(B(!\>'1L:&AHB(B(B +M(1\>'1L:%Q +M'AX<&A@5$AX>'AX>'!H8%1(B(B(B(1\>'1P:&!@B(B$?'AT<&A@8(B(B(B$? +M'AT<&A@4(B(A'QX='!H8%B(B("`@'QX<&Q@6$AX>'AX>'!L8%A0B(B(B(1\> +M'1P9%Q'AX>'!L7%1(B(B(B(B`?'1L:&AHB(B(@'QT;&AH:(B(B(B(@'QT; +M&AH:(B(B(!\=&QH:&B(B(B(B(!\=&QH:&B(B(B`?'1L:&AHB(B(B(B$@'AP9 +M%Q'!D6$B`@("`@'AP9%A0B(B$A(2$>'1P9%Q"2@`'PDH`"`)*``A"2@ +M`%`0H`!()J``8!"@`$PFH`!D$*``:!"@`%@0H``P$*``/!"@`#00H``L#*`` +M`(&D``&!I``#@:0`B"2@`(PDH`"0)*``E"2@`)@DH`"<)*``H"2@`*0DH``` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````O@`9R``&R0`& +MR@`!S``%S0`%RP`$S@`#SP`*T``*T0`"T@`"TP`*U``*U0`"U@`"UP`*V``* +MVP"(W`"(W0"JW@#=WP``XP`(Y``(Y0`*Y@`*Z```ZP`([``([0`*[@`,,0`D +M,@`F=P$P.`(P!`!,.```Y0%SY@$*I@)SIP(*^P#_CP$@5@(@@P$`1`(`C@$/ +M50(/D`$`3@(`D0%]D@%]DP%]3P)]4`)]40)]6@!56P!5_0`!Z@$$_@`3_P`& +M;@`*>0`-=0`!?P`/AP`.F0#%F0#-?`$-@`$-/0(-00(-?0'_/@+_?P'_0`+_ +M)P`<*``8*0`<*@`@('>P(0S@$#CP(#D0(`O0$)?@()QP$,B`(, +MO@$)?P()R`$&B0(&I`$0J@$2I0$0JP$290(0:P(29@(0;`(2WP$!UP$`H`(! +MF`(`>@$!.P(!```T`0`V`0`^`5<_`69``7=!`9A"`0=?`:I@`:IQ`7D?`@`I +M`O\J`O\R`GFA`%NB`!NC`#"D`!*E`""F``>G`!NH`!*I``>J``"L``FM``:N +M``RO``FP``:Q``RR``>S``2T``JU``:X`%Z^`!G(``;)``;*``',``7-``7+ +M``3.``//``K0``K1``+2``+3``K4``K5``+6``+7``K8``K;`(C<`(C=`*K> +M`-W?``#C``CD``CE``KF``KH``#K``CL``CM``KN``PQ`"0R`"9W`3`X`C`$ +M`$PX``#E`7/F`0JF`G.G`@K[`/^/`2!6`B"#`0!$`@".`0]5`@^0`0!.`@"1 +M`7V2`7V3`7U/`GU0`GU1`GU:`%5;`%7]``'J`03^`!/_``9N``IY``UU``%_ +M``^'``Z9`,69`,U\`0V``0T]`@U!`@U]`?\^`O]_`?]``O\G`!PH`!@I`!PJ +M`!RY`0>Z`1!Z`@=[`A#.`0./`@.1`@"]`0E^`@G'`0R(`@R^`0E_`@G(`0:) +M`@:D`1"J`1*E`1"K`1)E`A!K`A)F`A!L`A+?`0'7`0"@`@&8`@!Z`0$[`@%B +M`<]D`<]F`<\L`L\N`L\P`L\0``0`"P````,![`$%`!``!``1`!(``P`*``L` +M-`$=`C4!'@(V`1\")0````H`"P`$``\``P'L`1``.`#D`:4"2``2`",````- +M$2(##!R``.@;@``\'(``X!N```,![`$"`>L!!0`$`!``"@`+``8`"`!\`8`! +M/0)!`G,!=P$T`C@"EP%8`ID!6@*6`9@!5P)9`MP!G0(E`)H!6P*<`5T"```` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````8````````````````````!```` +M`@`````````N$2\7,!`Q*#(1,_(V(C@1.1#AY.(@````'/6```$`````````.O6```````#_ +M````_____P`````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````$P>`0`P'@$`,!X!```````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````M'X```4```($````=+^````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````(`````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````K"L```````#PP````0```&0G`0`"````;#8$``,```!4-@0`!````"QD +M!``%````]/0$``8```"X>@0`!P```#`H`@`(````+"@"``D````0=`0`"@`` +M`$P1!``+````=&T!``P```"`@@0`#0`````/`@`.````'&`!``\```#@"6`+X`4````"!.```````````````````$`````@`````````!`````0`` +M`!X```````````````$!#@X````````R"`(/`P`!``````````$!#@X````` +M```C!`(*`````````````/0!````````````````````````*'>````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````/____\````````````` +M`````````````````````````````````````````````!``````D`$```"@ +M`!`G``#H`P``Z`,``'PN@`!\+H``M,R``+#,@`"PS(``J,R``+3,@`"PS(`` +ML,R``*C,@`"HS(``M,R``+3,@`"HS(``M,R``*S,@```````__\```$!```` +M`````````0````#H)00`Z"4$`.@E!`#<)00`Z"4$`.@E!`#@)00`Z"4$`*C+ +M``"``+3%@`!``/3*@`#\R(``I,F``$S*@``````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````````````````$````` +M``````````````"0!@```/\#`(@'````_P4`"`<```#_+0#D!@```/\]`#@& +M````_P0`7`8```#_)0"P!@```/\\`"0A`0``_]T`,`<```#_3`"$!P```/\B +M`"P'````_R8`@`<```#_*``T(`$``"```&P?`0``_S``>`8```#_!P!8!P`` +M`/\@``P0$``$`1`.$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0#Q`)$!`%"A`+ +M$!`0$`(0$`T0$!`0$!`0$!`0$`8#$!`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$!`0$!`0 +M!Q`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!``````O,R````` +M```````````````````````````````````````````````````````````` +M`/\```#4+8``N!.!`!H``````````0``````````````V"V``/`3@0`8```` +M``````$``````````````/____________________________________\` +M```````````````````````````````````````````````````````````` +M``````````````````"`"AT*X`FE"6T)-PD$"=,(I`AW"$L((@CZ!],' +MK@>*!P`````````````````````````````````````````````````````` +M`````````````````````````````````````````!PT```"````!````'2_ +M@`````````````````!X-```!0````0```!TOX``````````````!0``<@$` +M`*@"```#"0,)!0D,$0``````````````````````````;+P$``H````$```` +M=+^```````````````#_```!`/\``/X!`0#_`@$!`/\!``'_`0$"`P$!`P0! +M`00%`0(&_P$#!_\!`0C_`0#^!@(`_P<"`0#_`@`!_P("`@@"`@,)`@($"@(! +M!?\"`P?_`@$(_P(`_@L#`/\,`P$`_P,``?\#`P(-`P,##@,#!`\#`07_`P(& +M_P,!"/\#`/X0`````````````````````.2]!``*````!````'2_@`!TO`0` +MH+P$`+R\!`#,O`0`T+P$`.R\!`#(O`0`,+T$`#B]!``\O00`9+T$`#2]!`"L +MO00`M+T$`+B]!`#@````````!Z````?P```'H` +M``!_````>@```'\```!Z````?P```'H```!_````>@```'\```!Z````?P`` +M`'H```!_````>@```'\```!Z`````````'H````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````9F8.``````!F9@H`9F8&`&9F!@!F9@(`9F8"`&9F +M/@!F9CX`9F8Z`&9F.@``````9F8V``````!F9C(``````&9F#@`````````` +M`&9F!@`````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````0`!`0$!`0$!`0$``0`!````````_P`` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````!,"*``2`B@`&P'@``````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`/LUC``SL0``````````,P`````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````'AX> +M'AX>'AX>'AX>'@`9'!X>'AX>'AX>'AX>`!X>'AX>'AX>'@`>'AX>'AX>'AX` +M`08"!`("```$!`8$"`,`````&1X>'AX>'A@9'AX>'AX>&!@>'AX>'AX>'@`5 +M'AX8%1X>&!@>'AX#"``````&````````````_P4````````8&!@8&!T!!@8& +M!@`&```>`!X`'@`8``8&!@$!`0']!@8````````&`0$``!X````````````` +M``$`````````````````%1@8&!@8&!@8&!48&````````````````````/[^ +M_O[^`!06&!@4$A`8&````````````````````````````````````!48&!@8 +M&!@4%1@8&!@8&!02&!@8&!@8&!@```````$````!````$1@8%!$8&!04&!@8 +M``````#[%!04%!08&!@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&!@8 +M&!@8&!@8&!@8&!@8&!@!`0$!`0$````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````5E0``'L````````` +M6E0``#L`````````6E0``'L`````````"B```#L`````````6E0``$,````` +M````"@````$````P,`````````````````````````$````_```````````` +M````````!P````````("`````````````````0`"`@`!```"`@$``0(``@(` +M`````0`!``("`0`````````!`````````@(```$```$```$``````@`"`@`` +M```"```````"`````0`````````````"```!``(`!````````````````@`" +M``````````````````(``@`!``````(````````````"``$"``("`@`````` +M``(``@```0````````````````````$```$````"``$"```````````#`@`` +M`````````@`````"`@````````````````````````$``@(````````````` +M``````(``@$````````````"``````(``@(``@````````(````````````` +M`@("``````(``@("`@`!```"``````$"``("`@`"`0(````"`````@`!```" +M```"`0````````````(````````````````"``````````````````$````! +M`@$"```"`@```````0`"```!``$``@`````````````````````````````` +M`````````@````````````(````"``0``@````(````"`````@`"``("```` +M`````````@`````"``````(```````4````"``$```$```$"```````````` +M```````````!```````!``(````!``(``0`````"```````````````````` +M`````````````````````0`````````````````````````````````````` +M```````````````````````````````"`````````@`````````````````` +M``````````(``````"DI_____P`````````````````````````````````` +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```````````````````!`@,$!08'"`D*"PP-#@\0*BHK+"TN+TI+3$U.3U!K +M;&UN<'&+C(V.CY&LK:ZOL+',S,S-SL_0T=+3T]/3T]/3T]/3T]/3T]/3TP!! +M```````````!`@,$!08'"`D*"PP-#@\0*BHK+"TN+TI+3$U.3U!J:VUN;W"* +MBXR-CH^JJZRMKJ_*R\S-SL_0T-#0T-#0T-#0T-#0T-#0T-#0T``^`0(#!`0% +M!@<("0H+#`T.*BLL+2XO2DM,34Y/4&IJ:VQM;F^*BXR-CH^0JJNLK:ZOL+#* +MRLO,S<[/T-'2T]35UM?8V=K:VMK:VMK:VMK:VMK:V@!#`@(#!`4&!@<("0H+ +M#`T.*BLL+2XO2DM,34Y/4%!J:VQM;F^*BXR-CH^0JJNLK:ZOL+#*RLO,S<[/ +MT-'2T]35UM?7U]?7U]?7U]?7U]?7U]?7UP!``@,#!`4&!P@)"@L,#0XJ*RPM +M+B]*2TQ-3D]/4&IK;&UN;XJ+C(V.CY"JJZRMKJ^PL,K*R\S-SL_0T=+3U-34 +MU-34U-34U-34U-34U-34U-34U``\```````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +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\`````````````````````_W__?_]__W__?_]__W__?_]__W\` +M````````````````````JJH``/\```#_````_P```/\```#_````_P```/\` +M``#_````_P```/\```#_````_P```/\```#_````_P```/\```#_````_P`` +M`/\```#_````_P```/\```#_````_P```/\```#_````_P```/\```#_```` +M_P```````0````$````!`````0````$````!`````0````$````!`````0`` +M``$````!`````0````$````!`````0````$````!`````0````$````!```` +M`0````$````!`````0````$````!`````0````$````!```````````````` +M```````````````````````````````````````````````````````````` +M````````````````?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]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_```` +M````````````O@```+X````!``````````$```!?````7P````(````````` +M`@```"\````O`````P`````````#````&````!@````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````*```````` +M````````````_P#_``````````````````````#_`/\``````#0````````` +M``````````#_`/\``````````````````````/\`_P``````<``````````` +M`````````/\`_P``````````````````````_P#_``````"9```````````` +M````````_P#_``````````````````````#_`/\````````````````````` +M``$````!``````````$````!``````````$````!```````````````````` +M`0````$``````````0````$``````````0````$````````````````````` +M`````````(P*```````````````````````````````````,`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````````#@$H$````````` +M````````````````````````!%4```H````$````=+^````````````````` +M`````````````````````````````0P>M@XR`A$>N0XR`Q8>NPXR!!L>O@XR +M!2`>P`XR!B4>PPXR!RH>Q0XR""\>R`XR"30>R@XR"CD>S0XR"SX>SPXR#$,> +MT@XR#4@>U`XR#DT>UPXR(E!`&2``)&!`'B`V)G!`(R`R*`!!*"`V*A!!+2`U +M+"!!,B`V+C!!-R`Q,$!!/"`V,E!!02``-&!!1B`V-G!!2R`Q.`!"4"`V.A!" +M52`U/"!"6B`U/C!"7R`Q0$!"9"`U9&!$OB(T9G!$PR(P:`!%R"(T:A!%S2(T +M;"!%TB(T;C!%UR(P<$!%W"(T`!&\"(T>A!& +M]2(T?"!&^B(T?C!&_R(P@$!&!"(T@E!&"2(`A&!&#B(TAG!&$R(PB`!'&"(S +MBA!''2(SC"!'(B(TCC!')R(OD$!'+"(SD4A'+R(`E6A'.2(SEWA'/B(OF0A( +M0R0SFQA(2"0RG2A(320SGSA(4B0OH4A(5R0RI6A(820R```````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````````````````#P`/ +M``\`#P`/``\`#P`/```````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````$``0``````P`"0`-`````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````!@E`0`"@````0```!TOX`````````````````````````` +M``````````````````````````````````````````````````#_____N!2! +M````````````````````````````E%4```H````$````=+^``$!"#P!`0@\` +M0$(/`$!"#P!`0@\`0$(/`$!"#P!`0@\`0$(/`$!"#P#@!P``0`$``.`'``!` +M`0``("<``.`'``#@!P``0`$``.`'``!``0```@`````````"```````````` +M`````````````````````````````````````````````'RJ@``8-($`&``` +M``````````````````````#_____```````````````````````````````` +M````````````````````````````````````````````````-@$``*H````$ +M`0``@@````````!HSP$`C,\!`)S/`0!TSP$`9,\!`*#/`0!,SP$```````#@ +M````@`````````````````````````````"`]```@$L```!````````````` +M``````````````````#D````7````$`````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````````````````````Q)X$`("@!`"!`"PF@0`[)T$`$";!`"TH`0`#)T$`(RA!``````````````````` +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 22 04: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 E0259CE9C0A; Wed, 22 Feb 2017 04:44: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 AF8E3944; Wed, 22 Feb 2017 04:44: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 v1M4i8L6063874; Wed, 22 Feb 2017 04:44:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4i8q7063873; Wed, 22 Feb 2017 04:44:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220444.v1M4i8q7063873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314078 - 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, 22 Feb 2017 04:44:10 -0000 Author: adrian Date: Wed Feb 22 04:44:08 2017 New Revision: 314078 URL: https://svnweb.freebsd.org/changeset/base/314078 Log: add 7265D firmware. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 22 04:42:02 2017 (r314077) +++ head/sys/conf/files Wed Feb 22 04:44:08 2017 (r314078) @@ -1916,6 +1916,20 @@ iwm7265.fw optional iwm7265fw | iwmfw compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" +iwm7265Dfw.c optional iwm7265Dfw | iwmfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265D.fw:iwm7265Dfw -miwm7265Dfw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwm7265Dfw.c" +iwm7265Dfw.fwo optional iwm7265Dfw | iwmfw \ + dependency "iwm7265D.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "iwm7265Dfw.fwo" +iwm7265D.fw optional iwm7265Dfw | iwmfw \ + dependency "$S/contrib/dev/iwm/iwm-7265D-17.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwm7265D.fw" iwm8000Cfw.c optional iwm8000Cfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8000C.fw:iwm8000Cfw -miwm8000Cfw -c${.TARGET}" \ no-implicit-rule before-depend local \ From owner-svn-src-all@freebsd.org Wed Feb 22 04:50: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 BBA66CE9D17; Wed, 22 Feb 2017 04:50: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 85346C12; Wed, 22 Feb 2017 04:50: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 v1M4oqn4064242; Wed, 22 Feb 2017 04:50:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4oqg6064240; Wed, 22 Feb 2017 04:50:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220450.v1M4oqg6064240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314079 - in head/sys/modules/iwmfw: . iwm7265Dfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 04:50:53 -0000 Author: adrian Date: Wed Feb 22 04:50:52 2017 New Revision: 314079 URL: https://svnweb.freebsd.org/changeset/base/314079 Log: [iwmfw] add 7265D firmware. Added: head/sys/modules/iwmfw/iwm7265Dfw/ head/sys/modules/iwmfw/iwm7265Dfw/Makefile (contents, props changed) Modified: head/sys/modules/iwmfw/Makefile Modified: head/sys/modules/iwmfw/Makefile ============================================================================== --- head/sys/modules/iwmfw/Makefile Wed Feb 22 04:44:08 2017 (r314078) +++ head/sys/modules/iwmfw/Makefile Wed Feb 22 04:50:52 2017 (r314079) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= iwm3160fw iwm7260fw iwm7265fw iwm8000Cfw +SUBDIR= iwm3160fw iwm7260fw iwm7265fw iwm8000Cfw iwm7265Dfw .include Added: head/sys/modules/iwmfw/iwm7265Dfw/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/iwmfw/iwm7265Dfw/Makefile Wed Feb 22 04:50:52 2017 (r314079) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +KMOD= iwm7265Dfw +IMG= iwm-7265D-17 + +.include From owner-svn-src-all@freebsd.org Wed Feb 22 04:51: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 C199BCE9D76; Wed, 22 Feb 2017 04:51:38 +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 91534DDA; Wed, 22 Feb 2017 04:51:38 +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 v1M4pbr0064313; Wed, 22 Feb 2017 04:51:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4pb8u064312; Wed, 22 Feb 2017 04:51:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220451.v1M4pb8u064312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314080 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 04:51:38 -0000 Author: adrian Date: Wed Feb 22 04:51:37 2017 New Revision: 314080 URL: https://svnweb.freebsd.org/changeset/base/314080 Log: add 7265D firmware mention in the iwmfw manpage. Modified: head/share/man/man4/iwmfw.4 Modified: head/share/man/man4/iwmfw.4 ============================================================================== --- head/share/man/man4/iwmfw.4 Wed Feb 22 04:50:52 2017 (r314079) +++ head/share/man/man4/iwmfw.4 Wed Feb 22 04:51:37 2017 (r314080) @@ -55,6 +55,7 @@ module at boot time, place the following iwm3160fw_load="YES" iwm7260fw_load="YES" iwm7265fw_load="YES" +iwm7265Dfw_load="YES" iwm8000Cfw_load="YES" .Ed .Sh DESCRIPTION From owner-svn-src-all@freebsd.org Wed Feb 22 04:53: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 AA6B6CE9F00; Wed, 22 Feb 2017 04:53:34 +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 777AC10C2; Wed, 22 Feb 2017 04:53:34 +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 v1M4rXW3068291; Wed, 22 Feb 2017 04:53:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M4rXbH068290; Wed, 22 Feb 2017 04:53:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220453.v1M4rXbH068290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 04:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314081 - 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, 22 Feb 2017 04:53:34 -0000 Author: adrian Date: Wed Feb 22 04:53:33 2017 New Revision: 314081 URL: https://svnweb.freebsd.org/changeset/base/314081 Log: [iwm] Switch 7265D and 3165 devices to 7265D firmware. Obtained from: dragonflybsd.git 0cb0a810cb4e04b30937cb4260e779f717a86492 Modified: head/sys/dev/iwm/if_iwm_7000.c Modified: head/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- head/sys/dev/iwm/if_iwm_7000.c Wed Feb 22 04:51:37 2017 (r314080) +++ head/sys/dev/iwm/if_iwm_7000.c Wed Feb 22 04:53:33 2017 (r314081) @@ -105,8 +105,7 @@ const struct iwm_cfg iwm3160_cfg = { const struct iwm_cfg iwm3165_cfg = { .name = "Intel(R) Dual Band Wireless AC 3165", - /* XXX IWM7265D_FW doesn't seem to work properly yet */ - .fw_name = IWM7265_FW, + .fw_name = IWM7265D_FW, IWM_DEVICE_7000_COMMON, .host_interrupt_operation_mode = 0, }; @@ -120,8 +119,7 @@ const struct iwm_cfg iwm7265_cfg = { const struct iwm_cfg iwm7265d_cfg = { .name = "Intel(R) Dual Band Wireless AC 7265", - /* XXX IWM7265D_FW doesn't seem to work properly yet */ - .fw_name = IWM7265_FW, + .fw_name = IWM7265D_FW, IWM_DEVICE_7000_COMMON, .host_interrupt_operation_mode = 0, }; From owner-svn-src-all@freebsd.org Wed Feb 22 05:11: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 1247DCE92B7; Wed, 22 Feb 2017 05:11:26 +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 BD7581730; Wed, 22 Feb 2017 05:11: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 v1M5BOtR072579; Wed, 22 Feb 2017 05:11:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M5BOLb072576; Wed, 22 Feb 2017 05:11:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702220511.v1M5BOLb072576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 22 Feb 2017 05:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314082 - 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, 22 Feb 2017 05:11:26 -0000 Author: adrian Date: Wed Feb 22 05:11:24 2017 New Revision: 314082 URL: https://svnweb.freebsd.org/changeset/base/314082 Log: [iwm] Move iwm_dma_contig_alloc/_free functions to if_iwm_util.c. Obtained from: dragonflybsd.git 83a1185edeede081051a6c00417d4c5a8f5988eb Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Feb 22 04:53:33 2017 (r314081) +++ head/sys/dev/iwm/if_iwm.c Wed Feb 22 05:11:24 2017 (r314082) @@ -239,10 +239,6 @@ static int iwm_firmware_store_section(st static int iwm_set_default_calib(struct iwm_softc *, const void *); static void iwm_fw_info_free(struct iwm_fw_info *); static int iwm_read_firmware(struct iwm_softc *, enum iwm_ucode_type); -static void iwm_dma_map_addr(void *, bus_dma_segment_t *, int, int); -static int iwm_dma_contig_alloc(bus_dma_tag_t, struct iwm_dma_info *, - bus_size_t, bus_size_t); -static void iwm_dma_contig_free(struct iwm_dma_info *); static int iwm_alloc_fwmem(struct iwm_softc *); static int iwm_alloc_sched(struct iwm_softc *); static int iwm_alloc_kw(struct iwm_softc *); @@ -893,71 +889,6 @@ iwm_read_firmware(struct iwm_softc *sc, * DMA resource routines */ -static void -iwm_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) -{ - if (error != 0) - return; - KASSERT(nsegs == 1, ("too many DMA segments, %d should be 1", nsegs)); - *(bus_addr_t *)arg = segs[0].ds_addr; -} - -static int -iwm_dma_contig_alloc(bus_dma_tag_t tag, struct iwm_dma_info *dma, - bus_size_t size, bus_size_t alignment) -{ - int error; - - dma->tag = NULL; - dma->map = NULL; - dma->size = size; - dma->vaddr = NULL; - - error = bus_dma_tag_create(tag, alignment, - 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, - 1, size, 0, NULL, NULL, &dma->tag); - if (error != 0) - goto fail; - - error = bus_dmamem_alloc(dma->tag, (void **)&dma->vaddr, - BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &dma->map); - if (error != 0) - goto fail; - - error = bus_dmamap_load(dma->tag, dma->map, dma->vaddr, size, - iwm_dma_map_addr, &dma->paddr, BUS_DMA_NOWAIT); - if (error != 0) { - bus_dmamem_free(dma->tag, dma->vaddr, dma->map); - dma->vaddr = NULL; - goto fail; - } - - bus_dmamap_sync(dma->tag, dma->map, BUS_DMASYNC_PREWRITE); - - return 0; - -fail: - iwm_dma_contig_free(dma); - - return error; -} - -static void -iwm_dma_contig_free(struct iwm_dma_info *dma) -{ - if (dma->vaddr != NULL) { - bus_dmamap_sync(dma->tag, dma->map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(dma->tag, dma->map); - bus_dmamem_free(dma->tag, dma->vaddr, dma->map); - dma->vaddr = NULL; - } - if (dma->tag != NULL) { - bus_dma_tag_destroy(dma->tag); - dma->tag = NULL; - } -} - /* fwmem is used to load firmware onto the card */ static int iwm_alloc_fwmem(struct iwm_softc *sc) Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Wed Feb 22 04:53:33 2017 (r314081) +++ head/sys/dev/iwm/if_iwm_util.c Wed Feb 22 05:11:24 2017 (r314082) @@ -421,3 +421,68 @@ iwm_free_resp(struct iwm_softc *sc, stru sc->sc_wantresp = -1; wakeup(&sc->sc_wantresp); } + +static void +iwm_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + if (error != 0) + return; + KASSERT(nsegs == 1, ("too many DMA segments, %d should be 1", nsegs)); + *(bus_addr_t *)arg = segs[0].ds_addr; +} + +int +iwm_dma_contig_alloc(bus_dma_tag_t tag, struct iwm_dma_info *dma, + bus_size_t size, bus_size_t alignment) +{ + int error; + + dma->tag = NULL; + dma->map = NULL; + dma->size = size; + dma->vaddr = NULL; + + error = bus_dma_tag_create(tag, alignment, + 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, + 1, size, 0, NULL, NULL, &dma->tag); + if (error != 0) + goto fail; + + error = bus_dmamem_alloc(dma->tag, (void **)&dma->vaddr, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &dma->map); + if (error != 0) + goto fail; + + error = bus_dmamap_load(dma->tag, dma->map, dma->vaddr, size, + iwm_dma_map_addr, &dma->paddr, BUS_DMA_NOWAIT); + if (error != 0) { + bus_dmamem_free(dma->tag, dma->vaddr, dma->map); + dma->vaddr = NULL; + goto fail; + } + + bus_dmamap_sync(dma->tag, dma->map, BUS_DMASYNC_PREWRITE); + + return 0; + +fail: + iwm_dma_contig_free(dma); + + return error; +} + +void +iwm_dma_contig_free(struct iwm_dma_info *dma) +{ + if (dma->vaddr != NULL) { + bus_dmamap_sync(dma->tag, dma->map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(dma->tag, dma->map); + bus_dmamem_free(dma->tag, dma->vaddr, dma->map); + dma->vaddr = NULL; + } + if (dma->tag != NULL) { + bus_dma_tag_destroy(dma->tag); + dma->tag = NULL; + } +} Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Wed Feb 22 04:53:33 2017 (r314081) +++ head/sys/dev/iwm/if_iwm_util.h Wed Feb 22 05:11:24 2017 (r314082) @@ -116,6 +116,10 @@ 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 int iwm_dma_contig_alloc(bus_dma_tag_t tag, struct iwm_dma_info *dma, + bus_size_t size, bus_size_t alignment); +extern void iwm_dma_contig_free(struct iwm_dma_info *); + static inline uint8_t iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc) { From owner-svn-src-all@freebsd.org Wed Feb 22 06: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 85834CE8480; Wed, 22 Feb 2017 06:06:59 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 547CB1BAE; Wed, 22 Feb 2017 06:06:59 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M66w75096376; Wed, 22 Feb 2017 06:06:58 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M66wZG096374; Wed, 22 Feb 2017 06:06:58 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220606.v1M66wZG096374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 06:06:58 +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: r314083 - stable/11/sys/dev/hyperv/netvsc 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, 22 Feb 2017 06:06:59 -0000 Author: dexuan Date: Wed Feb 22 06:06:58 2017 New Revision: 314083 URL: https://svnweb.freebsd.org/changeset/base/314083 Log: MFC: 312685 Approved by: sephe(mentor) r312685 hyperv/hn: remember the channel pointer in struct hn_rx_ring This will be used by the coming NIC SR-IOV patch. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8909 Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c stable/11/sys/dev/hyperv/netvsc/if_hnvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 05:11:24 2017 (r314082) +++ stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 06:06:58 2017 (r314083) @@ -4323,6 +4323,7 @@ hn_chan_attach(struct hn_softc *sc, stru KASSERT((rxr->hn_rx_flags & HN_RX_FLAG_ATTACHED) == 0, ("RX ring %d already attached", idx)); rxr->hn_rx_flags |= HN_RX_FLAG_ATTACHED; + rxr->hn_chan = chan; if (bootverbose) { if_printf(sc->hn_ifp, "link RX ring %d to chan%u\n", Modified: stable/11/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hnvar.h Wed Feb 22 05:11:24 2017 (r314082) +++ stable/11/sys/dev/hyperv/netvsc/if_hnvar.h Wed Feb 22 06:06:58 2017 (r314083) @@ -85,6 +85,8 @@ struct hn_rx_ring { void *hn_br; /* TX/RX bufring */ struct hyperv_dma hn_br_dma; + + struct vmbus_channel *hn_chan; } __aligned(CACHE_LINE_SIZE); #define HN_TRUST_HCSUM_IP 0x0001 From owner-svn-src-all@freebsd.org Wed Feb 22 06:12: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 E6C78CE87E2; Wed, 22 Feb 2017 06:12:34 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B30AF279; Wed, 22 Feb 2017 06:12:34 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M6CXBk000389; Wed, 22 Feb 2017 06:12:33 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M6CXmw000388; Wed, 22 Feb 2017 06:12:33 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220612.v1M6CXmw000388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 06:12:33 +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: r314084 - stable/11/sys/dev/hyperv/netvsc 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, 22 Feb 2017 06:12:35 -0000 Author: dexuan Date: Wed Feb 22 06:12:33 2017 New Revision: 314084 URL: https://svnweb.freebsd.org/changeset/base/314084 Log: MFC: 312686 Approved by: sephe (mentor) r312686 hyperv/hn: remove the MTU and IFF_DRV_RUNNING checking in hn_rxpkt() It's unnecessary because the upper nework stack does the same checking. In the case of Hyper-V SR-IOV, we need to remove the checking because 1) multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface; 2) we must inject the packets even if the synthetic NIC is down, or has a different MTU from the VF device. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8962 Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 06:06:58 2017 (r314083) +++ stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 06:12:33 2017 (r314084) @@ -2129,15 +2129,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const v int size, do_lro = 0, do_csum = 1; int hash_type; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) - return (0); - - /* - * Bail out if packet contains more data than configured MTU. - */ - if (dlen > (ifp->if_mtu + ETHER_HDR_LEN)) { - return (0); - } else if (dlen <= MHLEN) { + if (dlen <= MHLEN) { m_new = m_gethdr(M_NOWAIT, MT_DATA); if (m_new == NULL) { if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); From owner-svn-src-all@freebsd.org Wed Feb 22 06:26: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 17125CE8B64; Wed, 22 Feb 2017 06:26:52 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2DBCA32; Wed, 22 Feb 2017 06:26:51 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M6Qojj004556; Wed, 22 Feb 2017 06:26:50 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M6Qo9m004554; Wed, 22 Feb 2017 06:26:50 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220626.v1M6Qo9m004554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 06:26:50 +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: r314085 - stable/11/sys/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: Wed, 22 Feb 2017 06:26:52 -0000 Author: dexuan Date: Wed Feb 22 06:26:50 2017 New Revision: 314085 URL: https://svnweb.freebsd.org/changeset/base/314085 Log: MFC: 312687, 312688 Approved by: sephe (mentor) r312687 ifnet: introduce event handlers for ifup/ifdown events Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together, mainly to support seamless live migration. When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite). So the synthetic NIC driver needs to know when a VF device is becoming UP or DOWN and hence the patch is made. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8963 r312688 hyperv/hn: add the support for VF drivers (SR-IOV) Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together (both NICs have the same MAC address), mainly to support seamless live migration. When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite). Note: multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface (if the VF is UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP). Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8964 Modified: stable/11/sys/net/if.c stable/11/sys/net/if_var.h Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Wed Feb 22 06:12:33 2017 (r314084) +++ stable/11/sys/net/if.c Wed Feb 22 06:26:50 2017 (r314085) @@ -2218,6 +2218,7 @@ void if_down(struct ifnet *ifp) { + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_DOWN); if_unroute(ifp, IFF_UP, AF_UNSPEC); } @@ -2230,6 +2231,7 @@ if_up(struct ifnet *ifp) { if_route(ifp, IFF_UP, AF_UNSPEC); + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_UP); } /* Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Wed Feb 22 06:12:33 2017 (r314084) +++ stable/11/sys/net/if_var.h Wed Feb 22 06:26:50 2017 (r314085) @@ -359,6 +359,11 @@ EVENTHANDLER_DECLARE(ifnet_departure_eve /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); +/* Interface up/down event */ +#define IFNET_EVENT_UP 0 +#define IFNET_EVENT_DOWN 1 +typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); +EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); #endif /* _SYS_EVENTHANDLER_H_ */ /* From owner-svn-src-all@freebsd.org Wed Feb 22 06:43: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 E3B5BCE932D; Wed, 22 Feb 2017 06:43:50 +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 7B0461622; Wed, 22 Feb 2017 06:43:50 +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 v1M6hnXq012557; Wed, 22 Feb 2017 06:43:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M6hn6T012555; Wed, 22 Feb 2017 06:43:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702220643.v1M6hn6T012555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Feb 2017 06:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314086 - 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: Wed, 22 Feb 2017 06:43:51 -0000 Author: mav Date: Wed Feb 22 06:43:49 2017 New Revision: 314086 URL: https://svnweb.freebsd.org/changeset/base/314086 Log: Fix multiple problems around LUN disable under load. - Move private data about ATIOs/INOTs from per-LUN to per-channel data. This allows active commands to continue operation after LUN destruction. This also simplifies lookup of the data by tag in some situations. - Unify three restart_queue processing implementations. - Complete all ATIOs from restart_queue on LUN disable. - Delete ATIO private data when command completed or aborted, not depending on the ATIO being requeued, that was ugly hack and could never happen. CAM should always call ether XPT_CONT_TARGET_IO with status or XPT_ABORT. - Implement XPT_ABORT for queued ATIOs/INOTs to allow CAM do graceful shutdown, not depending on LUN disable, as it is done in ahd(4)/targ(4). - Unify isp_endcmd() arguments to make it more usable in generic code. - Remove never really used LUN state reference counter. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Feb 22 06:26:50 2017 (r314085) +++ head/sys/dev/isp/isp_freebsd.c Wed Feb 22 06:43:49 2017 (r314086) @@ -109,6 +109,9 @@ isp_attach_chan(ispsoftc_t *isp, struct struct ccb_setasync csa; struct cam_sim *sim; struct cam_path *path; +#ifdef ISP_TARGET_MODE + int i; +#endif /* * Construct our SIM entry. @@ -149,6 +152,14 @@ isp_attach_chan(ispsoftc_t *isp, struct spi->path = path; #ifdef ISP_TARGET_MODE TAILQ_INIT(&spi->waitq); + STAILQ_INIT(&spi->ntfree); + for (i = 0; i < ATPDPSIZE; i++) + STAILQ_INSERT_TAIL(&spi->ntfree, &spi->ntpool[i], next); + LIST_INIT(&spi->atfree); + for (i = ATPDPSIZE-1; i >= 0; i--) + LIST_INSERT_HEAD(&spi->atfree, &spi->atpool[i], next); + for (i = 0; i < ATPDPHASHSIZE; i++) + LIST_INIT(&spi->atused[i]); #endif } else { fcparam *fcp = FCPARAM(isp, chan); @@ -167,6 +178,14 @@ isp_attach_chan(ispsoftc_t *isp, struct TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); #ifdef ISP_TARGET_MODE TAILQ_INIT(&fc->waitq); + STAILQ_INIT(&fc->ntfree); + for (i = 0; i < ATPDPSIZE; i++) + STAILQ_INSERT_TAIL(&fc->ntfree, &fc->ntpool[i], next); + LIST_INIT(&fc->atfree); + for (i = ATPDPSIZE-1; i >= 0; i--) + LIST_INSERT_HEAD(&fc->atfree, &fc->atpool[i], next); + for (i = 0; i < ATPDPHASHSIZE; i++) + LIST_INIT(&fc->atused[i]); #endif isp_loop_changed(isp, chan); ISP_UNLOCK(isp); @@ -831,19 +850,15 @@ isp_free_pcmd(ispsoftc_t *isp, union ccb * Put the target mode functions here, because some are inlines */ #ifdef ISP_TARGET_MODE -static ISP_INLINE int is_lun_enabled(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep(ispsoftc_t *, int, lun_id_t); -static ISP_INLINE tstate_t *get_lun_statep_from_tag(ispsoftc_t *, int, uint32_t); -static ISP_INLINE void rls_lun_statep(ispsoftc_t *, tstate_t *); -static ISP_INLINE inot_private_data_t *get_ntp_from_tagdata(ispsoftc_t *, uint32_t, uint32_t, tstate_t **); -static ISP_INLINE atio_private_data_t *isp_get_atpd(ispsoftc_t *, tstate_t *, uint32_t); -static ISP_INLINE atio_private_data_t *isp_find_atpd(ispsoftc_t *, tstate_t *, uint32_t); -static ISP_INLINE void isp_put_atpd(ispsoftc_t *, tstate_t *, atio_private_data_t *); -static ISP_INLINE inot_private_data_t *isp_get_ntpd(ispsoftc_t *, tstate_t *); -static ISP_INLINE inot_private_data_t *isp_find_ntpd(ispsoftc_t *, tstate_t *, uint32_t, uint32_t); -static ISP_INLINE void isp_put_ntpd(ispsoftc_t *, tstate_t *, inot_private_data_t *); +static atio_private_data_t *isp_get_atpd(ispsoftc_t *, int, uint32_t); +static atio_private_data_t *isp_find_atpd(ispsoftc_t *, int, uint32_t); +static void isp_put_atpd(ispsoftc_t *, int, atio_private_data_t *); +static inot_private_data_t *isp_get_ntpd(ispsoftc_t *, int); +static inot_private_data_t *isp_find_ntpd(ispsoftc_t *, int, uint32_t, uint32_t); +static void isp_put_ntpd(ispsoftc_t *, int, inot_private_data_t *); static cam_status create_lun_state(ispsoftc_t *, int, struct cam_path *, tstate_t **); -static void destroy_lun_state(ispsoftc_t *, tstate_t *); +static void destroy_lun_state(ispsoftc_t *, int, tstate_t *); static void isp_enable_lun(ispsoftc_t *, union ccb *); static void isp_disable_lun(ispsoftc_t *, union ccb *); static timeout_t isp_refire_putback_atio; @@ -859,43 +874,7 @@ static void isp_handle_platform_notify_f static void isp_handle_platform_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); static int isp_handle_platform_target_notify_ack(ispsoftc_t *, isp_notify_t *, uint32_t rsp); static void isp_handle_platform_target_tmf(ispsoftc_t *, isp_notify_t *); -static void isp_target_mark_aborted(ispsoftc_t *, union ccb *); -static void isp_target_mark_aborted_early(ispsoftc_t *, tstate_t *, uint32_t); - -static ISP_INLINE int -is_lun_enabled(ispsoftc_t *isp, int bus, lun_id_t lun) -{ - tstate_t *tptr; - struct tslist *lhp; - - ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); - SLIST_FOREACH(tptr, lhp, next) { - if (tptr->ts_lun == lun) { - return (1); - } - } - return (0); -} - -static void -dump_tstates(ispsoftc_t *isp, int bus) -{ - int i, j; - struct tslist *lhp; - tstate_t *tptr = NULL; - - if (bus >= isp->isp_nchan) { - return; - } - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - j = 0; - SLIST_FOREACH(tptr, lhp, next) { - xpt_print(tptr->owner, "[%d, %d] atio_cnt=%d inot_cnt=%d\n", i, j, tptr->atio_count, tptr->inot_count); - j++; - } - } -} +static void isp_target_mark_aborted_early(ispsoftc_t *, int chan, tstate_t *, uint32_t); static ISP_INLINE tstate_t * get_lun_statep(ispsoftc_t *isp, int bus, lun_id_t lun) @@ -906,74 +885,50 @@ get_lun_statep(ispsoftc_t *isp, int bus, if (bus < isp->isp_nchan) { ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); SLIST_FOREACH(tptr, lhp, next) { - if (tptr->ts_lun == lun) { - tptr->hold++; + if (tptr->ts_lun == lun) return (tptr); - } } } return (NULL); } -static ISP_INLINE tstate_t * -get_lun_statep_from_tag(ispsoftc_t *isp, int bus, uint32_t tagval) -{ - tstate_t *tptr = NULL; - atio_private_data_t *atp; - struct tslist *lhp; - int i; - - if (bus < isp->isp_nchan && tagval != 0) { - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - atp = isp_find_atpd(isp, tptr, tagval); - if (atp) { - tptr->hold++; - return (tptr); - } - } - } - } - return (NULL); -} - -static ISP_INLINE inot_private_data_t * -get_ntp_from_tagdata(ispsoftc_t *isp, uint32_t tag_id, uint32_t seq_id, tstate_t **rslt) +static int +isp_atio_restart(ispsoftc_t *isp, int bus, tstate_t *tptr) { inot_private_data_t *ntp; - tstate_t *tptr; - struct tslist *lhp; - int bus, i; + struct ntpdlist rq; - for (bus = 0; bus < isp->isp_nchan; bus++) { - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - ntp = isp_find_ntpd(isp, tptr, tag_id, seq_id); - if (ntp) { - *rslt = tptr; - tptr->hold++; - return (ntp); - } - } + if (STAILQ_EMPTY(&tptr->restart_queue)) + return (0); + STAILQ_INIT(&rq); + STAILQ_CONCAT(&rq, &tptr->restart_queue); + while ((ntp = STAILQ_FIRST(&rq)) != NULL) { + STAILQ_REMOVE_HEAD(&rq, next); + if (IS_24XX(isp)) { + isp_prt(isp, ISP_LOGTDEBUG0, + "%s: restarting resrc deprived %x", __func__, + ((at7_entry_t *)ntp->data)->at_rxid); + isp_handle_platform_atio7(isp, (at7_entry_t *) ntp->data); + } else { + isp_prt(isp, ISP_LOGTDEBUG0, + "%s: restarting resrc deprived %x", __func__, + ((at2_entry_t *)ntp->data)->at_rxid); + isp_handle_platform_atio2(isp, (at2_entry_t *) ntp->data); } + isp_put_ntpd(isp, bus, ntp); + if (!STAILQ_EMPTY(&tptr->restart_queue)) + break; } - return (NULL); -} - -static ISP_INLINE void -rls_lun_statep(ispsoftc_t *isp, tstate_t *tptr) -{ - KASSERT((tptr->hold), ("tptr not held")); - tptr->hold--; + if (!STAILQ_EMPTY(&rq)) { + STAILQ_CONCAT(&rq, &tptr->restart_queue); + STAILQ_CONCAT(&tptr->restart_queue, &rq); + } + return (!STAILQ_EMPTY(&tptr->restart_queue)); } static void isp_tmcmd_restart(ispsoftc_t *isp) { - inot_private_data_t *ntp; - inot_private_data_t *restart_queue; tstate_t *tptr; union ccb *ccb; struct tslist *lhp; @@ -983,31 +938,8 @@ isp_tmcmd_restart(ispsoftc_t *isp) for (bus = 0; bus < isp->isp_nchan; bus++) { for (i = 0; i < LUN_HASH_SIZE; i++) { ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - if ((restart_queue = tptr->restart_queue) != NULL) - tptr->restart_queue = NULL; - while (restart_queue) { - ntp = restart_queue; - restart_queue = ntp->rd.nt.nt_hba; - if (IS_24XX(isp)) { - isp_prt(isp, ISP_LOGTDEBUG0, "%s: restarting resrc deprived %x", __func__, ((at7_entry_t *)ntp->rd.data)->at_rxid); - isp_handle_platform_atio7(isp, (at7_entry_t *) ntp->rd.data); - } else { - isp_prt(isp, ISP_LOGTDEBUG0, "%s: restarting resrc deprived %x", __func__, ((at2_entry_t *)ntp->rd.data)->at_rxid); - isp_handle_platform_atio2(isp, (at2_entry_t *) ntp->rd.data); - } - isp_put_ntpd(isp, tptr, ntp); - if (tptr->restart_queue && restart_queue != NULL) { - ntp = tptr->restart_queue; - tptr->restart_queue = restart_queue; - while (restart_queue->rd.nt.nt_hba) { - restart_queue = restart_queue->rd.nt.nt_hba; - } - restart_queue->rd.nt.nt_hba = ntp; - break; - } - } - } + SLIST_FOREACH(tptr, lhp, next) + isp_atio_restart(isp, bus, tptr); } /* @@ -1022,95 +954,108 @@ isp_tmcmd_restart(ispsoftc_t *isp) } } -static ISP_INLINE atio_private_data_t * -isp_get_atpd(ispsoftc_t *isp, tstate_t *tptr, uint32_t tag) +static atio_private_data_t * +isp_get_atpd(ispsoftc_t *isp, int chan, uint32_t tag) { + struct atpdlist *atfree; + struct atpdlist *atused; atio_private_data_t *atp; - atp = LIST_FIRST(&tptr->atfree); + ISP_GET_PC_ADDR(isp, chan, atfree, atfree); + atp = LIST_FIRST(atfree); if (atp) { LIST_REMOVE(atp, next); atp->tag = tag; - LIST_INSERT_HEAD(&tptr->atused[ATPDPHASH(tag)], atp, next); + ISP_GET_PC(isp, chan, atused, atused); + LIST_INSERT_HEAD(&atused[ATPDPHASH(tag)], atp, next); } return (atp); } -static ISP_INLINE atio_private_data_t * -isp_find_atpd(ispsoftc_t *isp, tstate_t *tptr, uint32_t tag) +static atio_private_data_t * +isp_find_atpd(ispsoftc_t *isp, int chan, uint32_t tag) { + struct atpdlist *atused; atio_private_data_t *atp; - LIST_FOREACH(atp, &tptr->atused[ATPDPHASH(tag)], next) { + ISP_GET_PC(isp, chan, atused, atused); + LIST_FOREACH(atp, &atused[ATPDPHASH(tag)], next) { if (atp->tag == tag) return (atp); } return (NULL); } -static ISP_INLINE void -isp_put_atpd(ispsoftc_t *isp, tstate_t *tptr, atio_private_data_t *atp) +static void +isp_put_atpd(ispsoftc_t *isp, int chan, atio_private_data_t *atp) { + struct atpdlist *atfree; + if (atp->ests) { isp_put_ecmd(isp, atp->ests); } LIST_REMOVE(atp, next); memset(atp, 0, sizeof (*atp)); - LIST_INSERT_HEAD(&tptr->atfree, atp, next); + ISP_GET_PC_ADDR(isp, chan, atfree, atfree); + LIST_INSERT_HEAD(atfree, atp, next); } static void -isp_dump_atpd(ispsoftc_t *isp, tstate_t *tptr) +isp_dump_atpd(ispsoftc_t *isp, int chan) { - atio_private_data_t *atp; + atio_private_data_t *atp, *atpool; const char *states[8] = { "Free", "ATIO", "CAM", "CTIO", "LAST_CTIO", "PDON", "?6", "7" }; - for (atp = tptr->atpool; atp < &tptr->atpool[ATPDPSIZE]; atp++) { - xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u lun %x nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", - atp->tag, atp->orig_datalen, atp->bytes_xfered, atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]); + ISP_GET_PC(isp, chan, atpool, atpool); + for (atp = atpool; atp < &atpool[ATPDPSIZE]; atp++) { + isp_prt(isp, ISP_LOGALL, "Chan %d ATP [0x%x] origdlen %u bytes_xfrd %u lun %jx nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", + chan, atp->tag, atp->orig_datalen, atp->bytes_xfered, (uintmax_t)atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]); } } - -static ISP_INLINE inot_private_data_t * -isp_get_ntpd(ispsoftc_t *isp, tstate_t *tptr) +static inot_private_data_t * +isp_get_ntpd(ispsoftc_t *isp, int chan) { + struct ntpdlist *ntfree; inot_private_data_t *ntp; - ntp = tptr->ntfree; - if (ntp) { - tptr->ntfree = ntp->next; - } + + ISP_GET_PC_ADDR(isp, chan, ntfree, ntfree); + ntp = STAILQ_FIRST(ntfree); + if (ntp) + STAILQ_REMOVE_HEAD(ntfree, next); return (ntp); } -static ISP_INLINE inot_private_data_t * -isp_find_ntpd(ispsoftc_t *isp, tstate_t *tptr, uint32_t tag_id, uint32_t seq_id) +static inot_private_data_t * +isp_find_ntpd(ispsoftc_t *isp, int chan, uint32_t tag_id, uint32_t seq_id) { - inot_private_data_t *ntp; - for (ntp = tptr->ntpool; ntp < &tptr->ntpool[ATPDPSIZE]; ntp++) { - if (ntp->rd.tag_id == tag_id && ntp->rd.seq_id == seq_id) { + inot_private_data_t *ntp, *ntp2; + + ISP_GET_PC(isp, chan, ntpool, ntp); + ISP_GET_PC_ADDR(isp, chan, ntpool[ATPDPSIZE], ntp2); + for (; ntp < ntp2; ntp++) { + if (ntp->tag_id == tag_id && ntp->seq_id == seq_id) return (ntp); - } } return (NULL); } -static ISP_INLINE void -isp_put_ntpd(ispsoftc_t *isp, tstate_t *tptr, inot_private_data_t *ntp) +static void +isp_put_ntpd(ispsoftc_t *isp, int chan, inot_private_data_t *ntp) { - ntp->rd.tag_id = ntp->rd.seq_id = 0; - ntp->next = tptr->ntfree; - tptr->ntfree = ntp; + struct ntpdlist *ntfree; + + ntp->tag_id = ntp->seq_id = 0; + ISP_GET_PC_ADDR(isp, chan, ntfree, ntfree); + STAILQ_INSERT_HEAD(ntfree, ntp, next); } static cam_status create_lun_state(ispsoftc_t *isp, int bus, struct cam_path *path, tstate_t **rslt) { - cam_status status; lun_id_t lun; struct tslist *lhp; tstate_t *tptr; - int i; lun = xpt_path_lun_id(path); if (lun != CAM_LUN_WILDCARD) { @@ -1118,30 +1063,13 @@ create_lun_state(ispsoftc_t *isp, int bu return (CAM_LUN_INVALID); } } - if (is_lun_enabled(isp, bus, lun)) { - return (CAM_LUN_ALRDY_ENA); - } tptr = malloc(sizeof (tstate_t), M_DEVBUF, M_NOWAIT|M_ZERO); if (tptr == NULL) { return (CAM_RESRC_UNAVAIL); } tptr->ts_lun = lun; - status = xpt_create_path(&tptr->owner, NULL, xpt_path_path_id(path), xpt_path_target_id(path), lun); - if (status != CAM_REQ_CMP) { - free(tptr, M_DEVBUF); - return (status); - } SLIST_INIT(&tptr->atios); SLIST_INIT(&tptr->inots); - LIST_INIT(&tptr->atfree); - for (i = ATPDPSIZE-1; i >= 0; i--) - LIST_INSERT_HEAD(&tptr->atfree, &tptr->atpool[i], next); - for (i = 0; i < ATPDPHASHSIZE; i++) - LIST_INIT(&tptr->atused[i]); - for (i = 0; i < ATPDPSIZE-1; i++) - tptr->ntpool[i].next = &tptr->ntpool[i+1]; - tptr->ntfree = tptr->ntpool; - tptr->hold = 1; ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(lun)], lhp); SLIST_INSERT_HEAD(lhp, tptr, next); *rslt = tptr; @@ -1149,34 +1077,30 @@ create_lun_state(ispsoftc_t *isp, int bu return (CAM_REQ_CMP); } -static ISP_INLINE void -destroy_lun_state(ispsoftc_t *isp, tstate_t *tptr) +static void +destroy_lun_state(ispsoftc_t *isp, int bus, tstate_t *tptr) { union ccb *ccb; struct tslist *lhp; + inot_private_data_t *ntp; - KASSERT((tptr->hold != 0), ("tptr is not held")); - KASSERT((tptr->hold == 1), ("tptr still held (%d)", tptr->hold)); - do { - ccb = (union ccb *)SLIST_FIRST(&tptr->atios); - if (ccb) { - SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - ccb->ccb_h.status = CAM_REQ_ABORTED; - xpt_done(ccb); - } - } while (ccb); - do { - ccb = (union ccb *)SLIST_FIRST(&tptr->inots); - if (ccb) { - SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); - ccb->ccb_h.status = CAM_REQ_ABORTED; - xpt_done(ccb); - } - } while (ccb); - ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(tptr->ts_lun)], lhp); + while ((ccb = (union ccb *)SLIST_FIRST(&tptr->atios)) != NULL) { + SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); + ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(ccb); + }; + while ((ccb = (union ccb *)SLIST_FIRST(&tptr->inots)) != NULL) { + SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); + ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(ccb); + } + while ((ntp = STAILQ_FIRST(&tptr->restart_queue)) != NULL) { + isp_endcmd(isp, ntp->data, NIL_HANDLE, bus, SCSI_STATUS_BUSY, 0); + STAILQ_REMOVE_HEAD(&tptr->restart_queue, next); + isp_put_ntpd(isp, bus, ntp); + } + ISP_GET_PC_ADDR(isp, bus, lun_hash[LUN_HASH_FUNC(tptr->ts_lun)], lhp); SLIST_REMOVE(lhp, tptr, tstate, next); - ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, tptr->owner, "destroyed tstate\n"); - xpt_free_path(tptr->owner); free(tptr, M_DEVBUF); } @@ -1223,7 +1147,6 @@ isp_enable_lun(ispsoftc_t *isp, union cc return; } - rls_lun_statep(isp, tptr); ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); } @@ -1254,7 +1177,7 @@ isp_disable_lun(ispsoftc_t *isp, union c return; } - destroy_lun_state(isp, tptr); + destroy_lun_state(isp, bus, tptr); ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); } @@ -1263,7 +1186,6 @@ static void isp_target_start_ctio(ispsoftc_t *isp, union ccb *ccb, enum Start_Ctio_How how) { int fctape, sendstatus, resid; - tstate_t *tptr; fcparam *fcp; atio_private_data_t *atp; struct ccb_scsiio *cso; @@ -1271,16 +1193,6 @@ isp_target_start_ctio(ispsoftc_t *isp, u uint32_t dmaresult, handle, xfrlen, sense_length, tmp; uint8_t local[QENTRY_LEN]; - tptr = get_lun_statep(isp, XS_CHANNEL(ccb), XS_LUN(ccb)); - if (tptr == NULL) { - tptr = get_lun_statep(isp, XS_CHANNEL(ccb), CAM_LUN_WILDCARD); - if (tptr == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: [0x%x] cannot find tstate pointer", __func__, ccb->csio.tag_id); - ccb->ccb_h.status = CAM_DEV_NOT_THERE; - xpt_done(ccb); - return; - } - } isp_prt(isp, ISP_LOGTDEBUG0, "%s: ENTRY[0x%x] how %u xfrlen %u sendstatus %d sense_len %u", __func__, ccb->csio.tag_id, how, ccb->csio.dxfer_len, (ccb->ccb_h.flags & CAM_SEND_STATUS) != 0, ((ccb->ccb_h.flags & CAM_SEND_SENSE)? ccb->csio.sense_len : 0)); @@ -1313,10 +1225,10 @@ isp_target_start_ctio(ispsoftc_t *isp, u } } - atp = isp_find_atpd(isp, tptr, cso->tag_id); + atp = isp_find_atpd(isp, XS_CHANNEL(ccb), cso->tag_id); if (atp == NULL) { isp_prt(isp, ISP_LOGERR, "%s: [0x%x] cannot find private data adjunct in %s", __func__, cso->tag_id, __func__); - isp_dump_atpd(isp, tptr); + isp_dump_atpd(isp, XS_CHANNEL(ccb)); ccb->ccb_h.status = CAM_REQ_CMP_ERR; xpt_done(ccb); continue; @@ -1763,7 +1675,6 @@ isp_target_start_ctio(ispsoftc_t *isp, u atp->ctcnt++; atp->seqno++; } - rls_lun_statep(isp, tptr); } static void @@ -1860,7 +1771,7 @@ isp_handle_platform_atio2(ispsoftc_t *is */ if ((aep->at_status & ~QLTM_SVALID) != AT_CDB) { isp_prt(isp, ISP_LOGWARN, "bogus atio (0x%x) leaked to platform", aep->at_status); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); + isp_endcmd(isp, aep, NIL_HANDLE, 0, SCSI_STATUS_BUSY, 0); return; } @@ -1884,9 +1795,9 @@ isp_handle_platform_atio2(ispsoftc_t *is if (tptr == NULL) { isp_prt(isp, ISP_LOGWARN, "%s: [0x%x] no state pointer for lun %jx or wildcard", __func__, aep->at_rxid, (uintmax_t)lun); if (lun == 0) { - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); + isp_endcmd(isp, aep, nphdl, 0, SCSI_STATUS_BUSY, 0); } else { - isp_endcmd(isp, aep, SCSI_STATUS_CHECK_COND | ECMD_SVALID | (0x5 << 12) | (0x25 << 16), 0); + isp_endcmd(isp, aep, nphdl, 0, SCSI_STATUS_CHECK_COND | ECMD_SVALID | (0x5 << 12) | (0x25 << 16), 0); } return; } @@ -1895,38 +1806,15 @@ isp_handle_platform_atio2(ispsoftc_t *is /* * Start any commands pending resources first. */ - if (tptr->restart_queue) { - inot_private_data_t *restart_queue = tptr->restart_queue; - tptr->restart_queue = NULL; - while (restart_queue) { - ntp = restart_queue; - restart_queue = ntp->rd.nt.nt_hba; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: restarting resrc deprived %x", __func__, ((at2_entry_t *)ntp->rd.data)->at_rxid); - isp_handle_platform_atio2(isp, (at2_entry_t *) ntp->rd.data); - isp_put_ntpd(isp, tptr, ntp); - /* - * If a recursion caused the restart queue to start to fill again, - * stop and splice the new list on top of the old list and restore - * it and go to noresrc. - */ - if (tptr->restart_queue) { - ntp = tptr->restart_queue; - tptr->restart_queue = restart_queue; - while (restart_queue->rd.nt.nt_hba) { - restart_queue = restart_queue->rd.nt.nt_hba; - } - restart_queue->rd.nt.nt_hba = ntp; - goto noresrc; - } - } - } + if (isp_atio_restart(isp, 0, tptr)) + goto noresrc; atiop = (struct ccb_accept_tio *) SLIST_FIRST(&tptr->atios); if (atiop == NULL) { goto noresrc; } - atp = isp_get_atpd(isp, tptr, aep->at_rxid); + atp = isp_get_atpd(isp, 0, aep->at_rxid); if (atp == NULL) { goto noresrc; } @@ -2001,19 +1889,15 @@ isp_handle_platform_atio2(ispsoftc_t *is atp->state = ATPD_STATE_CAM; xpt_done((union ccb *)atiop); isp_prt(isp, ISP_LOGTDEBUG0, "ATIO2[0x%x] CDB=0x%x lun %jx datalen %u", aep->at_rxid, atp->cdb0, (uintmax_t)lun, atp->orig_datalen); - rls_lun_statep(isp, tptr); return; noresrc: - ntp = isp_get_ntpd(isp, tptr); + ntp = isp_get_ntpd(isp, 0); if (ntp == NULL) { - rls_lun_statep(isp, tptr); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); + isp_endcmd(isp, aep, nphdl, 0, SCSI_STATUS_BUSY, 0); return; } - memcpy(ntp->rd.data, aep, QENTRY_LEN); - ntp->rd.nt.nt_hba = tptr->restart_queue; - tptr->restart_queue = ntp; - rls_lun_statep(isp, tptr); + memcpy(ntp->data, aep, QENTRY_LEN); + STAILQ_INSERT_TAIL(&tptr->restart_queue, ntp, next); } static void @@ -2118,40 +2002,13 @@ isp_handle_platform_atio7(ispsoftc_t *is /* * Start any commands pending resources first. */ - if (tptr->restart_queue) { - inot_private_data_t *restart_queue = tptr->restart_queue; - tptr->restart_queue = NULL; - while (restart_queue) { - ntp = restart_queue; - restart_queue = ntp->rd.nt.nt_hba; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: restarting resrc deprived %x", __func__, ((at7_entry_t *)ntp->rd.data)->at_rxid); - isp_handle_platform_atio7(isp, (at7_entry_t *) ntp->rd.data); - isp_put_ntpd(isp, tptr, ntp); - /* - * If a recursion caused the restart queue to start to fill again, - * stop and splice the new list on top of the old list and restore - * it and go to noresrc. - */ - if (tptr->restart_queue) { - isp_prt(isp, ISP_LOGTDEBUG0, "%s: restart queue refilling", __func__); - if (restart_queue) { - ntp = tptr->restart_queue; - tptr->restart_queue = restart_queue; - while (restart_queue->rd.nt.nt_hba) { - restart_queue = restart_queue->rd.nt.nt_hba; - } - restart_queue->rd.nt.nt_hba = ntp; - } - goto noresrc; - } - } - } + if (isp_atio_restart(isp, chan, tptr)) + goto noresrc; /* * If the f/w is out of resources, just send a BUSY status back. */ if (aep->at_rxid == AT7_NORESRC_RXID) { - rls_lun_statep(isp, tptr); isp_endcmd(isp, aep, nphdl, chan, SCSI_BUSY, 0); return; } @@ -2165,7 +2022,7 @@ isp_handle_platform_atio7(ispsoftc_t *is goto noresrc; } - oatp = isp_find_atpd(isp, tptr, aep->at_rxid); + oatp = isp_find_atpd(isp, chan, aep->at_rxid); if (oatp) { isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] tag wraparound in isp_handle_platforms_atio7 (N-Port Handle 0x%04x S_ID 0x%04x OX_ID 0x%04x) oatp state %d", aep->at_rxid, nphdl, sid, aep->at_hdr.ox_id, oatp->state); @@ -2174,7 +2031,7 @@ isp_handle_platform_atio7(ispsoftc_t *is */ goto noresrc; } - atp = isp_get_atpd(isp, tptr, aep->at_rxid); + atp = isp_get_atpd(isp, chan, aep->at_rxid); if (atp == NULL) { isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] out of atps", aep->at_rxid); goto noresrc; @@ -2230,22 +2087,17 @@ isp_handle_platform_atio7(ispsoftc_t *is isp_prt(isp, ISP_LOGTDEBUG0, "ATIO7[0x%x] CDB=0x%x lun %jx datalen %u", aep->at_rxid, atp->cdb0, (uintmax_t)lun, atp->orig_datalen); xpt_done((union ccb *)atiop); - rls_lun_statep(isp, tptr); return; noresrc: - if (atp) { - isp_put_atpd(isp, tptr, atp); - } - ntp = isp_get_ntpd(isp, tptr); + if (atp) + isp_put_atpd(isp, chan, atp); + ntp = isp_get_ntpd(isp, chan); if (ntp == NULL) { - rls_lun_statep(isp, tptr); isp_endcmd(isp, aep, nphdl, chan, SCSI_STATUS_BUSY, 0); return; } - memcpy(ntp->rd.data, aep, QENTRY_LEN); - ntp->rd.nt.nt_hba = tptr->restart_queue; - tptr->restart_queue = ntp; - rls_lun_statep(isp, tptr); + memcpy(ntp->data, aep, QENTRY_LEN); + STAILQ_INSERT_TAIL(&tptr->restart_queue, ntp, next); } @@ -2256,7 +2108,7 @@ noresrc: * transaction. */ static void -isp_handle_srr_start(ispsoftc_t *isp, tstate_t *tptr, atio_private_data_t *atp) +isp_handle_srr_start(ispsoftc_t *isp, atio_private_data_t *atp) { in_fcentry_24xx_t *inot; uint32_t srr_off, ccb_off, ccb_len, ccb_end; @@ -2356,7 +2208,6 @@ mdp: static void isp_handle_srr_notify(ispsoftc_t *isp, void *inot_raw) { - tstate_t *tptr; in_fcentry_24xx_t *inot = inot_raw; atio_private_data_t *atp; uint32_t tag = inot->in_rxid; @@ -2367,15 +2218,8 @@ isp_handle_srr_notify(ispsoftc_t *isp, v return; } - tptr = get_lun_statep_from_tag(isp, bus, tag); - if (tptr == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: cannot find tptr for tag %x in SRR Notify", __func__, tag); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); - return; - } - atp = isp_find_atpd(isp, tptr, tag); + atp = isp_find_atpd(isp, bus, tag); if (atp == NULL) { - rls_lun_statep(isp, tptr); isp_prt(isp, ISP_LOGERR, "%s: cannot find adjunct for %x in SRR Notify", __func__, tag); isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); return; @@ -2385,8 +2229,7 @@ isp_handle_srr_notify(ispsoftc_t *isp, v isp_prt(isp, ISP_LOGTINFO /* ISP_LOGTDEBUG0 */, "SRR[0x%x] inot->in_rxid flags 0x%x srr_iu=%x reloff 0x%x", inot->in_rxid, inot->in_flags, inot->in_srr_iu, inot->in_srr_reloff_lo | (inot->in_srr_reloff_hi << 16)); if (atp->srr_ccb) - isp_handle_srr_start(isp, tptr, atp); - rls_lun_statep(isp, tptr); + isp_handle_srr_start(isp, atp); } static void @@ -2394,7 +2237,6 @@ isp_handle_platform_ctio(ispsoftc_t *isp { union ccb *ccb; int sentstatus = 0, ok = 0, notify_cam = 0, resid = 0, failure = 0; - tstate_t *tptr = NULL; atio_private_data_t *atp = NULL; int bus; uint32_t handle, moved_data = 0, data_requested; @@ -2413,19 +2255,10 @@ isp_handle_platform_ctio(ispsoftc_t *isp } bus = XS_CHANNEL(ccb); - tptr = get_lun_statep(isp, bus, XS_LUN(ccb)); - if (tptr == NULL) { - tptr = get_lun_statep(isp, bus, CAM_LUN_WILDCARD); - } - if (tptr == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: cannot find tptr for tag %x after I/O", __func__, ccb->csio.tag_id); - return; - } - if (IS_24XX(isp)) { - atp = isp_find_atpd(isp, tptr, ((ct7_entry_t *)arg)->ct_rxid); + atp = isp_find_atpd(isp, bus, ((ct7_entry_t *)arg)->ct_rxid); } else { - atp = isp_find_atpd(isp, tptr, ((ct2_entry_t *)arg)->ct_rxid); + atp = isp_find_atpd(isp, bus, ((ct2_entry_t *)arg)->ct_rxid); } if (atp == NULL) { /* @@ -2433,10 +2266,9 @@ isp_handle_platform_ctio(ispsoftc_t *isp * ct_rxid value, filling only ct_syshandle. Workaround * that using tag_id from the CCB, pointed by ct_syshandle. */ - atp = isp_find_atpd(isp, tptr, ccb->csio.tag_id); + atp = isp_find_atpd(isp, bus, ccb->csio.tag_id); } if (atp == NULL) { - rls_lun_statep(isp, tptr); isp_prt(isp, ISP_LOGERR, "%s: cannot find adjunct for %x after I/O", __func__, ccb->csio.tag_id); return; } @@ -2451,8 +2283,7 @@ isp_handle_platform_ctio(ispsoftc_t *isp if (ct->ct_nphdl == CT7_SRR) { atp->srr_ccb = ccb; if (atp->srr_notify_rcvd) - isp_handle_srr_start(isp, tptr, atp); - rls_lun_statep(isp, tptr); + isp_handle_srr_start(isp, atp); return; } if (ct->ct_nphdl == CT_HBA_RESET) { @@ -2473,8 +2304,7 @@ isp_handle_platform_ctio(ispsoftc_t *isp if (ct->ct_status == CT_SRR) { atp->srr_ccb = ccb; if (atp->srr_notify_rcvd) - isp_handle_srr_start(isp, tptr, atp); - rls_lun_statep(isp, tptr); + isp_handle_srr_start(isp, atp); isp_target_putback_atio(ccb); return; } @@ -2509,7 +2339,6 @@ isp_handle_platform_ctio(ispsoftc_t *isp ccb->ccb_h.status |= CAM_REQ_CMP_ERR; } atp->state = ATPD_STATE_PDON; - rls_lun_statep(isp, tptr); /* * We never *not* notify CAM when there has been any error (ok == 0), @@ -2525,6 +2354,12 @@ isp_handle_platform_ctio(ispsoftc_t *isp } /* + * If we sent status or error happened, we are done with this ATIO. + */ + if (sentstatus || !ok) + isp_put_atpd(isp, bus, atp); + + /* * We're telling CAM we're done with this CTIO transaction. * * 24XX cards never need an ATIO put back. @@ -2904,11 +2739,11 @@ isp_handle_platform_target_tmf(ispsoftc_ switch (notify->nt_ncode) { case NT_ABORT_TASK: - isp_target_mark_aborted_early(isp, tptr, inot->tag_id); + isp_target_mark_aborted_early(isp, notify->nt_channel, tptr, inot->tag_id); inot->arg = MSG_ABORT_TASK; break; case NT_ABORT_TASK_SET: - isp_target_mark_aborted_early(isp, tptr, TAG_ANY); + isp_target_mark_aborted_early(isp, notify->nt_channel, tptr, TAG_ANY); inot->arg = MSG_ABORT_TASK_SET; break; case NT_CLEAR_ACA: @@ -2934,30 +2769,26 @@ isp_handle_platform_target_tmf(ispsoftc_ goto bad; } - ntp = isp_get_ntpd(isp, tptr); + ntp = isp_get_ntpd(isp, notify->nt_channel); if (ntp == NULL) { isp_prt(isp, ISP_LOGWARN, "%s: out of inotify private structures", __func__); goto bad; } - ISP_MEMCPY(&ntp->rd.nt, notify, sizeof (isp_notify_t)); + ISP_MEMCPY(&ntp->nt, notify, sizeof (isp_notify_t)); if (notify->nt_lreserved) { - ISP_MEMCPY(&ntp->rd.data, notify->nt_lreserved, QENTRY_LEN); - ntp->rd.nt.nt_lreserved = &ntp->rd.data; + ISP_MEMCPY(&ntp->data, notify->nt_lreserved, QENTRY_LEN); + ntp->nt.nt_lreserved = &ntp->data; } - ntp->rd.seq_id = notify->nt_tagval; - ntp->rd.tag_id = notify->nt_tagval >> 32; + ntp->seq_id = notify->nt_tagval; + ntp->tag_id = notify->nt_tagval >> 32; tptr->inot_count--; SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); - rls_lun_statep(isp, tptr); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, inot->ccb_h.path, "%s: Take FREE INOT count now %d\n", __func__, tptr->inot_count); inot->ccb_h.status = CAM_MESSAGE_RECV; xpt_done((union ccb *)inot); return; bad: - if (tptr) { - rls_lun_statep(isp, tptr); - } if (notify->nt_need_ack && notify->nt_lreserved) { if (((isphdr_t *)notify->nt_lreserved)->rqs_entry_type == RQSTYPE_ABTS_RCVD) { if (isp_acknak_abts(isp, notify->nt_lreserved, ENOMEM)) { @@ -2969,72 +2800,39 @@ bad: } } -/* - * Find the associated private data and mark it as dead so - * we don't try to work on it any further. - */ -static void -isp_target_mark_aborted(ispsoftc_t *isp, union ccb *ccb) -{ - tstate_t *tptr; - atio_private_data_t *atp; - union ccb *accb = ccb->cab.abort_ccb; - - tptr = get_lun_statep(isp, XS_CHANNEL(accb), XS_LUN(accb)); - if (tptr == NULL) { - tptr = get_lun_statep(isp, XS_CHANNEL(accb), CAM_LUN_WILDCARD); - if (tptr == NULL) { - ccb->ccb_h.status = CAM_REQ_INVALID; - return; - } - } - - atp = isp_find_atpd(isp, tptr, accb->atio.tag_id); - if (atp == NULL) { - ccb->ccb_h.status = CAM_REQ_INVALID; - } else { - atp->dead = 1; - ccb->ccb_h.status = CAM_REQ_CMP; - } - rls_lun_statep(isp, tptr); -} - static void -isp_target_mark_aborted_early(ispsoftc_t *isp, tstate_t *tptr, uint32_t tag_id) +isp_target_mark_aborted_early(ispsoftc_t *isp, int chan, tstate_t *tptr, uint32_t tag_id) { - atio_private_data_t *atp; - inot_private_data_t *restart_queue = tptr->restart_queue; + atio_private_data_t *atp, *atpool; + inot_private_data_t *ntp, *tmp; + uint32_t this_tag_id; /* * First, clean any commands pending restart */ - tptr->restart_queue = NULL; - while (restart_queue) { - uint32_t this_tag_id; - inot_private_data_t *ntp = restart_queue; - - restart_queue = ntp->rd.nt.nt_hba; - - if (IS_24XX(isp)) { - this_tag_id = ((at7_entry_t *)ntp->rd.data)->at_rxid; - } else { - this_tag_id = ((at2_entry_t *)ntp->rd.data)->at_rxid; - } + STAILQ_FOREACH_SAFE(ntp, &tptr->restart_queue, next, tmp) { + if (IS_24XX(isp)) + this_tag_id = ((at7_entry_t *)ntp->data)->at_rxid; + else + this_tag_id = ((at2_entry_t *)ntp->data)->at_rxid; if ((uint64_t)tag_id == TAG_ANY || tag_id == this_tag_id) { - isp_put_ntpd(isp, tptr, ntp); - } else { - ntp->rd.nt.nt_hba = tptr->restart_queue; - tptr->restart_queue = ntp; + isp_endcmd(isp, ntp->data, NIL_HANDLE, chan, + ECMD_TERMINATE, 0); + isp_put_ntpd(isp, chan, ntp); + STAILQ_REMOVE(&tptr->restart_queue, ntp, + inot_private_data, next); } } /* * Now mark other ones dead as well. */ - for (atp = tptr->atpool; atp < &tptr->atpool[ATPDPSIZE]; atp++) { - if ((uint64_t)tag_id == TAG_ANY || atp->tag == tag_id) { + ISP_GET_PC(isp, chan, atpool, atpool); + for (atp = atpool; atp < &atpool[ATPDPSIZE]; atp++) { + if (atp->lun != tptr->ts_lun) + continue; + if ((uint64_t)tag_id == TAG_ANY || atp->tag == tag_id) atp->dead = 1; - } } } #endif @@ -3433,6 +3231,77 @@ isp_kthread(void *arg) kthread_exit(); } +#ifdef ISP_TARGET_MODE +static void +isp_abort_atio(ispsoftc_t *isp, union ccb *ccb) +{ + atio_private_data_t *atp; + union ccb *accb = ccb->cab.abort_ccb; + struct ccb_hdr *sccb; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 22 07:07: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 2F42DCE98DB; Wed, 22 Feb 2017 07:07: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 F097B322; Wed, 22 Feb 2017 07:07:06 +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 v1M776QC020599; Wed, 22 Feb 2017 07:07:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M7764i020598; Wed, 22 Feb 2017 07:07:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702220707.v1M7764i020598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Feb 2017 07:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314087 - head/sys/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, 22 Feb 2017 07:07:07 -0000 Author: kib Date: Wed Feb 22 07:07:05 2017 New Revision: 314087 URL: https://svnweb.freebsd.org/changeset/base/314087 Log: More fixes for regression in r313898 on i386. Use long long constants where needed. Reported and tested by: kargl Sponsored by: The FreeBSD Foundation MFC after: 10 days Modified: head/sys/x86/x86/x86_mem.c Modified: head/sys/x86/x86/x86_mem.c ============================================================================== --- head/sys/x86/x86/x86_mem.c Wed Feb 22 06:43:49 2017 (r314086) +++ head/sys/x86/x86/x86_mem.c Wed Feb 22 07:07:05 2017 (r314087) @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) /* Compute the range from the mask. Ick. */ mrd->mr_len = (~(msrv & mtrr_physmask) & - (mtrr_physmask | 0xfffL)) + 1; + (mtrr_physmask | 0xfffLL)) + 1; if (!mrvalid(mrd->mr_base, mrd->mr_len)) mrd->mr_flags |= MDF_BOGUS; @@ -638,7 +638,7 @@ x86_mrinit(struct mem_range_softc *sc) * Determine the size of the PhysMask and PhysBase fields in * the variable range MTRRs. */ - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffUL; + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; /* If fixed MTRRs supported and enabled. */ if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { From owner-svn-src-all@freebsd.org Wed Feb 22 07:07: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 B75DDCE9937; Wed, 22 Feb 2017 07:07:46 +0000 (UTC) (envelope-from joel@vnode.se) Received: from smtp.opsify.se (smtp.opsify.se [IPv6:2a07:6c5::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.opsify.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB9D68B; Wed, 22 Feb 2017 07:07:46 +0000 (UTC) (envelope-from joel@vnode.se) Received: from ymer.vnode.se (62-20-154-136-no280.tbcn.telia.com [62.20.154.136]) by smtp.opsify.se (Postfix) with ESMTPSA id BAE16387826; Wed, 22 Feb 2017 08:07:34 +0100 (CET) Date: Wed, 22 Feb 2017 08:07:33 +0100 From: Joel Dahl To: Alexey Dokuchaev Cc: Eric Badger , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222070733.GA29010@ymer.vnode.se> Mail-Followup-To: Alexey Dokuchaev , Eric Badger , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170221144002.GA87822@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: Wed, 22 Feb 2017 07:07:46 -0000 On Tue, Feb 21, 2017 at 02:40:02PM +0000, Alexey Dokuchaev wrote: > On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: > > Thanks for working on making it easier to harden FreeBSD. While > > defaulting some of these options to "on" seem pretty harmless (e.g. > > random_pid), others are likely to cause confusion for new and > > experienced users alike (e.g. proc_debug. I've never used that option > > before, so I gave it a try. It simply causes gdb to hang when attempting > > to start a process, with no obvious indication of why). > > I concur. In fact, harmless knobs should probably be turned on by default > in FreeBSD itself (i.e., without any "hardening" help from the installer), > while more intrusive ones should be opt-in, not opt-out. I agree. Can we back this out and discuss it on current@? -- Joel From owner-svn-src-all@freebsd.org Wed Feb 22 07:12: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 9237DCE9B57; Wed, 22 Feb 2017 07:12: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 5E912AD1; Wed, 22 Feb 2017 07:12:21 +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 v1M7CKtl024733; Wed, 22 Feb 2017 07:12:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M7CKcq024732; Wed, 22 Feb 2017 07:12:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702220712.v1M7CKcq024732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Feb 2017 07:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314088 - 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: Wed, 22 Feb 2017 07:12:21 -0000 Author: mav Date: Wed Feb 22 07:12:20 2017 New Revision: 314088 URL: https://svnweb.freebsd.org/changeset/base/314088 Log: Slightly polish isp_dump_atpd(). MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Feb 22 07:07:05 2017 (r314087) +++ head/sys/dev/isp/isp_freebsd.c Wed Feb 22 07:12:20 2017 (r314088) @@ -1008,7 +1008,9 @@ isp_dump_atpd(ispsoftc_t *isp, int chan) ISP_GET_PC(isp, chan, atpool, atpool); for (atp = atpool; atp < &atpool[ATPDPSIZE]; atp++) { - isp_prt(isp, ISP_LOGALL, "Chan %d ATP [0x%x] origdlen %u bytes_xfrd %u lun %jx nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", + if (atp->state == ATPD_STATE_FREE) + continue; + isp_prt(isp, ISP_LOGALL, "Chan %d ATP [0x%x] origdlen %u bytes_xfrd %u lun %jx nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s", chan, atp->tag, atp->orig_datalen, atp->bytes_xfered, (uintmax_t)atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]); } } From owner-svn-src-all@freebsd.org Wed Feb 22 07:42: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 1940BCE9151; Wed, 22 Feb 2017 07:42:30 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9358166A; Wed, 22 Feb 2017 07:42:29 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M7gSE3036695; Wed, 22 Feb 2017 07:42:28 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M7gSMA036693; Wed, 22 Feb 2017 07:42:28 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220742.v1M7gSMA036693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 07:42:28 +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: r314089 - stable/11/sys/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: Wed, 22 Feb 2017 07:42:30 -0000 Author: dexuan Date: Wed Feb 22 07:42:28 2017 New Revision: 314089 URL: https://svnweb.freebsd.org/changeset/base/314089 Log: revert the MFC r314085 Sorry, I generated a wrong commit log for r314085 due to a copy&pasate mistake. Let me revert it and I'll redo the MFC. Modified: stable/11/sys/net/if.c stable/11/sys/net/if_var.h Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Wed Feb 22 07:12:20 2017 (r314088) +++ stable/11/sys/net/if.c Wed Feb 22 07:42:28 2017 (r314089) @@ -2218,7 +2218,6 @@ void if_down(struct ifnet *ifp) { - EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_DOWN); if_unroute(ifp, IFF_UP, AF_UNSPEC); } @@ -2231,7 +2230,6 @@ if_up(struct ifnet *ifp) { if_route(ifp, IFF_UP, AF_UNSPEC); - EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_UP); } /* Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Wed Feb 22 07:12:20 2017 (r314088) +++ stable/11/sys/net/if_var.h Wed Feb 22 07:42:28 2017 (r314089) @@ -359,11 +359,6 @@ EVENTHANDLER_DECLARE(ifnet_departure_eve /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); -/* Interface up/down event */ -#define IFNET_EVENT_UP 0 -#define IFNET_EVENT_DOWN 1 -typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); -EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); #endif /* _SYS_EVENTHANDLER_H_ */ /* From owner-svn-src-all@freebsd.org Wed Feb 22 07:49: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 3E818CE91EB for ; Wed, 22 Feb 2017 07:49:21 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com [209.85.213.50]) (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 F0E401818 for ; Wed, 22 Feb 2017 07:49:20 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-vk0-f50.google.com with SMTP id x75so1812728vke.2 for ; Tue, 21 Feb 2017 23:49:20 -0800 (PST) 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; bh=z3PT62BEgNI65+YkRxMO9CQ2TwDzx8EXc7lFMZmtN3w=; b=TAW6GGKyxIJM2tYkgerbVftHVXBPcWspWFeChK8Yt41tmADodxdkQVWL7dZyvgVT25 1mejpnsPxlKpyis+49kr9gBLp8CpjNWVZu+JI6y8i99eyw3x12hz44+FQgsxqsjEbnxZ 15pg5IzEtsIRWvx8Fu8qZQLb7n/PO6m4G7GCfeLYAiyYkeIU4drqth50eRv6RKTGz8s2 Wf1WLHA/Vqv1H9yRALiC+dY65woDD15PCN+tYz1nScrKIwm5nniFHbxfM/mn3gdvuWBy WeE14H01/ZP4HdZKY0Wwr0c08JxAF9s2184iSxZEuRONJh7wbY9XTCAEdJ6rNjU/587z YuAA== X-Gm-Message-State: AMke39lkng1oSqGj1J0tmbjw4CIXHpxl7N0Ms1lgf6nCW9EZwaVuekjP7u3EZkKoKKVp6Q== X-Received: by 10.31.140.208 with SMTP id o199mr14706641vkd.133.1487749754144; Tue, 21 Feb 2017 23:49:14 -0800 (PST) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com. [209.85.217.169]) by smtp.gmail.com with ESMTPSA id m62sm101837uam.17.2017.02.21.23.49.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 23:49:13 -0800 (PST) Received: by mail-ua0-f169.google.com with SMTP id 40so2076336uau.2 for ; Tue, 21 Feb 2017 23:49:12 -0800 (PST) X-Received: by 10.176.69.5 with SMTP id r5mr10238226uar.56.1487749752535; Tue, 21 Feb 2017 23:49:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.19.131 with HTTP; Tue, 21 Feb 2017 23:48:52 -0800 (PST) In-Reply-To: <20170222070733.GA29010@ymer.vnode.se> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> From: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= Date: Wed, 22 Feb 2017 07:48:52 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Alexey Dokuchaev , Eric Badger , Bartek Rutkowski , 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, 22 Feb 2017 07:49:21 -0000 On Wed, Feb 22, 2017 at 7:07 AM, Joel Dahl wrote: > On Tue, Feb 21, 2017 at 02:40:02PM +0000, Alexey Dokuchaev wrote: > > On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: > > > Thanks for working on making it easier to harden FreeBSD. While > > > defaulting some of these options to "on" seem pretty harmless (e.g. > > > random_pid), others are likely to cause confusion for new and > > > experienced users alike (e.g. proc_debug. I've never used that option > > > before, so I gave it a try. It simply causes gdb to hang when > attempting > > > to start a process, with no obvious indication of why). > > > > I concur. In fact, harmless knobs should probably be turned on by > default > > in FreeBSD itself (i.e., without any "hardening" help from the > installer), > > while more intrusive ones should be opt-in, not opt-out. > > I agree. Can we back this out and discuss it on current@? > With all due respect, I would rather not. The only reason is that it's been discussed so many times over the years and neither of the discussion ended up in anything improving the security of the OS and this is exactly why I took the action and started introducing the hardening options to the bsdinstall. Mind, you can always disable them, they won't be enabled in base OS for a while and this is the best way to assert wether they do have any negative impact. They've been around as OFF by default since 11.0-R and so far no one complained. Kind regards, Bartek Rutkowski From owner-svn-src-all@freebsd.org Wed Feb 22 07:53: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 EDC7CCE944E for ; Wed, 22 Feb 2017 07:53:12 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-ua0-f171.google.com (mail-ua0-f171.google.com [209.85.217.171]) (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 B086F1C4F for ; Wed, 22 Feb 2017 07:53:12 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-ua0-f171.google.com with SMTP id g30so171949uac.3 for ; Tue, 21 Feb 2017 23:53:12 -0800 (PST) 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=eAqBaoLHZ1mGDmUqB0Yf+wDCiU2DD6WvkFTVgVOegt0=; b=DMoiy1uhpZM3dNne/xG4qBPKcEzXRaluJaSTANfNROPj/0YvTqlBT8lRMhoecD5YFM qC1+X9ZaFP5GqVXdsP2ztJ0Oz24yr04SGsPS21M1jnDzhStvm8Pwh3PGTGBxS2tw77nO 7h9qEjnfBKC+NzEEWJqCszTMxNvy1JOTCpzRnPJ+fCBfGh3f2rL4nnjutaNfT/bvmYwN An2PonxaZVPiNzGsryHIG3ZNhRLoB8h7X8zpYs+W0AO+zL/U3d8LgANKCsrV2pAhf334 QuJ3Wck7nU9QDeGELCnBD0YQisqNPN7X+lhuFg/hJzAYVt9eSjLYKR2Ewo6JRhDbtuji ryJQ== X-Gm-Message-State: AMke39mOP+QwNWdsdxpeDLJmVoXQIq3zWT4twznk19jsGTn9Cy3z8ozZNcWwGmYxk4hZKw== X-Received: by 10.176.4.84 with SMTP id 78mr5552269uav.15.1487749986209; Tue, 21 Feb 2017 23:53:06 -0800 (PST) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com. [209.85.217.169]) by smtp.gmail.com with ESMTPSA id t62sm98707uat.33.2017.02.21.23.53.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 23:53:05 -0800 (PST) Received: by mail-ua0-f169.google.com with SMTP id 40so2120297uau.2 for ; Tue, 21 Feb 2017 23:53:05 -0800 (PST) X-Received: by 10.176.82.86 with SMTP id j22mr5162884uaa.126.1487749985470; Tue, 21 Feb 2017 23:53:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.19.131 with HTTP; Tue, 21 Feb 2017 23:52:45 -0800 (PST) In-Reply-To: <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> From: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= Date: Wed, 22 Feb 2017 07:52:45 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Eric Badger Cc: Bartek Rutkowski , 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, 22 Feb 2017 07:53:13 -0000 On Tue, Feb 21, 2017 at 2:34 PM, Eric Badger wrote: > On 02/21/2017 03:37 AM, Bartek Rutkowski wrote: > >> Author: robak (ports committer) >> Date: Tue Feb 21 09:37:33 2017 >> New Revision: 314036 >> URL: https://svnweb.freebsd.org/changeset/base/314036 >> >> Log: >> Enable bsdinstall hardening options by default. >> >> As discussed previously, in order to introduce new OS hardening >> defaults, we've added them to bsdinstall in 'off by default' mode. >> It has been there for a while, so the next step is to change them >> to 'on by defaul' mode, so that in future we could simply enable >> them in base OS. >> >> Reviewed by: brd >> Approved by: adrian >> Differential Revision: https://reviews.freebsd.org/D9641 >> >> Modified: >> head/usr.sbin/bsdinstall/scripts/hardening >> >> Modified: head/usr.sbin/bsdinstall/scripts/hardening >> ============================================================ >> ================== >> --- head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:33:21 >> 2017 (r314035) >> +++ head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:37:33 >> 2017 (r314036) >> @@ -36,15 +36,15 @@ FEATURES=$( dialog --backtitle "FreeBSD >> --title "System Hardening" --nocancel --separate-output \ >> --checklist "Choose system security hardening options:" \ >> 0 0 0 \ >> - "0 hide_uids" "Hide processes running as other users" >> ${hide_uids:-off} \ >> - "1 hide_gids" "Hide processes running as other groups" >> ${hide_gids:-off} \ >> - "2 read_msgbuf" "Disable reading kernel message buffer for >> unprivileged users" ${read_msgbuf:-off} \ >> - "3 proc_debug" "Disable process debugging facilities for >> unprivileged users" ${proc_debug:-off} \ >> - "4 random_pid" "Randomize the PID of newly created processes" >> ${random_pid:-off} \ >> - "5 stack_guard" "Insert stack guard page ahead of the growable >> segments" ${stack_guard:-off} \ >> - "6 clear_tmp" "Clean the /tmp filesystem on system startup" >> ${clear_tmp:-off} \ >> - "7 disable_syslogd" "Disable opening Syslogd network socket >> (disables remote logging)" ${disable_syslogd:-off} \ >> - "8 disable_sendmail" "Disable Sendmail service" >> ${disable_sendmail:-off} \ >> + "0 hide_uids" "Hide processes running as other users" >> ${hide_uids:-on} \ >> + "1 hide_gids" "Hide processes running as other groups" >> ${hide_gids:-on} \ >> + "2 read_msgbuf" "Disable reading kernel message buffer for >> unprivileged users" ${read_msgbuf:-on} \ >> + "3 proc_debug" "Disable process debugging facilities for >> unprivileged users" ${proc_debug:-on} \ >> + "4 random_pid" "Randomize the PID of newly created processes" >> ${random_pid:-on} \ >> + "5 stack_guard" "Insert stack guard page ahead of the growable >> segments" ${stack_guard:-on} \ >> + "6 clear_tmp" "Clean the /tmp filesystem on system startup" >> ${clear_tmp:-on} \ >> + "7 disable_syslogd" "Disable opening Syslogd network socket >> (disables remote logging)" ${disable_syslogd:-on} \ >> + "8 disable_sendmail" "Disable Sendmail service" >> ${disable_sendmail:-on} \ >> 2>&1 1>&3 ) >> exec 3>&- >> >> >> > Hi Bartek, > > Thanks for working on making it easier to harden FreeBSD. While defaulting > some of these options to "on" seem pretty harmless (e.g. random_pid), > others are likely to cause confusion for new and experienced users alike > (e.g. proc_debug. I've never used that option before, so I gave it a try. > It simply causes gdb to hang when attempting to start a process, with no > obvious indication of why). I think more discussion is merited before they > are turned on by default; personally I think they have potential to sour a > first impression of FreeBSD by making things people are used to doing on > other OSes hard. The audience of these changes is not someone like you, who's using gdb daily. The audience is the new users who often don't know what they're doing, why they're doing that and how to do differently, especially when it comes to the security. Power users in most cases don't use bsdinstall to install their systems, they use automation of some sort to fine tune the OS exactly to their needs and use case, and in their case this change is transparent and doesn't affect them. What it affects is the default FreeBSD installation and our poor track record of default installation security and great track record for not changing and improving things just becuase they've been like that for past decade. Kind regards, Bartek Rutkowski From owner-svn-src-all@freebsd.org Wed Feb 22 07:57: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 205D0CE94F4 for ; Wed, 22 Feb 2017 07:57:25 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) (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 D34001DF7 for ; Wed, 22 Feb 2017 07:57:24 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-vk0-f51.google.com with SMTP id t8so1879839vke.3 for ; Tue, 21 Feb 2017 23:57:24 -0800 (PST) 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=yolw5lcLdS6vr4ExtZAM3SP8T6t28RINiRIcMWMcKqE=; b=cGLoUzVRgARqzabCgkfmq/Nl2vm++oC7mhYSqPWf1ttsNE5n2ro3KVI2zVIaZRpjKX YrYtPXoNhe+QG6IBzOL59IvhaFJXRUa27YigVvv6N+LiwzyEPmvw85vryHu/jfpdr7PG 77qEhdRGgl14/RmCNGDlVRJtnaSGho7RLLvISjue73EkVeUtyM6hN4wsYXwRQWn6cNml qapOtyOih+1MhpdqZmhv6e0LlaTQdq+N+7K4Bw7pXEZQTcWYKvSt+ykwPsf7Aci4WBxO 19FRCyhhbG0yTBfYbchwj4tWvwMLQyx2cAqJ+JoWgCvTxfPmWNYAxoDXk2vOjJSEP2qr Q0Qw== X-Gm-Message-State: AMke39mk5fMs9OznbUQTI3KAV3wivgFd3lbWrpW3Jyw1fuw8xE7PdcWLXc/SMQ6+uVBRwA== X-Received: by 10.31.64.3 with SMTP id n3mr13869668vka.37.1487750238107; Tue, 21 Feb 2017 23:57:18 -0800 (PST) Received: from mail-ua0-f180.google.com (mail-ua0-f180.google.com. [209.85.217.180]) by smtp.gmail.com with ESMTPSA id l81sm96931vke.36.2017.02.21.23.57.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 23:57:13 -0800 (PST) Received: by mail-ua0-f180.google.com with SMTP id 40so2168021uau.2 for ; Tue, 21 Feb 2017 23:57:13 -0800 (PST) X-Received: by 10.176.69.5 with SMTP id r5mr10251047uar.56.1487750233216; Tue, 21 Feb 2017 23:57:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.19.131 with HTTP; Tue, 21 Feb 2017 23:56:52 -0800 (PST) In-Reply-To: <20170221144002.GA87822@FreeBSD.org> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> From: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= Date: Wed, 22 Feb 2017 07:56:52 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Alexey Dokuchaev Cc: Eric Badger , Bartek Rutkowski , 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, 22 Feb 2017 07:57:25 -0000 On Tue, Feb 21, 2017 at 2:40 PM, Alexey Dokuchaev wrote: > On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: > > Thanks for working on making it easier to harden FreeBSD. While > > defaulting some of these options to "on" seem pretty harmless (e.g. > > random_pid), others are likely to cause confusion for new and > > experienced users alike (e.g. proc_debug. I've never used that option > > before, so I gave it a try. It simply causes gdb to hang when attempting > > to start a process, with no obvious indication of why). > > I concur. In fact, harmless knobs should probably be turned on by default > in FreeBSD itself (i.e., without any "hardening" help from the installer), > while more intrusive ones should be opt-in, not opt-out. > > ./danfe > I strongly believe we should, by default, ship as secured and hardened as possible in order to improve overall security of new users installations. Power users will and do change the OS as they please, they most likely don't use bsdinstall in first place, so they're not affected in any way. These options have been around forever, used by a lot of users (once they got to know those even exist) and seem to cause no issues. However, despite that, and numerous discussions and mail threads over the years, we've struggled to enable them and, as you can se, we even struggle to present and make them available via installer. That's bad and I aim to change it :) Kind regards, Bartek Rutkowski From owner-svn-src-all@freebsd.org Wed Feb 22 08:02: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 03EC4CE9857; Wed, 22 Feb 2017 08:02:26 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5BE12E4; Wed, 22 Feb 2017 08:02:25 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M82OS7044781; Wed, 22 Feb 2017 08:02:24 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M82OLg044779; Wed, 22 Feb 2017 08:02:24 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220802.v1M82OLg044779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 08:02: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: r314090 - stable/11/sys/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: Wed, 22 Feb 2017 08:02:26 -0000 Author: dexuan Date: Wed Feb 22 08:02:24 2017 New Revision: 314090 URL: https://svnweb.freebsd.org/changeset/base/314090 Log: MFC: 312687, 312916 Approved by: sephe (mentor) r312687 ifnet: introduce event handlers for ifup/ifdown events Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together, mainly to support seamless live migration. When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite). So the synthetic NIC driver needs to know when a VF device is becoming UP or DOWN and hence the patch is made. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8963 r312916 ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h Thank glebius for pointing this out: "The network stuff shall not be added to sys/eventhandler.h" Reviewed by: David_A_Bright_DELL.com, sephe, glebius Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9345 Modified: stable/11/sys/net/if.c stable/11/sys/net/if_var.h Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Wed Feb 22 07:42:28 2017 (r314089) +++ stable/11/sys/net/if.c Wed Feb 22 08:02:24 2017 (r314090) @@ -2218,6 +2218,7 @@ void if_down(struct ifnet *ifp) { + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_DOWN); if_unroute(ifp, IFF_UP, AF_UNSPEC); } @@ -2230,6 +2231,7 @@ if_up(struct ifnet *ifp) { if_route(ifp, IFF_UP, AF_UNSPEC); + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_UP); } /* Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Wed Feb 22 07:42:28 2017 (r314089) +++ stable/11/sys/net/if_var.h Wed Feb 22 08:02:24 2017 (r314090) @@ -359,6 +359,11 @@ EVENTHANDLER_DECLARE(ifnet_departure_eve /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); +/* Interface up/down event */ +#define IFNET_EVENT_UP 0 +#define IFNET_EVENT_DOWN 1 +typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); +EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); #endif /* _SYS_EVENTHANDLER_H_ */ /* From owner-svn-src-all@freebsd.org Wed Feb 22 08:26: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 5A0EECE9C47; Wed, 22 Feb 2017 08:26:53 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26202EAF; Wed, 22 Feb 2017 08:26:53 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M8Qqn9052997; Wed, 22 Feb 2017 08:26:52 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M8QpS4052992; Wed, 22 Feb 2017 08:26:51 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220826.v1M8QpS4052992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 08:26:51 +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: r314091 - stable/11/sys/dev/hyperv/netvsc 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, 22 Feb 2017 08:26:53 -0000 Author: dexuan Date: Wed Feb 22 08:26:51 2017 New Revision: 314091 URL: https://svnweb.freebsd.org/changeset/base/314091 Log: MFC 312688 Approved by: sephe (mentor) r312688 hyperv/hn: add the support for VF drivers (SR-IOV) Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together (both NICs have the same MAC address), mainly to support seamless live migration. When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite). Note: multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface (if the VF is UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP). Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8964 Modified: stable/11/sys/dev/hyperv/netvsc/hn_nvs.c stable/11/sys/dev/hyperv/netvsc/hn_nvs.h stable/11/sys/dev/hyperv/netvsc/if_hn.c stable/11/sys/dev/hyperv/netvsc/if_hnreg.h stable/11/sys/dev/hyperv/netvsc/if_hnvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/hn_nvs.c Wed Feb 22 08:02:24 2017 (r314090) +++ stable/11/sys/dev/hyperv/netvsc/hn_nvs.c Wed Feb 22 08:26:51 2017 (r314091) @@ -500,6 +500,8 @@ hn_nvs_conf_ndis(struct hn_softc *sc, in conf.nvs_type = HN_NVS_TYPE_NDIS_CONF; conf.nvs_mtu = mtu; conf.nvs_caps = HN_NVS_NDIS_CONF_VLAN; + if (sc->hn_nvs_ver >= HN_NVS_VERSION_5) + conf.nvs_caps |= HN_NVS_NDIS_CONF_SRIOV; /* NOTE: No response. */ error = hn_nvs_req_send(sc, &conf, sizeof(conf)); @@ -719,3 +721,15 @@ hn_nvs_send_rndis_ctrl(struct vmbus_chan return hn_nvs_send_rndis_sglist(chan, HN_NVS_RNDIS_MTYPE_CTRL, sndc, gpa, gpa_cnt); } + +void +hn_nvs_set_datapath(struct hn_softc *sc, uint32_t path) +{ + struct hn_nvs_datapath dp; + + memset(&dp, 0, sizeof(dp)); + dp.nvs_type = HN_NVS_TYPE_SET_DATAPATH; + dp.nvs_active_path = path; + + hn_nvs_req_send(sc, &dp, sizeof(dp)); +} Modified: stable/11/sys/dev/hyperv/netvsc/hn_nvs.h ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/hn_nvs.h Wed Feb 22 08:02:24 2017 (r314090) +++ stable/11/sys/dev/hyperv/netvsc/hn_nvs.h Wed Feb 22 08:26:51 2017 (r314091) @@ -100,6 +100,7 @@ void hn_nvs_sent_xact(struct hn_nvs_sen int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan, struct hn_nvs_sendctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); +void hn_nvs_set_datapath(struct hn_softc *sc, uint32_t path); extern struct hn_nvs_sendctx hn_nvs_sendctx_none; Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 08:02:24 2017 (r314090) +++ stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 08:26:51 2017 (r314091) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -84,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -216,6 +218,11 @@ struct hn_rxinfo { uint32_t hash_value; }; +struct hn_update_vf { + struct hn_rx_ring *rxr; + struct ifnet *vf; +}; + #define HN_RXINFO_VLAN 0x0001 #define HN_RXINFO_CSUM 0x0002 #define HN_RXINFO_HASHINF 0x0004 @@ -295,7 +302,7 @@ static int hn_txagg_pktmax_sysctl(SYSC static int hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS); static int hn_polling_sysctl(SYSCTL_HANDLER_ARGS); -static void hn_stop(struct hn_softc *); +static void hn_stop(struct hn_softc *, bool); static void hn_init_locked(struct hn_softc *); static int hn_chan_attach(struct hn_softc *, struct vmbus_channel *); @@ -707,7 +714,8 @@ hn_rxfilter_config(struct hn_softc *sc) HN_LOCK_ASSERT(sc); - if (ifp->if_flags & IFF_PROMISC) { + if ((ifp->if_flags & IFF_PROMISC) || + (sc->hn_flags & HN_FLAG_VF)) { filter = NDIS_PACKET_TYPE_PROMISCUOUS; } else { filter = NDIS_PACKET_TYPE_DIRECTED; @@ -896,6 +904,119 @@ hn_ifmedia_sts(struct ifnet *ifp, struct ifmr->ifm_active |= IFM_10G_T | IFM_FDX; } +static void +hn_update_vf_task(void *arg, int pending __unused) +{ + struct hn_update_vf *uv = arg; + + uv->rxr->hn_vf = uv->vf; +} + +static void +hn_update_vf(struct hn_softc *sc, struct ifnet *vf) +{ + struct hn_rx_ring *rxr; + struct hn_update_vf uv; + struct task task; + int i; + + HN_LOCK_ASSERT(sc); + + TASK_INIT(&task, 0, hn_update_vf_task, &uv); + + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { + rxr = &sc->hn_rx_ring[i]; + + if (i < sc->hn_rx_ring_inuse) { + uv.rxr = rxr; + uv.vf = vf; + vmbus_chan_run_task(rxr->hn_chan, &task); + } else { + rxr->hn_vf = vf; + } + } +} + +static void +hn_set_vf(struct hn_softc *sc, struct ifnet *ifp, bool vf) +{ + struct ifnet *hn_ifp; + + HN_LOCK(sc); + + if (!(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED)) + goto out; + + hn_ifp = sc->hn_ifp; + + if (ifp == hn_ifp) + goto out; + + if (ifp->if_alloctype != IFT_ETHER) + goto out; + + /* Ignore lagg/vlan interfaces */ + if (strcmp(ifp->if_dname, "lagg") == 0 || + strcmp(ifp->if_dname, "vlan") == 0) + goto out; + + if (bcmp(IF_LLADDR(ifp), IF_LLADDR(hn_ifp), ETHER_ADDR_LEN) != 0) + goto out; + + /* Now we're sure 'ifp' is a real VF device. */ + if (vf) { + if (sc->hn_flags & HN_FLAG_VF) + goto out; + + sc->hn_flags |= HN_FLAG_VF; + hn_rxfilter_config(sc); + } else { + if (!(sc->hn_flags & HN_FLAG_VF)) + goto out; + + sc->hn_flags &= ~HN_FLAG_VF; + if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_rxfilter_config(sc); + else + hn_set_rxfilter(sc, NDIS_PACKET_TYPE_NONE); + } + + hn_nvs_set_datapath(sc, + vf ? HN_NVS_DATAPATH_VF : HN_NVS_DATAPATH_SYNTHETIC); + + hn_update_vf(sc, vf ? ifp : NULL); + + if (vf) { + hn_suspend_mgmt(sc); + sc->hn_link_flags &= + ~(HN_LINK_FLAG_LINKUP | HN_LINK_FLAG_NETCHG); + if_link_state_change(sc->hn_ifp, LINK_STATE_DOWN); + } else { + hn_resume_mgmt(sc); + } + + if (bootverbose) + if_printf(hn_ifp, "Data path is switched %s %s\n", + vf ? "to" : "from", if_name(ifp)); +out: + HN_UNLOCK(sc); +} + +static void +hn_ifnet_event(void *arg, struct ifnet *ifp, int event) +{ + if (event != IFNET_EVENT_UP && event != IFNET_EVENT_DOWN) + return; + + hn_set_vf(arg, ifp, event == IFNET_EVENT_UP); +} + +static void +hn_ifaddr_event(void *arg, struct ifnet *ifp) +{ + hn_set_vf(arg, ifp, ifp->if_flags & IFF_UP); +} + /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */ static const struct hyperv_guid g_net_vsc_device_type = { .hv_guid = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, @@ -1221,6 +1342,12 @@ hn_attach(device_t dev) sc->hn_mgmt_taskq = sc->hn_mgmt_taskq0; hn_update_link_status(sc); + sc->hn_ifnet_evthand = EVENTHANDLER_REGISTER(ifnet_event, + hn_ifnet_event, sc, EVENTHANDLER_PRI_ANY); + + sc->hn_ifaddr_evthand = EVENTHANDLER_REGISTER(ifaddr_event, + hn_ifaddr_event, sc, EVENTHANDLER_PRI_ANY); + return (0); failed: if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) @@ -1235,6 +1362,11 @@ hn_detach(device_t dev) struct hn_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->hn_ifp; + if (sc->hn_ifaddr_evthand != NULL) + EVENTHANDLER_DEREGISTER(ifaddr_event, sc->hn_ifaddr_evthand); + if (sc->hn_ifnet_evthand != NULL) + EVENTHANDLER_DEREGISTER(ifnet_event, sc->hn_ifnet_evthand); + if (sc->hn_xact != NULL && vmbus_chan_is_revoked(sc->hn_prichan)) { /* * In case that the vmbus missed the orphan handler @@ -1247,7 +1379,7 @@ hn_detach(device_t dev) HN_LOCK(sc); if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) - hn_stop(sc); + hn_stop(sc, true); /* * NOTE: * hn_stop() only suspends data, so managment @@ -2124,11 +2256,14 @@ static int hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int dlen, const struct hn_rxinfo *info) { - struct ifnet *ifp = rxr->hn_ifp; + struct ifnet *ifp; struct mbuf *m_new; int size, do_lro = 0, do_csum = 1; int hash_type; + /* If the VF is active, inject the packet through the VF */ + ifp = rxr->hn_vf ? rxr->hn_vf : rxr->hn_ifp; + if (dlen <= MHLEN) { m_new = m_gethdr(M_NOWAIT, MT_DATA); if (m_new == NULL) { @@ -2439,7 +2574,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) - hn_stop(sc); + hn_stop(sc, false); } sc->hn_if_flags = ifp->if_flags; @@ -2529,7 +2664,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, } static void -hn_stop(struct hn_softc *sc) +hn_stop(struct hn_softc *sc, bool detaching) { struct ifnet *ifp = sc->hn_ifp; int i; @@ -2550,6 +2685,13 @@ hn_stop(struct hn_softc *sc) atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); for (i = 0; i < sc->hn_tx_ring_inuse; ++i) sc->hn_tx_ring[i].hn_oactive = 0; + + /* + * If the VF is active, make sure the filter is not 0, even if + * the synthetic NIC is down. + */ + if (!detaching && (sc->hn_flags & HN_FLAG_VF)) + hn_rxfilter_config(sc); } static void @@ -4894,7 +5036,8 @@ hn_suspend(struct hn_softc *sc) /* Disable polling. */ hn_polling(sc, 0); - if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) || + (sc->hn_flags & HN_FLAG_VF)) hn_suspend_data(sc); hn_suspend_mgmt(sc); } @@ -4983,9 +5126,18 @@ static void hn_resume(struct hn_softc *sc) { - if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) || + (sc->hn_flags & HN_FLAG_VF)) hn_resume_data(sc); - hn_resume_mgmt(sc); + + /* + * When the VF is activated, the synthetic interface is changed + * to DOWN in hn_set_vf(). Here, if the VF is still active, we + * don't call hn_resume_mgmt() until the VF is deactivated in + * hn_set_vf(). + */ + if (!(sc->hn_flags & HN_FLAG_VF)) + hn_resume_mgmt(sc); /* * Re-enable polling if this interface is running and Modified: stable/11/sys/dev/hyperv/netvsc/if_hnreg.h ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hnreg.h Wed Feb 22 08:02:24 2017 (r314090) +++ stable/11/sys/dev/hyperv/netvsc/if_hnreg.h Wed Feb 22 08:26:51 2017 (r314091) @@ -133,6 +133,17 @@ struct hn_nvs_ndis_init { } __packed; CTASSERT(sizeof(struct hn_nvs_ndis_init) >= HN_NVS_REQSIZE_MIN); +#define HN_NVS_DATAPATH_SYNTHETIC 0 +#define HN_NVS_DATAPATH_VF 1 + +/* No response */ +struct hn_nvs_datapath { + uint32_t nvs_type; /* HN_NVS_TYPE_SET_DATAPATH */ + uint32_t nvs_active_path;/* HN_NVS_DATAPATH_* */ + uint32_t nvs_rsvd[6]; +} __packed; +CTASSERT(sizeof(struct hn_nvs_datapath) >= HN_NVS_REQSIZE_MIN); + struct hn_nvs_rxbuf_conn { uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONN */ uint32_t nvs_gpadl; /* RXBUF vmbus GPADL */ Modified: stable/11/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hnvar.h Wed Feb 22 08:02:24 2017 (r314090) +++ stable/11/sys/dev/hyperv/netvsc/if_hnvar.h Wed Feb 22 08:26:51 2017 (r314091) @@ -59,6 +59,7 @@ struct hn_tx_ring; struct hn_rx_ring { struct ifnet *hn_ifp; + struct ifnet *hn_vf; /* SR-IOV VF */ struct hn_tx_ring *hn_txr; void *hn_pktbuf; int hn_pktbuf_len; @@ -234,6 +235,9 @@ struct hn_softc { int hn_rss_ind_size; uint32_t hn_rss_hash; /* NDIS_HASH_ */ struct ndis_rssprm_toeplitz hn_rss; + + eventhandler_tag hn_ifaddr_evthand; + eventhandler_tag hn_ifnet_evthand; }; #define HN_FLAG_RXBUF_CONNECTED 0x0001 @@ -244,6 +248,7 @@ struct hn_softc { #define HN_FLAG_NO_SLEEPING 0x0020 #define HN_FLAG_RXBUF_REF 0x0040 #define HN_FLAG_CHIM_REF 0x0080 +#define HN_FLAG_VF 0x0100 #define HN_FLAG_ERRORS (HN_FLAG_RXBUF_REF | HN_FLAG_CHIM_REF) From owner-svn-src-all@freebsd.org Wed Feb 22 08:32: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 45E86CE9D5D; Wed, 22 Feb 2017 08:32:10 +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 24F321305; Wed, 22 Feb 2017 08:32:10 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 690977EE1; Wed, 22 Feb 2017 08:32:09 +0000 (UTC) Date: Wed, 22 Feb 2017 08:32:09 +0000 From: Alexey Dokuchaev To: Bart??omiej Rutkowski Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Eric Badger , src-committers@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222083209.GA43001@FreeBSD.org> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Wed, 22 Feb 2017 08:32:10 -0000 On Wed, Feb 22, 2017 at 07:56:52AM +0000, Bart??omiej Rutkowski wrote: > These options have been around forever, used by a lot of users (once they > got to know those even exist) and seem to cause no issues. However, despite > that, and numerous discussions and mail threads over the years, we've > struggled to enable them I presume they were not enabled by default for some reasons? A quick summary of those reasons would be helpful. :-) > and, as you can se, we even struggle to present and make them available > via installer. The question was not about whether to make them available, it was about turning them all on by default. ./danfe From owner-svn-src-all@freebsd.org Wed Feb 22 08:37: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 18E89CE9EEA; Wed, 22 Feb 2017 08:37:53 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3FB7154E; Wed, 22 Feb 2017 08:37:52 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M8bpvT057254; Wed, 22 Feb 2017 08:37:51 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M8bp5J057253; Wed, 22 Feb 2017 08:37:51 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702220837.v1M8bp5J057253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Wed, 22 Feb 2017 08:37:51 +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: r314092 - stable/11/sys/dev/hyperv/netvsc 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, 22 Feb 2017 08:37:53 -0000 Author: dexuan Date: Wed Feb 22 08:37:51 2017 New Revision: 314092 URL: https://svnweb.freebsd.org/changeset/base/314092 Log: MFC 312689, 312690 Approved by: sephe (mentor) r312689 hyperv/hn: add a sysctl name for the VF interface This makes it easier for the userland script to find the releated VF interface. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9101 r312690 hyperv/hn: add devctl_notify for VF_UP/DOWN events Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9102 Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 08:26:51 2017 (r314091) +++ stable/11/sys/dev/hyperv/netvsc/if_hn.c Wed Feb 22 08:37:51 2017 (r314092) @@ -301,6 +301,7 @@ static int hn_txagg_pkts_sysctl(SYSCTL static int hn_txagg_pktmax_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS); static int hn_polling_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_vf_sysctl(SYSCTL_HANDLER_ARGS); static void hn_stop(struct hn_softc *, bool); static void hn_init_locked(struct hn_softc *); @@ -995,6 +996,9 @@ hn_set_vf(struct hn_softc *sc, struct if hn_resume_mgmt(sc); } + devctl_notify("HYPERV_NIC_VF", if_name(hn_ifp), + vf ? "VF_UP" : "VF_DOWN", NULL); + if (bootverbose) if_printf(hn_ifp, "Data path is switched %s %s\n", vf ? "to" : "from", if_name(ifp)); @@ -1254,6 +1258,9 @@ hn_attach(device_t dev) CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_polling_sysctl, "I", "Polling frequency: [100,1000000], 0 disable polling"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "vf", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_vf_sysctl, "A", "Virtual Function's name"); /* * Setup the ifmedia, which has been initialized earlier. @@ -3222,6 +3229,22 @@ hn_rss_hash_sysctl(SYSCTL_HANDLER_ARGS) } static int +hn_vf_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char vf_name[128]; + struct ifnet *vf; + + HN_LOCK(sc); + vf_name[0] = '\0'; + vf = sc->hn_rx_ring[0].hn_vf; + if (vf != NULL) + snprintf(vf_name, sizeof(vf_name), "%s", if_name(vf)); + HN_UNLOCK(sc); + return sysctl_handle_string(oidp, vf_name, sizeof(vf_name), req); +} + +static int hn_check_iplen(const struct mbuf *m, int hoff) { const struct ip *ip; From owner-svn-src-all@freebsd.org Wed Feb 22 08:49: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 C8CC4CE71C4; Wed, 22 Feb 2017 08:49:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93E0A1B21; Wed, 22 Feb 2017 08:49:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M8nqBJ061390; Wed, 22 Feb 2017 08:49:52 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M8nqB8061389; Wed, 22 Feb 2017 08:49:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201702220849.v1M8nqB8061389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Wed, 22 Feb 2017 08:49:52 +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: r314093 - stable/11/sys/dev/bxe 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, 22 Feb 2017 08:49:53 -0000 Author: royger Date: Wed Feb 22 08:49:52 2017 New Revision: 314093 URL: https://svnweb.freebsd.org/changeset/base/314093 Log: MFC r313771 bxe: enable usage with NetXtreme II BCM57840 2x20GbE chip Sponsored by: Citrix Systems R&D Modified: stable/11/sys/dev/bxe/bxe.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/bxe/bxe.c ============================================================================== --- stable/11/sys/dev/bxe/bxe.c Wed Feb 22 08:37:51 2017 (r314092) +++ stable/11/sys/dev/bxe/bxe.c Wed Feb 22 08:49:52 2017 (r314093) @@ -168,6 +168,12 @@ static struct bxe_device_type bxe_devs[] }, { BRCM_VENDORID, + CHIP_NUM_57840_2_20, + PCI_ANY_ID, PCI_ANY_ID, + "QLogic NetXtreme II BCM57840 2x20GbE" + }, + { + BRCM_VENDORID, CHIP_NUM_57840_MF, PCI_ANY_ID, PCI_ANY_ID, "QLogic NetXtreme II BCM57840 MF 10GbE" From owner-svn-src-all@freebsd.org Wed Feb 22 09:17: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 130ADCE7F26 for ; Wed, 22 Feb 2017 09:17:44 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-vk0-f45.google.com (mail-vk0-f45.google.com [209.85.213.45]) (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 D31D1D0E for ; Wed, 22 Feb 2017 09:17:43 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-vk0-f45.google.com with SMTP id t8so2788978vke.3 for ; Wed, 22 Feb 2017 01:17:43 -0800 (PST) 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=SfWPDD4M9VBHaY0eU6Hl16vmo96f1WeDDHUYIEMmzmw=; b=pO5N3vzkLqmtFeNji8FzhWrYUmU4lSz4u/55CCFfnta1zBzOn2n4RHf1PjhdMNkbB4 +GTqU3OW9K7PMbApkU8Y7OH4LUMiiyuAfthCMCqrtLh7QPrYabmpjHKVySM0lmUWS7xN 3nKejA4MSLSmh9k4D4Eyy1Qq0Q1Zms/a9HPdOCUbesenFPdduYJmS55YxECe7BgJ4JyS tHyFIfRvTr3SWz6AU9iRSDQ22oo6Un5rG1v7iDz28shMX2vFwtPgUW7Oe2tgrujqJqys axCR58cxeiuFJg6JHhgG07agztHXvOuu+JtogrJncuH7e2OkSpkgSugwj8TsH/h5pOfZ UXVw== X-Gm-Message-State: AMke39nFM+Mu4d6j+uF2EGIMGS6up7MAaKbWZx6W1XJCnixzy4trpn38B2Czeez/qxZ8BA== X-Received: by 10.31.7.67 with SMTP id 64mr1254315vkh.137.1487755056919; Wed, 22 Feb 2017 01:17:36 -0800 (PST) Received: from mail-ua0-f173.google.com (mail-ua0-f173.google.com. [209.85.217.173]) by smtp.gmail.com with ESMTPSA id s125sm127866vkh.40.2017.02.22.01.17.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 01:17:31 -0800 (PST) Received: by mail-ua0-f173.google.com with SMTP id h65so3200874uah.0 for ; Wed, 22 Feb 2017 01:17:30 -0800 (PST) X-Received: by 10.176.68.65 with SMTP id m59mr16585268uam.85.1487755050681; Wed, 22 Feb 2017 01:17:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.19.131 with HTTP; Wed, 22 Feb 2017 01:17:10 -0800 (PST) In-Reply-To: <20170222083209.GA43001@FreeBSD.org> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222083209.GA43001@FreeBSD.org> From: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= Date: Wed, 22 Feb 2017 09:17:10 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Alexey Dokuchaev Cc: "Bart??omiej Rutkowski" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Eric Badger , src-committers@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, 22 Feb 2017 09:17:44 -0000 On Wed, Feb 22, 2017 at 8:32 AM, Alexey Dokuchaev wrote: > On Wed, Feb 22, 2017 at 07:56:52AM +0000, Bart??omiej Rutkowski wrote: > > These options have been around forever, used by a lot of users (once they > > got to know those even exist) and seem to cause no issues. However, > despite > > that, and numerous discussions and mail threads over the years, we've > > struggled to enable them > > I presume they were not enabled by default for some reasons? A quick > summary of those reasons would be helpful. :-) > The main reason was lack of consensus, and the reasons for the lack of is were usually along the lines of 'we dont know if it is safe', 'we dont know if it is fast', 'we dont know if it works', 'it breaks my ps -ax when I dont see all the processes', 'it breaks POLA when users suddenly see random PIDs', so on and so forth. And years have been passing with world moving on with improvements and us stalling behind. > > > and, as you can se, we even struggle to present and make them available > > via installer. > > The question was not about whether to make them available, it was about > turning them all on by default. > It is only 'turning them all on by default' if you are using bsdinstall and you don't disable them, if you don't want them. They are not ON in any other scenario. Yet, but we will get there :) Kind regards, Bartek Rutkowski From owner-svn-src-all@freebsd.org Wed Feb 22 09:22: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 25505CE829E; Wed, 22 Feb 2017 09:22:19 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7FC11329; Wed, 22 Feb 2017 09:22:18 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1M9MIa6077283; Wed, 22 Feb 2017 09:22:18 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M9MIeT077282; Wed, 22 Feb 2017 09:22:18 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201702220922.v1M9MIeT077282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Wed, 22 Feb 2017 09:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314094 - head/sys/dev/xen/timer X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 09:22:19 -0000 Author: royger Date: Wed Feb 22 09:22:17 2017 New Revision: 314094 URL: https://svnweb.freebsd.org/changeset/base/314094 Log: xen/timer: mark the Xen PV timer as not safe for suspension Note that the timer itself fully supports suspension, but due to the lack of ordering during the resume process FreeBSD cannot guarantee that the timer is resumed before any device attempts to use it. Submitted by: Liuyingdong Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D9639 Modified: head/sys/dev/xen/timer/timer.c Modified: head/sys/dev/xen/timer/timer.c ============================================================================== --- head/sys/dev/xen/timer/timer.c Wed Feb 22 08:49:52 2017 (r314093) +++ head/sys/dev/xen/timer/timer.c Wed Feb 22 09:22:17 2017 (r314094) @@ -417,8 +417,20 @@ xentimer_attach(device_t dev) /* Register the timecounter. */ sc->tc.tc_name = "XENTIMER"; sc->tc.tc_quality = XENTIMER_QUALITY; - sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE; /* + * FIXME: due to the lack of ordering during resume, FreeBSD cannot + * guarantee that the Xen PV timer is resumed before any other device + * attempts to make use of it, so mark it as not safe for suspension + * (ie: remove the TC_FLAGS_SUSPEND_SAFE flag). + * + * NB: This was not a problem in previous FreeBSD versions because the + * timer was directly attached to the nexus, but it is an issue now + * that the timer is attached to the xenpv bus, and thus resumed + * later. + * + * sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE; + */ + /* * The underlying resolution is in nanoseconds, since the timer info * scales TSC frequencies using a fraction that represents time in * terms of nanoseconds. From owner-svn-src-all@freebsd.org Wed Feb 22 09:23: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 70028CE8326; Wed, 22 Feb 2017 09:23:40 +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 1EAA11529; Wed, 22 Feb 2017 09:23:39 +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 4D1531FE086; Wed, 22 Feb 2017 10:23:29 +0100 (CET) Subject: Re: svn commit: r314043 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi To: Adrian Chadd References: <201702211323.v1LDNrJw087417@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <4ffe93f6-f08a-070c-918d-c0dad443aa1f@selasky.org> Date: Wed, 22 Feb 2017 10:22:54 +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: Content-Type: multipart/mixed; boundary="------------82C3837B9CA671DC6CB3822A" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 09:23:40 -0000 This is a multi-part message in MIME format. --------------82C3837B9CA671DC6CB3822A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 02/22/17 00:18, Adrian Chadd wrote: > Hiya, > > My understanding of tasklets is that they run on the CPU that they > were scheduled on, rather than there being a single tasklet thread? > > Is that the direction you're thinking of heading in, or? > Hi Adrian, The plan is to use grouptaskqueue in the end. From what I can see all the pieces are in place for that. Then the tasklets will run on the same CPU that they were scheduled on. Some patches needs to go into the grouptaskqueue first: 1) grouptaskqueue needs to support LinuxKPI module unload. There is current missing/unimplemented drain logic in grouptaskqueue APIs. 2) Needs to expose internal gtaskqueues, so that we don't create unneccesary threads to handle a single IRQ, which is the case currently. I've already CC'ed a few people on this, but not action yet. If you can help, would be great. BTW: TASKQGROUP_DECLARE(net); in sys/gtaskqueue.h seems non-existing and should be removed. --HPS --------------82C3837B9CA671DC6CB3822A Content-Type: text/x-patch; name="qgroup_if_io_tqg.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qgroup_if_io_tqg.diff" commit 0211693a723ce87f184d950d5a3ac5c2b306d418 Author: Matt Macy Date: Wed Aug 10 18:20:58 2016 -0700 make per-cpu grouptaskqueue threads globally visible diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c index 2d655bd..3aecff3 100644 --- a/sys/kern/subr_gtaskqueue.c +++ b/sys/kern/subr_gtaskqueue.c @@ -52,6 +52,7 @@ static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues"); static void gtaskqueue_thread_enqueue(void *); static void gtaskqueue_thread_loop(void *arg); +TASKQGROUP_DEFINE(softirq, mp_ncpus, 1); struct gtaskqueue_busy { struct gtask *tb_running; diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 5938aca..7cb00c8 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$"); #include #endif - /* * enable accounting of every mbuf as it comes in to and goes out of iflib's software descriptor references */ @@ -480,7 +479,6 @@ MODULE_VERSION(iflib, 1); MODULE_DEPEND(iflib, pci, 1, 1, 1); MODULE_DEPEND(iflib, ether, 1, 1, 1); -TASKQGROUP_DEFINE(if_io_tqg, mp_ncpus, 1); TASKQGROUP_DEFINE(if_config_tqg, 1, 1); #ifndef IFLIB_DEBUG_COUNTERS @@ -3706,7 +3704,7 @@ iflib_device_deregister(if_ctx_t ctx) if (ctx->ifc_led_dev != NULL) led_destroy(ctx->ifc_led_dev); /* XXX drain any dependent tasks */ - tqg = qgroup_if_io_tqg; + tqg = qgroup_softirq; for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { callout_drain(&txq->ift_timer); callout_drain(&txq->ift_db_check); @@ -4328,7 +4326,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, q = &ctx->ifc_txqs[qid]; info = &ctx->ifc_txqs[qid].ift_filter_info; gtask = &ctx->ifc_txqs[qid].ift_task; - tqg = qgroup_if_io_tqg; + tqg = qgroup_softirq; tqrid = irq->ii_rid; fn = _task_fn_tx; break; @@ -4336,7 +4334,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, q = &ctx->ifc_rxqs[qid]; info = &ctx->ifc_rxqs[qid].ifr_filter_info; gtask = &ctx->ifc_rxqs[qid].ifr_task; - tqg = qgroup_if_io_tqg; + tqg = qgroup_softirq; tqrid = irq->ii_rid; fn = _task_fn_rx; break; @@ -4384,13 +4382,13 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, int rid, iflib_intr_type_t type, void case IFLIB_INTR_TX: q = &ctx->ifc_txqs[qid]; gtask = &ctx->ifc_txqs[qid].ift_task; - tqg = qgroup_if_io_tqg; + tqg = qgroup_softirq; fn = _task_fn_tx; break; case IFLIB_INTR_RX: q = &ctx->ifc_rxqs[qid]; gtask = &ctx->ifc_rxqs[qid].ifr_task; - tqg = qgroup_if_io_tqg; + tqg = qgroup_softirq; fn = _task_fn_rx; break; case IFLIB_INTR_ADMIN: @@ -4441,7 +4439,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * q = &ctx->ifc_rxqs[0]; info = &rxq[0].ifr_filter_info; gtask = &rxq[0].ifr_task; - tqg = qgroup_if_io_tqg; + tqg = qgroup_softirq; tqrid = irq->ii_rid = *rid; fn = _task_fn_rx; @@ -4457,7 +4455,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * taskqgroup_attach(tqg, gtask, q, tqrid, name); GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq); - taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, tqrid, "tx"); + taskqgroup_attach(qgroup_softirq, &txq->ift_task, txq, tqrid, "tx"); GROUPTASK_INIT(&ctx->ifc_admin_task, 0, _task_fn_admin, ctx); taskqgroup_attach(qgroup_if_config_tqg, &ctx->ifc_admin_task, ctx, -1, "admin/link"); @@ -4504,7 +4502,7 @@ void iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name) { - taskqgroup_attach_cpu(qgroup_if_io_tqg, gt, uniq, cpu, -1, name); + taskqgroup_attach_cpu(qgroup_softirq, gt, uniq, cpu, -1, name); } void diff --git a/sys/sys/gtaskqueue.h b/sys/sys/gtaskqueue.h index 88d4b54..cd0f774 100644 --- a/sys/sys/gtaskqueue.h +++ b/sys/sys/gtaskqueue.h @@ -121,5 +121,6 @@ SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \ struct __hack #endif TASKQGROUP_DECLARE(net); +TASKQGROUP_DECLARE(softirq); #endif /* !_SYS_GTASKQUEUE_H_ */ --------------82C3837B9CA671DC6CB3822A-- From owner-svn-src-all@freebsd.org Wed Feb 22 09:33: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 1552ACE8644; Wed, 22 Feb 2017 09:33: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 E31791BB8; Wed, 22 Feb 2017 09:33: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 v1M9Xp6k081575; Wed, 22 Feb 2017 09:33:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M9Xocs081573; Wed, 22 Feb 2017 09:33:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702220933.v1M9Xocs081573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 22 Feb 2017 09:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314095 - vendor/mdocml/dist 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: Wed, 22 Feb 2017 09:33:52 -0000 Author: bapt Date: Wed Feb 22 09:33:50 2017 New Revision: 314095 URL: https://svnweb.freebsd.org/changeset/base/314095 Log: Import mandoc 1.14.1 Modified: vendor/mdocml/dist/LICENSE vendor/mdocml/dist/NEWS Modified: vendor/mdocml/dist/LICENSE ============================================================================== --- vendor/mdocml/dist/LICENSE Wed Feb 22 09:22:17 2017 (r314094) +++ vendor/mdocml/dist/LICENSE Wed Feb 22 09:33:50 2017 (r314095) @@ -5,7 +5,7 @@ contained in the mdocml toolkit is prote of the following developers: Copyright (c) 2008-2012, 2014 Kristaps Dzonsons -Copyright (c) 2010-2016 Ingo Schwarze +Copyright (c) 2010-2017 Ingo Schwarze Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger Copyright (c) 2013 Franco Fichtner Copyright (c) 2014 Baptiste Daroussin Modified: vendor/mdocml/dist/NEWS ============================================================================== --- vendor/mdocml/dist/NEWS Wed Feb 22 09:22:17 2017 (r314094) +++ vendor/mdocml/dist/NEWS Wed Feb 22 09:33:50 2017 (r314095) @@ -2,7 +2,7 @@ $Id: NEWS,v 1.20 2017/02/16 14:38:12 sch This file lists the most important changes in the mdocml.bsd.lv distribution. -Changes in version 1.14.1, released on February XXX, 2017 +Changes in version 1.14.1, released on February 21, 2017 --- MAJOR NEW FEATURES --- * apropos(1): Reimplement complete semantic search functionality @@ -95,28 +95,32 @@ Changes in version 1.14.1, released on F easier to use and reducing the amount of code by a few hundred lines. --- THANKS TO --- * Michael Stapelberg (Debian) for designing the new mandocd(8) - and parts of the new catman(8), and for a number of patches - and bug reports. + and parts of the new catman(8), for release testing, and for a + number of patches and bug reports. * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8) implementation and suggesting an algorithmic improvement which more than doubled performance, and for a few bug reports. * Ed Maste (FreeBSD) for an important patch improving reproducibility of builds in makewhatis(8), and for a few bug reports. - * Theo Buehler (OpenBSD) for more than ten important bug reports, + * Theo Buehler (OpenBSD) for almost twenty important bug reports, most of them found by systematic afl(1) fuzzing. * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov for crucial help in getting .Bl -tag CSS formatting fixed. * Svyatoslav Mishyn (Crux Linux) for an initial version of the - patch to autodetect a suitable locale for -Tutf8 mode. + patch to autodetect a suitable locale for -Tutf8 mode + and for release testing. * Jason McIntyre (OpenBSD) for multiple useful discussions and a number of bug reports. + * Sevan Janiyan (NetBSD) for extensive release testing and multiple + bug reports. + * Thomas Klausner and Christos Zoulas (NetBSD), Yuri Pankov (illumos), + and Leah Neukirchen (Void Linux) for release testing and bug reports. + * Ulrich Spoerlein (FreeBSD) for release testing. * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley, Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren, Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav - Upadhyay, Christos Zoulas, Kamil Rytarowski, Sevan Janiyan, - Thomas Klausner (NetBSD), Aaron M. Ucko, Bdale Garbee, Reiner - Herrmann, Shane Kerr (Debian), Leah Neukirchen (Void Linux), - Daniel Sabogal (Alpine Linux), Yuri Pankov (illumos), + Upadhyay, Kamil Rytarowski (NetBSD), Aaron M. Ucko, Bdale Garbee, + Reiner Herrmann, Shane Kerr (Debian), Daniel Sabogal (Alpine Linux), Carsten Kunze (Heirloom roff), Kristaps Dzonsons (bsd.lv), Anton Lindqvist, Jan Stary, Jeremy A. Mates, Mark Patruck, Pavan Maddamsetti, Sean Levy , and From owner-svn-src-all@freebsd.org Wed Feb 22 09:39: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 C5B40CE871F; Wed, 22 Feb 2017 09:39:16 +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 6FC1A1D8A; Wed, 22 Feb 2017 09:39:16 +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 v1M9dFCO081818; Wed, 22 Feb 2017 09:39:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1M9dFro081812; Wed, 22 Feb 2017 09:39:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702220939.v1M9dFro081812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 22 Feb 2017 09:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314096 - vendor/mdocml/1.4.1 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: Wed, 22 Feb 2017 09:39:16 -0000 Author: bapt Date: Wed Feb 22 09:39:15 2017 New Revision: 314096 URL: https://svnweb.freebsd.org/changeset/base/314096 Log: Tag import of mandoc 1.4.1 Added: vendor/mdocml/1.4.1/ - copied from r313954, vendor/mdocml/dist/ vendor/mdocml/1.4.1/catman.8 - copied unchanged from r313956, vendor/mdocml/dist/catman.8 vendor/mdocml/1.4.1/catman.c - copied unchanged from r313956, vendor/mdocml/dist/catman.c vendor/mdocml/1.4.1/man.options.1 - copied unchanged from r313956, vendor/mdocml/dist/man.options.1 vendor/mdocml/1.4.1/mandocd.8 - copied unchanged from r313956, vendor/mdocml/dist/mandocd.8 vendor/mdocml/1.4.1/mandocd.c - copied unchanged from r313956, vendor/mdocml/dist/mandocd.c vendor/mdocml/1.4.1/test-O_DIRECTORY.c - copied unchanged from r313956, vendor/mdocml/dist/test-O_DIRECTORY.c vendor/mdocml/1.4.1/test-cmsg.c - copied unchanged from r313956, vendor/mdocml/dist/test-cmsg.c vendor/mdocml/1.4.1/test-recvmsg.c - copied unchanged from r313956, vendor/mdocml/dist/test-recvmsg.c Replaced: vendor/mdocml/1.4.1/INSTALL - copied unchanged from r313956, vendor/mdocml/dist/INSTALL vendor/mdocml/1.4.1/LICENSE - copied unchanged from r314095, vendor/mdocml/dist/LICENSE vendor/mdocml/1.4.1/Makefile - copied unchanged from r313956, vendor/mdocml/dist/Makefile vendor/mdocml/1.4.1/Makefile.depend - copied unchanged from r313956, vendor/mdocml/dist/Makefile.depend vendor/mdocml/1.4.1/NEWS - copied unchanged from r314095, vendor/mdocml/dist/NEWS vendor/mdocml/1.4.1/TODO - copied unchanged from r313956, vendor/mdocml/dist/TODO vendor/mdocml/1.4.1/apropos.1 - copied unchanged from r313956, vendor/mdocml/dist/apropos.1 vendor/mdocml/1.4.1/cgi.c - copied unchanged from r313956, vendor/mdocml/dist/cgi.c vendor/mdocml/1.4.1/chars.c - copied unchanged from r313956, vendor/mdocml/dist/chars.c vendor/mdocml/1.4.1/compat_fts.c - copied unchanged from r313956, vendor/mdocml/dist/compat_fts.c vendor/mdocml/1.4.1/configure - copied unchanged from r313956, vendor/mdocml/dist/configure vendor/mdocml/1.4.1/configure.local.example - copied unchanged from r313956, vendor/mdocml/dist/configure.local.example vendor/mdocml/1.4.1/dba.c - copied unchanged from r313956, vendor/mdocml/dist/dba.c vendor/mdocml/1.4.1/dbm_map.c - copied unchanged from r313956, vendor/mdocml/dist/dbm_map.c vendor/mdocml/1.4.1/eqn_term.c - copied unchanged from r313956, vendor/mdocml/dist/eqn_term.c vendor/mdocml/1.4.1/gmdiff - copied unchanged from r313956, vendor/mdocml/dist/gmdiff vendor/mdocml/1.4.1/html.c - copied unchanged from r313956, vendor/mdocml/dist/html.c vendor/mdocml/1.4.1/html.h - copied unchanged from r313956, vendor/mdocml/dist/html.h vendor/mdocml/1.4.1/libmandoc.h - copied unchanged from r313956, vendor/mdocml/dist/libmandoc.h vendor/mdocml/1.4.1/libmdoc.h - copied unchanged from r313956, vendor/mdocml/dist/libmdoc.h vendor/mdocml/1.4.1/main.c - copied unchanged from r313956, vendor/mdocml/dist/main.c vendor/mdocml/1.4.1/man.1 - copied unchanged from r313956, vendor/mdocml/dist/man.1 vendor/mdocml/1.4.1/man_html.c - copied unchanged from r313956, vendor/mdocml/dist/man_html.c vendor/mdocml/1.4.1/man_term.c - copied unchanged from r313956, vendor/mdocml/dist/man_term.c vendor/mdocml/1.4.1/manconf.h - copied unchanged from r313956, vendor/mdocml/dist/manconf.h vendor/mdocml/1.4.1/mandoc.1 - copied unchanged from r313956, vendor/mdocml/dist/mandoc.1 vendor/mdocml/1.4.1/mandoc.css - copied unchanged from r313956, vendor/mdocml/dist/mandoc.css vendor/mdocml/1.4.1/mandoc.h - copied unchanged from r313956, vendor/mdocml/dist/mandoc.h vendor/mdocml/1.4.1/mandoc_aux.h - copied unchanged from r313956, vendor/mdocml/dist/mandoc_aux.h vendor/mdocml/1.4.1/mandoc_char.7 - copied unchanged from r313956, vendor/mdocml/dist/mandoc_char.7 vendor/mdocml/1.4.1/mandoc_html.3 - copied unchanged from r313956, vendor/mdocml/dist/mandoc_html.3 vendor/mdocml/1.4.1/mandocdb.c - copied unchanged from r313956, vendor/mdocml/dist/mandocdb.c vendor/mdocml/1.4.1/manpath.c - copied unchanged from r313956, vendor/mdocml/dist/manpath.c vendor/mdocml/1.4.1/mdoc.7 - copied unchanged from r313956, vendor/mdocml/dist/mdoc.7 vendor/mdocml/1.4.1/mdoc.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc.c vendor/mdocml/1.4.1/mdoc_html.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_html.c vendor/mdocml/1.4.1/mdoc_macro.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/1.4.1/mdoc_man.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_man.c vendor/mdocml/1.4.1/mdoc_term.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_term.c vendor/mdocml/1.4.1/mdoc_validate.c - copied unchanged from r313956, vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/1.4.1/preconv.c - copied unchanged from r313956, vendor/mdocml/dist/preconv.c vendor/mdocml/1.4.1/read.c - copied unchanged from r313956, vendor/mdocml/dist/read.c vendor/mdocml/1.4.1/roff.c - copied unchanged from r313956, vendor/mdocml/dist/roff.c vendor/mdocml/1.4.1/roff.h - copied unchanged from r313956, vendor/mdocml/dist/roff.h vendor/mdocml/1.4.1/tag.c - copied unchanged from r313956, vendor/mdocml/dist/tag.c vendor/mdocml/1.4.1/tbl_html.c - copied unchanged from r313956, vendor/mdocml/dist/tbl_html.c vendor/mdocml/1.4.1/term_ps.c - copied unchanged from r313956, vendor/mdocml/dist/term_ps.c vendor/mdocml/1.4.1/tree.c - copied unchanged from r313956, vendor/mdocml/dist/tree.c Copied: vendor/mdocml/1.4.1/INSTALL (from r313956, vendor/mdocml/dist/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1/INSTALL Wed Feb 22 09:39:15 2017 (r314096, copy of r313956, vendor/mdocml/dist/INSTALL) @@ -0,0 +1,157 @@ +$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ + +About mdocml, the portable mandoc distribution +---------------------------------------------- +The mandoc manpage compiler toolset is a suite of tools compiling +mdoc(7), the roff(7) macro language of choice for BSD manual pages, +and man(7), the predominant historical language for UNIX manuals. +It includes a man(1) manual viewer and additional tools. +For general information, see . + +In case you have questions or want to provide feedback, read +. Consider subscribing to the +discuss@ mailing list mentioned on that page. If you intend to +help with the development of mandoc, consider subscribing to the +tech@ mailing list, too. + +Enjoy using the mandoc toolset! + +Ingo Schwarze, Karlsruhe, February 2017 + + +Installation +------------ +Before manually installing mandoc on your system, please check +whether the newest version of mandoc is already installed by default +or available via a binary package or a ports system. A list of the +latest bundled and ported versions of mandoc for various operating +systems is maintained at . + +Regarding how packages and ports are maintained for your operating +system, please consult your operating system documentation. +To install mandoc manually, the following steps are needed: + +1. If you want to build the CGI program, man.cgi(8), too, +run the command "echo BUILD_CGI=1 >> configure.local". +Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. + +2. If you also want to build the new catman(8) utility, run the +command "echo BUILD_CATMAN=1 >> configure.local". Note that it +is unlikely to be a drop-in replacement providing the same +functionality as your system's "catman", if your operating +system contains one. + +3. Define MANPATH_DEFAULT in configure.local +if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate +for your operating system. + +4. Run "./configure". +This script attempts autoconfiguration of mandoc for your system. +Read both its standard output and the file "Makefile.local" it +generates. If anything looks wrong or different from what you +wish, read the file "configure.local.example", create and edit +a file "configure.local", and re-run "./configure" until the +result seems right to you. +On Solaris 10 and earlier, you may have to run "ksh ./configure" +because the native /bin/sh lacks some POSIX features. + +5. Run "make". +Any POSIX-compatible make, in particular both BSD make and GNU make, +should work. If the build fails, look at "configure.local.example" +and go back to step 2. + +6. Run "make -n install" and check whether everything will be +installed to the intended places. Otherwise, put some *DIR or *NM* +variables into "configure.local" and go back to step 4. + +7. Optionally run the regression suite. +Basically, that amounts to "cd regress && ./regress.pl". +But you should probably look at "./mandoc -l regress/regress.pl.1" +first. + +8. Run "sudo make install". If you intend to build a binary +package using some kind of fake root mechanism, you may need a +command like "make DESTDIR=... install". Read the *-install targets +in the "Makefile" to understand how DESTDIR is used. + +9. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 6. Whenever installing +new manual pages, re-run makewhatis(8) to update the databases, or +apropos(1) will not find the new pages. + +10. To set up a man.cgi(8) server, read its manual page. + +Note that some man(7) pages may contain low-level roff(7) markup +that mandoc does not yet understand. On some BSD systems using +mandoc, third-party software is vetted on whether it may be formatted +with mandoc. If not, groff(1) is pulled in as a dependency and +used to install a pre-formatted "catpage" instead of directly as +manual page source. + + +Understanding mandoc dependencies +--------------------------------- +The following libraries are required: + +1. zlib for decompressing gzipped manual pages. + +2. The fts(3) directory traversion functions. +If your system does not have them, the bundled compatibility version +will be used, so you need not worry in that case. But be careful: old +glibc versions of fts(3) were known to be broken on 32bit platforms, +see . +That was presumably fixed in glibc-2.23. +If you run into that problem, set "HAVE_FTS=0" in configure.local. + +3. Marc Espie's ohash(3) library. +If your system does not have it, the bundled compatibility version +will be used, so you probably need not worry about it. + +One of the chief design goals of the mandoc toolbox is to make +sure that nothing related to documentation requires C++. +Consequently, linking mandoc against any kind of C++ program +would defeat the purpose and is not supported. + + +Checking autoconfiguration quality +---------------------------------- +If you want to check whether automatic configuration works well +on your platform, consider the following: + +The mandoc package intentionally does not use GNU autoconf because +we consider that toolset a blatant example of overengineering that +is obsolete nowadays, since all modern operating systems are now +reasonably close to POSIX and do not need arcane shell magic any +longer. If your system does need such magic, consider upgrading +to reasonably modern POSIX-compliant tools rather than asking for +autoconf-style workarounds. + +As far as mandoc is using any features not mandated by ANSI X3.159-1989 +("ANSI C") or IEEE Std 1003.1-2008 ("POSIX") that some modern systems +do not have, we intend to provide autoconfiguration tests and +compat_*.c implementations. Please report any that turn out to be +missing. Note that while we do strive to produce portable code, +we do not slavishly restrict ourselves to POSIX-only interfaces. +For improved security and readability, we do use well-designed, +modern interfaces like reallocarray(3) even if they are still rather +uncommon, of course bundling compat_*.c implementations as needed. + +Where mandoc is using ANSI C or POSIX features that some systems +still lack and that compat_*.c implementations can be provided for +without too much hassle, we will consider adding them, too, so +please report whatever is missing on your platform. + +The following steps can be used to manually check the automatic +configuration on your platform: + +1. Run "make distclean". + +2. Run "./configure" + +3. Read the file "config.log". It shows the compiler commands used +to test the libraries installed on your system and the standard +output and standard error output these commands produce. Watch out +for unexpected failures. Those are most likely to happen if headers +or libraries are installed in unusual places or interfaces defined +in unusual headers. You can also look at the file "config.h" and +check that no "#define HAVE_*" differ from your expectations. Copied: vendor/mdocml/1.4.1/LICENSE (from r314095, vendor/mdocml/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1/LICENSE Wed Feb 22 09:39:15 2017 (r314096, copy of r314095, vendor/mdocml/dist/LICENSE) @@ -0,0 +1,54 @@ +$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $ + +With the exceptions noted below, all code and documentation +contained in the mdocml toolkit is protected by the Copyright +of the following developers: + +Copyright (c) 2008-2012, 2014 Kristaps Dzonsons +Copyright (c) 2010-2017 Ingo Schwarze +Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger +Copyright (c) 2013 Franco Fichtner +Copyright (c) 2014 Baptiste Daroussin +Copyright (c) 2016 Ed Maste +Copyright (c) 2017 Michael Stapelberg +Copyright (c) 1999, 2004 Marc Espie +Copyright (c) 1998, 2004, 2010 Todd C. Miller +Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2004 Ted Unangst +Copyright (c) 1994 Christos Zoulas +Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre + +See the individual source files for information about who contributed +to which file during which years. + + +The mdocml distribution as a whole is distributed by its developers +under the following license: + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +The following files included from outside sources are protected by +other people's Copyright and are distributed under various 2-clause +and 3-clause BSD licenses; see these individual files for details. + +soelim.c, soelim.1: +Copyright (c) 2014 Baptiste Daroussin + +compat_err.c, compat_fts.c, compat_fts.h, +compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, +man.1: +Copyright (c) 1989,1990,1993,1994 The Regents of the University of California + +compat_stringlist.c, compat_stringlist.h: +Copyright (c) 1994 Christos Zoulas Copied: vendor/mdocml/1.4.1/Makefile (from r313956, vendor/mdocml/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1/Makefile Wed Feb 22 09:39:15 2017 (r314096, copy of r313956, vendor/mdocml/dist/Makefile) @@ -0,0 +1,580 @@ +# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $ +# +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# Copyright (c) 2011, 2013-2017 Ingo Schwarze +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +VERSION = 1.14.1 + +# === LIST OF FILES ==================================================== + +TESTSRCS = test-be32toh.c \ + test-cmsg.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ + test-err.c \ + test-fts.c \ + test-getline.c \ + test-getsubopt.c \ + test-isblank.c \ + test-mkdtemp.c \ + test-nanosleep.c \ + test-ntohl.c \ + test-O_DIRECTORY.c \ + test-ohash.c \ + test-PATH_MAX.c \ + test-pledge.c \ + test-progname.c \ + test-recvmsg.c \ + test-reallocarray.c \ + test-rewb-bsd.c \ + test-rewb-sysv.c \ + test-sandbox_init.c \ + test-strcasestr.c \ + test-stringlist.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-vasprintf.c \ + test-wchar.c + +SRCS = att.c \ + catman.c \ + cgi.c \ + chars.c \ + compat_err.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ + compat_isblank.c \ + compat_mkdtemp.c \ + compat_ohash.c \ + compat_progname.c \ + compat_reallocarray.c \ + compat_strcasestr.c \ + compat_stringlist.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strsep.c \ + compat_strtonum.c \ + compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_hash.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandoc_ohash.c \ + mandocd.c \ + mandocdb.c \ + manpage.c \ + manpath.c \ + mansearch.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_hash.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_state.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + soelim.c \ + st.c \ + tag.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + tree.c + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + catman.8 \ + cgi.h.example \ + compat_fts.h \ + compat_ohash.h \ + compat_stringlist.h \ + configure \ + configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ + demandoc.1 \ + eqn.7 \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + libroff.h \ + main.h \ + makewhatis.8 \ + man.1 \ + man.7 \ + man.cgi.3 \ + man.cgi.8 \ + man.conf.5 \ + man.h \ + man.options.1 \ + manconf.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.css \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + mandoc_ohash.h \ + mandocd.8 \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + roff.h \ + roff_int.h \ + soelim.1 \ + st.in \ + tag.h \ + tbl.3 \ + tbl.7 \ + term.h \ + $(SRCS) \ + $(TESTSRCS) + +LIBMAN_OBJS = man.o \ + man_hash.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_hash.o \ + mdoc_macro.o \ + mdoc_state.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + mandoc_ohash.o \ + msec.o \ + preconv.o \ + read.o + +COMPAT_OBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ + compat_isblank.o \ + compat_mkdtemp.o \ + compat_ohash.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_strcasestr.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strsep.o \ + compat_strtonum.o \ + compat_vasprintf.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + tbl_html.o + +MANDOC_MAN_OBJS = mdoc_man.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + tbl_term.o + +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ + main.o \ + manpath.o \ + out.o \ + tag.o \ + tree.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ + cgi.o \ + out.o + +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + +MANPAGE_OBJS = $(DBM_OBJS) \ + manpage.o \ + manpath.o + +DEMANDOC_OBJS = demandoc.o + +SOELIM_OBJS = soelim.o \ + compat_err.o \ + compat_getline.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_stringlist.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + mandoc.1.html \ + soelim.1.html \ + man.cgi.3.html \ + mandoc.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + man.conf.5.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mandocd.8.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + catman.8.html \ + makewhatis.8.html \ + man.cgi.8.html \ + man.h.html \ + manconf.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + mansearch.h.html \ + mdoc.h.html \ + roff.h.html + +WWW_OBJS = mdocml.tar.gz \ + mdocml.sha256 + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_OBJS) $(WWW_MANS) + +$(WWW_MANS): mandoc + +.PHONY: base-install cgi-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) + rm -f mandoc $(MAIN_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman $(MANDOCD_OBJS) + rm -f manpage $(MANPAGE_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f soelim $(SOELIM_OBJS) + rm -f $(WWW_MANS) $(WWW_OBJS) + rm -rf *.dSYM + +base-install: mandoc demandoc soelim + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + $(LN) $(DESTDIR)$(BINDIR)/mandoc \ + $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + $(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \ + $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) + +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) + @echo "$@ is out of date; please run ./configure" + @exit 1 + +libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) + +manpage: $(MANPAGE_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD) + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) + +soelim: $(SOELIM_OBJS) + $(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS) + +# --- maintainer targets --- + +www-install: www + mkdir -p $(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + +dist: mdocml.sha256 + +mdocml.sha256: mdocml.tar.gz + sha256 mdocml.tar.gz > $@ + +mdocml.tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true + mkdir -p .dist/mdocml-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + cp -pR regress .dist/mdocml-$(VERSION) + find .dist/mdocml-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf + chmod 755 .dist/mdocml-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) + rm -rf .dist/ + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc + ./mandoc -Thtml -Wall,stop \ + -Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@ Copied: vendor/mdocml/1.4.1/Makefile.depend (from r313956, vendor/mdocml/dist/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1/Makefile.depend Wed Feb 22 09:39:15 2017 (r314096, copy of r313956, vendor/mdocml/dist/Makefile.depend) @@ -0,0 +1,74 @@ +att.o: att.c config.h roff.h mdoc.h libmdoc.h +catman.o: catman.c config.h compat_fts.h +cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h +chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h +compat_err.o: compat_err.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h +compat_getline.o: compat_getline.c config.h +compat_getsubopt.o: compat_getsubopt.c config.h +compat_isblank.o: compat_isblank.c config.h +compat_mkdtemp.o: compat_mkdtemp.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h +compat_progname.o: compat_progname.c config.h +compat_reallocarray.o: compat_reallocarray.c config.h +compat_strcasestr.o: compat_strcasestr.c config.h +compat_stringlist.o: compat_stringlist.c config.h compat_stringlist.h +compat_strlcat.o: compat_strlcat.c config.h +compat_strlcpy.o: compat_strlcpy.c config.h +compat_strsep.o: compat_strsep.c config.h +compat_strtonum.o: compat_strtonum.c config.h +compat_vasprintf.o: compat_vasprintf.c config.h +dba.o: dba.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mansearch.h dba_write.h dba_array.h dba.h +dba_array.o: dba_array.c mandoc_aux.h dba_write.h dba_array.h +dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_array.h dba.h dbm.h +dba_write.o: dba_write.c config.h dba_write.h +dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h +dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h +demandoc.o: demandoc.c config.h roff.h man.h mdoc.h mandoc.h +eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h +eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h +html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h manconf.h main.h +lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in +main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h +man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h +man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h +man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h +man_validate.o: man_validate.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h +mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h +mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h +mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h +mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h +mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h +manpage.o: manpage.c config.h manconf.h mansearch.h +manpath.o: manpath.c config.h mandoc_aux.h manconf.h +mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h +mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h +mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h +mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h +mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h +mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +out.o: out.c config.h mandoc_aux.h mandoc.h out.h +preconv.o: preconv.c config.h mandoc.h libmandoc.h +read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff_int.h +roff.o: roff.c config.h mandoc.h mandoc_aux.h roff.h libmandoc.h roff_int.h libroff.h predefs.in +soelim.o: soelim.c config.h compat_stringlist.h +st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in +tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h +tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h +tbl_layout.o: tbl_layout.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h +tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h +term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h manconf.h main.h +term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h manconf.h main.h +tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h main.h Copied: vendor/mdocml/1.4.1/NEWS (from r314095, vendor/mdocml/dist/NEWS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/1.4.1/NEWS Wed Feb 22 09:39:15 2017 (r314096, copy of r314095, vendor/mdocml/dist/NEWS) @@ -0,0 +1,892 @@ +$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $ + +This file lists the most important changes in the mdocml.bsd.lv distribution. + +Changes in version 1.14.1, released on February 21, 2017 + + --- MAJOR NEW FEATURES --- + * apropos(1): Reimplement complete semantic search functionality + without the dependency on SQLite3, using only POSIX APIs. + This comes with a completely new mandoc.db(5) file format. + * man(1): Support more than one tag entry for the same search term, + plus some minor improvements to the less(1) :t support. + * -Thtml: Use real macro names for CSS classes. + Systematic cleanup of and many improvements to mandoc.css. + * -Thtml: Produce human readable HTML code by using indentation + and better line breaks. Improve various HTML elements, + and trim several useless ones. + * New catman(8) utility, still somewhat experimental. + * Now includes a portable version of the OpenBSD mandoc regression + suite, see regress/regress.pl.1 for details. + --- REMOVED FUNCTIONALITY --- + * Operating systems that don't provide mmap(3) are no longer supported. + * Drop support for manpath(1). Even if your system has manpath(1), + it is simpler to use MANPATH_DEFAULT in configure.local for + operating system defaults, man.conf(5) for machine-specific + modifications, and ${MANPATH}, -m, and -M for user preferences + than to bother with the complexity of manpath(1). + * makewhatis(8) -p: No longer warn about missing MLINKS since these + are no longer needed for anything. + --- MINOR NEW FEATURES --- + * mdoc(7): Warn about invalid punctuation and content below NAME. + * mdoc(7): Warn about .Xr lacking the second argument (section). + * mdoc(7): Warn about violations of the rule "new sentence, new line". + * roff(7): Warn about trailing whitespace at the end of comments. + * mdoc(7): Improve rendering of double quotes. + * mdoc(7): Always do text production in the validator, never in the + formatters. Cleaner, simpler, shorter, helps NetBSD apropos(1) + and also makes -Ttree output more useful. + * -Ttree: Show metadata and some additional node flags. + New -Onoval output option to show the unvalidated tree. + --- RELIABILITY BUGFIXES --- + * man(1): Make "man -l" work with standard input from a pipe or file, + as long as standard output is a terminal. + * man(7): Fix out of bounds read access if a text node immediately + preceded the first .SH header. + * mdoc(7): Fix out of bounds read access for .Bl without a type + but with a width. + * mdoc(7): Fix out of bounds read access for .Bl -column starting + with a tab character instead of a child .It macro. + * mdoc(7): Fix syntax tree corruption leading to segfaults caused + by stray block end macros in nested blocks of mismatching type. + * man(1): Fix NULL dereference when the first of multiple pages + shown was preformatted. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by partial implicit macros inside .Bl -column table cells. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + for macro sequences like .Bl .Bl .It Bo .El .It. + * mdoc(7): Fix syntax tree corruption leading to NULL dereference + caused by .Ta following a nested .Bl -column breaking another block. + * mdoc(7): Fix syntax tree corruption sometimes leading to NULL + dereference caused by indirectly broken .Nd or .Nm blocks. + * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns. + * mdoc(7): Fix NULL dereference in some specific cases of a + block-end macro calling another block-end macro. + * mdoc(7): Fix NULL dereference if the only child of the head + of the first .Sh was an empty in-line macro. + * eqn(7): Fix NULL dereference in the terminal formatter + for empty matrices and empty square roots. + * mdoc(7): Fix an assertion failure for a .Bd without a type that + breaks another block. + * mdoc(7): Fix an assertion failure that happened for some .Bl -column + lists containing a column width of "-4n", "-3n", or "-2n". + * mdoc(7): Fix an assertion failure caused by .Bl -column without .It + but containing eqn(7) or tbl(7) code. + * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf. + * roff(7): Fix an assertion failures caused by whitespace inside \o'' + (overstrike) sequences. + * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of + excessive length. + --- PORTABILITY IMPROVEMENTS --- + * man(1): Do not mix stdio narrow and wide stream orientation + on stdout, which could cause output corruption on glibc. + * mandoc(1): Autodetect a suitable locale for -Tutf8 mode. + * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined. + * ./configure: Autodetect if nanosleep(3) needs -lrt. + * ./configure: Provide an ${LN} configuration variable. + * ./configure: Put compiler arguments that may contain -l at the end. + --- MINOR BUGFIXES --- + * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro. + * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags. + * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode. + * mandoc(1): Error out on invalid output options on the command line. + --- STRUCTURAL CHANGES, no functional change --- + * Redesign part of the mandoc_html(3) interfaces, making them much + easier to use and reducing the amount of code by a few hundred lines. + --- THANKS TO --- + * Michael Stapelberg (Debian) for designing the new mandocd(8) + and parts of the new catman(8), for release testing, and for a + number of patches and bug reports. + * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8) + implementation and suggesting an algorithmic improvement which + more than doubled performance, and for a few bug reports. + * Ed Maste (FreeBSD) for an important patch improving reproducibility + of builds in makewhatis(8), and for a few bug reports. + * Theo Buehler (OpenBSD) for almost twenty important bug reports, + most of them found by systematic afl(1) fuzzing. + * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov + for crucial help in getting .Bl -tag CSS formatting fixed. + * Svyatoslav Mishyn (Crux Linux) for an initial version of the + patch to autodetect a suitable locale for -Tutf8 mode + and for release testing. + * Jason McIntyre (OpenBSD) for multiple useful discussions + and a number of bug reports. + * Sevan Janiyan (NetBSD) for extensive release testing and multiple + bug reports. + * Thomas Klausner and Christos Zoulas (NetBSD), Yuri Pankov (illumos), + and Leah Neukirchen (Void Linux) for release testing and bug reports. + * Ulrich Spoerlein (FreeBSD) for release testing. + * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley, + Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 22 09:41: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 04436CE8948; Wed, 22 Feb 2017 09:41:23 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (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 8C6211F70; Wed, 22 Feb 2017 09:41:22 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wr0-x22f.google.com with SMTP id 97so4211235wrb.0; Wed, 22 Feb 2017 01:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vDGuxZ/42iQklRzsw2r2N0M1Hr1qPY2jBdiHgvN9+FU=; b=R/OlYnJUVllnaqm+rrdC76IO5YDleHniXEK6DmhAprRL5jqc4vZwsasBTN/TvzXeiF J0sCLIn0pgdIzOKSVbI60V/Ygn21jv2nKQ0npKFrwd6fS/6Cty+vwnvnooPne8gEqGiN DUdhTvmyn52c3Ry4+ThlJ2ubqxIcBACvOADLMtZbudANZErxSUKljyjMShR7b1g1GLIr 70k5BkXpRyUv6mCPCfZFHnWOTjxkeowsDR7bCw32spbXZiF+KUpJKhMb1vuUPbmtQXDa ID+NL0UV8WAndkJR0a6Q6SdbLKvtZHatbNHW51BERSEH3jVSGOv6KlNZ3PBM1JOagTWc 8ZFA== 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:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vDGuxZ/42iQklRzsw2r2N0M1Hr1qPY2jBdiHgvN9+FU=; b=m7wa92gl0kFMbhCmfeSB6Btx7jZjNMT3+TB3hOfsgbt5RQy5ugaqEA7E9jKawNE2RW xgh5f8TyLC1sCedA9iPOweNFRBYZ/hQ7JpBMn0qw1vtl9komnAdCt5wtz2QEMwgOQH5z zOX3eU4cMJizdugiMPHvJnmgfPxrGhMcsls6IQ718FiqdJCu0hF9nMmCMfIOt++r4NyL QcpfGWvA3JZT8UMXAupqXUXK+0BEzkS+3aD5gn/kEf+QXLjYDQ+SY2CXcr2KbuCFI3Qz qdgptbeIFTA7TqGYYR7zUVHs02cYyCJyV7Uq8e0PnHDPOekjLuR7rBSo9NOqrRa5RfKF LtIA== X-Gm-Message-State: AMke39krlVIbKmDKGy6Yg7LtLgHMn1pkuo8Oo7f2ES2SnHgICxMHTV+D6ZvUSmSouosnBw== X-Received: by 10.223.173.148 with SMTP id w20mr21843668wrc.164.1487756480660; Wed, 22 Feb 2017 01:41:20 -0800 (PST) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id w126sm2032038wmw.0.2017.02.22.01.41.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 01:41:20 -0800 (PST) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Wed, 22 Feb 2017 09:41:05 +0000 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314094 - head/sys/dev/xen/timer Message-ID: <20170222094105.dwenmniefksrek3i@dhcp-3-221.uk.xensource.com> References: <201702220922.v1M9MIeT077282@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201702220922.v1M9MIeT077282@repo.freebsd.org> User-Agent: NeoMutt/20170206 (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, 22 Feb 2017 09:41:23 -0000 On Wed, Feb 22, 2017 at 09:22:18AM +0000, Roger Pau Monné wrote: > Author: royger > Date: Wed Feb 22 09:22:17 2017 > New Revision: 314094 > URL: https://svnweb.freebsd.org/changeset/base/314094 > > Log: > xen/timer: mark the Xen PV timer as not safe for suspension > > Note that the timer itself fully supports suspension, but due to the lack of > ordering during the resume process FreeBSD cannot guarantee that the timer is > resumed before any device attempts to use it. > > Submitted by: Liuyingdong > Reviewed by: royger > Differential Revision: https://reviews.freebsd.org/D9639 Forgot to add: MFC after: 1 week Roger. From owner-svn-src-all@freebsd.org Wed Feb 22 09:46: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 14FE8CE8A1D; Wed, 22 Feb 2017 09:46:03 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BAC32402; Wed, 22 Feb 2017 09:46:02 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 7D39585C8; Wed, 22 Feb 2017 09:46:01 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 393632F7C; Wed, 22 Feb 2017 10:44:28 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Ngie Cooper \(yaneurabeya\)" Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, ngie@FreeBSD.org Subject: Re: svn commit: r313975 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... References: <201702200056.v1K0ulYr085497@repo.freebsd.org> <5910d260-a26f-5f99-ee80-22fb2078bda8@FreeBSD.org> <86wpcjy82u.fsf@desk.des.no> Date: Wed, 22 Feb 2017 10:44:28 +0100 In-Reply-To: (Ngie Cooper's message of "Tue, 21 Feb 2017 10:57:26 -0800") Message-ID: <861suqy2yr.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 09:46:03 -0000 "Ngie Cooper (yaneurabeya)" writes: > I figured that you had good reasons for doing this after some of the > discussion we had off-list about testing in general, but I=E2=80=99ll see= what > I can do to bring back coverage in lib/libpam. It has nothing to do with my opinion of Kyua. OpenPAM's unit tests now use cryb.to's test framework, which I have no intention of importing into FreeBSD. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Wed Feb 22 10:21: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 89C6ECE8AC9; Wed, 22 Feb 2017 10:21:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 464D71DC3; Wed, 22 Feb 2017 10:21:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1MALe91001493; Wed, 22 Feb 2017 10:21:40 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MALdOg001474; Wed, 22 Feb 2017 10:21:39 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201702221021.v1MALdOg001474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 22 Feb 2017 10:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314097 - in head/sys: dev/bhnd/cores/chipc dev/fdt dev/nand geom modules/geom modules/geom/geom_flashmap powerpc/mikrotik 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, 22 Feb 2017 10:21:41 -0000 Author: marius Date: Wed Feb 22 10:21:39 2017 New Revision: 314097 URL: https://svnweb.freebsd.org/changeset/base/314097 Log: - Allow different slicers for different flash types to be registered with geom_flashmap(4) and teach it about MMC for slicing enhanced user data area partitions. The FDT slicer still is the default for CFI, NAND and SPI flash on FDT-enabled platforms. - In addition to a device_t, also pass the name of the GEOM provider in question to the slicers as a single device may provide more than provider. - Build a geom_flashmap.ko. - Use MODULE_VERSION() so other modules can depend on geom_flashmap(4). - Remove redundant/superfluous GEOM routines that either do nothing or provide/just call default GEOM (slice) functionality. - Trim/adjust includes Submitted by: jhibbits (RouterBoard bits) Reviewed by: jhibbits Added: head/sys/modules/geom/geom_flashmap/ head/sys/modules/geom/geom_flashmap/Makefile (contents, props changed) Modified: head/sys/dev/bhnd/cores/chipc/chipc_slicer.c head/sys/dev/bhnd/cores/chipc/chipc_slicer.h head/sys/dev/fdt/fdt_slicer.c head/sys/dev/nand/nfc_rb.c head/sys/geom/geom_flashmap.c head/sys/modules/geom/Makefile head/sys/powerpc/mikrotik/platform_rb.c head/sys/sys/slicer.h Modified: head/sys/dev/bhnd/cores/chipc/chipc_slicer.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc_slicer.c Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/dev/bhnd/cores/chipc/chipc_slicer.c Wed Feb 22 10:21:39 2017 (r314097) @@ -63,10 +63,12 @@ chipc_register_slicer(chipc_flash flash_ switch (flash_type) { case CHIPC_SFLASH_AT: case CHIPC_SFLASH_ST: - flash_register_slicer(chipc_slicer_spi); + flash_register_slicer(chipc_slicer_spi, FLASH_SLICES_TYPE_SPI, + TRUE); break; case CHIPC_PFLASH_CFI: - flash_register_slicer(chipc_slicer_cfi); + flash_register_slicer(chipc_slicer_cfi, FLASH_SLICES_TYPE_CFI, + TRUE); break; default: /* Unsupported */ @@ -75,7 +77,8 @@ chipc_register_slicer(chipc_flash flash_ } int -chipc_slicer_cfi(device_t dev, struct flash_slice *slices, int *nslices) +chipc_slicer_cfi(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *nslices) { struct cfi_softc *sc; device_t parent; @@ -100,7 +103,8 @@ chipc_slicer_cfi(device_t dev, struct fl } int -chipc_slicer_spi(device_t dev, struct flash_slice *slices, int *nslices) +chipc_slicer_spi(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *nslices) { struct chipc_spi_softc *sc; device_t chipc, spi, spibus; Modified: head/sys/dev/bhnd/cores/chipc/chipc_slicer.h ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc_slicer.h Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/dev/bhnd/cores/chipc/chipc_slicer.h Wed Feb 22 10:21:39 2017 (r314097) @@ -41,9 +41,9 @@ #define NVRAM_MAGIC 0x48534C46 void chipc_register_slicer(chipc_flash flash_type); -int chipc_slicer_spi(device_t dev, struct flash_slice *slices, - int *nslices); -int chipc_slicer_cfi(device_t dev, struct flash_slice *slices, - int *nslices); +int chipc_slicer_spi(device_t dev, const char *provider, + struct flash_slice *slices, int *nslices); +int chipc_slicer_cfi(device_t dev, const char *provider, + struct flash_slice *slices, int *nslices); #endif /* _BHND_CORES_CHIPC_CHIPC_SLICER_H_ */ Modified: head/sys/dev/fdt/fdt_slicer.c ============================================================================== --- head/sys/dev/fdt/fdt_slicer.c Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/dev/fdt/fdt_slicer.c Wed Feb 22 10:21:39 2017 (r314097) @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include +#include +#include #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ @@ -42,8 +43,13 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -int -fdt_flash_fill_slices(device_t dev, struct flash_slice *slices, int *slices_num) +static int fdt_flash_fill_slices(device_t dev, const char *provider, + struct flash_slice *slices, int *slices_num); +static void fdt_slicer_init(void); + +static int +fdt_flash_fill_slices(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *slices_num) { char *slice_name; phandle_t dt_node, dt_child; @@ -90,8 +96,8 @@ fdt_flash_fill_slices(device_t dev, stru (void **)&slice_name); if (name_len <= 0) { /* Use node name if no label defined */ - name_len = OF_getprop_alloc(dt_child, "name", sizeof(char), - (void **)&slice_name); + name_len = OF_getprop_alloc(dt_child, "name", + sizeof(char), (void **)&slice_name); if (name_len <= 0) { debugf("slice i=%d with no name\n", i); slice_name = NULL; @@ -110,3 +116,23 @@ fdt_flash_fill_slices(device_t dev, stru *slices_num = i; return (0); } + +static void +fdt_slicer_init(void) +{ + + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_NAND, + FALSE); + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_CFI, + FALSE); + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_SPI, + FALSE); +} + +/* + * Must be initialized after GEOM classes (SI_SUB_DRIVERS/SI_ORDER_FIRST), + * i. e. after g_init() is called, due to the use of the GEOM topology_lock + * in flash_register_slicer(). However, must be before SI_SUB_CONFIGURE. + */ +SYSINIT(fdt_slicer_rootconf, SI_SUB_DRIVERS, SI_ORDER_SECOND, fdt_slicer_init, + NULL); Modified: head/sys/dev/nand/nfc_rb.c ============================================================================== --- head/sys/dev/nand/nfc_rb.c Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/dev/nand/nfc_rb.c Wed Feb 22 10:21:39 2017 (r314097) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #include @@ -106,6 +109,40 @@ static const struct nand_ecc_data rb_ecc }; #endif +/* Slicer operates on the NAND controller, so we have to find the chip. */ +static int +rb_nand_slicer(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *nslices) +{ + struct nand_chip *chip; + device_t *children; + int n; + + if (device_get_children(dev, &children, &n) != 0) { + panic("Slicer called on controller with no child!"); + } + dev = children[0]; + free(children, M_TEMP); + + if (device_get_children(dev, &children, &n) != 0) { + panic("Slicer called on controller with nandbus but no child!"); + } + dev = children[0]; + free(children, M_TEMP); + + chip = device_get_softc(dev); + *nslices = 2; + slices[0].base = 0; + slices[0].size = 4 * 1024 * 1024; + slices[0].label = "boot"; + + slices[1].base = 4 * 1024 * 1024; + slices[1].size = chip->ndisk->d_mediasize - slices[0].size; + slices[1].label = "rootfs"; + + return (0); +} + static int rb_nand_probe(device_t dev) { @@ -175,6 +212,8 @@ rb_nand_attach(device_t dev) return (ENXIO); } + flash_register_slicer(rb_nand_slicer, FLASH_SLICES_TYPE_NAND, TRUE); + nand_init(&sc->nand_dev, dev, NAND_ECC_SOFT, 0, 0, NULL, NULL); err = nandbus_create(dev); Modified: head/sys/geom/geom_flashmap.c ============================================================================== --- head/sys/geom/geom_flashmap.c Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/geom/geom_flashmap.c Wed Feb 22 10:21:39 2017 (r314097) @@ -29,13 +29,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -43,9 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include -#define FLASHMAP_CLASS_NAME "Flashmap" +#define FLASHMAP_CLASS_NAME "Flashmap" struct g_flashmap_slice { off_t sl_start; @@ -57,21 +54,24 @@ struct g_flashmap_slice { STAILQ_HEAD(g_flashmap_head, g_flashmap_slice); -static void g_flashmap_print(struct g_flashmap_slice *); -static int g_flashmap_modify(struct g_geom *, const char *, - int, struct g_flashmap_head *); -static int g_flashmap_start(struct bio *); -static int g_flashmap_ioctl(struct g_provider *, u_long, void *, - int, struct thread *); -static void g_flashmap_dumpconf(struct sbuf *, const char *, - struct g_geom *, struct g_consumer *, struct g_provider *); -static struct g_geom *g_flashmap_taste(struct g_class *, - struct g_provider *, int); -static void g_flashmap_config(struct gctl_req *, struct g_class *, - const char *); -static int g_flashmap_load(device_t, struct g_flashmap_head *); -static int (*flash_fill_slices)(device_t, struct flash_slice *, int *) = - fdt_flash_fill_slices; +static struct { + const char *type; + flash_slicer_t slicer; +} g_flashmap_slicers[] = { + { "NAND::device", NULL }, + { "CFI::device", NULL }, + { "SPI::device", NULL }, + { "MMC::device", NULL } +}; + +static g_ioctl_t g_flashmap_ioctl; +static g_taste_t g_flashmap_taste; + +static int g_flashmap_load(device_t dev, struct g_provider *pp, + flash_slicer_t slicer, struct g_flashmap_head *head); +static int g_flashmap_modify(struct g_geom *gp, const char *devname, + int secsize, struct g_flashmap_head *slices); +static void g_flashmap_print(struct g_flashmap_slice *slice); MALLOC_DECLARE(M_FLASHMAP); MALLOC_DEFINE(M_FLASHMAP, "geom_flashmap", "GEOM flash memory slicer class"); @@ -104,7 +104,7 @@ g_flashmap_modify(struct g_geom *gp, con error = g_slice_config(gp, i++, G_SLICE_CONFIG_CHECK, slice->sl_start, slice->sl_end - slice->sl_start + 1, - secsize, "%ss.%s", gp->name, slice->sl_name); + secsize, FLASH_SLICES_FMT, gp->name, slice->sl_name); if (error) return (error); @@ -125,23 +125,6 @@ g_flashmap_modify(struct g_geom *gp, con } static int -g_flashmap_start(struct bio *bp) -{ - - return (0); -} - -static void -g_flashmap_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_slicer *gsp; - - gsp = gp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); -} - -static int g_flashmap_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) { @@ -161,16 +144,16 @@ g_flashmap_ioctl(struct g_provider *pp, return (gp->ioctl(cp->provider, cmd, data, fflag, td)); } - static struct g_geom * g_flashmap_taste(struct g_class *mp, struct g_provider *pp, int flags) { - struct g_geom *gp = NULL; + struct g_geom *gp; struct g_consumer *cp; struct g_flashmap_head head; struct g_flashmap_slice *slice, *slice_temp; + flash_slicer_t slicer; device_t dev; - int nslices, size; + int i, size; g_trace(G_T_TOPOLOGY, "flashmap_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -179,27 +162,26 @@ g_flashmap_taste(struct g_class *mp, str strcmp(pp->geom->class->name, G_DISK_CLASS_NAME) != 0) return (NULL); - gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, - g_flashmap_start); + gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, NULL); if (gp == NULL) return (NULL); STAILQ_INIT(&head); do { - size = sizeof(device_t); - if (g_io_getattr("NAND::device", cp, &size, &dev)) { + slicer = NULL; + for (i = 0; i < nitems(g_flashmap_slicers); i++) { size = sizeof(device_t); - if (g_io_getattr("CFI::device", cp, &size, &dev)) { - size = sizeof(device_t); - if (g_io_getattr("SPI::device", cp, &size, - &dev)) - break; + if (g_io_getattr(g_flashmap_slicers[i].type, cp, + &size, &dev) == 0) { + slicer = g_flashmap_slicers[i].slicer; + break; } } + if (slicer == NULL) + break; - nslices = g_flashmap_load(dev, &head); - if (nslices == 0) + if (g_flashmap_load(dev, pp, slicer, &head) == 0) break; g_flashmap_modify(gp, cp->provider->name, @@ -208,9 +190,8 @@ g_flashmap_taste(struct g_class *mp, str g_access(cp, -1, 0, 0); - STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) { + STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) free(slice, M_FLASHMAP); - } if (LIST_EMPTY(&gp->provider)) { g_slice_spoiled(cp); @@ -219,25 +200,17 @@ g_flashmap_taste(struct g_class *mp, str return (gp); } -static void -g_flashmap_config(struct gctl_req *req, struct g_class *mp, const char *verb) -{ - - gctl_error(req, "unknown config verb"); -} - static int -g_flashmap_load(device_t dev, struct g_flashmap_head *head) +g_flashmap_load(device_t dev, struct g_provider *pp, flash_slicer_t slicer, + struct g_flashmap_head *head) { struct flash_slice *slices; struct g_flashmap_slice *slice; - uint32_t i, buf_size; - int nslices = 0; + int i, nslices = 0; - buf_size = sizeof(struct flash_slice) * FLASH_SLICES_MAX_NUM; - slices = malloc(buf_size, M_FLASHMAP, M_WAITOK | M_ZERO); - if (flash_fill_slices && - flash_fill_slices(dev, slices, &nslices) == 0) { + slices = malloc(sizeof(struct flash_slice) * FLASH_SLICES_MAX_NUM, + M_FLASHMAP, M_WAITOK | M_ZERO); + if (slicer(dev, pp->name, slices, &nslices) == 0) { for (i = 0; i < nslices; i++) { slice = malloc(sizeof(struct g_flashmap_slice), M_FLASHMAP, M_WAITOK); @@ -254,19 +227,21 @@ g_flashmap_load(device_t dev, struct g_f return (nslices); } -void flash_register_slicer(int (*slicer)(device_t, struct flash_slice *, int *)) +void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force) { - flash_fill_slices = slicer; + g_topology_lock(); + if (g_flashmap_slicers[type].slicer == NULL || force == TRUE) + g_flashmap_slicers[type].slicer = slicer; + g_topology_unlock(); } static struct g_class g_flashmap_class = { .name = FLASHMAP_CLASS_NAME, .version = G_VERSION, .taste = g_flashmap_taste, - .dumpconf = g_flashmap_dumpconf, .ioctl = g_flashmap_ioctl, - .ctlreq = g_flashmap_config, }; DECLARE_GEOM_CLASS(g_flashmap_class, g_flashmap); +MODULE_VERSION(g_flashmap, 0); Modified: head/sys/modules/geom/Makefile ============================================================================== --- head/sys/modules/geom/Makefile Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/modules/geom/Makefile Wed Feb 22 10:21:39 2017 (r314097) @@ -7,6 +7,7 @@ SUBDIR= geom_bde \ geom_cache \ geom_concat \ geom_eli \ + geom_flashmap \ geom_gate \ geom_journal \ geom_label \ Added: head/sys/modules/geom/geom_flashmap/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/geom/geom_flashmap/Makefile Wed Feb 22 10:21:39 2017 (r314097) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../geom + +KMOD= geom_flashmap +SRCS= geom_flashmap.c + +.include Modified: head/sys/powerpc/mikrotik/platform_rb.c ============================================================================== --- head/sys/powerpc/mikrotik/platform_rb.c Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/powerpc/mikrotik/platform_rb.c Wed Feb 22 10:21:39 2017 (r314097) @@ -32,15 +32,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include #include -#include #include @@ -59,39 +56,6 @@ DEFINE_CLASS_1(rb, rb_platform, rb_metho PLATFORM_DEF(rb_platform); -/* Slicer operates on the NAND controller, so we have to find the chip. */ -static int -rb_nand_slicer(device_t dev, struct flash_slice *slices, int *nslices) -{ - struct nand_chip *chip; - device_t *children; - int n; - - if (device_get_children(dev, &children, &n) != 0) { - panic("Slicer called on controller with no child!"); - } - dev = children[0]; - free(children, M_TEMP); - - if (device_get_children(dev, &children, &n) != 0) { - panic("Slicer called on controller with nandbus but no child!"); - } - dev = children[0]; - free(children, M_TEMP); - - chip = device_get_softc(dev); - *nslices = 2; - slices[0].base = 0; - slices[0].size = 4 * 1024 * 1024; - slices[0].label = "boot"; - - slices[1].base = 4 * 1024 * 1024; - slices[1].size = chip->ndisk->d_mediasize - slices[0].size; - slices[1].label = "rootfs"; - - return (0); -} - static int rb_probe(platform_t plat) { @@ -117,7 +81,5 @@ rb_attach(platform_t plat) if (error) return (error); - flash_register_slicer(rb_nand_slicer); - return (0); } Modified: head/sys/sys/slicer.h ============================================================================== --- head/sys/sys/slicer.h Wed Feb 22 09:39:15 2017 (r314096) +++ head/sys/sys/slicer.h Wed Feb 22 10:21:39 2017 (r314097) @@ -27,26 +27,38 @@ */ #ifndef _FLASH_SLICER_H_ -#define _FLASH_SLICER_H_ +#define _FLASH_SLICER_H_ #include -#define FLASH_SLICES_MAX_NUM 8 -#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) +#define FLASH_SLICES_MAX_NUM 8 +#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) #define FLASH_SLICES_FLAG_NONE 0 #define FLASH_SLICES_FLAG_RO 1 /* Read only */ +#define FLASH_SLICES_FMT "%ss.%s" + struct flash_slice { off_t base; off_t size; - char *label; + const char *label; unsigned int flags; }; #ifdef _KERNEL -int fdt_flash_fill_slices(device_t, struct flash_slice *, int *) __weak_symbol; -void flash_register_slicer(int (*)(device_t, struct flash_slice *, int *)); + +typedef int (*flash_slicer_t)(device_t dev, const char *provider, + struct flash_slice *slices, int *slices_num); + +#define FLASH_SLICES_TYPE_NAND 0 +#define FLASH_SLICES_TYPE_CFI 1 +#define FLASH_SLICES_TYPE_SPI 2 +#define FLASH_SLICES_TYPE_MMC 3 + +/* Use NULL for deregistering a slicer */ +void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force); + #endif /* _KERNEL */ #endif /* _FLASH_SLICER_H_ */ From owner-svn-src-all@freebsd.org Wed Feb 22 11:23: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 DB9D1CE9EBB; Wed, 22 Feb 2017 11:23:38 +0000 (UTC) (envelope-from joel@vnode.se) Received: from smtp.opsify.se (smtp.opsify.se [185.137.191.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.opsify.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E995301; Wed, 22 Feb 2017 11:23:38 +0000 (UTC) (envelope-from joel@vnode.se) Received: from ymer.vnode.se (62-20-154-136-no280.tbcn.telia.com [62.20.154.136]) by smtp.opsify.se (Postfix) with ESMTPSA id 10891387234; Wed, 22 Feb 2017 12:23:36 +0100 (CET) Date: Wed, 22 Feb 2017 12:23:35 +0100 From: Joel Dahl To: =?utf-8?Q?Bart=C5=82omiej?= Rutkowski Cc: Alexey Dokuchaev , Eric Badger , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222112335.GA29481@ymer.vnode.se> Mail-Followup-To: =?utf-8?Q?Bart=C5=82omiej?= Rutkowski , Alexey Dokuchaev , Eric Badger , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: Wed, 22 Feb 2017 11:23:39 -0000 On Wed, Feb 22, 2017 at 07:56:52AM +0000, BartÅ‚omiej Rutkowski wrote: > On Tue, Feb 21, 2017 at 2:40 PM, Alexey Dokuchaev wrote: > > > On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: > > > Thanks for working on making it easier to harden FreeBSD. While > > > defaulting some of these options to "on" seem pretty harmless (e.g. > > > random_pid), others are likely to cause confusion for new and > > > experienced users alike (e.g. proc_debug. I've never used that option > > > before, so I gave it a try. It simply causes gdb to hang when attempting > > > to start a process, with no obvious indication of why). > > > > I concur. In fact, harmless knobs should probably be turned on by default > > in FreeBSD itself (i.e., without any "hardening" help from the installer), > > while more intrusive ones should be opt-in, not opt-out. > > > > ./danfe > > > > I strongly believe we should, by default, ship as secured and hardened as > possible in order to improve overall security of new users installations. > Power users will and do change the OS as they please, they most likely > don't use bsdinstall in first place, so they're not affected in any way. Sorry, I strongly disagree with that. I'm most likely a "power user" and I use bsdinstall. -- Joel From owner-svn-src-all@freebsd.org Wed Feb 22 12:03: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 C8701CE932E; Wed, 22 Feb 2017 12:03:53 +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 8B6141C86; Wed, 22 Feb 2017 12:03:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cgVe9-0009wW-Qj; Wed, 22 Feb 2017 15:03:49 +0300 Date: Wed, 22 Feb 2017 15:03:49 +0300 From: Slawa Olhovchenkov To: Bartek Rutkowski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222120349.GF15630@zxy.spb.ru> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702210937.v1L9bY6V093836@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: Wed, 22 Feb 2017 12:03:53 -0000 On Tue, Feb 21, 2017 at 09:37:34AM +0000, Bartek Rutkowski wrote: > Author: robak (ports committer) > Date: Tue Feb 21 09:37:33 2017 > New Revision: 314036 > URL: https://svnweb.freebsd.org/changeset/base/314036 > > Log: > Enable bsdinstall hardening options by default. > > As discussed previously, in order to introduce new OS hardening > defaults, we've added them to bsdinstall in 'off by default' mode. > It has been there for a while, so the next step is to change them > to 'on by defaul' mode, so that in future we could simply enable > them in base OS. Please include option "disable all" for simple disable all. > Reviewed by: brd > Approved by: adrian > Differential Revision: https://reviews.freebsd.org/D9641 > > Modified: > head/usr.sbin/bsdinstall/scripts/hardening > > Modified: head/usr.sbin/bsdinstall/scripts/hardening > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:33:21 2017 (r314035) > +++ head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:37:33 2017 (r314036) > @@ -36,15 +36,15 @@ FEATURES=$( dialog --backtitle "FreeBSD > --title "System Hardening" --nocancel --separate-output \ > --checklist "Choose system security hardening options:" \ > 0 0 0 \ > - "0 hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ > - "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ > - "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ > - "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ > - "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ > - "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ > - "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ > - "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ > - "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ > + "0 hide_uids" "Hide processes running as other users" ${hide_uids:-on} \ > + "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-on} \ > + "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-on} \ > + "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-on} \ > + "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-on} \ > + "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-on} \ > + "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-on} \ > + "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-on} \ > + "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-on} \ > 2>&1 1>&3 ) > exec 3>&- > > _______________________________________________ > 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 22 15:07: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 EB16ECE951D; Wed, 22 Feb 2017 15:07:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (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 CF24F6B2; Wed, 22 Feb 2017 15:07:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OLS00O0073FY200@mr11p00im-asmtp004.me.com>; Wed, 22 Feb 2017 15:07:57 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1487776076; bh=dHyUmJHh/P7QU5d+NBEV/F/KepxZZ3G09yON8BVxIVc=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=QOsP1dFNoFV9t3KBiRfIldTYEp1N+lLn2ZtQWMNpc/SHrvBN06pRropEOYujLqSiD oUv8/EATwucrrP85BOo3lnxDPhNrYrOJGgUWB+cbSTmzkfTlXZjscQIwujb72gLm2i lc0tcxxZDxZhrjPencPZUnrcTPzUgvmYIVDzOj/TvQ3OKnPep0l3J39QZMgcHmRylC JYED+oGUj6nkaEUnuZCBuHEhQcw3Z3kXD1O39eLJV9vgfm9l2haBl7BNdFAeIkjmvf DN/75k71/hR1BGEzr5GBKI74Jpk/3q8Mu3RKceYwMrXxmGmSHz4ZlpGHO84U2rToBM 8T8xHCyj3KnNw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OLS00M5N7D6WI10@mr11p00im-asmtp004.me.com>; Wed, 22 Feb 2017 15:07:55 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-22_09:,, 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-1701120000 definitions=main-1702220143 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Wed, 22 Feb 2017 07:07:53 -0800 Subject: Re: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern From: Ravi Pokala Sender: "Pokala, Ravi" To: Eric Badger , Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <8A0BA2B9-D697-44AD-92C1-1B53088F83B4@panasas.com> Thread-topic: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern References: <201702201553.v1KFrGqx057871@repo.freebsd.org> <69055A2F-849B-496B-94BE-0724E0957B81@panasas.com> <4825881c-0199-1224-b46b-ab2a78f02392@FreeBSD.org> In-reply-to: <4825881c-0199-1224-b46b-ab2a78f02392@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, 22 Feb 2017 15:07:58 -0000 -----Original Message----- > From: on behalf of Eric Badger > Date: 2017-02-21, Tuesday at 20:37 > To: Ravi Pokala , , , > Subject: Re: svn commit: r313992 - in head: sys/kern sys/sys tests/sys/kern > > On 02/21/2017 05:45 PM, Ravi Pokala wrote: >> Hi Eric, >> >> This appears to break buildworld for a bunch of platforms -- possibly all the ones that use gcc rather than clang? >> >> A representative example from sparc64: >> >> /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c: In function 'atfu_ptrace__PT_KILL_breakpoint_body': >> /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c:1693: warning: implicit declaration of function '__builtin_debugtrap' >> *** [ptrace_test.o] Error code 1 >> >> Thanks, >> >> Ravi (rpokala@) > > Hi Ravi, > > Thanks for letting me know, and sorry for the breakage. It should be > fixed as of r314075. > > Eric Hi Eric, Alas, no joy: /usr/home/rpokala/freebsd/clean/base/head/tests/sys/kern/ptrace_test.c:1694:3: error: implicit declaration of function 'breakpoint' is invalid in C99 [-Werror,-Wimplicit-function-declaration] breakpoint(); ^ Try again? Thanks, Ravi (rpokala@) From owner-svn-src-all@freebsd.org Wed Feb 22 15:30: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 A256ECE9BDD; Wed, 22 Feb 2017 15:30:58 +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 66C5B1A03; Wed, 22 Feb 2017 15:30:58 +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 v1MFUvfS028506; Wed, 22 Feb 2017 15:30:57 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MFUvaT028505; Wed, 22 Feb 2017 15:30:57 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702221530.v1MFUvaT028505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 22 Feb 2017 15:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314098 - head/usr.bin/lam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 15:30:58 -0000 Author: allanjude Date: Wed Feb 22 15:30:57 2017 New Revision: 314098 URL: https://svnweb.freebsd.org/changeset/base/314098 Log: lam(1): Failing to restrict stdin/stdout/stderr should not be fatal When fed from a pipe, lam(1) would sometimes fail: lam: unable to limit stdio: Capabilities insufficient fixed regression in portsnap(8) introduced in r313938 This broke portsnap(8), the app that the capsicumization of lam(1) was meant to secure. # portsnap fetch update Looking up portsnap.FreeBSD.org mirrors... 6 mirrors found. Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done. Fetching snapshot metadata... done. Updating from Tue Feb 21 16:05:39 MSK 2017 to Tue Feb 21 16:59:30 MSK 2017. Fetching 5 metadata patches.lam: unable to limit stdio: Capabilities insufficient done. Applying metadata patches... done. Fetching 5 metadata files... lam: unable to limit stdio: Capabilities insufficient /usr/sbin/portsnap: cannot open 8c94d2c3f8fcea20eb1fd82021566c99c63a010e6b3702ee11e7a491795bcfb8.gz: No such file or directory metadata is corrupt. Reported by: Vladimir Zakharov , Ben Woods Modified: head/usr.bin/lam/lam.c Modified: head/usr.bin/lam/lam.c ============================================================================== --- head/usr.bin/lam/lam.c Wed Feb 22 10:21:39 2017 (r314097) +++ head/usr.bin/lam/lam.c Wed Feb 22 15:30:57 2017 (r314098) @@ -95,8 +95,7 @@ main(int argc, char *argv[]) * mode. */ caph_cache_catpages(); - if (caph_limit_stdio() == -1) - err(1, "unable to limit stdio"); + caph_limit_stdio(); if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); From owner-svn-src-all@freebsd.org Wed Feb 22 16:15: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 BF9E0CE99B5; Wed, 22 Feb 2017 16:15:08 +0000 (UTC) (envelope-from adrian.chadd@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 60DCA13DC; Wed, 22 Feb 2017 16:15:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id v77so1248219wmv.0; Wed, 22 Feb 2017 08:15:08 -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=Rp0Da6sMjYj2CMMJ818dSgJspF1HcsktkUsyCKL1KfM=; b=di12ocborndq4g8zD0t7nUTxPOep9CA9E8/xSIsYw4RyVj3MOzsfFKfmbDtVwS89ai Dn42kk/fD3+Zu9YhcxblQ0asQq5C1LeKR0yBYARS/0MzQsQKDbE8rTQgxyUQvrjCTfAg RMgUa/TRvNiuLKYuHp/F22p+OEAt2rtPbie9ZeqX8rJi7ReUWOYMLuNL6dG/bI9D6Lct Ss2quAXknKjdWzm5mU2wq1UB+Zcrq9oCdbyzsSL9F6PCSBk4pkyMvtOngL+JU8reRe0H IN72dsHvTR9+iZnl/bf1JtioEgIjtYnoE1C2tx5WIoRnGwbmlRPv/ag8mKWWeddAy26R xT9A== 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=Rp0Da6sMjYj2CMMJ818dSgJspF1HcsktkUsyCKL1KfM=; b=uMoIvumLyWASyz+slycWxR0GHNko/RSlAfoW/xAJypb4IKL0QfysN04M3EjFRFGQjj Dx0Lk1ZVoP7lJMEwSvVRLT3mrO0Rj+EHzKO/J2OvH2BhH8eiusY+eH07xgmI9qTpEigo w7W2blR9pbMxAT9ZVuDP6mAvBep0VA/IbM9MCZ2EZdgZq482UXa4w2PuQILXj4QsdtGY DuBi7y/7TB3+M3ZtTL3fuUc+3u0l8Rj4P3qeD7XGiO/6ZR+OJ/C7LOKvQ+/0xwgBwEkD LN6UDx/I5SYzwz3/5t7v3UKv1HLbBEbxu5h7vrgtEifzU8ZZMloE6VPV/kR1iQDSUgcc XP8Q== X-Gm-Message-State: AMke39k8VTxzzQ7/Vu3ECqvrOTmY0itAKJmPInNzB/ftPKcrX07R46RBz0hJy4ln4YaxZlocMgIk4jVTn5uN0A== X-Received: by 10.28.54.35 with SMTP id d35mr2913822wma.105.1487780106917; Wed, 22 Feb 2017 08:15:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.135 with HTTP; Wed, 22 Feb 2017 08:15:06 -0800 (PST) In-Reply-To: <4ffe93f6-f08a-070c-918d-c0dad443aa1f@selasky.org> References: <201702211323.v1LDNrJw087417@repo.freebsd.org> <4ffe93f6-f08a-070c-918d-c0dad443aa1f@selasky.org> From: Adrian Chadd Date: Wed, 22 Feb 2017 08:15:06 -0800 Message-ID: Subject: Re: svn commit: r314043 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi To: Hans Petter Selasky 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, 22 Feb 2017 16:15:08 -0000 Sweet! Thanks! (God I'd like this for native FreeBSD drivers actually...) -adrian On 22 February 2017 at 01:22, Hans Petter Selasky wrote: > On 02/22/17 00:18, Adrian Chadd wrote: >> >> Hiya, >> >> My understanding of tasklets is that they run on the CPU that they >> were scheduled on, rather than there being a single tasklet thread? >> >> Is that the direction you're thinking of heading in, or? >> > > Hi Adrian, > > The plan is to use grouptaskqueue in the end. From what I can see all the > pieces are in place for that. Then the tasklets will run on the same CPU > that they were scheduled on. > > Some patches needs to go into the grouptaskqueue first: > > 1) grouptaskqueue needs to support LinuxKPI module unload. There is current > missing/unimplemented drain logic in grouptaskqueue APIs. > > 2) Needs to expose internal gtaskqueues, so that we don't create unneccesary > threads to handle a single IRQ, which is the case currently. > > I've already CC'ed a few people on this, but not action yet. If you can > help, would be great. > > BTW: > TASKQGROUP_DECLARE(net); > > in sys/gtaskqueue.h seems non-existing and should be removed. > > --HPS > From owner-svn-src-all@freebsd.org Wed Feb 22 16:37: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 8C318CE9083; Wed, 22 Feb 2017 16:37:46 +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 595302FD; Wed, 22 Feb 2017 16:37:46 +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 v1MGbjw4056507; Wed, 22 Feb 2017 16:37:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MGbj0D056506; Wed, 22 Feb 2017 16:37:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702221637.v1MGbj0D056506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 22 Feb 2017 16:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314099 - head/usr.bin/lam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 16:37:46 -0000 Author: bapt Date: Wed Feb 22 16:37:45 2017 New Revision: 314099 URL: https://svnweb.freebsd.org/changeset/base/314099 Log: Better fix for r314098 The actual issue was the fact that if - was used then some restriction were already set to stdin when we were applying caph_limit_stdio which was failing due to the fact the fd was the fd was already restricted to lower rights. Restricting stdio before actually opening the files prevent trying to raise the right and fixes the issue. And this allows to keep failing the program if restriction failed Approved by: allanjude Differential Revision: https://reviews.freebsd.org/D9723 Modified: head/usr.bin/lam/lam.c Modified: head/usr.bin/lam/lam.c ============================================================================== --- head/usr.bin/lam/lam.c Wed Feb 22 15:30:57 2017 (r314098) +++ head/usr.bin/lam/lam.c Wed Feb 22 16:37:45 2017 (r314099) @@ -86,6 +86,8 @@ main(int argc, char *argv[]) if (argc == 1) usage(); + if (caph_limit_stdio() == -1) + err(1, "unable to limit stdio"); getargs(argv); if (!morefiles) usage(); @@ -95,7 +97,6 @@ main(int argc, char *argv[]) * mode. */ caph_cache_catpages(); - caph_limit_stdio(); if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); From owner-svn-src-all@freebsd.org Wed Feb 22 17:13: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 AF6B9CE9D79; Wed, 22 Feb 2017 17:13:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C9859F; Wed, 22 Feb 2017 17:13:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1MHD0Z2073223; Wed, 22 Feb 2017 17:13:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MHD04F073222; Wed, 22 Feb 2017 17:13:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702221713.v1MHD04F073222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 22 Feb 2017 17:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314100 - 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, 22 Feb 2017 17:13:01 -0000 Author: avg Date: Wed Feb 22 17:13:00 2017 New Revision: 314100 URL: https://svnweb.freebsd.org/changeset/base/314100 Log: fix a typo in __STDC_VERSION__ in __min_size requirements MFC after: 1 week Sponsored by: Panzura Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Feb 22 16:37:45 2017 (r314099) +++ head/sys/sys/cdefs.h Wed Feb 22 17:13:00 2017 (r314100) @@ -349,7 +349,7 @@ * void bar(int myArray[__min_size(10)]); */ #if !defined(__cplusplus) && \ - (!defined(__STDC_VERSION) || (__STDC_VERSION__ >= 199901)) + (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901)) #define __min_size(x) static (x) #else #define __min_size(x) (x) From owner-svn-src-all@freebsd.org Wed Feb 22 17:14: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 6DB43CE9F1A; Wed, 22 Feb 2017 17:14:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com [209.85.128.181]) (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 0133F2AD; Wed, 22 Feb 2017 17:14:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f181.google.com with SMTP id s27so6643045wrb.2; Wed, 22 Feb 2017 09:14:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:content-transfer-encoding; bh=xRlx9Rv19G29ViR1d0F9uglEheL7l567yLErTNcgeEs=; b=LLxio8ywSirybYlVbW9vVY+65XCKV8dNt1foaA20Pvct83h6JOTlU0GRdarsowa/nN LD/DUP8dI2/ctjq/koM3xqlCujvdeHLwioQ80PPV6oYLMpb9+aTtwv0ysUigyXXFkCzC WnaRnPBciIiYwZmr8I3ZdaJabgYab2fCm4ucxYptez8N18ppb3KQtlMM+c05/eUpK2RH 9NfegnWyYqzxqbe9bQtFBnZLjSOaAoRVS4UN3RU+FZUVnNdj9ciu0tLSskIp5Oz7poSl 46VotuDJejXqseoFAvMWRH0cJzUB+U+SKqXEvGbYteRh+s98glh6V3rNAZHvTYBVLJ86 ojpA== X-Gm-Message-State: AMke39n+iYD3XhT500nYP87weOm4PiNKCBBzqL/Aea/GCcOKjMMVNEvELM4zt5SKiRiBoQ== X-Received: by 10.223.152.85 with SMTP id v79mr24205457wrb.78.1487779875806; Wed, 22 Feb 2017 08:11:15 -0800 (PST) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com. [74.125.82.51]) by smtp.gmail.com with ESMTPSA id t103sm2278382wrc.43.2017.02.22.08.11.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 08:11:15 -0800 (PST) Received: by mail-wm0-f51.google.com with SMTP id v77so5551021wmv.0; Wed, 22 Feb 2017 08:11:15 -0800 (PST) X-Received: by 10.28.61.136 with SMTP id k130mr3116447wma.128.1487779875518; Wed, 22 Feb 2017 08:11:15 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.152.82 with HTTP; Wed, 22 Feb 2017 08:11:14 -0800 (PST) In-Reply-To: <20170222112335.GA29481@ymer.vnode.se> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> From: Conrad Meyer Date: Wed, 22 Feb 2017 08:11:14 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 17:14:14 -0000 On Wed, Feb 22, 2017 at 3:23 AM, Joel Dahl wrote: > On Wed, Feb 22, 2017 at 07:56:52AM +0000, Bart=C5=82omiej Rutkowski wrote= : >> I strongly believe we should, by default, ship as secured and hardened a= s >> possible in order to improve overall security of new users installations= . >> Power users will and do change the OS as they please, they most likely >> don't use bsdinstall in first place, so they're not affected in any way. > > Sorry, I strongly disagree with that. I'm most likely a "power user" and = I use > bsdinstall. Ditto. I'm also unfamiliar enough with the installer to trip on this kind of thing. Slawa's proposed "disable all" option would be fine. Thanks, Conrad From owner-svn-src-all@freebsd.org Wed Feb 22 17:20: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 6CE83CE93AF; Wed, 22 Feb 2017 17:20:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35CCD1C16; Wed, 22 Feb 2017 17:20:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1MHKIdM076269; Wed, 22 Feb 2017 17:20:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MHKIRG076268; Wed, 22 Feb 2017 17:20:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702221720.v1MHKIRG076268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 22 Feb 2017 17:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314101 - 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, 22 Feb 2017 17:20:19 -0000 Author: avg Date: Wed Feb 22 17:20:18 2017 New Revision: 314101 URL: https://svnweb.freebsd.org/changeset/base/314101 Log: don't use C99 static array indices with older GCC versions For example, the FreeBSD GCC (4.2.1) has a spotty support for that feature. If the static keyword is used with an unnamed array parameter in a function declaration, then the compilation fails with: error: static or type qualifiers in abstract declarator The feature does work if the parameter is named. So, the restriction introduced in this commit can be removed when all affected function prototypes have the workaround. MFC after: 1 week Sponsored by: Panzura Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Feb 22 17:13:00 2017 (r314100) +++ head/sys/sys/cdefs.h Wed Feb 22 17:20:18 2017 (r314101) @@ -349,6 +349,7 @@ * void bar(int myArray[__min_size(10)]); */ #if !defined(__cplusplus) && \ + (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \ (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901)) #define __min_size(x) static (x) #else From owner-svn-src-all@freebsd.org Wed Feb 22 17:35: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 14B01CE988F; Wed, 22 Feb 2017 17:35:35 +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 C456CA93; Wed, 22 Feb 2017 17:35:34 +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 1EB9410A791; Wed, 22 Feb 2017 12:35:27 -0500 (EST) From: John Baldwin To: =?utf-8?B?QmFydMWCb21pZWo=?= Rutkowski Cc: Eric Badger , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Date: Wed, 22 Feb 2017 09:31:38 -0800 Message-ID: <1976446.uOnGb30fkc@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> 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); Wed, 22 Feb 2017 12:35: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: Wed, 22 Feb 2017 17:35:35 -0000 On Wednesday, February 22, 2017 07:52:45 AM Bart=C5=82omiej Rutkowski w= rote: > On Tue, Feb 21, 2017 at 2:34 PM, Eric Badger wro= te: >=20 > > On 02/21/2017 03:37 AM, Bartek Rutkowski wrote: > > > >> Author: robak (ports committer) > >> Date: Tue Feb 21 09:37:33 2017 > >> New Revision: 314036 > >> URL: https://svnweb.freebsd.org/changeset/base/314036 > >> > >> Log: > >> Enable bsdinstall hardening options by default. > >> > >> As discussed previously, in order to introduce new OS hardening > >> defaults, we've added them to bsdinstall in 'off by default' mod= e. > >> It has been there for a while, so the next step is to change the= m > >> to 'on by defaul' mode, so that in future we could simply enable= > >> them in base OS. > >> > >> Reviewed by: brd > >> Approved by: adrian > >> Differential Revision: https://reviews.freebsd.org/D9641 > >> > >> Modified: > >> head/usr.sbin/bsdinstall/scripts/hardening > >> > >> Modified: head/usr.sbin/bsdinstall/scripts/hardening > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=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/scripts/hardening Tue Feb 21 09:33:2= 1 > >> 2017 (r314035) > >> +++ head/usr.sbin/bsdinstall/scripts/hardening Tue Feb 21 09:37:3= 3 > >> 2017 (r314036) > >> @@ -36,15 +36,15 @@ FEATURES=3D$( dialog --backtitle "FreeBSD > >> --title "System Hardening" --nocancel --separate-output \ > >> --checklist "Choose system security hardening options:" \ > >> 0 0 0 \ > >> - "0 hide_uids" "Hide processes running as other users" > >> ${hide_uids:-off} \ > >> - "1 hide_gids" "Hide processes running as other groups" > >> ${hide_gids:-off} \ > >> - "2 read_msgbuf" "Disable reading kernel message buffer for= > >> unprivileged users" ${read_msgbuf:-off} \ > >> - "3 proc_debug" "Disable process debugging facilities for > >> unprivileged users" ${proc_debug:-off} \ > >> - "4 random_pid" "Randomize the PID of newly created process= es" > >> ${random_pid:-off} \ > >> - "5 stack_guard" "Insert stack guard page ahead of the grow= able > >> segments" ${stack_guard:-off} \ > >> - "6 clear_tmp" "Clean the /tmp filesystem on system startup= " > >> ${clear_tmp:-off} \ > >> - "7 disable_syslogd" "Disable opening Syslogd network socke= t > >> (disables remote logging)" ${disable_syslogd:-off} \ > >> - "8 disable_sendmail" "Disable Sendmail service" > >> ${disable_sendmail:-off} \ > >> + "0 hide_uids" "Hide processes running as other users" > >> ${hide_uids:-on} \ > >> + "1 hide_gids" "Hide processes running as other groups" > >> ${hide_gids:-on} \ > >> + "2 read_msgbuf" "Disable reading kernel message buffer for= > >> unprivileged users" ${read_msgbuf:-on} \ > >> + "3 proc_debug" "Disable process debugging facilities for > >> unprivileged users" ${proc_debug:-on} \ > >> + "4 random_pid" "Randomize the PID of newly created process= es" > >> ${random_pid:-on} \ > >> + "5 stack_guard" "Insert stack guard page ahead of the grow= able > >> segments" ${stack_guard:-on} \ > >> + "6 clear_tmp" "Clean the /tmp filesystem on system startup= " > >> ${clear_tmp:-on} \ > >> + "7 disable_syslogd" "Disable opening Syslogd network socke= t > >> (disables remote logging)" ${disable_syslogd:-on} \ > >> + "8 disable_sendmail" "Disable Sendmail service" > >> ${disable_sendmail:-on} \ > >> 2>&1 1>&3 ) > >> exec 3>&- > >> > >> > >> > > Hi Bartek, > > > > Thanks for working on making it easier to harden FreeBSD. While def= aulting > > some of these options to "on" seem pretty harmless (e.g. random_pid= ), > > others are likely to cause confusion for new and experienced users = alike > > (e.g. proc_debug. I've never used that option before, so I gave it = a try. > > It simply causes gdb to hang when attempting to start a process, wi= th no > > obvious indication of why). I think more discussion is merited befo= re they > > are turned on by default; personally I think they have potential to= sour a > > first impression of FreeBSD by making things people are used to doi= ng on > > other OSes hard. >=20 >=20 > The audience of these changes is not someone like you, who's using gd= b > daily. The audience is the new users who often don't know what they'r= e > doing, why they're doing that and how to do differently, especially w= hen it > comes to the security. Power users in most cases don't use bsdinstall= to > install their systems, they use automation of some sort to fine tune = the OS > exactly to their needs and use case, and in their case this change is= > transparent and doesn't affect them. What it affects is the default F= reeBSD > installation and our poor track record of default installation securi= ty and > great track record for not changing and improving things just becuase= > they've been like that for past decade. Please don't turn FreeBSD into a system that is a pain to develop on. = For my undergrad students who do their work in Linux VMs I have multiple times= ended up unable to find a core dump in Ubuntu because of it's weird core dump= setup. One of my assignments is to write a simple shell that forks off new pro= cesses to call exec and you can't debug that out of the box on OS X either (gd= b can't start new processes without mucking with a security setting and t= hen rebooting, and lldb doesn't have the required functionality of followin= g forks). Right now FreeBSD is actually the most usable of the three systems for = this sort of thing. I think disabling proc_debug by default will be a simil= ar PITA much as Ubuntu. --=20 John Baldwin From owner-svn-src-all@freebsd.org Wed Feb 22 17:57: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 01C9BCE9CC5; Wed, 22 Feb 2017 17:57:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B544F1330; Wed, 22 Feb 2017 17:57:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1MHvJTt092771; Wed, 22 Feb 2017 17:57:19 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MHvJTX092770; Wed, 22 Feb 2017 17:57:19 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201702221757.v1MHvJTX092770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 22 Feb 2017 17:57: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: r314102 - stable/11/sys/dev/e1000 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, 22 Feb 2017 17:57:21 -0000 Author: marius Date: Wed Feb 22 17:57:19 2017 New Revision: 314102 URL: https://svnweb.freebsd.org/changeset/base/314102 Log: MFC: r311979 Reset the EIAC register to include the LINK status bit and restore link up/down notifications. Modified: stable/11/sys/dev/e1000/if_em.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/e1000/if_em.c ============================================================================== --- stable/11/sys/dev/e1000/if_em.c Wed Feb 22 17:20:18 2017 (r314101) +++ stable/11/sys/dev/e1000/if_em.c Wed Feb 22 17:57:19 2017 (r314102) @@ -5114,7 +5114,7 @@ em_enable_intr(struct adapter *adapter) u32 ims_mask = IMS_ENABLE_MASK; if (hw->mac.type == e1000_82574) { - E1000_WRITE_REG(hw, EM_EIAC, adapter->ims); + E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= adapter->ims; } E1000_WRITE_REG(hw, E1000_IMS, ims_mask); From owner-svn-src-all@freebsd.org Wed Feb 22 17:57: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 992BCCE9D10; Wed, 22 Feb 2017 17:57:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 686351363; Wed, 22 Feb 2017 17:57:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1MHvOKK092818; Wed, 22 Feb 2017 17:57:24 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MHvO78092817; Wed, 22 Feb 2017 17:57:24 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201702221757.v1MHvO78092817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 22 Feb 2017 17:57: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: r314103 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 17:57:25 -0000 Author: marius Date: Wed Feb 22 17:57:24 2017 New Revision: 314103 URL: https://svnweb.freebsd.org/changeset/base/314103 Log: MFC: r311979 Reset the EIAC register to include the LINK status bit and restore link up/down notifications. Modified: stable/10/sys/dev/e1000/if_em.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Wed Feb 22 17:57:19 2017 (r314102) +++ stable/10/sys/dev/e1000/if_em.c Wed Feb 22 17:57:24 2017 (r314103) @@ -5157,7 +5157,7 @@ em_enable_intr(struct adapter *adapter) u32 ims_mask = IMS_ENABLE_MASK; if (hw->mac.type == e1000_82574) { - E1000_WRITE_REG(hw, EM_EIAC, adapter->ims); + E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= adapter->ims; } E1000_WRITE_REG(hw, E1000_IMS, ims_mask); From owner-svn-src-all@freebsd.org Wed Feb 22 18:05: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 B0AA4CE9012; Wed, 22 Feb 2017 18:05:44 +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 6F80E1AAD; Wed, 22 Feb 2017 18:05:44 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cgbIL-000J7I-FC; Wed, 22 Feb 2017 21:05:41 +0300 Date: Wed, 22 Feb 2017 21:05:41 +0300 From: Slawa Olhovchenkov To: Conrad Meyer Cc: =?utf-8?Q?Bart=C5=82omiej?= Rutkowski , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222180541.GG15630@zxy.spb.ru> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: Wed, 22 Feb 2017 18:05:44 -0000 On Wed, Feb 22, 2017 at 08:11:14AM -0800, Conrad Meyer wrote: > On Wed, Feb 22, 2017 at 3:23 AM, Joel Dahl wrote: > > On Wed, Feb 22, 2017 at 07:56:52AM +0000, BartÅ‚omiej Rutkowski wrote: > >> I strongly believe we should, by default, ship as secured and hardened as > >> possible in order to improve overall security of new users installations. > >> Power users will and do change the OS as they please, they most likely > >> don't use bsdinstall in first place, so they're not affected in any way. > > > > Sorry, I strongly disagree with that. I'm most likely a "power user" and I use > > bsdinstall. > > Ditto. I'm also unfamiliar enough with the installer to trip on this > kind of thing. Slawa's proposed "disable all" option would be fine. My english not enought fluent for more explicate proposal, from my point most of this options do hardened in only limited cases, for other cases same options do system more un-hardened by force working as root. Some have unevident effects (/tmp cleaning, for example). For many users this options will be source of weird issuses (gdb don't work? fucking ugly freebsd! migrate to linux). This is evil trend of enforcing weird solutions under the auspices of 'my safety': airport security check, backgound check on every point, lawfull intercept, block access to hardware management in safety enviroment by 'leak ecnription'. I am enoght smart for self-sufficient security risk assessment! Industry already have at some "hardened" BSD: OpenBSD and HardenedBSD. Waht about market share? From owner-svn-src-all@freebsd.org Wed Feb 22 18:13: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 C2B46CE93D6; Wed, 22 Feb 2017 18:13:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) (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 720E5201; Wed, 22 Feb 2017 18:13:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f68.google.com with SMTP id 134so1024024wmj.1; Wed, 22 Feb 2017 10:13:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=XUiV0fKWhN76nL7V7Bv9mvrWQgM0zQLR4WxGv0vdIyA=; b=Lrtd1wDdGelq9d1+lQblwqyvx5ZOvFMnux8sF5JcJbuFUEHlXkXB8mY8JG7avrCRqG JOUaphjSMUU2uhNmmm3ahbA0wp+BaD8aWhengmBEuV1tE0tIrIZYiWtK7D62r2Adpzz2 sZqJNSpM6G4WzkX1a7MnBc+eMk7pauL2D2iHyqKLzov0p59JVGPaUCifeicS6+3DQKww zzq0pI+XB22eQqEsnR/RaQOdVHVwqRmbgUxKQZs7LInhNcUq+H8AE681RG5fgxFEHiyi od0odKshjM2l2XFI6uOiLWTm4JPUDlFUfC9oKMwJQYenhPeTR6cqiVErXLDA0u39UecG ILgA== X-Gm-Message-State: AMke39mtUKb8qfGcTGuPRTuSfWabpPBGs7NXYx3sjq74UnCVak7mfxtSzEgFgHVZsO4q5w== X-Received: by 10.28.138.147 with SMTP id m141mr3583471wmd.57.1487787222389; Wed, 22 Feb 2017 10:13:42 -0800 (PST) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com. [74.125.82.52]) by smtp.gmail.com with ESMTPSA id 63sm2650541wrh.68.2017.02.22.10.13.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 10:13:42 -0800 (PST) Received: by mail-wm0-f52.google.com with SMTP id v186so148274664wmd.0; Wed, 22 Feb 2017 10:13:42 -0800 (PST) X-Received: by 10.28.188.213 with SMTP id m204mr3519610wmf.0.1487787222089; Wed, 22 Feb 2017 10:13:42 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.152.82 with HTTP; Wed, 22 Feb 2017 10:13:41 -0800 (PST) In-Reply-To: <20170222180541.GG15630@zxy.spb.ru> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> <20170222180541.GG15630@zxy.spb.ru> From: Conrad Meyer Date: Wed, 22 Feb 2017 10:13:41 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Slawa Olhovchenkov Cc: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 18:13:50 -0000 On Wed, Feb 22, 2017 at 10:05 AM, Slawa Olhovchenkov wrote= : > On Wed, Feb 22, 2017 at 08:11:14AM -0800, Conrad Meyer wrote: > >> On Wed, Feb 22, 2017 at 3:23 AM, Joel Dahl wrote: >> > On Wed, Feb 22, 2017 at 07:56:52AM +0000, Bart=C5=82omiej Rutkowski wr= ote: >> >> I strongly believe we should, by default, ship as secured and hardene= d as >> >> possible in order to improve overall security of new users installati= ons. >> >> Power users will and do change the OS as they please, they most likel= y >> >> don't use bsdinstall in first place, so they're not affected in any w= ay. >> > >> > Sorry, I strongly disagree with that. I'm most likely a "power user" a= nd I use >> > bsdinstall. >> >> Ditto. I'm also unfamiliar enough with the installer to trip on this >> kind of thing. Slawa's proposed "disable all" option would be fine. > > My english not enought fluent for more explicate proposal, from my > point most of this options do hardened in only limited cases, for > other cases same options do system more un-hardened by force working > as root. Some have unevident effects (/tmp cleaning, for example). Yep. I am not concerned about disabling sendmail or remote syslog by default, though. > For many users this options will be source of weird issuses (gdb don't > work? fucking ugly freebsd! migrate to linux). Yeah, I am concerned about this too. (Also: "ps doesn't work" would be a big newbie sysadmin headache.) > This is evil trend of enforcing weird solutions under the auspices of > 'my safety': airport security check, backgound check on every point, > lawfull intercept, block access to hardware management in safety > enviroment by 'leak ecnription'. I am enoght smart for self-sufficient > security risk assessment! > > Industry already have at some "hardened" BSD: OpenBSD and HardenedBSD. > Waht about market share? Best, Conrad From owner-svn-src-all@freebsd.org Wed Feb 22 18:44: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 C7AB9CE9BC5; Wed, 22 Feb 2017 18:44:58 +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 7C7561650; Wed, 22 Feb 2017 18:44: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 v1MIivis013430; Wed, 22 Feb 2017 18:44:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MIivRp013429; Wed, 22 Feb 2017 18:44:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702221844.v1MIivRp013429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 22 Feb 2017 18:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314104 - head/lib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 18:44:58 -0000 Author: dim Date: Wed Feb 22 18:44:57 2017 New Revision: 314104 URL: https://svnweb.freebsd.org/changeset/base/314104 Log: Surround any unmangled C++ names in libcxxrt's version map with 'extern "C++"', otherwise ld refuses to make the symbols global in the final library. This causes the __int128-related symbols to go missing when the library is stripped during installation. Helpful hints: emaste MFC after: 2 weeks X-MFC-With: r314061 Modified: head/lib/libcxxrt/Version.map Modified: head/lib/libcxxrt/Version.map ============================================================================== --- head/lib/libcxxrt/Version.map Wed Feb 22 17:57:24 2017 (r314103) +++ head/lib/libcxxrt/Version.map Wed Feb 22 18:44:57 2017 (r314104) @@ -255,12 +255,14 @@ CXXABI_1.3.1 { } CXXABI_1.3; CXXABI_1.3.5 { - "typeinfo for __int128 const*"; - "typeinfo for __int128"; - "typeinfo for __int128*"; - "typeinfo for unsigned __int128 const*"; - "typeinfo for unsigned __int128"; - "typeinfo for unsigned __int128*"; + extern "C++" { + "typeinfo for __int128 const*"; + "typeinfo for __int128"; + "typeinfo for __int128*"; + "typeinfo for unsigned __int128 const*"; + "typeinfo for unsigned __int128"; + "typeinfo for unsigned __int128*"; + }; } CXXABI_1.3.1; CXXABI_1.3.6 { @@ -268,12 +270,14 @@ CXXABI_1.3.6 { } CXXABI_1.3.5; CXXABI_1.3.9 { - "typeinfo name for __int128 const*"; - "typeinfo name for __int128"; - "typeinfo name for __int128*"; - "typeinfo name for unsigned __int128 const*"; - "typeinfo name for unsigned __int128"; - "typeinfo name for unsigned __int128*"; + extern "C++" { + "typeinfo name for __int128 const*"; + "typeinfo name for __int128"; + "typeinfo name for __int128*"; + "typeinfo name for unsigned __int128 const*"; + "typeinfo name for unsigned __int128"; + "typeinfo name for unsigned __int128*"; + }; } CXXABI_1.3.6; CXXRT_1.0 { From owner-svn-src-all@freebsd.org Wed Feb 22 19:23: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 F03DACE990E; Wed, 22 Feb 2017 19:23:40 +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 C29CB1372; Wed, 22 Feb 2017 19:23:40 +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 5F10113CD1; Wed, 22 Feb 2017 19:23:38 +0000 (UTC) Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: cem@freebsd.org, Slawa Olhovchenkov References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> <20170222180541.GG15630@zxy.spb.ru> Cc: =?UTF-8?Q?Bart=c5=82omiej_Rutkowski?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: <457783d7-def2-3970-f180-58697a156423@freebsd.org> Date: Wed, 22 Feb 2017 14:23:26 -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: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5nnpEDAnhaOx3Mei4mRsNAlWL5dGTaIMT" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 19:23:41 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5nnpEDAnhaOx3Mei4mRsNAlWL5dGTaIMT Content-Type: multipart/mixed; boundary="OLBaWTDGmSB0FPgOKesMmnAxhTP8ILvV8"; protected-headers="v1" From: Allan Jude To: cem@freebsd.org, Slawa Olhovchenkov Cc: =?UTF-8?Q?Bart=c5=82omiej_Rutkowski?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <457783d7-def2-3970-f180-58697a156423@freebsd.org> Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> <20170222180541.GG15630@zxy.spb.ru> In-Reply-To: --OLBaWTDGmSB0FPgOKesMmnAxhTP8ILvV8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-02-22 13:13, Conrad Meyer wrote: > On Wed, Feb 22, 2017 at 10:05 AM, Slawa Olhovchenkov w= rote: >> On Wed, Feb 22, 2017 at 08:11:14AM -0800, Conrad Meyer wrote: >> >>> On Wed, Feb 22, 2017 at 3:23 AM, Joel Dahl wrote: >>>> On Wed, Feb 22, 2017 at 07:56:52AM +0000, Bart=C5=82omiej Rutkowski = wrote: >>>>> I strongly believe we should, by default, ship as secured and harde= ned as >>>>> possible in order to improve overall security of new users installa= tions. >>>>> Power users will and do change the OS as they please, they most lik= ely >>>>> don't use bsdinstall in first place, so they're not affected in any= way. >>>> >>>> Sorry, I strongly disagree with that. I'm most likely a "power user"= and I use >>>> bsdinstall. >>> >>> Ditto. I'm also unfamiliar enough with the installer to trip on this= >>> kind of thing. Slawa's proposed "disable all" option would be fine. >> >> My english not enought fluent for more explicate proposal, from my >> point most of this options do hardened in only limited cases, for >> other cases same options do system more un-hardened by force working >> as root. Some have unevident effects (/tmp cleaning, for example). >=20 > Yep. I am not concerned about disabling sendmail or remote syslog by > default, though. >=20 >> For many users this options will be source of weird issuses (gdb don't= >> work? fucking ugly freebsd! migrate to linux). >=20 > Yeah, I am concerned about this too. (Also: "ps doesn't work" would > be a big newbie sysadmin headache.) >=20 >> This is evil trend of enforcing weird solutions under the auspices of >> 'my safety': airport security check, backgound check on every point, >> lawfull intercept, block access to hardware management in safety >> enviroment by 'leak ecnription'. I am enoght smart for self-sufficient= >> security risk assessment! >> >> Industry already have at some "hardened" BSD: OpenBSD and HardenedBSD.= >> Waht about market share? >=20 > Best, > Conrad >=20 Yeah, a think a number of these options are good, but a bunch are no go. I do not want something deleting my files from /tmp unexpectedly. TrueOS has that on by default, and it has eaten useful files a few too many time= s. Breaking gdb should NOT be on by default either. For some of the others, having them on by default in bsdinstall might be a good way to 'test' the features under a wider user load, before we switch the defaults for the sysctls. --=20 Allan Jude --OLBaWTDGmSB0FPgOKesMmnAxhTP8ILvV8-- --5nnpEDAnhaOx3Mei4mRsNAlWL5dGTaIMT 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) iQIcBAEBAgAGBQJYreUxAAoJEBmVNT4SmAt+7J4P/1y2wIryJVLxxcF5EeJFBxzN ZAeCQuHuAwH9+xR1GZlUwSzBTkeI5o/GkE0Qhu5TbDqp57xzcz0bzyGKeYVQIM6b T3/oSTnmM2SDxckACMVJ2cEvhmrqHBqLdH4b5SDiostSErSzSqGcu1NpVuNQ7qua rfTBvxIwDVvkFXkNEnteUlDrhqM2vFc6R0bBDcy9CCthk0bh4lwLTXwYgJZ8I8JI stBRqMmjLb3XwilxWD57pdt6Lf4jItABlq4WqdZVEEEQslgncgANzCLNMGLBrnwG XbIcKNX/8kAmp8n7AUM0MSgVAecf9sZ8gjdEnXEGy4g4jVX9XPXEFIzj0+VTrccN JqCxCROCCpIxD2YhOSHi9f7YjnSqQP8AKRa6ybKZ6t4LBbSeorU1HXY3pYNAWw9o Qm+EvThEyQAZBEhnKzhcu591F3lKi7yGHMkdv2iYBHoshyKBkqU+2pAomAeK7mqW b3bVL7q1URweFbMZ3w3E4RkLy+WT8aipfjUKXaU1usnPoSY8pYsVL7jyJ0q4elIT lkxHnBlrG4WV82BOh8VThPqKeFTkohIYt8qU2Ez6eDrapcCP0Ym6iYsKDzEvAoZB JO9iZ3C/WCvKGeG0ZiEKL+r4tSljRGYBeKBV51GNKwxRiOi7VmBaBpiu2YoaHTEN sAqFw0bZv2Ih97LaT+fe =UWvd -----END PGP SIGNATURE----- --5nnpEDAnhaOx3Mei4mRsNAlWL5dGTaIMT-- From owner-svn-src-all@freebsd.org Wed Feb 22 19:29: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 1F556CE9A2D for ; Wed, 22 Feb 2017 19:29:04 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::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 B6FBE168F for ; Wed, 22 Feb 2017 19:29:03 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x231.google.com with SMTP id n21so11438071qta.1 for ; Wed, 22 Feb 2017 11:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zWeFcwQd3wPkaq67FQmF7FF4c0rvpX+WtCTir9UzIfE=; b=xpr77eBquXGZbXbpv76p8zVlk0dOfFbuRP9yteh9m3JrSGLwvhHXfAD0OGRAFeRXQx k6QcGFg6b4Dk2xX8wSTa2v16PYILYudHqK7JqOY0t+h8EC7neHiB+ZrSTdtdglU7Z+uG No6KilBhJT3DDvy4FccsXNnBceB2ONGZX0FbHL3ChZNgbd6jAeoxS/H8NMPz9bBeAXBc TNdxhtS22KCrx+IiJ1yn2yEOY1EIEw3Yd+01BPl59bZGngxvzBmji5EycfeECt8aG5+X kDmoGlmFMuhIJQl5GvWIdelzr0jNjPBl5msTMw+qTMnlbMuIxnjBtvFI38eO9L8LsqGa FT1w== 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=zWeFcwQd3wPkaq67FQmF7FF4c0rvpX+WtCTir9UzIfE=; b=rPhUy1U+x8h1eI9aX6EA0jARykzc/lPb2MppfsBVKeqK+bSo0GUdqj3zN7Pq+26siz r5H09Q0ayO7OWENgswN2W7CQGYhYr4pxJXO07qqSaKAlS33O7NaSQStE6xhRAgKGNi0f 0j+qHYCsTVCd5yvKKDhiYjnAU5qUmlVHYwhw9PCLzCc8NNpUs5/zvJQiUkAN5dpyDGA6 k8eoHt25mLVv2NdZxk1z6QF7OVPSOzBKPirt8UOpRPHtOMGyJFKC03YKXguG9S+NP9UC YZJ1794bY/n4ZhnS2MSAIADhgQwZi4eBv018InWNNG3ck2AD6blpuedyvMQyb8spCQv7 4BLg== X-Gm-Message-State: AMke39lSDXGYsm5wsuVjohJWfNHgpGHbhKkdYlGIC9OjtqBaS1mgY/p2+PFYC667PN88QAw5 X-Received: by 10.237.59.213 with SMTP id s21mr30579567qte.146.1487791742736; Wed, 22 Feb 2017 11:29:02 -0800 (PST) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id r18sm1274379qke.26.2017.02.22.11.29.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 11:29:01 -0800 (PST) Date: Wed, 22 Feb 2017 14:29:01 -0500 From: Shawn Webb To: Allan Jude Cc: cem@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Bart??omiej Rutkowski Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222192901.y4ulonfnlamqmapc@mutt-hbsd> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> <20170222180541.GG15630@zxy.spb.ru> <457783d7-def2-3970-f180-58697a156423@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3zdgbykcuvelxock" Content-Disposition: inline In-Reply-To: <457783d7-def2-3970-f180-58697a156423@freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170206 (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, 22 Feb 2017 19:29:04 -0000 --3zdgbykcuvelxock Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 22, 2017 at 02:23:26PM -0500, Allan Jude wrote: > On 2017-02-22 13:13, Conrad Meyer wrote: > > On Wed, Feb 22, 2017 at 10:05 AM, Slawa Olhovchenkov w= rote: > >> On Wed, Feb 22, 2017 at 08:11:14AM -0800, Conrad Meyer wrote: > >> > >>> On Wed, Feb 22, 2017 at 3:23 AM, Joel Dahl wrote: > >>>> On Wed, Feb 22, 2017 at 07:56:52AM +0000, Bart??omiej Rutkowski wrot= e: > >>>>> I strongly believe we should, by default, ship as secured and harde= ned as > >>>>> possible in order to improve overall security of new users installa= tions. > >>>>> Power users will and do change the OS as they please, they most lik= ely > >>>>> don't use bsdinstall in first place, so they're not affected in any= way. > >>>> > >>>> Sorry, I strongly disagree with that. I'm most likely a "power user"= and I use > >>>> bsdinstall. > >>> > >>> Ditto. I'm also unfamiliar enough with the installer to trip on this > >>> kind of thing. Slawa's proposed "disable all" option would be fine. > >> > >> My english not enought fluent for more explicate proposal, from my > >> point most of this options do hardened in only limited cases, for > >> other cases same options do system more un-hardened by force working > >> as root. Some have unevident effects (/tmp cleaning, for example). > >=20 > > Yep. I am not concerned about disabling sendmail or remote syslog by > > default, though. > >=20 > >> For many users this options will be source of weird issuses (gdb don't > >> work? fucking ugly freebsd! migrate to linux). > >=20 > > Yeah, I am concerned about this too. (Also: "ps doesn't work" would > > be a big newbie sysadmin headache.) > >=20 > >> This is evil trend of enforcing weird solutions under the auspices of > >> 'my safety': airport security check, backgound check on every point, > >> lawfull intercept, block access to hardware management in safety > >> enviroment by 'leak ecnription'. I am enoght smart for self-sufficient > >> security risk assessment! > >> > >> Industry already have at some "hardened" BSD: OpenBSD and HardenedBSD. > >> Waht about market share? > >=20 > > Best, > > Conrad > >=20 >=20 > Yeah, a think a number of these options are good, but a bunch are no go. > I do not want something deleting my files from /tmp unexpectedly. TrueOS > has that on by default, and it has eaten useful files a few too many time= s. >=20 > Breaking gdb should NOT be on by default either. >=20 > For some of the others, having them on by default in bsdinstall might be > a good way to 'test' the features under a wider user load, before we > switch the defaults for the sysctls. FYI: HardenedBSD has had the sysctl nodes set for a while now (> 1 year). The only "gotcha" moment we've had is with ASAN requiring the ability to determine memory maps, which is broken by setting security.bsd.unprivileged_proc_debug to 0. HardenedBSD has also set security.bsd.hardlink_check_gid and security.bsd.hardlink_check_uid both to 1. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --3zdgbykcuvelxock Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlit5nkACgkQaoRlj1JF bu6pYRAAgpfHtLasls9cJDlQEaudYn8ZrT9EJchKpucRTHiIirIksrjIN08cK8/m zBn6myLGa8TGJettZjfzot8x0g/9OrUfjkpk59682BNSf9k+5Zq7HzuXKfaf0NeB /baJBp6e7mwFv7V9Ijq67qOsEMAUoeUOb20XHAtbOZ4ZfEDNi6LLZAXpRHxvWRek x2yUWAMQtazMboM/4MTfD9tD/gFQSfGYVfKBXjqW2ajSF/17ws3dcEPL6QHznwlj T3tU5lUeGWUCCeoPhTGGpCf2g5CqvOC160+exQMGszT8IdAUdxezdOTWyaYSYqty qFIQhGXNeIq5Is/+oDiNaStSme6L1wFTCGMXXOlqHmYUWX7zxEJxAh6/H2mC4CIR NXzZHLo93PNrNdTC97J/dkXmqnpoLVcHWq46d1NTx9auvl3Ed5sSUq+Ois9k5zrz FiH6xvSX1lwAv1eKtHQ5FwOBqCFaHM11bI8eod9kZAQdZX8id2tbxyemZ2VT7Sks 8cXo8w6eeNwfFrk+8sl+OhxUrVWg1h7zeFReckgP3JtymnyGGIHAerhE4PIW1aXJ l2JXlensejUBzZ8RGt3GE7Pf7kVeDbkuXQkbJnUi4N9Lt97si/OHUfFgsEh9SczH u2MB54fLCBqmTKM9vUuT4Ok1w6X+F0xdCAa1iHumySiLGBR0LXw= =bX6S -----END PGP SIGNATURE----- --3zdgbykcuvelxock-- From owner-svn-src-all@freebsd.org Wed Feb 22 19:31: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 6290ACE9CB8; Wed, 22 Feb 2017 19:31:04 +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 20BE61AF7; Wed, 22 Feb 2017 19:31:04 +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 v1MJV3gp034254; Wed, 22 Feb 2017 19:31:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MJV3nm034253; Wed, 22 Feb 2017 19:31:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702221931.v1MJV3nm034253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 22 Feb 2017 19:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314105 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 19:31:04 -0000 Author: hselasky Date: Wed Feb 22 19:31:02 2017 New Revision: 314105 URL: https://svnweb.freebsd.org/changeset/base/314105 Log: Improve LinuxKPI scatter list support. The i915kms driver in Linux 4.9 reimplement parts of the scatter list functions with regards to performance. In other words there is not so much room for changing structure layouts and functionality if the i915kms should be built AS-IS. This patch aligns the scatter list support to what is expected by the i915kms driver. Remove some comments not needed while at it. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Feb 22 18:44:57 2017 (r314104) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Feb 22 19:31:02 2017 (r314105) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * Copyright (c) 2015 Matthew Dillon * All rights reserved. * @@ -34,18 +34,17 @@ #include #include +#include struct scatterlist { - union { - struct page *page; - struct scatterlist *sg; - } sl_un; + unsigned long page_link; + unsigned int offset; + unsigned int length; dma_addr_t address; - unsigned long offset; - uint32_t length; - uint32_t flags; }; +CTASSERT((sizeof(struct scatterlist) & 0x3) == 0); + struct sg_table { struct scatterlist *sgl; unsigned int nents; @@ -56,58 +55,79 @@ struct sg_page_iter { struct scatterlist *sg; unsigned int sg_pgoffset; unsigned int maxents; + struct { + unsigned int nents; + int pg_advance; + } internal; }; #define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) +#define SG_MAGIC 0x87654321UL + +#define sg_is_chain(sg) ((sg)->page_link & 0x01) +#define sg_is_last(sg) ((sg)->page_link & 0x02) +#define sg_chain_ptr(sg) \ + ((struct scatterlist *) ((sg)->page_link & ~0x03)) + #define sg_dma_address(sg) (sg)->address #define sg_dma_len(sg) (sg)->length -#define sg_page(sg) (sg)->sl_un.page -#define sg_scatternext(sg) (sg)->sl_un.sg -#define SG_END 0x01 -#define SG_CHAIN 0x02 +#define for_each_sg_page(sgl, iter, nents, pgoffset) \ + for (_sg_iter_init(sgl, iter, nents, pgoffset); \ + (iter)->sg; _sg_iter_next(iter)) + +#define for_each_sg(sglist, sg, sgmax, iter) \ + for (iter = 0, sg = (sglist); iter < (sgmax); iter++, sg = sg_next(sg)) + +typedef struct scatterlist *(sg_alloc_fn) (unsigned int, gfp_t); +typedef void (sg_free_fn) (struct scatterlist *, unsigned int); + +static inline void +sg_assign_page(struct scatterlist *sg, struct page *page) +{ + unsigned long page_link = sg->page_link & 0x3; + + sg->page_link = page_link | (unsigned long)page; +} static inline void sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset) { - sg_page(sg) = page; - sg_dma_len(sg) = len; + sg_assign_page(sg, page); sg->offset = offset; - if (offset > PAGE_SIZE) - panic("sg_set_page: Invalid offset %d\n", offset); + sg->length = len; } -static inline void -sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) +static inline struct page * +sg_page(struct scatterlist *sg) { - sg_set_page(sg, virt_to_page(buf), buflen, - ((uintptr_t)buf) & (PAGE_SIZE - 1)); + return ((struct page *)((sg)->page_link & ~0x3)); } static inline void -sg_init_table(struct scatterlist *sg, unsigned int nents) +sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) { - bzero(sg, sizeof(*sg) * nents); - sg[nents - 1].flags = SG_END; + sg_set_page(sg, virt_to_page(buf), buflen, + ((uintptr_t)buf) & (PAGE_SIZE - 1)); } static inline struct scatterlist * sg_next(struct scatterlist *sg) { - if (sg->flags & SG_END) + if (sg_is_last(sg)) return (NULL); sg++; - if (sg->flags & SG_CHAIN) - sg = sg_scatternext(sg); + if (sg_is_chain(sg)) + sg = sg_chain_ptr(sg); return (sg); } static inline vm_paddr_t sg_phys(struct scatterlist *sg) { - return sg_page(sg)->phys_addr + sg->offset; + return (VM_PAGE_TO_PHYS(sg_page(sg)) + sg->offset); } static inline void @@ -118,18 +138,44 @@ sg_chain(struct scatterlist *prv, unsign sg->offset = 0; sg->length = 0; - sg->flags = SG_CHAIN; - sg->sl_un.sg = sgl; + sg->page_link = ((unsigned long)sgl | 0x01) & ~0x02; } -static inline void +static inline void sg_mark_end(struct scatterlist *sg) { - sg->flags = SG_END; + sg->page_link |= 0x02; + sg->page_link &= ~0x01; +} + +static inline void +sg_init_table(struct scatterlist *sg, unsigned int nents) +{ + bzero(sg, sizeof(*sg) * nents); + sg_mark_end(&sg[nents - 1]); +} + +static struct scatterlist * +sg_kmalloc(unsigned int nents, gfp_t gfp_mask) +{ + if (nents == SG_MAX_SINGLE_ALLOC) { + return ((void *)__get_free_page(gfp_mask)); + } else + return (kmalloc(nents * sizeof(struct scatterlist), gfp_mask)); +} + +static inline void +sg_kfree(struct scatterlist *sg, unsigned int nents) +{ + if (nents == SG_MAX_SINGLE_ALLOC) { + free_page((unsigned long)sg); + } else + kfree(sg); } static inline void -__sg_free_table(struct sg_table *table, unsigned int max_ents) +__sg_free_table(struct sg_table *table, unsigned int max_ents, + bool skip_first_chunk, sg_free_fn * free_fn) { struct scatterlist *sgl, *next; @@ -142,7 +188,7 @@ __sg_free_table(struct sg_table *table, unsigned int sg_size; if (alloc_size > max_ents) { - next = sgl[max_ents - 1].sl_un.sg; + next = sg_chain_ptr(&sgl[max_ents - 1]); alloc_size = max_ents; sg_size = alloc_size - 1; } else { @@ -151,7 +197,10 @@ __sg_free_table(struct sg_table *table, } table->orig_nents -= sg_size; - kfree(sgl); + if (skip_first_chunk) + skip_first_chunk = 0; + else + free_fn(sgl, alloc_size); sgl = next; } @@ -161,12 +210,13 @@ __sg_free_table(struct sg_table *table, static inline void sg_free_table(struct sg_table *table) { - __sg_free_table(table, SG_MAX_SINGLE_ALLOC); + __sg_free_table(table, SG_MAX_SINGLE_ALLOC, 0, sg_kfree); } static inline int __sg_alloc_table(struct sg_table *table, unsigned int nents, - unsigned int max_ents, gfp_t gfp_mask) + unsigned int max_ents, struct scatterlist *first_chunk, + gfp_t gfp_mask, sg_alloc_fn *alloc_fn) { struct scatterlist *sg, *prv; unsigned int left; @@ -174,7 +224,7 @@ __sg_alloc_table(struct sg_table *table, memset(table, 0, sizeof(*table)); if (nents == 0) - return -EINVAL; + return (-EINVAL); left = nents; prv = NULL; do { @@ -189,12 +239,17 @@ __sg_alloc_table(struct sg_table *table, left -= sg_size; - sg = kmalloc(alloc_size * sizeof(struct scatterlist), gfp_mask); + if (first_chunk) { + sg = first_chunk; + first_chunk = NULL; + } else { + sg = alloc_fn(alloc_size, gfp_mask); + } if (unlikely(!sg)) { if (prv) table->nents = ++table->orig_nents; - return -ENOMEM; + return (-ENOMEM); } sg_init_table(sg, alloc_size); table->nents = table->orig_nents += sg_size; @@ -210,7 +265,7 @@ __sg_alloc_table(struct sg_table *table, prv = sg; } while (left); - return 0; + return (0); } static inline int @@ -219,11 +274,70 @@ sg_alloc_table(struct sg_table *table, u int ret; ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, - gfp_mask); + NULL, gfp_mask, sg_kmalloc); if (unlikely(ret)) - __sg_free_table(table, SG_MAX_SINGLE_ALLOC); + __sg_free_table(table, SG_MAX_SINGLE_ALLOC, 0, sg_kfree); + + return (ret); +} + +static inline int +sg_alloc_table_from_pages(struct sg_table *sgt, + struct page **pages, unsigned int count, + unsigned long off, unsigned long size, + gfp_t gfp_mask) +{ + unsigned int i, segs, cur; + int rc; + struct scatterlist *s; + + for (segs = i = 1; i < count; ++i) { + if (page_to_pfn(pages[i]) != page_to_pfn(pages[i - 1]) + 1) + ++segs; + } + if (__predict_false((rc = sg_alloc_table(sgt, segs, gfp_mask)))) + return (rc); + + cur = 0; + for_each_sg(sgt->sgl, s, sgt->orig_nents, i) { + unsigned long seg_size; + unsigned int j; + + for (j = cur + 1; j < count; ++j) + if (page_to_pfn(pages[j]) != + page_to_pfn(pages[j - 1]) + 1) + break; + + seg_size = ((j - cur) << PAGE_SHIFT) - off; + sg_set_page(s, pages[cur], min(size, seg_size), off); + size -= seg_size; + off = 0; + cur = j; + } + return (0); +} + - return ret; +static inline int +sg_nents(struct scatterlist *sg) +{ + int nents; + + for (nents = 0; sg; sg = sg_next(sg)) + nents++; + return (nents); +} + +static inline void +__sg_page_iter_start(struct sg_page_iter *piter, + struct scatterlist *sglist, unsigned int nents, + unsigned long pgoffset) +{ + piter->internal.pg_advance = 0; + piter->internal.nents = nents; + + piter->sg = sglist; + piter->sg_pgoffset = pgoffset; } static inline void @@ -247,6 +361,34 @@ _sg_iter_next(struct sg_page_iter *iter) iter->sg = sg; } +static inline int +sg_page_count(struct scatterlist *sg) +{ + return (PAGE_ALIGN(sg->offset + sg->length) >> PAGE_SHIFT); +} + +static inline bool +__sg_page_iter_next(struct sg_page_iter *piter) +{ + if (piter->internal.nents == 0) + return (0); + if (piter->sg == NULL) + return (0); + + piter->sg_pgoffset += piter->internal.pg_advance; + piter->internal.pg_advance = 1; + + while (piter->sg_pgoffset >= sg_page_count(piter->sg)) { + piter->sg_pgoffset -= sg_page_count(piter->sg); + piter->sg = sg_next(piter->sg); + if (--piter->internal.nents == 0) + return (0); + if (piter->sg == NULL) + return (0); + } + return (1); +} + static inline void _sg_iter_init(struct scatterlist *sgl, struct sg_page_iter *iter, unsigned int nents, unsigned long pgoffset) @@ -266,14 +408,14 @@ _sg_iter_init(struct scatterlist *sgl, s static inline dma_addr_t sg_page_iter_dma_address(struct sg_page_iter *spi) { - return spi->sg->address + (spi->sg_pgoffset << PAGE_SHIFT); + return (spi->sg->address + (spi->sg_pgoffset << PAGE_SHIFT)); } -#define for_each_sg_page(sgl, iter, nents, pgoffset) \ - for (_sg_iter_init(sgl, iter, nents, pgoffset); \ - (iter)->sg; _sg_iter_next(iter)) +static inline struct page * +sg_page_iter_page(struct sg_page_iter *piter) +{ + return (nth_page(sg_page(piter->sg), piter->sg_pgoffset)); +} -#define for_each_sg(sglist, sg, sgmax, _itr) \ - for (_itr = 0, sg = (sglist); _itr < (sgmax); _itr++, sg = sg_next(sg)) #endif /* _LINUX_SCATTERLIST_H_ */ From owner-svn-src-all@freebsd.org Wed Feb 22 19:33: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 12FBBCE9D7E; Wed, 22 Feb 2017 19:33:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0A31DD7; Wed, 22 Feb 2017 19:33:52 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 800013C67A8; Thu, 23 Feb 2017 06:33:44 +1100 (AEDT) Date: Thu, 23 Feb 2017 06:33:43 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314087 - head/sys/x86/x86 In-Reply-To: <201702220707.v1M7764i020598@repo.freebsd.org> Message-ID: <20170223053954.J1044@besplex.bde.org> References: <201702220707.v1M7764i020598@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=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=R5vHvjvtxh7rsni6xKkA:9 a=aetAHC_IVBUEc78F:21 a=6c0Pd6Ga19-F5CWQ:21 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, 22 Feb 2017 19:33:53 -0000 On Wed, 22 Feb 2017, Konstantin Belousov wrote: > Log: > More fixes for regression in r313898 on i386. > Use long long constants where needed. The long long abomination is never needed, and is always a style bug. I removed almost all long long constants ~20 years ago, but there are now thousands more than when I started. > Modified: head/sys/x86/x86/x86_mem.c > ============================================================================== > --- head/sys/x86/x86/x86_mem.c Wed Feb 22 06:43:49 2017 (r314086) > +++ head/sys/x86/x86/x86_mem.c Wed Feb 22 07:07:05 2017 (r314087) > @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) > > /* Compute the range from the mask. Ick. */ > mrd->mr_len = (~(msrv & mtrr_physmask) & > - (mtrr_physmask | 0xfffL)) + 1; > + (mtrr_physmask | 0xfffLL)) + 1; Not needed here. The old i386 version did spell it like this. > if (!mrvalid(mrd->mr_base, mrd->mr_len)) > mrd->mr_flags |= MDF_BOGUS; > > @@ -638,7 +638,7 @@ x86_mrinit(struct mem_range_softc *sc) > * Determine the size of the PhysMask and PhysBase fields in > * the variable range MTRRs. > */ > - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffUL; > + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; A 64-bit constant is needed here, but spelling it with ULL is a larger style bug than usual, since the other 64-bit constant on the same line is spelled without ULL. The old i386 version spelled both of the constants on this line with ULL, and the old amd64 version spelled them both with UL, but someone named kib fixed the style bug for the first and added the type error for the second when merging them. > > /* If fixed MTRRs supported and enabled. */ > if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { I don't like using explicit long constants either. Here the number of bits in the register is fixed by the hardware at 64. The number of bits in a long on amd64 and a long on i386 is only fixed by ABI because the ABI is broken for historical reasons. Only very MD code can safely assume the size of long and long long. This code was MD enough before it was merged, but now it shouldn't use long since that varies between amd64 and i386, and it shouldn't use long long since that is a style bug. x86/x86 only has 17 lines using u_long, and all are wrong: - most are for counters. Some counters should be 64 bits, but changing them on i386 would cause portability problems. - ones for lapic timer divisors and frequency should be just int or possibly u_register_t - ones for 16-bit segment registers should be just int or possibly uint16_t - ones for cr0 and cr4 should be u_register_t. x86/x86 has 40 lines using long. Many of the other 23 are wronger: - some in comments are not about the long type and are not wrong - many are in comments which say that the resource type is long, but the resource type is now rman_res_t = uintmax_t. It never was signed and is now larger than u_long on i386. Some nearby types are wrong to match. E.g., in nexus_add_irq(), the irq number should be int but is u_long. This u_long matched the old rman type exactly, but now gets converted by a prototype. There is a non-style bug here: smap handling above 4GB is turned off for i386 and PAE, with a comment saying that this is because resources use long's (sic). There are 2 copies of the code for this, with the type suffix spelled as ul instead of UL. ~0ul is a magic i386 way of spelling 4GB-1. It only works because it is under i386 ifdefs. This is in nexus.c. nexus.c otherwise doesn't use 0ul or 0UL. - some for lapics are for small integers and should be just int - many in mca.c are the long long abomination used for printf()s and should be [u]intmax_t - 1 in pvclock.c is u_long spelled verbosely as unsigned long - many in stack_machdep.c are in bogus casts of pointers. These should use uintptr_t. Casting pointers to access them using atomic ops is bogus using (uintptr_t *) too. uintptr_t is only valid for casting pointers directly. Of course it works indirectly since everything has the same width as register_t. Bruce From owner-svn-src-all@freebsd.org Wed Feb 22 19:39: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 D3410CE9F49; Wed, 22 Feb 2017 19:39:55 +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 AB5011AF; Wed, 22 Feb 2017 19:39:55 +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 v1MJdswc035442; Wed, 22 Feb 2017 19:39:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MJdslE035438; Wed, 22 Feb 2017 19:39:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702221939.v1MJdslE035438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 22 Feb 2017 19:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314106 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 19:39:55 -0000 Author: hselasky Date: Wed Feb 22 19:39:54 2017 New Revision: 314106 URL: https://svnweb.freebsd.org/changeset/base/314106 Log: Optimise unmapped LinuxKPI page allocations. When allocating unmapped pages, take advantage of the direct map on AMD64 to get the virtual address corresponding to a page. Else all pages allocated must be mapped because sometimes the virtual address of a page is requested. Move all page allocation and deallocation code into an own C-file. Add support for GFP_DMA32, GFP_KERNEL, GFP_ATOMIC and __GFP_ZERO allocation flags. Make a clear separation between mapped and unmapped allocations. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/src/linux_page.c (contents, props changed) Modified: head/sys/compat/linuxkpi/common/include/linux/gfp.h head/sys/conf/files head/sys/modules/linuxkpi/Makefile Modified: head/sys/compat/linuxkpi/common/include/linux/gfp.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Feb 22 19:31:02 2017 (r314105) +++ head/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Feb 22 19:39:54 2017 (r314106) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,94 +67,106 @@ #define GFP_TEMPORARY M_NOWAIT #define GFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) -static inline void * -page_address(struct page *page) +/* + * Resolve a page into a virtual address: + * + * NOTE: This function only works for pages allocated by the kernel. + */ +extern void *linux_page_address(struct page *); + +#define page_address(page) linux_page_address(page) + +/* + * Page management for unmapped pages: + */ +extern vm_page_t linux_alloc_pages(gfp_t flags, unsigned int order); +extern void linux_free_pages(vm_page_t page, unsigned int order); + +static inline struct page * +alloc_page(gfp_t flags) { - if (page->object != kmem_object && page->object != kernel_object) - return (NULL); - return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS + - IDX_TO_OFF(page->pindex))); + return (linux_alloc_pages(flags, 0)); } -static inline unsigned long -linux_get_page(gfp_t mask) +static inline struct page * +alloc_pages(gfp_t flags, unsigned int order) { - return kmem_malloc(kmem_arena, PAGE_SIZE, mask); + return (linux_alloc_pages(flags, order)); } -#define get_zeroed_page(mask) linux_get_page((mask) | M_ZERO) -#define alloc_page(mask) virt_to_page(linux_get_page((mask))) -#define __get_free_page(mask) linux_get_page((mask)) +static inline struct page * +alloc_pages_node(int node_id, gfp_t flags, unsigned int order) +{ + + return (linux_alloc_pages(flags, order)); +} static inline void -free_page(unsigned long page) +__free_pages(struct page *page, unsigned int order) { - if (page == 0) - return; - kmem_free(kmem_arena, page, PAGE_SIZE); + linux_free_pages(page, order); } static inline void -__free_page(struct page *m) +__free_page(struct page *page) { - if (m->object != kmem_object) - panic("__free_page: Freed page %p not allocated via wrappers.", - m); - kmem_free(kmem_arena, (vm_offset_t)page_address(m), PAGE_SIZE); + linux_free_pages(page, 0); } -static inline void -__free_pages(struct page *m, unsigned int order) +/* + * Page management for mapped pages: + */ +extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +extern void linux_free_kmem(vm_offset_t, unsigned int order); + +static inline vm_offset_t +get_zeroed_page(gfp_t flags) { - size_t size; - if (m == NULL) - return; - size = PAGE_SIZE << order; - kmem_free(kmem_arena, (vm_offset_t)page_address(m), size); + return (linux_alloc_kmem(flags | __GFP_ZERO, 0)); } -static inline void free_pages(uintptr_t addr, unsigned int order) +static inline vm_offset_t +__get_free_page(gfp_t flags) { - if (addr == 0) - return; - __free_pages(virt_to_page((void *)addr), order); + + return (linux_alloc_kmem(flags, 0)); } -/* - * Alloc pages allocates directly from the buddy allocator on linux so - * order specifies a power of two bucket of pages and the results - * are expected to be aligned on the size as well. - */ -static inline struct page * -alloc_pages(gfp_t gfp_mask, unsigned int order) +static inline vm_offset_t +__get_free_pages(gfp_t flags, unsigned int order) { - unsigned long page; - size_t size; - size = PAGE_SIZE << order; - page = kmem_alloc_contig(kmem_arena, size, gfp_mask, - 0, ~(vm_paddr_t)0, size, 0, VM_MEMATTR_DEFAULT); - if (page == 0) - return (NULL); - return (virt_to_page(page)); + return (linux_alloc_kmem(flags, order)); } -static inline uintptr_t __get_free_pages(gfp_t gfp_mask, unsigned int order) +static inline void +free_pages(uintptr_t addr, unsigned int order) { - struct page *page; + if (addr == 0) + return; - page = alloc_pages(gfp_mask, order); - if (page == NULL) - return (0); - return ((uintptr_t)page_address(page)); + linux_free_kmem(addr, order); } -#define alloc_pages_node(node, mask, order) alloc_pages(mask, order) +static inline void +free_page(uintptr_t addr) +{ + if (addr == 0) + return; + + linux_free_kmem(addr, 0); +} + +static inline bool +gfpflags_allow_blocking(const gfp_t gfp_flags) +{ + return ((gfp_flags & (M_WAITOK | M_NOWAIT)) == M_WAITOK); +} #define kmalloc_node(chunk, mask, node) kmalloc(chunk, mask) Added: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Wed Feb 22 19:39:54 2017 (r314106) @@ -0,0 +1,167 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2016 Matt Macy (mmacy@nextbsd.org) + * Copyright (c) 2017 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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 + +void * +linux_page_address(struct page *page) +{ +#ifdef __amd64__ + return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))); +#else + if (page->object != kmem_object && page->object != kernel_object) + return (NULL); + return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS + + IDX_TO_OFF(page->pindex))); +#endif +} + +vm_page_t +linux_alloc_pages(gfp_t flags, unsigned int order) +{ +#ifdef __amd64__ + unsigned long npages = 1UL << order; + int req = (flags & M_ZERO) ? (VM_ALLOC_ZERO | VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL) : (VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL); + vm_page_t page; + + if (order == 0 && (flags & GFP_DMA32) == 0) { + page = vm_page_alloc(NULL, 0, req); + if (page == NULL) + return (NULL); + } else { + vm_paddr_t pmax = (flags & GFP_DMA32) ? + BUS_SPACE_MAXADDR_32BIT : BUS_SPACE_MAXADDR; +retry: + page = vm_page_alloc_contig(NULL, 0, req, + npages, 0, pmax, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + + if (page == NULL) { + if (flags & M_WAITOK) { + if (!vm_page_reclaim_contig(req, + npages, 0, pmax, PAGE_SIZE, 0)) { + VM_WAIT; + } + flags &= ~M_WAITOK; + goto retry; + } + return (NULL); + } + } + if (flags & M_ZERO) { + unsigned long x; + + for (x = 0; x != npages; x++) { + vm_page_t pgo = page + x; + + if ((pgo->flags & PG_ZERO) == 0) + pmap_zero_page(pgo); + } + } +#else + vm_offset_t vaddr; + vm_page_t page; + + vaddr = linux_alloc_kmem(flags, order); + if (vaddr == 0) + return (NULL); + + page = PHYS_TO_VM_PAGE(vtophys((void *)vaddr)); + + KASSERT(vaddr == (vm_offset_t)page_address(page), + ("Page address mismatch")); +#endif + return (page); +} + +void +linux_free_pages(vm_page_t page, unsigned int order) +{ +#ifdef __amd64__ + unsigned long npages = 1UL << order; + unsigned long x; + + for (x = 0; x != npages; x++) { + vm_page_t pgo = page + x; + + vm_page_lock(pgo); + vm_page_free(pgo); + vm_page_unlock(pgo); + } +#else + vm_offset_t vaddr; + + vaddr = (vm_offset_t)page_address(page); + + linux_free_kmem(vaddr, order); +#endif +} + +vm_offset_t +linux_alloc_kmem(gfp_t flags, unsigned int order) +{ + size_t size = ((size_t)PAGE_SIZE) << order; + vm_offset_t addr; + + if ((flags & GFP_DMA32) == 0) { + addr = kmem_malloc(kmem_arena, size, flags & GFP_NATIVE_MASK); + } else { + addr = kmem_alloc_contig(kmem_arena, size, + flags & GFP_NATIVE_MASK, 0, BUS_SPACE_MAXADDR_32BIT, + PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + } + return (addr); +} + +void +linux_free_kmem(vm_offset_t addr, unsigned int order) +{ + size_t size = ((size_t)PAGE_SIZE) << order; + + kmem_free(kmem_arena, addr, size); +} Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 22 19:31:02 2017 (r314105) +++ head/sys/conf/files Wed Feb 22 19:39:54 2017 (r314106) @@ -4286,6 +4286,8 @@ compat/linuxkpi/common/src/linux_current compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_page.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_tasklet.c optional compat_linuxkpi \ Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Wed Feb 22 19:31:02 2017 (r314105) +++ head/sys/modules/linuxkpi/Makefile Wed Feb 22 19:39:54 2017 (r314106) @@ -6,6 +6,7 @@ SRCS= linux_kmod.c \ linux_compat.c \ linux_current.c \ linux_kthread.c \ + linux_page.c \ linux_pci.c \ linux_radix.c \ linux_rcu.c \ From owner-svn-src-all@freebsd.org Wed Feb 22 19:42: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 12546CE6113; Wed, 22 Feb 2017 19:42:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) (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 A715E89A; Wed, 22 Feb 2017 19:42:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f67.google.com with SMTP id v77so2143919wmv.0; Wed, 22 Feb 2017 11:42:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=XwmjiGG4/4g2aZjA1R/W4W7Vj3IjhAzVDAoHEca/Kos=; b=KI2ngqsFO3oBLbWARdohV0XwovBfDwGK0QJdcJEiyt71tG2KHDYXFybyq4MLKkYNIv r8cj1jvfCi/AEEK/QInrtrW/NBR7Fj0wv8ofIhbUmfPdQo/1cBQaGdwr+deexbeWsVpC DB/3GFCv49DEMWz2TJ74JPkJiZtJcYB6D9V2lMEyJ8YPbgwcNVbUxNQNVs+zo2RGnvWw YdZMrThR/8JJks0gzqEqoPfqDTDZZOH4imk2e7/isJat35MwA0sQ9vb6EhHVuj+6Jq0h Nt3goywdV4xsfpYLi5PQ/68ldt1EqhYXquspy1gVDKD1jMx29Xuo+jiOOgcMlTnFbHcN wOuw== X-Gm-Message-State: AMke39nWp+ucs7vzWFh6Dh3iEOMklSvNG+xMEKtu6H50jObIGI9QO363ksRoFvJjouVmXg== X-Received: by 10.28.45.213 with SMTP id t204mr3850757wmt.113.1487792546748; Wed, 22 Feb 2017 11:42:26 -0800 (PST) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com. [74.125.82.51]) by smtp.gmail.com with ESMTPSA id 186sm3732071wmw.24.2017.02.22.11.42.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 11:42:26 -0800 (PST) Received: by mail-wm0-f51.google.com with SMTP id t18so37246824wmt.0; Wed, 22 Feb 2017 11:42:26 -0800 (PST) X-Received: by 10.28.174.14 with SMTP id x14mr3798387wme.75.1487792546465; Wed, 22 Feb 2017 11:42:26 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.152.82 with HTTP; Wed, 22 Feb 2017 11:42:25 -0800 (PST) In-Reply-To: <201702221931.v1MJV3nm034253@repo.freebsd.org> References: <201702221931.v1MJV3nm034253@repo.freebsd.org> From: Conrad Meyer Date: Wed, 22 Feb 2017 11:42:25 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314105 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky 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: Wed, 22 Feb 2017 19:42:35 -0000 On Wed, Feb 22, 2017 at 11:31 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Feb 22 19:31:02 2017 > New Revision: 314105 > URL: https://svnweb.freebsd.org/changeset/base/314105 > > Log: > Improve LinuxKPI scatter list support. > > The i915kms driver in Linux 4.9 reimplement parts of the scatter list > functions with regards to performance. In other words there is not so > much room for changing structure layouts and functionality if the > i915kms should be built AS-IS. This patch aligns the scatter list > support to what is expected by the i915kms driver. Remove some > comments not needed while at it. > > ... > > +CTASSERT((sizeof(struct scatterlist) & 0x3) == 0); > + > struct sg_table { > struct scatterlist *sgl; > unsigned int nents; > @@ -56,58 +55,79 @@ struct sg_page_iter { > struct scatterlist *sg; > unsigned int sg_pgoffset; > unsigned int maxents; > + struct { > + unsigned int nents; > + int pg_advance; > + } internal; > }; > > #define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) > > +#define SG_MAGIC 0x87654321UL > + > +#define sg_is_chain(sg) ((sg)->page_link & 0x01) > +#define sg_is_last(sg) ((sg)->page_link & 0x02) > +#define sg_chain_ptr(sg) \ > + ((struct scatterlist *) ((sg)->page_link & ~0x03)) Hi Hans, Thanks for all of the linuxkpi work you've done lately. i915 support is very important to me! It would be nice to have some named constants for these masks. The bare numbers are used throughout this change. Thanks, Conrad From owner-svn-src-all@freebsd.org Wed Feb 22 19:58: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 22B0CCE6435; Wed, 22 Feb 2017 19:58:01 +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 CD49B114C; Wed, 22 Feb 2017 19:58:00 +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 v1MJw0nZ043744; Wed, 22 Feb 2017 19:58:00 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MJvxvD043737; Wed, 22 Feb 2017 19:57:59 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702221957.v1MJvxvD043737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Wed, 22 Feb 2017 19:57:59 +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: r314107 - in stable/11/sys: amd64/linux amd64/linux32 compat/linux i386/linux 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, 22 Feb 2017 19:58:01 -0000 Author: dchagin Date: Wed Feb 22 19:57:59 2017 New Revision: 314107 URL: https://svnweb.freebsd.org/changeset/base/314107 Log: MFC r313284: 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. MFC r313285: Regen after r313284. MFC r313684: Fix r313284. Members of the syscall argument structures are padded to a word size. So, for COMPAT_LINUX32 we should convert user supplied system call arguments which is 32-bit in that case to the array of register_t. MFC r313912: Finish r313684. Convert linux_recv(), linux_send() and linux_accept() system call arguments to the register_t type too. Modified: stable/11/sys/amd64/linux/linux_dummy.c stable/11/sys/amd64/linux/linux_proto.h stable/11/sys/amd64/linux/linux_syscall.h stable/11/sys/amd64/linux/linux_syscalls.c stable/11/sys/amd64/linux/linux_sysent.c stable/11/sys/amd64/linux/linux_systrace_args.c stable/11/sys/amd64/linux/syscalls.master stable/11/sys/amd64/linux32/linux32_dummy.c stable/11/sys/amd64/linux32/linux32_proto.h stable/11/sys/amd64/linux32/linux32_syscall.h stable/11/sys/amd64/linux32/linux32_syscalls.c stable/11/sys/amd64/linux32/linux32_sysent.c stable/11/sys/amd64/linux32/linux32_systrace_args.c stable/11/sys/amd64/linux32/syscalls.master stable/11/sys/compat/linux/linux_socket.c stable/11/sys/compat/linux/linux_socket.h stable/11/sys/i386/linux/linux_dummy.c stable/11/sys/i386/linux/linux_proto.h stable/11/sys/i386/linux/linux_syscall.h stable/11/sys/i386/linux/linux_syscalls.c stable/11/sys/i386/linux/linux_sysent.c stable/11/sys/i386/linux/linux_systrace_args.c stable/11/sys/i386/linux/syscalls.master Modified: stable/11/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/11/sys/amd64/linux/linux_dummy.c Wed Feb 22 19:39:54 2017 (r314106) +++ stable/11/sys/amd64/linux/linux_dummy.c Wed Feb 22 19:57:59 2017 (r314107) @@ -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: stable/11/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/11/sys/amd64/linux/linux_proto.h Wed Feb 22 19:39:54 2017 (r314106) +++ stable/11/sys/amd64/linux/linux_proto.h Wed Feb 22 19:57:59 2017 (r314107) @@ -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: stable/11/sys/amd64/linux/linux_syscall.h ============================================================================== --- stable/11/sys/amd64/linux/linux_syscall.h Wed Feb 22 19:39:54 2017 (r314106) +++ stable/11/sys/amd64/linux/linux_syscall.h Wed Feb 22 19:57:59 2017 (r314107) @@ -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: stable/11/sys/amd64/linux/linux_syscalls.c ============================================================================== --- stable/11/sys/amd64/linux/linux_syscalls.c Wed Feb 22 19:39:54 2017 (r314106) +++ stable/11/sys/amd64/linux/linux_syscalls.c Wed Feb 22 19:57:59 2017 (r314107) @@ -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: stable/11/sys/amd64/linux/linux_sysent.c ============================================================================== --- stable/11/sys/amd64/linux/linux_sysent.c Wed Feb 22 19:39:54 2017 (r314106) +++ stable/11/sys/amd64/linux/linux_sysent.c Wed Feb 22 19:57:59 2017 (r314107) @@ -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: stable/11/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- stable/11/sys/amd64/linux/linux_systrace_args.c Wed Feb 22 19:39:54 2017 (r314106) +++ stable/11/sys/amd64/linux/linux_systrace_args.c Wed Feb 22 19:57:59 2017 (r314107) @@ -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,28 +5917,448 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_setns */ case 308: + switch(ndx) { + case 0: + p = "l_int"; + break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 22 20:11: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 243D0CE68A9; Wed, 22 Feb 2017 20:11:23 +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 CCCA11BF3; Wed, 22 Feb 2017 20:11:22 +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 v1MKBL2H048126; Wed, 22 Feb 2017 20:11:21 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MKBL7l048125; Wed, 22 Feb 2017 20:11:21 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702222011.v1MKBL7l048125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Wed, 22 Feb 2017 20:11: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: r314108 - 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: Wed, 22 Feb 2017 20:11:23 -0000 Author: dchagin Date: Wed Feb 22 20:11:21 2017 New Revision: 314108 URL: https://svnweb.freebsd.org/changeset/base/314108 Log: Record mergeinfo for r313284, r313285, r313684, r313912 missied in r314107. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Wed Feb 22 20:18: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 E28EACE69B1; Wed, 22 Feb 2017 20:18:05 +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 A14EA1F94; Wed, 22 Feb 2017 20:18:05 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cgdMR-000Mp2-HV; Wed, 22 Feb 2017 23:18:03 +0300 Date: Wed, 22 Feb 2017 23:18:03 +0300 From: Slawa Olhovchenkov To: Conrad Meyer Cc: =?utf-8?Q?Bart=C5=82omiej?= Rutkowski , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170222201803.GV6035@zxy.spb.ru> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222112335.GA29481@ymer.vnode.se> <20170222180541.GG15630@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: Wed, 22 Feb 2017 20:18:06 -0000 On Wed, Feb 22, 2017 at 10:13:41AM -0800, Conrad Meyer wrote: > On Wed, Feb 22, 2017 at 10:05 AM, Slawa Olhovchenkov wrote: > > On Wed, Feb 22, 2017 at 08:11:14AM -0800, Conrad Meyer wrote: > > > >> On Wed, Feb 22, 2017 at 3:23 AM, Joel Dahl wrote: > >> > On Wed, Feb 22, 2017 at 07:56:52AM +0000, BartÅ‚omiej Rutkowski wrote: > >> >> I strongly believe we should, by default, ship as secured and hardened as > >> >> possible in order to improve overall security of new users installations. > >> >> Power users will and do change the OS as they please, they most likely > >> >> don't use bsdinstall in first place, so they're not affected in any way. > >> > > >> > Sorry, I strongly disagree with that. I'm most likely a "power user" and I use > >> > bsdinstall. > >> > >> Ditto. I'm also unfamiliar enough with the installer to trip on this > >> kind of thing. Slawa's proposed "disable all" option would be fine. > > > > My english not enought fluent for more explicate proposal, from my > > point most of this options do hardened in only limited cases, for > > other cases same options do system more un-hardened by force working > > as root. Some have unevident effects (/tmp cleaning, for example). > > Yep. I am not concerned about disabling sendmail or remote syslog by > default, though. Also, what mean by 'disabling remote syslog'? As I know syslogd by default don't collect remote messages and need -a options. May be this is about -s options? How many -s? Not clean. From owner-svn-src-all@freebsd.org Wed Feb 22 20:24: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 AF2C5CE6C84; Wed, 22 Feb 2017 20:24:10 +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 6240B80B; Wed, 22 Feb 2017 20:24:10 +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 v1MKO9fH056011; Wed, 22 Feb 2017 20:24:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MKO9WR056010; Wed, 22 Feb 2017 20:24:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702222024.v1MKO9WR056010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 22 Feb 2017 20:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314109 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 20:24:10 -0000 Author: hselasky Date: Wed Feb 22 20:24:09 2017 New Revision: 314109 URL: https://svnweb.freebsd.org/changeset/base/314109 Log: Convert magic values into macros in the LinuxKPI scatterlist implementation. Suggested by: cem @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Feb 22 20:11:21 2017 (r314108) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Feb 22 20:24:09 2017 (r314109) @@ -38,12 +38,15 @@ struct scatterlist { unsigned long page_link; +#define SG_PAGE_LINK_CHAIN 0x1UL +#define SG_PAGE_LINK_LAST 0x2UL +#define SG_PAGE_LINK_MASK 0x3UL unsigned int offset; unsigned int length; dma_addr_t address; }; -CTASSERT((sizeof(struct scatterlist) & 0x3) == 0); +CTASSERT((sizeof(struct scatterlist) & SG_PAGE_LINK_MASK) == 0); struct sg_table { struct scatterlist *sgl; @@ -65,10 +68,10 @@ struct sg_page_iter { #define SG_MAGIC 0x87654321UL -#define sg_is_chain(sg) ((sg)->page_link & 0x01) -#define sg_is_last(sg) ((sg)->page_link & 0x02) +#define sg_is_chain(sg) ((sg)->page_link & SG_PAGE_LINK_CHAIN) +#define sg_is_last(sg) ((sg)->page_link & SG_PAGE_LINK_LAST) #define sg_chain_ptr(sg) \ - ((struct scatterlist *) ((sg)->page_link & ~0x03)) + ((struct scatterlist *) ((sg)->page_link & ~SG_PAGE_LINK_MASK)) #define sg_dma_address(sg) (sg)->address #define sg_dma_len(sg) (sg)->length @@ -86,7 +89,7 @@ typedef void (sg_free_fn) (struct scatte static inline void sg_assign_page(struct scatterlist *sg, struct page *page) { - unsigned long page_link = sg->page_link & 0x3; + unsigned long page_link = sg->page_link & SG_PAGE_LINK_MASK; sg->page_link = page_link | (unsigned long)page; } @@ -103,7 +106,7 @@ sg_set_page(struct scatterlist *sg, stru static inline struct page * sg_page(struct scatterlist *sg) { - return ((struct page *)((sg)->page_link & ~0x3)); + return ((struct page *)((sg)->page_link & ~SG_PAGE_LINK_MASK)); } static inline void @@ -138,14 +141,15 @@ sg_chain(struct scatterlist *prv, unsign sg->offset = 0; sg->length = 0; - sg->page_link = ((unsigned long)sgl | 0x01) & ~0x02; + sg->page_link = ((unsigned long)sgl | + SG_PAGE_LINK_CHAIN) & ~SG_PAGE_LINK_LAST; } static inline void sg_mark_end(struct scatterlist *sg) { - sg->page_link |= 0x02; - sg->page_link &= ~0x01; + sg->page_link |= SG_PAGE_LINK_LAST; + sg->page_link &= ~SG_PAGE_LINK_CHAIN; } static inline void From owner-svn-src-all@freebsd.org Wed Feb 22 20:26: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 89D39CE6DBA; Wed, 22 Feb 2017 20:26:18 +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 52EDDA26; Wed, 22 Feb 2017 20:26:17 +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 BD2021FE023; Wed, 22 Feb 2017 21:26:05 +0100 (CET) Subject: Re: svn commit: r314105 - head/sys/compat/linuxkpi/common/include/linux To: cem@freebsd.org References: <201702221931.v1MJV3nm034253@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: Date: Wed, 22 Feb 2017 21:25:30 +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: 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, 22 Feb 2017 20:26:18 -0000 Hi, On 02/22/17 20:42, Conrad Meyer wrote: > On Wed, Feb 22, 2017 at 11:31 AM, Hans Petter Selasky > > Hi Hans, > > Thanks for all of the linuxkpi work you've done lately. i915 support > is very important to me! > You're welcome! > It would be nice to have some named constants for these masks. The > bare numbers are used throughout this change. See r314109. --HPS From owner-svn-src-all@freebsd.org Wed Feb 22 20:27: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 B284DCE6F50; Wed, 22 Feb 2017 20:27:50 +0000 (UTC) (envelope-from bdrewery@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 812C1CAB; Wed, 22 Feb 2017 20:27:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id A7C834D40; Wed, 22 Feb 2017 20:27:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 91FA233755; Wed, 22 Feb 2017 20:27:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 8AgSI7-0RCeK; Wed, 22 Feb 2017 20:27:25 +0000 (UTC) Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 5D00133726 To: Alexey Dokuchaev , Eric Badger , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> Date: Wed, 22 Feb 2017 12:26:34 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170222070733.GA29010@ymer.vnode.se> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NX4DvRBbf3kvUjiLDMJTSBCJSWXFwimTj" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 20:27:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NX4DvRBbf3kvUjiLDMJTSBCJSWXFwimTj Content-Type: multipart/mixed; boundary="shThLlQ5LdurFTRPUxFjUDcq7Cm63IAw0"; protected-headers="v1" From: Bryan Drewery To: Alexey Dokuchaev , Eric Badger , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> In-Reply-To: <20170222070733.GA29010@ymer.vnode.se> --shThLlQ5LdurFTRPUxFjUDcq7Cm63IAw0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2/21/2017 11:07 PM, Joel Dahl wrote: > On Tue, Feb 21, 2017 at 02:40:02PM +0000, Alexey Dokuchaev wrote: >> On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: >>> Thanks for working on making it easier to harden FreeBSD. While >>> defaulting some of these options to "on" seem pretty harmless (e.g. >>> random_pid), others are likely to cause confusion for new and >>> experienced users alike (e.g. proc_debug. I've never used that option= >>> before, so I gave it a try. It simply causes gdb to hang when attempt= ing >>> to start a process, with no obvious indication of why). >> >> I concur. In fact, harmless knobs should probably be turned on by def= ault >> in FreeBSD itself (i.e., without any "hardening" help from the install= er), >> while more intrusive ones should be opt-in, not opt-out. >=20 > I agree. Can we back this out and discuss it on current@? >=20 I concur. In the original review for adding this I predicted today would come, https://reviews.freebsd.org/D6826. I still think that it is very under-designed and under-thought out. I personally agree with hardening my system, but I have a number of issues with this approach: 1. It makes *1 installation* method do hardening, while every other installation method, and *upgrade* methods not do hardening. So someone upgrading from 11.0 to 12.0 won't get hardening, but someone installing from bsdinstall for 12.0 fresh will get it. There should not be a distinction between our installation/upgrade methods like this. 2. It ignores that FreeBSD is *generic Operating System* that serves many workflows. Developers want all of this off, System Administrators want all of it on, and Desktop users may want a compromise of half of it to allow various drivers to work (not pointing at any specific sysctl right now). I think what is really needed is a system profile that lets you pick the workflow you are going to use the system for, and then set some reasonable defaults from there. We will never all agree on the same defaults because we all are using the systems differently, but we can find some compromise if we make Use Cases, such as a System Profile would entail. I too would like to see this backed out. --=20 Regards, Bryan Drewery --shThLlQ5LdurFTRPUxFjUDcq7Cm63IAw0-- --NX4DvRBbf3kvUjiLDMJTSBCJSWXFwimTj 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 iQEcBAEBAgAGBQJYrfP6AAoJEDXXcbtuRpfPce8IAMrKdkmxSfANidz9cK4+03QZ PmX8urFiLB6/Tz67MDNkoZHmFy2+ScKMqJtGfiWWqyRUbXzm9hf16JKQWmcuP80l o2vkZ038+V46/4dsUD1PLCjMkxnm2/HhwEOHCqE+NaBcFPQpUSYSvRe9SUYPB7K/ g19JyvgTu5Ti1oXUGav7YOGgIy0Q0MHVOqx5+d/zuqiFIykkB+j7hgWMwmE/BK2q /5gAqFme4rsqi+iOg4FSXd+L9GIHKC88Mt0XbFfeiNEmuJDq2QgLQBcL7cXzLpIL UuCuILA2ebbeT5JLqxv1wH1zDfn0WyA7Qfv5wrGzlwrEB/M55ZGBIX2EuiPR/MA= =QcZa -----END PGP SIGNATURE----- --NX4DvRBbf3kvUjiLDMJTSBCJSWXFwimTj-- From owner-svn-src-all@freebsd.org Wed Feb 22 20:34: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 61F49CE94CF; Wed, 22 Feb 2017 20:34:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (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 02958136D; Wed, 22 Feb 2017 20:34:44 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f47.google.com with SMTP id v77so9500940wmv.1; Wed, 22 Feb 2017 12:34:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=aXPdtagwT880El880oM+wXxeDur5vl37havZE62uAPM=; b=Yu6usPO+Eu17KirS4SnM1UztcJkaWSqrm4laf3sARD18zCEOmwCaRtXH23IOoK4UuO H1cAXg1ai2rLQNJ7srxrxj6YPsmGDFAjYYHl84w2rnNK/zE6315UqM6slDlE/XRTAJ5n RBEYE1BJ6WRMPJNcXIaMzxiTz3uV1mmWUr8qAzMjDd9V9NjpDkE3uSNyiwgMYa+QV7dC XPRl6p2NgPb+ROzxyvslyovMtHrec8ktmgqLincivnGGW1VYVjL+siTs3juVxb90WNDW RR1cTYsuKDXyDHLznN/t7WSMZpXYtLBwMYqKH7ucOVQwxIbfIPXNdaZgsGayMPWCEjWy 4tfg== X-Gm-Message-State: AMke39mjUcJSuC1NeYqJOa5yySuM1UActiXkWQPg0i/y6m/u2bUplcq4tsV0qmKJWgbSsA== X-Received: by 10.28.186.197 with SMTP id k188mr182830wmf.25.1487795677473; Wed, 22 Feb 2017 12:34:37 -0800 (PST) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com. [74.125.82.43]) by smtp.gmail.com with ESMTPSA id u40sm3081808wrc.46.2017.02.22.12.34.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 12:34:37 -0800 (PST) Received: by mail-wm0-f43.google.com with SMTP id v77so9500728wmv.1; Wed, 22 Feb 2017 12:34:37 -0800 (PST) X-Received: by 10.28.228.87 with SMTP id b84mr133886wmh.0.1487795677207; Wed, 22 Feb 2017 12:34:37 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.152.82 with HTTP; Wed, 22 Feb 2017 12:34:36 -0800 (PST) In-Reply-To: <201702222024.v1MKO9WR056010@repo.freebsd.org> References: <201702222024.v1MKO9WR056010@repo.freebsd.org> From: Conrad Meyer Date: Wed, 22 Feb 2017 12:34:36 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314109 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky 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: Wed, 22 Feb 2017 20:34:45 -0000 Thanks! On Wed, Feb 22, 2017 at 12:24 PM, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Feb 22 20:24:09 2017 > New Revision: 314109 > URL: https://svnweb.freebsd.org/changeset/base/314109 > > Log: > Convert magic values into macros in the LinuxKPI scatterlist > implementation. > > Suggested by: cem @ > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/scatterlist.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h > ============================================================================== > --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Feb 22 20:11:21 2017 (r314108) > +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Feb 22 20:24:09 2017 (r314109) > @@ -38,12 +38,15 @@ > > struct scatterlist { > unsigned long page_link; > +#define SG_PAGE_LINK_CHAIN 0x1UL > +#define SG_PAGE_LINK_LAST 0x2UL > +#define SG_PAGE_LINK_MASK 0x3UL > unsigned int offset; > unsigned int length; > dma_addr_t address; > }; From owner-svn-src-all@freebsd.org Wed Feb 22 20:47: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 0F770CE999F; Wed, 22 Feb 2017 20:47:27 +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 B91B61EE1; Wed, 22 Feb 2017 20:47:26 +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 v1MKlPYx065028; Wed, 22 Feb 2017 20:47:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MKlPT0065023; Wed, 22 Feb 2017 20:47:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702222047.v1MKlPT0065023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 22 Feb 2017 20:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314110 - in head: etc share/man/man4 share/man/man4/man4.i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 20:47:27 -0000 Author: imp Date: Wed Feb 22 20:47:25 2017 New Revision: 314110 URL: https://svnweb.freebsd.org/changeset/base/314110 Log: Remove more stray EISA refernces: ahb was removed. Remove the cross reference and replace, where appropiate, with ahd.4. Modified: head/etc/devd.conf head/share/man/man4/adv.4 head/share/man/man4/ahc.4 head/share/man/man4/man4.i386/aic.4 head/share/man/man4/scsi.4 Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Wed Feb 22 20:24:09 2017 (r314109) +++ head/etc/devd.conf Wed Feb 22 20:47:25 2017 (r314110) @@ -19,7 +19,7 @@ options { # Setup some shorthand for regex that we use later in the file. #XXX Yes, these are gross -- imp set scsi-controller-regex - "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amr|bt|ciss|ct|dpt|\ + "(aac|adv|adw|aha|ahc|ahd|aic|amr|bt|ciss|ct|dpt|\ esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm)\ [0-9]+"; set wifi-driver-regex Modified: head/share/man/man4/adv.4 ============================================================================== --- head/share/man/man4/adv.4 Wed Feb 22 20:24:09 2017 (r314109) +++ head/share/man/man4/adv.4 Wed Feb 22 20:47:25 2017 (r314110) @@ -201,7 +201,6 @@ AdvanSys ABP980UA/3980UA .Sh SEE ALSO .Xr adw 4 , .Xr aha 4 , -.Xr ahb 4 , .Xr ahc 4 , .Xr cd 4 , .Xr da 4 , Modified: head/share/man/man4/ahc.4 ============================================================================== --- head/share/man/man4/ahc.4 Wed Feb 22 20:24:09 2017 (r314109) +++ head/share/man/man4/ahc.4 Wed Feb 22 20:47:25 2017 (r314110) @@ -361,7 +361,7 @@ more SCB space available, the less host and restoring SCB data. .Sh SEE ALSO .Xr aha 4 , -.Xr ahb 4 , +.Xr ahd 4 , .Xr cd 4 , .Xr da 4 , .Xr sa 4 , Modified: head/share/man/man4/man4.i386/aic.4 ============================================================================== --- head/share/man/man4/man4.i386/aic.4 Wed Feb 22 20:24:09 2017 (r314109) +++ head/share/man/man4/man4.i386/aic.4 Wed Feb 22 20:47:25 2017 (r314110) @@ -65,7 +65,6 @@ Adaptec AHA-1460, AHA-1460B, AHA-1460C, .El .Sh SEE ALSO .Xr aha 4 , -.Xr ahb 4 , .Xr ahc 4 , .Xr cd 4 , .Xr ch 4 , Modified: head/share/man/man4/scsi.4 ============================================================================== --- head/share/man/man4/scsi.4 Wed Feb 22 20:24:09 2017 (r314109) +++ head/share/man/man4/scsi.4 Wed Feb 22 20:47:25 2017 (r314110) @@ -315,8 +315,8 @@ for details. .Sh SEE ALSO .Xr ada 4 , .Xr aha 4 , -.Xr ahb 4 , .Xr ahc 4 , +.Xr ahd 4 , .Xr ahci 4 , .Xr ata 4 , .Xr bt 4 , From owner-svn-src-all@freebsd.org Wed Feb 22 21:50: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 850C3CEA58A; Wed, 22 Feb 2017 21:50:38 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA82103D; Wed, 22 Feb 2017 21:50:38 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1MLobXu090092; Wed, 22 Feb 2017 21:50:37 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MLob41090091; Wed, 22 Feb 2017 21:50:37 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201702222150.v1MLob41090091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 22 Feb 2017 21:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314111 - head/contrib/blacklist/libexec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 21:50:38 -0000 Author: lidl Date: Wed Feb 22 21:50:37 2017 New Revision: 314111 URL: https://svnweb.freebsd.org/changeset/base/314111 Log: Improve ipfw rule creation for blacklist-helper script When blocking an address, the blacklist-helper script needs to do the following things for the ipfw packet filter: - create a table to hold the addresses to be blocked, so lookups can be done quickly, and place the address to be blocked in that table - create rule that does the lookup in the table and blocks the packet The ipfw system allows multiple rules to be inserted for a given rule number. There only needs to be one rule to do the lookup per port. Modify the script to probe for the existence of the rule before attempting to create it, so only one rule is inserted, rather than one rule per blocked address. PR: 214980 Reported by: azhegalov (at) gmail.com Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9681 Modified: head/contrib/blacklist/libexec/blacklistd-helper Modified: head/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- head/contrib/blacklist/libexec/blacklistd-helper Wed Feb 22 20:47:25 2017 (r314110) +++ head/contrib/blacklist/libexec/blacklistd-helper Wed Feb 22 21:50:37 2017 (r314111) @@ -63,8 +63,11 @@ add) tname="port$6" /sbin/ipfw table $tname create type addr 2>/dev/null /sbin/ipfw -q table $tname add "$addr/$mask" - /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to \ - any dst-port $6 && echo OK + # if rule number $rule does not already exist, create it + /sbin/ipfw show $rule >/dev/null 2>&1 || \ + /sbin/ipfw add $rule drop $3 from \ + table"("$tname")" to any dst-port $6 >/dev/null && \ + echo OK ;; npf) /sbin/npfctl rule "$2" add block in final $proto from \ From owner-svn-src-all@freebsd.org Wed Feb 22 22:00: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 1F765CEA86C; Wed, 22 Feb 2017 22:00:52 +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 D459F1719; Wed, 22 Feb 2017 22:00:51 +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 v1MM0oiD094318; Wed, 22 Feb 2017 22:00:50 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MM0onb094316; Wed, 22 Feb 2017 22:00:50 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702222200.v1MM0onb094316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 22 Feb 2017 22:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314112 - in head/sys: boot/zfs cddl/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: Wed, 22 Feb 2017 22:00:52 -0000 Author: tsoome Date: Wed Feb 22 22:00:50 2017 New Revision: 314112 URL: https://svnweb.freebsd.org/changeset/base/314112 Log: loader: update symlink support in zfs reader As the current zfs file system is providing symlink via system attributes, need to update the code accordingly. Note, as the zfsboot code does not free the memory at this time, the object list will put some stress on the boot2 heap, eventually we should address the issue. Reviewed by: allanjude, smh Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9706 Modified: head/sys/boot/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfsimpl.h Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Feb 22 21:50:37 2017 (r314111) +++ head/sys/boot/zfs/zfsimpl.c Wed Feb 22 22:00:50 2017 (r314112) @@ -2264,6 +2264,61 @@ zfs_dnode_stat(const spa_t *spa, dnode_p return (0); } +static int +zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, char *path, size_t psize) +{ + int rc = 0; + + if (dn->dn_bonustype == DMU_OT_SA) { + sa_hdr_phys_t *sahdrp = NULL; + size_t size = 0; + void *buf = NULL; + int hdrsize; + char *p; + + if (dn->dn_bonuslen != 0) + sahdrp = (sa_hdr_phys_t *)DN_BONUS(dn); + else { + blkptr_t *bp; + + if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0) + return (EIO); + bp = &dn->dn_spill; + + size = BP_GET_LSIZE(bp); + buf = zfs_alloc(size); + rc = zio_read(spa, bp, buf); + if (rc != 0) { + zfs_free(buf, size); + return (rc); + } + sahdrp = buf; + } + hdrsize = SA_HDR_SIZE(sahdrp); + p = (char *)((uintptr_t)sahdrp + hdrsize + SA_SYMLINK_OFFSET); + memcpy(path, p, psize); + if (buf != NULL) + zfs_free(buf, size); + return (0); + } + /* + * Second test is purely to silence bogus compiler + * warning about accessing past the end of dn_bonus. + */ + if (psize + sizeof(znode_phys_t) <= dn->dn_bonuslen && + sizeof(znode_phys_t) <= sizeof(dn->dn_bonus)) { + memcpy(path, &dn->dn_bonus[sizeof(znode_phys_t)], psize); + } else { + rc = dnode_read(spa, dn, 0, path, psize); + } + return (rc); +} + +struct obj_list { + uint64_t objnum; + STAILQ_ENTRY(obj_list) entry; +}; + /* * Lookup a file and return its dnode. */ @@ -2271,7 +2326,7 @@ static int zfs_lookup(const struct zfsmount *mount, const char *upath, dnode_phys_t *dnode) { int rc; - uint64_t objnum, rootnum, parentnum; + uint64_t objnum; const spa_t *spa; dnode_phys_t dn; const char *p, *q; @@ -2279,6 +2334,8 @@ zfs_lookup(const struct zfsmount *mount, char path[1024]; int symlinks_followed = 0; struct stat sb; + struct obj_list *entry; + STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache); spa = mount->spa; if (mount->objset.os_type != DMU_OST_ZFS) { @@ -2287,87 +2344,119 @@ zfs_lookup(const struct zfsmount *mount, return (EIO); } + if ((entry = malloc(sizeof(struct obj_list))) == NULL) + return (ENOMEM); + /* * Get the root directory dnode. */ rc = objset_get_dnode(spa, &mount->objset, MASTER_NODE_OBJ, &dn); - if (rc) + if (rc) { + free(entry); return (rc); + } - rc = zap_lookup(spa, &dn, ZFS_ROOT_OBJ, sizeof (rootnum), 1, &rootnum); - if (rc) + rc = zap_lookup(spa, &dn, ZFS_ROOT_OBJ, sizeof (objnum), 1, &objnum); + if (rc) { + free(entry); return (rc); + } + entry->objnum = objnum; + STAILQ_INSERT_HEAD(&on_cache, entry, entry); - rc = objset_get_dnode(spa, &mount->objset, rootnum, &dn); - if (rc) - return (rc); + rc = objset_get_dnode(spa, &mount->objset, objnum, &dn); + if (rc != 0) + goto done; - objnum = rootnum; p = upath; while (p && *p) { + rc = objset_get_dnode(spa, &mount->objset, objnum, &dn); + if (rc != 0) + goto done; + while (*p == '/') p++; - if (!*p) + if (*p == '\0') break; - q = strchr(p, '/'); - if (q) { - memcpy(element, p, q - p); - element[q - p] = 0; - p = q; - } else { - strcpy(element, p); - p = NULL; - } + q = p; + while (*q != '\0' && *q != '/') + q++; - rc = zfs_dnode_stat(spa, &dn, &sb); - if (rc) - return (rc); - if (!S_ISDIR(sb.st_mode)) - return (ENOTDIR); + /* skip dot */ + if (p + 1 == q && p[0] == '.') { + p++; + continue; + } + /* double dot */ + if (p + 2 == q && p[0] == '.' && p[1] == '.') { + p += 2; + if (STAILQ_FIRST(&on_cache) == + STAILQ_LAST(&on_cache, obj_list, entry)) { + rc = ENOENT; + goto done; + } + entry = STAILQ_FIRST(&on_cache); + STAILQ_REMOVE_HEAD(&on_cache, entry); + free(entry); + objnum = (STAILQ_FIRST(&on_cache))->objnum; + continue; + } + if (q - p + 1 > sizeof(element)) { + rc = ENAMETOOLONG; + goto done; + } + memcpy(element, p, q - p); + element[q - p] = 0; + p = q; + + if ((rc = zfs_dnode_stat(spa, &dn, &sb)) != 0) + goto done; + if (!S_ISDIR(sb.st_mode)) { + rc = ENOTDIR; + goto done; + } - parentnum = objnum; rc = zap_lookup(spa, &dn, element, sizeof (objnum), 1, &objnum); if (rc) - return (rc); + goto done; objnum = ZFS_DIRENT_OBJ(objnum); + if ((entry = malloc(sizeof(struct obj_list))) == NULL) { + rc = ENOMEM; + goto done; + } + entry->objnum = objnum; + STAILQ_INSERT_HEAD(&on_cache, entry, entry); rc = objset_get_dnode(spa, &mount->objset, objnum, &dn); if (rc) - return (rc); + goto done; /* * Check for symlink. */ rc = zfs_dnode_stat(spa, &dn, &sb); if (rc) - return (rc); + goto done; if (S_ISLNK(sb.st_mode)) { - if (symlinks_followed > 10) - return (EMLINK); + if (symlinks_followed > 10) { + rc = EMLINK; + goto done; + } symlinks_followed++; /* * Read the link value and copy the tail of our * current path onto the end. */ - if (p) - strcpy(&path[sb.st_size], p); - else - path[sb.st_size] = 0; - /* - * Second test is purely to silence bogus compiler - * warning about accessing past the end of dn_bonus. - */ - if (sb.st_size + sizeof(znode_phys_t) <= - dn.dn_bonuslen && sizeof(znode_phys_t) <= - sizeof(dn.dn_bonus)) { - memcpy(path, &dn.dn_bonus[sizeof(znode_phys_t)], - sb.st_size); - } else { - rc = dnode_read(spa, &dn, 0, path, sb.st_size); - if (rc) - return (rc); + if (sb.st_size + strlen(p) + 1 > sizeof(path)) { + rc = ENAMETOOLONG; + goto done; } + strcpy(&path[sb.st_size], p); + + rc = zfs_dnode_readlink(spa, &dn, path, sb.st_size); + if (rc != 0) + goto done; /* * Restart with the new path, starting either at @@ -2375,14 +2464,25 @@ zfs_lookup(const struct zfsmount *mount, * not the link is relative. */ p = path; - if (*p == '/') - objnum = rootnum; - else - objnum = parentnum; - objset_get_dnode(spa, &mount->objset, objnum, &dn); + if (*p == '/') { + while (STAILQ_FIRST(&on_cache) != + STAILQ_LAST(&on_cache, obj_list, entry)) { + entry = STAILQ_FIRST(&on_cache); + STAILQ_REMOVE_HEAD(&on_cache, entry); + free(entry); + } + } else { + entry = STAILQ_FIRST(&on_cache); + STAILQ_REMOVE_HEAD(&on_cache, entry); + free(entry); + } + objnum = (STAILQ_FIRST(&on_cache))->objnum; } } *dnode = dn; - return (0); +done: + STAILQ_FOREACH(entry, &on_cache, entry) + free(entry); + return (rc); } Modified: head/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- head/sys/cddl/boot/zfs/zfsimpl.h Wed Feb 22 21:50:37 2017 (r314111) +++ head/sys/cddl/boot/zfs/zfsimpl.h Wed Feb 22 22:00:50 2017 (r314112) @@ -1080,6 +1080,7 @@ typedef struct sa_hdr_phys { #define SA_UID_OFFSET 24 #define SA_GID_OFFSET 32 #define SA_PARENT_OFFSET 40 +#define SA_SYMLINK_OFFSET 160 /* * Intent log header - this on disk structure holds fields to manage From owner-svn-src-all@freebsd.org Wed Feb 22 22:46: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 D6A90CE9089; Wed, 22 Feb 2017 22:46:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x236.google.com (mail-qk0-x236.google.com [IPv6:2607:f8b0:400d:c09::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 85A031375; Wed, 22 Feb 2017 22:46:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x236.google.com with SMTP id s186so17122783qkb.1; Wed, 22 Feb 2017 14:46:14 -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=kZ1g0nsEtFN18O+j4nN5MOhdJsOjsFVoJ5f5u8W0KCE=; b=ayLye6PJtXLTzI6hL3L0ofXzP1MeR39VBJBn6768Zm45A8ChIaP9pXx5bzf6Z0acio L/syJWLhhkuzndJlH+TOAQ2K5V83i9zwPqJcG30VdWECcQfE+RheZzZNq+37SNancYCg cHZ3fsXScLM3BkHNX6XOr5mdEdAZpPfMyUC43Vqd+8aM9ynuPIXCcL6CmNnXyjK8+z4p RW5dsSIoFfHZpJo6jtlCWtMz6IR9uxMPS1tPhyW3nnGGm1QG9ynKgY7fWGQdtrlSCO8q +TH4yifpaFf7ba6yIsrvG0e22sFJLUek1Jff+W7QFoPTDOS0Quxk+S6Sa14BBfgm3M76 o1ag== 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=kZ1g0nsEtFN18O+j4nN5MOhdJsOjsFVoJ5f5u8W0KCE=; b=HHfkEFIIjg1Dl8vD2suy4ewm8e63dJkYDsNo3p0d/881RASSr5DcvpOvGvy1uahG3Y PDNujhj3fH23hxiwjuaxrjJ4nn4xmmpEVOrMg0DPbXH0li6FFtzJO8q2Rivqcu+ETuLi 3kzNFk04aob1uDiCRAvJpmaPIb1vkJgL9/9uEPQj0NMdoV6Mt2a3Er34WmeWH3EjuqHI bgpMaoAw01B+uWsSuoCsGmsNEXZ4gzjMxdP9BiVmWMfGrOLZFWrlrUAt0bOLBELO8k7u 3pBsYtkkS7HS8D8iSPkDf5OA81qeEBfkgGx9x2dU5QsDVxfyWlBQFNMExHfTJGANCgPt XI6w== X-Gm-Message-State: AMke39mMI5PSMBEHa2cccG0pU2TNJTZ4vw23wX1WVtgPELNJ6jnDqHmwmu5PIvb56lbnENegflv1MNG6v6cIQQ== X-Received: by 10.55.80.3 with SMTP id e3mr9039467qkb.40.1487803573372; Wed, 22 Feb 2017 14:46:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Wed, 22 Feb 2017 14:46:12 -0800 (PST) In-Reply-To: <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> From: Ngie Cooper Date: Wed, 22 Feb 2017 14:46:12 -0800 Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Bryan Drewery Cc: Alexey Dokuchaev , Eric Badger , Bartek Rutkowski , "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, 22 Feb 2017 22:46:14 -0000 On Wed, Feb 22, 2017 at 12:26 PM, Bryan Drewery wrote: ... > I concur. > In the original review for adding this I predicted today would come, > https://reviews.freebsd.org/D6826. I still think that it is very > under-designed and under-thought out. > > I personally agree with hardening my system, but I have a number of > issues with this approach: > > 1. It makes *1 installation* method do hardening, while every other > installation method, and *upgrade* methods not do hardening. So someone > upgrading from 11.0 to 12.0 won't get hardening, but someone installing > from bsdinstall for 12.0 fresh will get it. There should not be a > distinction between our installation/upgrade methods like this. > > 2. It ignores that FreeBSD is *generic Operating System* that serves > many workflows. Developers want all of this off, System Administrators > want all of it on, and Desktop users may want a compromise of half of it > to allow various drivers to work (not pointing at any specific sysctl > right now). > > I think what is really needed is a system profile that lets you pick the > workflow you are going to use the system for, and then set some > reasonable defaults from there. We will never all agree on the same > defaults because we all are using the systems differently, but we can > find some compromise if we make Use Cases, such as a System Profile > would entail. > > I too would like to see this backed out. (Piggybacking on this thread) Silly question -- can all of these knobs please default to off and have a global knob, like securelevel..? Fine grained security is great, but it's really cumbersome tweaking everything properly if you don't need a set property. Otherwise we end up with similar complexity to Windows Group Policies (which is good, but also hell to wade through and thus requires MSDNAA training). Thanks, -Ngie From owner-svn-src-all@freebsd.org Wed Feb 22 22:47: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 8AB62CE9128; Wed, 22 Feb 2017 22:47:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (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 455491579; Wed, 22 Feb 2017 22:47:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id k15so15564048qtg.3; Wed, 22 Feb 2017 14:47:29 -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=flRNwM97f0DmOswDZu00lvVcr0rrUY2VxY5Fhd4VB/g=; b=UVAl/aW2RILMd2458nu/mykODe5kftAWpwR0BTB7PLkpWDo3FpmdNtsbOieFYGDGV+ 92nyaYEvORRWlrViW4P7ePrKF1/kbaZVcQIOvbj2mU4AgrPSirUIdbuQW1PzSVzd5Twe z34qF1/fnaQAMftifzWXo0DKDkAmzo7ZyVAgz4wPC+VeHsFJ/ZNnilEXfcb7cMHISSQ6 88C3LfQ707zF4KieMcDpcUG7V72oJy11jSNsNomOBeuakUEMiVXhKRMxyZXph199v165 belMwr4xXg5kWTS1haYDawkfsasCZMJ43RIMljtgBkkdB24ufky/8YlOmeao31CftbrU dYSA== 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=flRNwM97f0DmOswDZu00lvVcr0rrUY2VxY5Fhd4VB/g=; b=sA/z7nwxWDyIEgmYh4wvLA+uByfJKC3ZQSDAJ3bnJaH4dYJ4B72cAySv0LrlbWKLZg zd6JekQespTYYA27TMGR1uTZhiNwqvCjYFHjiK5q8ZcPt/FOPVTF3i8hRMcC5OFPtqwg sARF92WTViRh/ZiIukY4JQayKGv5Hl1tY/OUDHeAMgi1GHXDIY0DePlYClI8j4+UO1Vz d1l71niD1G21xbgjsidmzXdU8VCJklM7xK7Y58mAFWZ0rHEufSJWoOHhC/JeIuUqjH+p Xs2Hfq9IcF+JYCKQ15CtEeGM7aq5Do1kxtakXStGTDoGtIQshDyf2JJugucTW+8bCz/B KaFA== X-Gm-Message-State: AMke39lJGs69mzw7LJdtWs9pRaAxnYKEySKvYO4C0/Q+1Xs9fcO5a6RRcH0y4WUnzu1p5y9KNLvrjY9E7CjOFg== X-Received: by 10.237.48.105 with SMTP id 96mr9370353qte.246.1487803648346; Wed, 22 Feb 2017 14:47:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Wed, 22 Feb 2017 14:47:27 -0800 (PST) In-Reply-To: References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> From: Ngie Cooper Date: Wed, 22 Feb 2017 14:47:27 -0800 Message-ID: Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Bryan Drewery Cc: Alexey Dokuchaev , Eric Badger , Bartek Rutkowski , "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, 22 Feb 2017 22:47:29 -0000 On Wed, Feb 22, 2017 at 2:46 PM, Ngie Cooper wrote: ... > (Piggybacking on this thread) Silly question -- can all of these knobs > please default to off and have a global knob, like securelevel..? Fine > grained security is great, but it's really cumbersome tweaking > everything properly if you don't need a set property. Otherwise we end > up with similar complexity to Windows Group Policies (which is good, > but also hell to wade through and thus requires MSDNAA training). Correction: I meant MCE/MCP, not MSDNAA. > Thanks, > -Ngie From owner-svn-src-all@freebsd.org Wed Feb 22 23:09: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 628E3CE983F; Wed, 22 Feb 2017 23:09:26 +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 96C5E1FD4; Wed, 22 Feb 2017 23:09:25 +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 v1MN9OG6009549 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 22 Feb 2017 15:09:25 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1MN9On2009548; Wed, 22 Feb 2017 15:09:24 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 22 Feb 2017 15:09:24 -0800 From: Gleb Smirnoff To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313996 - in head/sys: kern sys Message-ID: <20170222230924.GI8899@FreeBSD.org> References: <201702201908.v1KJ8aEE036715@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702201908.v1KJ8aEE036715@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: Wed, 22 Feb 2017 23:09:26 -0000 Mateusz, why do you __predict_false() the recursion scenario? I'm afraid that performance loss for mispredictions could outweight the gain due to predictions. AFAIK, mutex recursion is still a pretty common event in the kernel. On Mon, Feb 20, 2017 at 07:08:36PM +0000, Mateusz Guzik wrote: M> Author: mjg M> Date: Mon Feb 20 19:08:36 2017 M> New Revision: 313996 M> URL: https://svnweb.freebsd.org/changeset/base/313996 M> M> Log: M> mtx: fix spin mutexes interaction with failed fcmpset M> M> While doing so move recursion support down to the fallback routine. M> M> Modified: M> head/sys/kern/kern_mutex.c M> head/sys/sys/mutex.h M> M> Modified: head/sys/kern/kern_mutex.c M> ============================================================================== M> --- head/sys/kern/kern_mutex.c Mon Feb 20 17:33:25 2017 (r313995) M> +++ head/sys/kern/kern_mutex.c Mon Feb 20 19:08:36 2017 (r313996) M> @@ -696,6 +696,14 @@ _mtx_lock_spin_cookie(volatile uintptr_t M> lock_delay_arg_init(&lda, &mtx_spin_delay); M> m = mtxlock2mtx(c); M> M> + if (__predict_false(v == MTX_UNOWNED)) M> + v = MTX_READ_VALUE(m); M> + M> + if (__predict_false(v == tid)) { M> + m->mtx_recurse++; M> + return; M> + } M> + M> if (LOCK_LOG_TEST(&m->lock_object, opts)) M> CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); M> KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), M> M> Modified: head/sys/sys/mutex.h M> ============================================================================== M> --- head/sys/sys/mutex.h Mon Feb 20 17:33:25 2017 (r313995) M> +++ head/sys/sys/mutex.h Mon Feb 20 19:08:36 2017 (r313996) M> @@ -223,12 +223,9 @@ void thread_lock_flags_(struct thread *, M> uintptr_t _v = MTX_UNOWNED; \ M> \ M> spinlock_enter(); \ M> - if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ M> - if (_v == _tid) \ M> - (mp)->mtx_recurse++; \ M> - else \ M> - _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line));\ M> - } else \ M> + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ M> + _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line)); \ M> + else \ M> LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ M> mp, 0, 0, file, line); \ M> } while (0) M> _______________________________________________ M> svn-src-all@freebsd.org mailing list M> https://lists.freebsd.org/mailman/listinfo/svn-src-all M> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Wed Feb 22 23:10: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 9CF3DCE98B2; Wed, 22 Feb 2017 23:10:20 +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 744DB1CB; Wed, 22 Feb 2017 23:10:19 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 7F5DD1330D; Wed, 22 Feb 2017 23:10:17 +0000 (UTC) Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts To: Bryan Drewery , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> From: Allan Jude Message-ID: <5a98141c-5614-372c-5786-1437cc40011a@freebsd.org> Date: Wed, 22 Feb 2017 18:10:04 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qa6doX5Lnxo5F8ibkoBgl1oihMKl3Tqek" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 23:10:20 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Qa6doX5Lnxo5F8ibkoBgl1oihMKl3Tqek Content-Type: multipart/mixed; boundary="jgF1GmIEimvwBt4RGHmK44TLqPoDBCe7M"; protected-headers="v1" From: Allan Jude To: Bryan Drewery , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5a98141c-5614-372c-5786-1437cc40011a@freebsd.org> Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> In-Reply-To: <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> --jgF1GmIEimvwBt4RGHmK44TLqPoDBCe7M Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017-02-22 15:26, Bryan Drewery wrote: > On 2/21/2017 11:07 PM, Joel Dahl wrote: >> On Tue, Feb 21, 2017 at 02:40:02PM +0000, Alexey Dokuchaev wrote: >>> On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: >>>> Thanks for working on making it easier to harden FreeBSD. While >>>> defaulting some of these options to "on" seem pretty harmless (e.g. >>>> random_pid), others are likely to cause confusion for new and >>>> experienced users alike (e.g. proc_debug. I've never used that optio= n >>>> before, so I gave it a try. It simply causes gdb to hang when attemp= ting >>>> to start a process, with no obvious indication of why). >>> >>> I concur. In fact, harmless knobs should probably be turned on by de= fault >>> in FreeBSD itself (i.e., without any "hardening" help from the instal= ler), >>> while more intrusive ones should be opt-in, not opt-out. >> >> I agree. Can we back this out and discuss it on current@? >> >=20 > I concur. > In the original review for adding this I predicted today would come, > https://reviews.freebsd.org/D6826. I still think that it is very > under-designed and under-thought out. >=20 > I personally agree with hardening my system, but I have a number of > issues with this approach: >=20 > 1. It makes *1 installation* method do hardening, while every other > installation method, and *upgrade* methods not do hardening. So someon= e > upgrading from 11.0 to 12.0 won't get hardening, but someone installing= > from bsdinstall for 12.0 fresh will get it. There should not be a > distinction between our installation/upgrade methods like this. I agree with this point, and it was brought up by nwhitehorn in the very initial reviews. There may be some value in giving these knobs wider testing before turning them on, but -current may be a better place to do that. Core is soon to announce a more formalized way to discuss and reach consensus on these types of changes. robak@ can I ask that you back this out for now, and we use that process to determine what the right set of knobs to turn on by default is, and which should be up to the user. >=20 > 2. It ignores that FreeBSD is *generic Operating System* that serves > many workflows. Developers want all of this off, System Administrators= > want all of it on, and Desktop users may want a compromise of half of i= t > to allow various drivers to work (not pointing at any specific sysctl > right now). >=20 > I think what is really needed is a system profile that lets you pick th= e > workflow you are going to use the system for, and then set some > reasonable defaults from there. We will never all agree on the same > defaults because we all are using the systems differently, but we can > find some compromise if we make Use Cases, such as a System Profile > would entail. I think that is a far better approach, but I am not sure what form it would take. Maybe we can discuss as a working group at BSDCan or EuroBSDCon to hammer out a better system that the wide array of sysctls we have. Not just for these hardening ones, but even just for sizing things like the maximum number of file descriptors, default socket buffer sizes, etc.= 'Defaults for a web server' 'Defaults for a development laptop' 'Defaults for a poudriere build box' etc. >=20 > I too would like to see this backed out. >=20 --=20 Allan Jude --jgF1GmIEimvwBt4RGHmK44TLqPoDBCe7M-- --Qa6doX5Lnxo5F8ibkoBgl1oihMKl3Tqek 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.16 (MingW32) iQIcBAEBAgAGBQJYrhpUAAoJEBmVNT4SmAt+XWsP+waz+aHzc1z8q9RdOwqVFfCT l2TP9AEuxCNmu53VLg6YQQScfr5bG50rw9cPu1CZbpaj2NFTTa+kDnIffS4hIgJa bA2uYih66nMWoyRzR6VWCXjPIWyj6ER/3IuDBY+bfBCss0qclA0EB1cXUuxanALn h6zeXCtkGxusnAfa0b3J3XIYwwoxeDXGSkVlIt/RjNtDHtezZVrE1kCBYAp1zBv8 L9IwAJHMjrrgk5CMnURdN28lqnM3O6a1JtjJC5SnHnw0mwqy8yCzXF7GFDBOUsko UjxTIkcYW+xr8DWOfM8xDjoiaJLkjhyouq6lkWBUR+LO1YUg/IceKwz9BvMQmiUB WRD3x9qrxCRpC2P+RtmbJZl655v9p7JywCGyEx8SvgQuG0ESx8Xy3podtuWtqwa5 /ttaETawC46q6xRqa0+VBdHTP0rkwyLrvGZ06tntaDWxLSNrCL3mgdvB6LuQMVad x4EohghsQg7G7JKPWfmwJtreJ0xV5WAfYRFjitPVmPRfqb/gbrUl4LUqaxbKjL5A ePUW/bpblPIsHTF4JKXq0u6rtkyf8izszSbkf7mAOK8oC8X6ePZsbX87tHrwC0Xc FKQPOnNf4WuVAUE+zTV3kgrtiym9HsRi84bVf052DnKp2T4ufSQINkpgv03So7od SW4gzXfEfGRU4sOfpPB/ =EQKw -----END PGP SIGNATURE----- --Qa6doX5Lnxo5F8ibkoBgl1oihMKl3Tqek-- From owner-svn-src-all@freebsd.org Wed Feb 22 23: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 00284CEA27B; Wed, 22 Feb 2017 23:38:00 +0000 (UTC) (envelope-from bdrewery@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 C0775194A; Wed, 22 Feb 2017 23:37:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id E660147F; Wed, 22 Feb 2017 23:37:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 6E69833D3D; Wed, 22 Feb 2017 23:37:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 3CVhofas98D9; Wed, 22 Feb 2017 23:37:27 +0000 (UTC) Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com B020933D32 To: Allan Jude , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> <5a98141c-5614-372c-5786-1437cc40011a@freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <4a6a2564-eca7-fa5b-b659-e4818a257245@FreeBSD.org> Date: Wed, 22 Feb 2017 15:37:11 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <5a98141c-5614-372c-5786-1437cc40011a@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XBFnAfPLAF0oX6oSCOBTbJlEFtRSCigHS" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 23:38:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XBFnAfPLAF0oX6oSCOBTbJlEFtRSCigHS Content-Type: multipart/mixed; boundary="w2qjvgcNMJgjvVoei23lemuiXTJhrpXCv"; protected-headers="v1" From: Bryan Drewery To: Allan Jude , Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <4a6a2564-eca7-fa5b-b659-e4818a257245@FreeBSD.org> Subject: Re: svn commit: r314036 - head/usr.sbin/bsdinstall/scripts References: <201702210937.v1L9bY6V093836@repo.freebsd.org> <28a4cf5e-2edd-3e30-9ecd-817f886e9ea3@FreeBSD.org> <20170221144002.GA87822@FreeBSD.org> <20170222070733.GA29010@ymer.vnode.se> <6550638c-a629-bf5e-65e0-672cfd125f73@FreeBSD.org> <5a98141c-5614-372c-5786-1437cc40011a@freebsd.org> In-Reply-To: <5a98141c-5614-372c-5786-1437cc40011a@freebsd.org> --w2qjvgcNMJgjvVoei23lemuiXTJhrpXCv Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2/22/2017 3:10 PM, Allan Jude wrote: > On 2017-02-22 15:26, Bryan Drewery wrote: >> On 2/21/2017 11:07 PM, Joel Dahl wrote: >>> On Tue, Feb 21, 2017 at 02:40:02PM +0000, Alexey Dokuchaev wrote: >>>> On Tue, Feb 21, 2017 at 08:34:29AM -0600, Eric Badger wrote: >>>>> Thanks for working on making it easier to harden FreeBSD. While >>>>> defaulting some of these options to "on" seem pretty harmless (e.g.= >>>>> random_pid), others are likely to cause confusion for new and >>>>> experienced users alike (e.g. proc_debug. I've never used that opti= on >>>>> before, so I gave it a try. It simply causes gdb to hang when attem= pting >>>>> to start a process, with no obvious indication of why). >>>> >>>> I concur. In fact, harmless knobs should probably be turned on by d= efault >>>> in FreeBSD itself (i.e., without any "hardening" help from the insta= ller), >>>> while more intrusive ones should be opt-in, not opt-out. >>> >>> I agree. Can we back this out and discuss it on current@? >>> >> >> I concur. >> In the original review for adding this I predicted today would come, >> https://reviews.freebsd.org/D6826. I still think that it is very >> under-designed and under-thought out. >> >> I personally agree with hardening my system, but I have a number of >> issues with this approach: >> >> 1. It makes *1 installation* method do hardening, while every other >> installation method, and *upgrade* methods not do hardening. So someo= ne >> upgrading from 11.0 to 12.0 won't get hardening, but someone installin= g >> from bsdinstall for 12.0 fresh will get it. There should not be a >> distinction between our installation/upgrade methods like this. >=20 > I agree with this point, and it was brought up by nwhitehorn in the ver= y > initial reviews. >=20 > There may be some value in giving these knobs wider testing before > turning them on, but -current may be a better place to do that. >=20 > Core is soon to announce a more formalized way to discuss and reach > consensus on these types of changes. robak@ can I ask that you back thi= s > out for now, and we use that process to determine what the right set of= > knobs to turn on by default is, and which should be up to the user. >=20 >> >> 2. It ignores that FreeBSD is *generic Operating System* that serves >> many workflows. Developers want all of this off, System Administrator= s >> want all of it on, and Desktop users may want a compromise of half of = it >> to allow various drivers to work (not pointing at any specific sysctl >> right now). >> >> I think what is really needed is a system profile that lets you pick t= he >> workflow you are going to use the system for, and then set some >> reasonable defaults from there. We will never all agree on the same >> defaults because we all are using the systems differently, but we can >> find some compromise if we make Use Cases, such as a System Profile >> would entail. >=20 > I think that is a far better approach, but I am not sure what form it > would take. Maybe we can discuss as a working group at BSDCan or > EuroBSDCon to hammer out a better system that the wide array of sysctls= > we have. >=20 > Not just for these hardening ones, but even just for sizing things like= > the maximum number of file descriptors, default socket buffer sizes, et= c. >=20 > 'Defaults for a web server' > 'Defaults for a development laptop' > 'Defaults for a poudriere build box' > etc. >=20 Yup. If the base system goes this route then the ports tree might follow and give different defaults for each profile. It's hard technically but agreeing on such an approach and design is the first step before figuring out the technical hurdles to solve (speaking of multiple package sets problem). >> >> I too would like to see this backed out. >> >=20 >=20 --=20 Regards, Bryan Drewery --w2qjvgcNMJgjvVoei23lemuiXTJhrpXCv-- --XBFnAfPLAF0oX6oSCOBTbJlEFtRSCigHS 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 iQEcBAEBAgAGBQJYriCnAAoJEDXXcbtuRpfPV/UH/0WblTcGpcGNcJb41Eic6IqC NPj3OC/xIaG3gX1YWC2v2+hN9fuwDXpSV8VLuHTYTnjvxe1G/D0YZI2DvRldEmYM fardDkMNASgXj3CfeTR3s2fVzff+5CQOSghOntb3YtdzCRY9DlylCsgJjfGb5+aa EVJb2hfpEB58fKx1K75iOmv2F5mFA+mFTn9Yp1NF+XMegRHDoXJhjaDIJWtuz4th B8e5isAnTxBa3alGBkmqiiZ7Xg4nGHn8C8+JZefmOXs5MBjO8iVC7f480iSfd3rZ b9OAdElVOTgHsj40XrNAK3XsuzoMONTvkqq/srSdUUV+GBMK8VT8Wrs8y1xYCpg= =gYxb -----END PGP SIGNATURE----- --XBFnAfPLAF0oX6oSCOBTbJlEFtRSCigHS-- From owner-svn-src-all@freebsd.org Wed Feb 22 23: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 A558ECEA7B8; Wed, 22 Feb 2017 23:57:23 +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 63530233; Wed, 22 Feb 2017 23:57:23 +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 v1MNvM2K043203; Wed, 22 Feb 2017 23:57:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MNvM72043202; Wed, 22 Feb 2017 23:57:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702222357.v1MNvM72043202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 22 Feb 2017 23:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314113 - 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: Wed, 22 Feb 2017 23:57:23 -0000 Author: asomers Date: Wed Feb 22 23:57:22 2017 New Revision: 314113 URL: https://svnweb.freebsd.org/changeset/base/314113 Log: Remove tests/sys/netinet/fibs_tests's dependency on net/socat Instead of bridging two tap interfaces with socat, just use an epair pair. MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/tests/sys/netinet/fibs_test.sh Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Wed Feb 22 22:00:50 2017 (r314112) +++ head/tests/sys/netinet/fibs_test.sh Wed Feb 22 23:57:22 2017 (r314113) @@ -39,8 +39,7 @@ # arpresolve only checked the default route. # # Outline: -# Create two tap(4) interfaces -# Simulate a crossover cable between them by using net/socat +# Create two connected epair(4) interfaces # Use nping (from security/nmap) to send an ICMP echo request from one # interface to the other, spoofing the source IP. The source IP must be # spoofed, or else it will already have an entry in the arp table. @@ -51,7 +50,7 @@ arpresolve_checks_interface_fib_head() atf_set "descr" "arpresolve should check the interface fib, not the default fib, for routes" atf_set "require.user" "root" atf_set "require.config" "fibs" - atf_set "require.progs" "socat nping" + atf_set "require.progs" "nping" } arpresolve_checks_interface_fib_body() { @@ -74,19 +73,13 @@ arpresolve_checks_interface_fib_body() fi get_fibs 2 - # Configure TAP interfaces - setup_tap "$FIB0" inet ${ADDR0} ${MASK0} - TAP0=$TAP - setup_tap "$FIB1" inet ${ADDR1} ${MASK1} - TAP1=$TAP - - # Simulate a crossover cable - socat /dev/${TAP0} /dev/${TAP1} & - SOCAT_PID=$! - echo ${SOCAT_PID} >> "processes_to_kill" + # Configure epair interfaces + get_epair + setup_iface "$EPAIRA" "$FIB0" inet ${ADDR0} ${MASK0} + setup_iface "$EPAIRB" "$FIB1" inet ${ADDR1} ${MASK1} # Send an ICMP echo request with a spoofed source IP - setfib 2 nping -c 1 -e ${TAP0} -S ${SPOOF_ADDR} \ + setfib "$FIB0" nping -c 1 -e ${EPAIRA} -S ${SPOOF_ADDR} \ --source-mac ${SPOOF_MAC} --icmp --icmp-type "echo-request" \ --icmp-code 0 --icmp-id 0xdead --icmp-seq 1 --data 0xbeef \ ${ADDR1} @@ -94,17 +87,11 @@ arpresolve_checks_interface_fib_body() # characteristic error message dmesg | grep "llinfo.*${SPOOF_ADDR}" # Check that the ARP entry exists - atf_check -o match:"${SPOOF_ADDR}.*expires" setfib 3 arp ${SPOOF_ADDR} + atf_check -o match:"${SPOOF_ADDR}.*expires" setfib "$FIB1" arp ${SPOOF_ADDR} } arpresolve_checks_interface_fib_cleanup() { - if [ -f processes_to_kill ]; then - for pid in $(cat processes_to_kill); do - kill "${pid}" - done - rm -f processes_to_kill - fi - cleanup_tap + cleanup_ifaces } @@ -163,7 +150,7 @@ loopback_and_network_routes_on_nondefaul loopback_and_network_routes_on_nondefault_fib_cleanup() { - cleanup_tap + cleanup_ifaces } atf_test_case loopback_and_network_routes_on_nondefault_fib_inet6 cleanup @@ -221,7 +208,7 @@ loopback_and_network_routes_on_nondefaul loopback_and_network_routes_on_nondefault_fib_inet6_cleanup() { - cleanup_tap + cleanup_ifaces } @@ -270,7 +257,7 @@ default_route_with_multiple_fibs_on_same default_route_with_multiple_fibs_on_same_subnet_cleanup() { - cleanup_tap + cleanup_ifaces } atf_test_case default_route_with_multiple_fibs_on_same_subnet_inet6 cleanup @@ -317,7 +304,7 @@ default_route_with_multiple_fibs_on_same default_route_with_multiple_fibs_on_same_subnet_inet6_cleanup() { - cleanup_tap + cleanup_ifaces } @@ -357,7 +344,7 @@ same_ip_multiple_ifaces_fib0_body() } same_ip_multiple_ifaces_fib0_cleanup() { - cleanup_tap + cleanup_ifaces } # Regression test for PR kern/189088 @@ -408,7 +395,7 @@ same_ip_multiple_ifaces_cleanup() { # Due to PR kern/189088, we must destroy the interfaces in LIFO order # in order for the routes to be correctly cleaned up. - for TAPD in `tail -r "tap_devices_to_cleanup"`; do + for TAPD in `tail -r "ifaces_to_cleanup"`; do echo ifconfig ${TAPD} destroy ifconfig ${TAPD} destroy done @@ -453,7 +440,7 @@ same_ip_multiple_ifaces_inet6_body() } same_ip_multiple_ifaces_inet6_cleanup() { - cleanup_tap + cleanup_ifaces } # Regression test for kern/187550 @@ -491,7 +478,7 @@ subnet_route_with_multiple_fibs_on_same_ subnet_route_with_multiple_fibs_on_same_subnet_cleanup() { - cleanup_tap + cleanup_ifaces } atf_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6 cleanup @@ -528,7 +515,7 @@ subnet_route_with_multiple_fibs_on_same_ subnet_route_with_multiple_fibs_on_same_subnet_inet6_cleanup() { - cleanup_tap + cleanup_ifaces } # Test that source address selection works correctly for UDP packets with @@ -579,7 +566,7 @@ udp_dontroute_body() # return ENETUNREACH, or send the packet to the wrong tap atf_check -o ignore setfib ${FIB0} \ ${SRCDIR}/udp_dontroute ${TARGET} /dev/${TARGET_TAP} - cleanup_tap + cleanup_ifaces # Repeat, but this time target the other tap setup_tap ${FIB0} inet ${ADDR0} ${MASK} @@ -592,7 +579,7 @@ udp_dontroute_body() udp_dontroute_cleanup() { - cleanup_tap + cleanup_ifaces } atf_test_case udp_dontroute6 cleanup @@ -634,7 +621,7 @@ udp_dontroute6_body() # 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 + cleanup_ifaces # Repeat, but this time target the other tap setup_tap ${FIB0} inet6 ${ADDR0} ${MASK} no_dad @@ -647,7 +634,7 @@ udp_dontroute6_body() udp_dontroute6_cleanup() { - cleanup_tap + cleanup_ifaces } @@ -688,22 +675,58 @@ get_fibs() done } +# Creates a new pair of connected epair(4) interface, registers them for +# cleanup, and returns their namen via the environment variables EPAIRA and +# EPAIRB +get_epair() +{ + local EPAIRD + + if EPAIRD=`ifconfig epair create`; then + # Record the TAP device so we can clean it up later + echo ${EPAIRD} >> "ifaces_to_cleanup" + EPAIRA=${EPAIRD} + EPAIRB=${EPAIRD%a}b + else + atf_skip "Could not create epair(4) interfaces" + fi +} + # Creates a new tap(4) interface, registers it for cleanup, and returns the # name via the environment variable TAP get_tap() { - local TAPN=0 - while ! ifconfig tap${TAPN} create > /dev/null 2>&1; do - if [ "$TAPN" -ge 8 ]; then - atf_skip "Could not create a tap(4) interface" - else - TAPN=$(($TAPN + 1)) - fi - done - local TAPD=tap${TAPN} - # Record the TAP device so we can clean it up later - echo ${TAPD} >> "tap_devices_to_cleanup" - TAP=${TAPD} + local TAPD + + if TAPD=`ifconfig tap create`; then + # Record the TAP device so we can clean it up later + echo ${TAPD} >> "ifaces_to_cleanup" + TAP=${TAPD} + else + atf_skip "Could not create a tap(4) interface" + fi +} + +# Configure an ethernet interface +# parameters: +# Interface name +# fib +# Protocol (inet or inet6) +# IP address +# Netmask in number of bits (eg 24 or 8) +# Extra flags +# Return: None +setup_iface() +{ + local IFACE=$1 + local FIB=$2 + local PROTO=$3 + local ADDR=$4 + local MASK=$5 + local FLAGS=$6 + echo setfib ${FIB} \ + ifconfig $IFACE ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS + setfib ${FIB} ifconfig $IFACE ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS } # Create a tap(4) interface, configure it, and register it for cleanup. @@ -716,23 +739,17 @@ get_tap() # Return: the tap interface name as the env variable TAP setup_tap() { - local FIB=$1 - local PROTO=$2 - local ADDR=$3 - local MASK=$4 - local FLAGS=$5 get_tap - echo setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS - setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS + setup_iface "$TAP" "$@" } -cleanup_tap() +cleanup_ifaces() { - if [ -f tap_devices_to_cleanup ]; then - for tap_device in $(cat tap_devices_to_cleanup); do - echo ifconfig "${tap_device}" destroy - ifconfig "${tap_device}" destroy 2>/dev/null || true + if [ -f ifaces_to_cleanup ]; then + for iface in $(cat ifaces_to_cleanup); do + echo ifconfig "${iface}" destroy + ifconfig "${iface}" destroy 2>/dev/null || true done - rm -f tap_devices_to_cleanup + rm -f ifaces_to_cleanup fi } From owner-svn-src-all@freebsd.org Wed Feb 22 23:58: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 B41B1CEA821; Wed, 22 Feb 2017 23:58:55 +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 83BC33CC; Wed, 22 Feb 2017 23:58:55 +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 v1MNwsUN043293; Wed, 22 Feb 2017 23:58:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1MNwsDB043292; Wed, 22 Feb 2017 23:58:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702222358.v1MNwsDB043292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Feb 2017 23:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314114 - head/sys/boot/mips/beri/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 22 Feb 2017 23:58:55 -0000 Author: jhb Date: Wed Feb 22 23:58:54 2017 New Revision: 314114 URL: https://svnweb.freebsd.org/changeset/base/314114 Log: Use LDFLAGS with CC instead of _LDFLAGS. This is a followup to r311458. _LDFLAGS is for use with LD, whereas LDFLAGS is for use with CC. Modified: head/sys/boot/mips/beri/boot2/Makefile Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Wed Feb 22 23:57:22 2017 (r314113) +++ head/sys/boot/mips/beri/boot2/Makefile Wed Feb 22 23:58:54 2017 (r314114) @@ -71,7 +71,7 @@ LDFLAGS= -nostdlib \ CFLAGS+= -I${.CURDIR}/../common flashboot.elf: relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${CC} ${_LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ + ${CC} ${LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} flashboot: flashboot.elf ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} @@ -79,7 +79,7 @@ flashboot.md5: flashboot md5 flashboot > flashboot.md5 jtagboot: start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${CC} ${_LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ + ${CC} ${LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSTAND} jtagboot.md5: jtagboot md5 jtagboot > jtagboot.md5 From owner-svn-src-all@freebsd.org Thu Feb 23 00:02: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 92B51CEAA94; Thu, 23 Feb 2017 00:02:50 +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 52536A75; Thu, 23 Feb 2017 00:02:50 +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 v1N02n3v047001; Thu, 23 Feb 2017 00:02:49 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N02nA3047000; Thu, 23 Feb 2017 00:02:49 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702230002.v1N02nA3047000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 Feb 2017 00:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314115 - head/libexec/rtld-elf/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 00:02:50 -0000 Author: jhb Date: Thu Feb 23 00:02:49 2017 New Revision: 314115 URL: https://svnweb.freebsd.org/changeset/base/314115 Log: Fully handle the special encoding of GOT[1] on mips64. The MIPS ABI does not require the second GOT entry to be reserved for use by the runtime linker as on other architectures. Instead, static linkers use a special value in the second GOT entry to indicate if the entry is reserved. This value is supposed to consist of an address with the MSB set and the rest of the bits all zero which is an invalid user address. However, the old binutils currently in the tree uses the 32-bit mask value (2^31) on 64-bit MIPS instead of 2^63. This was fixed in upstream binutils in 2008 to use 2^63 on 64-bit MIPS. The first part of this change changes the runtime check in init_pltgot() to check for both values (2^31 and 2^63) when deciding whether to store the current object pointer in GOT[1] which fixes dynamic N64 binaries compiled with modern binutils. However, the initial version of this fix exposed another related bug in that _rtld_relocate_nonplt_self() was only checking for the new value (2^63) in GOT[1] and incorrectly treated GOT[1] as a local GOT entry (and did not relocate the final local GOT entry). To handle this, fix all of the places that check for GOT[1]'s status to use the same macro that checks for both values on N64. Reviewed by: kan, imp Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D9708 Modified: head/libexec/rtld-elf/mips/reloc.c Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Wed Feb 22 23:58:54 2017 (r314114) +++ head/libexec/rtld-elf/mips/reloc.c Thu Feb 23 00:02:49 2017 (r314115) @@ -51,12 +51,28 @@ __FBSDID("$FreeBSD$"); #define GOT1_MASK 0x80000000UL #endif +/* + * Determine if the second GOT entry is reserved for rtld or if it is + * the first "real" GOT entry. + * + * This must be a macro rather than a function so that + * _rtld_relocate_nonplt_self doesn't trigger a GOT invocation trying + * to use it before the local GOT entries in rtld are adjusted. + */ +#ifdef __mips_n64 +/* Old binutils uses the 32-bit GOT1 mask value for N64. */ +#define GOT1_RESERVED_FOR_RTLD(got) \ + (((got)[1] == 0x80000000) || (got)[1] & GOT1_MASK) +#else +#define GOT1_RESERVED_FOR_RTLD(got) ((got)[1] & GOT1_MASK) +#endif + void init_pltgot(Obj_Entry *obj) { if (obj->pltgot != NULL) { obj->pltgot[0] = (Elf_Addr) &_rtld_bind_start; - if (obj->pltgot[1] & 0x80000000) + if (GOT1_RESERVED_FOR_RTLD(obj->pltgot)) obj->pltgot[1] = (Elf_Addr) obj | GOT1_MASK; } } @@ -175,7 +191,7 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp } } - i = (got[1] & GOT1_MASK) ? 2 : 1; + i = GOT1_RESERVED_FOR_RTLD(got) ? 2 : 1; /* Relocate the local GOT entries */ got += i; for (; i < local_gotno; i++) { @@ -294,7 +310,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry dbg("%s: broken=%d", obj->path, broken); #endif - i = (got[1] & GOT1_MASK) ? 2 : 1; + i = GOT1_RESERVED_FOR_RTLD(got) ? 2 : 1; /* Relocate the local GOT entries */ got += i; From owner-svn-src-all@freebsd.org Thu Feb 23 01:00: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 C3981CE75AB; Thu, 23 Feb 2017 01:00: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 A0E2F114; Thu, 23 Feb 2017 01:00: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 D4DC310A7B9; Wed, 22 Feb 2017 20:00:11 -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: r314114 - head/sys/boot/mips/beri/boot2 Date: Wed, 22 Feb 2017 16:52:49 -0800 Message-ID: <1574335.5iLHk6vlTE@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702222358.v1MNwsDB043292@repo.freebsd.org> References: <201702222358.v1MNwsDB043292@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); Wed, 22 Feb 2017 20:00:11 -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: Thu, 23 Feb 2017 01:00:13 -0000 On Wednesday, February 22, 2017 11:58:54 PM John Baldwin wrote: > Author: jhb > Date: Wed Feb 22 23:58:54 2017 > New Revision: 314114 > URL: https://svnweb.freebsd.org/changeset/base/314114 > > Log: > Use LDFLAGS with CC instead of _LDFLAGS. > > This is a followup to r311458. _LDFLAGS is for use with LD, whereas > LDFLAGS is for use with CC. This was actually Reviewed by: kan and D9707. Forgot to add metadata to commit. :-/ -- John Baldwin From owner-svn-src-all@freebsd.org Thu Feb 23 01:18: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 6880DCE813B; Thu, 23 Feb 2017 01:18:48 +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 35B43F36; Thu, 23 Feb 2017 01:18:48 +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 v1N1IlsT075209; Thu, 23 Feb 2017 01:18:47 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N1IlwM075208; Thu, 23 Feb 2017 01:18:47 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201702230118.v1N1IlwM075208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Thu, 23 Feb 2017 01:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314116 - 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, 23 Feb 2017 01:18:48 -0000 Author: jtl Date: Thu Feb 23 01:18:47 2017 New Revision: 314116 URL: https://svnweb.freebsd.org/changeset/base/314116 Log: Fix a panic during boot caused by inadequate locking of some vt(4) driver data structures. vt_change_font() calls vtbuf_grow() to change some vt driver data structures. It uses TF_MUTE to prevent the console from trying to use those data structures while it changes them. During the early stage of the boot process, the vt driver's tc_done routine uses those data structures; however, it is currently called outside the TF_MUTE check. Move the tc_done routine inside the locked TF_MUTE check. PR: 217282 Reviewed by: ed, ray Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D9709 Modified: head/sys/kern/subr_terminal.c Modified: head/sys/kern/subr_terminal.c ============================================================================== --- head/sys/kern/subr_terminal.c Thu Feb 23 00:02:49 2017 (r314115) +++ head/sys/kern/subr_terminal.c Thu Feb 23 01:18:47 2017 (r314116) @@ -375,7 +375,10 @@ termtty_outwakeup(struct tty *tp) TERMINAL_UNLOCK_TTY(tm); } - tm->tm_class->tc_done(tm); + TERMINAL_LOCK_TTY(tm); + if (!(tm->tm_flags & TF_MUTE)) + tm->tm_class->tc_done(tm); + TERMINAL_UNLOCK_TTY(tm); if (flags & TF_BELL) tm->tm_class->tc_bell(tm); } @@ -545,10 +548,9 @@ termcn_cnputc(struct consdev *cp, int c) teken_set_curattr(&tm->tm_emulator, &kernel_message); teken_input(&tm->tm_emulator, &cv, 1); teken_set_curattr(&tm->tm_emulator, &backup); + tm->tm_class->tc_done(tm); } TERMINAL_UNLOCK_CONS(tm); - - tm->tm_class->tc_done(tm); } /* From owner-svn-src-all@freebsd.org Thu Feb 23 01:30: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 B2452CE863C; Thu, 23 Feb 2017 01:30:03 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (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 6ED901577; Thu, 23 Feb 2017 01:30:03 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-qk0-x233.google.com with SMTP id u188so19738976qkc.2; Wed, 22 Feb 2017 17:30:03 -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=GHXUb9Ha+n76F79OBinuw0Bt8ZrHU25xKHW6Xtm9nRg=; b=nlAkmwW8b/sWCHmxaDN7KQ9Q9lbMOu7xcO3Zs524dWvXD7YcQZqe7+5rhcz9UZTi84 QdJ2DaTfdpglUZjHXaYHuVkOU1lZcK4gdHiUH4tqpGwVBI9o38dyIowLbj5g3yJ++n97 QBdOlVQpfNnpHmMQi+y2GUcYl7I/+GDMnSpt4IaRFXF6UEs/oPCHHuL3sdneg5LuCzPq LsFaqT3SPJFA0ZG6ZraUzBWlOiCrP+xWlyq/aZbrnJU5iY478QakP06q1XdxscFa3okh 1e8J1H+qQtInyWvMEcaVSqGhjyOgTHWnLqZ/HmLgqNz11iHR7pJfZw9Ymk08/fESAu9d sduA== 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=GHXUb9Ha+n76F79OBinuw0Bt8ZrHU25xKHW6Xtm9nRg=; b=CspL/yemDghz+28giF76Gq+qzkaRpK3ZZ6f3VQuPFTyImr0PYaxkQuuYgdXgLr8Zdn 341c4QxVISS48plDbAxYPS1bYXF8I+S96tsmezhk2/TK9y2sJqZmPm27TaSvUMSBJQw8 qHWBS0M6vVwbkJIuMfo+tfSZo0yPI2X9FUc7+q9N4KgBcCTS0rfjntpFd9+IQAJWCS7k k4WFsYiZtvGmnJQLMshtIqnf6GjPqE/v4KOINr/BlejnVVpYyQE8d88j8XrJCUDHHPIl ijrmnMCsUtJw+VtVEiQ0mzSZp2RXpOzySPHiBRjjAFnZjXrBAzW/TDfBfOKhbq9Evl90 EkvA== X-Gm-Message-State: AMke39lTQMLHRTk94Mw4aLMIja/otbls+5BQqCVvB1YZNDq2b0GvdcjP8Pfmfpr5PyPo92xRTkIkL/kYVo+wsw== X-Received: by 10.55.18.82 with SMTP id c79mr5048598qkh.119.1487813402524; Wed, 22 Feb 2017 17:30:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.43.120 with HTTP; Wed, 22 Feb 2017 17:30:02 -0800 (PST) In-Reply-To: <201702230118.v1N1IlwM075208@repo.freebsd.org> References: <201702230118.v1N1IlwM075208@repo.freebsd.org> From: Jonathan Looney Date: Wed, 22 Feb 2017 20:30:02 -0500 Message-ID: Subject: Re: svn commit: r314116 - head/sys/kern To: "Jonathan T. Looney" 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: Thu, 23 Feb 2017 01:30:03 -0000 On Wed, Feb 22, 2017 at 8:18 PM, Jonathan T. Looney wrote: > Author: jtl > Date: Thu Feb 23 01:18:47 2017 > New Revision: 314116 > URL: https://svnweb.freebsd.org/changeset/base/314116 > > Log: > Fix a panic during boot caused by inadequate locking of some vt(4) driver > data structures. > > vt_change_font() calls vtbuf_grow() to change some vt driver data > structures. It uses TF_MUTE to prevent the console from trying to use > those > data structures while it changes them. > > During the early stage of the boot process, the vt driver's tc_done > routine > uses those data structures; however, it is currently called outside the > TF_MUTE check. > > Move the tc_done routine inside the locked TF_MUTE check. > > PR: 217282 > Reviewed by: ed, ray > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D9709 Sorry, this should also say: MFC after: 2 weeks The change should go back to stable/11, since EARLY_AP_STARTUP is an option there. (It appears EARLY_AP_STARTUP is a prerequisite for hitting this bug.) Jonathan From owner-svn-src-all@freebsd.org Thu Feb 23 02:28: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 C9B9BCE9D87; Thu, 23 Feb 2017 02:28:09 +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 5CEFE1498; Thu, 23 Feb 2017 02:28:09 +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 v1N2S8Yc003638; Thu, 23 Feb 2017 02:28:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N2S8V3003636; Thu, 23 Feb 2017 02:28:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702230228.v1N2S8V3003636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 23 Feb 2017 02:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314117 - in head/usr.sbin/makefs: . cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 02:28:09 -0000 Author: emaste Date: Thu Feb 23 02:28:08 2017 New Revision: 314117 URL: https://svnweb.freebsd.org/changeset/base/314117 Log: makefs: eliminate global cd9660 structure For diff reduction with NetBSD NetBSD file versions: cd9660.c 1.39 cd9660.h 1.19 cd9660/cd9660_debug.c 1.12 cd9660/cd9660_eltorito.c 1.20 cd9660/cd9660_write.c 1.16 cd9660/iso9660_rrip.c 1.12 cd9660/iso9660_rrip.h 1.6 Reviewed by: ngie Obtained from: NetBSD MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9627 Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/cd9660.h head/usr.sbin/makefs/cd9660/cd9660_debug.c head/usr.sbin/makefs/cd9660/cd9660_eltorito.c head/usr.sbin/makefs/cd9660/cd9660_write.c head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/cd9660/iso9660_rrip.h Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Thu Feb 23 01:18:47 2017 (r314116) +++ head/usr.sbin/makefs/cd9660.c Thu Feb 23 02:28:08 2017 (r314117) @@ -109,58 +109,59 @@ __FBSDID("$FreeBSD$"); #include "cd9660/iso9660_rrip.h" #include "cd9660/cd9660_archimedes.h" -/* - * Global variables - */ -iso9660_disk diskStructure; - -static void cd9660_finalize_PVD(void); +static void cd9660_finalize_PVD(iso9660_disk *); static cd9660node *cd9660_allocate_cd9660node(void); -static void cd9660_set_defaults(void); +static void cd9660_set_defaults(iso9660_disk *); static int cd9660_arguments_set_string(const char *, const char *, int, char, char *); static void cd9660_populate_iso_dir_record( struct _iso_directory_record_cd9660 *, u_char, u_char, u_char, const char *); -static void cd9660_setup_root_node(void); -static int cd9660_setup_volume_descriptors(void); +static void cd9660_setup_root_node(iso9660_disk *); +static int cd9660_setup_volume_descriptors(iso9660_disk *); #if 0 static int cd9660_fill_extended_attribute_record(cd9660node *); #endif static void cd9660_sort_nodes(cd9660node *); -static int cd9660_translate_node_common(cd9660node *); -static int cd9660_translate_node(fsnode *, cd9660node *); +static int cd9660_translate_node_common(iso9660_disk *, cd9660node *); +static int cd9660_translate_node(iso9660_disk *, fsnode *, cd9660node *); static int cd9660_compare_filename(const char *, const char *); static void cd9660_sorted_child_insert(cd9660node *, cd9660node *); -static int cd9660_handle_collisions(cd9660node *, int); -static cd9660node *cd9660_rename_filename(cd9660node *, int, int); -static void cd9660_copy_filenames(cd9660node *); +static int cd9660_handle_collisions(iso9660_disk *, cd9660node *, int); +static cd9660node *cd9660_rename_filename(iso9660_disk *, cd9660node *, int, + int); +static void cd9660_copy_filenames(iso9660_disk *, cd9660node *); static void cd9660_sorting_nodes(cd9660node *); static int cd9660_count_collisions(cd9660node *); -static cd9660node *cd9660_rrip_move_directory(cd9660node *); -static int cd9660_add_dot_records(cd9660node *); +static cd9660node *cd9660_rrip_move_directory(iso9660_disk *, cd9660node *); +static int cd9660_add_dot_records(iso9660_disk *, cd9660node *); -static void cd9660_convert_structure(fsnode *, cd9660node *, int, +static void cd9660_convert_structure(iso9660_disk *, fsnode *, cd9660node *, int, int *, int *); static void cd9660_free_structure(cd9660node *); -static int cd9660_generate_path_table(void); -static int cd9660_level1_convert_filename(const char *, char *, int); -static int cd9660_level2_convert_filename(const char *, char *, int); +static int cd9660_generate_path_table(iso9660_disk *); +static int cd9660_level1_convert_filename(iso9660_disk *, const char *, char *, + int); +static int cd9660_level2_convert_filename(iso9660_disk *, const char *, char *, + int); #if 0 -static int cd9660_joliet_convert_filename(const char *, char *, int); +static int cd9660_joliet_convert_filename(iso9660_disk *, const char *, char *, + int); #endif -static int cd9660_convert_filename(const char *, char *, int); -static void cd9660_populate_dot_records(cd9660node *); -static int64_t cd9660_compute_offsets(cd9660node *, int64_t); +static int cd9660_convert_filename(iso9660_disk *, const char *, char *, int); +static void cd9660_populate_dot_records(iso9660_disk *, cd9660node *); +static int64_t cd9660_compute_offsets(iso9660_disk *, cd9660node *, int64_t); #if 0 static int cd9660_copy_stat_info(cd9660node *, cd9660node *, int); #endif -static cd9660node *cd9660_create_virtual_entry(const char *, cd9660node *, int, - int); -static cd9660node *cd9660_create_file(const char *, cd9660node *, cd9660node *); -static cd9660node *cd9660_create_directory(const char *, cd9660node *, +static cd9660node *cd9660_create_virtual_entry(iso9660_disk *, const char *, + cd9660node *, int, int); +static cd9660node *cd9660_create_file(iso9660_disk *, const char *, + cd9660node *, cd9660node *); +static cd9660node *cd9660_create_directory(iso9660_disk *, const char *, + cd9660node *, cd9660node *); +static cd9660node *cd9660_create_special_directory(iso9660_disk *, u_char, cd9660node *); -static cd9660node *cd9660_create_special_directory(u_char, cd9660node *); /* @@ -191,72 +192,79 @@ int cd9660_defaults_set = 0; * Set default values for cd9660 extension to makefs */ static void -cd9660_set_defaults(void) +cd9660_set_defaults(iso9660_disk *diskStructure) { /*Fix the sector size for now, though the spec allows for other sizes*/ - diskStructure.sectorSize = 2048; + diskStructure->sectorSize = 2048; /* Set up defaults in our own structure */ - diskStructure.verbose_level = 0; - diskStructure.keep_bad_images = 0; - diskStructure.follow_sym_links = 0; - diskStructure.isoLevel = 2; - - diskStructure.rock_ridge_enabled = 0; - diskStructure.rock_ridge_renamed_dir_name = 0; - diskStructure.rock_ridge_move_count = 0; - diskStructure.rr_moved_dir = 0; + diskStructure->verbose_level = 0; + diskStructure->keep_bad_images = 0; + diskStructure->follow_sym_links = 0; + diskStructure->isoLevel = 2; + + diskStructure->rock_ridge_enabled = 0; + diskStructure->rock_ridge_renamed_dir_name = 0; + diskStructure->rock_ridge_move_count = 0; + diskStructure->rr_moved_dir = 0; - diskStructure.archimedes_enabled = 0; - diskStructure.chrp_boot = 0; + diskStructure->archimedes_enabled = 0; + diskStructure->chrp_boot = 0; - diskStructure.include_padding_areas = 1; + diskStructure->include_padding_areas = 1; /* Spec breaking functionality */ - diskStructure.allow_deep_trees = - diskStructure.allow_start_dot = - diskStructure.allow_max_name = - diskStructure.allow_illegal_chars = - diskStructure.allow_lowercase = - diskStructure.allow_multidot = - diskStructure.omit_trailing_period = 0; + diskStructure->allow_deep_trees = + diskStructure->allow_start_dot = + diskStructure->allow_max_name = + diskStructure->allow_illegal_chars = + diskStructure->allow_lowercase = + diskStructure->allow_multidot = + diskStructure->omit_trailing_period = 0; /* Make sure the PVD is clear */ - memset(&diskStructure.primaryDescriptor, 0, 2048); + memset(&diskStructure->primaryDescriptor, 0, 2048); - memset(diskStructure.primaryDescriptor.publisher_id, 0x20,128); - memset(diskStructure.primaryDescriptor.preparer_id, 0x20,128); - memset(diskStructure.primaryDescriptor.application_id, 0x20,128); - memset(diskStructure.primaryDescriptor.copyright_file_id, 0x20,37); - memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,37); - memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,37); + memset(diskStructure->primaryDescriptor.publisher_id, 0x20,128); + memset(diskStructure->primaryDescriptor.preparer_id, 0x20,128); + memset(diskStructure->primaryDescriptor.application_id, 0x20,128); + memset(diskStructure->primaryDescriptor.copyright_file_id, 0x20,37); + memset(diskStructure->primaryDescriptor.abstract_file_id, 0x20,37); + memset(diskStructure->primaryDescriptor.bibliographic_file_id, 0x20,37); - strcpy(diskStructure.primaryDescriptor.system_id, "FreeBSD"); + strcpy(diskStructure->primaryDescriptor.system_id, "FreeBSD"); cd9660_defaults_set = 1; /* Boot support: Initially disabled */ - diskStructure.has_generic_bootimage = 0; - diskStructure.generic_bootimage = NULL; + diskStructure->has_generic_bootimage = 0; + diskStructure->generic_bootimage = NULL; - diskStructure.boot_image_directory = 0; - /*memset(diskStructure.boot_descriptor, 0, 2048);*/ + diskStructure->boot_image_directory = 0; + /*memset(diskStructure->boot_descriptor, 0, 2048);*/ - diskStructure.is_bootable = 0; - TAILQ_INIT(&diskStructure.boot_images); - LIST_INIT(&diskStructure.boot_entries); + diskStructure->is_bootable = 0; + TAILQ_INIT(&diskStructure->boot_images); + LIST_INIT(&diskStructure->boot_entries); } void -cd9660_prep_opts(fsinfo_t *fsopts __unused) +cd9660_prep_opts(fsinfo_t *fsopts) { - cd9660_set_defaults(); + iso9660_disk *diskStructure; + + if ((diskStructure = calloc(1, sizeof(*diskStructure))) == NULL) + err(EXIT_FAILURE, "%s: calloc", __func__); + + fsopts->fs_specific = diskStructure; + + cd9660_set_defaults(diskStructure); } void -cd9660_cleanup_opts(fsinfo_t *fsopts __unused) +cd9660_cleanup_opts(fsinfo_t *fsopts) { - + free(fsopts->fs_specific); } static int @@ -295,20 +303,19 @@ cd9660_parse_opts(const char *option, fs { char *var, *val; int rv; + iso9660_disk *diskStructure = fsopts->fs_specific; + /* Set up allowed options - integer options ONLY */ option_t cd9660_options[] = { - { "l", &diskStructure.isoLevel, 1, 2, "ISO Level" }, - { "isolevel", &diskStructure.isoLevel, 1, 2, "ISO Level" }, - { "verbose", &diskStructure.verbose_level, 0, 2, + { "l", &diskStructure->isoLevel, 1, 2, "ISO Level" }, + { "isolevel", &diskStructure->isoLevel, 1, 2, "ISO Level" }, + { "verbose", &diskStructure->verbose_level, 0, 2, "Turns on verbose output" }, - { "v", &diskStructure.verbose_level, 0 , 2, + { "v", &diskStructure->verbose_level, 0 , 2, "Turns on verbose output"}, { .name = NULL } }; - if (cd9660_defaults_set == 0) - cd9660_set_defaults(); - /* * Todo : finish implementing this, and make a function that * parses them @@ -335,33 +342,33 @@ cd9660_parse_opts(const char *option, fs /* First handle options with no parameters */ if (strcmp(var, "h") == 0) { - diskStructure.displayHelp = 1; + diskStructure->displayHelp = 1; rv = 1; } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "S", "follow-symlinks")) { /* this is not handled yet */ - diskStructure.follow_sym_links = 1; + diskStructure->follow_sym_links = 1; rv = 1; } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "L", "label")) { rv = cd9660_arguments_set_string(val, "Disk Label", 32, 'd', - diskStructure.primaryDescriptor.volume_id); + diskStructure->primaryDescriptor.volume_id); } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "A", "applicationid")) { rv = cd9660_arguments_set_string(val, "Application Identifier", 128, 'a', - diskStructure.primaryDescriptor.application_id); + diskStructure->primaryDescriptor.application_id); } else if(CD9660_IS_COMMAND_ARG_DUAL(var, "P", "publisher")) { rv = cd9660_arguments_set_string(val, "Publisher Identifier", - 128, 'a', diskStructure.primaryDescriptor.publisher_id); + 128, 'a', diskStructure->primaryDescriptor.publisher_id); } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "p", "preparer")) { rv = cd9660_arguments_set_string(val, "Preparer Identifier", - 128, 'a', diskStructure.primaryDescriptor.preparer_id); + 128, 'a', diskStructure->primaryDescriptor.preparer_id); } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "V", "volumeid")) { rv = cd9660_arguments_set_string(val, "Volume Set Identifier", - 128, 'a', diskStructure.primaryDescriptor.volume_set_id); + 128, 'a', diskStructure->primaryDescriptor.volume_set_id); /* Boot options */ } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "B", "bootimage")) { if (val == NULL) warnx("error: The Boot Image parameter requires a valid boot information string"); else - rv = cd9660_add_boot_disk(val); + rv = cd9660_add_boot_disk(diskStructure, val); } else if (CD9660_IS_COMMAND_ARG(var, "bootimagedir")) { /* * XXXfvdl this is unused. @@ -370,7 +377,7 @@ cd9660_parse_opts(const char *option, fs errx(1, "error: The Boot Image Directory parameter" " requires a directory name\n"); else { - if ((diskStructure.boot_image_directory = + if ((diskStructure->boot_image_directory = malloc(strlen(val) + 1)) == NULL) { CD9660_MEM_ALLOC_ERROR("cd9660_parse_opts"); exit(1); @@ -378,40 +385,40 @@ cd9660_parse_opts(const char *option, fs /* BIG TODO: Add the max length function here */ cd9660_arguments_set_string(val, "Boot Image Directory", - 12 , 'd', diskStructure.boot_image_directory); + 12 , 'd', diskStructure->boot_image_directory); } } else if (CD9660_IS_COMMAND_ARG_DUAL(var, "G", "generic-bootimage")) { if (val == NULL) warnx("error: The Boot Image parameter requires a valid boot information string"); else - rv = cd9660_add_generic_bootimage(val); + rv = cd9660_add_generic_bootimage(diskStructure, val); } else if (CD9660_IS_COMMAND_ARG(var, "no-trailing-padding")) - diskStructure.include_padding_areas = 0; + diskStructure->include_padding_areas = 0; /* RRIP */ else if (CD9660_IS_COMMAND_ARG_DUAL(var, "R", "rockridge")) - diskStructure.rock_ridge_enabled = 1; + diskStructure->rock_ridge_enabled = 1; else if (CD9660_IS_COMMAND_ARG_DUAL(var, "A", "archimedes")) - diskStructure.archimedes_enabled = 1; + diskStructure->archimedes_enabled = 1; else if (CD9660_IS_COMMAND_ARG(var, "chrp-boot")) - diskStructure.chrp_boot = 1; + diskStructure->chrp_boot = 1; else if (CD9660_IS_COMMAND_ARG_DUAL(var, "K", "keep-bad-images")) - diskStructure.keep_bad_images = 1; + diskStructure->keep_bad_images = 1; else if (CD9660_IS_COMMAND_ARG(var, "allow-deep-trees")) - diskStructure.allow_deep_trees = 1; + diskStructure->allow_deep_trees = 1; else if (CD9660_IS_COMMAND_ARG(var, "allow-max-name")) - diskStructure.allow_max_name = 1; + diskStructure->allow_max_name = 1; else if (CD9660_IS_COMMAND_ARG(var, "allow-illegal-chars")) - diskStructure.allow_illegal_chars = 1; + diskStructure->allow_illegal_chars = 1; else if (CD9660_IS_COMMAND_ARG(var, "allow-lowercase")) - diskStructure.allow_lowercase = 1; + diskStructure->allow_lowercase = 1; else if (CD9660_IS_COMMAND_ARG(var,"allow-multidot")) - diskStructure.allow_multidot = 1; + diskStructure->allow_multidot = 1; else if (CD9660_IS_COMMAND_ARG(var, "omit-trailing-period")) - diskStructure.omit_trailing_period = 1; + diskStructure->omit_trailing_period = 1; else if (CD9660_IS_COMMAND_ARG(var, "no-emul-boot") || CD9660_IS_COMMAND_ARG(var, "no-boot") || CD9660_IS_COMMAND_ARG(var, "hard-disk-boot")) { - cd9660_eltorito_add_boot_option(var, 0); + cd9660_eltorito_add_boot_option(diskStructure, var, 0); /* End of flag variables */ } else if (CD9660_IS_COMMAND_ARG(var, "boot-load-segment")) { @@ -419,7 +426,8 @@ cd9660_parse_opts(const char *option, fs warnx("Option `%s' doesn't contain a value", var); rv = 0; } else { - cd9660_eltorito_add_boot_option(var, val); + cd9660_eltorito_add_boot_option(diskStructure, var, + val); } } else { if (val == NULL) { @@ -452,19 +460,20 @@ cd9660_makefs(const char *image, const c int64_t totalSpace; int error; cd9660node *real_root; + iso9660_disk *diskStructure = fsopts->fs_specific; - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("cd9660_makefs: ISO level is %i\n", - diskStructure.isoLevel); - if (diskStructure.isoLevel < 2 && - diskStructure.allow_multidot) + diskStructure->isoLevel); + if (diskStructure->isoLevel < 2 && + diskStructure->allow_multidot) errx(1, "allow-multidot requires iso level of 2\n"); assert(image != NULL); assert(dir != NULL); assert(root != NULL); - if (diskStructure.displayHelp) { + if (diskStructure->displayHelp) { /* * Display help here - probably want to put it in * a separate function @@ -472,7 +481,7 @@ cd9660_makefs(const char *image, const c return; } - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("cd9660_makefs: image %s directory %s root %p\n", image, dir, root); @@ -496,11 +505,12 @@ cd9660_makefs(const char *image, const c ISO_FILENAME_MAXLENGTH_WITH_PADDING); real_root->level = 0; - diskStructure.rootNode = real_root; + diskStructure->rootNode = real_root; real_root->type = CD9660_TYPE_DIR; error = 0; real_root->node = root; - cd9660_convert_structure(root, real_root, 1, &numDirectories, &error); + cd9660_convert_structure(diskStructure, root, real_root, 1, + &numDirectories, &error); if (TAILQ_EMPTY(&real_root->cn_children)) { errx(1, "cd9660_makefs: converted directory is empty. " @@ -508,109 +518,111 @@ cd9660_makefs(const char *image, const c } else if (error != 0) { errx(1, "cd9660_makefs: tree conversion failed\n"); } else { - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("cd9660_makefs: tree converted\n"); } /* Add the dot and dot dot records */ - cd9660_add_dot_records(real_root); + cd9660_add_dot_records(diskStructure, real_root); - cd9660_setup_root_node(); + cd9660_setup_root_node(diskStructure); - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("cd9660_makefs: done converting tree\n"); /* non-SUSP extensions */ - if (diskStructure.archimedes_enabled) - archimedes_convert_tree(diskStructure.rootNode); + if (diskStructure->archimedes_enabled) + archimedes_convert_tree(diskStructure->rootNode); /* Rock ridge / SUSP init pass */ - if (diskStructure.rock_ridge_enabled) { - cd9660_susp_initialize(diskStructure.rootNode, - diskStructure.rootNode, NULL); + if (diskStructure->rock_ridge_enabled) { + cd9660_susp_initialize(diskStructure, diskStructure->rootNode, + diskStructure->rootNode, NULL); } /* Build path table structure */ - diskStructure.pathTableLength = cd9660_generate_path_table(); + diskStructure->pathTableLength = cd9660_generate_path_table( + diskStructure); - pathTableSectors = CD9660_BLOCKS(diskStructure.sectorSize, - diskStructure.pathTableLength); + pathTableSectors = CD9660_BLOCKS(diskStructure->sectorSize, + diskStructure->pathTableLength); - firstAvailableSector = cd9660_setup_volume_descriptors(); - if (diskStructure.is_bootable) { - firstAvailableSector = cd9660_setup_boot(firstAvailableSector); + firstAvailableSector = cd9660_setup_volume_descriptors(diskStructure); + if (diskStructure->is_bootable) { + firstAvailableSector = cd9660_setup_boot(diskStructure, + firstAvailableSector); if (firstAvailableSector < 0) errx(1, "setup_boot failed"); } /* LE first, then BE */ - diskStructure.primaryLittleEndianTableSector = firstAvailableSector; - diskStructure.primaryBigEndianTableSector = - diskStructure.primaryLittleEndianTableSector + pathTableSectors; + diskStructure->primaryLittleEndianTableSector = firstAvailableSector; + diskStructure->primaryBigEndianTableSector = + diskStructure->primaryLittleEndianTableSector + pathTableSectors; /* Set the secondary ones to -1, not going to use them for now */ - diskStructure.secondaryBigEndianTableSector = -1; - diskStructure.secondaryLittleEndianTableSector = -1; + diskStructure->secondaryBigEndianTableSector = -1; + diskStructure->secondaryLittleEndianTableSector = -1; - diskStructure.dataFirstSector = - diskStructure.primaryBigEndianTableSector + pathTableSectors; - if (diskStructure.verbose_level > 0) + diskStructure->dataFirstSector = + diskStructure->primaryBigEndianTableSector + pathTableSectors; + if (diskStructure->verbose_level > 0) printf("cd9660_makefs: Path table conversion complete. " "Each table is %i bytes, or %" PRIu64 " sectors.\n", - diskStructure.pathTableLength, pathTableSectors); + diskStructure->pathTableLength, pathTableSectors); - startoffset = diskStructure.sectorSize*diskStructure.dataFirstSector; + startoffset = diskStructure->sectorSize*diskStructure->dataFirstSector; - totalSpace = cd9660_compute_offsets(real_root, startoffset); + totalSpace = cd9660_compute_offsets(diskStructure, real_root, startoffset); - diskStructure.totalSectors = diskStructure.dataFirstSector + - CD9660_BLOCKS(diskStructure.sectorSize, totalSpace); + diskStructure->totalSectors = diskStructure->dataFirstSector + + CD9660_BLOCKS(diskStructure->sectorSize, totalSpace); /* Disabled until pass 1 is done */ - if (diskStructure.rock_ridge_enabled) { - diskStructure.susp_continuation_area_start_sector = - diskStructure.totalSectors; - diskStructure.totalSectors += - CD9660_BLOCKS(diskStructure.sectorSize, - diskStructure.susp_continuation_area_size); - cd9660_susp_finalize(diskStructure.rootNode); + if (diskStructure->rock_ridge_enabled) { + diskStructure->susp_continuation_area_start_sector = + diskStructure->totalSectors; + diskStructure->totalSectors += + CD9660_BLOCKS(diskStructure->sectorSize, + diskStructure->susp_continuation_area_size); + cd9660_susp_finalize(diskStructure, diskStructure->rootNode); } - cd9660_finalize_PVD(); + cd9660_finalize_PVD(diskStructure); /* Add padding sectors, just for testing purposes right now */ - /* diskStructure.totalSectors+=150; */ + /* diskStructure->totalSectors+=150; */ /* Debugging output */ - if (diskStructure.verbose_level > 0) { + if (diskStructure->verbose_level > 0) { printf("cd9660_makefs: Sectors 0-15 reserved\n"); printf("cd9660_makefs: Primary path tables starts in sector %" - PRId64 "\n", diskStructure.primaryLittleEndianTableSector); + PRId64 "\n", diskStructure->primaryLittleEndianTableSector); printf("cd9660_makefs: File data starts in sector %" - PRId64 "\n", diskStructure.dataFirstSector); + PRId64 "\n", diskStructure->dataFirstSector); printf("cd9660_makefs: Total sectors: %" - PRId64 "\n", diskStructure.totalSectors); + PRId64 "\n", diskStructure->totalSectors); } /* * Add padding sectors at the end * TODO: Clean this up and separate padding */ - if (diskStructure.include_padding_areas) - diskStructure.totalSectors += 150; + if (diskStructure->include_padding_areas) + diskStructure->totalSectors += 150; - cd9660_write_image(image); + cd9660_write_image(diskStructure, image); - if (diskStructure.verbose_level > 1) { - debug_print_volume_descriptor_information(); - debug_print_tree(real_root,0); + if (diskStructure->verbose_level > 1) { + debug_print_volume_descriptor_information(diskStructure); + debug_print_tree(diskStructure, real_root, 0); debug_print_path_tree(real_root); } /* Clean up data structures */ cd9660_free_structure(real_root); - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("cd9660_makefs: done\n"); } @@ -618,76 +630,77 @@ cd9660_makefs(const char *image, const c typedef int (*cd9660node_func)(cd9660node *); static void -cd9660_finalize_PVD(void) +cd9660_finalize_PVD(iso9660_disk *diskStructure) { time_t tstamp = stampst.st_ino ? stampst.st_mtime : time(NULL); /* root should be a fixed size of 34 bytes since it has no name */ - memcpy(diskStructure.primaryDescriptor.root_directory_record, - diskStructure.rootNode->dot_record->isoDirRecord, 34); + memcpy(diskStructure->primaryDescriptor.root_directory_record, + diskStructure->rootNode->dot_record->isoDirRecord, 34); /* In RRIP, this might be longer than 34 */ - diskStructure.primaryDescriptor.root_directory_record[0] = 34; + diskStructure->primaryDescriptor.root_directory_record[0] = 34; /* Set up all the important numbers in the PVD */ - cd9660_bothendian_dword(diskStructure.totalSectors, - (unsigned char *)diskStructure.primaryDescriptor.volume_space_size); + cd9660_bothendian_dword(diskStructure->totalSectors, + (unsigned char *)diskStructure->primaryDescriptor.volume_space_size); cd9660_bothendian_word(1, - (unsigned char *)diskStructure.primaryDescriptor.volume_set_size); + (unsigned char *)diskStructure->primaryDescriptor.volume_set_size); cd9660_bothendian_word(1, (unsigned char *) - diskStructure.primaryDescriptor.volume_sequence_number); - cd9660_bothendian_word(diskStructure.sectorSize, + diskStructure->primaryDescriptor.volume_sequence_number); + cd9660_bothendian_word(diskStructure->sectorSize, (unsigned char *) - diskStructure.primaryDescriptor.logical_block_size); - cd9660_bothendian_dword(diskStructure.pathTableLength, - (unsigned char *)diskStructure.primaryDescriptor.path_table_size); - - cd9660_731(diskStructure.primaryLittleEndianTableSector, - (u_char *)diskStructure.primaryDescriptor.type_l_path_table); - cd9660_732(diskStructure.primaryBigEndianTableSector, - (u_char *)diskStructure.primaryDescriptor.type_m_path_table); + diskStructure->primaryDescriptor.logical_block_size); + cd9660_bothendian_dword(diskStructure->pathTableLength, + (unsigned char *)diskStructure->primaryDescriptor.path_table_size); + + cd9660_731(diskStructure->primaryLittleEndianTableSector, + (u_char *)diskStructure->primaryDescriptor.type_l_path_table); + cd9660_732(diskStructure->primaryBigEndianTableSector, + (u_char *)diskStructure->primaryDescriptor.type_m_path_table); - diskStructure.primaryDescriptor.file_structure_version[0] = 1; + diskStructure->primaryDescriptor.file_structure_version[0] = 1; /* Pad all strings with spaces instead of nulls */ - cd9660_pad_string_spaces(diskStructure.primaryDescriptor.volume_id, 32); - cd9660_pad_string_spaces(diskStructure.primaryDescriptor.system_id, 32); - cd9660_pad_string_spaces(diskStructure.primaryDescriptor.volume_set_id, + cd9660_pad_string_spaces(diskStructure->primaryDescriptor.volume_id, 32); + cd9660_pad_string_spaces(diskStructure->primaryDescriptor.system_id, 32); + cd9660_pad_string_spaces(diskStructure->primaryDescriptor.volume_set_id, 128); - cd9660_pad_string_spaces(diskStructure.primaryDescriptor.publisher_id, + cd9660_pad_string_spaces(diskStructure->primaryDescriptor.publisher_id, 128); - cd9660_pad_string_spaces(diskStructure.primaryDescriptor.preparer_id, + cd9660_pad_string_spaces(diskStructure->primaryDescriptor.preparer_id, 128); - cd9660_pad_string_spaces(diskStructure.primaryDescriptor.application_id, + cd9660_pad_string_spaces(diskStructure->primaryDescriptor.application_id, 128); cd9660_pad_string_spaces( - diskStructure.primaryDescriptor.copyright_file_id, 37); + diskStructure->primaryDescriptor.copyright_file_id, 37); cd9660_pad_string_spaces( - diskStructure.primaryDescriptor.abstract_file_id, 37); + diskStructure->primaryDescriptor.abstract_file_id, 37); cd9660_pad_string_spaces( - diskStructure.primaryDescriptor.bibliographic_file_id, 37); + diskStructure->primaryDescriptor.bibliographic_file_id, 37); /* Setup dates */ cd9660_time_8426( - (unsigned char *)diskStructure.primaryDescriptor.creation_date, + (unsigned char *)diskStructure->primaryDescriptor.creation_date, tstamp); cd9660_time_8426( - (unsigned char *)diskStructure.primaryDescriptor.modification_date, + (unsigned char *)diskStructure->primaryDescriptor.modification_date, tstamp); #if 0 - cd9660_set_date(diskStructure.primaryDescriptor.expiration_date, + cd9660_set_date(diskStructure->primaryDescriptor.expiration_date, tstamp); #endif - memset(diskStructure.primaryDescriptor.expiration_date, '0', 16); - diskStructure.primaryDescriptor.expiration_date[16] = 0; + memset(diskStructure->primaryDescriptor.expiration_date, '0', 16); + diskStructure->primaryDescriptor.expiration_date[16] = 0; + cd9660_time_8426( - (unsigned char *)diskStructure.primaryDescriptor.effective_date, + (unsigned char *)diskStructure->primaryDescriptor.effective_date, tstamp); /* make this sane */ - cd9660_time_915(diskStructure.rootNode->dot_record->isoDirRecord->date, + cd9660_time_915(diskStructure->rootNode->dot_record->isoDirRecord->date, tstamp); } @@ -711,16 +724,16 @@ cd9660_populate_iso_dir_record(struct _i } static void -cd9660_setup_root_node(void) +cd9660_setup_root_node(iso9660_disk *diskStructure) { - cd9660_populate_iso_dir_record(diskStructure.rootNode->isoDirRecord, + cd9660_populate_iso_dir_record(diskStructure->rootNode->isoDirRecord, 0, ISO_FLAG_DIRECTORY, 1, "\0"); } /*********** SUPPORT FUNCTIONS ***********/ static int -cd9660_setup_volume_descriptors(void) +cd9660_setup_volume_descriptors(iso9660_disk *diskStructure) { /* Boot volume descriptor should come second */ int sector = 16; @@ -734,17 +747,17 @@ cd9660_setup_volume_descriptors(void) } temp->volumeDescriptorData = - (unsigned char *)&diskStructure.primaryDescriptor; + (unsigned char *)&diskStructure->primaryDescriptor; temp->volumeDescriptorData[0] = ISO_VOLUME_DESCRIPTOR_PVD; temp->volumeDescriptorData[6] = 1; temp->sector = sector; memcpy(temp->volumeDescriptorData + 1, ISO_VOLUME_DESCRIPTOR_STANDARD_ID, 5); - diskStructure.firstVolumeDescriptor = temp; + diskStructure->firstVolumeDescriptor = temp; sector++; /* Set up boot support if enabled. BVD must reside in sector 17 */ - if (diskStructure.is_bootable) { + if (diskStructure->is_bootable) { if ((t = malloc(sizeof(volume_descriptor))) == NULL) { CD9660_MEM_ALLOC_ERROR( "cd9660_setup_volume_descriptors"); @@ -759,9 +772,9 @@ cd9660_setup_volume_descriptors(void) temp = t; memset(t->volumeDescriptorData, 0, 2048); t->sector = 17; - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("Setting up boot volume descriptor\n"); - cd9660_setup_boot_volume_descriptor(t); + cd9660_setup_boot_volume_descriptor(diskStructure, t); sector++; } @@ -807,7 +820,7 @@ cd9660_fill_extended_attribute_record(cd #endif static int -cd9660_translate_node_common(cd9660node *newnode) +cd9660_translate_node_common(iso9660_disk *diskStructure, cd9660node *newnode) { time_t tstamp = stampst.st_ino ? stampst.st_mtime : time(NULL); int test; @@ -817,7 +830,7 @@ cd9660_translate_node_common(cd9660node /* Now populate the isoDirRecord structure */ memset(temp, 0, ISO_FILENAME_MAXLENGTH_WITH_PADDING); - test = cd9660_convert_filename(newnode->node->name, + test = cd9660_convert_filename(diskStructure, newnode->node->name, temp, !(S_ISDIR(newnode->node->type))); flag = ISO_FLAG_CLEAR; @@ -851,10 +864,11 @@ cd9660_translate_node_common(cd9660node * @returns int 0 on failure, 1 on success */ static int -cd9660_translate_node(fsnode *node, cd9660node *newnode) +cd9660_translate_node(iso9660_disk *diskStructure, fsnode *node, + cd9660node *newnode) { if (node == NULL) { - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("cd9660_translate_node: NULL node passed, " "returning\n"); return 0; @@ -872,7 +886,7 @@ cd9660_translate_node(fsnode *node, cd96 if (!(S_ISDIR(node->type))) newnode->fileDataLength = node->inode->st.st_size; - if (cd9660_translate_node_common(newnode) == 0) + if (cd9660_translate_node_common(diskStructure, newnode) == 0) return 0; /* Finally, overwrite some of the values that are set by default */ @@ -1006,7 +1020,8 @@ cd9660_sorted_child_insert(cd9660node *p * where n represents the files respective place in the ordering */ static int -cd9660_handle_collisions(cd9660node *colliding, int past) +cd9660_handle_collisions(iso9660_disk *diskStructure, cd9660node *colliding, + int past) { cd9660node *iter, *next, *prev; int skip; @@ -1041,14 +1056,16 @@ cd9660_handle_collisions(cd9660node *col temp_past--; } skip += past; - iter = cd9660_rename_filename(iter, skip, delete_chars); + iter = cd9660_rename_filename(diskStructure, iter, skip, + delete_chars); } return flag; } static cd9660node * -cd9660_rename_filename(cd9660node *iter, int num, int delete_chars) +cd9660_rename_filename(iso9660_disk *diskStructure, cd9660node *iter, int num, + int delete_chars) { int i = 0; int numbts, digit, digits, temp, powers, count; @@ -1056,14 +1073,14 @@ cd9660_rename_filename(cd9660node *iter, int maxlength; char *tmp; - if (diskStructure.verbose_level > 0) + if (diskStructure->verbose_level > 0) printf("Rename_filename called\n"); - assert(1 <= diskStructure.isoLevel && diskStructure.isoLevel <= 2); + assert(1 <= diskStructure->isoLevel && diskStructure->isoLevel <= 2); /* TODO : A LOT of chanes regarding 8.3 filenames */ - if (diskStructure.isoLevel == 1) + if (diskStructure->isoLevel == 1) maxlength = 8; - else if (diskStructure.isoLevel == 2) + else if (diskStructure->isoLevel == 2) maxlength = 31; else maxlength = ISO_FILENAME_MAXLENGTH_BEFORE_VERSION; @@ -1109,7 +1126,7 @@ cd9660_rename_filename(cd9660node *iter, */ /* - if (diskStructure.isoLevel == 1) { + if (diskStructure->isoLevel == 1) { numbts = 8 - digits - delete_chars; if (dot < 0) { @@ -1161,7 +1178,7 @@ cd9660_rename_filename(cd9660node *iter, /* Todo: Figure out why these functions are nec. */ static void -cd9660_copy_filenames(cd9660node *node) +cd9660_copy_filenames(iso9660_disk *diskStructure, cd9660node *node) { cd9660node *cn; @@ -1169,12 +1186,12 @@ cd9660_copy_filenames(cd9660node *node) return; if (TAILQ_FIRST(&node->cn_children)->isoDirRecord == NULL) { - debug_print_tree(diskStructure.rootNode, 0); + debug_print_tree(diskStructure, diskStructure->rootNode, 0); exit(1); } TAILQ_FOREACH(cn, &node->cn_children, cn_next_child) { - cd9660_copy_filenames(cn); + cd9660_copy_filenames(diskStructure, cn); memcpy(cn->o_name, cn->isoDirRecord->name, ISO_FILENAME_MAXLENGTH_WITH_PADDING); } @@ -1241,7 +1258,7 @@ cd9660_count_collisions(cd9660node *copy } static cd9660node * -cd9660_rrip_move_directory(cd9660node *dir) +cd9660_rrip_move_directory(iso9660_disk *diskStructure, cd9660node *dir) { char newname[9]; cd9660node *tfile; @@ -1252,28 +1269,29 @@ cd9660_rrip_move_directory(cd9660node *d * 2) Point the virtual file to the new directory * 3) Point the relocated directory to its old parent * 4) Move the directory specified by dir into rr_moved_dir, - * and rename it to "diskStructure.rock_ridge_move_count" (as a string) + * and rename it to "diskStructure->rock_ridge_move_count" (as a string) */ /* First see if the moved directory even exists */ - if (diskStructure.rr_moved_dir == NULL) { - diskStructure.rr_moved_dir = - cd9660_create_directory(ISO_RRIP_DEFAULT_MOVE_DIR_NAME, - diskStructure.rootNode, dir); - if (diskStructure.rr_moved_dir == NULL) + if (diskStructure->rr_moved_dir == NULL) { + diskStructure->rr_moved_dir = cd9660_create_directory( + diskStructure, ISO_RRIP_DEFAULT_MOVE_DIR_NAME, + diskStructure->rootNode, dir); + if (diskStructure->rr_moved_dir == NULL) return 0; - cd9660_time_915(diskStructure.rr_moved_dir->isoDirRecord->date, + cd9660_time_915(diskStructure->rr_moved_dir->isoDirRecord->date, stampst.st_ino ? stampst.st_mtime : start_time.tv_sec); } /* Create a file with the same ORIGINAL name */ - tfile = cd9660_create_file(dir->node->name, dir->parent, dir); + tfile = cd9660_create_file(diskStructure, dir->node->name, dir->parent, + dir); if (tfile == NULL) return NULL; - diskStructure.rock_ridge_move_count++; + diskStructure->rock_ridge_move_count++; snprintf(newname, sizeof(newname), "%08i", - diskStructure.rock_ridge_move_count); + diskStructure->rock_ridge_move_count); /* Point to old parent */ dir->rr_real_parent = dir->parent; @@ -1287,13 +1305,13 @@ cd9660_rrip_move_directory(cd9660node *d } /* Point to new parent */ - dir->parent = diskStructure.rr_moved_dir; + dir->parent = diskStructure->rr_moved_dir; /* Point the file to the moved directory */ tfile->rr_relocated = dir; /* Actually move the directory */ - cd9660_sorted_child_insert(diskStructure.rr_moved_dir, dir); + cd9660_sorted_child_insert(diskStructure->rr_moved_dir, dir); /* TODO: Inherit permissions / ownership (basically the entire inode) */ @@ -1307,7 +1325,7 @@ cd9660_rrip_move_directory(cd9660node *d } static int -cd9660_add_dot_records(cd9660node *root) +cd9660_add_dot_records(iso9660_disk *diskStructure, cd9660node *root) { struct cd9660_children_head *head = &root->cn_children; cd9660node *cn; @@ -1316,10 +1334,11 @@ cd9660_add_dot_records(cd9660node *root) if ((cn->type & CD9660_TYPE_DIR) == 0) continue; /* Recursion first */ - cd9660_add_dot_records(cn); + cd9660_add_dot_records(diskStructure, cn); } - cd9660_create_special_directory(CD9660_TYPE_DOT, root); - cd9660_create_special_directory(CD9660_TYPE_DOTDOT, root); + cd9660_create_special_directory(diskStructure, CD9660_TYPE_DOT, root); + cd9660_create_special_directory(diskStructure, CD9660_TYPE_DOTDOT, + root); return 1; } @@ -1334,8 +1353,8 @@ cd9660_add_dot_records(cd9660node *root) * @param int* Running count of the number of directories that are being created */ static void -cd9660_convert_structure(fsnode *root, cd9660node *parent_node, int level, - int *numDirectories, int *error) +cd9660_convert_structure(iso9660_disk *diskStructure, fsnode *root, + cd9660node *parent_node, int level, int *numDirectories, int *error) { fsnode *iterator = root; cd9660node *this_node; @@ -1378,7 +1397,8 @@ cd9660_convert_structure(fsnode *root, c /* Translate the node, including its filename */ this_node->parent = parent_node; - cd9660_translate_node(iterator, this_node); + cd9660_translate_node(diskStructure, iterator, + this_node); this_node->level = level; if (S_ISDIR(iterator->type)) { @@ -1392,14 +1412,14 @@ cd9660_convert_structure(fsnode *root, c * allowed as per ISO spec */ if (level == 8) { - if ((!diskStructure.allow_deep_trees) && - (!diskStructure.rock_ridge_enabled)) { + if ((!diskStructure->allow_deep_trees) && + (!diskStructure->rock_ridge_enabled)) { warnx("error: found entry " "with depth greater " "than 8."); (*error) = 1; return; - } else if (diskStructure. + } else if (diskStructure-> rock_ridge_enabled) { working_level = 3; /* @@ -1409,6 +1429,7 @@ cd9660_convert_structure(fsnode *root, c this_node->level = working_level - 1; if (cd9660_rrip_move_directory( + diskStructure, this_node) == NULL) { warnx("Failure in " "cd9660_rrip_" @@ -1423,8 +1444,8 @@ cd9660_convert_structure(fsnode *root, c /* Do the recursive call on the children */ if (iterator->child != NULL) { - cd9660_convert_structure( - iterator->child, this_node, + cd9660_convert_structure(diskStructure, + iterator->child, this_node, working_level, numDirectories, error); @@ -1463,10 +1484,11 @@ cd9660_convert_structure(fsnode *root, c /* cd9660_handle_collisions(first_node); */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 23 04:06: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 004AACE94AD for ; Thu, 23 Feb 2017 04:06:02 +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 DA41AB52 for ; Thu, 23 Feb 2017 04:06:01 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6c040dca-f97d-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 6c040dca-f97d-11e6-ba57-8bc134ee460a; Thu, 23 Feb 2017 04:06:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1N45q1M009163; Wed, 22 Feb 2017 21:05:52 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487822752.25520.2.camel@freebsd.org> Subject: Re: svn commit: r314075 - head/tests/sys/kern From: Ian Lepore To: Eric Badger , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 22 Feb 2017 21:05:52 -0700 In-Reply-To: <201702220435.v1M4Z8iT059727@repo.freebsd.org> References: <201702220435.v1M4Z8iT059727@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: Thu, 23 Feb 2017 04:06:02 -0000 On Wed, 2017-02-22 at 04:35 +0000, Eric Badger wrote: > Author: badger > Date: Wed Feb 22 04:35:07 2017 > New Revision: 314075 > URL: https://svnweb.freebsd.org/changeset/base/314075 > > Log: >   Fix world build for archs where __builtin_debugtrap() does not > work. >    >   The offending code was introduced in r313992. >    >   Reported by: rpokala >   Approved by: kib (mentor) > > Modified: >   head/tests/sys/kern/ptrace_test.c > > Modified: head/tests/sys/kern/ptrace_test.c > ===================================================================== > ========= > --- head/tests/sys/kern/ptrace_test.c Wed Feb 22 04:28:10 2017 > (r314074) > +++ head/tests/sys/kern/ptrace_test.c Wed Feb 22 04:35:07 2017 > (r314075) > @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); >  #include >  #include >  #include > +#include >  #include >  #include >  #include > @@ -1690,7 +1691,7 @@ ATF_TC_BODY(ptrace__PT_KILL_breakpoint,  >   ATF_REQUIRE((fpid = fork()) != -1); >   if (fpid == 0) { >   trace_me(); > - __builtin_debugtrap(); > + breakpoint(); >   exit(1); >   } >   > This fixes only x86 and sparc64.  All other arches have breakpoint() under the #ifdef KERNEL wrapper (I have no idea why).  If fixing this is going to take any longer, can we disconnect this test from the build until it gets worked out? -- Ian From owner-svn-src-all@freebsd.org Thu Feb 23 04:26: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 77739CE9C80; Thu, 23 Feb 2017 04:26:18 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4441513A7; Thu, 23 Feb 2017 04:26:18 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1N4QHq7052316; Thu, 23 Feb 2017 04:26:17 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N4QHap052315; Thu, 23 Feb 2017 04:26:17 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201702230426.v1N4QHap052315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Thu, 23 Feb 2017 04:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314118 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 04:26:18 -0000 Author: badger Date: Thu Feb 23 04:26:17 2017 New Revision: 314118 URL: https://svnweb.freebsd.org/changeset/base/314118 Log: Actually fix buildworlds other than i386/amd64/sparc64 after r313992 Disable offending test for platforms without a userspace visible breakpoint(). Reported by: rpokala Approved by: vangyzen (mentor) Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Thu Feb 23 02:28:08 2017 (r314117) +++ head/tests/sys/kern/ptrace_test.c Thu Feb 23 04:26:17 2017 (r314118) @@ -1679,6 +1679,11 @@ ATF_TC_BODY(ptrace__ptrace_vfork_follow, } /* + * XXX: There's nothing inherently platform specific about this test, however a + * userspace visible breakpoint() is a prerequisite. + */ + #if defined(__amd64__) || defined(__i386__) || defined(__sparc64__) +/* * Verify that no more events are reported after PT_KILL except for the * process exit when stopped due to a breakpoint trap. */ @@ -1723,6 +1728,7 @@ ATF_TC_BODY(ptrace__PT_KILL_breakpoint, ATF_REQUIRE(wpid == -1); ATF_REQUIRE(errno == ECHILD); } +#endif /* defined(__amd64__) || defined(__i386__) || defined(__sparc64__) */ /* * Verify that no more events are reported after PT_KILL except for the @@ -2806,7 +2812,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__event_mask); ATF_TP_ADD_TC(tp, ptrace__ptrace_vfork); ATF_TP_ADD_TC(tp, ptrace__ptrace_vfork_follow); +#if defined(__amd64__) || defined(__i386__) || defined(__sparc64__) ATF_TP_ADD_TC(tp, ptrace__PT_KILL_breakpoint); +#endif ATF_TP_ADD_TC(tp, ptrace__PT_KILL_system_call); ATF_TP_ADD_TC(tp, ptrace__PT_KILL_threads); ATF_TP_ADD_TC(tp, ptrace__PT_KILL_competing_signal); From owner-svn-src-all@freebsd.org Thu Feb 23 04:28: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 3891ECE9D43; Thu, 23 Feb 2017 04:28:57 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 108231589; Thu, 23 Feb 2017 04:28:56 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id CA9BC69E3E; Wed, 22 Feb 2017 23:28:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=5QztrU8rAcVt MHvL29AzvO0t0JE=; b=IMig30ANdrDwZEK0aToewvFihSIJzBs3U4inb+y1YH4g nu7beuPzwmRHCoPw2lhB/hOOE989vY+vWFmZErj/Ebwy7MByzNRsD1Bkv4WSroQs Hv6Y8k66MSDkA+dh7MsESsQve4L1NuWTg+FSKHXAGgiygy3mWGnZOuURu0YjEKY= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id C212C69E3D; Wed, 22 Feb 2017 23:28:54 -0500 (EST) Received: from [192.168.1.103] (unknown [24.7.205.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 1208E69E37; Wed, 22 Feb 2017 23:28:54 -0500 (EST) Subject: Re: svn commit: r314075 - head/tests/sys/kern To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702220435.v1M4Z8iT059727@repo.freebsd.org> <1487822752.25520.2.camel@freebsd.org> From: Eric Badger Message-ID: Date: Wed, 22 Feb 2017 22:28:53 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1487822752.25520.2.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 959EF064-F980-11E6-B67E-A7617B1B28F4-46178211!pb-smtp2.pobox.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 04:28:57 -0000 On 02/22/2017 10:05 PM, Ian Lepore wrote: > On Wed, 2017-02-22 at 04:35 +0000, Eric Badger wrote: >> Author: badger >> Date: Wed Feb 22 04:35:07 2017 >> New Revision: 314075 >> URL: https://svnweb.freebsd.org/changeset/base/314075 >> >> Log: >> Fix world build for archs where __builtin_debugtrap() does not >> work. >> >> The offending code was introduced in r313992. >> >> Reported by: rpokala >> Approved by: kib (mentor) >> >> Modified: >> head/tests/sys/kern/ptrace_test.c >> >> Modified: head/tests/sys/kern/ptrace_test.c >> ===================================================================== >> ========= >> --- head/tests/sys/kern/ptrace_test.c Wed Feb 22 04:28:10 2017 >> (r314074) >> +++ head/tests/sys/kern/ptrace_test.c Wed Feb 22 04:35:07 2017 >> (r314075) >> @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -1690,7 +1691,7 @@ ATF_TC_BODY(ptrace__PT_KILL_breakpoint, >> ATF_REQUIRE((fpid = fork()) != -1); >> if (fpid == 0) { >> trace_me(); >> - __builtin_debugtrap(); >> + breakpoint(); >> exit(1); >> } >> >> > > This fixes only x86 and sparc64. All other arches have breakpoint() > under the #ifdef KERNEL wrapper (I have no idea why). If fixing this > is going to take any longer, can we disconnect this test from the build > until it gets worked out? > > -- Ian > Yes, that was my error. In my haste to fix things, I misread the headers and thought I had breakpoint() everywhere (and only tested sparc64/amd64). Sorry about that. It should be fixed in r314118. Eric From owner-svn-src-all@freebsd.org Thu Feb 23 05:33: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 F0B59CEA24B; Thu, 23 Feb 2017 05:33:21 +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 BFCA31774; Thu, 23 Feb 2017 05:33:21 +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 v1N5XKdl080371; Thu, 23 Feb 2017 05:33:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N5XKue080370; Thu, 23 Feb 2017 05:33:20 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201702230533.v1N5XKue080370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 Feb 2017 05:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314119 - head/sys/dev/extres/clk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 05:33:22 -0000 Author: manu Date: Thu Feb 23 05:33:20 2017 New Revision: 314119 URL: https://svnweb.freebsd.org/changeset/base/314119 Log: Do not check divider length if we have a div table. Reviewed by: mmel Modified: head/sys/dev/extres/clk/clk_div.c Modified: head/sys/dev/extres/clk/clk_div.c ============================================================================== --- head/sys/dev/extres/clk/clk_div.c Thu Feb 23 04:26:17 2017 (r314118) +++ head/sys/dev/extres/clk/clk_div.c Thu Feb 23 05:33:20 2017 (r314119) @@ -195,7 +195,8 @@ clknode_div_set_freq(struct clknode *clk hw_i_div--; *stop = 1; - if (hw_i_div > sc->i_mask) { + if (hw_i_div > sc->i_mask && + ((sc->div_flags & CLK_DIV_WITH_TABLE) == 0)) { /* XXX Or only return error? */ printf("%s: %s integer divider is too big: %u\n", clknode_get_name(clk), __func__, hw_i_div); From owner-svn-src-all@freebsd.org Thu Feb 23 05:41: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 0035DCEA425; Thu, 23 Feb 2017 05:41:00 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4C4C19A9; Thu, 23 Feb 2017 05:41:00 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1N5ex2R082806; Thu, 23 Feb 2017 05:40:59 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N5exAB082805; Thu, 23 Feb 2017 05:40:59 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201702230540.v1N5exAB082805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Thu, 23 Feb 2017 05:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314120 - head/contrib/blacklist/bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 05:41:01 -0000 Author: lidl Date: Thu Feb 23 05:40:59 2017 New Revision: 314120 URL: https://svnweb.freebsd.org/changeset/base/314120 Log: Reset failed login count to zero when removing a blocked address The blacklistd daemon keeps records of failed login attempts for each address:port that is flagged as a failed login. When a successful login occurs for that address:port combination, the record's last update time is set to zero, to indicate no current failed login attempts. Reset the failed login count to zero, so that at the next failed login attempt, the counting will restart properly at zero. Without this reset to zero, the first failed login after a successful login will cause the address to be blocked immediately. When debugging is turned on, output more information about database state before and after the database updates have occured. A similar patch has already been upstreamed to NetBSD. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/blacklist/bin/blacklistd.c Modified: head/contrib/blacklist/bin/blacklistd.c ============================================================================== --- head/contrib/blacklist/bin/blacklistd.c Thu Feb 23 05:33:20 2017 (r314119) +++ head/contrib/blacklist/bin/blacklistd.c Thu Feb 23 05:40:59 2017 (r314120) @@ -207,7 +207,7 @@ process(bl_t bl) if (debug) { char b1[128], b2[128]; - (*lfun)(LOG_DEBUG, "%s: db state info for %s: count=%d/%d " + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=%d/%d " "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, fmttime(b1, sizeof(b1), dbi.last), fmttime(b2, sizeof(b2), ts.tv_sec)); @@ -246,15 +246,24 @@ process(bl_t bl) case BL_DELETE: if (dbi.last == 0) goto out; + dbi.count = 0; dbi.last = 0; break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } - if (state_put(state, &c, &dbi) == -1) - goto out; + state_put(state, &c, &dbi); + out: close(bi->bi_fd); + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: final db state for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, + fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } } static void @@ -393,7 +402,7 @@ rules_restore(void) int main(int argc, char *argv[]) { - int c, tout, flags, flush, restore; + int c, tout, flags, flush, restore, ret; const char *spath, *blsock; setprogname(argv[0]); @@ -512,7 +521,10 @@ main(int argc, char *argv[]) readconf = 0; conf_parse(configfile); } - switch (poll(pfd, (nfds_t)nfd, tout)) { + ret = poll(pfd, (nfds_t)nfd, tout); + if (debug) + (*lfun)(LOG_DEBUG, "received %d from poll()", ret); + switch (ret) { case -1: if (errno == EINTR) continue; From owner-svn-src-all@freebsd.org Thu Feb 23 06:49: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 58DC0CEA006; Thu, 23 Feb 2017 06:49:48 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F0DE154E; Thu, 23 Feb 2017 06:49:47 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1N6nl2P009169; Thu, 23 Feb 2017 06:49:47 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N6nl1Z009167; Thu, 23 Feb 2017 06:49:47 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702230649.v1N6nl1Z009167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Thu, 23 Feb 2017 06:49: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: r314121 - stable/10/sys/dev/hyperv/netvsc 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, 23 Feb 2017 06:49:48 -0000 Author: dexuan Date: Thu Feb 23 06:49:46 2017 New Revision: 314121 URL: https://svnweb.freebsd.org/changeset/base/314121 Log: MFC: r312685, r312686 Approved by: sephe (mentor) r312685 hyperv/hn: remember the channel pointer in struct hn_rx_ring This will be used by the coming NIC SR-IOV patch. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8909 r312686 hyperv/hn: remove the MTU and IFF_DRV_RUNNING checking in hn_rxpkt() It's unnecessary because the upper nework stack does the same checking. In the case of Hyper-V SR-IOV, we need to remove the checking because 1) multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface; 2) we must inject the packets even if the synthetic NIC is down, or has a different MTU from the VF device. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8962 Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c stable/10/sys/dev/hyperv/netvsc/if_hnvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Feb 23 05:40:59 2017 (r314120) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Feb 23 06:49:46 2017 (r314121) @@ -2118,15 +2118,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const v int size, do_lro = 0, do_csum = 1; int hash_type = M_HASHTYPE_OPAQUE; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) - return (0); - - /* - * Bail out if packet contains more data than configured MTU. - */ - if (dlen > (ifp->if_mtu + ETHER_HDR_LEN)) { - return (0); - } else if (dlen <= MHLEN) { + if (dlen <= MHLEN) { m_new = m_gethdr(M_NOWAIT, MT_DATA); if (m_new == NULL) { if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); @@ -4297,6 +4289,7 @@ hn_chan_attach(struct hn_softc *sc, stru KASSERT((rxr->hn_rx_flags & HN_RX_FLAG_ATTACHED) == 0, ("RX ring %d already attached", idx)); rxr->hn_rx_flags |= HN_RX_FLAG_ATTACHED; + rxr->hn_chan = chan; if (bootverbose) { if_printf(sc->hn_ifp, "link RX ring %d to chan%u\n", Modified: stable/10/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hnvar.h Thu Feb 23 05:40:59 2017 (r314120) +++ stable/10/sys/dev/hyperv/netvsc/if_hnvar.h Thu Feb 23 06:49:46 2017 (r314121) @@ -85,6 +85,8 @@ struct hn_rx_ring { void *hn_br; /* TX/RX bufring */ struct hyperv_dma hn_br_dma; + + struct vmbus_channel *hn_chan; } __aligned(CACHE_LINE_SIZE); #define HN_TRUST_HCSUM_IP 0x0001 From owner-svn-src-all@freebsd.org Thu Feb 23 06:57: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 954D6CEA2CF; Thu, 23 Feb 2017 06:57:20 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE4219D7; Thu, 23 Feb 2017 06:57:20 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1N6vJ05013060; Thu, 23 Feb 2017 06:57:19 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N6vJ7Q013058; Thu, 23 Feb 2017 06:57:19 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702230657.v1N6vJ7Q013058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Thu, 23 Feb 2017 06:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314122 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 06:57:20 -0000 Author: dexuan Date: Thu Feb 23 06:57:18 2017 New Revision: 314122 URL: https://svnweb.freebsd.org/changeset/base/314122 Log: MFC: r312687, r312916 Approved by: sephe (mentor) r312687 ifnet: introduce event handlers for ifup/ifdown events Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together, mainly to support seamless live migration. When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite). So the synthetic NIC driver needs to know when a VF device is becoming UP or DOWN and hence the patch is made. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8963 r312916 ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h Thank glebius for pointing this out: "The network stuff shall not be added to sys/eventhandler.h" Reviewed by: David_A_Bright_DELL.com, sephe, glebius Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9345 Modified: stable/10/sys/net/if.c stable/10/sys/net/if_var.h Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Thu Feb 23 06:49:46 2017 (r314121) +++ stable/10/sys/net/if.c Thu Feb 23 06:57:18 2017 (r314122) @@ -2183,6 +2183,7 @@ void if_down(struct ifnet *ifp) { + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_DOWN); if_unroute(ifp, IFF_UP, AF_UNSPEC); } @@ -2195,6 +2196,7 @@ if_up(struct ifnet *ifp) { if_route(ifp, IFF_UP, AF_UNSPEC); + EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_UP); } /* Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Thu Feb 23 06:49:46 2017 (r314121) +++ stable/10/sys/net/if_var.h Thu Feb 23 06:57:18 2017 (r314122) @@ -424,6 +424,11 @@ EVENTHANDLER_DECLARE(ifnet_departure_eve /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); +/* Interface up/down event */ +#define IFNET_EVENT_UP 0 +#define IFNET_EVENT_DOWN 1 +typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); +EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); /* * interface groups From owner-svn-src-all@freebsd.org Thu Feb 23 07:04: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 13E4ACEA532; Thu, 23 Feb 2017 07:04:19 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFDFC1E4E; Thu, 23 Feb 2017 07:04:18 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1N74H8x017104; Thu, 23 Feb 2017 07:04:17 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N74HHc017099; Thu, 23 Feb 2017 07:04:17 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702230704.v1N74HHc017099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Thu, 23 Feb 2017 07:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314123 - stable/10/sys/dev/hyperv/netvsc 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, 23 Feb 2017 07:04:19 -0000 Author: dexuan Date: Thu Feb 23 07:04:17 2017 New Revision: 314123 URL: https://svnweb.freebsd.org/changeset/base/314123 Log: MFC: r312688 Approved by: sephe (mentor) r312688 hyperv/hn: add the support for VF drivers (SR-IOV) Hyper-V's NIC SR-IOV implementation needs a Hyper-V synthetic NIC and a VF NIC to work together (both NICs have the same MAC address), mainly to support seamless live migration. When the VF device becomes UP (or DOWN), the synthetic NIC driver needs to switch the data path from the synthetic NIC to the VF (or the opposite). Note: multicast/broadcast packets are still received through the synthetic NIC and we need to inject the packets through the VF interface (if the VF is UP), even if the synthetic NIC is DOWN (so we need to force the rxfilter to be NDIS_PACKET_TYPE_PROMISCUOUS, when the VF is UP). Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8964 Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.c stable/10/sys/dev/hyperv/netvsc/hn_nvs.h stable/10/sys/dev/hyperv/netvsc/if_hn.c stable/10/sys/dev/hyperv/netvsc/if_hnreg.h stable/10/sys/dev/hyperv/netvsc/if_hnvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hn_nvs.c Thu Feb 23 06:57:18 2017 (r314122) +++ stable/10/sys/dev/hyperv/netvsc/hn_nvs.c Thu Feb 23 07:04:17 2017 (r314123) @@ -500,6 +500,8 @@ hn_nvs_conf_ndis(struct hn_softc *sc, in conf.nvs_type = HN_NVS_TYPE_NDIS_CONF; conf.nvs_mtu = mtu; conf.nvs_caps = HN_NVS_NDIS_CONF_VLAN; + if (sc->hn_nvs_ver >= HN_NVS_VERSION_5) + conf.nvs_caps |= HN_NVS_NDIS_CONF_SRIOV; /* NOTE: No response. */ error = hn_nvs_req_send(sc, &conf, sizeof(conf)); @@ -719,3 +721,15 @@ hn_nvs_send_rndis_ctrl(struct vmbus_chan return hn_nvs_send_rndis_sglist(chan, HN_NVS_RNDIS_MTYPE_CTRL, sndc, gpa, gpa_cnt); } + +void +hn_nvs_set_datapath(struct hn_softc *sc, uint32_t path) +{ + struct hn_nvs_datapath dp; + + memset(&dp, 0, sizeof(dp)); + dp.nvs_type = HN_NVS_TYPE_SET_DATAPATH; + dp.nvs_active_path = path; + + hn_nvs_req_send(sc, &dp, sizeof(dp)); +} Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.h ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hn_nvs.h Thu Feb 23 06:57:18 2017 (r314122) +++ stable/10/sys/dev/hyperv/netvsc/hn_nvs.h Thu Feb 23 07:04:17 2017 (r314123) @@ -100,6 +100,7 @@ void hn_nvs_sent_xact(struct hn_nvs_sen int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan, struct hn_nvs_sendctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); +void hn_nvs_set_datapath(struct hn_softc *sc, uint32_t path); extern struct hn_nvs_sendctx hn_nvs_sendctx_none; Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Feb 23 06:57:18 2017 (r314122) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Feb 23 07:04:17 2017 (r314123) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -85,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -211,6 +213,11 @@ struct hn_rxinfo { uint32_t hash_value; }; +struct hn_update_vf { + struct hn_rx_ring *rxr; + struct ifnet *vf; +}; + #define HN_RXINFO_VLAN 0x0001 #define HN_RXINFO_CSUM 0x0002 #define HN_RXINFO_HASHINF 0x0004 @@ -288,7 +295,7 @@ static int hn_txagg_pktmax_sysctl(SYSC static int hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS); static int hn_polling_sysctl(SYSCTL_HANDLER_ARGS); -static void hn_stop(struct hn_softc *); +static void hn_stop(struct hn_softc *, bool); static void hn_init_locked(struct hn_softc *); static int hn_chan_attach(struct hn_softc *, struct vmbus_channel *); @@ -696,7 +703,8 @@ hn_rxfilter_config(struct hn_softc *sc) HN_LOCK_ASSERT(sc); - if (ifp->if_flags & IFF_PROMISC) { + if ((ifp->if_flags & IFF_PROMISC) || + (sc->hn_flags & HN_FLAG_VF)) { filter = NDIS_PACKET_TYPE_PROMISCUOUS; } else { filter = NDIS_PACKET_TYPE_DIRECTED; @@ -883,6 +891,119 @@ hn_ifmedia_sts(struct ifnet *ifp, struct ifmr->ifm_active |= IFM_10G_T | IFM_FDX; } +static void +hn_update_vf_task(void *arg, int pending __unused) +{ + struct hn_update_vf *uv = arg; + + uv->rxr->hn_vf = uv->vf; +} + +static void +hn_update_vf(struct hn_softc *sc, struct ifnet *vf) +{ + struct hn_rx_ring *rxr; + struct hn_update_vf uv; + struct task task; + int i; + + HN_LOCK_ASSERT(sc); + + TASK_INIT(&task, 0, hn_update_vf_task, &uv); + + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { + rxr = &sc->hn_rx_ring[i]; + + if (i < sc->hn_rx_ring_inuse) { + uv.rxr = rxr; + uv.vf = vf; + vmbus_chan_run_task(rxr->hn_chan, &task); + } else { + rxr->hn_vf = vf; + } + } +} + +static void +hn_set_vf(struct hn_softc *sc, struct ifnet *ifp, bool vf) +{ + struct ifnet *hn_ifp; + + HN_LOCK(sc); + + if (!(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED)) + goto out; + + hn_ifp = sc->hn_ifp; + + if (ifp == hn_ifp) + goto out; + + if (ifp->if_alloctype != IFT_ETHER) + goto out; + + /* Ignore lagg/vlan interfaces */ + if (strcmp(ifp->if_dname, "lagg") == 0 || + strcmp(ifp->if_dname, "vlan") == 0) + goto out; + + if (bcmp(IF_LLADDR(ifp), IF_LLADDR(hn_ifp), ETHER_ADDR_LEN) != 0) + goto out; + + /* Now we're sure 'ifp' is a real VF device. */ + if (vf) { + if (sc->hn_flags & HN_FLAG_VF) + goto out; + + sc->hn_flags |= HN_FLAG_VF; + hn_rxfilter_config(sc); + } else { + if (!(sc->hn_flags & HN_FLAG_VF)) + goto out; + + sc->hn_flags &= ~HN_FLAG_VF; + if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + hn_rxfilter_config(sc); + else + hn_set_rxfilter(sc, NDIS_PACKET_TYPE_NONE); + } + + hn_nvs_set_datapath(sc, + vf ? HN_NVS_DATAPATH_VF : HN_NVS_DATAPATH_SYNTHETIC); + + hn_update_vf(sc, vf ? ifp : NULL); + + if (vf) { + hn_suspend_mgmt(sc); + sc->hn_link_flags &= + ~(HN_LINK_FLAG_LINKUP | HN_LINK_FLAG_NETCHG); + if_link_state_change(sc->hn_ifp, LINK_STATE_DOWN); + } else { + hn_resume_mgmt(sc); + } + + if (bootverbose) + if_printf(hn_ifp, "Data path is switched %s %s\n", + vf ? "to" : "from", if_name(ifp)); +out: + HN_UNLOCK(sc); +} + +static void +hn_ifnet_event(void *arg, struct ifnet *ifp, int event) +{ + if (event != IFNET_EVENT_UP && event != IFNET_EVENT_DOWN) + return; + + hn_set_vf(arg, ifp, event == IFNET_EVENT_UP); +} + +static void +hn_ifaddr_event(void *arg, struct ifnet *ifp) +{ + hn_set_vf(arg, ifp, ifp->if_flags & IFF_UP); +} + /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */ static const struct hyperv_guid g_net_vsc_device_type = { .hv_guid = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, @@ -1204,6 +1325,12 @@ hn_attach(device_t dev) sc->hn_mgmt_taskq = sc->hn_mgmt_taskq0; hn_update_link_status(sc); + sc->hn_ifnet_evthand = EVENTHANDLER_REGISTER(ifnet_event, + hn_ifnet_event, sc, EVENTHANDLER_PRI_ANY); + + sc->hn_ifaddr_evthand = EVENTHANDLER_REGISTER(ifaddr_event, + hn_ifaddr_event, sc, EVENTHANDLER_PRI_ANY); + return (0); failed: if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) @@ -1218,6 +1345,11 @@ hn_detach(device_t dev) struct hn_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->hn_ifp; + if (sc->hn_ifaddr_evthand != NULL) + EVENTHANDLER_DEREGISTER(ifaddr_event, sc->hn_ifaddr_evthand); + if (sc->hn_ifnet_evthand != NULL) + EVENTHANDLER_DEREGISTER(ifnet_event, sc->hn_ifnet_evthand); + if (sc->hn_xact != NULL && vmbus_chan_is_revoked(sc->hn_prichan)) { /* * In case that the vmbus missed the orphan handler @@ -1230,7 +1362,7 @@ hn_detach(device_t dev) HN_LOCK(sc); if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) - hn_stop(sc); + hn_stop(sc, true); /* * NOTE: * hn_stop() only suspends data, so managment @@ -2113,11 +2245,14 @@ static int hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int dlen, const struct hn_rxinfo *info) { - struct ifnet *ifp = rxr->hn_ifp; + struct ifnet *ifp; struct mbuf *m_new; int size, do_lro = 0, do_csum = 1; int hash_type = M_HASHTYPE_OPAQUE; + /* If the VF is active, inject the packet through the VF */ + ifp = rxr->hn_vf ? rxr->hn_vf : rxr->hn_ifp; + if (dlen <= MHLEN) { m_new = m_gethdr(M_NOWAIT, MT_DATA); if (m_new == NULL) { @@ -2426,7 +2561,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) - hn_stop(sc); + hn_stop(sc, false); } sc->hn_if_flags = ifp->if_flags; @@ -2516,7 +2651,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, } static void -hn_stop(struct hn_softc *sc) +hn_stop(struct hn_softc *sc, bool detaching) { struct ifnet *ifp = sc->hn_ifp; int i; @@ -2537,6 +2672,13 @@ hn_stop(struct hn_softc *sc) atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); for (i = 0; i < sc->hn_tx_ring_inuse; ++i) sc->hn_tx_ring[i].hn_oactive = 0; + + /* + * If the VF is active, make sure the filter is not 0, even if + * the synthetic NIC is down. + */ + if (!detaching && (sc->hn_flags & HN_FLAG_VF)) + hn_rxfilter_config(sc); } static void @@ -4848,7 +4990,8 @@ hn_suspend(struct hn_softc *sc) /* Disable polling. */ hn_polling(sc, 0); - if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) || + (sc->hn_flags & HN_FLAG_VF)) hn_suspend_data(sc); hn_suspend_mgmt(sc); } @@ -4937,9 +5080,18 @@ static void hn_resume(struct hn_softc *sc) { - if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) || + (sc->hn_flags & HN_FLAG_VF)) hn_resume_data(sc); - hn_resume_mgmt(sc); + + /* + * When the VF is activated, the synthetic interface is changed + * to DOWN in hn_set_vf(). Here, if the VF is still active, we + * don't call hn_resume_mgmt() until the VF is deactivated in + * hn_set_vf(). + */ + if (!(sc->hn_flags & HN_FLAG_VF)) + hn_resume_mgmt(sc); /* * Re-enable polling if this interface is running and Modified: stable/10/sys/dev/hyperv/netvsc/if_hnreg.h ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hnreg.h Thu Feb 23 06:57:18 2017 (r314122) +++ stable/10/sys/dev/hyperv/netvsc/if_hnreg.h Thu Feb 23 07:04:17 2017 (r314123) @@ -133,6 +133,17 @@ struct hn_nvs_ndis_init { } __packed; CTASSERT(sizeof(struct hn_nvs_ndis_init) >= HN_NVS_REQSIZE_MIN); +#define HN_NVS_DATAPATH_SYNTHETIC 0 +#define HN_NVS_DATAPATH_VF 1 + +/* No response */ +struct hn_nvs_datapath { + uint32_t nvs_type; /* HN_NVS_TYPE_SET_DATAPATH */ + uint32_t nvs_active_path;/* HN_NVS_DATAPATH_* */ + uint32_t nvs_rsvd[6]; +} __packed; +CTASSERT(sizeof(struct hn_nvs_datapath) >= HN_NVS_REQSIZE_MIN); + struct hn_nvs_rxbuf_conn { uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONN */ uint32_t nvs_gpadl; /* RXBUF vmbus GPADL */ Modified: stable/10/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hnvar.h Thu Feb 23 06:57:18 2017 (r314122) +++ stable/10/sys/dev/hyperv/netvsc/if_hnvar.h Thu Feb 23 07:04:17 2017 (r314123) @@ -59,6 +59,7 @@ struct hn_tx_ring; struct hn_rx_ring { struct ifnet *hn_ifp; + struct ifnet *hn_vf; /* SR-IOV VF */ struct hn_tx_ring *hn_txr; void *hn_pktbuf; int hn_pktbuf_len; @@ -235,6 +236,9 @@ struct hn_softc { int hn_rss_ind_size; uint32_t hn_rss_hash; /* NDIS_HASH_ */ struct ndis_rssprm_toeplitz hn_rss; + + eventhandler_tag hn_ifaddr_evthand; + eventhandler_tag hn_ifnet_evthand; }; #define HN_FLAG_RXBUF_CONNECTED 0x0001 @@ -245,6 +249,7 @@ struct hn_softc { #define HN_FLAG_NO_SLEEPING 0x0020 #define HN_FLAG_RXBUF_REF 0x0040 #define HN_FLAG_CHIM_REF 0x0080 +#define HN_FLAG_VF 0x0100 #define HN_FLAG_ERRORS (HN_FLAG_RXBUF_REF | HN_FLAG_CHIM_REF) From owner-svn-src-all@freebsd.org Thu Feb 23 07:07: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 777F0CEA5E1; Thu, 23 Feb 2017 07:07:22 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CCC11FB3; Thu, 23 Feb 2017 07:07:22 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1N77L1K017287; Thu, 23 Feb 2017 07:07:21 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N77LA2017286; Thu, 23 Feb 2017 07:07:21 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201702230707.v1N77LA2017286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Thu, 23 Feb 2017 07:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314124 - stable/10/sys/dev/hyperv/netvsc 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, 23 Feb 2017 07:07:22 -0000 Author: dexuan Date: Thu Feb 23 07:07:21 2017 New Revision: 314124 URL: https://svnweb.freebsd.org/changeset/base/314124 Log: MFC r312689, r312690 Approved by: sephe (mentor) r312689 hyperv/hn: add a sysctl name for the VF interface This makes it easier for the userland script to find the releated VF interface. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9101 r312690 hyperv/hn: add devctl_notify for VF_UP/DOWN events Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9102 Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Feb 23 07:04:17 2017 (r314123) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Feb 23 07:07:21 2017 (r314124) @@ -294,6 +294,7 @@ static int hn_txagg_pkts_sysctl(SYSCTL static int hn_txagg_pktmax_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS); static int hn_polling_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_vf_sysctl(SYSCTL_HANDLER_ARGS); static void hn_stop(struct hn_softc *, bool); static void hn_init_locked(struct hn_softc *); @@ -982,6 +983,9 @@ hn_set_vf(struct hn_softc *sc, struct if hn_resume_mgmt(sc); } + devctl_notify("HYPERV_NIC_VF", if_name(hn_ifp), + vf ? "VF_UP" : "VF_DOWN", NULL); + if (bootverbose) if_printf(hn_ifp, "Data path is switched %s %s\n", vf ? "to" : "from", if_name(ifp)); @@ -1232,6 +1236,9 @@ hn_attach(device_t dev) CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_polling_sysctl, "I", "Polling frequency: [100,1000000], 0 disable polling"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "vf", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_vf_sysctl, "A", "Virtual Function's name"); /* * Setup the ifmedia, which has been initialized earlier. @@ -3205,6 +3212,22 @@ hn_rss_hash_sysctl(SYSCTL_HANDLER_ARGS) } static int +hn_vf_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char vf_name[128]; + struct ifnet *vf; + + HN_LOCK(sc); + vf_name[0] = '\0'; + vf = sc->hn_rx_ring[0].hn_vf; + if (vf != NULL) + snprintf(vf_name, sizeof(vf_name), "%s", if_name(vf)); + HN_UNLOCK(sc); + return sysctl_handle_string(oidp, vf_name, sizeof(vf_name), req); +} + +static int hn_check_iplen(const struct mbuf *m, int hoff) { const struct ip *ip; From owner-svn-src-all@freebsd.org Thu Feb 23 07:11: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 4D841CEA692; Thu, 23 Feb 2017 07:11:52 +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 AFA1D2E6; Thu, 23 Feb 2017 07:11:51 +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 v1N7Bo32017554; Thu, 23 Feb 2017 07:11:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7BmW5017529; Thu, 23 Feb 2017 07:11:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702230711.v1N7BmW5017529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 23 Feb 2017 07:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r314125 - in releng/11.0: . contrib/mdocml crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bn cry... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 07:11:52 -0000 Author: delphij Date: Thu Feb 23 07:11:48 2017 New Revision: 314125 URL: https://svnweb.freebsd.org/changeset/base/314125 Log: Fix multiple vulnerabilities of OpenSSL. [SA-17:02] Fix system hang when booting when PCI-express HotPlug is enabled. [EN-17:01] Fix NIS master updates are not pushed to NIS slave. [EN-17:02] Fix compatibility with Hyper-V/storage after KB3172614 or KB3179574. [EN-17:03] Make makewhatis output reproducible. [EN-17:04] Approved by: so Modified: releng/11.0/UPDATING releng/11.0/contrib/mdocml/mandocdb.c releng/11.0/crypto/openssl/CHANGES releng/11.0/crypto/openssl/CONTRIBUTING releng/11.0/crypto/openssl/Configure releng/11.0/crypto/openssl/INSTALL releng/11.0/crypto/openssl/Makefile releng/11.0/crypto/openssl/Makefile.org releng/11.0/crypto/openssl/NEWS releng/11.0/crypto/openssl/README releng/11.0/crypto/openssl/apps/apps.c releng/11.0/crypto/openssl/apps/apps.h releng/11.0/crypto/openssl/apps/ca.c releng/11.0/crypto/openssl/apps/cms.c releng/11.0/crypto/openssl/apps/dgst.c releng/11.0/crypto/openssl/apps/dh.c releng/11.0/crypto/openssl/apps/dhparam.c releng/11.0/crypto/openssl/apps/dsa.c releng/11.0/crypto/openssl/apps/dsaparam.c releng/11.0/crypto/openssl/apps/ec.c releng/11.0/crypto/openssl/apps/ecparam.c releng/11.0/crypto/openssl/apps/enc.c releng/11.0/crypto/openssl/apps/gendh.c releng/11.0/crypto/openssl/apps/gendsa.c releng/11.0/crypto/openssl/apps/genpkey.c releng/11.0/crypto/openssl/apps/genrsa.c releng/11.0/crypto/openssl/apps/pkcs12.c releng/11.0/crypto/openssl/apps/pkcs7.c releng/11.0/crypto/openssl/apps/pkcs8.c releng/11.0/crypto/openssl/apps/pkey.c releng/11.0/crypto/openssl/apps/pkeyparam.c releng/11.0/crypto/openssl/apps/pkeyutl.c releng/11.0/crypto/openssl/apps/prime.c releng/11.0/crypto/openssl/apps/rand.c releng/11.0/crypto/openssl/apps/req.c releng/11.0/crypto/openssl/apps/rsa.c releng/11.0/crypto/openssl/apps/rsautl.c releng/11.0/crypto/openssl/apps/s_cb.c releng/11.0/crypto/openssl/apps/s_client.c releng/11.0/crypto/openssl/apps/s_server.c releng/11.0/crypto/openssl/apps/smime.c releng/11.0/crypto/openssl/apps/speed.c releng/11.0/crypto/openssl/apps/spkac.c releng/11.0/crypto/openssl/apps/srp.c releng/11.0/crypto/openssl/apps/verify.c releng/11.0/crypto/openssl/apps/x509.c releng/11.0/crypto/openssl/crypto/aes/asm/aes-s390x.pl releng/11.0/crypto/openssl/crypto/asn1/p5_pbev2.c releng/11.0/crypto/openssl/crypto/asn1/x_crl.c releng/11.0/crypto/openssl/crypto/bn/asm/x86_64-mont.pl releng/11.0/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl releng/11.0/crypto/openssl/crypto/bn/bn_exp.c releng/11.0/crypto/openssl/crypto/bn/bn_mul.c releng/11.0/crypto/openssl/crypto/bn/bn_prime.c releng/11.0/crypto/openssl/crypto/bn/bn_sqr.c releng/11.0/crypto/openssl/crypto/cms/cms_kari.c releng/11.0/crypto/openssl/crypto/dh/dh_key.c releng/11.0/crypto/openssl/crypto/dsa/dsa_pmeth.c releng/11.0/crypto/openssl/crypto/ec/ec2_mult.c releng/11.0/crypto/openssl/crypto/ecdh/ech_ossl.c releng/11.0/crypto/openssl/crypto/err/err.c releng/11.0/crypto/openssl/crypto/evp/e_aes.c releng/11.0/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c releng/11.0/crypto/openssl/crypto/evp/evp.h releng/11.0/crypto/openssl/crypto/evp/evp_err.c releng/11.0/crypto/openssl/crypto/evp/pmeth_fn.c releng/11.0/crypto/openssl/crypto/evp/pmeth_lib.c releng/11.0/crypto/openssl/crypto/modes/ctr128.c releng/11.0/crypto/openssl/crypto/opensslv.h releng/11.0/crypto/openssl/crypto/perlasm/x86_64-xlate.pl releng/11.0/crypto/openssl/crypto/rsa/rsa_gen.c releng/11.0/crypto/openssl/crypto/rsa/rsa_oaep.c releng/11.0/crypto/openssl/crypto/rsa/rsa_pmeth.c releng/11.0/crypto/openssl/crypto/s390xcap.c releng/11.0/crypto/openssl/crypto/ui/ui_lib.c releng/11.0/crypto/openssl/crypto/ui/ui_openssl.c releng/11.0/crypto/openssl/doc/apps/ocsp.pod releng/11.0/crypto/openssl/doc/crypto/EVP_DigestSignInit.pod releng/11.0/crypto/openssl/doc/crypto/EVP_DigestVerifyInit.pod releng/11.0/crypto/openssl/doc/crypto/RSA_generate_key.pod releng/11.0/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod releng/11.0/crypto/openssl/doc/crypto/X509_NAME_print_ex.pod releng/11.0/crypto/openssl/doc/ssl/SSL_CTX_set_session_cache_mode.pod releng/11.0/crypto/openssl/doc/ssl/SSL_get_error.pod releng/11.0/crypto/openssl/doc/ssl/SSL_read.pod releng/11.0/crypto/openssl/doc/ssl/SSL_write.pod releng/11.0/crypto/openssl/engines/ccgost/Makefile releng/11.0/crypto/openssl/ssl/bad_dtls_test.c releng/11.0/crypto/openssl/ssl/s23_pkt.c releng/11.0/crypto/openssl/ssl/s2_lib.c releng/11.0/crypto/openssl/ssl/s2_pkt.c releng/11.0/crypto/openssl/ssl/s3_clnt.c releng/11.0/crypto/openssl/ssl/s3_pkt.c releng/11.0/crypto/openssl/ssl/s3_srvr.c releng/11.0/crypto/openssl/ssl/ssl_cert.c releng/11.0/crypto/openssl/ssl/ssl_err.c releng/11.0/crypto/openssl/ssl/ssl_lib.c releng/11.0/crypto/openssl/ssl/ssl_locl.h releng/11.0/crypto/openssl/ssl/ssl_sess.c releng/11.0/crypto/openssl/ssl/t1_lib.c releng/11.0/crypto/openssl/util/domd releng/11.0/crypto/openssl/util/mklink.pl releng/11.0/libexec/ypxfr/ypxfr_getmap.c releng/11.0/secure/lib/libcrypto/Makefile.inc releng/11.0/secure/lib/libcrypto/amd64/x86_64-mont.S releng/11.0/secure/lib/libcrypto/amd64/x86_64-mont5.S releng/11.0/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_length.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_new.3 releng/11.0/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 releng/11.0/secure/lib/libcrypto/man/ASN1_TIME_set.3 releng/11.0/secure/lib/libcrypto/man/ASN1_generate_nconf.3 releng/11.0/secure/lib/libcrypto/man/BIO_ctrl.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_base64.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_buffer.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_cipher.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_md.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_null.3 releng/11.0/secure/lib/libcrypto/man/BIO_f_ssl.3 releng/11.0/secure/lib/libcrypto/man/BIO_find_type.3 releng/11.0/secure/lib/libcrypto/man/BIO_new.3 releng/11.0/secure/lib/libcrypto/man/BIO_new_CMS.3 releng/11.0/secure/lib/libcrypto/man/BIO_push.3 releng/11.0/secure/lib/libcrypto/man/BIO_read.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_accept.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_bio.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_connect.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_fd.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_file.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_mem.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_null.3 releng/11.0/secure/lib/libcrypto/man/BIO_s_socket.3 releng/11.0/secure/lib/libcrypto/man/BIO_set_callback.3 releng/11.0/secure/lib/libcrypto/man/BIO_should_retry.3 releng/11.0/secure/lib/libcrypto/man/BN_BLINDING_new.3 releng/11.0/secure/lib/libcrypto/man/BN_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/BN_CTX_start.3 releng/11.0/secure/lib/libcrypto/man/BN_add.3 releng/11.0/secure/lib/libcrypto/man/BN_add_word.3 releng/11.0/secure/lib/libcrypto/man/BN_bn2bin.3 releng/11.0/secure/lib/libcrypto/man/BN_cmp.3 releng/11.0/secure/lib/libcrypto/man/BN_copy.3 releng/11.0/secure/lib/libcrypto/man/BN_generate_prime.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_inverse.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 releng/11.0/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 releng/11.0/secure/lib/libcrypto/man/BN_new.3 releng/11.0/secure/lib/libcrypto/man/BN_num_bytes.3 releng/11.0/secure/lib/libcrypto/man/BN_rand.3 releng/11.0/secure/lib/libcrypto/man/BN_set_bit.3 releng/11.0/secure/lib/libcrypto/man/BN_swap.3 releng/11.0/secure/lib/libcrypto/man/BN_zero.3 releng/11.0/secure/lib/libcrypto/man/CMS_add0_cert.3 releng/11.0/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 releng/11.0/secure/lib/libcrypto/man/CMS_add1_signer.3 releng/11.0/secure/lib/libcrypto/man/CMS_compress.3 releng/11.0/secure/lib/libcrypto/man/CMS_decrypt.3 releng/11.0/secure/lib/libcrypto/man/CMS_encrypt.3 releng/11.0/secure/lib/libcrypto/man/CMS_final.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 releng/11.0/secure/lib/libcrypto/man/CMS_get0_type.3 releng/11.0/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 releng/11.0/secure/lib/libcrypto/man/CMS_sign.3 releng/11.0/secure/lib/libcrypto/man/CMS_sign_receipt.3 releng/11.0/secure/lib/libcrypto/man/CMS_uncompress.3 releng/11.0/secure/lib/libcrypto/man/CMS_verify.3 releng/11.0/secure/lib/libcrypto/man/CMS_verify_receipt.3 releng/11.0/secure/lib/libcrypto/man/CONF_modules_free.3 releng/11.0/secure/lib/libcrypto/man/CONF_modules_load_file.3 releng/11.0/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 releng/11.0/secure/lib/libcrypto/man/DH_generate_key.3 releng/11.0/secure/lib/libcrypto/man/DH_generate_parameters.3 releng/11.0/secure/lib/libcrypto/man/DH_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/DH_new.3 releng/11.0/secure/lib/libcrypto/man/DH_set_method.3 releng/11.0/secure/lib/libcrypto/man/DH_size.3 releng/11.0/secure/lib/libcrypto/man/DSA_SIG_new.3 releng/11.0/secure/lib/libcrypto/man/DSA_do_sign.3 releng/11.0/secure/lib/libcrypto/man/DSA_dup_DH.3 releng/11.0/secure/lib/libcrypto/man/DSA_generate_key.3 releng/11.0/secure/lib/libcrypto/man/DSA_generate_parameters.3 releng/11.0/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/DSA_new.3 releng/11.0/secure/lib/libcrypto/man/DSA_set_method.3 releng/11.0/secure/lib/libcrypto/man/DSA_sign.3 releng/11.0/secure/lib/libcrypto/man/DSA_size.3 releng/11.0/secure/lib/libcrypto/man/EC_GFp_simple_method.3 releng/11.0/secure/lib/libcrypto/man/EC_GROUP_copy.3 releng/11.0/secure/lib/libcrypto/man/EC_GROUP_new.3 releng/11.0/secure/lib/libcrypto/man/EC_KEY_new.3 releng/11.0/secure/lib/libcrypto/man/EC_POINT_add.3 releng/11.0/secure/lib/libcrypto/man/EC_POINT_new.3 releng/11.0/secure/lib/libcrypto/man/ERR_GET_LIB.3 releng/11.0/secure/lib/libcrypto/man/ERR_clear_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_error_string.3 releng/11.0/secure/lib/libcrypto/man/ERR_get_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 releng/11.0/secure/lib/libcrypto/man/ERR_load_strings.3 releng/11.0/secure/lib/libcrypto/man/ERR_print_errors.3 releng/11.0/secure/lib/libcrypto/man/ERR_put_error.3 releng/11.0/secure/lib/libcrypto/man/ERR_remove_state.3 releng/11.0/secure/lib/libcrypto/man/ERR_set_mark.3 releng/11.0/secure/lib/libcrypto/man/EVP_BytesToKey.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestSignInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_EncodeInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_EncryptInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_OpenInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_derive.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_new.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_sign.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_verify.3 releng/11.0/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 releng/11.0/secure/lib/libcrypto/man/EVP_SealInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_SignInit.3 releng/11.0/secure/lib/libcrypto/man/EVP_VerifyInit.3 releng/11.0/secure/lib/libcrypto/man/OBJ_nid2obj.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_Applink.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_config.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 releng/11.0/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 releng/11.0/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 releng/11.0/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 releng/11.0/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 releng/11.0/secure/lib/libcrypto/man/PKCS12_create.3 releng/11.0/secure/lib/libcrypto/man/PKCS12_parse.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_decrypt.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_encrypt.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_sign.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 releng/11.0/secure/lib/libcrypto/man/PKCS7_verify.3 releng/11.0/secure/lib/libcrypto/man/RAND_add.3 releng/11.0/secure/lib/libcrypto/man/RAND_bytes.3 releng/11.0/secure/lib/libcrypto/man/RAND_cleanup.3 releng/11.0/secure/lib/libcrypto/man/RAND_egd.3 releng/11.0/secure/lib/libcrypto/man/RAND_load_file.3 releng/11.0/secure/lib/libcrypto/man/RAND_set_rand_method.3 releng/11.0/secure/lib/libcrypto/man/RSA_blinding_on.3 releng/11.0/secure/lib/libcrypto/man/RSA_check_key.3 releng/11.0/secure/lib/libcrypto/man/RSA_generate_key.3 releng/11.0/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/RSA_new.3 releng/11.0/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 releng/11.0/secure/lib/libcrypto/man/RSA_print.3 releng/11.0/secure/lib/libcrypto/man/RSA_private_encrypt.3 releng/11.0/secure/lib/libcrypto/man/RSA_public_encrypt.3 releng/11.0/secure/lib/libcrypto/man/RSA_set_method.3 releng/11.0/secure/lib/libcrypto/man/RSA_sign.3 releng/11.0/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 releng/11.0/secure/lib/libcrypto/man/RSA_size.3 releng/11.0/secure/lib/libcrypto/man/SMIME_read_CMS.3 releng/11.0/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 releng/11.0/secure/lib/libcrypto/man/SMIME_write_CMS.3 releng/11.0/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 releng/11.0/secure/lib/libcrypto/man/X509_NAME_print_ex.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 releng/11.0/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 releng/11.0/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 releng/11.0/secure/lib/libcrypto/man/X509_check_host.3 releng/11.0/secure/lib/libcrypto/man/X509_new.3 releng/11.0/secure/lib/libcrypto/man/X509_verify_cert.3 releng/11.0/secure/lib/libcrypto/man/bio.3 releng/11.0/secure/lib/libcrypto/man/blowfish.3 releng/11.0/secure/lib/libcrypto/man/bn.3 releng/11.0/secure/lib/libcrypto/man/bn_internal.3 releng/11.0/secure/lib/libcrypto/man/buffer.3 releng/11.0/secure/lib/libcrypto/man/crypto.3 releng/11.0/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 releng/11.0/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 releng/11.0/secure/lib/libcrypto/man/d2i_DHparams.3 releng/11.0/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_ECPKParameters.3 releng/11.0/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_PrivateKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_CRL.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_NAME.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_REQ.3 releng/11.0/secure/lib/libcrypto/man/d2i_X509_SIG.3 releng/11.0/secure/lib/libcrypto/man/des.3 releng/11.0/secure/lib/libcrypto/man/dh.3 releng/11.0/secure/lib/libcrypto/man/dsa.3 releng/11.0/secure/lib/libcrypto/man/ec.3 releng/11.0/secure/lib/libcrypto/man/ecdsa.3 releng/11.0/secure/lib/libcrypto/man/engine.3 releng/11.0/secure/lib/libcrypto/man/err.3 releng/11.0/secure/lib/libcrypto/man/evp.3 releng/11.0/secure/lib/libcrypto/man/hmac.3 releng/11.0/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 releng/11.0/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 releng/11.0/secure/lib/libcrypto/man/lh_stats.3 releng/11.0/secure/lib/libcrypto/man/lhash.3 releng/11.0/secure/lib/libcrypto/man/md5.3 releng/11.0/secure/lib/libcrypto/man/mdc2.3 releng/11.0/secure/lib/libcrypto/man/pem.3 releng/11.0/secure/lib/libcrypto/man/rand.3 releng/11.0/secure/lib/libcrypto/man/rc4.3 releng/11.0/secure/lib/libcrypto/man/ripemd.3 releng/11.0/secure/lib/libcrypto/man/rsa.3 releng/11.0/secure/lib/libcrypto/man/sha.3 releng/11.0/secure/lib/libcrypto/man/threads.3 releng/11.0/secure/lib/libcrypto/man/ui.3 releng/11.0/secure/lib/libcrypto/man/ui_compat.3 releng/11.0/secure/lib/libcrypto/man/x509.3 releng/11.0/secure/lib/libssl/man/SSL_CIPHER_get_name.3 releng/11.0/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_new.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_cmd.3 releng/11.0/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_add_session.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_ctrl.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_free.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get0_param.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_new.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_number.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_sessions.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set1_curves.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_options.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_timeout.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_set_verify.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_certificate.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 releng/11.0/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_free.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_SESSION_get_time.3 releng/11.0/secure/lib/libssl/man/SSL_accept.3 releng/11.0/secure/lib/libssl/man/SSL_alert_type_string.3 releng/11.0/secure/lib/libssl/man/SSL_check_chain.3 releng/11.0/secure/lib/libssl/man/SSL_clear.3 releng/11.0/secure/lib/libssl/man/SSL_connect.3 releng/11.0/secure/lib/libssl/man/SSL_do_handshake.3 releng/11.0/secure/lib/libssl/man/SSL_free.3 releng/11.0/secure/lib/libssl/man/SSL_get_SSL_CTX.3 releng/11.0/secure/lib/libssl/man/SSL_get_ciphers.3 releng/11.0/secure/lib/libssl/man/SSL_get_client_CA_list.3 releng/11.0/secure/lib/libssl/man/SSL_get_current_cipher.3 releng/11.0/secure/lib/libssl/man/SSL_get_default_timeout.3 releng/11.0/secure/lib/libssl/man/SSL_get_error.3 releng/11.0/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 releng/11.0/secure/lib/libssl/man/SSL_get_ex_new_index.3 releng/11.0/secure/lib/libssl/man/SSL_get_fd.3 releng/11.0/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 releng/11.0/secure/lib/libssl/man/SSL_get_peer_certificate.3 releng/11.0/secure/lib/libssl/man/SSL_get_psk_identity.3 releng/11.0/secure/lib/libssl/man/SSL_get_rbio.3 releng/11.0/secure/lib/libssl/man/SSL_get_session.3 releng/11.0/secure/lib/libssl/man/SSL_get_verify_result.3 releng/11.0/secure/lib/libssl/man/SSL_get_version.3 releng/11.0/secure/lib/libssl/man/SSL_library_init.3 releng/11.0/secure/lib/libssl/man/SSL_load_client_CA_file.3 releng/11.0/secure/lib/libssl/man/SSL_new.3 releng/11.0/secure/lib/libssl/man/SSL_pending.3 releng/11.0/secure/lib/libssl/man/SSL_read.3 releng/11.0/secure/lib/libssl/man/SSL_rstate_string.3 releng/11.0/secure/lib/libssl/man/SSL_session_reused.3 releng/11.0/secure/lib/libssl/man/SSL_set_bio.3 releng/11.0/secure/lib/libssl/man/SSL_set_connect_state.3 releng/11.0/secure/lib/libssl/man/SSL_set_fd.3 releng/11.0/secure/lib/libssl/man/SSL_set_session.3 releng/11.0/secure/lib/libssl/man/SSL_set_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_set_verify_result.3 releng/11.0/secure/lib/libssl/man/SSL_shutdown.3 releng/11.0/secure/lib/libssl/man/SSL_state_string.3 releng/11.0/secure/lib/libssl/man/SSL_want.3 releng/11.0/secure/lib/libssl/man/SSL_write.3 releng/11.0/secure/lib/libssl/man/d2i_SSL_SESSION.3 releng/11.0/secure/lib/libssl/man/ssl.3 releng/11.0/secure/usr.bin/openssl/man/CA.pl.1 releng/11.0/secure/usr.bin/openssl/man/asn1parse.1 releng/11.0/secure/usr.bin/openssl/man/c_rehash.1 releng/11.0/secure/usr.bin/openssl/man/ca.1 releng/11.0/secure/usr.bin/openssl/man/ciphers.1 releng/11.0/secure/usr.bin/openssl/man/cms.1 releng/11.0/secure/usr.bin/openssl/man/crl.1 releng/11.0/secure/usr.bin/openssl/man/crl2pkcs7.1 releng/11.0/secure/usr.bin/openssl/man/dgst.1 releng/11.0/secure/usr.bin/openssl/man/dhparam.1 releng/11.0/secure/usr.bin/openssl/man/dsa.1 releng/11.0/secure/usr.bin/openssl/man/dsaparam.1 releng/11.0/secure/usr.bin/openssl/man/ec.1 releng/11.0/secure/usr.bin/openssl/man/ecparam.1 releng/11.0/secure/usr.bin/openssl/man/enc.1 releng/11.0/secure/usr.bin/openssl/man/errstr.1 releng/11.0/secure/usr.bin/openssl/man/gendsa.1 releng/11.0/secure/usr.bin/openssl/man/genpkey.1 releng/11.0/secure/usr.bin/openssl/man/genrsa.1 releng/11.0/secure/usr.bin/openssl/man/nseq.1 releng/11.0/secure/usr.bin/openssl/man/ocsp.1 releng/11.0/secure/usr.bin/openssl/man/openssl.1 releng/11.0/secure/usr.bin/openssl/man/passwd.1 releng/11.0/secure/usr.bin/openssl/man/pkcs12.1 releng/11.0/secure/usr.bin/openssl/man/pkcs7.1 releng/11.0/secure/usr.bin/openssl/man/pkcs8.1 releng/11.0/secure/usr.bin/openssl/man/pkey.1 releng/11.0/secure/usr.bin/openssl/man/pkeyparam.1 releng/11.0/secure/usr.bin/openssl/man/pkeyutl.1 releng/11.0/secure/usr.bin/openssl/man/rand.1 releng/11.0/secure/usr.bin/openssl/man/req.1 releng/11.0/secure/usr.bin/openssl/man/rsa.1 releng/11.0/secure/usr.bin/openssl/man/rsautl.1 releng/11.0/secure/usr.bin/openssl/man/s_client.1 releng/11.0/secure/usr.bin/openssl/man/s_server.1 releng/11.0/secure/usr.bin/openssl/man/s_time.1 releng/11.0/secure/usr.bin/openssl/man/sess_id.1 releng/11.0/secure/usr.bin/openssl/man/smime.1 releng/11.0/secure/usr.bin/openssl/man/speed.1 releng/11.0/secure/usr.bin/openssl/man/spkac.1 releng/11.0/secure/usr.bin/openssl/man/ts.1 releng/11.0/secure/usr.bin/openssl/man/tsget.1 releng/11.0/secure/usr.bin/openssl/man/verify.1 releng/11.0/secure/usr.bin/openssl/man/version.1 releng/11.0/secure/usr.bin/openssl/man/x509.1 releng/11.0/secure/usr.bin/openssl/man/x509v3_config.1 releng/11.0/sys/cam/ata/ata_xpt.c releng/11.0/sys/conf/files.amd64 releng/11.0/sys/conf/files.i386 releng/11.0/sys/conf/newvers.sh releng/11.0/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c releng/11.0/sys/dev/pci/pci_pci.c releng/11.0/sys/modules/hyperv/Makefile releng/11.0/sys/sys/eventhandler.h releng/11.0/sys/x86/x86/io_apic.c Modified: releng/11.0/UPDATING ============================================================================== --- releng/11.0/UPDATING Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/UPDATING Thu Feb 23 07:11:48 2017 (r314125) @@ -16,6 +16,24 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20170223 p8 FreeBSD-SA-17:02.openssl + FreeBSD-EN-17:01.pcie + FreeBSD-EN-17:02.yp + FreeBSD-EN-17:03.hyperv + FreeBSD-EN-17:04.mandoc + + Fix multiple vulnerabilities of OpenSSL. [SA-17:02] + + Fix system hang when booting when PCI-express HotPlug is enabled. + [EN-17:01] + + Fix NIS master updates are not pushed to NIS slave. [EN-17:02] + + Fix compatibility with Hyper-V/storage after KB3172614 or + KB3179574. [EN-17:03] + + Make makewhatis output reproducible. [EN-17:04] + 20170111 p7 FreeBSD-SA-17:01.openssh Fix multiple vulnerabilities of OpenSSH. Modified: releng/11.0/contrib/mdocml/mandocdb.c ============================================================================== --- releng/11.0/contrib/mdocml/mandocdb.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/contrib/mdocml/mandocdb.c Thu Feb 23 07:11:48 2017 (r314125) @@ -101,6 +101,7 @@ struct mpage { char *arch; /* architecture from file content */ char *title; /* title from file content */ char *desc; /* description from file content */ + struct mpage *next; /* singly linked list */ struct mlink *mlinks; /* singly linked list */ int form; /* format from file content */ int name_head_done; @@ -144,6 +145,7 @@ static void dbadd_mlink_name(const stru static int dbopen(int); static void dbprune(void); static void filescan(const char *); +static int fts_compare(const FTSENT *const *, const FTSENT *const *); static void mlink_add(struct mlink *, const struct stat *); static void mlink_check(struct mpage *, struct mlink *); static void mlink_free(struct mlink *); @@ -202,6 +204,7 @@ static struct ohash strings; /* table o static sqlite3 *db = NULL; /* current database */ static sqlite3_stmt *stmts[STMT__MAX]; /* current statements */ static uint64_t name_mask; +static struct mpage *mpage_head; static const struct mdoc_handler mdocs[MDOC_MAX] = { { NULL, 0 }, /* Ap */ @@ -562,6 +565,20 @@ usage: return (int)MANDOCLEVEL_BADARG; } +static int +fts_compare(const FTSENT *const *a, const FTSENT *const *b) +{ + + /* + * The mpage list is processed in the opposite order to which pages are + * added, so traverse the hierarchy in reverse alpha order, resulting + * in database inserts in alpha order. This is not required for correct + * operation, but is helpful when inspecting the database during + * development. + */ + return -strcmp((*a)->fts_name, (*b)->fts_name); +} + /* * Scan a directory tree rooted at "basedir" for manpages. * We use fts(), scanning directory parts along the way for clues to our @@ -591,8 +608,8 @@ treescan(void) argv[0] = "."; argv[1] = (char *)NULL; - f = fts_open((char * const *)argv, - FTS_PHYSICAL | FTS_NOCHDIR, NULL); + f = fts_open((char * const *)argv, FTS_PHYSICAL | FTS_NOCHDIR, + fts_compare); if (f == NULL) { exitcode = (int)MANDOCLEVEL_SYSERR; say("", "&fts_open"); @@ -957,6 +974,8 @@ mlink_add(struct mlink *mlink, const str mpage = mandoc_calloc(1, sizeof(struct mpage)); mpage->inodev.st_ino = inodev.st_ino; mpage->inodev.st_dev = inodev.st_dev; + mpage->next = mpage_head; + mpage_head = mpage; ohash_insert(&mpages, slot, mpage); } else mlink->next = mpage->mlinks; @@ -980,20 +999,18 @@ mpages_free(void) { struct mpage *mpage; struct mlink *mlink; - unsigned int slot; - mpage = ohash_first(&mpages, &slot); - while (NULL != mpage) { + while (NULL != (mpage = mpage_head)) { while (NULL != (mlink = mpage->mlinks)) { mpage->mlinks = mlink->next; mlink_free(mlink); } + mpage_head = mpage->next; free(mpage->sec); free(mpage->arch); free(mpage->title); free(mpage->desc); free(mpage); - mpage = ohash_next(&mpages, &slot); } } @@ -1114,18 +1131,14 @@ mpages_merge(struct mparse *mp) char *sodest; char *cp; int fd; - unsigned int pslot; if ( ! nodb) SQL_EXEC("BEGIN TRANSACTION"); - mpage = ohash_first(&mpages, &pslot); - while (mpage != NULL) { + for (mpage = mpage_head; mpage != NULL; mpage = mpage->next) { mlinks_undupe(mpage); - if ((mlink = mpage->mlinks) == NULL) { - mpage = ohash_next(&mpages, &pslot); + if ((mlink = mpage->mlinks) == NULL) continue; - } name_mask = NAME_MASK; mandoc_ohash_init(&names, 4, offsetof(struct str, key)); @@ -1247,7 +1260,6 @@ mpages_merge(struct mparse *mp) nextpage: ohash_delete(&strings); ohash_delete(&names); - mpage = ohash_next(&mpages, &pslot); } if (0 == nodb) Modified: releng/11.0/crypto/openssl/CHANGES ============================================================================== --- releng/11.0/crypto/openssl/CHANGES Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/CHANGES Thu Feb 23 07:11:48 2017 (r314125) @@ -2,6 +2,67 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2j and 1.0.2k [26 Jan 2017] + + *) Truncated packet could crash via OOB read + + If one side of an SSL/TLS path is running on a 32-bit host and a specific + cipher is being used, then a truncated packet can cause that host to + perform an out-of-bounds read, usually resulting in a crash. + + This issue was reported to OpenSSL by Robert ÅšwiÄ™cki of Google. + (CVE-2017-3731) + [Andy Polyakov] + + *) BN_mod_exp may produce incorrect results on x86_64 + + There is a carry propagating bug in the x86_64 Montgomery squaring + procedure. No EC algorithms are affected. Analysis suggests that attacks + against RSA and DSA as a result of this defect would be very difficult to + perform and are not believed likely. Attacks against DH are considered just + feasible (although very difficult) because most of the work necessary to + deduce information about a private key may be performed offline. The amount + of resources required for such an attack would be very significant and + likely only accessible to a limited number of attackers. An attacker would + additionally need online access to an unpatched system using the target + private key in a scenario with persistent DH parameters and a private + key that is shared between multiple clients. For example this can occur by + default in OpenSSL DHE based SSL/TLS ciphersuites. Note: This issue is very + similar to CVE-2015-3193 but must be treated as a separate problem. + + This issue was reported to OpenSSL by the OSS-Fuzz project. + (CVE-2017-3732) + [Andy Polyakov] + + *) Montgomery multiplication may produce incorrect results + + There is a carry propagating bug in the Broadwell-specific Montgomery + multiplication procedure that handles input lengths divisible by, but + longer than 256 bits. Analysis suggests that attacks against RSA, DSA + and DH private keys are impossible. This is because the subroutine in + question is not used in operations with the private key itself and an input + of the attacker's direct choice. Otherwise the bug can manifest itself as + transient authentication and key negotiation failures or reproducible + erroneous outcome of public-key operations with specially crafted input. + Among EC algorithms only Brainpool P-512 curves are affected and one + presumably can attack ECDH key negotiation. Impact was not analyzed in + detail, because pre-requisites for attack are considered unlikely. Namely + multiple clients have to choose the curve in question and the server has to + share the private key among them, neither of which is default behaviour. + Even then only clients that chose the curve will be affected. + + This issue was publicly reported as transient failures and was not + initially recognized as a security issue. Thanks to Richard Morgan for + providing reproducible case. + (CVE-2016-7055) + [Andy Polyakov] + + *) OpenSSL now fails if it receives an unrecognised record type in TLS1.0 + or TLS1.1. Previously this only happened in SSLv3 and TLS1.2. This is to + prevent issues where no progress is being made and the peer continually + sends unrecognised record types, using up resources processing them. + [Matt Caswell] + Changes between 1.0.2i and 1.0.2j [26 Sep 2016] *) Missing CRL sanity check Modified: releng/11.0/crypto/openssl/CONTRIBUTING ============================================================================== --- releng/11.0/crypto/openssl/CONTRIBUTING Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/CONTRIBUTING Thu Feb 23 07:11:48 2017 (r314125) @@ -1,4 +1,4 @@ -HOW TO CONTRIBUTE TO PATCHES OpenSSL +HOW TO CONTRIBUTE PATCHES TO OpenSSL ------------------------------------ (Please visit https://www.openssl.org/community/getting-started.html for @@ -11,34 +11,12 @@ OpenSSL community you might want to disc list first. Someone may be already working on the same thing or there may be a good reason as to why that feature isn't implemented. -The best way to submit a patch is to make a pull request on GitHub. -(It is not necessary to send mail to rt@openssl.org to open a ticket!) -If you think the patch could use feedback from the community, please -start a thread on openssl-dev. - -You can also submit patches by sending it as mail to rt@openssl.org. -Please include the word "PATCH" and an explanation of what the patch -does in the subject line. If you do this, our preferred format is "git -format-patch" output. For example to provide a patch file containing the -last commit in your local git repository use the following command: - - % git format-patch --stdout HEAD^ >mydiffs.patch - -Another method of creating an acceptable patch file without using git is as -follows: - - % cd openssl-work - ...make your changes... - % ./Configure dist; make clean - % cd .. - % diff -ur openssl-orig openssl-work >mydiffs.patch - -Note that pull requests are generally easier for the team, and community, to -work with. Pull requests benefit from all of the standard GitHub features, -including code review tools, simpler integration, and CI build support. +To submit a patch, make a pull request on GitHub. If you think the patch +could use feedback from the community, please start a thread on openssl-dev +to discuss it. -No matter how a patch is submitted, the following items will help make -the acceptance and review process faster: +Having addressed the following items before the PR will help make the +acceptance and review process faster: 1. Anything other than trivial contributions will require a contributor licensing agreement, giving us permission to use your code. See @@ -55,21 +33,22 @@ the acceptance and review process faster in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html - 3. Patches should be as current as possible. When using GitHub, please - expect to have to rebase and update often. Note that we do not accept merge - commits. You will be asked to remove them before a patch is considered - acceptable. + 3. Patches should be as current as possible; expect to have to rebase + often. We do not accept merge commits; You will be asked to remove + them before a patch is considered acceptable. 4. Patches should follow our coding style (see https://www.openssl.org/policies/codingstyle.html) and compile without warnings. Where gcc or clang is availble you should use the --strict-warnings Configure option. OpenSSL compiles on many varied platforms: try to ensure you only use portable features. + Clean builds via Travis and AppVeyor are expected, and done whenever + a PR is created or updated. - 5. When at all possible, patches should include tests. These can either be - added to an existing test, or completely new. Please see test/README - for information on the test framework. - - 6. New features or changed functionality must include documentation. Please - look at the "pod" files in doc/apps, doc/crypto and doc/ssl for examples of - our style. + 5. When at all possible, patches should include tests. These can + either be added to an existing test, or completely new. Please see + test/README for information on the test framework. + + 6. New features or changed functionality must include + documentation. Please look at the "pod" files in doc/apps, doc/crypto + and doc/ssl for examples of our style. Modified: releng/11.0/crypto/openssl/Configure ============================================================================== --- releng/11.0/crypto/openssl/Configure Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/Configure Thu Feb 23 07:11:48 2017 (r314125) @@ -7,6 +7,7 @@ eval 'exec perl -S $0 ${1+"$@"}' require 5.000; use strict; +use File::Compare; # see INSTALL for instructions. @@ -57,12 +58,13 @@ my $usage="Usage: Configure [no- # zlib-dynamic Like "zlib", but the zlib library is expected to be a shared # library and will be loaded in run-time by the OpenSSL library. # sctp include SCTP support -# 386 generate 80386 code # enable-weak-ssl-ciphers # Enable EXPORT and LOW SSLv3 ciphers that are disabled by # default. Note, weak SSLv2 ciphers are unconditionally # disabled. -# no-sse2 disables IA-32 SSE2 code, above option implies no-sse2 +# 386 generate 80386 code in assembly modules +# no-sse2 disables IA-32 SSE2 code in assembly modules, the above +# mentioned '386' option implies this one # no- build without specified algorithm (rsa, idea, rc5, ...) # - + compiler options are passed through # @@ -1792,8 +1794,16 @@ while () } close(IN); close(OUT); -rename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile; -rename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n"; +if ((compare($Makefile, "$Makefile.new")) + or file_newer('Configure', $Makefile) + or file_newer('config', $Makefile) + or file_newer('Makefile.org', $Makefile)) + { + rename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile; + rename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n"; + } +else + { unlink("$Makefile.new"); } print "CC =$cc\n"; print "CFLAG =$cflags\n"; @@ -1985,9 +1995,13 @@ print OUT "#ifdef __cplusplus\n"; print OUT "}\n"; print OUT "#endif\n"; close(OUT); -rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h"; -rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n"; - +if (compare("crypto/opensslconf.h.new","crypto/opensslconf.h")) + { + rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h"; + rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n"; + } +else + { unlink("crypto/opensslconf.h.new"); } # Fix the date @@ -2289,3 +2303,9 @@ sub test_sanity print STDERR "No sanity errors detected!\n" if $errorcnt == 0; return $errorcnt; } + +sub file_newer + { + my ($file1, $file2) = @_; + return (stat($file1))[9] > (stat($file2))[9] + } Modified: releng/11.0/crypto/openssl/INSTALL ============================================================================== --- releng/11.0/crypto/openssl/INSTALL Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/INSTALL Thu Feb 23 07:11:48 2017 (r314125) @@ -74,24 +74,26 @@ no-asm Do not use assembler code. - 386 Use the 80386 instruction set only (the default x86 code is - more efficient, but requires at least a 486). Note: Use - compiler flags for any other CPU specific configuration, - e.g. "-m32" to build x86 code on an x64 system. - - no-sse2 Exclude SSE2 code pathes. Normally SSE2 extention is - detected at run-time, but the decision whether or not the - machine code will be executed is taken solely on CPU - capability vector. This means that if you happen to run OS - kernel which does not support SSE2 extension on Intel P4 - processor, then your application might be exposed to - "illegal instruction" exception. There might be a way - to enable support in kernel, e.g. FreeBSD kernel can be - compiled with CPU_ENABLE_SSE, and there is a way to - disengage SSE2 code pathes upon application start-up, - but if you aim for wider "audience" running such kernel, - consider no-sse2. Both 386 and no-asm options above imply - no-sse2. + 386 In 32-bit x86 builds, when generating assembly modules, + use the 80386 instruction set only (the default x86 code + is more efficient, but requires at least a 486). Note: + This doesn't affect code generated by compiler, you're + likely to complement configuration command line with + suitable compiler-specific option. + + no-sse2 Exclude SSE2 code paths from 32-bit x86 assembly modules. + Normally SSE2 extension is detected at run-time, but the + decision whether or not the machine code will be executed + is taken solely on CPU capability vector. This means that + if you happen to run OS kernel which does not support SSE2 + extension on Intel P4 processor, then your application + might be exposed to "illegal instruction" exception. + There might be a way to enable support in kernel, e.g. + FreeBSD kernel can be compiled with CPU_ENABLE_SSE, and + there is a way to disengage SSE2 code paths upon application + start-up, but if you aim for wider "audience" running + such kernel, consider no-sse2. Both the 386 and + no-asm options imply no-sse2. no- Build without the specified cipher (bf, cast, des, dh, dsa, hmac, md2, md5, mdc2, rc2, rc4, rc5, rsa, sha). @@ -101,7 +103,12 @@ -Dxxx, -lxxx, -Lxxx, -fxxx, -mXXX, -Kxxx These system specific options will be passed through to the compiler to allow you to define preprocessor symbols, specify additional libraries, - library directories or other compiler options. + library directories or other compiler options. It might be + worth noting that some compilers generate code specifically + for processor the compiler currently executes on. This is + not necessarily what you might have in mind, since it might + be unsuitable for execution on other, typically older, + processor. Consult your compiler documentation. -DHAVE_CRYPTODEV Enable the BSD cryptodev engine even if we are not using BSD. Useful if you are running ocf-linux or something @@ -159,18 +166,18 @@ OpenSSL binary ("openssl"). The libraries will be built in the top-level directory, and the binary will be in the "apps" directory. - If "make" fails, look at the output. There may be reasons for - the failure that aren't problems in OpenSSL itself (like missing - standard headers). If it is a problem with OpenSSL itself, please - report the problem to (note that your - message will be recorded in the request tracker publicly readable - at https://www.openssl.org/community/index.html#bugs and will be - forwarded to a public mailing list). Include the output of "make - report" in your message. Please check out the request tracker. Maybe - the bug was already reported or has already been fixed. + If the build fails, look at the output. There may be reasons + for the failure that aren't problems in OpenSSL itself (like + missing standard headers). If you are having problems you can + get help by sending an email to the openssl-users email list (see + https://www.openssl.org/community/mailinglists.html for details). If + it is a bug with OpenSSL itself, please open an issue on GitHub, at + https://github.com/openssl/openssl/issues. Please review the existing + ones first; maybe the bug was already reported or has already been + fixed. - [If you encounter assembler error messages, try the "no-asm" - configuration option as an immediate fix.] + (If you encounter assembler error messages, try the "no-asm" + configuration option as an immediate fix.) Compiling parts of OpenSSL with gcc and others with the system compiler will result in unresolved symbols on some systems. Modified: releng/11.0/crypto/openssl/Makefile ============================================================================== --- releng/11.0/crypto/openssl/Makefile Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/Makefile Thu Feb 23 07:11:48 2017 (r314125) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2j +VERSION=1.0.2k MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 @@ -203,7 +203,8 @@ CLEARENV= TOP= && unset TOP $${LIB+LIB} $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \ $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \ $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \ - $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} + $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} \ + $${APPS+APPS} # LC_ALL=C ensures that error [and other] messages are delivered in # same language for uniform treatment. Modified: releng/11.0/crypto/openssl/Makefile.org ============================================================================== --- releng/11.0/crypto/openssl/Makefile.org Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/Makefile.org Thu Feb 23 07:11:48 2017 (r314125) @@ -201,7 +201,8 @@ CLEARENV= TOP= && unset TOP $${LIB+LIB} $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \ $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \ $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \ - $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} + $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} \ + $${APPS+APPS} # LC_ALL=C ensures that error [and other] messages are delivered in # same language for uniform treatment. Modified: releng/11.0/crypto/openssl/NEWS ============================================================================== --- releng/11.0/crypto/openssl/NEWS Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/NEWS Thu Feb 23 07:11:48 2017 (r314125) @@ -5,9 +5,15 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2j and OpenSSL 1.0.2k [26 Jan 2017] + + o Truncated packet could crash via OOB read (CVE-2017-3731) + o BN_mod_exp may produce incorrect results on x86_64 (CVE-2017-3732) + o Montgomery multiplication may produce incorrect results (CVE-2016-7055) + Major changes between OpenSSL 1.0.2i and OpenSSL 1.0.2j [26 Sep 2016] - o Fix Use After Free for large message sizes (CVE-2016-6309) + o Missing CRL sanity check (CVE-2016-7052) Major changes between OpenSSL 1.0.2h and OpenSSL 1.0.2i [22 Sep 2016] Modified: releng/11.0/crypto/openssl/README ============================================================================== --- releng/11.0/crypto/openssl/README Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/README Thu Feb 23 07:11:48 2017 (r314125) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2j 26 Sep 2016 + OpenSSL 1.0.2k 26 Jan 2017 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -66,13 +66,13 @@ If you have any problems with OpenSSL then please take the following steps first: - - Download the current snapshot from ftp://ftp.openssl.org/snapshot/ + - Download the latest version from the repository to see if the problem has already been addressed - - Remove ASM versions of libraries + - Configure with no-asm - Remove compiler optimisation flags - If you wish to report a bug then please include the following information in - any bug report: + If you wish to report a bug then please include the following information + and create an issue on GitHub: - On Unix systems: Self-test report generated by 'make report' @@ -84,27 +84,9 @@ - Problem Description (steps that will reproduce the problem, if known) - Stack Traceback (if the application dumps core) - Email the report to: - - rt@openssl.org - - In order to avoid spam, this is a moderated mailing list, and it might - take a day for the ticket to show up. (We also scan posts to make sure - that security disclosures aren't publically posted by mistake.) Mail - to this address is recorded in the public RT (request tracker) database - (see https://www.openssl.org/community/index.html#bugs for details) and - also forwarded the public openssl-dev mailing list. Confidential mail - may be sent to openssl-security@openssl.org (PGP key available from the - key servers). - - Please do NOT use this for general assistance or support queries. Just because something doesn't work the way you expect does not mean it is necessarily a bug in OpenSSL. - You can also make GitHub pull requests. If you do this, please also send - mail to rt@openssl.org with a link to the PR so that we can more easily - keep track of it. - HOW TO CONTRIBUTE TO OpenSSL ---------------------------- @@ -113,7 +95,7 @@ LEGALITIES ---------- - A number of nations, in particular the U.S., restrict the use or export - of cryptography. If you are potentially subject to such restrictions - you should seek competent professional legal advice before attempting to - develop or distribute cryptographic code. + A number of nations restrict the use or export of cryptography. If you + are potentially subject to such restrictions you should seek competent + professional legal advice before attempting to develop or distribute + cryptographic code. Modified: releng/11.0/crypto/openssl/apps/apps.c ============================================================================== --- releng/11.0/crypto/openssl/apps/apps.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/apps.c Thu Feb 23 07:11:48 2017 (r314125) @@ -972,7 +972,10 @@ EVP_PKEY *load_key(BIO *err, const char if (!e) BIO_printf(err, "no engine specified\n"); else { - pkey = ENGINE_load_private_key(e, file, ui_method, &cb_data); + if (ENGINE_init(e)) { + pkey = ENGINE_load_private_key(e, file, ui_method, &cb_data); + ENGINE_finish(e); + } if (!pkey) { BIO_printf(err, "cannot load %s from engine\n", key_descrip); ERR_print_errors(err); @@ -1532,11 +1535,13 @@ static ENGINE *try_load_engine(BIO *err, } return e; } +#endif ENGINE *setup_engine(BIO *err, const char *engine, int debug) { ENGINE *e = NULL; +#ifndef OPENSSL_NO_ENGINE if (engine) { if (strcmp(engine, "auto") == 0) { BIO_printf(err, "enabling auto ENGINE support\n"); @@ -1561,13 +1566,19 @@ ENGINE *setup_engine(BIO *err, const cha } BIO_printf(err, "engine \"%s\" set.\n", ENGINE_get_id(e)); - - /* Free our "structural" reference. */ - ENGINE_free(e); } +#endif return e; } + +void release_engine(ENGINE *e) +{ +#ifndef OPENSSL_NO_ENGINE + if (e != NULL) + /* Free our "structural" reference. */ + ENGINE_free(e); #endif +} int load_config(BIO *err, CONF *cnf) { Modified: releng/11.0/crypto/openssl/apps/apps.h ============================================================================== --- releng/11.0/crypto/openssl/apps/apps.h Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/apps.h Thu Feb 23 07:11:48 2017 (r314125) @@ -259,9 +259,9 @@ STACK_OF(X509_CRL) *load_crls(BIO *err, const char *pass, ENGINE *e, const char *cert_descrip); X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath); -# ifndef OPENSSL_NO_ENGINE + ENGINE *setup_engine(BIO *err, const char *engine, int debug); -# endif +void release_engine(ENGINE *e); # ifndef OPENSSL_NO_OCSP OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req, Modified: releng/11.0/crypto/openssl/apps/ca.c ============================================================================== --- releng/11.0/crypto/openssl/apps/ca.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/ca.c Thu Feb 23 07:11:48 2017 (r314125) @@ -319,9 +319,7 @@ int MAIN(int argc, char **argv) #define BSIZE 256 MS_STATIC char buf[3][BSIZE]; char *randfile = NULL; -#ifndef OPENSSL_NO_ENGINE char *engine = NULL; -#endif char *tofree = NULL; DB_ATTR db_attr; @@ -595,9 +593,7 @@ int MAIN(int argc, char **argv) if (!load_config(bio_err, conf)) goto err; -#ifndef OPENSSL_NO_ENGINE e = setup_engine(bio_err, engine, 0); -#endif /* Lets get the config section we are using */ if (section == NULL) { @@ -1485,6 +1481,7 @@ int MAIN(int argc, char **argv) X509_CRL_free(crl); NCONF_free(conf); NCONF_free(extconf); + release_engine(e); OBJ_cleanup(); apps_shutdown(); OPENSSL_EXIT(ret); @@ -2227,7 +2224,6 @@ static int certify_spkac(X509 **xret, ch sk = CONF_get_section(parms, "default"); if (sk_CONF_VALUE_num(sk) == 0) { BIO_printf(bio_err, "no name/value pairs found in %s\n", infile); - CONF_free(parms); goto err; } Modified: releng/11.0/crypto/openssl/apps/cms.c ============================================================================== --- releng/11.0/crypto/openssl/apps/cms.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/cms.c Thu Feb 23 07:11:48 2017 (r314125) @@ -143,9 +143,7 @@ int MAIN(int argc, char **argv) const EVP_MD *sign_md = NULL; int informat = FORMAT_SMIME, outformat = FORMAT_SMIME; int rctformat = FORMAT_SMIME, keyform = FORMAT_PEM; -# ifndef OPENSSL_NO_ENGINE char *engine = NULL; -# endif unsigned char *secret_key = NULL, *secret_keyid = NULL; unsigned char *pwri_pass = NULL, *pwri_tmp = NULL; size_t secret_keylen = 0, secret_keyidlen = 0; @@ -665,9 +663,7 @@ int MAIN(int argc, char **argv) "cert.pem recipient certificate(s) for encryption\n"); goto end; } -# ifndef OPENSSL_NO_ENGINE e = setup_engine(bio_err, engine, 0); -# endif if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { BIO_printf(bio_err, "Error getting password\n"); @@ -1170,6 +1166,7 @@ int MAIN(int argc, char **argv) EVP_PKEY_free(key); CMS_ContentInfo_free(cms); CMS_ContentInfo_free(rcms); + release_engine(e); BIO_free(rctin); BIO_free(in); BIO_free(indata); Modified: releng/11.0/crypto/openssl/apps/dgst.c ============================================================================== --- releng/11.0/crypto/openssl/apps/dgst.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/dgst.c Thu Feb 23 07:11:48 2017 (r314125) @@ -537,6 +537,7 @@ int MAIN(int argc, char **argv) OPENSSL_free(sigbuf); if (bmd != NULL) BIO_free(bmd); + release_engine(e); apps_shutdown(); OPENSSL_EXIT(err); } Modified: releng/11.0/crypto/openssl/apps/dh.c ============================================================================== --- releng/11.0/crypto/openssl/apps/dh.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/dh.c Thu Feb 23 07:11:48 2017 (r314125) @@ -94,9 +94,7 @@ int MAIN(int argc, char **argv) BIO *in = NULL, *out = NULL; int informat, outformat, check = 0, noout = 0, C = 0, ret = 1; char *infile, *outfile, *prog; -# ifndef OPENSSL_NO_ENGINE char *engine; -# endif apps_startup(); @@ -107,9 +105,7 @@ int MAIN(int argc, char **argv) if (!load_config(bio_err, NULL)) goto end; -# ifndef OPENSSL_NO_ENGINE engine = NULL; -# endif infile = NULL; outfile = NULL; informat = FORMAT_PEM; @@ -183,9 +179,7 @@ int MAIN(int argc, char **argv) ERR_load_crypto_strings(); -# ifndef OPENSSL_NO_ENGINE setup_engine(bio_err, engine, 0); -# endif in = BIO_new(BIO_s_file()); out = BIO_new(BIO_s_file()); Modified: releng/11.0/crypto/openssl/apps/dhparam.c ============================================================================== --- releng/11.0/crypto/openssl/apps/dhparam.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/dhparam.c Thu Feb 23 07:11:48 2017 (r314125) @@ -159,9 +159,8 @@ int MAIN(int argc, char **argv) int informat, outformat, check = 0, noout = 0, C = 0, ret = 1; char *infile, *outfile, *prog; char *inrand = NULL; -# ifndef OPENSSL_NO_ENGINE char *engine = NULL; -# endif + ENGINE *e = NULL; int num = 0, g = 0; apps_startup(); @@ -270,9 +269,7 @@ int MAIN(int argc, char **argv) ERR_load_crypto_strings(); -# ifndef OPENSSL_NO_ENGINE - setup_engine(bio_err, engine, 0); -# endif + e = setup_engine(bio_err, engine, 0); if (g && !num) num = DEFBITS; @@ -512,6 +509,7 @@ int MAIN(int argc, char **argv) BIO_free_all(out); if (dh != NULL) DH_free(dh); + release_engine(e); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: releng/11.0/crypto/openssl/apps/dsa.c ============================================================================== --- releng/11.0/crypto/openssl/apps/dsa.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/dsa.c Thu Feb 23 07:11:48 2017 (r314125) @@ -106,9 +106,7 @@ int MAIN(int argc, char **argv) int informat, outformat, text = 0, noout = 0; int pubin = 0, pubout = 0; char *infile, *outfile, *prog; -# ifndef OPENSSL_NO_ENGINE char *engine; -# endif char *passargin = NULL, *passargout = NULL; char *passin = NULL, *passout = NULL; int modulus = 0; @@ -124,9 +122,7 @@ int MAIN(int argc, char **argv) if (!load_config(bio_err, NULL)) goto end; -# ifndef OPENSSL_NO_ENGINE engine = NULL; -# endif infile = NULL; outfile = NULL; informat = FORMAT_PEM; @@ -239,9 +235,7 @@ int MAIN(int argc, char **argv) ERR_load_crypto_strings(); -# ifndef OPENSSL_NO_ENGINE e = setup_engine(bio_err, engine, 0); -# endif if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { BIO_printf(bio_err, "Error getting passwords\n"); @@ -358,6 +352,7 @@ int MAIN(int argc, char **argv) BIO_free_all(out); if (dsa != NULL) DSA_free(dsa); + release_engine(e); if (passin) OPENSSL_free(passin); if (passout) Modified: releng/11.0/crypto/openssl/apps/dsaparam.c ============================================================================== --- releng/11.0/crypto/openssl/apps/dsaparam.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/dsaparam.c Thu Feb 23 07:11:48 2017 (r314125) @@ -121,9 +121,8 @@ int MAIN(int argc, char **argv) char *infile, *outfile, *prog, *inrand = NULL; int numbits = -1, num, genkey = 0; int need_rand = 0; -# ifndef OPENSSL_NO_ENGINE char *engine = NULL; -# endif + ENGINE *e = NULL; # ifdef GENCB_TEST int timebomb = 0; # endif @@ -263,9 +262,7 @@ int MAIN(int argc, char **argv) } } -# ifndef OPENSSL_NO_ENGINE - setup_engine(bio_err, engine, 0); -# endif + e = setup_engine(bio_err, engine, 0); if (need_rand) { app_RAND_load_file(NULL, bio_err, (inrand != NULL)); @@ -433,6 +430,7 @@ int MAIN(int argc, char **argv) BIO_free_all(out); if (dsa != NULL) DSA_free(dsa); + release_engine(e); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: releng/11.0/crypto/openssl/apps/ec.c ============================================================================== --- releng/11.0/crypto/openssl/apps/ec.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/ec.c Thu Feb 23 07:11:48 2017 (r314125) @@ -95,6 +95,7 @@ int MAIN(int argc, char **argv) int informat, outformat, text = 0, noout = 0; int pubin = 0, pubout = 0, param_out = 0; char *infile, *outfile, *prog, *engine; + ENGINE *e = NULL; char *passargin = NULL, *passargout = NULL; char *passin = NULL, *passout = NULL; point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; @@ -235,9 +236,7 @@ int MAIN(int argc, char **argv) ERR_load_crypto_strings(); -# ifndef OPENSSL_NO_ENGINE - setup_engine(bio_err, engine, 0); -# endif + e = setup_engine(bio_err, engine, 0); if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { BIO_printf(bio_err, "Error getting passwords\n"); @@ -349,6 +348,7 @@ int MAIN(int argc, char **argv) BIO_free_all(out); if (eckey) EC_KEY_free(eckey); + release_engine(e); if (passin) OPENSSL_free(passin); if (passout) Modified: releng/11.0/crypto/openssl/apps/ecparam.c ============================================================================== --- releng/11.0/crypto/openssl/apps/ecparam.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/ecparam.c Thu Feb 23 07:11:48 2017 (r314125) @@ -131,6 +131,7 @@ int MAIN(int argc, char **argv) BIO *in = NULL, *out = NULL; int informat, outformat, noout = 0, C = 0, ret = 1; char *engine = NULL; + ENGINE *e = NULL; BIGNUM *ec_p = NULL, *ec_a = NULL, *ec_b = NULL, *ec_gen = NULL, *ec_order = NULL, *ec_cofactor = NULL; @@ -311,9 +312,7 @@ int MAIN(int argc, char **argv) } } -# ifndef OPENSSL_NO_ENGINE - setup_engine(bio_err, engine, 0); -# endif + e = setup_engine(bio_err, engine, 0); if (list_curves) { EC_builtin_curve *curves = NULL; @@ -620,12 +619,13 @@ int MAIN(int argc, char **argv) BN_free(ec_cofactor); if (buffer) OPENSSL_free(buffer); + if (group != NULL) + EC_GROUP_free(group); + release_engine(e); if (in != NULL) BIO_free(in); if (out != NULL) BIO_free_all(out); - if (group != NULL) - EC_GROUP_free(group); apps_shutdown(); OPENSSL_EXIT(ret); } Modified: releng/11.0/crypto/openssl/apps/enc.c ============================================================================== --- releng/11.0/crypto/openssl/apps/enc.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/enc.c Thu Feb 23 07:11:48 2017 (r314125) @@ -126,9 +126,8 @@ int MAIN(int argc, char **argv) NULL, *wbio = NULL; #define PROG_NAME_SIZE 39 char pname[PROG_NAME_SIZE + 1]; -#ifndef OPENSSL_NO_ENGINE char *engine = NULL; -#endif + ENGINE *e = NULL; const EVP_MD *dgst = NULL; int non_fips_allow = 0; @@ -322,9 +321,7 @@ int MAIN(int argc, char **argv) argv++; } -#ifndef OPENSSL_NO_ENGINE - setup_engine(bio_err, engine, 0); -#endif + e = setup_engine(bio_err, engine, 0); if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) { BIO_printf(bio_err, @@ -674,6 +671,7 @@ int MAIN(int argc, char **argv) if (bzl != NULL) BIO_free(bzl); #endif + release_engine(e); if (pass) OPENSSL_free(pass); apps_shutdown(); Modified: releng/11.0/crypto/openssl/apps/gendh.c ============================================================================== --- releng/11.0/crypto/openssl/apps/gendh.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/gendh.c Thu Feb 23 07:11:48 2017 (r314125) @@ -96,9 +96,7 @@ int MAIN(int argc, char **argv) int g = 2; char *outfile = NULL; char *inrand = NULL; -# ifndef OPENSSL_NO_ENGINE char *engine = NULL; -# endif BIO *out = NULL; apps_startup(); @@ -162,9 +160,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, " the random number generator\n"); goto end; } -# ifndef OPENSSL_NO_ENGINE setup_engine(bio_err, engine, 0); -# endif out = BIO_new(BIO_s_file()); if (out == NULL) { Modified: releng/11.0/crypto/openssl/apps/gendsa.c ============================================================================== --- releng/11.0/crypto/openssl/apps/gendsa.c Thu Feb 23 07:07:21 2017 (r314124) +++ releng/11.0/crypto/openssl/apps/gendsa.c Thu Feb 23 07:11:48 2017 (r314125) @@ -85,9 +85,8 @@ int MAIN(int argc, char **argv) char *passargout = NULL, *passout = NULL; BIO *out = NULL, *in = NULL; const EVP_CIPHER *enc = NULL; -# ifndef OPENSSL_NO_ENGINE char *engine = NULL; -# endif + ENGINE *e = NULL; apps_startup(); @@ -206,9 +205,7 @@ int MAIN(int argc, char **argv) " - a DSA parameter file as generated by the dsaparam command\n"); goto end; } -# ifndef OPENSSL_NO_ENGINE - setup_engine(bio_err, engine, 0); -# endif + e = setup_engine(bio_err, engine, 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 23 07:12: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 BD17CCEA715; Thu, 23 Feb 2017 07:12: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 70C28685; Thu, 23 Feb 2017 07:12:19 +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 v1N7CI6W020567; Thu, 23 Feb 2017 07:12:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7CIvQ020564; Thu, 23 Feb 2017 07:12:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702230712.v1N7CIvQ020564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 23 Feb 2017 07:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r314126 - in releng/10.3: . crypto/openssl/crypto/evp sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 07:12:19 -0000 Author: delphij Date: Thu Feb 23 07:12:18 2017 New Revision: 314126 URL: https://svnweb.freebsd.org/changeset/base/314126 Log: Fix OpenSSL RC4_MD5 cipher vulnerability. Approved by: so Modified: releng/10.3/UPDATING releng/10.3/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c releng/10.3/sys/conf/newvers.sh Modified: releng/10.3/UPDATING ============================================================================== --- releng/10.3/UPDATING Thu Feb 23 07:11:48 2017 (r314125) +++ releng/10.3/UPDATING Thu Feb 23 07:12:18 2017 (r314126) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20170223 p17 FreeBSD-SA-17:02.openssl + + Fix OpenSSL RC4_MD5 cipher vulnerability. + 20170111 p16 FreeBSD-SA-17:01.openssh Fix multiple vulnerabilities of OpenSSH. Modified: releng/10.3/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c ============================================================================== --- releng/10.3/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c Thu Feb 23 07:11:48 2017 (r314125) +++ releng/10.3/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c Thu Feb 23 07:12:18 2017 (r314126) @@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_ len = p[arg - 2] << 8 | p[arg - 1]; if (!ctx->encrypt) { + if (len < MD5_DIGEST_LENGTH) + return -1; len -= MD5_DIGEST_LENGTH; p[arg - 2] = len >> 8; p[arg - 1] = len; Modified: releng/10.3/sys/conf/newvers.sh ============================================================================== --- releng/10.3/sys/conf/newvers.sh Thu Feb 23 07:11:48 2017 (r314125) +++ releng/10.3/sys/conf/newvers.sh Thu Feb 23 07:12:18 2017 (r314126) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="RELEASE-p16" +BRANCH="RELEASE-p17" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Thu Feb 23 07: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 24CBDCEABCD; Thu, 23 Feb 2017 07:28:31 +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 E5A30E9F; Thu, 23 Feb 2017 07:28:30 +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 v1N7STLM025630; Thu, 23 Feb 2017 07:28:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7STag025629; Thu, 23 Feb 2017 07:28:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230728.v1N7STag025629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 07:28: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: r314127 - stable/11/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: Thu, 23 Feb 2017 07:28:31 -0000 Author: kib Date: Thu Feb 23 07:28:29 2017 New Revision: 314127 URL: https://svnweb.freebsd.org/changeset/base/314127 Log: MFC r313493: Define ELF_ST_VISIBILITY(). Modified: stable/11/sys/sys/elf_generic.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf_generic.h ============================================================================== --- stable/11/sys/sys/elf_generic.h Thu Feb 23 07:12:18 2017 (r314126) +++ stable/11/sys/sys/elf_generic.h Thu Feb 23 07:28:29 2017 (r314127) @@ -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 23 07: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 92985CEAF1E; Thu, 23 Feb 2017 07:39:02 +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 5F216152D; Thu, 23 Feb 2017 07:39:02 +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 v1N7d1iA029917; Thu, 23 Feb 2017 07:39:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7d1QT029916; Thu, 23 Feb 2017 07:39:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230739.v1N7d1QT029916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 07:39:01 +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: r314128 - stable/11/libexec/rtld-elf 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, 23 Feb 2017 07:39:02 -0000 Author: kib Date: Thu Feb 23 07:39:01 2017 New Revision: 314128 URL: https://svnweb.freebsd.org/changeset/base/314128 Log: MFC r313494: Handle protected symbols in rtld. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Thu Feb 23 07:28:29 2017 (r314127) +++ stable/11/libexec/rtld-elf/rtld.c Thu Feb 23 07:39:01 2017 (r314128) @@ -3952,15 +3952,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 23 07:42: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 51646CEAC4E; Thu, 23 Feb 2017 07:42:50 +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 1E1ADEC6; Thu, 23 Feb 2017 07:42:50 +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 v1N7gndO033614; Thu, 23 Feb 2017 07:42:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7gn3S033613; Thu, 23 Feb 2017 07:42:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230742.v1N7gn3S033613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 07:42:49 +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: r314129 - stable/11/bin/ls 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, 23 Feb 2017 07:42:50 -0000 Author: kib Date: Thu Feb 23 07:42:49 2017 New Revision: 314129 URL: https://svnweb.freebsd.org/changeset/base/314129 Log: MFC r313798: Use uintmax_t to print st_nlink. Modified: stable/11/bin/ls/print.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ls/print.c ============================================================================== --- stable/11/bin/ls/print.c Thu Feb 23 07:39:01 2017 (r314128) +++ stable/11/bin/ls/print.c Thu Feb 23 07:42:49 2017 (r314129) @@ -259,12 +259,12 @@ printlong(const DISPLAY *dp) np = p->fts_pointer; xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS); if (f_numericonly) { - xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {td:user/%-*s}{e:user/%ju} {td:group/%-*s}{e:group/%ju} ", - buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink, + xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} {td:user/%-*s}{e:user/%ju} {td:group/%-*s}{e:group/%ju} ", + buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, (uintmax_t)sp->st_nlink, dp->s_user, np->user, (uintmax_t)sp->st_uid, dp->s_group, np->group, (uintmax_t)sp->st_gid); } else { - xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {t:user/%-*s} {t:group/%-*s} ", - buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink, + xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*ju} {t:user/%-*s} {t:group/%-*s} ", + buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, (uintmax_t)sp->st_nlink, dp->s_user, np->user, dp->s_group, np->group); } if (S_ISBLK(sp->st_mode)) From owner-svn-src-all@freebsd.org Thu Feb 23 07:49: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 4103ECEAA9D; Thu, 23 Feb 2017 07:49:00 +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 0690D1822; Thu, 23 Feb 2017 07:48:59 +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 v1N7mxaW033949; Thu, 23 Feb 2017 07:48:59 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7mxwn033948; Thu, 23 Feb 2017 07:48:59 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702230748.v1N7mxwn033948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 23 Feb 2017 07:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314131 - head/sys/ofed/drivers/infiniband/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: Thu, 23 Feb 2017 07:49:00 -0000 Author: np Date: Thu Feb 23 07:48:58 2017 New Revision: 314131 URL: https://svnweb.freebsd.org/changeset/base/314131 Log: Avoid NULL dereference in a couple of sysctl handlers in ibcore. iw_cxgbe sets ib_device->dma_device to NULL (since r311880). Reviewed by: hselasky@ Sponsored by: Chelsio Communications Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Feb 23 07:45:58 2017 (r314130) +++ head/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Feb 23 07:48:58 2017 (r314131) @@ -1225,7 +1225,7 @@ show_dev_device(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", @@ -1238,7 +1238,7 @@ show_dev_vendor(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", From owner-svn-src-all@freebsd.org Thu Feb 23 08:17: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 52F4DCEA797; Thu, 23 Feb 2017 08:17:43 +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 229DF890; Thu, 23 Feb 2017 08:17:43 +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 v1N8HgZu046070; Thu, 23 Feb 2017 08:17:42 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N8HgUD046069; Thu, 23 Feb 2017 08:17:42 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702230817.v1N8HgUD046069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Thu, 23 Feb 2017 08:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314132 - 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: Thu, 23 Feb 2017 08:17:43 -0000 Author: dchagin Date: Thu Feb 23 08:17:42 2017 New Revision: 314132 URL: https://svnweb.freebsd.org/changeset/base/314132 Log: Right clock defines specified in linux_timer.h. Get rid of spirious clock defines from linux_misc.h. MFC after: 1 week Modified: head/sys/compat/linux/linux_misc.h Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Thu Feb 23 07:48:58 2017 (r314131) +++ head/sys/compat/linux/linux_misc.h Thu Feb 23 08:17:42 2017 (r314132) @@ -114,13 +114,6 @@ struct l_new_utsname { char domainname[LINUX_MAX_UTSNAME]; }; -#define LINUX_CLOCK_REALTIME 0 -#define LINUX_CLOCK_MONOTONIC 1 -#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2 -#define LINUX_CLOCK_THREAD_CPUTIME_ID 3 -#define LINUX_CLOCK_REALTIME_HR 4 -#define LINUX_CLOCK_MONOTONIC_HR 5 - #define LINUX_UTIME_NOW 0x3FFFFFFF #define LINUX_UTIME_OMIT 0x3FFFFFFE From owner-svn-src-all@freebsd.org Thu Feb 23 09:30: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 455CBCEABCE; Thu, 23 Feb 2017 09:30:39 +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 DAD4D615; Thu, 23 Feb 2017 09:30: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 v1N9UcjH074458; Thu, 23 Feb 2017 09:30:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N9UcJ2074457; Thu, 23 Feb 2017 09:30:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230930.v1N9UcJ2074457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 09:30: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: r314133 - 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, 23 Feb 2017 09:30:39 -0000 Author: kib Date: Thu Feb 23 09:30:37 2017 New Revision: 314133 URL: https://svnweb.freebsd.org/changeset/base/314133 Log: MFC r313496: Increase a chance of devfs_close() calling d_close cdevsw method. Modified: stable/11/sys/kern/vfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_vnops.c ============================================================================== --- stable/11/sys/kern/vfs_vnops.c Thu Feb 23 08:17:42 2017 (r314132) +++ stable/11/sys/kern/vfs_vnops.c Thu Feb 23 09:30:37 2017 (r314133) @@ -422,12 +422,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; @@ -449,11 +446,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. */ @@ -1569,16 +1577,15 @@ vn_closefile(fp, td) 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 (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) - vref(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 (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) { + if (__predict_false(ref)) { lf.l_whence = SEEK_SET; lf.l_start = 0; lf.l_len = 0; From owner-svn-src-all@freebsd.org Thu Feb 23 09: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 6E3E7CE815B; Thu, 23 Feb 2017 09:41:34 +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 2C6EFE25; Thu, 23 Feb 2017 09:41:34 +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 v1N9fXKT078828; Thu, 23 Feb 2017 09:41:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N9fXFO078826; Thu, 23 Feb 2017 09:41:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230941.v1N9fXFO078826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 09:41:33 +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: r314134 - in stable/11/sys: 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: Thu, 23 Feb 2017 09:41:34 -0000 Author: kib Date: Thu Feb 23 09:41:32 2017 New Revision: 314134 URL: https://svnweb.freebsd.org/changeset/base/314134 Log: MFC r313495: Do not establish advisory locks when doing open(O_EXLOCK) or open(O_SHLOCK) for files which do not have DTYPE_VNODE type. MFC r313549: Fix r313495. Modified: stable/11/sys/kern/vfs_vnops.c stable/11/sys/sys/file.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_vnops.c ============================================================================== --- stable/11/sys/kern/vfs_vnops.c Thu Feb 23 09:30:37 2017 (r314133) +++ stable/11/sys/kern/vfs_vnops.c Thu Feb 23 09:41:32 2017 (r314134) @@ -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_NONE && fp->f_type != DTYPE_VNODE) { + error = EOPNOTSUPP; + 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); Modified: stable/11/sys/sys/file.h ============================================================================== --- stable/11/sys/sys/file.h Thu Feb 23 09:30:37 2017 (r314133) +++ stable/11/sys/sys/file.h Thu Feb 23 09:41:32 2017 (r314134) @@ -55,6 +55,7 @@ struct socket; #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 Thu Feb 23 09:52: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 B2742CE86D9; Thu, 23 Feb 2017 09:52:23 +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 718CD18AF; Thu, 23 Feb 2017 09:52:23 +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 v1N9qMeh087221; Thu, 23 Feb 2017 09:52:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N9qMiN087220; Thu, 23 Feb 2017 09:52:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230952.v1N9qMiN087220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 09:52: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: r314135 - stable/11/sys/fs/nfsclient 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, 23 Feb 2017 09:52:23 -0000 Author: kib Date: Thu Feb 23 09:52:22 2017 New Revision: 314135 URL: https://svnweb.freebsd.org/changeset/base/314135 Log: MFC r313799: Do not allocate char[MNAMELEN] on stack in nfsclient. Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvfsops.c Thu Feb 23 09:41:32 2017 (r314134) +++ stable/11/sys/fs/nfsclient/nfs_clvfsops.c Thu Feb 23 09:52:22 2017 (r314135) @@ -749,8 +749,7 @@ static int nfs_mount_parse_from(struct vfsoptlist *opts, char **hostnamep, struct sockaddr_in **sinp, char *dirpath, size_t dirpathsize, int *dirlenp) { - char nam[MNAMELEN + 1]; - char *delimp, *hostp, *spec; + char *nam, *delimp, *hostp, *spec; int error, have_bracket = 0, offset, rv, speclen; struct sockaddr_in *sin; size_t len; @@ -758,6 +757,7 @@ nfs_mount_parse_from(struct vfsoptlist * error = vfs_getopt(opts, "from", (void **)&spec, &speclen); if (error != 0) return (error); + nam = malloc(MNAMELEN + 1, M_TEMP, M_WAITOK); /* * This part comes from sbin/mount_nfs/mount_nfs.c:getnfsargs(). @@ -776,6 +776,7 @@ nfs_mount_parse_from(struct vfsoptlist * hostp = delimp + 1; } else { printf("%s: no : nfs-name\n", __func__); + free(nam, M_TEMP); return (EINVAL); } *delimp = '\0'; @@ -791,6 +792,7 @@ nfs_mount_parse_from(struct vfsoptlist * spec[speclen - 1] = '\0'; if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) { printf("%s: %s:%s: name too long", __func__, hostp, spec); + free(nam, M_TEMP); return (EINVAL); } /* Make both '@' and ':' notations equal */ @@ -816,6 +818,7 @@ nfs_mount_parse_from(struct vfsoptlist * if (rv != 1) { printf("%s: cannot parse '%s', inet_pton() returned %d\n", __func__, hostp, rv); + free(nam, M_TEMP); free(sin, M_SONAME); return (EINVAL); } @@ -832,6 +835,7 @@ nfs_mount_parse_from(struct vfsoptlist * strlcpy(dirpath, spec, dirpathsize); *dirlenp = strlen(dirpath); + free(nam, M_TEMP); return (0); } @@ -874,7 +878,7 @@ nfs_mount(struct mount *mp) struct sockaddr *nam = NULL; struct vnode *vp; struct thread *td; - char hst[MNAMELEN]; + char *hst; u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100]; char *cp, *opt, *name, *secname; int nametimeo = NFS_DEFAULT_NAMETIMEO; @@ -886,6 +890,7 @@ nfs_mount(struct mount *mp) has_nfs_args_opt = 0; has_nfs_from_opt = 0; + hst = malloc(MNAMELEN, M_TEMP, M_WAITOK); if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; goto out; @@ -1324,6 +1329,7 @@ out: mp->mnt_kern_flag |= MNTK_NULL_NOCACHE; MNT_IUNLOCK(mp); } + free(hst, M_TEMP); return (error); } From owner-svn-src-all@freebsd.org Thu Feb 23 09:53: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 87B8DCE874D; Thu, 23 Feb 2017 09:53:55 +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 56E401A2E; Thu, 23 Feb 2017 09:53:55 +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 v1N9rs4o087347; Thu, 23 Feb 2017 09:53:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N9rsuR087346; Thu, 23 Feb 2017 09:53:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702230953.v1N9rsuR087346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 23 Feb 2017 09:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314136 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 09:53:55 -0000 Author: hselasky Date: Thu Feb 23 09:53:54 2017 New Revision: 314136 URL: https://svnweb.freebsd.org/changeset/base/314136 Log: Implement __test_and_clear_bit() and __test_and_set_bit() in the LinuxKPI. The clang compiler will optimise these functions down to three AMD64 instructions if the bit argument is a constant during compilation. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Thu Feb 23 09:52:22 2017 (r314135) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Thu Feb 23 09:53:54 2017 (r314136) @@ -338,6 +338,21 @@ test_and_clear_bit(long bit, volatile un } static inline int +__test_and_clear_bit(long bit, volatile unsigned long *var) +{ + long val; + + var += BIT_WORD(bit); + bit %= BITS_PER_LONG; + bit = (1UL << bit); + + val = *var; + *var &= ~bit; + + return !!(val & bit); +} + +static inline int test_and_set_bit(long bit, volatile unsigned long *var) { long val; @@ -352,6 +367,21 @@ test_and_set_bit(long bit, volatile unsi return !!(val & bit); } +static inline int +__test_and_set_bit(long bit, volatile unsigned long *var) +{ + long val; + + var += BIT_WORD(bit); + bit %= BITS_PER_LONG; + bit = (1UL << bit); + + val = *var; + *var |= bit; + + return !!(val & bit); +} + static inline void bitmap_set(unsigned long *map, int start, int nr) { From owner-svn-src-all@freebsd.org Thu Feb 23 09:55: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 A4D55CE87DF; Thu, 23 Feb 2017 09:55:56 +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 6FE031BDD; Thu, 23 Feb 2017 09:55:56 +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 v1N9ttie087514; Thu, 23 Feb 2017 09:55:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N9ttZf087513; Thu, 23 Feb 2017 09:55:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702230955.v1N9ttZf087513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Feb 2017 09:55: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: r314137 - stable/11/sys/fs/nfsclient 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, 23 Feb 2017 09:55:56 -0000 Author: kib Date: Thu Feb 23 09:55:55 2017 New Revision: 314137 URL: https://svnweb.freebsd.org/changeset/base/314137 Log: MFC r313800: Do not access memory past the buffer end. Do not accept and silently truncate too long hostname. Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvfsops.c Thu Feb 23 09:53:54 2017 (r314136) +++ stable/11/sys/fs/nfsclient/nfs_clvfsops.c Thu Feb 23 09:55:55 2017 (r314137) @@ -1270,8 +1270,13 @@ nfs_mount(struct mount *mp) error = EINVAL; goto out; } - bcopy(args.hostname, hst, MNAMELEN); - hst[MNAMELEN - 1] = '\0'; + if (len >= MNAMELEN) { + vfs_mount_error(mp, "Hostname too long"); + error = EINVAL; + goto out; + } + bcopy(args.hostname, hst, len); + hst[len] = '\0'; } if (vfs_getopt(mp->mnt_optnew, "principal", (void **)&name, NULL) == 0) From owner-svn-src-all@freebsd.org Thu Feb 23 10:10: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 9FAA3CE8B72 for ; Thu, 23 Feb 2017 10:10:49 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 3608B2A5 for ; Thu, 23 Feb 2017 10:10:49 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id v186so166732514wmd.0 for ; Thu, 23 Feb 2017 02:10:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:subject:message-id:date:to :mime-version; bh=kGvbLF4a4mI/ECvHR67e8dgiHLtiQrqFjYhYBlX1UBE=; b=XPmoJ3Wqrw8cnQV4YQBKujk1sci4HSOc7zC0aX5B5BdTQmzzYYapi7eVgHbDrNWxfu 4VXR7GXHoVoTV1l9tDtbVXGDCmjzIZJfupbAspjM6jkejzjc59FedUBdxOyfTVmyo/um Z30/SWpuuD5KrkVTnRA8R22Um6ZvjQFp/bY+PRMR8k82RpQQnCxFYs14NEjoZBklhLX5 pzHMs+tZxaRtAPF4A7NAz1QCY8robncP24Jz6/e68E1LIlxaVYR46CQMHXKSxEhmeWrl AnntgeAgFK1Dl8LGa+yf9wiU8rfXcfojH47rcap00Ia9O6N9xQ5ly+QxNhNh/eNh904i eNEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=kGvbLF4a4mI/ECvHR67e8dgiHLtiQrqFjYhYBlX1UBE=; b=JdRJvcVR5+cdit6Jt/7jpYLNW9MKdIafx+r71RPUQGXJRU+DGZmhlCL3Zw1DYx5Njk i2jbEjp9meSFrbVz3ClniIuBxjytjA3x8nogpUA0OZNLsSpuRhzBKUDMm3vFJ4mC1sSk KRny+gI/FtsSkamLmHYSkH5Ziz+Ln5qHJNYwsFsvmg31V0tZr/qQVpNcCp83GhlhnvMr Fz4EpPUQEvZYgkGSJ3uXrM0GL7QAlfo69GdVOc4lFljUdAR0WlWGddo2hdIhQxtXniLg 2kTvdNyR+dVQXuM4C0TbHGTr5poSl7JrEkF1qsezUvqixkIrl6O2C7j53oow/BhzQcCg 0QEQ== X-Gm-Message-State: AMke39m/vBo/5bbCETF2DGEYMBkium8jNaWZC+lfP7KzuH6M+aeObp2l4/doQFsQSWEFjw== X-Received: by 10.28.18.130 with SMTP id 124mr3643846wms.8.1487844647522; Thu, 23 Feb 2017 02:10:47 -0800 (PST) Received: from ben.home ([2a01:cb1d:125:8a00:71b9:64b7:f5b0:e98b]) by smtp.gmail.com with ESMTPSA id k187sm6137373wmb.13.2017.02.23.02.10.46 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Feb 2017 02:10:46 -0800 (PST) From: Ben RUBSON Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern Message-Id: Date: Thu, 23 Feb 2017 11:10:45 +0100 To: svn-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) 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: Thu, 23 Feb 2017 10:10:49 -0000 Hi guys, Conrad, Bruce, May I ask you some news regarding this please ? More than 3 weeks now running Conrad commit on 2 CRC32C digest enabled = iSCSI initiators / targets without issue :) Thank you very much again for this ! Shall we then think about "fixing" the last one or two remaining things = before being able to MFC it please ? Would really be glad to see this nice kernel feature in 11.1. Perhaps it could also be backported to 11.0pX as a nice/huge & non-risky = performance improvement. Thank you very much for your support & cooperation ! Best regards, Ben From owner-svn-src-all@freebsd.org Thu Feb 23 13:14: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 3187CCEA9C6; Thu, 23 Feb 2017 13:14:30 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7C5019D8; Thu, 23 Feb 2017 13:14:29 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NDETZP069348; Thu, 23 Feb 2017 13:14:29 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NDETCl069347; Thu, 23 Feb 2017 13:14:29 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201702231314.v1NDETCl069347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 23 Feb 2017 13:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314138 - head/sys/dev/xen/gntdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 13:14:30 -0000 Author: royger Date: Thu Feb 23 13:14:28 2017 New Revision: 314138 URL: https://svnweb.freebsd.org/changeset/base/314138 Log: xen/gndev: use UOFF_TO_IDX instead of OFF_TO_IDX The Xen grant table device treats the mmap offset parameter as an unsigned type, and as so it must use the newly introduced UOFF_TO_IDX. Sponsored by: Citrix Systems R&D MFC after: 2 weeks X-MFC-with: r313690 Modified: head/sys/dev/xen/gntdev/gntdev.c Modified: head/sys/dev/xen/gntdev/gntdev.c ============================================================================== --- head/sys/dev/xen/gntdev/gntdev.c Thu Feb 23 09:55:55 2017 (r314137) +++ head/sys/dev/xen/gntdev/gntdev.c Thu Feb 23 13:14:28 2017 (r314138) @@ -796,8 +796,8 @@ gntdev_gmap_pg_fault(vm_object_t object, relative_offset = offset - gmap->file_index; - pidx = OFF_TO_IDX(offset); - ridx = OFF_TO_IDX(relative_offset); + pidx = UOFF_TO_IDX(offset); + ridx = UOFF_TO_IDX(relative_offset); if (ridx >= gmap->count || gmap->grant_map_ops[ridx].status != GNTST_okay) return (VM_PAGER_FAIL); @@ -1067,7 +1067,7 @@ mmap_gref(struct per_user_data *priv_use break; vm_page_insert(gref->page, mem_obj, - OFF_TO_IDX(gref->file_index)); + UOFF_TO_IDX(gref->file_index)); count--; } @@ -1207,7 +1207,7 @@ gntdev_mmap_single(struct cdev *cdev, vm if (error != 0) return (EINVAL); - count = OFF_TO_IDX(size); + count = UOFF_TO_IDX(size); gref_start = gntdev_find_grefs(priv_user, *offset, count); if (gref_start) { From owner-svn-src-all@freebsd.org Thu Feb 23 14:39: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 35C37CEBDF9; Thu, 23 Feb 2017 14:39:53 +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 0226DBF6; Thu, 23 Feb 2017 14:39:52 +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 v1NEdq7D003400; Thu, 23 Feb 2017 14:39:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NEdqrj003399; Thu, 23 Feb 2017 14:39:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702231439.v1NEdqrj003399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 23 Feb 2017 14:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314139 - head/usr.bin/vi/catalog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 14:39:53 -0000 Author: emaste Date: Thu Feb 23 14:39:51 2017 New Revision: 314139 URL: https://svnweb.freebsd.org/changeset/base/314139 Log: make vi message catalogues build independent of locale r275234 addressed sort automatically converting 8-bit locales to UTF-8 by using "LANG=C sort", but LC_ALL overrides LANG if set, so the issue may still be present depending on the user's environment. Use LC_ALL=C instead. Reported by: tests.reproducible-builds.org Reviewed by: bapt MFC after: 1 week Sponsored by: The Linux Foundation / Core Infrastructure Initiative Differential Revision: https://reviews.freebsd.org/D9765 Modified: head/usr.bin/vi/catalog/Makefile Modified: head/usr.bin/vi/catalog/Makefile ============================================================================== --- head/usr.bin/vi/catalog/Makefile Thu Feb 23 13:14:28 2017 (r314138) +++ head/usr.bin/vi/catalog/Makefile Thu Feb 23 14:39:51 2017 (r314139) @@ -39,7 +39,7 @@ CAT+= $c.UTF-8 ${c}: ${c}.base echo "... $c"; \ rm -f $c; \ - env LANG=C sort -u ${.ALLSRC} | \ + env LC_ALL=C sort -u ${.ALLSRC} | \ awk '{ \ if ($$1 == 1) { \ print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \ @@ -86,13 +86,13 @@ ${c}.check: ${c}.base echo =========================; \ echo "MESSAGES WITH THE SAME MESSAGE ID's (FIX!):"; \ for j in \ - `sed '/^$$/d' < $$f.base | LANG=C sort -u | \ + `sed '/^$$/d' < $$f.base | LC_ALL=C sort -u | \ awk '{print $$1}' | uniq -d`; do \ egrep $$j $$f.base; \ done; \ echo =========================; \ echo "Duplicate messages, both id and message (this is okay):"; \ - sed '/^$$/d' < $$f.base | LANG=C sort | uniq -c | \ + sed '/^$$/d' < $$f.base | LC_ALL=C sort | uniq -c | \ awk '$$1 != 1 { print $$0 }' | sort -n; \ echo =========================) > $c .endfor From owner-svn-src-all@freebsd.org Thu Feb 23 15:05: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 2FA2CCEB34E; Thu, 23 Feb 2017 15:05:03 +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 F052A1B8F; Thu, 23 Feb 2017 15:05:02 +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 v1NF524l015744; Thu, 23 Feb 2017 15:05:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NF52cE015743; Thu, 23 Feb 2017 15:05:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231505.v1NF52cE015743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 15:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314140 - head/usr.sbin/camdd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 15:05:03 -0000 Author: pfg Date: Thu Feb 23 15:05:01 2017 New Revision: 314140 URL: https://svnweb.freebsd.org/changeset/base/314140 Log: camdd(8): double assignment. Why do a calculation twice when you can do it just once. Found with: coccinelle (da.cocci) Modified: head/usr.sbin/camdd/camdd.c Modified: head/usr.sbin/camdd/camdd.c ============================================================================== --- head/usr.sbin/camdd/camdd.c Thu Feb 23 14:39:51 2017 (r314139) +++ head/usr.sbin/camdd/camdd.c Thu Feb 23 15:05:01 2017 (r314140) @@ -3107,10 +3107,6 @@ camdd_rw(struct camdd_io_opts *io_opts, (devs[i]->start_offset_bytes / devs[i]->sector_size) + (max_io / devs[i]->sector_size) - 1; - devs[i]->sector_io_limit = - (devs[i]->start_offset_bytes / - devs[i]->sector_size) + - (max_io / devs[i]->sector_size) - 1; } devs[i]->next_io_pos_bytes = devs[i]->start_offset_bytes; From owner-svn-src-all@freebsd.org Thu Feb 23 15:10: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 39EF5CEB573; Thu, 23 Feb 2017 15:10:48 +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 07125D3; Thu, 23 Feb 2017 15:10:47 +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 v1NFAl0r016135; Thu, 23 Feb 2017 15:10:47 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NFAlEh016134; Thu, 23 Feb 2017 15:10:47 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231510.v1NFAlEh016134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 15:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314141 - head/usr.sbin/rtadvd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 15:10:48 -0000 Author: pfg Date: Thu Feb 23 15:10:46 2017 New Revision: 314141 URL: https://svnweb.freebsd.org/changeset/base/314141 Log: rtadvd(8): double assignment. Remove doubtful initialization since the value will be overwritten immediately afterwards. Found with: coccinelle (da.cocci) Modified: head/usr.sbin/rtadvd/config.c Modified: head/usr.sbin/rtadvd/config.c ============================================================================== --- head/usr.sbin/rtadvd/config.c Thu Feb 23 15:05:01 2017 (r314140) +++ head/usr.sbin/rtadvd/config.c Thu Feb 23 15:10:46 2017 (r314141) @@ -1395,7 +1395,6 @@ make_packet(struct rainfo *rai) ra->nd_ra_code = 0; ra->nd_ra_cksum = 0; ra->nd_ra_curhoplimit = (uint8_t)(0xff & rai->rai_hoplimit); - ra->nd_ra_flags_reserved = 0; /* just in case */ /* * XXX: the router preference field, which is a 2-bit field, should be * initialized before other fields. From owner-svn-src-all@freebsd.org Thu Feb 23 15:30: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 15130CEBD02; Thu, 23 Feb 2017 15:30:23 +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 D650ECEA; Thu, 23 Feb 2017 15:30:22 +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 v1NFUMoo024029; Thu, 23 Feb 2017 15:30:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NFULwx024028; Thu, 23 Feb 2017 15:30:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231530.v1NFULwx024028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 15:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314142 - head/sys/dev/ce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 15:30:23 -0000 Author: pfg Date: Thu Feb 23 15:30:21 2017 New Revision: 314142 URL: https://svnweb.freebsd.org/changeset/base/314142 Log: dev/ce: double assignment. The code is not operational right now so just comment away an obviously useless assignment. Fix some typos while here. Found with: coccinelle (da.cocci) Modified: head/sys/dev/ce/ceddk.c Modified: head/sys/dev/ce/ceddk.c ============================================================================== --- head/sys/dev/ce/ceddk.c Thu Feb 23 15:10:46 2017 (r314141) +++ head/sys/dev/ce/ceddk.c Thu Feb 23 15:30:21 2017 (r314142) @@ -621,10 +621,10 @@ void ce_stop_chan (ce_chan_t *c) TAU32_UserRequest *req; CE_DEQUEUE (b->cr.queue, req); - /* XXXRIK: This function should be for comleteness, but for now I - * don't use it. So I just start to write and didn't finished it yet. - * It and it is VERY BUGGY!!! Do not use it. If you really - * need it ask me to fix it or rewrite it by your self. + /* XXXRIK: This function should be for completeness, but for now I + * don't use it. I just started to write and haven't finished it yet. + * It is VERY BUGGY!!! Do not use it. If you really need + * it ask me to fix it or rewrite it by yourself. * Note: most buggy part of it in ce_on_config_stop! */ if (!req) { @@ -632,8 +632,8 @@ void ce_stop_chan (ce_chan_t *c) "UserRequest (%s:%d)\n", __FUNCTION__, __LINE__)); return; } - req->Command = TAU32_Configure_Commit | - TAU32_Tx_Stop | TAU32_Rx_Stop; +// req->Command = TAU32_Configure_Commit | +// TAU32_Tx_Stop | TAU32_Rx_Stop; req->Command = 0; req->Io.ChannelNumber = c->num; req->pCallback = ce_on_config_stop; From owner-svn-src-all@freebsd.org Thu Feb 23 16:05: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 AEEF6CEA64C; Thu, 23 Feb 2017 16:05:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA451E18; Thu, 23 Feb 2017 16:05:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NG5CF4040210; Thu, 23 Feb 2017 16:05:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NG5C0f040202; Thu, 23 Feb 2017 16:05:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702231605.v1NG5C0f040202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 16:05: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: r314143 - in stable/10: lib/libcrypt lib/libmd sys/conf sys/crypto/sha2 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, 23 Feb 2017 16:05:13 -0000 Author: avg Date: Thu Feb 23 16:05:11 2017 New Revision: 314143 URL: https://svnweb.freebsd.org/changeset/base/314143 Log: MFC r263215,r263218,r285366: replace the kernel sha256 code r263215 copy these files from lib/libmd in preperation for moving these files into the kernel... r263218 replace the kernel's version w/ cperciva's implementation... r285366 Complete the move that was started w/ r263218.. Note that the last change is out of order with r282726 that I am going to merge as well. Many thanks to cperciva for the more efficient code and to jmg for integrating it into the kernel. Added: stable/10/sys/crypto/sha2/sha256.h - copied, changed from r263215, head/sys/crypto/sha2/sha256.h stable/10/sys/crypto/sha2/sha256c.c - copied, changed from r263215, head/sys/crypto/sha2/sha256c.c Modified: stable/10/lib/libcrypt/Makefile stable/10/lib/libmd/Makefile stable/10/sys/conf/files stable/10/sys/crypto/sha2/sha2.c stable/10/sys/crypto/sha2/sha2.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcrypt/Makefile ============================================================================== --- stable/10/lib/libcrypt/Makefile Thu Feb 23 15:30:21 2017 (r314142) +++ stable/10/lib/libcrypt/Makefile Thu Feb 23 16:05:11 2017 (r314143) @@ -9,7 +9,7 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 5 LIB= crypt -.PATH: ${.CURDIR}/../libmd +.PATH: ${.CURDIR}/../libmd ${.CURDIR}/../../sys/crypto/sha2 SRCS= crypt.c misc.c \ crypt-md5.c md5c.c \ crypt-nthash.c md4c.c \ Modified: stable/10/lib/libmd/Makefile ============================================================================== --- stable/10/lib/libmd/Makefile Thu Feb 23 15:30:21 2017 (r314142) +++ stable/10/lib/libmd/Makefile Thu Feb 23 16:05:11 2017 (r314143) @@ -43,7 +43,7 @@ CLEANFILES+= md[245]hl.c md[245].ref md[ sha256.ref sha256hl.c sha512.ref sha512hl.c CFLAGS+= -I${.CURDIR} -.PATH: ${.CURDIR}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) SRCS+= sha.S Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Feb 23 15:30:21 2017 (r314142) +++ stable/10/sys/conf/files Thu Feb 23 16:05:11 2017 (r314143) @@ -545,6 +545,8 @@ crypto/sha1.c optional carp | crypto | netgraph_mppc_encryption | sctp crypto/sha2/sha2.c optional crypto | geom_bde | ipsec | random | \ sctp | zfs +crypto/sha2/sha256c.c optional crypto | geom_bde | ipsec | random | \ + sctp | zfs crypto/siphash/siphash.c optional inet | inet6 crypto/siphash/siphash_test.c optional inet | inet6 ddb/db_access.c optional ddb Modified: stable/10/sys/crypto/sha2/sha2.c ============================================================================== --- stable/10/sys/crypto/sha2/sha2.c Thu Feb 23 15:30:21 2017 (r314142) +++ stable/10/sys/crypto/sha2/sha2.c Thu Feb 23 16:05:11 2017 (r314143) @@ -121,20 +121,10 @@ __FBSDID("$FreeBSD$"); * Thank you, Jun-ichiro itojun Hagino, for suggesting using u_intXX_t * types and pointing out recent ANSI C support for uintXX_t in inttypes.h. */ -#if 0 /*def SHA2_USE_INTTYPES_H*/ - typedef uint8_t sha2_byte; /* Exactly 1 byte */ typedef uint32_t sha2_word32; /* Exactly 4 bytes */ typedef uint64_t sha2_word64; /* Exactly 8 bytes */ -#else /* SHA2_USE_INTTYPES_H */ - -typedef u_int8_t sha2_byte; /* Exactly 1 byte */ -typedef u_int32_t sha2_word32; /* Exactly 4 bytes */ -typedef u_int64_t sha2_word64; /* Exactly 8 bytes */ - -#endif /* SHA2_USE_INTTYPES_H */ - /*** SHA-256/384/512 Various Length Definitions ***********************/ /* NOTE: Most of these are in sha2.h */ @@ -183,8 +173,6 @@ typedef u_int64_t sha2_word64; /* Exactl */ /* Shift-right (used in SHA-256, SHA-384, and SHA-512): */ #define R(b,x) ((x) >> (b)) -/* 32-bit Rotate-right (used in SHA-256): */ -#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b)))) /* 64-bit Rotate-right (used in SHA-384 and SHA-512): */ #define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b)))) @@ -192,12 +180,6 @@ typedef u_int64_t sha2_word64; /* Exactl #define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) #define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) -/* Four of six logical functions used in SHA-256: */ -#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x))) -#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x))) -#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3 , (x))) -#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x))) - /* Four of six logical functions used in SHA-384 and SHA-512: */ #define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x))) #define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x))) @@ -210,43 +192,10 @@ typedef u_int64_t sha2_word64; /* Exactl * only. */ static void SHA512_Last(SHA512_CTX*); -static void SHA256_Transform(SHA256_CTX*, const sha2_word32*); static void SHA512_Transform(SHA512_CTX*, const sha2_word64*); /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ -/* Hash constant words K for SHA-256: */ -static const sha2_word32 K256[64] = { - 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, - 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, - 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, - 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, - 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, - 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, - 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, - 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, - 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, - 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, - 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, - 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, - 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, - 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, - 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, - 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL -}; - -/* Initial hash value H for SHA-256: */ -static const sha2_word32 sha256_initial_hash_value[8] = { - 0x6a09e667UL, - 0xbb67ae85UL, - 0x3c6ef372UL, - 0xa54ff53aUL, - 0x510e527fUL, - 0x9b05688cUL, - 0x1f83d9abUL, - 0x5be0cd19UL -}; - /* Hash constant words K for SHA-384 and SHA-512: */ static const sha2_word64 K512[80] = { 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, @@ -323,301 +272,6 @@ static const char *sha2_hex_digits = "01 /*** SHA-256: *********************************************************/ -void SHA256_Init(SHA256_CTX* context) { - if (context == (SHA256_CTX*)0) { - return; - } - bcopy(sha256_initial_hash_value, context->state, SHA256_DIGEST_LENGTH); - bzero(context->buffer, SHA256_BLOCK_LENGTH); - context->bitcount = 0; -} - -#ifdef SHA2_UNROLL_TRANSFORM - -/* Unrolled SHA-256 round macros: */ - -#if BYTE_ORDER == LITTLE_ENDIAN - -#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ - REVERSE32(*data++, W256[j]); \ - T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \ - K256[j] + W256[j]; \ - (d) += T1; \ - (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ - j++ - - -#else /* BYTE_ORDER == LITTLE_ENDIAN */ - -#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ - T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \ - K256[j] + (W256[j] = *data++); \ - (d) += T1; \ - (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ - j++ - -#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - -#define ROUND256(a,b,c,d,e,f,g,h) \ - s0 = W256[(j+1)&0x0f]; \ - s0 = sigma0_256(s0); \ - s1 = W256[(j+14)&0x0f]; \ - s1 = sigma1_256(s1); \ - T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \ - (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \ - (d) += T1; \ - (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ - j++ - -static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { - sha2_word32 a, b, c, d, e, f, g, h, s0, s1; - sha2_word32 T1, *W256; - int j; - - W256 = (sha2_word32*)context->buffer; - - /* Initialize registers with the prev. intermediate value */ - a = context->state[0]; - b = context->state[1]; - c = context->state[2]; - d = context->state[3]; - e = context->state[4]; - f = context->state[5]; - g = context->state[6]; - h = context->state[7]; - - j = 0; - do { - /* Rounds 0 to 15 (unrolled): */ - ROUND256_0_TO_15(a,b,c,d,e,f,g,h); - ROUND256_0_TO_15(h,a,b,c,d,e,f,g); - ROUND256_0_TO_15(g,h,a,b,c,d,e,f); - ROUND256_0_TO_15(f,g,h,a,b,c,d,e); - ROUND256_0_TO_15(e,f,g,h,a,b,c,d); - ROUND256_0_TO_15(d,e,f,g,h,a,b,c); - ROUND256_0_TO_15(c,d,e,f,g,h,a,b); - ROUND256_0_TO_15(b,c,d,e,f,g,h,a); - } while (j < 16); - - /* Now for the remaining rounds to 64: */ - do { - ROUND256(a,b,c,d,e,f,g,h); - ROUND256(h,a,b,c,d,e,f,g); - ROUND256(g,h,a,b,c,d,e,f); - ROUND256(f,g,h,a,b,c,d,e); - ROUND256(e,f,g,h,a,b,c,d); - ROUND256(d,e,f,g,h,a,b,c); - ROUND256(c,d,e,f,g,h,a,b); - ROUND256(b,c,d,e,f,g,h,a); - } while (j < 64); - - /* Compute the current intermediate hash value */ - context->state[0] += a; - context->state[1] += b; - context->state[2] += c; - context->state[3] += d; - context->state[4] += e; - context->state[5] += f; - context->state[6] += g; - context->state[7] += h; - - /* Clean up */ - a = b = c = d = e = f = g = h = T1 = 0; -} - -#else /* SHA2_UNROLL_TRANSFORM */ - -static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { - sha2_word32 a, b, c, d, e, f, g, h, s0, s1; - sha2_word32 T1, T2, *W256; - int j; - - W256 = (sha2_word32*)context->buffer; - - /* Initialize registers with the prev. intermediate value */ - a = context->state[0]; - b = context->state[1]; - c = context->state[2]; - d = context->state[3]; - e = context->state[4]; - f = context->state[5]; - g = context->state[6]; - h = context->state[7]; - - j = 0; - do { -#if BYTE_ORDER == LITTLE_ENDIAN - /* Copy data while converting to host byte order */ - REVERSE32(*data++,W256[j]); - /* Apply the SHA-256 compression function to update a..h */ - T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j]; -#else /* BYTE_ORDER == LITTLE_ENDIAN */ - /* Apply the SHA-256 compression function to update a..h with copy */ - T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++); -#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - T2 = Sigma0_256(a) + Maj(a, b, c); - h = g; - g = f; - f = e; - e = d + T1; - d = c; - c = b; - b = a; - a = T1 + T2; - - j++; - } while (j < 16); - - do { - /* Part of the message block expansion: */ - s0 = W256[(j+1)&0x0f]; - s0 = sigma0_256(s0); - s1 = W256[(j+14)&0x0f]; - s1 = sigma1_256(s1); - - /* Apply the SHA-256 compression function to update a..h */ - T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + - (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); - T2 = Sigma0_256(a) + Maj(a, b, c); - h = g; - g = f; - f = e; - e = d + T1; - d = c; - c = b; - b = a; - a = T1 + T2; - - j++; - } while (j < 64); - - /* Compute the current intermediate hash value */ - context->state[0] += a; - context->state[1] += b; - context->state[2] += c; - context->state[3] += d; - context->state[4] += e; - context->state[5] += f; - context->state[6] += g; - context->state[7] += h; - - /* Clean up */ - a = b = c = d = e = f = g = h = T1 = T2 = 0; -} - -#endif /* SHA2_UNROLL_TRANSFORM */ - -void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) { - unsigned int freespace, usedspace; - - if (len == 0) { - /* Calling with no data is valid - we do nothing */ - return; - } - - /* Sanity check: */ - assert(context != (SHA256_CTX*)0 && data != (sha2_byte*)0); - - usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; - if (usedspace > 0) { - /* Calculate how much free space is available in the buffer */ - freespace = SHA256_BLOCK_LENGTH - usedspace; - - if (len >= freespace) { - /* Fill the buffer completely and process it */ - bcopy(data, &context->buffer[usedspace], freespace); - context->bitcount += freespace << 3; - len -= freespace; - data += freespace; - SHA256_Transform(context, (sha2_word32*)context->buffer); - } else { - /* The buffer is not yet full */ - bcopy(data, &context->buffer[usedspace], len); - context->bitcount += len << 3; - /* Clean up: */ - usedspace = freespace = 0; - return; - } - } - while (len >= SHA256_BLOCK_LENGTH) { - /* Process as many complete blocks as we can */ - SHA256_Transform(context, (const sha2_word32*)data); - context->bitcount += SHA256_BLOCK_LENGTH << 3; - len -= SHA256_BLOCK_LENGTH; - data += SHA256_BLOCK_LENGTH; - } - if (len > 0) { - /* There's left-overs, so save 'em */ - bcopy(data, context->buffer, len); - context->bitcount += len << 3; - } - /* Clean up: */ - usedspace = freespace = 0; -} - -void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { - sha2_word32 *d = (sha2_word32*)digest; - unsigned int usedspace; - - /* Sanity check: */ - assert(context != (SHA256_CTX*)0); - - /* If no digest buffer is passed, we don't bother doing this: */ - if (digest != (sha2_byte*)0) { - usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; -#if BYTE_ORDER == LITTLE_ENDIAN - /* Convert FROM host byte order */ - REVERSE64(context->bitcount,context->bitcount); -#endif - if (usedspace > 0) { - /* Begin padding with a 1 bit: */ - context->buffer[usedspace++] = 0x80; - - if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { - /* Set-up for the last transform: */ - bzero(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace); - } else { - if (usedspace < SHA256_BLOCK_LENGTH) { - bzero(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace); - } - /* Do second-to-last transform: */ - SHA256_Transform(context, (sha2_word32*)context->buffer); - - /* And set-up for the last transform: */ - bzero(context->buffer, SHA256_SHORT_BLOCK_LENGTH); - } - } else { - /* Set-up for the last transform: */ - bzero(context->buffer, SHA256_SHORT_BLOCK_LENGTH); - - /* Begin padding with a 1 bit: */ - *context->buffer = 0x80; - } - /* Set the bit count: */ - *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; - - /* Final transform: */ - SHA256_Transform(context, (sha2_word32*)context->buffer); - -#if BYTE_ORDER == LITTLE_ENDIAN - { - /* Convert TO host byte order */ - int j; - for (j = 0; j < 8; j++) { - REVERSE32(context->state[j],context->state[j]); - *d++ = context->state[j]; - } - } -#else - bcopy(context->state, d, SHA256_DIGEST_LENGTH); -#endif - } - - /* Clean up state data: */ - bzero(context, sizeof(*context)); - usedspace = 0; -} - char *SHA256_End(SHA256_CTX* context, char buffer[]) { sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest; int i; @@ -641,7 +295,7 @@ char *SHA256_End(SHA256_CTX* context, ch return buffer; } -char* SHA256_Data(const sha2_byte* data, size_t len, char digest[SHA256_DIGEST_STRING_LENGTH]) { +char* SHA256_Data(const void *data, unsigned int len, char *digest) { SHA256_CTX context; SHA256_Init(&context); Modified: stable/10/sys/crypto/sha2/sha2.h ============================================================================== --- stable/10/sys/crypto/sha2/sha2.h Thu Feb 23 15:30:21 2017 (r314142) +++ stable/10/sys/crypto/sha2/sha2.h Thu Feb 23 16:05:11 2017 (r314143) @@ -56,70 +56,17 @@ extern "C" { #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) -/*** SHA-256/384/512 Context Structures *******************************/ -/* NOTE: If your architecture does not define either u_intXX_t types or - * uintXX_t (from inttypes.h), you may need to define things by hand - * for your system: - */ -#if 0 -typedef unsigned char u_int8_t; /* 1-byte (8-bits) */ -typedef unsigned int u_int32_t; /* 4-bytes (32-bits) */ -typedef unsigned long long u_int64_t; /* 8-bytes (64-bits) */ -#endif -/* - * Most BSD systems already define u_intXX_t types, as does Linux. - * Some systems, however, like Compaq's Tru64 Unix instead can use - * uintXX_t types defined by very recent ANSI C standards and included - * in the file: - * - * #include - * - * If you choose to use then please define: - * - * #define SHA2_USE_INTTYPES_H - * - * Or on the command line during compile: - * - * cc -DSHA2_USE_INTTYPES_H ... - */ -#if 0 /*def SHA2_USE_INTTYPES_H*/ - -typedef struct _SHA256_CTX { - uint32_t state[8]; - uint64_t bitcount; - uint8_t buffer[SHA256_BLOCK_LENGTH]; -} SHA256_CTX; +/*** SHA-384/512 Context Structures *******************************/ typedef struct _SHA512_CTX { uint64_t state[8]; uint64_t bitcount[2]; uint8_t buffer[SHA512_BLOCK_LENGTH]; } SHA512_CTX; -#else /* SHA2_USE_INTTYPES_H */ - -typedef struct _SHA256_CTX { - u_int32_t state[8]; - u_int64_t bitcount; - u_int8_t buffer[SHA256_BLOCK_LENGTH]; -} SHA256_CTX; -typedef struct _SHA512_CTX { - u_int64_t state[8]; - u_int64_t bitcount[2]; - u_int8_t buffer[SHA512_BLOCK_LENGTH]; -} SHA512_CTX; - -#endif /* SHA2_USE_INTTYPES_H */ - typedef SHA512_CTX SHA384_CTX; -/*** SHA-256/384/512 Function Prototypes ******************************/ - -void SHA256_Init(SHA256_CTX *); -void SHA256_Update(SHA256_CTX*, const u_int8_t*, size_t); -void SHA256_Final(u_int8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*); -char* SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]); -char* SHA256_Data(const u_int8_t*, size_t, char[SHA256_DIGEST_STRING_LENGTH]); +/*** SHA-384/512 Function Prototypes ******************************/ void SHA384_Init(SHA384_CTX*); void SHA384_Update(SHA384_CTX*, const u_int8_t*, size_t); @@ -137,4 +84,6 @@ char* SHA512_Data(const u_int8_t*, size_ } #endif /* __cplusplus */ +#include "sha256.h" + #endif /* __SHA2_H__ */ Copied and modified: stable/10/sys/crypto/sha2/sha256.h (from r263215, head/sys/crypto/sha2/sha256.h) ============================================================================== --- head/sys/crypto/sha2/sha256.h Sun Mar 16 00:57:26 2014 (r263215, copy source) +++ stable/10/sys/crypto/sha2/sha256.h Thu Feb 23 16:05:11 2017 (r314143) @@ -29,22 +29,58 @@ #ifndef _SHA256_H_ #define _SHA256_H_ +#ifndef _KERNEL #include +#endif typedef struct SHA256Context { uint32_t state[8]; uint64_t count; - unsigned char buf[64]; + uint8_t buf[64]; } SHA256_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#ifndef SHA256_Init +#define SHA256_Init _libmd_SHA256_Init +#endif +#ifndef SHA256_Update +#define SHA256_Update _libmd_SHA256_Update +#endif +#ifndef SHA256_Final +#define SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End +#define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File +#define SHA256_File _libmd_SHA256_File +#endif +#ifndef SHA256_FileChunk +#define SHA256_FileChunk _libmd_SHA256_FileChunk +#endif +#ifndef SHA256_Data +#define SHA256_Data _libmd_SHA256_Data +#endif + +#ifndef SHA256_Transform +#define SHA256_Transform _libmd_SHA256_Transform +#endif +#ifndef SHA256_version +#define SHA256_version _libmd_SHA256_version +#endif + void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); void SHA256_Final(unsigned char [32], SHA256_CTX *); char *SHA256_End(SHA256_CTX *, char *); +char *SHA256_Data(const void *, unsigned int, char *); +#ifndef _KERNEL char *SHA256_File(const char *, char *); char *SHA256_FileChunk(const char *, char *, off_t, off_t); -char *SHA256_Data(const void *, unsigned int, char *); +#endif __END_DECLS #endif /* !_SHA256_H_ */ Copied and modified: stable/10/sys/crypto/sha2/sha256c.c (from r263215, head/sys/crypto/sha2/sha256c.c) ============================================================================== --- head/sys/crypto/sha2/sha256c.c Sun Mar 16 00:57:26 2014 (r263215, copy source) +++ stable/10/sys/crypto/sha2/sha256c.c Thu Feb 23 16:05:11 2017 (r314143) @@ -30,7 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef _KERNEL +#include +#else #include +#endif #include "sha256.h" @@ -295,3 +299,18 @@ SHA256_Final(unsigned char digest[32], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ +#undef SHA256_Init +__weak_reference(_libmd_SHA256_Init, SHA256_Init); +#undef SHA256_Update +__weak_reference(_libmd_SHA256_Update, SHA256_Update); +#undef SHA256_Final +__weak_reference(_libmd_SHA256_Final, SHA256_Final); +#undef SHA256_Transform +__weak_reference(_libmd_SHA256_Transform, SHA256_Transform); +#endif From owner-svn-src-all@freebsd.org Thu Feb 23 16:07: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 E6A93CEA734; Thu, 23 Feb 2017 16:07:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56D26E; Thu, 23 Feb 2017 16:07:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NG7kZM040394; Thu, 23 Feb 2017 16:07:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NG7jNN040379; Thu, 23 Feb 2017 16:07:45 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702231607.v1NG7jNN040379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 16:07: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: r314144 - stable/10/lib/libmd 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, 23 Feb 2017 16:07:48 -0000 Author: avg Date: Thu Feb 23 16:07:45 2017 New Revision: 314144 URL: https://svnweb.freebsd.org/changeset/base/314144 Log: MFC r282726: Ensure libmd symbols do not clash with libcrypto Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Modified: stable/10/lib/libmd/md4.h stable/10/lib/libmd/md4c.c stable/10/lib/libmd/md5.h stable/10/lib/libmd/md5c.c stable/10/lib/libmd/mdXhl.c stable/10/lib/libmd/ripemd.h stable/10/lib/libmd/rmd160c.c stable/10/lib/libmd/sha.h stable/10/lib/libmd/sha1c.c stable/10/lib/libmd/sha256.h stable/10/lib/libmd/sha256c.c stable/10/lib/libmd/sha512.h stable/10/lib/libmd/sha512c.c stable/10/lib/libmd/shadriver.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmd/md4.h ============================================================================== --- stable/10/lib/libmd/md4.h Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/md4.h Thu Feb 23 16:07:45 2017 (r314144) @@ -35,6 +35,18 @@ typedef struct MD4Context { #include __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define MD4Init _libmd_MD4Init +#define MD4Update _libmd_MD4Update +#define MD4Pad _libmd_MD4Pad +#define MD4Final _libmd_MD4Final +#define MD4End _libmd_MD4End +#define MD4File _libmd_MD4File +#define MD4FileChunk _libmd_MD4FileChunk +#define MD4Data _libmd_MD4Data + void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const void *, unsigned int); void MD4Pad(MD4_CTX *); Modified: stable/10/lib/libmd/md4c.c ============================================================================== --- stable/10/lib/libmd/md4c.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/md4c.c Thu Feb 23 16:07:45 2017 (r314144) @@ -290,3 +290,12 @@ unsigned int len; output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } + +#undef MD4Init +__weak_reference(_libmd_MD4Init, MD4Init); +#undef MD4Update +__weak_reference(_libmd_MD4Update, MD4Update); +#undef MD4Pad +__weak_reference(_libmd_MD4Pad, MD4Pad); +#undef MD4Final +__weak_reference(_libmd_MD4Final, MD4Final); Modified: stable/10/lib/libmd/md5.h ============================================================================== --- stable/10/lib/libmd/md5.h Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/md5.h Thu Feb 23 16:07:45 2017 (r314144) @@ -1,4 +1,23 @@ +/* $FreeBSD$ */ + #ifndef _MD5_H_ #define _MD5_H_ + +#ifndef _KERNEL + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define MD5Init _libmd_MD5Init +#define MD5Update _libmd_MD5Update +#define MD5Pad _libmd_MD5Pad +#define MD5Final _libmd_MD5Final +#define MD5Transform _libmd_MD5Transform +#define MD5End _libmd_MD5End +#define MD5File _libmd_MD5File +#define MD5FileChunk _libmd_MD5FileChunk +#define MD5Data _libmd_MD5Data + +#endif + #include #endif /* _MD5_H_ */ Modified: stable/10/lib/libmd/md5c.c ============================================================================== --- stable/10/lib/libmd/md5c.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/md5c.c Thu Feb 23 16:07:45 2017 (r314144) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include "md5.h" static void MD5Transform(u_int32_t [4], const unsigned char [64]); @@ -335,3 +335,14 @@ MD5Transform (state, block) /* Zeroize sensitive information. */ memset ((void *)x, 0, sizeof (x)); } + +#undef MD5Init +__weak_reference(_libmd_MD5Init, MD5Init); +#undef MD5Update +__weak_reference(_libmd_MD5Update, MD5Update); +#undef MD5Pad +__weak_reference(_libmd_MD5Pad, MD5Pad); +#undef MD5Final +__weak_reference(_libmd_MD5Final, MD5Final); +#undef MD5Transform +__weak_reference(_libmd_MD5Transform, MD5Transform); Modified: stable/10/lib/libmd/mdXhl.c ============================================================================== --- stable/10/lib/libmd/mdXhl.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/mdXhl.c Thu Feb 23 16:07:45 2017 (r314144) @@ -96,3 +96,12 @@ MDXData (const void *data, unsigned int MDXUpdate(&ctx,data,len); return (MDXEnd(&ctx, buf)); } + +#undef MDXEnd +__weak_reference(_libmd_MDXEnd, MDXEnd); +#undef MDXFile +__weak_reference(_libmd_MDXFile, MDXFile); +#undef MDXFileChunk +__weak_reference(_libmd_MDXFileChunk, MDXFileChunk); +#undef MDXData +__weak_reference(_libmd_MDXData, MDXData); Modified: stable/10/lib/libmd/ripemd.h ============================================================================== --- stable/10/lib/libmd/ripemd.h Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/ripemd.h Thu Feb 23 16:07:45 2017 (r314144) @@ -81,6 +81,21 @@ typedef struct RIPEMD160state_st { } RIPEMD160_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define RIPEMD160_Init _libmd_RIPEMD160_Init +#define RIPEMD160_Update _libmd_RIPEMD160_Update +#define RIPEMD160_Final _libmd_RIPEMD160_Final +#define RIPEMD160_End _libmd_RIPEMD160_End +#define RIPEMD160_File _libmd_RIPEMD160_File +#define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk +#define RIPEMD160_Data _libmd_RIPEMD160_Data + +#define RIPEMD160_Transform _libmd_RIPEMD160_Transform +#define RMD160_version _libmd_RMD160_version +#define ripemd160_block _libmd_ripemd160_block + void RIPEMD160_Init(RIPEMD160_CTX *c); void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); Modified: stable/10/lib/libmd/rmd160c.c ============================================================================== --- stable/10/lib/libmd/rmd160c.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/rmd160c.c Thu Feb 23 16:07:45 2017 (r314144) @@ -545,3 +545,16 @@ unsigned long *l; } } #endif + +#undef RIPEMD160_Init +__weak_reference(_libmd_RIPEMD160_Init, RIPEMD160_Init); +#undef RIPEMD160_Update +__weak_reference(_libmd_RIPEMD160_Update, RIPEMD160_Update); +#undef RIPEMD160_Final +__weak_reference(_libmd_RIPEMD160_Final, RIPEMD160_Final); +#undef RIPEMD160_Transform +__weak_reference(_libmd_RIPEMD160_Transform, RIPEMD160_Transform); +#undef RMD160_version +__weak_reference(_libmd_RMD160_version, RMD160_version); +#undef ripemd160_block +__weak_reference(_libmd_ripemd160_block, ripemd160_block); Modified: stable/10/lib/libmd/sha.h ============================================================================== --- stable/10/lib/libmd/sha.h Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/sha.h Thu Feb 23 16:07:45 2017 (r314144) @@ -79,6 +79,33 @@ typedef struct SHAstate_st { #define SHA1_CTX SHA_CTX __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define SHA_Init _libmd_SHA_Init +#define SHA_Update _libmd_SHA_Update +#define SHA_Final _libmd_SHA_Final +#define SHA_End _libmd_SHA_End +#define SHA_File _libmd_SHA_File +#define SHA_FileChunk _libmd_SHA_FileChunk +#define SHA_Data _libmd_SHA_Data + +#define SHA_Transform _libmd_SHA_Transform +#define SHA_version _libmd_SHA_version +#define sha_block _libmd_sha_block + +#define SHA1_Init _libmd_SHA1_Init +#define SHA1_Update _libmd_SHA1_Update +#define SHA1_Final _libmd_SHA1_Final +#define SHA1_End _libmd_SHA1_End +#define SHA1_File _libmd_SHA1_File +#define SHA1_FileChunk _libmd_SHA1_FileChunk +#define SHA1_Data _libmd_SHA1_Data + +#define SHA1_Transform _libmd_SHA1_Transform +#define SHA1_version _libmd_SHA1_version +#define sha1_block _libmd_sha1_block + void SHA_Init(SHA_CTX *c); void SHA_Update(SHA_CTX *c, const void *data, size_t len); void SHA_Final(unsigned char *md, SHA_CTX *c); @@ -86,6 +113,7 @@ char *SHA_End(SHA_CTX *, char *); char *SHA_File(const char *, char *); char *SHA_FileChunk(const char *, char *, off_t, off_t); char *SHA_Data(const void *, unsigned int, char *); + void SHA1_Init(SHA_CTX *c); void SHA1_Update(SHA_CTX *c, const void *data, size_t len); void SHA1_Final(unsigned char *md, SHA_CTX *c); Modified: stable/10/lib/libmd/sha1c.c ============================================================================== --- stable/10/lib/libmd/sha1c.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/sha1c.c Thu Feb 23 16:07:45 2017 (r314144) @@ -488,3 +488,28 @@ SHA_CTX *c; /* memset((char *)&c,0,sizeof(c));*/ } + +#undef SHA_Init +__weak_reference(_libmd_SHA_Init, SHA_Init); +#undef SHA_Update +__weak_reference(_libmd_SHA_Update, SHA_Update); +#undef SHA_Final +__weak_reference(_libmd_SHA_Final, SHA_Final); +#undef SHA_Transform +__weak_reference(_libmd_SHA_Transform, SHA_Transform); +#undef SHA_version +__weak_reference(_libmd_SHA_version, SHA_version); +#undef sha_block +__weak_reference(_libmd_sha_block, sha_block); +#undef SHA1_Init +__weak_reference(_libmd_SHA1_Init, SHA1_Init); +#undef SHA1_Update +__weak_reference(_libmd_SHA1_Update, SHA1_Update); +#undef SHA1_Final +__weak_reference(_libmd_SHA1_Final, SHA1_Final); +#undef SHA1_Transform +__weak_reference(_libmd_SHA1_Transform, SHA1_Transform); +#undef SHA1_version +__weak_reference(_libmd_SHA1_version, SHA1_version); +#undef sha1_block +__weak_reference(_libmd_sha1_block, sha1_block); Modified: stable/10/lib/libmd/sha256.h ============================================================================== --- stable/10/lib/libmd/sha256.h Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/sha256.h Thu Feb 23 16:07:45 2017 (r314144) @@ -38,6 +38,20 @@ typedef struct SHA256Context { } SHA256_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define SHA256_Init _libmd_SHA256_Init +#define SHA256_Update _libmd_SHA256_Update +#define SHA256_Final _libmd_SHA256_Final +#define SHA256_End _libmd_SHA256_End +#define SHA256_File _libmd_SHA256_File +#define SHA256_FileChunk _libmd_SHA256_FileChunk +#define SHA256_Data _libmd_SHA256_Data + +#define SHA256_Transform _libmd_SHA256_Transform +#define SHA256_version _libmd_SHA256_version + void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); void SHA256_Final(unsigned char [32], SHA256_CTX *); Modified: stable/10/lib/libmd/sha256c.c ============================================================================== --- stable/10/lib/libmd/sha256c.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/sha256c.c Thu Feb 23 16:07:45 2017 (r314144) @@ -298,3 +298,14 @@ SHA256_Final(unsigned char digest[32], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#undef SHA256_Init +__weak_reference(_libmd_SHA256_Init, SHA256_Init); +#undef SHA256_Update +__weak_reference(_libmd_SHA256_Update, SHA256_Update); +#undef SHA256_Final +__weak_reference(_libmd_SHA256_Final, SHA256_Final); +#undef SHA256_Transform +__weak_reference(_libmd_SHA256_Transform, SHA256_Transform); +#undef SHA256_version +__weak_reference(_libmd_SHA256_version, SHA256_version); Modified: stable/10/lib/libmd/sha512.h ============================================================================== --- stable/10/lib/libmd/sha512.h Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/sha512.h Thu Feb 23 16:07:45 2017 (r314144) @@ -38,6 +38,20 @@ typedef struct SHA512Context { } SHA512_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define SHA512_Init _libmd_SHA512_Init +#define SHA512_Update _libmd_SHA512_Update +#define SHA512_Final _libmd_SHA512_Final +#define SHA512_End _libmd_SHA512_End +#define SHA512_File _libmd_SHA512_File +#define SHA512_FileChunk _libmd_SHA512_FileChunk +#define SHA512_Data _libmd_SHA512_Data + +#define SHA512_Transform _libmd_SHA512_Transform +#define SHA512_version _libmd_SHA512_version + void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, const void *, size_t); void SHA512_Final(unsigned char [64], SHA512_CTX *); Modified: stable/10/lib/libmd/sha512c.c ============================================================================== --- stable/10/lib/libmd/sha512c.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/sha512c.c Thu Feb 23 16:07:45 2017 (r314144) @@ -318,3 +318,14 @@ SHA512_Final(unsigned char digest[64], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#undef SHA512_Init +__weak_reference(_libmd_SHA512_Init, SHA512_Init); +#undef SHA512_Update +__weak_reference(_libmd_SHA512_Update, SHA512_Update); +#undef SHA512_Final +__weak_reference(_libmd_SHA512_Final, SHA512_Final); +#undef SHA512_Transform +__weak_reference(_libmd_SHA512_Transform, SHA512_Transform); +#undef SHA512_version +__weak_reference(_libmd_SHA512_version, SHA512_version); Modified: stable/10/lib/libmd/shadriver.c ============================================================================== --- stable/10/lib/libmd/shadriver.c Thu Feb 23 16:05:11 2017 (r314143) +++ stable/10/lib/libmd/shadriver.c Thu Feb 23 16:07:45 2017 (r314144) @@ -31,10 +31,13 @@ __FBSDID("$FreeBSD$"); #endif #if SHA == 1 +#undef SHA_Data #define SHA_Data SHA1_Data #elif SHA == 256 +#undef SHA_Data #define SHA_Data SHA256_Data #elif SHA == 512 +#undef SHA_Data #define SHA_Data SHA512_Data #endif From owner-svn-src-all@freebsd.org Thu Feb 23 16:10: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 49D54CEA89C; Thu, 23 Feb 2017 16:10:17 +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 F1FC3316; Thu, 23 Feb 2017 16:10:16 +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 v1NGAGna040764; Thu, 23 Feb 2017 16:10:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NGAGOK040762; Thu, 23 Feb 2017 16:10:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231610.v1NGAGOK040762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 16:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314145 - in head/sys/dev/vxge: . vxgehal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 16:10:17 -0000 Author: pfg Date: Thu Feb 23 16:10:15 2017 New Revision: 314145 URL: https://svnweb.freebsd.org/changeset/base/314145 Log: dev/vxe: double assignments. Fix some suspicious code, likely caused by excessive copy-pasting. Found with: coccinelle (da.cocci) MFC after: 2 weeks Modified: head/sys/dev/vxge/vxge.c head/sys/dev/vxge/vxgehal/vxgehal-config.c Modified: head/sys/dev/vxge/vxge.c ============================================================================== --- head/sys/dev/vxge/vxge.c Thu Feb 23 16:07:45 2017 (r314144) +++ head/sys/dev/vxge/vxge.c Thu Feb 23 16:10:15 2017 (r314145) @@ -2312,7 +2312,7 @@ vxge_vpath_open(vxge_dev_t *vdev) vpath->rx_ticks = ticks; vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; - vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; + vpath->rti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; vpath->tx_intr_coalesce = vdev->config.intr_coalesce; vpath->rx_intr_coalesce = vdev->config.intr_coalesce; Modified: head/sys/dev/vxge/vxgehal/vxgehal-config.c ============================================================================== --- head/sys/dev/vxge/vxgehal/vxgehal-config.c Thu Feb 23 16:07:45 2017 (r314144) +++ head/sys/dev/vxge/vxgehal/vxgehal-config.c Thu Feb 23 16:10:15 2017 (r314145) @@ -2312,9 +2312,6 @@ vxge_hal_device_config_default_get( port_config->host_chosen_aggr = VXGE_HAL_LAG_PORT_HOST_CHOSEN_AGGR_DEFAULT; - port_config->host_chosen_aggr = - VXGE_HAL_LAG_PORT_HOST_CHOSEN_AGGR_DEFAULT; - port_config->discard_unknown_slow_proto = VXGE_HAL_LAG_PORT_DISCARD_UNKNOWN_SLOW_PROTO_DEFAULT; @@ -2348,9 +2345,6 @@ vxge_hal_device_config_default_get( port_config->actor_distributing = VXGE_HAL_LAG_PORT_ACTOR_DISTRIBUTING_DEFAULT; - port_config->actor_distributing = - VXGE_HAL_LAG_PORT_ACTOR_DISTRIBUTING_DEFAULT; - port_config->actor_defaulted = VXGE_HAL_LAG_PORT_ACTOR_DEFAULTED_DEFAULT; @@ -2387,9 +2381,6 @@ vxge_hal_device_config_default_get( port_config->partner_distributing = VXGE_HAL_LAG_PORT_PARTNER_DISTRIBUTING_DEFAULT; - port_config->partner_distributing = - VXGE_HAL_LAG_PORT_PARTNER_DISTRIBUTING_DEFAULT; - port_config->partner_defaulted = VXGE_HAL_LAG_PORT_PARTNER_DEFAULTED_DEFAULT; From owner-svn-src-all@freebsd.org Thu Feb 23 16:15: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 788C0CEAADA; Thu, 23 Feb 2017 16:15:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E4CEA5D; Thu, 23 Feb 2017 16:15:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NGFhXX044761; Thu, 23 Feb 2017 16:15:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NGFhAO044755; Thu, 23 Feb 2017 16:15:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702231615.v1NGFhAO044755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 16:15: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: r314146 - in stable/10/sys/modules: crypto geom/geom_bde random 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: Thu, 23 Feb 2017 16:15:44 -0000 Author: avg Date: Thu Feb 23 16:15:42 2017 New Revision: 314146 URL: https://svnweb.freebsd.org/changeset/base/314146 Log: MFC r263219: add sha256c.c to the various modules that included sha2.c... Modified: stable/10/sys/modules/crypto/Makefile stable/10/sys/modules/geom/geom_bde/Makefile stable/10/sys/modules/random/Makefile stable/10/sys/modules/zfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/crypto/Makefile ============================================================================== --- stable/10/sys/modules/crypto/Makefile Thu Feb 23 16:10:15 2017 (r314145) +++ stable/10/sys/modules/crypto/Makefile Thu Feb 23 16:15:42 2017 (r314146) @@ -14,7 +14,7 @@ SRCS += criov.c cryptosoft.c xform.c SRCS += cast.c cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c SRCS += skipjack.c bf_enc.c bf_ecb.c bf_skey.c SRCS += des_ecb.c des_enc.c des_setkey.c -SRCS += sha1.c sha2.c +SRCS += sha1.c sha2.c sha256c.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h SRCS += opt_ddb.h opt_kdtrace.h SRCS += camellia.c camellia-api.c Modified: stable/10/sys/modules/geom/geom_bde/Makefile ============================================================================== --- stable/10/sys/modules/geom/geom_bde/Makefile Thu Feb 23 16:10:15 2017 (r314145) +++ stable/10/sys/modules/geom/geom_bde/Makefile Thu Feb 23 16:15:42 2017 (r314146) @@ -6,6 +6,6 @@ KMOD= geom_bde SRCS= g_bde.c g_bde_crypt.c g_bde_lock.c g_bde_work.c -SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c +SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c sha256c.c .include Modified: stable/10/sys/modules/random/Makefile ============================================================================== --- stable/10/sys/modules/random/Makefile Thu Feb 23 16:10:15 2017 (r314145) +++ stable/10/sys/modules/random/Makefile Thu Feb 23 16:15:42 2017 (r314146) @@ -12,7 +12,7 @@ SRCS+= ivy.c .endif SRCS+= randomdev_soft.c yarrow.c hash.c SRCS+= random_harvestq.c live_entropy_sources.c rwfile.c -SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c +SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c sha256c.c SRCS+= bus_if.h device_if.h vnode_if.h opt_cpu.h opt_random.h CFLAGS+= -I${.CURDIR}/../.. Modified: stable/10/sys/modules/zfs/Makefile ============================================================================== --- stable/10/sys/modules/zfs/Makefile Thu Feb 23 16:10:15 2017 (r314145) +++ stable/10/sys/modules/zfs/Makefile Thu Feb 23 16:15:42 2017 (r314146) @@ -72,7 +72,7 @@ SRCS+= zmod_subr.c SRCS+= zutil.c .PATH: ${.CURDIR}/../../crypto/sha2 -SRCS+= sha2.c +SRCS+= sha2.c sha256c.c .PATH: ${SUNW}/common/zfs .include "${SUNW}/uts/common/Makefile.files" From owner-svn-src-all@freebsd.org Thu Feb 23 16:18: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 9D8ECCEABD7; Thu, 23 Feb 2017 16:18:58 +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 6D451C3E; Thu, 23 Feb 2017 16:18:58 +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 v1NGIv7Z045001; Thu, 23 Feb 2017 16:18:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NGIv56045000; Thu, 23 Feb 2017 16:18:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231618.v1NGIv56045000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 16:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314147 - head/sys/dev/bktr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 16:18:58 -0000 Author: pfg Date: Thu Feb 23 16:18:57 2017 New Revision: 314147 URL: https://svnweb.freebsd.org/changeset/base/314147 Log: bktr(4): double assignment. First assignment is obviously overwritten by the next line. Leave newest assignment: it was introduced in r29233. Found with: coccinelle (da.cocci) Modified: head/sys/dev/bktr/bktr_core.c Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Thu Feb 23 16:15:42 2017 (r314146) +++ head/sys/dev/bktr/bktr_core.c Thu Feb 23 16:18:57 2017 (r314147) @@ -3121,7 +3121,6 @@ yuvpack_prog( bktr_ptr_t bktr, char i_fl OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) | BT848_COLOR_CTL_RGB_DED | BT848_COLOR_CTL_GAMMA); OUTB(bktr, BKTR_ADC, SYNC_LEVEL); - bktr->capcontrol = 1 << 6 | 1 << 4 | 1 << 2 | 3; bktr->capcontrol = 3 << 2 | 3; dma_prog = (uint32_t *) bktr->dma_prog; From owner-svn-src-all@freebsd.org Thu Feb 23 16:31: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 6C2E7CEAE2E; Thu, 23 Feb 2017 16:31:05 +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 3D3771333; Thu, 23 Feb 2017 16:31:05 +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 v1NGV4s7049790; Thu, 23 Feb 2017 16:31:04 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NGV432049648; Thu, 23 Feb 2017 16:31:04 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702231631.v1NGV432049648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 23 Feb 2017 16:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314148 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 16:31:05 -0000 Author: asomers Date: Thu Feb 23 16:31:04 2017 New Revision: 314148 URL: https://svnweb.freebsd.org/changeset/base/314148 Log: Misc Coverity fixes in xnb(4) Most of these are null pointer dereferences or missing error checks in the unit tests. One is a missing error check in xnb_attach_failed. None can cause real problems in running systems. Reported by: Coverity CIDs: 1092469 1092468 1092467 2092466 1092465 1092512 1092511 1092510 CIDs: 1092510 1092509 1092508 1092507 Reviewed by: royger MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9234 Modified: head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netback/netback_unit_tests.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Thu Feb 23 16:18:57 2017 (r314147) +++ head/sys/dev/xen/netback/netback.c Thu Feb 23 16:31:04 2017 (r314148) @@ -1101,14 +1101,13 @@ xnb_attach_failed(struct xnb_softc *xnb, xs_vprintf(XST_NIL, xenbus_get_node(xnb->dev), "hotplug-error", fmt, ap_hotplug); va_end(ap_hotplug); - xs_printf(XST_NIL, xenbus_get_node(xnb->dev), + (void)xs_printf(XST_NIL, xenbus_get_node(xnb->dev), "hotplug-status", "error"); xenbus_dev_vfatal(xnb->dev, err, fmt, ap); va_end(ap); - xs_printf(XST_NIL, xenbus_get_node(xnb->dev), - "online", "0"); + (void)xs_printf(XST_NIL, xenbus_get_node(xnb->dev), "online", "0"); xnb_detach(xnb->dev); } Modified: head/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- head/sys/dev/xen/netback/netback_unit_tests.c Thu Feb 23 16:18:57 2017 (r314147) +++ head/sys/dev/xen/netback/netback_unit_tests.c Thu Feb 23 16:31:04 2017 (r314148) @@ -1227,6 +1227,10 @@ xnb_txpkt2gnttab_2cluster(char *buffer, xnb_ring2pkt(&pkt, &xnb_unit_pvt.txb, xnb_unit_pvt.txb.req_cons); pMbuf = xnb_pkt2mbufc(&pkt, xnb_unit_pvt.ifp); + XNB_ASSERT(pMbuf != NULL); + if (pMbuf == NULL) + return; + n_entries = xnb_txpkt2gnttab(&pkt, pMbuf, xnb_unit_pvt.gnttab, &xnb_unit_pvt.txb, DOMID_FIRST_RESERVED); @@ -1271,8 +1275,7 @@ xnb_txpkt2gnttab_2cluster(char *buffer, /* should never get here */ XNB_ASSERT(0); } - if (pMbuf != NULL) - m_freem(pMbuf); + m_freem(pMbuf); } @@ -1494,15 +1497,14 @@ xnb_mbufc2pkt_2short(char *buffer, size_ struct mbuf *mbufc, *mbufc2; mbufc = m_getm(NULL, size1, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; mbufc2 = m_getm(mbufc, size2, M_WAITOK, MT_DATA); + XNB_ASSERT(mbufc2 != NULL); if (mbufc2 == NULL) { - XNB_ASSERT(mbufc2 != NULL); safe_m_freem(&mbufc); return; } @@ -1537,11 +1539,10 @@ xnb_mbufc2pkt_long(char *buffer, size_t struct mbuf *mbufc, *m; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; size_remaining = size; @@ -1576,10 +1577,9 @@ xnb_mbufc2pkt_extra(char *buffer, size_t struct mbuf *mbufc, *m; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; @@ -1619,11 +1619,10 @@ xnb_mbufc2pkt_nospace(char *buffer, size int error; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; size_remaining = size; @@ -1840,10 +1839,9 @@ xnb_rxpkt2rsp_extra(char *buffer, size_t struct netif_extra_info *ext; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; @@ -1974,11 +1972,10 @@ xnb_rxpkt2rsp_2short(char *buffer, size_ struct mbuf *mbufc; mbufc = m_getm(NULL, size1, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; m_getm(mbufc, size2, M_WAITOK, MT_DATA); XNB_ASSERT(mbufc->m_next != NULL); @@ -2451,7 +2448,7 @@ xnb_sscanf_hhu(char *buffer, size_t bufl for (i = 0; i < 12; i++) dest[i] = 'X'; - sscanf(mystr, "%hhu", &dest[4]); + XNB_ASSERT(sscanf(mystr, "%hhu", &dest[4]) == 1); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? 137 : 'X')); } @@ -2469,7 +2466,7 @@ xnb_sscanf_hhd(char *buffer, size_t bufl for (i = 0; i < 12; i++) dest[i] = 'X'; - sscanf(mystr, "%hhd", &dest[4]); + XNB_ASSERT(sscanf(mystr, "%hhd", &dest[4]) == 1); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? -27 : 'X')); } @@ -2487,7 +2484,7 @@ xnb_sscanf_lld(char *buffer, size_t bufl for (i = 0; i < 3; i++) dest[i] = (long long)0xdeadbeefdeadbeef; - sscanf(mystr, "%lld", &dest[1]); + XNB_ASSERT(sscanf(mystr, "%lld", &dest[1]) == 1); for (i = 0; i < 3; i++) XNB_ASSERT(dest[i] == (i != 1 ? (long long)0xdeadbeefdeadbeef : -123456789012345)); @@ -2506,7 +2503,7 @@ xnb_sscanf_llu(char *buffer, size_t bufl for (i = 0; i < 3; i++) dest[i] = (long long)0xdeadbeefdeadbeef; - sscanf(mystr, "%llu", &dest[1]); + XNB_ASSERT(sscanf(mystr, "%llu", &dest[1]) == 1); for (i = 0; i < 3; i++) XNB_ASSERT(dest[i] == (i != 1 ? (long long)0xdeadbeefdeadbeef : 12802747070103273189ull)); @@ -2528,10 +2525,10 @@ xnb_sscanf_hhn(char *buffer, size_t bufl for (i = 0; i < 12; i++) dest[i] = (unsigned char)'X'; - sscanf(mystr, + XNB_ASSERT(sscanf(mystr, "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f" - "404142434445464748494a4b4c4d4e4f%hhn", &dest[4]); + "404142434445464748494a4b4c4d4e4f%hhn", &dest[4]) == 1); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? 160 : 'X')); } From owner-svn-src-all@freebsd.org Thu Feb 23 16:42: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 EE7F4CEB322; Thu, 23 Feb 2017 16:42:49 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B33F31E22; Thu, 23 Feb 2017 16:42:49 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NGgmV2057148; Thu, 23 Feb 2017 16:42:48 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NGgmD4057147; Thu, 23 Feb 2017 16:42:48 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201702231642.v1NGgmD4057147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Thu, 23 Feb 2017 16:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314149 - 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: Thu, 23 Feb 2017 16:42:50 -0000 Author: nyan Date: Thu Feb 23 16:42:48 2017 New Revision: 314149 URL: https://svnweb.freebsd.org/changeset/base/314149 Log: The ct driver was removed by r312910. Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Thu Feb 23 16:31:04 2017 (r314148) +++ head/etc/devd.conf Thu Feb 23 16:42:48 2017 (r314149) @@ -19,7 +19,7 @@ options { # Setup some shorthand for regex that we use later in the file. #XXX Yes, these are gross -- imp set scsi-controller-regex - "(aac|adv|adw|aha|ahc|ahd|aic|amr|bt|ciss|ct|dpt|\ + "(aac|adv|adw|aha|ahc|ahd|aic|amr|bt|ciss|dpt|\ esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm)\ [0-9]+"; set wifi-driver-regex From owner-svn-src-all@freebsd.org Thu Feb 23 16:54: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 5D32BCEB7D9; Thu, 23 Feb 2017 16:54:31 +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 2C6A32E4; Thu, 23 Feb 2017 16:54:31 +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 v1NGsUav062702; Thu, 23 Feb 2017 16:54:30 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NGsU6t062701; Thu, 23 Feb 2017 16:54:30 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702231654.v1NGsU6t062701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 23 Feb 2017 16:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314150 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 16:54:31 -0000 Author: asomers Date: Thu Feb 23 16:54:30 2017 New Revision: 314150 URL: https://svnweb.freebsd.org/changeset/base/314150 Log: Fix the xnb(4) unit tests One test was inadvertently expecting a bug in the kernel's sscanf implementation circa 2012. I don't know when that bug got fixed. Reported by: royger Reviewed by: royger MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9766 Modified: head/sys/dev/xen/netback/netback_unit_tests.c Modified: head/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- head/sys/dev/xen/netback/netback_unit_tests.c Thu Feb 23 16:42:48 2017 (r314149) +++ head/sys/dev/xen/netback/netback_unit_tests.c Thu Feb 23 16:54:30 2017 (r314150) @@ -2528,7 +2528,7 @@ xnb_sscanf_hhn(char *buffer, size_t bufl XNB_ASSERT(sscanf(mystr, "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f" - "404142434445464748494a4b4c4d4e4f%hhn", &dest[4]) == 1); + "404142434445464748494a4b4c4d4e4f%hhn", &dest[4]) == 0); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? 160 : 'X')); } From owner-svn-src-all@freebsd.org Thu Feb 23 17: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 2208FCEBBD8; Thu, 23 Feb 2017 17:13:16 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x22b.google.com (mail-ot0-x22b.google.com [IPv6:2607:f8b0:4003:c0f::22b]) (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 DB079E6B; Thu, 23 Feb 2017 17:13:15 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x22b.google.com with SMTP id j38so28248018otb.3; Thu, 23 Feb 2017 09:13: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=ldbpWJ1k6b/YaY64ZDQvJTtldeGbLIIn1YU3618kPYg=; b=OOuHlvlHBadL9Yr2xbcu13gXWjILP+hoYNt3kLYTNPrXETy04JrS33Xo+tWzrym7qi QaT3Dbm1AP+iauAQplir/xd3D5SqXdnErhoH40XcLQjhrXZN17NPT60Js6cwlkb5W7X/ 9jitaAEvG9azVfxEiRSr1MxRCNEWgp8+s9DGMd+FlBO9dPV5HfQi708oAKLWCH6QrHFF BUsl0h4w71b68LiBjpkZHrC/cy3CA84pIjaN57LKRaBBe50VFiE5Z+AVhO4w32+OeW2Q tzHI3sz3zjuO7yBZKJZAzuzkX+grXgb8ykgLPNsMiLA8hYu5AG58b6nw8e21sJLBqDoH BpaA== 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=ldbpWJ1k6b/YaY64ZDQvJTtldeGbLIIn1YU3618kPYg=; b=t6Xj1q+rmo7rVchMJdb0C0H/BP5rLUsrti7i2SvV9mqZSG7Eqt5+YvvP31zkDx22Jf LSBJJnMmFecMwC+2a+Y3NkgMJv9c9naX/lU+UwtfFa9QwvIyKz4UK0vfSDgze5wjU3JS AWvfuly9+XxKlhHf/rR7JyGcBPZqOxrwibSE920LB2AbisB2PQQdiy4dfXUwJSdzmGxo Y3cg3SblDAJptuZ6t2rIv7bQfX6JwlS/dGl+29lB2BPJS8eohEywWe2C4IuRlUordUb8 LW/1cGTe7F8KG7ZWA5+Og98uAvQqWqvE6VrPefCgQdL5yPcMGIIBaPM8sCIxNE8KwBg3 c8yw== X-Gm-Message-State: AMke39ldRKwKEjqJfLaKSVaa+044krENDmW4HY4BjWQjyFWcjznAmtaehyIBc7Cgt1JmDt545B3nyCiQQX8I5w== X-Received: by 10.157.37.26 with SMTP id k26mr18849583otb.149.1487869995096; Thu, 23 Feb 2017 09:13:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.88.138 with HTTP; Thu, 23 Feb 2017 09:13:14 -0800 (PST) In-Reply-To: <201702231530.v1NFULwx024028@repo.freebsd.org> References: <201702231530.v1NFULwx024028@repo.freebsd.org> From: Benjamin Kaduk Date: Thu, 23 Feb 2017 11:13:14 -0600 Message-ID: Subject: Re: svn commit: r314142 - head/sys/dev/ce To: "Pedro F. Giffuni" 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: Thu, 23 Feb 2017 17:13:16 -0000 On Thu, Feb 23, 2017 at 9:30 AM, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Feb 23 15:30:21 2017 > New Revision: 314142 > URL: https://svnweb.freebsd.org/changeset/base/314142 > > Log: > dev/ce: double assignment. > > The code is not operational right now so just comment away an obviously > useless assignment. Fix some typos while here. > > Found with: coccinelle (da.cocci) > > Modified: > head/sys/dev/ce/ceddk.c > > Modified: head/sys/dev/ce/ceddk.c > ============================================================ > ================== > --- head/sys/dev/ce/ceddk.c Thu Feb 23 15:10:46 2017 (r314141) > +++ head/sys/dev/ce/ceddk.c Thu Feb 23 15:30:21 2017 (r314142) > @@ -632,8 +632,8 @@ void ce_stop_chan (ce_chan_t *c) > "UserRequest (%s:%d)\n", __FUNCTION__, > __LINE__)); > return; > } > - req->Command = TAU32_Configure_Commit | > - TAU32_Tx_Stop | TAU32_Rx_Stop; > +// req->Command = TAU32_Configure_Commit | > +// TAU32_Tx_Stop | TAU32_Rx_Stop; > Should probably stick to C-style comments, though. -Ben From owner-svn-src-all@freebsd.org Thu Feb 23 17:15: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 5FE03CEBC45; Thu, 23 Feb 2017 17:15:28 +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 07EF9FDF; Thu, 23 Feb 2017 17:15:28 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id r18so947770wmd.3; Thu, 23 Feb 2017 09:15:27 -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=4zbtmG/Ipw49c+6wJzrhngpUIY9vgE5+w4masuPbzF8=; b=Sf7AROvpFQKYPSaY5SggwFQCeG3HfwyUbPXmQ8GZB3PmUg3N8cIFixXZn5uhTiWy4k ovaoEnZRLdPLNQWnarOEg+q/7m8Gw4r4GQxTKbzwbcmBWKayzAdUgao5M1XXoPpr3sEv dTILCtbUe6DZeIiUfgFzoK317ak0DEj0Z//50586zhip6xSiX7GlWzRo7klR9AsCZfnb ZGAdregrFpgkDoEWnlUHgp+FGksOORdI1INcckan4v7Tl7vw0VRkPEqujZU/Mla3C+hV J5TJk3bgC1eHI7tYWmywLOH6xtADqBelTRzRwUZXQC/KBYgdc0ankW8u4o+c8b3oQthk sfOQ== 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=4zbtmG/Ipw49c+6wJzrhngpUIY9vgE5+w4masuPbzF8=; b=iUjuY7mrXck/uzY1Jv8Pur6DHKEX5CkC6WsMSSZgVSVC/OWxkRqyoAA5rFU+yMha+N OQ5xt5xUxM4hw7t5coeOF1pCMT0PAd/Lfsp1Kaxsb83JEMIWBekbGX6ef9J2NIB/0sZC 68OckbIYybj+KgJSbw04jei3yUuQw7cAs9mwbEPKUJBW35lWmJAawsRaVFFbBlXSs5AR myQ5DB7GVgjoKwMMvVqEh+ljfbqtPNB8nKWqueC1KYghvrAATOszEXK7wE+Ud7coMEcJ HieJQPq+jeEr4IZp4IfDzJxD/JlZUfSmqGqJKLRw0UJf2YL6gNbFIbdviCFFTyCfheKH fiFw== X-Gm-Message-State: AMke39m8Tcixpu+a6u0uvEfoTY3gwCGNax0s8B/64eWhB0fuX9GCrKXAPTW0NVgekb5Umg== X-Received: by 10.28.19.78 with SMTP id 75mr6122402wmt.108.1487870126199; Thu, 23 Feb 2017 09:15:26 -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 r19sm6807669wrr.44.2017.02.23.09.15.25 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 23 Feb 2017 09:15:25 -0800 (PST) Date: Thu, 23 Feb 2017 18:15:23 +0100 From: Mateusz Guzik To: Gleb Smirnoff Cc: Mateusz Guzik , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r313996 - in head/sys: kern sys Message-ID: <20170223171523.GA5744@dft-labs.eu> References: <201702201908.v1KJ8aEE036715@repo.freebsd.org> <20170222230924.GI8899@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170222230924.GI8899@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: Thu, 23 Feb 2017 17:15:28 -0000 On Wed, Feb 22, 2017 at 03:09:24PM -0800, Gleb Smirnoff wrote: > Mateusz, > > why do you __predict_false() the recursion scenario? I'm afraid > that performance loss for mispredictions could outweight the > gain due to predictions. AFAIK, mutex recursion is still a pretty > common event in the kernel. > Do you mean spin mutexes or blocking ones sa well? For blocking mutexes, recursion almost never happens and I'm confident in the prediction to not do it. It may be there is a lock somewere which recurses a lot and its singlethreaded operation is harmed by the prediction. For such locks a separate wrappers shouldl be introduced which expect recursion to happen. For spin mutexes the above is almost correct. Most calls do the slow path to spin. There is an important lock which sometimes recurses (sched lock) but it is unclear if it got hurt by the change. Note that lock clean up is a work in progress. For spin mutexes I'm pondering revamping them a little - the inline path is extremelly long and already constains a function call to spinlock_enter/exit. So the plan would be to create a primitive with an inlined spinlock code to keep one call and reduce inline code. Finally, while mfcability of the work prevents riping out recursion support from the code, an additional set of primitives which expect recursion to happen can be introduced and used in places which do recurse. TL;DR I think the changes are a net win to spinlocks even if they recurse and will be a bigger win with coming cleanups. On the other hand if you profiled a regression with the above, I'm happy to unpredict the change. > On Mon, Feb 20, 2017 at 07:08:36PM +0000, Mateusz Guzik wrote: > M> Author: mjg > M> Date: Mon Feb 20 19:08:36 2017 > M> New Revision: 313996 > M> URL: https://svnweb.freebsd.org/changeset/base/313996 > M> > M> Log: > M> mtx: fix spin mutexes interaction with failed fcmpset > M> > M> While doing so move recursion support down to the fallback routine. > M> > M> Modified: > M> head/sys/kern/kern_mutex.c > M> head/sys/sys/mutex.h > M> > M> Modified: head/sys/kern/kern_mutex.c > M> ============================================================================== > M> --- head/sys/kern/kern_mutex.c Mon Feb 20 17:33:25 2017 (r313995) > M> +++ head/sys/kern/kern_mutex.c Mon Feb 20 19:08:36 2017 (r313996) > M> @@ -696,6 +696,14 @@ _mtx_lock_spin_cookie(volatile uintptr_t > M> lock_delay_arg_init(&lda, &mtx_spin_delay); > M> m = mtxlock2mtx(c); > M> > M> + if (__predict_false(v == MTX_UNOWNED)) > M> + v = MTX_READ_VALUE(m); > M> + > M> + if (__predict_false(v == tid)) { > M> + m->mtx_recurse++; > M> + return; > M> + } > M> + > M> if (LOCK_LOG_TEST(&m->lock_object, opts)) > M> CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); > M> KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), > M> > M> Modified: head/sys/sys/mutex.h > M> ============================================================================== > M> --- head/sys/sys/mutex.h Mon Feb 20 17:33:25 2017 (r313995) > M> +++ head/sys/sys/mutex.h Mon Feb 20 19:08:36 2017 (r313996) > M> @@ -223,12 +223,9 @@ void thread_lock_flags_(struct thread *, > M> uintptr_t _v = MTX_UNOWNED; \ > M> \ > M> spinlock_enter(); \ > M> - if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) { \ > M> - if (_v == _tid) \ > M> - (mp)->mtx_recurse++; \ > M> - else \ > M> - _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line));\ > M> - } else \ > M> + if (!_mtx_obtain_lock_fetch((mp), &_v, _tid)) \ > M> + _mtx_lock_spin((mp), _v, _tid, (opts), (file), (line)); \ > M> + else \ > M> LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ > M> mp, 0, 0, file, line); \ > M> } while (0) > M> _______________________________________________ > M> svn-src-all@freebsd.org mailing list > M> https://lists.freebsd.org/mailman/listinfo/svn-src-all > M> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > -- > Totus tuus, Glebius. > _______________________________________________ > 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 Thu Feb 23 17:32: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 37B43CEBFC5; Thu, 23 Feb 2017 17:32:25 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::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 D53BB190E; Thu, 23 Feb 2017 17:32:24 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr0-x244.google.com with SMTP id z61so4644370wrc.3; Thu, 23 Feb 2017 09:32:24 -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=f2VMB1oMmJ7UhCmZNL8czgD+eFYaWwGL6Sj1YJ6hxJs=; b=hKxvbCWojkg5Dn7B3XAwdwp9F3bSKD6nINToD049WoIpcMc77nirITLymFqxkBZDfN etCAjrmRzrVsr/tHmRak5mgbAoI+SEF86eNKHQSz6JqF3nFc3QInd5YNNMKchkelT+m5 YoAdbVRV7wDfQ/N114W0I5XQ4C5/Q0OX4fZdoCPQDI4aSAaINhKE4fKNJIx7na74zqet 4efnAsC9oc/CyOWF3SCYYAUtLCTQQDcGTWn7OTcxvMGLmx3EaOHuupM0F/MaRGrBFuQU Hg7PcDd6TLaov8ncHvk1Gs3UAANlUB1N7UNaBLvCBJfwtCKx6qHmSOVeJtXpN7sq7+R5 QLKw== 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=f2VMB1oMmJ7UhCmZNL8czgD+eFYaWwGL6Sj1YJ6hxJs=; b=N/uOOut6NHkqcHahUaOFPQDV3//JIFP8ly33Sru2rwUNvibKwHmpNmnh0hSS/BJFBq KHWa3HpxvwlpkAey3Ir1sX/fYio/MDOEIagB4qwBT3SnAmVSg/4ZdR3u+ZzaV4q2EzfK BPTU3fZVynl92Ot78iTKbvZ5rvse3gseNX77Z8zzF3SdwEip3x6o/RfppfJFQsy0FwHi hiFnwdASsG0kjtJ/Cx13pOkD4pbQr4i9AWBNWf8S3XDFXsvPJ5P2gVzVHDbAo+A2uEld g+kcDMn/lVPh0QaMzKAn4UaV9CYBCa8c/lWlLZlD9iu2Ir3UwruZP1haqiSGGclIsbaO XBcQ== X-Gm-Message-State: AMke39lmPkSPqeRkTfR4ixFjS3rb5aZa/+KmQATwq/jhTprNUH8CtN52fo/3q2iFP0XotQ== X-Received: by 10.223.177.142 with SMTP id q14mr28805544wra.194.1487871141204; Thu, 23 Feb 2017 09:32:21 -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 z80sm6920852wrc.24.2017.02.23.09.32.20 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 23 Feb 2017 09:32:20 -0800 (PST) Date: Thu, 23 Feb 2017 18:32:18 +0100 From: Mateusz Guzik To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314142 - head/sys/dev/ce Message-ID: <20170223173218.GB5744@dft-labs.eu> References: <201702231530.v1NFULwx024028@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702231530.v1NFULwx024028@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: Thu, 23 Feb 2017 17:32:25 -0000 On Thu, Feb 23, 2017 at 03:30:21PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Feb 23 15:30:21 2017 > New Revision: 314142 > URL: https://svnweb.freebsd.org/changeset/base/314142 > > Log: > dev/ce: double assignment. > > The code is not operational right now so just comment away an obviously > useless assignment. Fix some typos while here. > > > - /* XXXRIK: This function should be for comleteness, but for now I > - * don't use it. So I just start to write and didn't finished it yet. > - * It and it is VERY BUGGY!!! Do not use it. If you really > - * need it ask me to fix it or rewrite it by your self. > + /* XXXRIK: This function should be for completeness, but for now I > + * don't use it. I just started to write and haven't finished it yet. > + * It is VERY BUGGY!!! Do not use it. If you really need > + * it ask me to fix it or rewrite it by yourself. > * Note: most buggy part of it in ce_on_config_stop! > */ Please don't fix typos etc. unless they seriouslyl harm readability. Changes of this sort make it harder to svn blame. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Thu Feb 23 17:44: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 5E69ECEB1DC; Thu, 23 Feb 2017 17:44: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 2E0921F8B; Thu, 23 Feb 2017 17:44: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 v1NHi6Nt083003; Thu, 23 Feb 2017 17:44:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NHi6iv083002; Thu, 23 Feb 2017 17:44:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702231744.v1NHi6iv083002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 23 Feb 2017 17:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314151 - head/sys/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: Thu, 23 Feb 2017 17:44:07 -0000 Author: ngie Date: Thu Feb 23 17:44:06 2017 New Revision: 314151 URL: https://svnweb.freebsd.org/changeset/base/314151 Log: Unbreak if_iwm.ko after r314076 Add if_iwm_7000.c/if_iwm_8000.c to SRCS to match similar additions made to sys/conf/files after refactoring done in the commit noted. PR: 217308 Pointyhat to: adrian Submitted by: Andreas Nilsson Reported by: Jakob Alvermark , Juan Ramómon Molina Menor Sponsored by: Dell EMC Isilon Modified: head/sys/modules/iwm/Makefile Modified: head/sys/modules/iwm/Makefile ============================================================================== --- head/sys/modules/iwm/Makefile Thu Feb 23 16:54:30 2017 (r314150) +++ head/sys/modules/iwm/Makefile Thu Feb 23 17:44:06 2017 (r314151) @@ -7,6 +7,7 @@ KMOD= if_iwm 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 if_iwm_notif_wait.c +SRCS+= if_iwm_7000.c if_iwm_8000.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 Thu Feb 23 17:46: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 32167CEB2F4 for ; Thu, 23 Feb 2017 17:46:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm10-vm2.bullet.mail.ne1.yahoo.com (nm10-vm2.bullet.mail.ne1.yahoo.com [98.138.90.158]) (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 03F3623B for ; Thu, 23 Feb 2017 17:46:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487871980; bh=TLysBI1XhbudB7XPzv/toIR0YgMxnsnBUFWqw5dv7YY=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=kk1bo45Mmfz0FjhmdkwIOJO4BvGUZ1KH/pDfcg+R60W6wPfiFD1B7ZblTGnVilUaq2GEMEB2a4ApAn71ozIVH6asKvEGOE5LMJdcQmQvF4xoEl/NJLcvF4lKw3fPUMiAMdm8qfHwhA3EpfqMQ/JJXeJ0CEEKdvrFuzXnZke/AOm93Mx/JKv/6xDQjaZ/GWPSok9SrN9ls5I+HxwePh4ZZZOQ6O6Kz9BCftdYxCZN8rlFERWOg8GB6+9F7PkxsmOubKSX9EW3DejSWcCwqM0Z6NAbtb1CWeI4e7HMXDpCxY4ol8rBPgFQJWKXPi7QCvUBwGiVKhYzaPnk3ds+XxiIMg== Received: from [98.138.100.116] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 23 Feb 2017 17:46:20 -0000 Received: from [98.138.84.37] by tm107.bullet.mail.ne1.yahoo.com with NNFMP; 23 Feb 2017 17:46:20 -0000 Received: from [127.0.0.1] by smtp105.mail.ne1.yahoo.com with NNFMP; 23 Feb 2017 17:46:20 -0000 X-Yahoo-Newman-Id: 905926.17662.bm@smtp105.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: vBxXYdIVM1l1_vOL.memx1Kned1iobPeCSwLHpkDNZPRe_U 6KtNNI3BTUU_d4CimdbY05ES6YVfD1RC2iO_rp7ypJYQT2T9ByLQYgU5JEYd cIA4IA5v3vbpHoreENavUi2bljvhna2YL.kwyPTqHfAHicLg.XcEGuPMwv3Y DKd4MSqvIUl.AIbgsCUXy0l.b0WaTLiGUaCA5JJgcxADdRnwlnjznaE2ig3Y GK3A5Ybmoe0cjHroNpXWSzJ2y8bWQetMPeVtRT2gDtSWzzCbE.8IRGoOQEsY 9n94cEZs4Fu5oFGarvQ4dNldHsKacKtTPIj25lvUgHOkW6sO5RGWmLpPKDUP vvBiUgsjucMElwZ0QLKqEQ.Y1H8icnQgP_sMtJjGB0.cbunSXjUSQ27ss7R9 vFf17UGR2yGwynlWmuR.jO1Ct000NGqR8iAbcjg_.EUZhO9SUigb3Ha5Gkri fBjHNNgpFSP3F6aQ6jj2hEvhkgZyolORbUIcho0Xt.o6pm_xBudFNht6jc5H h6va1hRyPoentOG1cZDUhuGSFidppLYJdA6.Cm60fH9YJsSs- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r314142 - head/sys/dev/ce To: Benjamin Kaduk References: <201702231530.v1NFULwx024028@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Message-ID: Date: Thu, 23 Feb 2017 12:49:01 -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: 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: Thu, 23 Feb 2017 17:46:28 -0000 On 2/23/2017 12:13 PM, Benjamin Kaduk wrote: > On Thu, Feb 23, 2017 at 9:30 AM, Pedro F. Giffuni > wrote: > > Author: pfg > Date: Thu Feb 23 15:30:21 2017 > New Revision: 314142 > URL: https://svnweb.freebsd.org/changeset/base/314142 > > > Log: > dev/ce: double assignment. > > The code is not operational right now so just comment away an > obviously > useless assignment. Fix some typos while here. > > Found with: coccinelle (da.cocci) > > Modified: > head/sys/dev/ce/ceddk.c > > Modified: head/sys/dev/ce/ceddk.c > ============================================================================== > --- head/sys/dev/ce/ceddk.c Thu Feb 23 15:10:46 2017 > (r314141) > +++ head/sys/dev/ce/ceddk.c Thu Feb 23 15:30:21 2017 > (r314142) > @@ -632,8 +632,8 @@ void ce_stop_chan (ce_chan_t *c) > "UserRequest (%s:%d)\n", > __FUNCTION__, __LINE__)); > return; > } > - req->Command = TAU32_Configure_Commit | > - TAU32_Tx_Stop | TAU32_Rx_Stop; > +// req->Command = TAU32_Configure_Commit | > +// TAU32_Tx_Stop | TAU32_Rx_Stop; > > > Should probably stick to C-style comments, though. > They are valid C99 comments but I understand what you mean, OTOH, the code block appears to be so broken, that it doesn't matter. Pedro. > -Ben From owner-svn-src-all@freebsd.org Thu Feb 23 17:46: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 823C0CEB36B; Thu, 23 Feb 2017 17:46:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51150326; Thu, 23 Feb 2017 17:46:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NHkcON083162; Thu, 23 Feb 2017 17:46:38 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NHkckJ083161; Thu, 23 Feb 2017 17:46:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702231746.v1NHkckJ083161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 23 Feb 2017 17:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314152 - head/lib/libcompiler_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, 23 Feb 2017 17:46:39 -0000 Author: jkim Date: Thu Feb 23 17:46:38 2017 New Revision: 314152 URL: https://svnweb.freebsd.org/changeset/base/314152 Log: Remove an assembler flag, which is redundant since r309124. The upstream took care of it by introducing a macro NO_EXEC_STACK_DIRECTIVE. http://llvm.org/viewvc/llvm-project?rev=273500&view=rev Reviewed by: dim Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Thu Feb 23 17:44:06 2017 (r314151) +++ head/lib/libcompiler_rt/Makefile Thu Feb 23 17:46:38 2017 (r314152) @@ -25,10 +25,4 @@ SYMLINKS+= libcompiler_rt.a ${LIBDIR}/li SYMLINKS+= libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ - ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv6*} -AFLAGS+= --noexecstack -ACFLAGS+= -Wa,--noexecstack -.endif - .include From owner-svn-src-all@freebsd.org Thu Feb 23 17: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 E3CE3CEB3F7; Thu, 23 Feb 2017 17:47:15 +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 ACF6D791; Thu, 23 Feb 2017 17:47:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id o64so1898740pfb.1; Thu, 23 Feb 2017 09:47:15 -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=9dZukQV4jb041jkoFQF5I9b9+bvVMHAef0ap9f8fP9s=; b=EzGZ1M+zL2XabKfXEkjXBJbdIIh/WpnRfbpQ1qvUOv/yz1njkPxDaxlhPWbNzbtGlt Bo25bSbJUYW9kHAAdnzQLIZQ3j5c93ZNltFHLuDzHwmFFxr8xZegNB77GO6VI/QYsTC0 Thy/nm33P693w0eMgugZvdQnkTTJrSOCy3XV/wedzizeYPsWEGAUDT+bVohPYzB1+nwk ny1ILGmc6WycIMSnVtZHUaBV8dyN1uegKa9hbkjnGyK/m6bBP8PWxD4vlB9k7D8JMKd1 GoW0Y7JouqDRyWoVPnf1a8p0yxiMKh7FQiuGsEV2E86tOBHGfg8GpjS/oVaiL1minBcI l4jA== 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=9dZukQV4jb041jkoFQF5I9b9+bvVMHAef0ap9f8fP9s=; b=ZAj5p92uBxbxSSoPNnESiU8g2qKw6YW0ZHSNp8GJBBnirLC7sBBFuGfF0p0TZt2De7 nSgrgTUorQKfGU2ApE34mgbBDfA2lO2TL0WX2ZRLYG8jU0ZwH/0AkFfo4QW/j8rPMt73 TRW9RlMbXTHyRsebLpUZPsi46TxBx4iTV9uCXoUgeO8LQjrZAS3cu2jYy2cNu87is49Q mg89mIYRRu556lc19xGgp8Kvvd7lqaKnSoQL4GqF6E2tgfro2g0hfB/KZboLqsAZpifL jT6xqH42ovOc8dyM+IsBJ5K+wo+ddVCrPGIzK2Lfls5PCTDKzy69jrRE/canepej2vkU UDLw== X-Gm-Message-State: AMke39lR5uuO0JgovG7jss/8AOYJ2hX0M86ultXcNHrpdAieue4rkkuVqXdq/DXzRn6dcQ== X-Received: by 10.98.138.202 with SMTP id o71mr9570316pfk.70.1487872034823; Thu, 23 Feb 2017 09:47:14 -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 s5sm11010355pgc.57.2017.02.23.09.47.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Feb 2017 09:47:14 -0800 (PST) Subject: Re: svn commit: r314151 - head/sys/modules/iwm Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3E786FC4-F124-4AC1-B90F-34B400869E90"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702231744.v1NHi6iv083002@repo.freebsd.org> Date: Thu, 23 Feb 2017 09:47:12 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702231744.v1NHi6iv083002@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: Thu, 23 Feb 2017 17:47:16 -0000 --Apple-Mail=_3E786FC4-F124-4AC1-B90F-34B400869E90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 23, 2017, at 09:44, Ngie Cooper wrote: >=20 > Author: ngie > Date: Thu Feb 23 17:44:06 2017 > New Revision: 314151 > URL: https://svnweb.freebsd.org/changeset/base/314151 >=20 > Log: > Unbreak if_iwm.ko after r314076 >=20 > Add if_iwm_7000.c/if_iwm_8000.c to SRCS to match similar additions = made > to sys/conf/files after refactoring done in the commit noted. >=20 > PR: 217308 > Pointyhat to: adrian > Submitted by: Andreas Nilsson > Reported by: Jakob Alvermark , Juan Ram=C3=B3mon = Molina Menor Ugh=E2=80=A6 that didn=E2=80=99t come out as expected after the UTF-8 = conversion >_>... --Apple-Mail=_3E786FC4-F124-4AC1-B90F-34B400869E90 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 iQIcBAEBCgAGBQJYryAhAAoJEPWDqSZpMIYVR/EP/i63laob4Qgt7P1+qY+nkIDe jyGT7cl+0ASUGeFud3dlAqITWFcrrW0IQoMwxT+EaHia2ZMnUoIH4ohKJwXEmPsK nq2mFEVOKnJ4L/lwuhRkcaQxFRdu1QX6PlS/mG5RUcN6FpGWGQUvycQ1iG8IfsrO CEJIgHBShrgKvPq5TJf6ok3JZpqHGht9WP/J0e+aOlWI57x+wd4f0OF3gQejtT7j F1TANVeCTpH5vAeHUtmelWDo3UByVt6MYoIw8EhCZcOCHQdQR7XaHW0W3PNTaq9B lyiS7KWOsKzohRcznww+QHwxFkP0CQdQbv9IS+WopDnOPwZoqZrhFXxO4WaJBhYc KuWrq/VaVfzZeZb6z6B8F0A9lugP7FzqkukNrTuYQWCdjAmI8VxYqj6IDhJvXVFW 5FYsDeFMug5gqT0tmumnMPI9nqAONs43Oedvhvzkf23vpmWVcOkA6bkF6frlbiPd znu2/2syV+AFh4AimmYS7YhyheP9Rjtc3qka/R5VDrLwIjweztNXzYQIJmQvSIM2 opXgJnb8H/JKd2PCiVDGmiFvZemECcy2n0wbT3N+YHQKO4dgdyz5j9fY+wCNYk+w 7n/8PRelqOFD2qw9pODyVYULFqAL2WjCrTipdkWwtjYX3LAUKkWMO3DYhbz/4Opt n33dGU/laf9+6fB5GwWD =ri8H -----END PGP SIGNATURE----- --Apple-Mail=_3E786FC4-F124-4AC1-B90F-34B400869E90-- From owner-svn-src-all@freebsd.org Thu Feb 23 17: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 D383FCEB5D3; Thu, 23 Feb 2017 17:54:18 +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 95B0ABB8; Thu, 23 Feb 2017 17:54:18 +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 v1NHsHc4087308; Thu, 23 Feb 2017 17:54:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NHsHkt087307; Thu, 23 Feb 2017 17:54:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702231754.v1NHsHkt087307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 23 Feb 2017 17:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314153 - head/cddl/contrib/opensolaris/lib/libctf/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: Thu, 23 Feb 2017 17:54:18 -0000 Author: markj Date: Thu Feb 23 17:54:17 2017 New Revision: 314153 URL: https://svnweb.freebsd.org/changeset/base/314153 Log: Fix a memory leak in an error case in libctf. Submitted by: Tom Rix MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Modified: head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Thu Feb 23 17:46:38 2017 (r314152) +++ head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Thu Feb 23 17:54:17 2017 (r314153) @@ -346,6 +346,7 @@ ctf_fdopen(int fd, int *errp) if ((sp32 = malloc(nbytes)) == NULL || pread64(fd, sp32, nbytes, hdr.e64.e_shoff) != nbytes) { free(sp); + free(sp32); return (ctf_set_open_errno(errp, errno)); } From owner-svn-src-all@freebsd.org Thu Feb 23 17:56: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 4FD73CEB65F; Thu, 23 Feb 2017 17:56:26 +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 03CA2D3E; Thu, 23 Feb 2017 17:56:25 +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 v1NHuPVw087456; Thu, 23 Feb 2017 17:56:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NHuP7w087454; Thu, 23 Feb 2017 17:56:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702231756.v1NHuP7w087454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 23 Feb 2017 17:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314154 - 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: Thu, 23 Feb 2017 17:56:26 -0000 Author: markj Date: Thu Feb 23 17:56:24 2017 New Revision: 314154 URL: https://svnweb.freebsd.org/changeset/base/314154 Log: Fix memory leaks in error cases in libdtrace. Submitted by: Tom Rix MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9705 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Feb 23 17:54:17 2017 (r314153) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Feb 23 17:56:24 2017 (r314154) @@ -931,9 +931,11 @@ dt_provmod_open(dt_provmod_t **provmod, * reallocate it. We normally won't need to do this * because providers aren't being loaded all the time. */ - if ((p = realloc(p_providers,len)) == NULL) + if ((p = realloc(p_providers,len)) == NULL) { + free(p_providers); /* How do we report errors here? */ return; + } p_providers = p; } else break; @@ -1148,8 +1150,10 @@ dt_vopen(int version, int flags, int *er (void) fcntl(ftfd, F_SETFD, FD_CLOEXEC); alloc: - if ((dtp = malloc(sizeof (dtrace_hdl_t))) == NULL) + if ((dtp = malloc(sizeof (dtrace_hdl_t))) == NULL) { + dt_provmod_destroy(&provmod); return (set_open_errno(dtp, errp, EDT_NOMEM)); + } bzero(dtp, sizeof (dtrace_hdl_t)); dtp->dt_oflags = flags; Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Thu Feb 23 17:54:17 2017 (r314153) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Thu Feb 23 17:56:24 2017 (r314154) @@ -256,8 +256,10 @@ dt_strtab_insert(dt_strtab_t *sp, const * Now copy the string data into our buffer list, and then update * the global counts of strings and bytes. Return str's byte offset. */ - if (dt_strtab_copyin(sp, str, len + 1) == -1) + if (dt_strtab_copyin(sp, str, len + 1) == -1) { + free(hp); return (-1L); + } sp->str_nstrs++; sp->str_size += len + 1; From owner-svn-src-all@freebsd.org Thu Feb 23 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 B10CECEB735; Thu, 23 Feb 2017 17:58:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d: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 6AF0910DA; Thu, 23 Feb 2017 17:58:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x244.google.com with SMTP id x71so5802066qkb.0; Thu, 23 Feb 2017 09:58:38 -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=W7nL286RkDfBJcTXWV9CBC93E0d9oU27pPf7jAlJtuE=; b=FDZSG9CfKtKsdnTdhvIQhccv5b/hatfUYhgCUOs3+uTgF6fXxRKOlm/QmsMsqd9F0J fEoMFNMzlAa2m2rbZPWjLd1b6c24cHVwL2kA68Daj+L9PiDyQ7z4X1ImsDdWPNe2Xrdg Q6Kx4F0GS5xOQaColtdkYiDQCfl8YdxqFfkrsgGeSLWIaCAXIRu5dplqacG5oPJkZ5Sw OM7/dE83TKI0gYda+77/ZS1fhn6ymoOPjPmDPVtJ36N9Zduc9NdypDaEANoc/ITmZukB yIn3uSjIiDXbQYTCarqhAXqC59aoYyTMZ40btrnl5l0sNIrbt+X+NEIAw+1thcVRwfO9 BtIQ== 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=W7nL286RkDfBJcTXWV9CBC93E0d9oU27pPf7jAlJtuE=; b=cT1CsfB+Ry/0NOKWaNYTDRqu3SQYBcQ4P8gSc5SkU3e7F594W7ML/houjXXFMwSKRi +Xv159YFfYw0faKnBBZK7RwM7JYjBqMTqjXcG6X4fmbcmC+p+BaH7CQbsrL2SMOpvzid IKfNecuEOWh7dgMznMwlQAcdGYVoU2Hx2C3ItTMr0bSiiE8lJ+8AF0MSox689qkjkFs7 HXowpg0ZCCpwxu4h9eci8nrOMUa9LXGdw73gfgCICE+tZXKfTxFxJgoDMAorOMMALXbk C+5SiNH/r0A3zNgPCOp62jdRCM2jN9FDHzVKEcvZog/1BGLwk/tLJnK1VbhmDqoosGvg vCmg== X-Gm-Message-State: AMke39mYPWxc7JN36QxjVoSbTK6Rm4PEf/ohuAfM8d9dhKEWXX65XHrGfbbrzVR4nlZArw== X-Received: by 10.55.143.197 with SMTP id r188mr5736986qkd.129.1487872717492; Thu, 23 Feb 2017 09:58:37 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id o16sm3097794qkl.67.2017.02.23.09.58.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Feb 2017 09:58:36 -0800 (PST) Sender: Mark Johnston Date: Thu, 23 Feb 2017 10:06:03 -0800 From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: trix@juniper.net Subject: Re: svn commit: r314153 - head/cddl/contrib/opensolaris/lib/libctf/common Message-ID: <20170223180603.GA95319@wkstn-mjohnston.west.isilon.com> References: <201702231754.v1NHsHkt087307@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702231754.v1NHsHkt087307@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: Thu, 23 Feb 2017 17:58:38 -0000 On Thu, Feb 23, 2017 at 05:54:17PM +0000, Mark Johnston wrote: > Author: markj > Date: Thu Feb 23 17:54:17 2017 > New Revision: 314153 > URL: https://svnweb.freebsd.org/changeset/base/314153 > > Log: > Fix a memory leak in an error case in libctf. > > Submitted by: Tom Rix > MFC after: 1 week Sorry, I accidentally omitted: Differential Revision: https://reviews.freebsd.org/D9767 From owner-svn-src-all@freebsd.org Thu Feb 23 18:14: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 BC2B6CEBA3F; Thu, 23 Feb 2017 18:14:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E44E195F; Thu, 23 Feb 2017 18:14:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NIEaJU095398; Thu, 23 Feb 2017 18:14:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NIEahd095397; Thu, 23 Feb 2017 18:14:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201702231814.v1NIEahd095397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 23 Feb 2017 18:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314155 - 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: Thu, 23 Feb 2017 18:14:37 -0000 Author: tuexen Date: Thu Feb 23 18:14:36 2017 New Revision: 314155 URL: https://svnweb.freebsd.org/changeset/base/314155 Log: TCP window updates are only sent if the window can be increased by at least 2 * MSS. However, if the receive buffer size is small, this might be impossible. Add back a criterion to send a TCP window update if the window can be increased by at least half of the receive buffer size. This condition was removed in r242252. This patch simply brings it back. PR: 211003 Reviewed by: gnn MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D9475 Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Feb 23 17:56:24 2017 (r314154) +++ head/sys/netinet/tcp_output.c Thu Feb 23 18:14:36 2017 (r314155) @@ -696,6 +696,8 @@ after_sack_rexmit: recwin <= (so->so_rcv.sb_hiwat / 8) || so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg)) goto send; + if (2 * adv >= (int32_t)so->so_rcv.sb_hiwat) + goto send; } dontupdate: From owner-svn-src-all@freebsd.org Thu Feb 23 18:15: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 1FAA7CEBA88; Thu, 23 Feb 2017 18:15: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 E113E1ADC; Thu, 23 Feb 2017 18:15:05 +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 v1NIF53D095484; Thu, 23 Feb 2017 18:15:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NIF5g4095483; Thu, 23 Feb 2017 18:15:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231815.v1NIF5g4095483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 18:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314156 - 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, 23 Feb 2017 18:15:06 -0000 Author: pfg Date: Thu Feb 23 18:15:04 2017 New Revision: 314156 URL: https://svnweb.freebsd.org/changeset/base/314156 Log: rt_attach(): double assignment. Found with: coccinelle (da.cocci) Modified: head/sys/dev/rt/if_rt.c Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Thu Feb 23 18:14:36 2017 (r314155) +++ head/sys/dev/rt/if_rt.c Thu Feb 23 18:15:04 2017 (r314156) @@ -438,7 +438,6 @@ rt_attach(device_t dev) sc->fe_int_status=GE_PORT_BASE+FE_INT_STATUS; sc->fe_int_enable=GE_PORT_BASE+FE_INT_ENABLE; sc->pdma_glo_cfg=PDMA_BASE+PDMA_GLO_CFG; - sc->pdma_glo_cfg=PDMA_BASE+PDMA_GLO_CFG; sc->pdma_rst_idx=PDMA_BASE+PDMA_RST_IDX; for (i = 0; i < RT_SOFTC_TX_RING_COUNT; i++) { sc->tx_base_ptr[i]=PDMA_BASE+TX_BASE_PTR(i); From owner-svn-src-all@freebsd.org Thu Feb 23 18:30: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 A1B63CEBCB9; Thu, 23 Feb 2017 18:30:13 +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 7FA94698; Thu, 23 Feb 2017 18:30: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 B87A910A7B9; Thu, 23 Feb 2017 13:30:05 -0500 (EST) From: John Baldwin To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314145 - in head/sys/dev/vxge: . vxgehal Date: Thu, 23 Feb 2017 10:16:50 -0800 Message-ID: <114455088.Nuga6bxpH7@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702231610.v1NGAGOK040762@repo.freebsd.org> References: <201702231610.v1NGAGOK040762@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); Thu, 23 Feb 2017 13:30:05 -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: Thu, 23 Feb 2017 18:30:13 -0000 On Thursday, February 23, 2017 04:10:16 PM Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Feb 23 16:10:15 2017 > New Revision: 314145 > URL: https://svnweb.freebsd.org/changeset/base/314145 > > Log: > dev/vxe: double assignments. > > Fix some suspicious code, likely caused by excessive copy-pasting. > > Found with: coccinelle (da.cocci) > MFC after: 2 weeks > > Modified: > head/sys/dev/vxge/vxge.c > head/sys/dev/vxge/vxgehal/vxgehal-config.c > > Modified: head/sys/dev/vxge/vxge.c > ============================================================================== > --- head/sys/dev/vxge/vxge.c Thu Feb 23 16:07:45 2017 (r314144) > +++ head/sys/dev/vxge/vxge.c Thu Feb 23 16:10:15 2017 (r314145) > @@ -2312,7 +2312,7 @@ vxge_vpath_open(vxge_dev_t *vdev) > vpath->rx_ticks = ticks; > > vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; > - vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; > + vpath->rti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; Probably use VXGE_DEFAULT_TI_RTIMER_VAL instead of TI? -- John Baldwin From owner-svn-src-all@freebsd.org Thu Feb 23 18:54: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 C0979CE9177; Thu, 23 Feb 2017 18:54:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80C901263; Thu, 23 Feb 2017 18:54:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NIsY28011639; Thu, 23 Feb 2017 18:54:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NIsYhg011633; Thu, 23 Feb 2017 18:54:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702231854.v1NIsYhg011633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 18:54: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: r314157 - stable/10/lib/libmd 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, 23 Feb 2017 18:54:35 -0000 Author: avg Date: Thu Feb 23 18:54:33 2017 New Revision: 314157 URL: https://svnweb.freebsd.org/changeset/base/314157 Log: MFC r282736: Unbreak build following rev. 282726 (MFC-ed as r314144) Modified: stable/10/lib/libmd/md4.h stable/10/lib/libmd/md5.h stable/10/lib/libmd/ripemd.h stable/10/lib/libmd/sha.h stable/10/lib/libmd/sha256.h stable/10/lib/libmd/sha512.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmd/md4.h ============================================================================== --- stable/10/lib/libmd/md4.h Thu Feb 23 18:15:04 2017 (r314156) +++ stable/10/lib/libmd/md4.h Thu Feb 23 18:54:33 2017 (r314157) @@ -38,14 +38,30 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef MD4Init #define MD4Init _libmd_MD4Init +#endif +#ifndef MD4Update #define MD4Update _libmd_MD4Update +#endif +#ifndef MD4Pad #define MD4Pad _libmd_MD4Pad +#endif +#ifndef MD4Final #define MD4Final _libmd_MD4Final +#endif +#ifndef MD4End #define MD4End _libmd_MD4End +#endif +#ifndef MD4File #define MD4File _libmd_MD4File +#endif +#ifndef MD4FileChunk #define MD4FileChunk _libmd_MD4FileChunk +#endif +#ifndef MD4Data #define MD4Data _libmd_MD4Data +#endif void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const void *, unsigned int); Modified: stable/10/lib/libmd/md5.h ============================================================================== --- stable/10/lib/libmd/md5.h Thu Feb 23 18:15:04 2017 (r314156) +++ stable/10/lib/libmd/md5.h Thu Feb 23 18:54:33 2017 (r314157) @@ -7,15 +7,33 @@ /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef MD5Init #define MD5Init _libmd_MD5Init +#endif +#ifndef MD5Update #define MD5Update _libmd_MD5Update +#endif +#ifndef MD5Pad #define MD5Pad _libmd_MD5Pad +#endif +#ifndef MD5Final #define MD5Final _libmd_MD5Final +#endif +#ifndef MD5Transform #define MD5Transform _libmd_MD5Transform +#endif +#ifndef MD5End #define MD5End _libmd_MD5End +#endif +#ifndef MD5File #define MD5File _libmd_MD5File +#endif +#ifndef MD5FileChunk #define MD5FileChunk _libmd_MD5FileChunk +#endif +#ifndef MD5Data #define MD5Data _libmd_MD5Data +#endif #endif Modified: stable/10/lib/libmd/ripemd.h ============================================================================== --- stable/10/lib/libmd/ripemd.h Thu Feb 23 18:15:04 2017 (r314156) +++ stable/10/lib/libmd/ripemd.h Thu Feb 23 18:54:33 2017 (r314157) @@ -84,17 +84,37 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef RIPEMD160_Init #define RIPEMD160_Init _libmd_RIPEMD160_Init +#endif +#ifndef RIPEMD160_Update #define RIPEMD160_Update _libmd_RIPEMD160_Update +#endif +#ifndef RIPEMD160_Final #define RIPEMD160_Final _libmd_RIPEMD160_Final +#endif +#ifndef RIPEMD160_End #define RIPEMD160_End _libmd_RIPEMD160_End +#endif +#ifndef RIPEMD160_File #define RIPEMD160_File _libmd_RIPEMD160_File +#endif +#ifndef RIPEMD160_FileChunk #define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk +#endif +#ifndef RIPEMD160_Data #define RIPEMD160_Data _libmd_RIPEMD160_Data +#endif +#ifndef RIPEMD160_Transform #define RIPEMD160_Transform _libmd_RIPEMD160_Transform +#endif +#ifndef RMD160_version #define RMD160_version _libmd_RMD160_version +#endif +#ifndef ripemd160_block #define ripemd160_block _libmd_ripemd160_block +#endif void RIPEMD160_Init(RIPEMD160_CTX *c); void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, Modified: stable/10/lib/libmd/sha.h ============================================================================== --- stable/10/lib/libmd/sha.h Thu Feb 23 18:15:04 2017 (r314156) +++ stable/10/lib/libmd/sha.h Thu Feb 23 18:54:33 2017 (r314157) @@ -82,29 +82,69 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA_Init #define SHA_Init _libmd_SHA_Init +#endif +#ifndef SHA_Update #define SHA_Update _libmd_SHA_Update +#endif +#ifndef SHA_Final #define SHA_Final _libmd_SHA_Final +#endif +#ifndef SHA_End #define SHA_End _libmd_SHA_End +#endif +#ifndef SHA_File #define SHA_File _libmd_SHA_File +#endif +#ifndef SHA_FileChunk #define SHA_FileChunk _libmd_SHA_FileChunk +#endif +#ifndef SHA_Data #define SHA_Data _libmd_SHA_Data +#endif +#ifndef SHA_Transform #define SHA_Transform _libmd_SHA_Transform +#endif +#ifndef SHA_version #define SHA_version _libmd_SHA_version +#endif +#ifndef sha_block #define sha_block _libmd_sha_block +#endif +#ifndef SHA1_Init #define SHA1_Init _libmd_SHA1_Init +#endif +#ifndef SHA1_Update #define SHA1_Update _libmd_SHA1_Update +#endif +#ifndef SHA1_Final #define SHA1_Final _libmd_SHA1_Final +#endif +#ifndef SHA1_End #define SHA1_End _libmd_SHA1_End +#endif +#ifndef SHA1_File #define SHA1_File _libmd_SHA1_File +#endif +#ifndef SHA1_FileChunk #define SHA1_FileChunk _libmd_SHA1_FileChunk +#endif +#ifndef SHA1_Data #define SHA1_Data _libmd_SHA1_Data +#endif +#ifndef SHA1_Transform #define SHA1_Transform _libmd_SHA1_Transform +#endif +#ifndef SHA1_version #define SHA1_version _libmd_SHA1_version +#endif +#ifndef sha1_block #define sha1_block _libmd_sha1_block +#endif void SHA_Init(SHA_CTX *c); void SHA_Update(SHA_CTX *c, const void *data, size_t len); Modified: stable/10/lib/libmd/sha256.h ============================================================================== --- stable/10/lib/libmd/sha256.h Thu Feb 23 18:15:04 2017 (r314156) +++ stable/10/lib/libmd/sha256.h Thu Feb 23 18:54:33 2017 (r314157) @@ -41,16 +41,34 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA256_Init #define SHA256_Init _libmd_SHA256_Init +#endif +#ifndef SHA256_Update #define SHA256_Update _libmd_SHA256_Update +#endif +#ifndef SHA256_Final #define SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End #define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File #define SHA256_File _libmd_SHA256_File +#endif +#ifndef SHA256_FileChunk #define SHA256_FileChunk _libmd_SHA256_FileChunk +#endif +#ifndef SHA256_Data #define SHA256_Data _libmd_SHA256_Data +#endif +#ifndef SHA256_Transform #define SHA256_Transform _libmd_SHA256_Transform +#endif +#ifndef SHA256_version #define SHA256_version _libmd_SHA256_version +#endif void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); Modified: stable/10/lib/libmd/sha512.h ============================================================================== --- stable/10/lib/libmd/sha512.h Thu Feb 23 18:15:04 2017 (r314156) +++ stable/10/lib/libmd/sha512.h Thu Feb 23 18:54:33 2017 (r314157) @@ -41,16 +41,34 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA512_Init #define SHA512_Init _libmd_SHA512_Init +#endif +#ifndef SHA512_Update #define SHA512_Update _libmd_SHA512_Update +#endif +#ifndef SHA512_Final #define SHA512_Final _libmd_SHA512_Final +#endif +#ifndef SHA512_End #define SHA512_End _libmd_SHA512_End +#endif +#ifndef SHA512_File #define SHA512_File _libmd_SHA512_File +#endif +#ifndef SHA512_FileChunk #define SHA512_FileChunk _libmd_SHA512_FileChunk +#endif +#ifndef SHA512_Data #define SHA512_Data _libmd_SHA512_Data +#endif +#ifndef SHA512_Transform #define SHA512_Transform _libmd_SHA512_Transform +#endif +#ifndef SHA512_version #define SHA512_version _libmd_SHA512_version +#endif void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, const void *, size_t); From owner-svn-src-all@freebsd.org Thu Feb 23 18:56: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 0E76ACE9366; Thu, 23 Feb 2017 18:56:33 +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 D1E721469; Thu, 23 Feb 2017 18:56:32 +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 v1NIuWoh011779; Thu, 23 Feb 2017 18:56:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NIuWa8011778; Thu, 23 Feb 2017 18:56:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702231856.v1NIuWa8011778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 18:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314158 - head/sys/dev/vxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 18:56:33 -0000 Author: pfg Date: Thu Feb 23 18:56:31 2017 New Revision: 314158 URL: https://svnweb.freebsd.org/changeset/base/314158 Log: vxge(4): Yet another (minor) mismatch. VXGE_DEFAULT_TTI_RTIMER_VAL and VXGE_DEFAULT_RTI_RTIMER_VAL have value zero but nevertheless we should use the right value on each. Pointed by: jhb X-MFC with: r314145 Modified: head/sys/dev/vxge/vxge.c Modified: head/sys/dev/vxge/vxge.c ============================================================================== --- head/sys/dev/vxge/vxge.c Thu Feb 23 18:54:33 2017 (r314157) +++ head/sys/dev/vxge/vxge.c Thu Feb 23 18:56:31 2017 (r314158) @@ -2312,7 +2312,7 @@ vxge_vpath_open(vxge_dev_t *vdev) vpath->rx_ticks = ticks; vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; - vpath->rti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; + vpath->rti_rtimer_val = VXGE_DEFAULT_RTI_RTIMER_VAL; vpath->tx_intr_coalesce = vdev->config.intr_coalesce; vpath->rx_intr_coalesce = vdev->config.intr_coalesce; From owner-svn-src-all@freebsd.org Thu Feb 23 19:01: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 18A65CE9662 for ; Thu, 23 Feb 2017 19:01:10 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm10-vm0.bullet.mail.ne1.yahoo.com (nm10-vm0.bullet.mail.ne1.yahoo.com [98.138.91.72]) (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 D0F6C16FB for ; Thu, 23 Feb 2017 19:01:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487876462; bh=GOUyObMy6G8esnKUvUAg1LeIHvUnF0Sf02zPUkNhkGw=; h=From:Subject:To:References:Cc:Date:In-Reply-To:From:Subject; b=loHtJVAZYobkZwnaNHTEQHbubqqwgfmt8HfeD6CIbxbH2GdaG5PMQz/e1dfR6apvTFOjhjHgGoU0fFLzsiz3hQsgTkoypIEEkroqt7XjJYB4Kys6Cz4s/r0okEsttxU2joLH8DuyJ0Gv+syq4emRWKLimpZxp/IBkcxuwCry6JqF4RDLbloEbXTdQ2DdCbq7sf6G75TM8M56ShbY23/hOooh9/GC/d2wrCnyV0S/D0hT/DBjxBSZkgVDrQ1dtRjAmsGAnbWTsXcnAHeEeHWdiXtUZxK/sPkTiNebKIy/B3+sPW7fGJIT4CfKuvohkmlVW89MYjMcpIz17iyHMdWiSQ== Received: from [98.138.100.112] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 23 Feb 2017 19:01:02 -0000 Received: from [98.138.84.47] by tm103.bullet.mail.ne1.yahoo.com with NNFMP; 23 Feb 2017 19:01:02 -0000 Received: from [127.0.0.1] by smtp115.mail.ne1.yahoo.com with NNFMP; 23 Feb 2017 19:01:02 -0000 X-Yahoo-Newman-Id: 767703.79671.bm@smtp115.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: JCd6_Q0VM1nwAcxJ7YaQig458E58.lluZMfPpyqCN_8DeFr YHdCHvz9LDDlx_Ob.qY9.m9uYq9rhBjoZdjCFxQbrQX9ryvJQLVtt1EI2KKb dvY_t_jglHPJ3GvoXEcl6qSA3ytN85Z_QHtlvoaFVLy.6F98GlZpfi5rr.QV NOgZCWX_Oc1NbRjXQjA_YwDWT0.xdQUTJnmYyKV.XGuPifhix4iDsexP6dch Nd6gU_jidtaubqADWJ3_QwRZttObDId6xgo3JIoVJhSye4hQDFns_7uu3wC_ TTAxtiOLL1pGWpgFPAf7UHLZoJC_LbhnE1D3GxkCL_VZvPo8FzS9Dn.KScOV bTlWzT1KpwNhBdLT8JgeFeuqNQS__FX49EozuaJJ.fqjdAPCysM7e6ElJUHR xZsabvRnxa4QExMsVCnVQ_Exu1ugUeVo93zNBJaYc99Tl9qkmQW9rm8NjD._ NCW_OUVw5ou15y3ysEo6eoUj6S4inh7x5PpG0AyY8IacvbqAB_gpNFcWO9iB nTDxWq2jncEF8wwlWb.ffblYcYTfMcpvTdYK55t3dv.8Bbxw- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf From: Pedro Giffuni Subject: Re: svn commit: r314145 - in head/sys/dev/vxge: . vxgehal To: John Baldwin References: <201702231610.v1NGAGOK040762@repo.freebsd.org> <114455088.Nuga6bxpH7@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Organization: Apache Software Foundation Message-ID: <3ada5f67-4ed3-d690-5aca-7725332e2a02@apache.org> Date: Thu, 23 Feb 2017 14:03:44 -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: <114455088.Nuga6bxpH7@ralph.baldwin.cx> 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: Thu, 23 Feb 2017 19:01:10 -0000 On 02/23/17 13:16, John Baldwin wrote: > On Thursday, February 23, 2017 04:10:16 PM Pedro F. Giffuni wrote: >> Author: pfg >> Date: Thu Feb 23 16:10:15 2017 >> New Revision: 314145 >> URL: https://svnweb.freebsd.org/changeset/base/314145 >> >> Log: >> dev/vxe: double assignments. >> >> Fix some suspicious code, likely caused by excessive copy-pasting. >> >> Found with: coccinelle (da.cocci) >> MFC after: 2 weeks >> >> Modified: >> head/sys/dev/vxge/vxge.c >> head/sys/dev/vxge/vxgehal/vxgehal-config.c >> >> Modified: head/sys/dev/vxge/vxge.c >> ============================================================================== >> --- head/sys/dev/vxge/vxge.c Thu Feb 23 16:07:45 2017 (r314144) >> +++ head/sys/dev/vxge/vxge.c Thu Feb 23 16:10:15 2017 (r314145) >> @@ -2312,7 +2312,7 @@ vxge_vpath_open(vxge_dev_t *vdev) >> vpath->rx_ticks = ticks; >> >> vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; >> - vpath->tti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; >> + vpath->rti_rtimer_val = VXGE_DEFAULT_TTI_RTIMER_VAL; > > Probably use VXGE_DEFAULT_TI_RTIMER_VAL instead of TI? > Good catch, fixed as r314158. Thanks! Pedro. From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 BC6CACE9726; Thu, 23 Feb 2017 19:02:08 +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 69038192D; Thu, 23 Feb 2017 19:02:08 +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 v1NJ27WI013791; Thu, 23 Feb 2017 19:02:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ27oK013790; Thu, 23 Feb 2017 19:02:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ27oK013790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314160 - vendor/llvm/llvm-release_40-r295910 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: Thu, 23 Feb 2017 19:02:08 -0000 Author: dim Date: Thu Feb 23 19:02:07 2017 New Revision: 314160 URL: https://svnweb.freebsd.org/changeset/base/314160 Log: Tag llvm release_40 branch r295910. Added: vendor/llvm/llvm-release_40-r295910/ - copied from r314159, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 4A7C9CE9755; Thu, 23 Feb 2017 19:02:14 +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 E4BD1196F; Thu, 23 Feb 2017 19:02:13 +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 v1NJ2Dgp015936; Thu, 23 Feb 2017 19:02:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2CFo015932; Thu, 23 Feb 2017 19:02:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ2CFo015932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314161 - in vendor/clang/dist: . docs lib/Driver test/Driver 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: Thu, 23 Feb 2017 19:02:14 -0000 Author: dim Date: Thu Feb 23 19:02:12 2017 New Revision: 314161 URL: https://svnweb.freebsd.org/changeset/base/314161 Log: Vendor import of clang release_40 branch r295910: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295910 Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/test/Driver/openbsd.c Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Thu Feb 23 19:02:07 2017 (r314160) +++ vendor/clang/dist/CMakeLists.txt Thu Feb 23 19:02:12 2017 (r314161) @@ -42,7 +42,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR list(GET CONFIG_OUTPUT 3 INCLUDE_DIR) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) - list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH) + list(GET CONFIG_OUTPUT 6 LLVM_CONFIG_CMAKE_PATH) if(NOT MSVC_IDE) set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} @@ -57,6 +57,10 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") + # Normalize LLVM_CMAKE_PATH. --cmakedir might contain backslashes. + # CMake assumes slashes as PATH. + file(TO_CMAKE_PATH ${LLVM_CONFIG_CMAKE_PATH} LLVM_CMAKE_PATH) + find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Thu Feb 23 19:02:07 2017 (r314160) +++ vendor/clang/dist/docs/ReleaseNotes.rst Thu Feb 23 19:02:12 2017 (r314161) @@ -241,17 +241,27 @@ show the description of the defects. Static Analyzer --------------- -... +With the option --show-description, scan-build's list of defects will also +show the description of the defects. -Core Analysis Improvements -========================== +The analyzer now provides better support of code that uses gtest. -- ... +Several new checks were added: -New Issues Found -================ +- The analyzer warns when virtual calls are made from constructors or + destructors. This check is off by default but can be enabled by passing the + following command to scan-build: -enable-checker optin.cplusplus.VirtualCall. +- The analyzer checks for synthesized copy properties of mutable types in + Objective C, such as NSMutableArray. Calling the setter for these properties + will store an immutable copy of the value. +- The analyzer checks for calls to dispatch_once() that use an Objective-C + instance variable as the predicate. Using an instance variable as a predicate + may result in the passed-in block being executed multiple times or not at all. + These calls should be rewritten either to use a lock or to store the predicate + in a global or static variable. +- The analyzer checks for unintended comparisons of NSNumber, CFNumberRef, and + other Cocoa number objects to scalar values. -- ... Python Binding Changes ---------------------- Modified: vendor/clang/dist/lib/Driver/Tools.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.cpp Thu Feb 23 19:02:07 2017 (r314160) +++ vendor/clang/dist/lib/Driver/Tools.cpp Thu Feb 23 19:02:12 2017 (r314161) @@ -8937,6 +8937,10 @@ void openbsd::Linker::ConstructJob(Compi if (Args.hasArg(options::OPT_pg)) CmdArgs.push_back( Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o"))); + else if (Args.hasArg(options::OPT_static) && + !Args.hasArg(options::OPT_nopie)) + CmdArgs.push_back( + Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o"))); else CmdArgs.push_back( Args.MakeArgString(getToolChain().GetFilePath("crt0.o"))); Modified: vendor/clang/dist/test/Driver/openbsd.c ============================================================================== --- vendor/clang/dist/test/Driver/openbsd.c Thu Feb 23 19:02:07 2017 (r314160) +++ vendor/clang/dist/test/Driver/openbsd.c Thu Feb 23 19:02:12 2017 (r314161) @@ -67,3 +67,26 @@ // CHECK-MIPS64-PIC: as{{.*}}" "-mabi" "64" "-EB" "-KPIC" // CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL" // CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC" + +// Check linking against correct startup code when (not) using PIE +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-PIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -fno-pie %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-PIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-STATIC-PIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static -fno-pie %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-STATIC-PIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -nopie %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-NOPIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -fno-pie -nopie %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-NOPIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -static -nopie %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-NOPIE %s +// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -fno-pie -static -nopie %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-NOPIE %s +// CHECK-PIE: "{{.*}}crt0.o" +// CHECK-PIE-NOT: "-nopie" +// CHECK-STATIC-PIE: "{{.*}}rcrt0.o" +// CHECK-STATIC-PIE-NOT: "-nopie" +// CHECK-NOPIE: "-nopie" "{{.*}}crt0.o" From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 AC01CCE96FB; Thu, 23 Feb 2017 19:02:05 +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 74C7D1926; Thu, 23 Feb 2017 19:02:05 +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 v1NJ24Vf013744; Thu, 23 Feb 2017 19:02:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ23Fq013734; Thu, 23 Feb 2017 19:02:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ23Fq013734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314159 - in vendor/llvm/dist: docs lib/CodeGen/AsmPrinter lib/Target/AArch64 lib/Target/ARM lib/Transforms/Scalar test/CodeGen/AArch64 test/CodeGen/ARM test/DebugInfo/X86 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: Thu, 23 Feb 2017 19:02:05 -0000 Author: dim Date: Thu Feb 23 19:02:03 2017 New Revision: 314159 URL: https://svnweb.freebsd.org/changeset/base/314159 Log: Vendor import of llvm release_40 branch r295910: https://llvm.org/svn/llvm-project/llvm/branches/release_40@295910 Added: vendor/llvm/dist/test/CodeGen/ARM/aeabi-read-tp.ll vendor/llvm/dist/test/DebugInfo/X86/FrameIndexExprs.ll Modified: vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Thu Feb 23 19:02:03 2017 (r314159) @@ -61,6 +61,13 @@ Non-comprehensive list of changes in thi with LLVM option -adce-remove-loops when the loop body otherwise has no live operations. +* The GVNHoist pass is now enabled by default. The new pass based on Global + Value Numbering detects similar computations in branch code and replaces + multiple instances of the same computation with a unique expression. The + transform benefits code size and generates better schedules. GVNHoist is + more aggressive at -Os and -Oz, hoisting more expressions at the expense of + execution time degradations. + * The llvm-cov tool can now export coverage data as json. Its html output mode has also improved. Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Feb 23 19:02:03 2017 (r314159) @@ -522,22 +522,19 @@ DIE *DwarfCompileUnit::constructVariable } // .. else use frame index. - if (DV.getFrameIndex().empty()) + if (!DV.hasFrameIndexExprs()) return VariableDie; - auto Expr = DV.getExpression().begin(); DIELoc *Loc = new (DIEValueAllocator) DIELoc; DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc); - for (auto FI : DV.getFrameIndex()) { + for (auto &Fragment : DV.getFrameIndexExprs()) { unsigned FrameReg = 0; const TargetFrameLowering *TFI = Asm->MF->getSubtarget().getFrameLowering(); - int Offset = TFI->getFrameIndexReference(*Asm->MF, FI, FrameReg); - assert(Expr != DV.getExpression().end() && "Wrong number of expressions"); - DwarfExpr.addFragmentOffset(*Expr); + int Offset = TFI->getFrameIndexReference(*Asm->MF, Fragment.FI, FrameReg); + DwarfExpr.addFragmentOffset(Fragment.Expr); DwarfExpr.AddMachineRegIndirect(*Asm->MF->getSubtarget().getRegisterInfo(), FrameReg, Offset); - DwarfExpr.AddExpression(*Expr); - ++Expr; + DwarfExpr.AddExpression(Fragment.Expr); } addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Feb 23 19:02:03 2017 (r314159) @@ -199,6 +199,15 @@ const DIType *DbgVariable::getType() con return Ty; } +ArrayRef DbgVariable::getFrameIndexExprs() const { + std::sort(FrameIndexExprs.begin(), FrameIndexExprs.end(), + [](const FrameIndexExpr &A, const FrameIndexExpr &B) -> bool { + return A.Expr->getFragmentInfo()->OffsetInBits < + B.Expr->getFragmentInfo()->OffsetInBits; + }); + return FrameIndexExprs; +} + static const DwarfAccelTable::Atom TypeAtoms[] = { DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4), DwarfAccelTable::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2), Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h Thu Feb 23 19:02:03 2017 (r314159) @@ -54,7 +54,7 @@ class MachineModuleInfo; /// /// Variables can be created from allocas, in which case they're generated from /// the MMI table. Such variables can have multiple expressions and frame -/// indices. The \a Expr and \a FrameIndices array must match. +/// indices. /// /// Variables can be created from \c DBG_VALUE instructions. Those whose /// location changes over time use \a DebugLocListIndex, while those with a @@ -64,11 +64,16 @@ class MachineModuleInfo; class DbgVariable { const DILocalVariable *Var; /// Variable Descriptor. const DILocation *IA; /// Inlined at location. - SmallVector Expr; /// Complex address. DIE *TheDIE = nullptr; /// Variable DIE. unsigned DebugLocListIndex = ~0u; /// Offset in DebugLocs. const MachineInstr *MInsn = nullptr; /// DBG_VALUE instruction. - SmallVector FrameIndex; /// Frame index. + + struct FrameIndexExpr { + int FI; + const DIExpression *Expr; + }; + mutable SmallVector + FrameIndexExprs; /// Frame index + expression. public: /// Construct a DbgVariable. @@ -80,21 +85,18 @@ public: /// Initialize from the MMI table. void initializeMMI(const DIExpression *E, int FI) { - assert(Expr.empty() && "Already initialized?"); - assert(FrameIndex.empty() && "Already initialized?"); + assert(FrameIndexExprs.empty() && "Already initialized?"); assert(!MInsn && "Already initialized?"); assert((!E || E->isValid()) && "Expected valid expression"); assert(~FI && "Expected valid index"); - Expr.push_back(E); - FrameIndex.push_back(FI); + FrameIndexExprs.push_back({FI, E}); } /// Initialize from a DBG_VALUE instruction. void initializeDbgValue(const MachineInstr *DbgValue) { - assert(Expr.empty() && "Already initialized?"); - assert(FrameIndex.empty() && "Already initialized?"); + assert(FrameIndexExprs.empty() && "Already initialized?"); assert(!MInsn && "Already initialized?"); assert(Var == DbgValue->getDebugVariable() && "Wrong variable"); @@ -103,16 +105,15 @@ public: MInsn = DbgValue; if (auto *E = DbgValue->getDebugExpression()) if (E->getNumElements()) - Expr.push_back(E); + FrameIndexExprs.push_back({0, E}); } // Accessors. const DILocalVariable *getVariable() const { return Var; } const DILocation *getInlinedAt() const { return IA; } - ArrayRef getExpression() const { return Expr; } const DIExpression *getSingleExpression() const { - assert(MInsn && Expr.size() <= 1); - return Expr.size() ? Expr[0] : nullptr; + assert(MInsn && FrameIndexExprs.size() <= 1); + return FrameIndexExprs.size() ? FrameIndexExprs[0].Expr : nullptr; } void setDIE(DIE &D) { TheDIE = &D; } DIE *getDIE() const { return TheDIE; } @@ -120,7 +121,9 @@ public: unsigned getDebugLocListIndex() const { return DebugLocListIndex; } StringRef getName() const { return Var->getName(); } const MachineInstr *getMInsn() const { return MInsn; } - ArrayRef getFrameIndex() const { return FrameIndex; } + /// Get the FI entries, sorted by fragment offset. + ArrayRef getFrameIndexExprs() const; + bool hasFrameIndexExprs() const { return !FrameIndexExprs.empty(); } void addMMIEntry(const DbgVariable &V) { assert(DebugLocListIndex == ~0U && !MInsn && "not an MMI entry"); @@ -128,16 +131,15 @@ public: assert(V.Var == Var && "conflicting variable"); assert(V.IA == IA && "conflicting inlined-at location"); - assert(!FrameIndex.empty() && "Expected an MMI entry"); - assert(!V.FrameIndex.empty() && "Expected an MMI entry"); - assert(Expr.size() == FrameIndex.size() && "Mismatched expressions"); - assert(V.Expr.size() == V.FrameIndex.size() && "Mismatched expressions"); - - Expr.append(V.Expr.begin(), V.Expr.end()); - FrameIndex.append(V.FrameIndex.begin(), V.FrameIndex.end()); - assert(all_of(Expr, [](const DIExpression *E) { - return E && E->isFragment(); - }) && "conflicting locations for variable"); + assert(!FrameIndexExprs.empty() && "Expected an MMI entry"); + assert(!V.FrameIndexExprs.empty() && "Expected an MMI entry"); + + FrameIndexExprs.append(V.FrameIndexExprs.begin(), V.FrameIndexExprs.end()); + assert(all_of(FrameIndexExprs, + [](FrameIndexExpr &FIE) { + return FIE.Expr && FIE.Expr->isFragment(); + }) && + "conflicting locations for variable"); } // Translate tag to proper Dwarf tag. @@ -167,11 +169,11 @@ public: bool hasComplexAddress() const { assert(MInsn && "Expected DBG_VALUE, not MMI variable"); - assert(FrameIndex.empty() && "Expected DBG_VALUE, not MMI variable"); - assert( - (Expr.empty() || (Expr.size() == 1 && Expr.back()->getNumElements())) && - "Invalid Expr for DBG_VALUE"); - return !Expr.empty(); + assert((FrameIndexExprs.empty() || + (FrameIndexExprs.size() == 1 && + FrameIndexExprs[0].Expr->getNumElements())) && + "Invalid Expr for DBG_VALUE"); + return !FrameIndexExprs.empty(); } bool isBlockByrefVariable() const; const DIType *getType() const; Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Thu Feb 23 19:02:03 2017 (r314159) @@ -853,9 +853,11 @@ AArch64LoadStoreOpt::promoteLoadFromStor .addImm(Imms); } } - StoreI->clearRegisterKills(StRt, TRI); - (void)BitExtMI; + // Clear kill flags between store and load. + for (MachineInstr &MI : make_range(StoreI->getIterator(), + BitExtMI->getIterator())) + MI.clearRegisterKills(StRt, TRI); DEBUG(dbgs() << "Promoting load by replacing :\n "); DEBUG(StoreI->print(dbgs())); Modified: vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp Thu Feb 23 19:02:03 2017 (r314159) @@ -1225,16 +1225,36 @@ bool ARMExpandPseudo::ExpandMI(MachineBa } case ARM::tTPsoft: case ARM::TPsoft: { + const bool Thumb = Opcode == ARM::tTPsoft; + MachineInstrBuilder MIB; - if (Opcode == ARM::tTPsoft) + if (STI->genLongCalls()) { + MachineFunction *MF = MBB.getParent(); + MachineConstantPool *MCP = MF->getConstantPool(); + unsigned PCLabelID = AFI->createPICLabelUId(); + MachineConstantPoolValue *CPV = + ARMConstantPoolSymbol::Create(MF->getFunction()->getContext(), + "__aeabi_read_tp", PCLabelID, 0); + unsigned Reg = MI.getOperand(0).getReg(); MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), - TII->get( ARM::tBL)) - .addImm((unsigned)ARMCC::AL).addReg(0) - .addExternalSymbol("__aeabi_read_tp", 0); - else + TII->get(Thumb ? ARM::tLDRpci : ARM::LDRi12), Reg) + .addConstantPoolIndex(MCP->getConstantPoolIndex(CPV, 4)); + if (!Thumb) + MIB.addImm(0); + MIB.addImm(static_cast(ARMCC::AL)).addReg(0); + MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), - TII->get( ARM::BL)) - .addExternalSymbol("__aeabi_read_tp", 0); + TII->get(Thumb ? ARM::tBLXr : ARM::BLX)); + if (Thumb) + MIB.addImm(static_cast(ARMCC::AL)).addReg(0); + MIB.addReg(Reg, RegState::Kill); + } else { + MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), + TII->get(Thumb ? ARM::tBL : ARM::BL)); + if (Thumb) + MIB.addImm(static_cast(ARMCC::AL)).addReg(0); + MIB.addExternalSymbol("__aeabi_read_tp", 0); + } MIB->setMemRefs(MI.memoperands_begin(), MI.memoperands_end()); TransferImpOps(MI, MIB, MIB); Modified: vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp Thu Feb 23 19:02:03 2017 (r314159) @@ -1196,10 +1196,7 @@ LoopInvariantCodeMotion::collectAliasInf auto mergeLoop = [&](Loop *L) { // Loop over the body of this loop, looking for calls, invokes, and stores. - // Because subloops have already been incorporated into AST, we skip blocks - // in subloops. for (BasicBlock *BB : L->blocks()) - if (LI->getLoopFor(BB) == L) // Ignore blocks in subloops. CurAST->add(*BB); // Incorporate the specified basic block }; Modified: vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir ============================================================================== --- vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir Thu Feb 23 18:56:31 2017 (r314158) +++ vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir Thu Feb 23 19:02:03 2017 (r314159) @@ -1,10 +1,4 @@ # RUN: llc -mtriple=aarch64--linux-gnu -run-pass=aarch64-ldst-opt %s -verify-machineinstrs -o - 2>&1 | FileCheck %s ---- | - define void @promote-load-from-store() { ret void } - define void @store-pair() { ret void } - define void @store-pair-clearkill0() { ret void } - define void @store-pair-clearkill1() { ret void } -... --- name: promote-load-from-store tracksRegLiveness: true @@ -130,3 +124,23 @@ body: | # CHECK-NOT: %w2 = COPY killed %w1 # CHECK: %w2 = COPY %w1 # CHECK: STPWi %w1, killed %w2, killed %x0, 0 +--- +name: store-load-clearkill +tracksRegLiveness: true +body: | + bb.0: + liveins: %w1 + + STRWui %w1, %sp, 0 :: (store 4) + %wzr = COPY killed %w1 ; killing use of %w1 + %w11 = LDRWui %sp, 0 :: (load 4) + HINT 0, implicit %w11 ; some use of %w11 +... +# When replaceing the load of a store-load pair with a copy the kill flags +# along the way need to be cleared. +# CHECK-LABEL: name: store-load-clearkill +# CHECK: STRWui %w1, %sp, 0 :: (store 4) +# CHECK-NOT: COPY killed %w1 +# CHECK: %wzr = COPY %w1 +# CHECK: %w11 = ORRWrs %wzr, %w1, 0 +# CHECK: HINT 0, implicit %w11 Added: vendor/llvm/dist/test/CodeGen/ARM/aeabi-read-tp.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/ARM/aeabi-read-tp.ll Thu Feb 23 19:02:03 2017 (r314159) @@ -0,0 +1,26 @@ +; RUN: llc -mtriple armv7---eabi -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-SHORT +; RUN: llc -mtriple thumbv7---eabi -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-SHORT +; RUN: llc -mtriple armv7---eabi -mattr=+long-calls -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-LONG +; RUN: llc -mtriple thumbv7---eabi -mattr=+long-calls -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-LONG + +@i = thread_local local_unnamed_addr global i32 0, align 4 + +define i32 @f() local_unnamed_addr { +entry: + %0 = load i32, i32* @i, align 4 + ret i32 %0 +} + +; CHECK-LABEL: f: +; CHECK-SHORT: ldr r1, [[VAR:.LCPI[0-9]+_[0-9]+]] +; CHECK-SHORT-NEXT: bl __aeabi_read_tp +; CHECK-SHORT: [[VAR]]: +; CHECK-SHORT-NEXT: .long i(TPOFF) + +; CHECK-LONG: ldr [[REG:r[0-9]+]], [[FUN:.LCPI[0-9]+_[0-9]+]] +; CHECK-LONG-NEXT: ldr r1, [[VAR:.LCPI[0-9]+_[0-9]+]] +; CHECK-LONG-NEXT: blx [[REG]] +; CHECK-LONG: [[VAR]]: +; CHECK-LONG-NEXT: .long i(TPOFF) +; CHECK-LONG: [[FUN]]: +; CHECK-LONG-NEXT: .long __aeabi_read_tp Added: vendor/llvm/dist/test/DebugInfo/X86/FrameIndexExprs.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/DebugInfo/X86/FrameIndexExprs.ll Thu Feb 23 19:02:03 2017 (r314159) @@ -0,0 +1,85 @@ +; PR31381: An assertion in the DWARF backend when fragments in MMI slots are +; sorted by largest offset first. +; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; CHECK: DW_TAG_formal_parameter +; CHECK: DW_TAG_formal_parameter +; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (<0xa> 91 78 93 03 93 06 91 7d 93 03 ) +; fbreg -8, piece 0x00000003, piece 0x00000006, fbreg -3, piece 0x00000003 +; CHECK-NEXT: DW_AT_abstract_origin {{.*}}"p" +source_filename = "bugpoint-reduced-simplified.ll" +target triple = "x86_64-apple-darwin" + +@f = common local_unnamed_addr global i32 0, align 4, !dbg !0 +@h = common local_unnamed_addr global i32 0, align 4, !dbg !6 + +; Function Attrs: nounwind readnone +declare void @llvm.dbg.declare(metadata, metadata, metadata) #0 + +define void @fn4() local_unnamed_addr !dbg !12 { +entry: + %l1.sroa.7.i = alloca [3 x i8], align 1 + tail call void @llvm.dbg.declare(metadata [3 x i8]* %l1.sroa.7.i, metadata !15, metadata !26), !dbg !27 + %i.sroa.4.i = alloca [3 x i8], align 8 + tail call void @llvm.dbg.declare(metadata [3 x i8]* %i.sroa.4.i, metadata !15, metadata !32), !dbg !27 + %0 = load i32, i32* @h, align 4 + br label %while.body.i.i, !dbg !33 + +while.body.i.i: ; preds = %while.body.i.i, %entry + br label %while.body.i.i, !dbg !34 + +fn3.exit: ; No predecessors! + %1 = load i32, i32* @f, align 4 + %tobool.i = icmp eq i32 %1, 0 + br label %while.body.i + +while.body.i: ; preds = %if.end.i, %fn3.exit + br i1 %tobool.i, label %if.end.i, label %if.then.i + +if.then.i: ; preds = %while.body.i + br label %if.end.i + +if.end.i: ; preds = %if.then.i, %while.body.i + br label %while.body.i +} + +attributes #0 = { nounwind readnone } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!9, !10, !11} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = distinct !DIGlobalVariable(name: "f", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) +!3 = !DIFile(filename: "PR31381.c", directory: "/") +!4 = !{} +!5 = !{!0, !6} +!6 = !DIGlobalVariableExpression(var: !7) +!7 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true) +!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!9 = !{i32 2, !"Dwarf Version", i32 4} +!10 = !{i32 2, !"Debug Info Version", i32 3} +!11 = !{i32 1, !"PIC Level", i32 2} +!12 = distinct !DISubprogram(name: "fn4", scope: !3, file: !3, line: 31, type: !13, isLocal: false, isDefinition: true, scopeLine: 32, isOptimized: true, unit: !2, variables: !4) +!13 = !DISubroutineType(types: !14) +!14 = !{null} +!15 = !DILocalVariable(name: "p", arg: 1, scope: !16, file: !3, line: 19, type: !19) +!16 = distinct !DISubprogram(name: "fn2", scope: !3, file: !3, line: 19, type: !17, isLocal: false, isDefinition: true, scopeLine: 20, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !25) +!17 = !DISubroutineType(types: !18) +!18 = !{null, !19} +!19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !3, line: 1, size: 96, elements: !20) +!20 = !{!21, !23, !24} +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !19, file: !3, line: 4, baseType: !22, size: 8, offset: 24) +!22 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!23 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !19, file: !3, line: 5, baseType: !8, size: 32, offset: 32) +!24 = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: !19, file: !3, line: 6, baseType: !8, size: 6, offset: 64, flags: DIFlagBitField, extraData: i64 64) +!25 = !{!15} +!26 = !DIExpression(DW_OP_LLVM_fragment, 72, 24) +!27 = !DILocation(line: 19, column: 20, scope: !16, inlinedAt: !28) +!28 = distinct !DILocation(line: 27, column: 3, scope: !29, inlinedAt: !30) +!29 = distinct !DISubprogram(name: "fn3", scope: !3, file: !3, line: 24, type: !13, isLocal: false, isDefinition: true, scopeLine: 25, isOptimized: true, unit: !2, variables: !4) +!30 = distinct !DILocation(line: 34, column: 7, scope: !31) +!31 = distinct !DILexicalBlock(scope: !12, file: !3, line: 33, column: 5) +!32 = !DIExpression(DW_OP_LLVM_fragment, 0, 24) +!33 = !DILocation(line: 22, column: 9, scope: !16, inlinedAt: !28) +!34 = !DILocation(line: 21, column: 3, scope: !35, inlinedAt: !28) +!35 = !DILexicalBlockFile(scope: !16, file: !3, discriminator: 2) From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 699FBCE97C4; Thu, 23 Feb 2017 19:02:21 +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 1E7DE1BBC; Thu, 23 Feb 2017 19:02:21 +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 v1NJ2KLK016032; Thu, 23 Feb 2017 19:02:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2K2U016031; Thu, 23 Feb 2017 19:02:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ2K2U016031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314163 - vendor/compiler-rt/compiler-rt-release_40-r295910 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: Thu, 23 Feb 2017 19:02:21 -0000 Author: dim Date: Thu Feb 23 19:02:20 2017 New Revision: 314163 URL: https://svnweb.freebsd.org/changeset/base/314163 Log: Tag compiler-rt release_40 branch r295910. Added: vendor/compiler-rt/compiler-rt-release_40-r295910/ - copied from r314162, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 40B56CE9788; Thu, 23 Feb 2017 19:02:17 +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 E804219E2; Thu, 23 Feb 2017 19:02:16 +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 v1NJ2GnC015983; Thu, 23 Feb 2017 19:02:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2GEN015982; Thu, 23 Feb 2017 19:02:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ2GEN015982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314162 - vendor/clang/clang-release_40-r295910 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: Thu, 23 Feb 2017 19:02:17 -0000 Author: dim Date: Thu Feb 23 19:02:15 2017 New Revision: 314162 URL: https://svnweb.freebsd.org/changeset/base/314162 Log: Tag clang release_40 branch r295910. Added: vendor/clang/clang-release_40-r295910/ - copied from r314161, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 30CBFCE9810; Thu, 23 Feb 2017 19:02:25 +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 D1E541C32; Thu, 23 Feb 2017 19:02:24 +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 v1NJ2Ndf016078; Thu, 23 Feb 2017 19:02:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2NhL016077; Thu, 23 Feb 2017 19:02:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ2NhL016077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314164 - vendor/libc++/libc++-release_40-r295910 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: Thu, 23 Feb 2017 19:02:25 -0000 Author: dim Date: Thu Feb 23 19:02:23 2017 New Revision: 314164 URL: https://svnweb.freebsd.org/changeset/base/314164 Log: Tag libc++ release_40 branch r295910. Added: vendor/libc++/libc++-release_40-r295910/ - copied from r314163, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 5C6CDCE9848; Thu, 23 Feb 2017 19:02:29 +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 0F9871CD7; Thu, 23 Feb 2017 19:02:28 +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 v1NJ2Suv016127; Thu, 23 Feb 2017 19:02:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2SSu016126; Thu, 23 Feb 2017 19:02:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ2SSu016126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314165 - vendor/lld/lld-release_40-r295910 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: Thu, 23 Feb 2017 19:02:29 -0000 Author: dim Date: Thu Feb 23 19:02:27 2017 New Revision: 314165 URL: https://svnweb.freebsd.org/changeset/base/314165 Log: Tag lld release_40 branch r295910. Added: vendor/lld/lld-release_40-r295910/ - copied from r314164, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:02: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 D7B18CE989D; Thu, 23 Feb 2017 19:02:32 +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 81EFC1D49; Thu, 23 Feb 2017 19:02:32 +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 v1NJ2VwH016174; Thu, 23 Feb 2017 19:02:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2VgI016173; Thu, 23 Feb 2017 19:02:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231902.v1NJ2VgI016173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314166 - vendor/lldb/lldb-release_40-r295910 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: Thu, 23 Feb 2017 19:02:33 -0000 Author: dim Date: Thu Feb 23 19:02:31 2017 New Revision: 314166 URL: https://svnweb.freebsd.org/changeset/base/314166 Log: Tag lldb release_40 branch r295910. Added: vendor/lldb/lldb-release_40-r295910/ - copied from r314165, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19: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 C978ACE9964; Thu, 23 Feb 2017 19:02:41 +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 7CC581E73; Thu, 23 Feb 2017 19:02:41 +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 v1NJ2eI8016223; Thu, 23 Feb 2017 19:02:40 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJ2eAC016221; Thu, 23 Feb 2017 19:02:40 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702231902.v1NJ2eAC016221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 23 Feb 2017 19:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314167 - head/sys/dev/cxgbe/iw_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: Thu, 23 Feb 2017 19:02:41 -0000 Author: np Date: Thu Feb 23 19:02:40 2017 New Revision: 314167 URL: https://svnweb.freebsd.org/changeset/base/314167 Log: cxgbe/iw_cxgbe: Minor changes for T6. Submitted by: Krishnamraju Eraparaju at Chelsio Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c head/sys/dev/cxgbe/iw_cxgbe/mem.c head/sys/dev/cxgbe/iw_cxgbe/provider.c Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/device.c Thu Feb 23 19:02:31 2017 (r314166) +++ head/sys/dev/cxgbe/iw_cxgbe/device.c Thu Feb 23 19:02:40 2017 (r314167) @@ -330,7 +330,7 @@ c4iw_modevent(module_t mod, int cmd, voi case MOD_LOAD: rc = c4iw_mod_load(); if (rc == 0) - printf("iw_cxgbe: Chelsio T4/T5 RDMA driver loaded.\n"); + printf("iw_cxgbe: Chelsio T4/T5/T6 RDMA driver loaded.\n"); break; case MOD_UNLOAD: Modified: head/sys/dev/cxgbe/iw_cxgbe/mem.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/mem.c Thu Feb 23 19:02:31 2017 (r314166) +++ head/sys/dev/cxgbe/iw_cxgbe/mem.c Thu Feb 23 19:02:40 2017 (r314167) @@ -46,11 +46,11 @@ __FBSDID("$FreeBSD$"); #define T4_ULPTX_MIN_IO 32 #define C4IW_MAX_INLINE_SIZE 96 -static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) +static int +mr_exceeds_hw_limits(struct c4iw_dev *dev __unused, u64 length) { - return (is_t4(dev->rdev.adap) || - is_t5(dev->rdev.adap)) && - length >= 8*1024*1024*1024ULL; + + return (length >= 8*1024*1024*1024ULL); } static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Thu Feb 23 19:02:31 2017 (r314166) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Thu Feb 23 19:02:40 2017 (r314167) @@ -190,7 +190,7 @@ static int c4iw_mmap(struct ib_ucontext "%s:6 USER DB-GTS addr %p region %p, reglen %u", __func__, addr, va_udbs_res, len_udbs_res); #ifdef DOT5 - if (is_t5(rdev->lldi.adapter_type) && map_udb_as_wc) + if (!is_t4(rdev->lldi.adapter_type) && map_udb_as_wc) vma->vm_page_prot = t4_pgprot_wc(vma->vm_page_prot); else #endif From owner-svn-src-all@freebsd.org Thu Feb 23 19:13: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 DE6BBCE9CBF; Thu, 23 Feb 2017 19:13: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 88C70C88; Thu, 23 Feb 2017 19:13: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 v1NJDm8n020437; Thu, 23 Feb 2017 19:13:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJDmNw020435; Thu, 23 Feb 2017 19:13:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231913.v1NJDmNw020435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314168 - in vendor/llvm/dist: lib/Target/ARM test/CodeGen/ARM 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: Thu, 23 Feb 2017 19:13:50 -0000 Author: dim Date: Thu Feb 23 19:13:48 2017 New Revision: 314168 URL: https://svnweb.freebsd.org/changeset/base/314168 Log: Vendor import of llvm release_40 branch r296002: https://llvm.org/svn/llvm-project/llvm/branches/release_40@296002 Added: vendor/llvm/dist/test/CodeGen/ARM/alias_store.ll Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Thu Feb 23 19:02:40 2017 (r314167) +++ vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Thu Feb 23 19:13:48 2017 (r314168) @@ -3027,17 +3027,20 @@ static SDValue promoteToConstantPool(con return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, CPAddr); } +static bool isReadOnly(const GlobalValue *GV) { + if (const GlobalAlias *GA = dyn_cast(GV)) + GV = GA->getBaseObject(); + return (isa(GV) && cast(GV)->isConstant()) || + isa(GV); +} + SDValue ARMTargetLowering::LowerGlobalAddressELF(SDValue Op, SelectionDAG &DAG) const { EVT PtrVT = getPointerTy(DAG.getDataLayout()); SDLoc dl(Op); const GlobalValue *GV = cast(Op)->getGlobal(); const TargetMachine &TM = getTargetMachine(); - if (const GlobalAlias *GA = dyn_cast(GV)) - GV = GA->getBaseObject(); - bool IsRO = - (isa(GV) && cast(GV)->isConstant()) || - isa(GV); + bool IsRO = isReadOnly(GV); // promoteToConstantPool only if not generating XO text section if (TM.shouldAssumeDSOLocal(*GV->getParent(), GV) && !Subtarget->genExecuteOnly()) Added: vendor/llvm/dist/test/CodeGen/ARM/alias_store.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/ARM/alias_store.ll Thu Feb 23 19:13:48 2017 (r314168) @@ -0,0 +1,16 @@ +; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s + +@X = constant {i8, i8 } { i8 0, i8 0 } +@XA = alias i8, getelementptr inbounds ({ i8, i8 }, {i8, i8}* @X, i32 0, i32 1) + +define void @f(i8** %p) align 2 { +entry: + store i8* @XA, i8 **%p, align 4 + ret void +} + +; CHECK: f: +; CHECK: ldr r{{.*}}, [[L:.*]] +; CHECK: [[L]]: +; CHECK-NEXT: .long XA +; CHECK: XA = X+1 From owner-svn-src-all@freebsd.org Thu Feb 23 19:13: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 04732CE9CF1; Thu, 23 Feb 2017 19:13:53 +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 A76C2C96; Thu, 23 Feb 2017 19:13: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 v1NJDpvV020483; Thu, 23 Feb 2017 19:13:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJDpv0020482; Thu, 23 Feb 2017 19:13:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231913.v1NJDpv0020482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314169 - vendor/llvm/llvm-release_40-r296002 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: Thu, 23 Feb 2017 19:13:53 -0000 Author: dim Date: Thu Feb 23 19:13:51 2017 New Revision: 314169 URL: https://svnweb.freebsd.org/changeset/base/314169 Log: Tag llvm release_40 branch r296002. Added: vendor/llvm/llvm-release_40-r296002/ - copied from r314168, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:13: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 D67E7CE9D2B; Thu, 23 Feb 2017 19:13:58 +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 963FED0F; Thu, 23 Feb 2017 19:13: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 v1NJDvjG020537; Thu, 23 Feb 2017 19:13:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJDv9M020532; Thu, 23 Feb 2017 19:13:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231913.v1NJDv9M020532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314170 - in vendor/clang/dist: lib/CodeGen lib/Sema test/CodeGenOpenCL test/OpenMP 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: Thu, 23 Feb 2017 19:13:59 -0000 Author: dim Date: Thu Feb 23 19:13:57 2017 New Revision: 314170 URL: https://svnweb.freebsd.org/changeset/base/314170 Log: Vendor import of clang release_40 branch r296002: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296002 Modified: vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl vendor/clang/dist/test/OpenMP/cancel_codegen.cpp vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp Modified: vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp Thu Feb 23 19:13:51 2017 (r314169) +++ vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp Thu Feb 23 19:13:57 2017 (r314170) @@ -4705,7 +4705,6 @@ void CGOpenMPRuntime::emitCancellationPo auto *Result = CGF.EmitRuntimeCall( createRuntimeFunction(OMPRTL__kmpc_cancellationpoint), Args); // if (__kmpc_cancellationpoint()) { - // __kmpc_cancel_barrier(); // exit from construct; // } auto *ExitBB = CGF.createBasicBlock(".cancel.exit"); @@ -4713,8 +4712,6 @@ void CGOpenMPRuntime::emitCancellationPo auto *Cmp = CGF.Builder.CreateIsNotNull(Result); CGF.Builder.CreateCondBr(Cmp, ExitBB, ContBB); CGF.EmitBlock(ExitBB); - // __kmpc_cancel_barrier(); - emitBarrierCall(CGF, Loc, OMPD_unknown, /*EmitChecks=*/false); // exit from construct; auto CancelDest = CGF.getOMPCancelDestination(OMPRegionInfo->getDirectiveKind()); @@ -4743,7 +4740,6 @@ void CGOpenMPRuntime::emitCancelCall(Cod auto *Result = CGF.EmitRuntimeCall( RT.createRuntimeFunction(OMPRTL__kmpc_cancel), Args); // if (__kmpc_cancel()) { - // __kmpc_cancel_barrier(); // exit from construct; // } auto *ExitBB = CGF.createBasicBlock(".cancel.exit"); @@ -4751,8 +4747,6 @@ void CGOpenMPRuntime::emitCancelCall(Cod auto *Cmp = CGF.Builder.CreateIsNotNull(Result); CGF.Builder.CreateCondBr(Cmp, ExitBB, ContBB); CGF.EmitBlock(ExitBB); - // __kmpc_cancel_barrier(); - RT.emitBarrierCall(CGF, Loc, OMPD_unknown, /*EmitChecks=*/false); // exit from construct; auto CancelDest = CGF.getOMPCancelDestination(OMPRegionInfo->getDirectiveKind()); Modified: vendor/clang/dist/lib/Sema/SemaType.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaType.cpp Thu Feb 23 19:13:51 2017 (r314169) +++ vendor/clang/dist/lib/Sema/SemaType.cpp Thu Feb 23 19:13:57 2017 (r314170) @@ -3154,7 +3154,7 @@ getCCForDeclaratorChunk(Sema &S, Declara if (Attr->getKind() == AttributeList::AT_OpenCLKernel) { llvm::Triple::ArchType arch = S.Context.getTargetInfo().getTriple().getArch(); if (arch == llvm::Triple::spir || arch == llvm::Triple::spir64 || - arch == llvm::Triple::amdgcn) { + arch == llvm::Triple::amdgcn || arch == llvm::Triple::r600) { CC = CC_OpenCLKernel; } break; Modified: vendor/clang/dist/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl ============================================================================== --- vendor/clang/dist/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl Thu Feb 23 19:13:51 2017 (r314169) +++ vendor/clang/dist/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl Thu Feb 23 19:13:57 2017 (r314170) @@ -1,5 +1,6 @@ // REQUIRES: amdgpu-registered-target // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple r600-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s // CHECK-NOT: %struct.single_element_struct_arg = type { i32 } typedef struct single_element_struct_arg Modified: vendor/clang/dist/test/OpenMP/cancel_codegen.cpp ============================================================================== --- vendor/clang/dist/test/OpenMP/cancel_codegen.cpp Thu Feb 23 19:13:51 2017 (r314169) +++ vendor/clang/dist/test/OpenMP/cancel_codegen.cpp Thu Feb 23 19:13:57 2017 (r314170) @@ -12,6 +12,8 @@ int main (int argc, char **argv) { { #pragma omp cancel parallel if(flag) argv[0][0] = argc; +#pragma omp barrier + argv[0][0] += argc; } // CHECK: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call( #pragma omp sections @@ -20,7 +22,6 @@ int main (int argc, char **argv) { } // CHECK: call void @__kmpc_for_static_init_4( // CHECK: call i32 @__kmpc_cancel( -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: call void @__kmpc_for_static_fini( // CHECK: call void @__kmpc_barrier(%ident_t* #pragma omp sections @@ -36,7 +37,6 @@ int main (int argc, char **argv) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -44,7 +44,6 @@ int main (int argc, char **argv) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -62,7 +61,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -109,9 +107,10 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,]+]], // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label %[[RETURN:.+]] // CHECK: [[ELSE]] +// The barrier directive should now call __kmpc_cancel_barrier +// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[RETURN]] // CHECK: ret void @@ -121,7 +120,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,]+]], // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label %[[RETURN:.+]] // CHECK: [[RETURN]] // CHECK: ret i32 0 @@ -129,7 +127,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: define internal void @{{[^(]+}}(i32* {{[^,]+}}, i32* {{[^,]+}}) // CHECK: call void @__kmpc_for_static_init_4( // CHECK: call i32 @__kmpc_cancel( -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: call void @__kmpc_for_static_fini( // CHECK: ret void @@ -139,7 +136,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -147,7 +143,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -160,7 +155,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label Modified: vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp ============================================================================== --- vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp Thu Feb 23 19:13:51 2017 (r314169) +++ vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp Thu Feb 23 19:13:57 2017 (r314170) @@ -26,7 +26,6 @@ int main (int argc, char **argv) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -46,7 +45,6 @@ int main (int argc, char **argv) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -54,7 +52,6 @@ int main (int argc, char **argv) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -69,7 +66,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -116,7 +112,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,]+]], // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label %[[RETURN:.+]] // CHECK: [[RETURN]] // CHECK: ret void @@ -126,7 +121,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,]+]], // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label %[[RETURN:.+]] // CHECK: [[RETURN]] // CHECK: ret i32 0 @@ -137,7 +131,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -150,7 +143,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -158,7 +150,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label @@ -171,7 +162,6 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 // CHECK: br i1 [[CMP]], label %[[EXIT:[^,].+]], label %[[CONTINUE:.+]] // CHECK: [[EXIT]] -// CHECK: call i32 @__kmpc_cancel_barrier(%ident_t* // CHECK: br label // CHECK: [[CONTINUE]] // CHECK: br label From owner-svn-src-all@freebsd.org Thu Feb 23 19:14: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 3FE0ACE9D63; Thu, 23 Feb 2017 19:14:02 +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 E2667D73; Thu, 23 Feb 2017 19:14:01 +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 v1NJE1Ia020587; Thu, 23 Feb 2017 19:14:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJE1wZ020586; Thu, 23 Feb 2017 19:14:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231914.v1NJE1wZ020586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314171 - vendor/clang/clang-release_40-r296002 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: Thu, 23 Feb 2017 19:14:02 -0000 Author: dim Date: Thu Feb 23 19:14:00 2017 New Revision: 314171 URL: https://svnweb.freebsd.org/changeset/base/314171 Log: Tag clang release_40 branch r296002. Added: vendor/clang/clang-release_40-r296002/ - copied from r314170, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:14: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 B4733CE9DB7; Thu, 23 Feb 2017 19:14:06 +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 6707EDFC; Thu, 23 Feb 2017 19:14: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 v1NJE521020636; Thu, 23 Feb 2017 19:14:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJE58p020635; Thu, 23 Feb 2017 19:14:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231914.v1NJE58p020635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314172 - vendor/compiler-rt/compiler-rt-release_40-r296002 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: Thu, 23 Feb 2017 19:14:06 -0000 Author: dim Date: Thu Feb 23 19:14:05 2017 New Revision: 314172 URL: https://svnweb.freebsd.org/changeset/base/314172 Log: Tag compiler-rt release_40 branch r296002. Added: vendor/compiler-rt/compiler-rt-release_40-r296002/ - copied from r314171, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:14: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 4221ACE9DF3; Thu, 23 Feb 2017 19:14:10 +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 E7455E5F; Thu, 23 Feb 2017 19:14:09 +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 v1NJE99d020682; Thu, 23 Feb 2017 19:14:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJE9ks020681; Thu, 23 Feb 2017 19:14:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231914.v1NJE9ks020681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314173 - vendor/libc++/libc++-release_40-r296002 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: Thu, 23 Feb 2017 19:14:10 -0000 Author: dim Date: Thu Feb 23 19:14:08 2017 New Revision: 314173 URL: https://svnweb.freebsd.org/changeset/base/314173 Log: Tag libc++ release_40 branch r296002. Added: vendor/libc++/libc++-release_40-r296002/ - copied from r314172, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:14: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 37A5DCE9E31; Thu, 23 Feb 2017 19:14:14 +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 E2FB5ED7; Thu, 23 Feb 2017 19:14:13 +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 v1NJEDWA020731; Thu, 23 Feb 2017 19:14:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJEDaO020730; Thu, 23 Feb 2017 19:14:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231914.v1NJEDaO020730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314174 - vendor/lld/lld-release_40-r296002 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: Thu, 23 Feb 2017 19:14:14 -0000 Author: dim Date: Thu Feb 23 19:14:12 2017 New Revision: 314174 URL: https://svnweb.freebsd.org/changeset/base/314174 Log: Tag lld release_40 branch r296002. Added: vendor/lld/lld-release_40-r296002/ - copied from r314173, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:14: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 B7E78CE9E94; Thu, 23 Feb 2017 19:14:17 +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 6D04DF3F; Thu, 23 Feb 2017 19:14:17 +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 v1NJEGe5020777; Thu, 23 Feb 2017 19:14:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJEG3p020776; Thu, 23 Feb 2017 19:14:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231914.v1NJEG3p020776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314175 - vendor/lldb/lldb-release_40-r296002 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: Thu, 23 Feb 2017 19:14:17 -0000 Author: dim Date: Thu Feb 23 19:14:16 2017 New Revision: 314175 URL: https://svnweb.freebsd.org/changeset/base/314175 Log: Tag lldb release_40 branch r296002. Added: vendor/lldb/lldb-release_40-r296002/ - copied from r314174, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Thu Feb 23 19:20: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 E6537CEB06A; Thu, 23 Feb 2017 19:20:12 +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 B5D431744; Thu, 23 Feb 2017 19:20:09 +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 BCA9C10A791; Thu, 23 Feb 2017 14:20:08 -0500 (EST) From: John Baldwin To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r314159 - in vendor/llvm/dist: docs lib/CodeGen/AsmPrinter lib/Target/AArch64 lib/Target/ARM lib/Transforms/Scalar test/CodeGen/AArch64 test/CodeGen/ARM test/DebugInfo/X86 Date: Thu, 23 Feb 2017 11:19:37 -0800 Message-ID: <1703688.vyXtOOnUP2@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201702231902.v1NJ23Fq013734@repo.freebsd.org> References: <201702231902.v1NJ23Fq013734@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); Thu, 23 Feb 2017 14:20:08 -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: Thu, 23 Feb 2017 19:20:13 -0000 On Thursday, February 23, 2017 07:02:03 PM Dimitry Andric wrote: > Author: dim > Date: Thu Feb 23 19:02:03 2017 > New Revision: 314159 > URL: https://svnweb.freebsd.org/changeset/base/314159 > > Log: > Vendor import of llvm release_40 branch r295910: > https://llvm.org/svn/llvm-project/llvm/branches/release_40@295910 > > Added: > vendor/llvm/dist/test/CodeGen/ARM/aeabi-read-tp.ll > vendor/llvm/dist/test/DebugInfo/X86/FrameIndexExprs.ll > Modified: > vendor/llvm/dist/docs/ReleaseNotes.rst > vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp > vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp > vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h > vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp > vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp > vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp > vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir Congratulations! 3.141592653589793238462643383279 5028841971693993751058209749445923 07816406286208998628034825342117067 9821 48086 5132 823 06647 09384 46 09550 58223 17 25359 4081 2848 1117 4502 8410 2701 9385 21105 55964 46229 48954 9303 81964 4288 10975 66593 34461 284756 48233 78678 31652 71 2019091 456485 66 9234603 48610454326648 2133936 0726024914127 3724587 00660631558 817488 152092096 -- John Baldwin From owner-svn-src-all@freebsd.org Thu Feb 23 19:21: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 C75D1CEB1D8; Thu, 23 Feb 2017 19:21:49 +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 63587199A; Thu, 23 Feb 2017 19:21:49 +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 v1NJLmm2024868; Thu, 23 Feb 2017 19:21:48 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJLm0i024862; Thu, 23 Feb 2017 19:21:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201702231921.v1NJLm0i024862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 23 Feb 2017 19:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314176 - head/contrib/ofed/libcxgb4/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 19:21:49 -0000 Author: np Date: Thu Feb 23 19:21:47 2017 New Revision: 314176 URL: https://svnweb.freebsd.org/changeset/base/314176 Log: Add support for RDMA from userspace with T6 cards. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: head/contrib/ofed/libcxgb4/src/dev.c head/contrib/ofed/libcxgb4/src/qp.c head/contrib/ofed/libcxgb4/src/t4.h head/contrib/ofed/libcxgb4/src/t4_chip_type.h head/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h head/contrib/ofed/libcxgb4/src/t4_regs.h head/contrib/ofed/libcxgb4/src/verbs.c Modified: head/contrib/ofed/libcxgb4/src/dev.c ============================================================================== --- head/contrib/ofed/libcxgb4/src/dev.c Thu Feb 23 19:14:16 2017 (r314175) +++ head/contrib/ofed/libcxgb4/src/dev.c Thu Feb 23 19:21:47 2017 (r314176) @@ -145,10 +145,10 @@ static struct ibv_context *c4iw_alloc_co context->ibv_ctx.ops = c4iw_ctx_ops; switch (rhp->chip_version) { + case CHELSIO_T6: case CHELSIO_T5: - PDBG("%s T5/T4 device\n", __FUNCTION__); case CHELSIO_T4: - PDBG("%s T4 device\n", __FUNCTION__); + PDBG("%s T%d device\n", __FUNCTION__, rhp->chip_version); context->ibv_ctx.ops.async_event = c4iw_async_event; context->ibv_ctx.ops.post_send = c4iw_post_send; context->ibv_ctx.ops.post_recv = c4iw_post_receive; @@ -390,29 +390,26 @@ static struct ibv_device *cxgb4_driver_i int abi_version) { char devstr[IBV_SYSFS_PATH_MAX], ibdev[16], value[128], *cp; - char t5nexstr[IBV_SYSFS_PATH_MAX]; + char dev_str[IBV_SYSFS_PATH_MAX]; struct c4iw_dev *dev; unsigned vendor, device, fw_maj, fw_min; int i; - char devnum=0; + char devnum; char ib_param[16]; #ifndef __linux__ if (ibv_read_sysfs_file(uverbs_sys_path, "ibdev", ibdev, sizeof ibdev) < 0) return NULL; - /* - * Extract the non-numeric part of ibdev - * say "t5nex0" -> devname=="t5nex", devnum=0 - */ - if (strstr(ibdev,"t5nex")) { - devnum = atoi(ibdev+strlen("t5nex")); - sprintf(t5nexstr, "/dev/t5nex/%d", devnum); + + if (ibdev[0] == 't' && ibdev[1] >= '4' && ibdev[1] <= '6' && + strstr(&ibdev[2], "nex") && (devnum = atoi(&ibdev[5])) >= 0) { + snprintf(dev_str, sizeof(dev_str), "/dev/t%cnex/%d", ibdev[1], + devnum); } else return NULL; - if (ibv_read_sysfs_file(t5nexstr, "\%pnpinfo", - value, sizeof value) < 0) + if (ibv_read_sysfs_file(dev_str, "\%pnpinfo", value, sizeof value) < 0) return NULL; else { if (strstr(value,"vendor=")) { @@ -449,7 +446,7 @@ found: #ifndef __linux__ - if (ibv_read_sysfs_file(t5nexstr, "firmware_version", + if (ibv_read_sysfs_file(dev_str, "firmware_version", value, sizeof value) < 0) return NULL; #else Modified: head/contrib/ofed/libcxgb4/src/qp.c ============================================================================== --- head/contrib/ofed/libcxgb4/src/qp.c Thu Feb 23 19:14:16 2017 (r314175) +++ head/contrib/ofed/libcxgb4/src/qp.c Thu Feb 23 19:21:47 2017 (r314176) @@ -393,7 +393,7 @@ int c4iw_post_send(struct ibv_qp *ibqp, idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); } - t4_ring_sq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_sq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.sq.queue[qhp->wq.sq.size].status.host_wq_pidx = \ (qhp->wq.sq.wq_pidx); @@ -457,7 +457,7 @@ int c4iw_post_receive(struct ibv_qp *ibq num_wrs--; } - t4_ring_rq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_rq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.rq.queue[qhp->wq.rq.size].status.host_wq_pidx = \ (qhp->wq.rq.wq_pidx); Modified: head/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- head/contrib/ofed/libcxgb4/src/t4.h Thu Feb 23 19:14:16 2017 (r314175) +++ head/contrib/ofed/libcxgb4/src/t4.h Thu Feb 23 19:21:47 2017 (r314176) @@ -484,11 +484,11 @@ static void copy_wqe_to_udb(volatile u32 extern int ma_wr; extern int t5_en_wc; -static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->sq.pidx = %d; len16=%d\n", __func__, wq->sq.pidx, len16); @@ -517,11 +517,11 @@ static inline void t4_ring_sq_db(struct writel(V_QID(wq->sq.qid & wq->qid_mask) | V_PIDX(inc), wq->sq.udb); } -static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_recv_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->rq.pidx = %d; len16=%d\n", __func__, wq->rq.pidx, len16); Modified: head/contrib/ofed/libcxgb4/src/t4_chip_type.h ============================================================================== --- head/contrib/ofed/libcxgb4/src/t4_chip_type.h Thu Feb 23 19:14:16 2017 (r314175) +++ head/contrib/ofed/libcxgb4/src/t4_chip_type.h Thu Feb 23 19:21:47 2017 (r314176) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2016 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -30,6 +30,8 @@ #define CHELSIO_T4_FPGA 0xa #define CHELSIO_T5 0x5 #define CHELSIO_T5_FPGA 0xb +#define CHELSIO_T6 0x6 +#define CHELSIO_T6_FPGA 0xc /* * Translate a PCI Device ID to a base Chelsio Chip Version -- CHELSIO_T4, @@ -43,11 +45,25 @@ * Finally: This will of course need to be expanded as future chips are * developed. */ -#define CHELSIO_PCI_ID_CHIP_VERSION(__DeviceID) \ - (CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4 || \ - CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4_FPGA \ - ? CHELSIO_T4 \ - : CHELSIO_T5) +static inline unsigned int +CHELSIO_PCI_ID_CHIP_VERSION(unsigned int DeviceID) +{ + switch (CHELSIO_PCI_ID_VER(DeviceID)) { + case CHELSIO_T4: + case CHELSIO_T4_FPGA: + return CHELSIO_T4; + + case CHELSIO_T5: + case CHELSIO_T5_FPGA: + return CHELSIO_T5; + + case CHELSIO_T6: + case CHELSIO_T6_FPGA: + return CHELSIO_T6; + } + + return 0; +} /* * Internally we code the Chelsio T4 Family "Chip Code" as a tuple: @@ -72,9 +88,13 @@ enum chip_type { T4_LAST_REV = T4_A2, T5_A0 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), - T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), + T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 1), T5_FIRST_REV = T5_A0, T5_LAST_REV = T5_A1, + + T6_A0 = CHELSIO_CHIP_CODE(CHELSIO_T6, 0), + T6_FIRST_REV = T6_A0, + T6_LAST_REV = T6_A0, }; static inline int is_t4(enum chip_type chip) @@ -88,6 +108,11 @@ static inline int is_t5(enum chip_type c return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T5); } +static inline int is_t6(enum chip_type chip) +{ + return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T6); +} + static inline int is_fpga(enum chip_type chip) { return chip & CHELSIO_CHIP_FPGA; Modified: head/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h ============================================================================== --- head/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Thu Feb 23 19:14:16 2017 (r314175) +++ head/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Thu Feb 23 19:21:47 2017 (r314176) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2017 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -44,7 +44,6 @@ * -- If defined, indicates that the OS Driver has support for Bypass * -- Adapters. */ -#ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN /* * Some sanity checks ... @@ -96,10 +95,13 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_ENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_ENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ #else CH_PCI_ID_TABLE_FENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -108,6 +110,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN #if ((CH_PCI_DEVICE_ID_FUNCTION == 5) || (CH_PCI_DEVICE_ID_FUNCTION == 6)) CH_PCI_ID_TABLE_ENTRY(0xa001), /* PF1 PE10K FPGA FCOE */ CH_PCI_ID_TABLE_ENTRY(0xa002), /* PE10K FPGA iSCSI */ + CH_PCI_ID_TABLE_ENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -166,10 +169,50 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */ CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */ CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */ + CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5018), /* T540-BT */ CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */ CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom SECA */ + CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */ + CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x509A), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x509B), /* Custom T540-CR LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR SFP+ LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR SFP+ */ + + /* T6 adapter */ + CH_PCI_ID_TABLE_FENTRY(0x6000), + CH_PCI_ID_TABLE_FENTRY(0x6001), + CH_PCI_ID_TABLE_FENTRY(0x6002), + CH_PCI_ID_TABLE_FENTRY(0x6003), + CH_PCI_ID_TABLE_FENTRY(0x6004), + CH_PCI_ID_TABLE_FENTRY(0x6005), + CH_PCI_ID_TABLE_FENTRY(0x6006), + CH_PCI_ID_TABLE_FENTRY(0x6007), + CH_PCI_ID_TABLE_FENTRY(0x6008), + CH_PCI_ID_TABLE_FENTRY(0x6009), + CH_PCI_ID_TABLE_FENTRY(0x600d), + CH_PCI_ID_TABLE_FENTRY(0x6010), + CH_PCI_ID_TABLE_FENTRY(0x6011), + CH_PCI_ID_TABLE_FENTRY(0x6014), + CH_PCI_ID_TABLE_FENTRY(0x6015), CH_PCI_DEVICE_ID_TABLE_DEFINE_END; -#endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */ - #endif /* __T4_PCI_ID_TBL_H__ */ Modified: head/contrib/ofed/libcxgb4/src/t4_regs.h ============================================================================== --- head/contrib/ofed/libcxgb4/src/t4_regs.h Thu Feb 23 19:14:16 2017 (r314175) +++ head/contrib/ofed/libcxgb4/src/t4_regs.h Thu Feb 23 19:21:47 2017 (r314176) @@ -1,4 +1,8 @@ /* This file is automatically generated --- changes will be lost */ +/* Generation Date : Fri Oct 28 19:22:40 IST 2016 */ +/* Directory name: t4_reg.txt, Changeset: */ +/* Directory name: t5_reg.txt, Changeset: 6938:9111c5bdce6e */ +/* Directory name: t6_reg.txt, Changeset: 4252:437fb8972e44 */ #define MYPF_BASE 0x1b000 #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr)) @@ -339,9 +343,141 @@ #define EDC_H_ECC_ERR_DATA_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) #define NUM_EDC_H_ECC_ERR_DATA_INSTANCES 16 +#define SGE_DEBUG1_DBP_THREAD(idx) (A_SGE_DEBUG1_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG1_DBP_THREAD_INSTANCES 4 + +#define SGE_DEBUG0_DBP_THREAD(idx) (A_SGE_DEBUG0_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG0_DBP_THREAD_INSTANCES 5 + +#define SGE_WC_EGRS_BAR2_OFF_PF(idx) (A_SGE_WC_EGRS_BAR2_OFF_PF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_PF_INSTANCES 8 + +#define SGE_WC_EGRS_BAR2_OFF_VF(idx) (A_SGE_WC_EGRS_BAR2_OFF_VF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_VF_INSTANCES 8 + +#define PCIE_T6_DMA_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_DMA_INSTANCES 2 + +#define PCIE_T6_CMD_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_CMD_INSTANCES 1 + +#define PCIE_VF_256_INT_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_PCIE_VF_256_INT_INSTANCES 128 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_PORT_VLAN(idx) (A_MPS_CLS_REQUEST_TRACE_PORT_VLAN + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_PORT_VLAN_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_ENCAP(idx) (A_MPS_CLS_REQUEST_TRACE_ENCAP + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_ENCAP_INSTANCES 8 + +#define MPS_CLS_RESULT_TRACE(idx) (A_MPS_CLS_RESULT_TRACE + (idx) * 4) +#define NUM_MPS_CLS_RESULT_TRACE_INSTANCES 8 + +#define MPS_CLS_DIPIPV4_ID_TABLE(idx) (A_MPS_CLS_DIPIPV4_ID_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_ID_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV4_MASK_TABLE(idx) (A_MPS_CLS_DIPIPV4_MASK_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_MASK_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV6ID_0_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_1_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_2_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_3_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_3_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_0_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_1_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_2_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_3_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_3_TABLE_INSTANCES 2 + +#define MPS_RX_HASH_LKP_TABLE(idx) (A_MPS_RX_HASH_LKP_TABLE + (idx) * 4) +#define NUM_MPS_RX_HASH_LKP_TABLE_INSTANCES 4 + +#define LE_DB_DBG_MATCH_DATA_MASK(idx) (A_LE_DB_DBG_MATCH_DATA_MASK + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_MASK_INSTANCES 8 + +#define LE_DB_DBG_MATCH_DATA(idx) (A_LE_DB_DBG_MATCH_DATA + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_INSTANCES 8 + +#define LE_DB_DBGI_REQ_DATA_T6(idx) (A_LE_DB_DBGI_REQ_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_DATA_T6_INSTANCES 11 + +#define LE_DB_DBGI_REQ_MASK_T6(idx) (A_LE_DB_DBGI_REQ_MASK + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_MASK_T6_INSTANCES 11 + +#define LE_DB_DBGI_RSP_DATA_T6(idx) (A_LE_DB_DBGI_RSP_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_RSP_DATA_T6_INSTANCES 11 + +#define LE_DB_ACTIVE_MASK_IPV6_T6(idx) (A_LE_DB_ACTIVE_MASK_IPV6 + (idx) * 4) +#define NUM_LE_DB_ACTIVE_MASK_IPV6_T6_INSTANCES 8 + +#define LE_HASH_MASK_GEN_IPV4T6(idx) (A_LE_HASH_MASK_GEN_IPV4T5 + (idx) * 4) +#define NUM_LE_HASH_MASK_GEN_IPV4T6_INSTANCES 8 + +#define T6_LE_HASH_MASK_GEN_IPV6T5(idx) (A_T6_LE_HASH_MASK_GEN_IPV6T5 + (idx) * 4) +#define NUM_T6_LE_HASH_MASK_GEN_IPV6T5_INSTANCES 8 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV4_INSTANCES 3 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV4_INSTANCES 2 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV6_INSTANCES 9 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV6_INSTANCES 2 + +#define LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6(idx) (A_LE_DB_SECOND_GEN_HASH_MASK_IPV4 + (idx) * 4) +#define NUM_LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6_INSTANCES 8 + +#define MC_DDRPHY_DP18_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 512) +#define NUM_MC_DDRPHY_DP18_T6_INSTANCES 9 + +#define MC_CE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_CE_ERR_DATA_T6_INSTANCES 16 + +#define MC_UE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_UE_ERR_DATA_T6_INSTANCES 16 + +#define CIM_CTL_MAILBOX_VF_STATUS_T6(idx) (A_CIM_CTL_MAILBOX_VF_STATUS + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VF_STATUS_T6_INSTANCES 8 + +#define CIM_CTL_MAILBOX_VFN_CTL_T6(idx) (A_CIM_CTL_MAILBOX_VFN_CTL + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VFN_CTL_T6_INSTANCES 256 + #define EDC_STRIDE (EDC_1_BASE_ADDR - EDC_0_BASE_ADDR) #define EDC_REG(reg, idx) (reg + EDC_STRIDE * idx) +#define EDC_T5_STRIDE (EDC_T51_BASE_ADDR - EDC_T50_BASE_ADDR) +#define EDC_T5_REG(reg, idx) (reg + EDC_T5_STRIDE * idx) + /* registers for module SGE */ #define SGE_BASE_ADDR 0x1000 @@ -372,6 +508,10 @@ #define V_PIDX_T5(x) ((x) << S_PIDX_T5) #define G_PIDX_T5(x) (((x) >> S_PIDX_T5) & M_PIDX_T5) +#define S_SYNC_T6 14 +#define V_SYNC_T6(x) ((x) << S_SYNC_T6) +#define F_SYNC_T6 V_SYNC_T6(1U) + #define A_SGE_PF_GTS 0x4 #define S_INGRESSQID 16 @@ -764,6 +904,14 @@ #define V_PERR_PC_CHPI_RSP2(x) ((x) << S_PERR_PC_CHPI_RSP2) #define F_PERR_PC_CHPI_RSP2 V_PERR_PC_CHPI_RSP2(1U) +#define S_PERR_PC_RSP 23 +#define V_PERR_PC_RSP(x) ((x) << S_PERR_PC_RSP) +#define F_PERR_PC_RSP V_PERR_PC_RSP(1U) + +#define S_PERR_PC_REQ 22 +#define V_PERR_PC_REQ(x) ((x) << S_PERR_PC_REQ) +#define F_PERR_PC_REQ V_PERR_PC_REQ(1U) + #define A_SGE_INT_ENABLE1 0x1028 #define A_SGE_PERR_ENABLE1 0x102c #define A_SGE_INT_CAUSE2 0x1030 @@ -908,6 +1056,26 @@ #define V_PERR_PC_DBP2(x) ((x) << S_PERR_PC_DBP2) #define F_PERR_PC_DBP2 V_PERR_PC_DBP2(1U) +#define S_DEQ_LL_PERR 21 +#define V_DEQ_LL_PERR(x) ((x) << S_DEQ_LL_PERR) +#define F_DEQ_LL_PERR V_DEQ_LL_PERR(1U) + +#define S_ENQ_PERR 20 +#define V_ENQ_PERR(x) ((x) << S_ENQ_PERR) +#define F_ENQ_PERR V_ENQ_PERR(1U) + +#define S_DEQ_OUT_PERR 19 +#define V_DEQ_OUT_PERR(x) ((x) << S_DEQ_OUT_PERR) +#define F_DEQ_OUT_PERR V_DEQ_OUT_PERR(1U) + +#define S_BUF_PERR 18 +#define V_BUF_PERR(x) ((x) << S_BUF_PERR) +#define F_BUF_PERR V_BUF_PERR(1U) + +#define S_PERR_DB_FIFO 3 +#define V_PERR_DB_FIFO(x) ((x) << S_PERR_DB_FIFO) +#define F_PERR_DB_FIFO V_PERR_DB_FIFO(1U) + #define A_SGE_INT_ENABLE2 0x1034 #define A_SGE_PERR_ENABLE2 0x1038 #define A_SGE_INT_CAUSE3 0x103c @@ -1040,6 +1208,14 @@ #define V_ERR_INV_CTXT0(x) ((x) << S_ERR_INV_CTXT0) #define F_ERR_INV_CTXT0 V_ERR_INV_CTXT0(1U) +#define S_DBP_TBUF_FULL 8 +#define V_DBP_TBUF_FULL(x) ((x) << S_DBP_TBUF_FULL) +#define F_DBP_TBUF_FULL V_DBP_TBUF_FULL(1U) + +#define S_FATAL_WRE_LEN 7 +#define V_FATAL_WRE_LEN(x) ((x) << S_FATAL_WRE_LEN) +#define F_FATAL_WRE_LEN V_FATAL_WRE_LEN(1U) + #define A_SGE_INT_ENABLE3 0x1040 #define A_SGE_FL_BUFFER_SIZE0 0x1044 @@ -1048,21 +1224,116 @@ #define V_SIZE(x) ((x) << S_SIZE) #define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE1 0x1048 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE2 0x104c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE3 0x1050 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE4 0x1054 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE5 0x1058 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE6 0x105c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE7 0x1060 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE8 0x1064 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE9 0x1068 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE10 0x106c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE11 0x1070 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE12 0x1074 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE13 0x1078 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE14 0x107c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE15 0x1080 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_DBQ_CTXT_BADDR 0x1084 #define S_BASEADDR 3 @@ -1117,6 +1388,15 @@ #define V_CREDITCNTPACKING(x) ((x) << S_CREDITCNTPACKING) #define G_CREDITCNTPACKING(x) (((x) >> S_CREDITCNTPACKING) & M_CREDITCNTPACKING) +#define S_NULLPTR 20 +#define M_NULLPTR 0xfU +#define V_NULLPTR(x) ((x) << S_NULLPTR) +#define G_NULLPTR(x) (((x) >> S_NULLPTR) & M_NULLPTR) + +#define S_NULLPTREN 19 +#define V_NULLPTREN(x) ((x) << S_NULLPTREN) +#define F_NULLPTREN V_NULLPTREN(1U) + #define A_SGE_CONM_CTRL 0x1094 #define S_EGRTHRESHOLD 8 @@ -1142,6 +1422,16 @@ #define V_EGRTHRESHOLDPACKING(x) ((x) << S_EGRTHRESHOLDPACKING) #define G_EGRTHRESHOLDPACKING(x) (((x) >> S_EGRTHRESHOLDPACKING) & M_EGRTHRESHOLDPACKING) +#define S_T6_EGRTHRESHOLDPACKING 16 +#define M_T6_EGRTHRESHOLDPACKING 0xffU +#define V_T6_EGRTHRESHOLDPACKING(x) ((x) << S_T6_EGRTHRESHOLDPACKING) +#define G_T6_EGRTHRESHOLDPACKING(x) (((x) >> S_T6_EGRTHRESHOLDPACKING) & M_T6_EGRTHRESHOLDPACKING) + +#define S_T6_EGRTHRESHOLD 8 +#define M_T6_EGRTHRESHOLD 0xffU +#define V_T6_EGRTHRESHOLD(x) ((x) << S_T6_EGRTHRESHOLD) +#define G_T6_EGRTHRESHOLD(x) (((x) >> S_T6_EGRTHRESHOLD) & M_T6_EGRTHRESHOLD) + #define A_SGE_TIMESTAMP_LO 0x1098 #define A_SGE_TIMESTAMP_HI 0x109c @@ -1217,6 +1507,21 @@ #define V_LP_COUNT_T5(x) ((x) << S_LP_COUNT_T5) #define G_LP_COUNT_T5(x) (((x) >> S_LP_COUNT_T5) & M_LP_COUNT_T5) +#define S_VFIFO_CNT 15 +#define M_VFIFO_CNT 0x1ffffU +#define V_VFIFO_CNT(x) ((x) << S_VFIFO_CNT) +#define G_VFIFO_CNT(x) (((x) >> S_VFIFO_CNT) & M_VFIFO_CNT) + +#define S_COAL_CTL_FIFO_CNT 8 +#define M_COAL_CTL_FIFO_CNT 0x3fU +#define V_COAL_CTL_FIFO_CNT(x) ((x) << S_COAL_CTL_FIFO_CNT) +#define G_COAL_CTL_FIFO_CNT(x) (((x) >> S_COAL_CTL_FIFO_CNT) & M_COAL_CTL_FIFO_CNT) + +#define S_MERGE_FIFO_CNT 0 +#define M_MERGE_FIFO_CNT 0x3fU +#define V_MERGE_FIFO_CNT(x) ((x) << S_MERGE_FIFO_CNT) +#define G_MERGE_FIFO_CNT(x) (((x) >> S_MERGE_FIFO_CNT) & M_MERGE_FIFO_CNT) + #define A_SGE_DOORBELL_CONTROL 0x10a8 #define S_HINTDEPTHCTL 27 @@ -1286,6 +1591,32 @@ #define V_DROPPED_DB(x) ((x) << S_DROPPED_DB) #define F_DROPPED_DB V_DROPPED_DB(1U) +#define S_T6_DROP_TIMEOUT 7 +#define M_T6_DROP_TIMEOUT 0x3fU +#define V_T6_DROP_TIMEOUT(x) ((x) << S_T6_DROP_TIMEOUT) +#define G_T6_DROP_TIMEOUT(x) (((x) >> S_T6_DROP_TIMEOUT) & M_T6_DROP_TIMEOUT) + +#define S_INVONDBSYNC 6 +#define V_INVONDBSYNC(x) ((x) << S_INVONDBSYNC) +#define F_INVONDBSYNC V_INVONDBSYNC(1U) + +#define S_INVONGTSSYNC 5 +#define V_INVONGTSSYNC(x) ((x) << S_INVONGTSSYNC) +#define F_INVONGTSSYNC V_INVONGTSSYNC(1U) + +#define S_DB_DBG_EN 4 +#define V_DB_DBG_EN(x) ((x) << S_DB_DBG_EN) +#define F_DB_DBG_EN V_DB_DBG_EN(1U) + +#define S_GTS_DBG_TIMER_REG 1 +#define M_GTS_DBG_TIMER_REG 0x7U +#define V_GTS_DBG_TIMER_REG(x) ((x) << S_GTS_DBG_TIMER_REG) +#define G_GTS_DBG_TIMER_REG(x) (((x) >> S_GTS_DBG_TIMER_REG) & M_GTS_DBG_TIMER_REG) + +#define S_GTS_DBG_EN 0 +#define V_GTS_DBG_EN(x) ((x) << S_GTS_DBG_EN) +#define F_GTS_DBG_EN V_GTS_DBG_EN(1U) + #define A_SGE_DROPPED_DOORBELL 0x10ac #define A_SGE_DOORBELL_THROTTLE_CONTROL 0x10b0 @@ -1331,6 +1662,11 @@ #define V_LL_READ_WAIT_DISABLE(x) ((x) << S_LL_READ_WAIT_DISABLE) #define F_LL_READ_WAIT_DISABLE V_LL_READ_WAIT_DISABLE(1U) +#define S_TSCALE 28 +#define M_TSCALE 0xfU +#define V_TSCALE(x) ((x) << S_TSCALE) +#define G_TSCALE(x) (((x) >> S_TSCALE) & M_TSCALE) + #define A_SGE_TIMER_VALUE_0_AND_1 0x10b8 #define S_TIMERVALUE0 16 @@ -1397,6 +1733,39 @@ #define V_MAXRSPCNT1(x) ((x) << S_MAXRSPCNT1) #define G_MAXRSPCNT1(x) (((x) >> S_MAXRSPCNT1) & M_MAXRSPCNT1) +#define A_SGE_GK_CONTROL 0x10c4 + +#define S_EN_FLM_FIFTH 29 +#define V_EN_FLM_FIFTH(x) ((x) << S_EN_FLM_FIFTH) +#define F_EN_FLM_FIFTH V_EN_FLM_FIFTH(1U) + +#define S_FL_PROG_THRESH 20 +#define M_FL_PROG_THRESH 0x1ffU +#define V_FL_PROG_THRESH(x) ((x) << S_FL_PROG_THRESH) +#define G_FL_PROG_THRESH(x) (((x) >> S_FL_PROG_THRESH) & M_FL_PROG_THRESH) + +#define S_COAL_ALL_THREAD 19 +#define V_COAL_ALL_THREAD(x) ((x) << S_COAL_ALL_THREAD) +#define F_COAL_ALL_THREAD V_COAL_ALL_THREAD(1U) + +#define S_EN_PSHB 18 +#define V_EN_PSHB(x) ((x) << S_EN_PSHB) +#define F_EN_PSHB V_EN_PSHB(1U) + +#define S_EN_DB_FIFTH 17 +#define V_EN_DB_FIFTH(x) ((x) << S_EN_DB_FIFTH) +#define F_EN_DB_FIFTH V_EN_DB_FIFTH(1U) + +#define S_DB_PROG_THRESH 8 +#define M_DB_PROG_THRESH 0x1ffU +#define V_DB_PROG_THRESH(x) ((x) << S_DB_PROG_THRESH) +#define G_DB_PROG_THRESH(x) (((x) >> S_DB_PROG_THRESH) & M_DB_PROG_THRESH) + +#define S_100NS_TIMER 0 +#define M_100NS_TIMER 0xffU +#define V_100NS_TIMER(x) ((x) << S_100NS_TIMER) +#define G_100NS_TIMER(x) (((x) >> S_100NS_TIMER) & M_100NS_TIMER) + #define A_SGE_PD_RSP_CREDIT23 0x10c8 #define S_RSPCREDITEN2 31 @@ -1427,6 +1796,23 @@ #define V_MAXRSPCNT3(x) ((x) << S_MAXRSPCNT3) #define G_MAXRSPCNT3(x) (((x) >> S_MAXRSPCNT3) & M_MAXRSPCNT3) +#define A_SGE_GK_CONTROL2 0x10c8 + +#define S_DBQ_TIMER_TICK 16 +#define M_DBQ_TIMER_TICK 0xffffU +#define V_DBQ_TIMER_TICK(x) ((x) << S_DBQ_TIMER_TICK) +#define G_DBQ_TIMER_TICK(x) (((x) >> S_DBQ_TIMER_TICK) & M_DBQ_TIMER_TICK) + +#define S_FL_MERGE_CNT_THRESH 8 +#define M_FL_MERGE_CNT_THRESH 0xfU +#define V_FL_MERGE_CNT_THRESH(x) ((x) << S_FL_MERGE_CNT_THRESH) +#define G_FL_MERGE_CNT_THRESH(x) (((x) >> S_FL_MERGE_CNT_THRESH) & M_FL_MERGE_CNT_THRESH) + +#define S_MERGE_CNT_THRESH 0 +#define M_MERGE_CNT_THRESH 0x3fU +#define V_MERGE_CNT_THRESH(x) ((x) << S_MERGE_CNT_THRESH) +#define G_MERGE_CNT_THRESH(x) (((x) >> S_MERGE_CNT_THRESH) & M_MERGE_CNT_THRESH) + #define A_SGE_DEBUG_INDEX 0x10cc #define A_SGE_DEBUG_DATA_HIGH 0x10d0 #define A_SGE_DEBUG_DATA_LOW 0x10d4 @@ -1553,6 +1939,30 @@ #define V_ERR_RX_CPL_PACKET_SIZE0(x) ((x) << S_ERR_RX_CPL_PACKET_SIZE0) #define F_ERR_RX_CPL_PACKET_SIZE0 V_ERR_RX_CPL_PACKET_SIZE0(1U) +#define S_ERR_ISHIFT_UR1 31 +#define V_ERR_ISHIFT_UR1(x) ((x) << S_ERR_ISHIFT_UR1) +#define F_ERR_ISHIFT_UR1 V_ERR_ISHIFT_UR1(1U) + +#define S_ERR_ISHIFT_UR0 30 +#define V_ERR_ISHIFT_UR0(x) ((x) << S_ERR_ISHIFT_UR0) +#define F_ERR_ISHIFT_UR0 V_ERR_ISHIFT_UR0(1U) + +#define S_ERR_TH3_MAX_FETCH 14 +#define V_ERR_TH3_MAX_FETCH(x) ((x) << S_ERR_TH3_MAX_FETCH) +#define F_ERR_TH3_MAX_FETCH V_ERR_TH3_MAX_FETCH(1U) + +#define S_ERR_TH2_MAX_FETCH 13 +#define V_ERR_TH2_MAX_FETCH(x) ((x) << S_ERR_TH2_MAX_FETCH) +#define F_ERR_TH2_MAX_FETCH V_ERR_TH2_MAX_FETCH(1U) + +#define S_ERR_TH1_MAX_FETCH 12 +#define V_ERR_TH1_MAX_FETCH(x) ((x) << S_ERR_TH1_MAX_FETCH) +#define F_ERR_TH1_MAX_FETCH V_ERR_TH1_MAX_FETCH(1U) + +#define S_ERR_TH0_MAX_FETCH 11 +#define V_ERR_TH0_MAX_FETCH(x) ((x) << S_ERR_TH0_MAX_FETCH) +#define F_ERR_TH0_MAX_FETCH V_ERR_TH0_MAX_FETCH(1U) + #define A_SGE_INT_ENABLE4 0x10e0 #define A_SGE_STAT_TOTAL 0x10e4 #define A_SGE_STAT_MATCH 0x10e8 @@ -1587,6 +1997,11 @@ #define V_STATSOURCE_T5(x) ((x) << S_STATSOURCE_T5) #define G_STATSOURCE_T5(x) (((x) >> S_STATSOURCE_T5) & M_STATSOURCE_T5) +#define S_T6_STATMODE 0 +#define M_T6_STATMODE 0xfU +#define V_T6_STATMODE(x) ((x) << S_T6_STATMODE) +#define G_T6_STATMODE(x) (((x) >> S_T6_STATMODE) & M_T6_STATMODE) + #define A_SGE_HINT_CFG 0x10f0 #define S_HINTSALLOWEDNOHDR 6 @@ -1660,6 +2075,7 @@ #define V_MINTAG0(x) ((x) << S_MINTAG0) #define G_MINTAG0(x) (((x) >> S_MINTAG0) & M_MINTAG0) +#define A_SGE_IDMA0_DROP_CNT 0x1104 #define A_SGE_SHARED_TAG_POOL_CFG 0x1108 #define S_TAGPOOLTOTAL 0 @@ -1667,6 +2083,7 @@ #define V_TAGPOOLTOTAL(x) ((x) << S_TAGPOOLTOTAL) #define G_TAGPOOLTOTAL(x) (((x) >> S_TAGPOOLTOTAL) & M_TAGPOOLTOTAL) +#define A_SGE_IDMA1_DROP_CNT 0x1108 #define A_SGE_INT_CAUSE5 0x110c #define S_ERR_T_RXCRC 31 @@ -1963,6 +2380,90 @@ #define V_EDMA0_SLEEP_REQ(x) ((x) << S_EDMA0_SLEEP_REQ) #define F_EDMA0_SLEEP_REQ V_EDMA0_SLEEP_REQ(1U) +#define A_SGE_INT_CAUSE6 0x1128 + +#define S_ERR_DB_SYNC 21 +#define V_ERR_DB_SYNC(x) ((x) << S_ERR_DB_SYNC) +#define F_ERR_DB_SYNC V_ERR_DB_SYNC(1U) + +#define S_ERR_GTS_SYNC 20 +#define V_ERR_GTS_SYNC(x) ((x) << S_ERR_GTS_SYNC) +#define F_ERR_GTS_SYNC V_ERR_GTS_SYNC(1U) + +#define S_FATAL_LARGE_COAL 19 +#define V_FATAL_LARGE_COAL(x) ((x) << S_FATAL_LARGE_COAL) +#define F_FATAL_LARGE_COAL V_FATAL_LARGE_COAL(1U) + +#define S_PL_BAR2_FRM_ERR 18 +#define V_PL_BAR2_FRM_ERR(x) ((x) << S_PL_BAR2_FRM_ERR) +#define F_PL_BAR2_FRM_ERR V_PL_BAR2_FRM_ERR(1U) + +#define S_SILENT_DROP_TX_COAL 17 +#define V_SILENT_DROP_TX_COAL(x) ((x) << S_SILENT_DROP_TX_COAL) +#define F_SILENT_DROP_TX_COAL V_SILENT_DROP_TX_COAL(1U) + +#define S_ERR_INV_CTXT4 16 +#define V_ERR_INV_CTXT4(x) ((x) << S_ERR_INV_CTXT4) +#define F_ERR_INV_CTXT4 V_ERR_INV_CTXT4(1U) + +#define S_ERR_BAD_DB_PIDX4 15 +#define V_ERR_BAD_DB_PIDX4(x) ((x) << S_ERR_BAD_DB_PIDX4) +#define F_ERR_BAD_DB_PIDX4 V_ERR_BAD_DB_PIDX4(1U) + +#define S_ERR_BAD_UPFL_INC_CREDIT4 14 +#define V_ERR_BAD_UPFL_INC_CREDIT4(x) ((x) << S_ERR_BAD_UPFL_INC_CREDIT4) +#define F_ERR_BAD_UPFL_INC_CREDIT4 V_ERR_BAD_UPFL_INC_CREDIT4(1U) + +#define S_FATAL_TAG_MISMATCH 13 +#define V_FATAL_TAG_MISMATCH(x) ((x) << S_FATAL_TAG_MISMATCH) +#define F_FATAL_TAG_MISMATCH V_FATAL_TAG_MISMATCH(1U) + +#define S_FATAL_ENQ_CTL_RDY 12 +#define V_FATAL_ENQ_CTL_RDY(x) ((x) << S_FATAL_ENQ_CTL_RDY) +#define F_FATAL_ENQ_CTL_RDY V_FATAL_ENQ_CTL_RDY(1U) + +#define S_ERR_PC_RSP_LEN3 11 +#define V_ERR_PC_RSP_LEN3(x) ((x) << S_ERR_PC_RSP_LEN3) +#define F_ERR_PC_RSP_LEN3 V_ERR_PC_RSP_LEN3(1U) + +#define S_ERR_PC_RSP_LEN2 10 +#define V_ERR_PC_RSP_LEN2(x) ((x) << S_ERR_PC_RSP_LEN2) +#define F_ERR_PC_RSP_LEN2 V_ERR_PC_RSP_LEN2(1U) + +#define S_ERR_PC_RSP_LEN1 9 +#define V_ERR_PC_RSP_LEN1(x) ((x) << S_ERR_PC_RSP_LEN1) +#define F_ERR_PC_RSP_LEN1 V_ERR_PC_RSP_LEN1(1U) + +#define S_ERR_PC_RSP_LEN0 8 +#define V_ERR_PC_RSP_LEN0(x) ((x) << S_ERR_PC_RSP_LEN0) +#define F_ERR_PC_RSP_LEN0 V_ERR_PC_RSP_LEN0(1U) + +#define S_FATAL_ENQ2LL_VLD 7 +#define V_FATAL_ENQ2LL_VLD(x) ((x) << S_FATAL_ENQ2LL_VLD) +#define F_FATAL_ENQ2LL_VLD V_FATAL_ENQ2LL_VLD(1U) + +#define S_FATAL_LL_EMPTY 6 +#define V_FATAL_LL_EMPTY(x) ((x) << S_FATAL_LL_EMPTY) +#define F_FATAL_LL_EMPTY V_FATAL_LL_EMPTY(1U) + +#define S_FATAL_OFF_WDENQ 5 +#define V_FATAL_OFF_WDENQ(x) ((x) << S_FATAL_OFF_WDENQ) +#define F_FATAL_OFF_WDENQ V_FATAL_OFF_WDENQ(1U) + +#define S_FATAL_DEQ_DRDY 3 +#define M_FATAL_DEQ_DRDY 0x3U +#define V_FATAL_DEQ_DRDY(x) ((x) << S_FATAL_DEQ_DRDY) +#define G_FATAL_DEQ_DRDY(x) (((x) >> S_FATAL_DEQ_DRDY) & M_FATAL_DEQ_DRDY) + +#define S_FATAL_OUTP_DRDY 1 +#define M_FATAL_OUTP_DRDY 0x3U +#define V_FATAL_OUTP_DRDY(x) ((x) << S_FATAL_OUTP_DRDY) +#define G_FATAL_OUTP_DRDY(x) (((x) >> S_FATAL_OUTP_DRDY) & M_FATAL_OUTP_DRDY) + +#define S_FATAL_DEQ 0 +#define V_FATAL_DEQ(x) ((x) << S_FATAL_DEQ) +#define F_FATAL_DEQ V_FATAL_DEQ(1U) + #define A_SGE_DOORBELL_THROTTLE_THRESHOLD 0x112c #define S_THROTTLE_THRESHOLD_FL 16 @@ -1980,6 +2481,7 @@ #define V_THROTTLE_THRESHOLD_LP(x) ((x) << S_THROTTLE_THRESHOLD_LP) #define G_THROTTLE_THRESHOLD_LP(x) (((x) >> S_THROTTLE_THRESHOLD_LP) & M_THROTTLE_THRESHOLD_LP) +#define A_SGE_INT_ENABLE6 0x112c #define A_SGE_DBP_FETCH_THRESHOLD 0x1130 #define S_DBP_FETCH_THRESHOLD_FL 21 @@ -2037,6 +2539,11 @@ #define V_DBVFIFO_SIZE(x) ((x) << S_DBVFIFO_SIZE) #define G_DBVFIFO_SIZE(x) (((x) >> S_DBVFIFO_SIZE) & M_DBVFIFO_SIZE) +#define S_T6_DBVFIFO_SIZE 0 +#define M_T6_DBVFIFO_SIZE 0x1fffU +#define V_T6_DBVFIFO_SIZE(x) ((x) << S_T6_DBVFIFO_SIZE) +#define G_T6_DBVFIFO_SIZE(x) (((x) >> S_T6_DBVFIFO_SIZE) & M_T6_DBVFIFO_SIZE) + #define A_SGE_DBFIFO_STATUS3 0x1140 #define S_LP_PTRS_EQUAL 21 @@ -2064,6 +2571,18 @@ #define A_SGE_CHANGESET 0x1144 #define A_SGE_PC_RSP_ERROR 0x1148 +#define A_SGE_TBUF_CONTROL 0x114c + +#define S_DBPTBUFRSV1 9 +#define M_DBPTBUFRSV1 0x1ffU +#define V_DBPTBUFRSV1(x) ((x) << S_DBPTBUFRSV1) +#define G_DBPTBUFRSV1(x) (((x) >> S_DBPTBUFRSV1) & M_DBPTBUFRSV1) + +#define S_DBPTBUFRSV0 0 +#define M_DBPTBUFRSV0 0x1ffU +#define V_DBPTBUFRSV0(x) ((x) << S_DBPTBUFRSV0) +#define G_DBPTBUFRSV0(x) (((x) >> S_DBPTBUFRSV0) & M_DBPTBUFRSV0) + #define A_SGE_PC0_REQ_BIST_CMD 0x1180 #define A_SGE_PC0_REQ_BIST_ERROR_CNT 0x1184 #define A_SGE_PC1_REQ_BIST_CMD 0x1190 @@ -2109,6 +2628,115 @@ #define A_SGE_CTXT_MASK5 0x1234 #define A_SGE_CTXT_MASK6 0x1238 #define A_SGE_CTXT_MASK7 0x123c +#define A_SGE_QBASE_MAP0 0x1240 + +#define S_EGRESS0_SIZE 24 +#define M_EGRESS0_SIZE 0x1fU +#define V_EGRESS0_SIZE(x) ((x) << S_EGRESS0_SIZE) +#define G_EGRESS0_SIZE(x) (((x) >> S_EGRESS0_SIZE) & M_EGRESS0_SIZE) + +#define S_EGRESS1_SIZE 16 +#define M_EGRESS1_SIZE 0x1fU +#define V_EGRESS1_SIZE(x) ((x) << S_EGRESS1_SIZE) +#define G_EGRESS1_SIZE(x) (((x) >> S_EGRESS1_SIZE) & M_EGRESS1_SIZE) + +#define S_INGRESS0_SIZE 8 +#define M_INGRESS0_SIZE 0x1fU +#define V_INGRESS0_SIZE(x) ((x) << S_INGRESS0_SIZE) +#define G_INGRESS0_SIZE(x) (((x) >> S_INGRESS0_SIZE) & M_INGRESS0_SIZE) + +#define A_SGE_QBASE_MAP1 0x1244 + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 23 19:36: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 287FBCEB502; Thu, 23 Feb 2017 19:36:41 +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 DEEAB3F4; Thu, 23 Feb 2017 19:36:40 +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 v1NJae1M029414; Thu, 23 Feb 2017 19:36:40 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJadRa029404; Thu, 23 Feb 2017 19:36:39 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702231936.v1NJadRa029404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 23 Feb 2017 19:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 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, 23 Feb 2017 19:36:41 -0000 Author: vangyzen Date: Thu Feb 23 19:36:38 2017 New Revision: 314179 URL: https://svnweb.freebsd.org/changeset/base/314179 Log: Add sem_clockwait_np() This function allows the caller to specify the reference clock and choose between absolute and relative mode. In relative mode, the remaining time can be returned. The API is similar to clock_nanosleep(3). Thanks to Ed Schouten for that suggestion. While I'm here, reduce the sleep time in the semaphore "child" test to greatly reduce its runtime. Also add a reasonable timeout. Reviewed by: ed (userland) MFC after: 2 weeks Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9656 Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c head/include/semaphore.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/sem_new.c head/lib/libc/gen/sem_timedwait.3 head/lib/libc/include/namespace.h head/lib/libc/include/un-namespace.h head/share/man/man3/pthread_testcancel.3 head/sys/kern/kern_umtx.c Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c ============================================================================== --- head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Feb 23 19:32:25 2017 (r314178) +++ head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Feb 23 19:36:38 2017 (r314179) @@ -60,18 +60,24 @@ __COPYRIGHT("@(#) Copyright (c) 2008, 20 The NetBSD Foundation, inc. All rights reserved."); __RCSID("$NetBSD: t_sem.c,v 1.3 2017/01/14 20:58:20 christos Exp $"); +#include #include #include #include #include +#include #include +#include #include #include #define NCHILDREN 10 +#define SEM_REQUIRE(x) \ + ATF_REQUIRE_EQ_MSG(x, 0, "%s", strerror(errno)) + ATF_TC_WITH_CLEANUP(basic); ATF_TC_HEAD(basic, tc) { @@ -118,6 +124,7 @@ ATF_TC_HEAD(child, tc) { atf_tc_set_md_var(tc, "descr", "Checks using semaphores to synchronize " "parent with multiple child processes"); + atf_tc_set_md_var(tc, "timeout", "5"); } ATF_TC_BODY(child, tc) { @@ -153,7 +160,7 @@ ATF_TC_BODY(child, tc) } for (i = 0; i < NCHILDREN; i++) { - sleep(1); + usleep(100000); printf("main loop %d: posting...\n", j); ATF_REQUIRE_EQ(sem_post(sem_a), 0); } @@ -173,11 +180,151 @@ ATF_TC_CLEANUP(child, tc) (void)sem_unlink("/sem_a"); } +static inline void +timespec_add_ms(struct timespec *ts, int ms) +{ + ts->tv_nsec += ms * 1000*1000; + if (ts->tv_nsec > 1000*1000*1000) { + ts->tv_sec++; + ts->tv_nsec -= 1000*1000*1000; + } +} + +volatile sig_atomic_t got_sigalrm = 0; + +static void +sigalrm_handler(int sig __unused) +{ + got_sigalrm = 1; +} + +ATF_TC(timedwait); +ATF_TC_HEAD(timedwait, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests sem_timedwait(3)" +#ifdef __FreeBSD__ + " and sem_clockwait_np(3)" +#endif + ); + atf_tc_set_md_var(tc, "timeout", "20"); +} +ATF_TC_BODY(timedwait, tc) +{ + struct timespec ts; + sem_t sem; + int result; + + SEM_REQUIRE(sem_init(&sem, 0, 0)); + SEM_REQUIRE(sem_post(&sem)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_REALTIME, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + SEM_REQUIRE(sem_timedwait(&sem, &ts)); + ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&sem, &ts)); + ts.tv_sec--; + ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&sem, &ts)); + SEM_REQUIRE(sem_post(&sem)); + SEM_REQUIRE(sem_timedwait(&sem, &ts)); + + /* timespec validation, in the past */ + ts.tv_nsec += 1000*1000*1000; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + ts.tv_nsec = -1; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + /* timespec validation, in the future */ + ATF_REQUIRE_MSG(clock_gettime(CLOCK_REALTIME, &ts) == 0, + "%s", strerror(errno)); + ts.tv_sec++; + ts.tv_nsec = 1000*1000*1000; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + ts.tv_nsec = -1; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + + /* EINTR */ + struct sigaction act = { + .sa_handler = sigalrm_handler, + .sa_flags = 0 /* not SA_RESTART */ + }; + ATF_REQUIRE_MSG(sigemptyset(&act.sa_mask) == 0, + "%s", strerror(errno)); + ATF_REQUIRE_MSG(sigaction(SIGALRM, &act, NULL) == 0, + "%s", strerror(errno)); + struct itimerval it = { + .it_value.tv_usec = 50*1000 + }; + ATF_REQUIRE_MSG(setitimer(ITIMER_REAL, &it, NULL) == 0, + "%s", strerror(errno)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_REALTIME, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + ATF_REQUIRE_ERRNO(EINTR, sem_timedwait(&sem, &ts)); + ATF_REQUIRE_MSG(got_sigalrm, "did not get SIGALRM"); + +#ifdef __FreeBSD__ + /* CLOCK_MONOTONIC, absolute */ + SEM_REQUIRE(sem_post(&sem)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_MONOTONIC, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + SEM_REQUIRE(sem_clockwait_np(&sem, CLOCK_MONOTONIC, TIMER_ABSTIME, + &ts, NULL)); + ATF_REQUIRE_ERRNO(ETIMEDOUT, + sem_clockwait_np(&sem, CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL)); + + /* CLOCK_MONOTONIC, relative */ + SEM_REQUIRE(sem_post(&sem)); + ts.tv_sec = 0; + ts.tv_nsec = 100*1000*1000; + SEM_REQUIRE(sem_clockwait_np(&sem, CLOCK_MONOTONIC, 0, + &ts, NULL)); + ATF_REQUIRE_ERRNO(ETIMEDOUT, + sem_clockwait_np(&sem, CLOCK_MONOTONIC, 0, &ts, NULL)); + + /* absolute does not update remaining time on EINTR */ + struct timespec remain = {42, 1000*1000*1000}; + got_sigalrm = 0; + it.it_value.tv_usec = 50*1000; + ATF_REQUIRE_MSG(setitimer(ITIMER_REAL, &it, NULL) == 0, + "%s", strerror(errno)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_MONOTONIC, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + ATF_REQUIRE_ERRNO(EINTR, sem_clockwait_np(&sem, CLOCK_MONOTONIC, + TIMER_ABSTIME, &ts, &remain)); + ATF_REQUIRE_MSG(got_sigalrm, "did not get SIGALRM"); + ATF_REQUIRE_MSG(remain.tv_sec == 42 && remain.tv_nsec == 1000*1000*1000, + "an absolute clockwait modified the remaining time on EINTR"); + + /* relative updates remaining time on EINTR */ + remain.tv_sec = 42; + remain.tv_nsec = 1000*1000*1000; + got_sigalrm = 0; + it.it_value.tv_usec = 50*1000; + ATF_REQUIRE_MSG(setitimer(ITIMER_REAL, &it, NULL) == 0, + "%s", strerror(errno)); + ts.tv_sec = 0; + ts.tv_nsec = 100*1000*1000; + ATF_REQUIRE_ERRNO(EINTR, sem_clockwait_np(&sem, CLOCK_MONOTONIC, 0, &ts, + &remain)); + ATF_REQUIRE_MSG(got_sigalrm, "did not get SIGALRM"); + /* + * If this nsec comparison turns out to be unreliable due to timing, + * it could simply check that nsec < 100 ms. + */ + ATF_REQUIRE_MSG(remain.tv_sec == 0 && + remain.tv_nsec >= 25*1000*1000 && + remain.tv_nsec <= 75*1000*1000, + "the remaining time was not as expected when a relative clockwait" + " got EINTR" ); +#endif +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic); ATF_TP_ADD_TC(tp, child); + ATF_TP_ADD_TC(tp, timedwait); return atf_no_error(); } Modified: head/include/semaphore.h ============================================================================== --- head/include/semaphore.h Thu Feb 23 19:32:25 2017 (r314178) +++ head/include/semaphore.h Thu Feb 23 19:36:38 2017 (r314179) @@ -59,6 +59,8 @@ int sem_init(sem_t *, int, unsigned int sem_t *sem_open(const char *, int, ...); int sem_post(sem_t *); int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict); +int sem_clockwait_np(sem_t * __restrict, __clockid_t, int, + const struct timespec *, struct timespec *); int sem_trywait(sem_t *); int sem_unlink(const char *); int sem_wait(sem_t *); Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Thu Feb 23 19:32:25 2017 (r314178) +++ head/lib/libc/gen/Makefile.inc Thu Feb 23 19:36:38 2017 (r314179) @@ -463,6 +463,7 @@ MLINKS+=scandir.3 alphasort.3 MLINKS+=sem_open.3 sem_close.3 \ sem_open.3 sem_unlink.3 MLINKS+=sem_wait.3 sem_trywait.3 +MLINKS+=sem_timedwait.3 sem_clockwait_np.3 MLINKS+=send.2 sendmmsg.2 MLINKS+=setjmp.3 _longjmp.3 \ setjmp.3 _setjmp.3 \ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Thu Feb 23 19:32:25 2017 (r314178) +++ head/lib/libc/gen/Symbol.map Thu Feb 23 19:36:38 2017 (r314179) @@ -415,6 +415,7 @@ FBSD_1.4 { FBSD_1.5 { basename; dirname; + sem_clockwait_np; }; FBSDprivate_1.0 { Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Thu Feb 23 19:32:25 2017 (r314178) +++ head/lib/libc/gen/sem_new.c Thu Feb 23 19:36:38 2017 (r314179) @@ -56,6 +56,7 @@ __weak_reference(_sem_init, sem_init); __weak_reference(_sem_open, sem_open); __weak_reference(_sem_post, sem_post); __weak_reference(_sem_timedwait, sem_timedwait); +__weak_reference(_sem_clockwait_np, sem_clockwait_np); __weak_reference(_sem_trywait, sem_trywait); __weak_reference(_sem_unlink, sem_unlink); __weak_reference(_sem_wait, sem_wait); @@ -345,23 +346,34 @@ usem_wake(struct _usem2 *sem) } static __inline int -usem_wait(struct _usem2 *sem, const struct timespec *abstime) +usem_wait(struct _usem2 *sem, clockid_t clock_id, int flags, + const struct timespec *rqtp, struct timespec *rmtp) { - struct _umtx_time *tm_p, timeout; + struct { + struct _umtx_time timeout; + struct timespec remain; + } tms; + void *tm_p; size_t tm_size; + int retval; - if (abstime == NULL) { + if (rqtp == NULL) { tm_p = NULL; tm_size = 0; } else { - timeout._clockid = CLOCK_REALTIME; - timeout._flags = UMTX_ABSTIME; - timeout._timeout = *abstime; - tm_p = &timeout; - tm_size = sizeof(timeout); + tms.timeout._clockid = clock_id; + tms.timeout._flags = (flags & TIMER_ABSTIME) ? UMTX_ABSTIME : 0; + tms.timeout._timeout = *rqtp; + tm_p = &tms; + tm_size = sizeof(tms); + } + retval = _umtx_op(sem, UMTX_OP_SEM2_WAIT, 0, (void *)tm_size, tm_p); + if (retval == -1 && errno == EINTR && (flags & TIMER_ABSTIME) == 0 && + rqtp != NULL && rmtp != NULL) { + *rmtp = tms.remain; } - return _umtx_op(sem, UMTX_OP_SEM2_WAIT, 0, - (void *)tm_size, __DECONST(void*, tm_p)); + + return (retval); } int @@ -381,8 +393,8 @@ _sem_trywait(sem_t *sem) } int -_sem_timedwait(sem_t * __restrict sem, - const struct timespec * __restrict abstime) +_sem_clockwait_np(sem_t * __restrict sem, clockid_t clock_id, int flags, + const struct timespec *rqtp, struct timespec *rmtp) { int val, retval; @@ -393,7 +405,8 @@ _sem_timedwait(sem_t * __restrict sem, _pthread_testcancel(); for (;;) { while (USEM_COUNT(val = sem->_kern._count) > 0) { - if (atomic_cmpset_acq_int(&sem->_kern._count, val, val - 1)) + if (atomic_cmpset_acq_int(&sem->_kern._count, val, + val - 1)) return (0); } @@ -406,20 +419,28 @@ _sem_timedwait(sem_t * __restrict sem, * The timeout argument is only supposed to * be checked if the thread would have blocked. */ - if (abstime != NULL) { - if (abstime->tv_nsec >= 1000000000 || abstime->tv_nsec < 0) { + if (rqtp != NULL) { + if (rqtp->tv_nsec >= 1000000000 || rqtp->tv_nsec < 0) { errno = EINVAL; return (-1); } } _pthread_cancel_enter(1); - retval = usem_wait(&sem->_kern, abstime); + retval = usem_wait(&sem->_kern, clock_id, flags, rqtp, rmtp); _pthread_cancel_leave(0); } return (retval); } int +_sem_timedwait(sem_t * __restrict sem, + const struct timespec * __restrict abstime) +{ + return (_sem_clockwait_np(sem, CLOCK_REALTIME, TIMER_ABSTIME, abstime, + NULL)); +}; + +int _sem_wait(sem_t *sem) { return _sem_timedwait(sem, NULL); Modified: head/lib/libc/gen/sem_timedwait.3 ============================================================================== --- head/lib/libc/gen/sem_timedwait.3 Thu Feb 23 19:32:25 2017 (r314178) +++ head/lib/libc/gen/sem_timedwait.3 Thu Feb 23 19:36:38 2017 (r314179) @@ -34,11 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2016 +.Dd February 23, 2017 .Dt SEM_TIMEDWAIT 3 .Os .Sh NAME -.Nm sem_timedwait +.Nm sem_timedwait , +.Nm sem_clockwait_np .Nd "lock a semaphore" .Sh LIBRARY .Lb libc @@ -46,6 +47,8 @@ .In semaphore.h .Ft int .Fn sem_timedwait "sem_t * restrict sem" "const struct timespec * restrict abs_timeout" +.Ft int +.Fn sem_clockwait_np "sem_t * restrict sem" "clockid_t clock_id" "int flags" "const struct timespec * rqtp" "struct timespec * rmtp" .Sh DESCRIPTION The .Fn sem_timedwait @@ -77,10 +80,40 @@ clock. The validity of the .Fa abs_timeout is not checked if the semaphore can be locked immediately. -.Sh RETURN VALUES +.Pp The -.Fn sem_timedwait -function returns zero if the calling process successfully performed the +.Fn sem_clockwait_np +function is a more flexible variant of +.Fn sem_timedwait . +The +.Fa clock_id +parameter specifies the reference clock. +If the +.Fa flags +parameter contains +.Dv TIMER_ABSTIME , +then the requested timeout +.Pq Fa rqtp +is an absolute timeout; otherwise, +the timeout is relative. +If this function fails with +.Er EINTR +and the timeout is relative, +a non-NULL +.Fa rmtp +will be updated to contain the amount of time remaining in the interval +.Po +the requested time minus the time actually slept +.Pc . +An absolute timeout has no effect on +.Fa rmtp . +A single structure can be used for both +.Fa rqtp +and +.Fa rmtp . +.Sh RETURN VALUES +These +functions return zero if the calling process successfully performed the semaphore lock operation on the semaphore designated by .Fa sem . If the call was unsuccessful, the state of the semaphore is unchanged, @@ -88,9 +121,7 @@ and the function returns a value of \-1 .Va errno to indicate the error. .Sh ERRORS -The -.Fn sem_timedwait -function will fail if: +These functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The @@ -114,6 +145,18 @@ The .Fn sem_timedwait function conforms to .St -p1003.1-2004 . +The +.Fn sem_clockwait_np +function is not specified by any standard; +it exists only on +.Fx +at the time of this writing. .Sh HISTORY -The function first appeared in +The +.Fn sem_timedwait +function first appeared in .Fx 5.0 . +The +.Fn sem_clockwait_np +function first appeared in +.Fx 12.0 . Modified: head/lib/libc/include/namespace.h ============================================================================== --- head/lib/libc/include/namespace.h Thu Feb 23 19:32:25 2017 (r314178) +++ head/lib/libc/include/namespace.h Thu Feb 23 19:36:38 2017 (r314179) @@ -217,6 +217,7 @@ #define sem_open _sem_open #define sem_post _sem_post #define sem_timedwait _sem_timedwait +#define sem_clockwait_np _sem_clockwait_np #define sem_trywait _sem_trywait #define sem_unlink _sem_unlink #define sem_wait _sem_wait Modified: head/lib/libc/include/un-namespace.h ============================================================================== --- head/lib/libc/include/un-namespace.h Thu Feb 23 19:32:25 2017 (r314178) +++ head/lib/libc/include/un-namespace.h Thu Feb 23 19:36:38 2017 (r314179) @@ -198,6 +198,7 @@ #undef sem_open #undef sem_post #undef sem_timedwait +#undef sem_clockwait_np #undef sem_trywait #undef sem_unlink #undef sem_wait Modified: head/share/man/man3/pthread_testcancel.3 ============================================================================== --- head/share/man/man3/pthread_testcancel.3 Thu Feb 23 19:32:25 2017 (r314178) +++ head/share/man/man3/pthread_testcancel.3 Thu Feb 23 19:36:38 2017 (r314179) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd August 16, 2016 +.Dd February 17, 2017 .Dt PTHREAD_TESTCANCEL 3 .Os .Sh NAME @@ -120,9 +120,9 @@ is The .Fn kevent function is a cancellation point if it is potentially blocking, -i.e. when the +such as when the .Fa nevents -argument is non-zero. +argument is non-zero. .It Fn mq_receive .It Fn mq_send .It Fn mq_timedreceive @@ -146,6 +146,7 @@ argument is non-zero. .It Fn recvmsg .It Fn select .It Fn sem_timedwait +.It Fn sem_clockwait_np .It Fn sem_wait .It Fn send .It Fn sendmsg Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Thu Feb 23 19:32:25 2017 (r314178) +++ head/sys/kern/kern_umtx.c Thu Feb 23 19:36:38 2017 (r314179) @@ -3219,10 +3219,16 @@ do_sem2_wait(struct thread *td, struct _ error = 0; else { umtxq_remove(uq); - /* A relative timeout cannot be restarted. */ - if (error == ERESTART && timeout != NULL && - (timeout->_flags & UMTX_ABSTIME) == 0) - error = EINTR; + if (timeout != NULL && (timeout->_flags & UMTX_ABSTIME) == 0) { + /* A relative timeout cannot be restarted. */ + if (error == ERESTART) + error = EINTR; + if (error == EINTR) { + abs_timeout_update(&timo); + timeout->_timeout = timo.end; + timespecsub(&timeout->_timeout, &timo.cur); + } + } } umtxq_unlock(&uq->uq_key); umtx_key_release(&uq->uq_key); @@ -3585,19 +3591,33 @@ static int __umtx_op_sem2_wait(struct thread *td, struct _umtx_op_args *uap) { struct _umtx_time *tm_p, timeout; + size_t uasize; int error; /* Allow a null timespec (wait forever). */ - if (uap->uaddr2 == NULL) + if (uap->uaddr2 == NULL) { + uasize = 0; tm_p = NULL; - else { - error = umtx_copyin_umtx_time( - uap->uaddr2, (size_t)uap->uaddr1, &timeout); + } else { + uasize = (size_t)uap->uaddr1; + error = umtx_copyin_umtx_time(uap->uaddr2, uasize, &timeout); if (error != 0) return (error); tm_p = &timeout; } - return (do_sem2_wait(td, uap->obj, tm_p)); + error = do_sem2_wait(td, uap->obj, tm_p); + if (error == EINTR && uap->uaddr2 != NULL && + (timeout._flags & UMTX_ABSTIME) == 0 && + uasize >= sizeof(struct _umtx_time) + sizeof(struct timespec)) { + error = copyout(&timeout._timeout, + (struct _umtx_time *)uap->uaddr2 + 1, + sizeof(struct timespec)); + if (error == 0) { + error = EINTR; + } + } + + return (error); } static int @@ -4194,19 +4214,37 @@ static int __umtx_op_sem2_wait_compat32(struct thread *td, struct _umtx_op_args *uap) { struct _umtx_time *tm_p, timeout; + size_t uasize; int error; /* Allow a null timespec (wait forever). */ - if (uap->uaddr2 == NULL) + if (uap->uaddr2 == NULL) { + uasize = 0; tm_p = NULL; - else { - error = umtx_copyin_umtx_time32(uap->uaddr2, - (size_t)uap->uaddr1, &timeout); + } else { + uasize = (size_t)uap->uaddr1; + error = umtx_copyin_umtx_time32(uap->uaddr2, uasize, &timeout); if (error != 0) return (error); tm_p = &timeout; } - return (do_sem2_wait(td, uap->obj, tm_p)); + error = do_sem2_wait(td, uap->obj, tm_p); + if (error == EINTR && uap->uaddr2 != NULL && + (timeout._flags & UMTX_ABSTIME) == 0 && + uasize >= sizeof(struct umtx_time32) + sizeof(struct timespec32)) { + struct timespec32 remain32 = { + .tv_sec = timeout._timeout.tv_sec, + .tv_nsec = timeout._timeout.tv_nsec + }; + error = copyout(&remain32, + (struct umtx_time32 *)uap->uaddr2 + 1, + sizeof(struct timespec32)); + if (error == 0) { + error = EINTR; + } + } + + return (error); } static int From owner-svn-src-all@freebsd.org Thu Feb 23 19:39: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 DB9A9CEB57D; Thu, 23 Feb 2017 19:39:55 +0000 (UTC) (envelope-from mjguzik@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 919717DE; Thu, 23 Feb 2017 19:39:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id u63so1579703wmu.2; Thu, 23 Feb 2017 11:39: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=hFuAmakOFu6p/NiU8SNCXuAvmeW+gC812BbdXIBxUu4=; b=ccqa8xAw7sHm3ypOnHNDUjjP5qNfL9o03p8nZS2aapi/RuwSajVbfl05/S0OfexDXA avTL0aNW/jxLnA2aUmTgU1kOUjpJzWzsYk3MXsK2mjYUmdYLJytgyPf5YVlx1IRJUz0z fD1ajM4KQE92gXa3cJJc3fBnsvBl7tKEhzgrB2SguCz5V8YuZYmOleTr6aG33r+dQ2nQ uWgQwUB8O5fsBTPONtifZGowSS1cDwf7cZ5cHReoKx0hZ1mRSD86nj7YaGS7ISB5ARR4 uIWbz7F1nv06gOrtfJT7HZDcLUjzNcR1XlHJai1VmRKRQ5Z3spB+BljsYbcVKEEoIcFa bJtQ== 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=hFuAmakOFu6p/NiU8SNCXuAvmeW+gC812BbdXIBxUu4=; b=t/hUwQUbwN/lbXL9cjQJ1hBYlan3qdHTnhtn64MZctPkd6vKvI7HoxyWT9IxphAt2q KGTaGYJ2Y/FwOtcp/8vYa6cHpiMYFtMbl8afcqdOGEVDaKoYBZniHpAOta9pazZ7E8cF K2zg3jTyQiPT9qLGy5mWHu4bXuOZfPTJ18WHAzbhi1KMcrINcRY1OcfVlHs+vyZnu1r9 NnxX3GqCvwLrzuvUXCTMY1UBfgGRg0ZPx6vZfs9pSjpfY6VnLdyFzLlwcNcm2TwJ+fNT bOleVrPjMTQVbRsoRipNBqq84TKaJzy3Ts/S7yNFQoGPUlNm4JnexshmLB7isV/IN3nA azmw== X-Gm-Message-State: AMke39nfa81PRCQN07Vm3rK4lQMLeFklTRPATx6lKtOAcDQXtb59K5lT0sMKBXcBx+JRPQ== X-Received: by 10.28.125.149 with SMTP id y143mr6477579wmc.16.1487878792840; Thu, 23 Feb 2017 11:39:52 -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 p41sm7320479wrc.65.2017.02.23.11.39.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 23 Feb 2017 11:39:52 -0800 (PST) Date: Thu, 23 Feb 2017 20:39:50 +0100 From: Mateusz Guzik To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r314159 - in vendor/llvm/dist: docs lib/CodeGen/AsmPrinter lib/Target/AArch64 lib/Target/ARM lib/Transforms/Scalar test/CodeGen/AArch64 test/CodeGen/ARM test/DebugInfo/X86 Message-ID: <20170223193950.GC5744@dft-labs.eu> References: <201702231902.v1NJ23Fq013734@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702231902.v1NJ23Fq013734@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: Thu, 23 Feb 2017 19:39:56 -0000 On Thu, Feb 23, 2017 at 07:02:03PM +0000, Dimitry Andric wrote: > New Revision: 314159 Congratulations on committing the 314519th revision! On lack of behalf of the core I'm happy to say you win a prize of your chosing: 1. one time you get to commit a variable of type 'long long' without it being called an abomination 2. one time you get to break world build and someone else will fix it 3. you get to commit a line which exceeds the 80-char limit by 1. if it gets removed/shortened to the limit, you get to commit another one (imho best prize) 4. one time you get to __predict_false a condition and not provide ministat 5. an ascii-art t-shirt with "I committed the 314159 revision and did not even get a lousy t-shirt" Choose wisely! -- Mateusz Guzik From owner-svn-src-all@freebsd.org Thu Feb 23 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 87B26CEA2F1 for ; Thu, 23 Feb 2017 20:31:55 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (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 12F7B8F for ; Thu, 23 Feb 2017 20:31:55 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wr0-x22f.google.com with SMTP id z61so1346054wrc.1 for ; Thu, 23 Feb 2017 12:31: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:from:message-id:date:user-agent:mime-version :in-reply-to; bh=7Zkc0DaRWucIW8IWV6PsQzHVU6pJpoy5Kc6Hk8wAGlY=; b=hzDZunREa8mo9Q5EshjLhZUeqyZq+/9n16JkzQy2lfumwKYGstkeix9JAJ3TQebBsk bJwUugcd3l2vtn+kde4zMftOX9aV7yaiEqzOyNYE56zf96KrKBlhm276DP3EwsmXwCkg u5/ugyO+1W3pAhIVlUy0MtcCvW5MH3zul89HS5dFhX+9MJEG9pByRSz0AhOYPEKtzXAr H+C5ERC+e69WiSaU0xDpfal8WOUSqGbfQyiCIg6QX6KRgJ2Zmbbyj3PDkuFOwTm5F2CJ uZxGa84yvZ7l+7fwiVwVKwALxrLp7/lmE91npe7SATQXBbNk3o2T5KOJHlSKYSuhqhQ/ mekQ== 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=7Zkc0DaRWucIW8IWV6PsQzHVU6pJpoy5Kc6Hk8wAGlY=; b=gZx0lrsT1ztbESUErV7kXjd6/RmV5b1j7oZsxzw1SI9gh4Us0KkJZ1w7DD3ozricVd lKxG0DR1P+JWioycqxb+mFOPCcUE/KsAmNAhLmplq6CwRK3xYagPQ+tKFgFtgGmOGVZ/ UkK2nf4gsPqgOLfvZWzn4iEyU6F0ZZU1IrZM6kxTAiLBU/f4KXSHogD3Yg/FsOi6LbMA Nim/yIfb8guK2NZ5exHlu2Iq1mlwYNZDTaIjqA4R8P8TViy1eTm1T4v5mnDXcYifFgXO /HhSoLW2Hmev6jaQfYI1+nQVYLr6UwZ4o13uGWverBznaOosdaVy+/nA8pGQcoXSBI8D OzIw== X-Gm-Message-State: AMke39mvidj5STteSB+fO+HaVM/ob+xJRM7yRlx+8MEjO/zqEDpstkFWfGt3GaSHRyqSehQi X-Received: by 10.223.154.210 with SMTP id a76mr28258869wrc.193.1487881912702; Thu, 23 Feb 2017 12:31:52 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.4]) by smtp.gmail.com with ESMTPSA id j39sm7408389wrj.45.2017.02.23.12.31.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Feb 2017 12:31:52 -0800 (PST) Subject: Re: svn commit: r314155 - head/sys/netinet To: Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702231814.v1NIEahd095397@repo.freebsd.org> From: Steven Hartland Message-ID: Date: Thu, 23 Feb 2017 20:31:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201702231814.v1NIEahd095397@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: Thu, 23 Feb 2017 20:31:55 -0000 You might also be interested in reviewing my fix for TCP buffer scaling too Michael. https://reviews.freebsd.org/D9668 This fixes slow transfers due to no receive buffer scaling if TCP timestamps aren't negotiated. Its still got debug stuff in it ATM and I'm toying with removing the different cases between estimated RTT and timestamps as there appears to be no difference in practice. Tests here show jump from ~3MB/s @ 1Gbps and 17ms latency to 100MB/s, pretty much line rate, which is in line with Linux results. Any feedback welcome. Regards Steve On 23/02/2017 18:14, Michael Tuexen wrote: > Author: tuexen > Date: Thu Feb 23 18:14:36 2017 > New Revision: 314155 > URL: https://svnweb.freebsd.org/changeset/base/314155 > > Log: > TCP window updates are only sent if the window can be increased by at > least 2 * MSS. However, if the receive buffer size is small, this might > be impossible. Add back a criterion to send a TCP window update if > the window can be increased by at least half of the receive buffer size. > This condition was removed in r242252. This patch simply brings it back. > PR: 211003 > Reviewed by: gnn > MFC after: 1 week > Sponsored by: Netflix, Inc. > Differential Revision: https://reviews.freebsd.org/D9475 > > Modified: > head/sys/netinet/tcp_output.c > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Thu Feb 23 17:56:24 2017 (r314154) > +++ head/sys/netinet/tcp_output.c Thu Feb 23 18:14:36 2017 (r314155) > @@ -696,6 +696,8 @@ after_sack_rexmit: > recwin <= (so->so_rcv.sb_hiwat / 8) || > so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg)) > goto send; > + if (2 * adv >= (int32_t)so->so_rcv.sb_hiwat) > + goto send; > } > dontupdate: > > From owner-svn-src-all@freebsd.org Thu Feb 23 20:41: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 98910CEA680; Thu, 23 Feb 2017 20:41:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 624308D2; Thu, 23 Feb 2017 20:41:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NKft4B057545; Thu, 23 Feb 2017 20:41:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NKftj1057542; Thu, 23 Feb 2017 20:41:55 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201702232041.v1NKftj1057542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 23 Feb 2017 20:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314180 - 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, 23 Feb 2017 20:41:56 -0000 Author: brooks Date: Thu Feb 23 20:41:55 2017 New Revision: 314180 URL: https://svnweb.freebsd.org/changeset/base/314180 Log: Fix and shorten BERI kernel builds during universe. Stop building BERI_DE4_BASE and BERI_SIM_BASE, they aren't particularly valid as they don't have a root dev. Do build BERI_DE4_SDROOT which does so devices get coverage. Remove ident from BERI_DE4_BASE for the reasons above which will cause it to fail to build. BERI_SIM_BASE was already this way and broke universe.[0] Reported by: rpokala Sponsored by: DARPA, AFRL Modified: head/sys/mips/conf/BERI_DE4_BASE head/sys/mips/conf/BERI_DE4_SDROOT head/sys/mips/conf/BERI_SIM_BASE Modified: head/sys/mips/conf/BERI_DE4_BASE ============================================================================== --- head/sys/mips/conf/BERI_DE4_BASE Thu Feb 23 19:36:38 2017 (r314179) +++ head/sys/mips/conf/BERI_DE4_BASE Thu Feb 23 20:41:55 2017 (r314180) @@ -7,9 +7,9 @@ # $FreeBSD$ # -include "std.BERI" +#NO_UNIVERSE -ident BERI_DE4_BASE +include "std.BERI" options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager Modified: head/sys/mips/conf/BERI_DE4_SDROOT ============================================================================== --- head/sys/mips/conf/BERI_DE4_SDROOT Thu Feb 23 19:36:38 2017 (r314179) +++ head/sys/mips/conf/BERI_DE4_SDROOT Thu Feb 23 20:41:55 2017 (r314180) @@ -6,8 +6,6 @@ # $FreeBSD$ # -#NO_UNIVERSE - include "BERI_DE4_BASE" ident BERI_DE4_SDROOT Modified: head/sys/mips/conf/BERI_SIM_BASE ============================================================================== --- head/sys/mips/conf/BERI_SIM_BASE Thu Feb 23 19:36:38 2017 (r314179) +++ head/sys/mips/conf/BERI_SIM_BASE Thu Feb 23 20:41:55 2017 (r314180) @@ -6,6 +6,8 @@ # $FreeBSD$ # +#NO_UNIVERSE + include "std.BERI" options FDT From owner-svn-src-all@freebsd.org Thu Feb 23 20:49: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 AA686CEA76B; Thu, 23 Feb 2017 20:49:18 +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 77770B24; Thu, 23 Feb 2017 20:49:18 +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 v1NKnHfl057889; Thu, 23 Feb 2017 20:49:17 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NKnHWQ057888; Thu, 23 Feb 2017 20:49:17 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702232049.v1NKnHWQ057888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 23 Feb 2017 20:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314181 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 20:49:18 -0000 Author: adrian Date: Thu Feb 23 20:49:17 2017 New Revision: 314181 URL: https://svnweb.freebsd.org/changeset/base/314181 Log: [ifconfig] handle illegal WPS frames Some APs broadcast WPS IE frames with totally broken data. Ifconfig's printwpsie() loops through WPS frames printing the attributes out; if the frame's data is bad, printwpsie() can end up looking at out-of-bounds addresses causing ifconfig to bus error. Thanks to Takashi Inoue at Nihon U for his efforts in debugging this. PR: bin/217312 Submitted by: fbsd@opal.com MFC after: 1 week Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Thu Feb 23 20:41:55 2017 (r314180) +++ head/sbin/ifconfig/ifieee80211.c Thu Feb 23 20:49:17 2017 (r314181) @@ -3160,6 +3160,14 @@ printwpsie(const char *tag, const u_int8 uint16_t tlv_type = BE_READ_2(ie); uint16_t tlv_len = BE_READ_2(ie + 2); + /* some devices broadcast invalid WPS frames */ + if (tlv_len > len) { + printf("bad frame length tlv_type=0x%02x " + "tlv_len=%d len=%d", tlv_type, tlv_len, + len); + break; + } + ie += 4, len -= 4; switch (tlv_type) { From owner-svn-src-all@freebsd.org Thu Feb 23 21: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 C4AB1CEAE73; Thu, 23 Feb 2017 21:08:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) 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 63E6316D7; Thu, 23 Feb 2017 21:08:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id v77so10358796wmv.0; Thu, 23 Feb 2017 13:08:14 -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:content-transfer-encoding; bh=26R1oTNN9Mr47Xp0LhzmZzd+alNPqOJP4J6FJGnw3WA=; b=l3KIzwoTcOjChbGi8MikmD6d7R8Ft2sgAEvpHV14vjgj8DNJPmepY2ioc1TReeruE8 2acdJ3EYngtYlwb9BZAAdp0qMT4cmC/zg4aHdWkYdA1QVK4vvPHK8dLfnehojGQDvV0z rajJXEonxEgJI1dPE2XtKBgUAnv+DMTz461wzSb9bGzUKu0OuUQFJwlveYvbdkEjBY5f p7YRXJpXGuv+w/6ge0ONdruxQMkbfz+ezvsHBvg3r2K50Qp7dTtTvhHaTJ25sjsZYDRO oZsY65WZQlLy+yAFpzQYLPJI2NYsp8/upq8O3Cy5iDoSFwHp6ReoBVwIST1EA2kkoKBB Z5dQ== 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:content-transfer-encoding; bh=26R1oTNN9Mr47Xp0LhzmZzd+alNPqOJP4J6FJGnw3WA=; b=YLxfINctPRpCLXF+5DbFyqzFZ5o0azagr1Om0zC02ruBfkd0RQjBAJXhlJDMWvGvpX +rBLS9qs0M5JYW2IIdehuMThz+ITcE+QjW7R+14v4kjWz14J+/tl14uViUDap1RAxu8U zJ6NBdutvRFLwR7Qs79TFMAAlxOrMC5T0hpUmk6TlVdW0hFjN/oCddfQTFH1hol2Ggeq pPA0TJKHc2kA3+fYGb0emaQEO7bQg2Sjl7byWqrBncDmwRZNL8vcVQ+ZFxCIFBg2qWZI 9dbM/AxFjRpwUOUMF/IacyCjDQ4lxzN25lvwN4qyrFwx4ioGGPd/h4n2u2YTessiroUA d9MA== X-Gm-Message-State: AMke39kbQVncboN/IzbEn6xhAdhQuCievhaz61Jlw9EPhq/R78k9IUg+SIa3B/O0+yV4el/PdfX5+EG90hcKLg== X-Received: by 10.28.150.202 with SMTP id y193mr4401643wmd.106.1487884092838; Thu, 23 Feb 2017 13:08:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.135 with HTTP; Thu, 23 Feb 2017 13:08:12 -0800 (PST) In-Reply-To: References: <201702231744.v1NHi6iv083002@repo.freebsd.org> From: Adrian Chadd Date: Thu, 23 Feb 2017 13:08:12 -0800 Message-ID: Subject: Re: svn commit: r314151 - head/sys/modules/iwm To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 21:08:14 -0000 thanks! was busy in meetings this morning :( -a On 23 February 2017 at 09:47, Ngie Cooper (yaneurabeya) wrote: > >> On Feb 23, 2017, at 09:44, Ngie Cooper wrote: >> >> Author: ngie >> Date: Thu Feb 23 17:44:06 2017 >> New Revision: 314151 >> URL: https://svnweb.freebsd.org/changeset/base/314151 >> >> Log: >> Unbreak if_iwm.ko after r314076 >> >> Add if_iwm_7000.c/if_iwm_8000.c to SRCS to match similar additions made >> to sys/conf/files after refactoring done in the commit noted. >> >> PR: 217308 >> Pointyhat to: adrian >> Submitted by: Andreas Nilsson >> Reported by: Jakob Alvermark , Juan Ram=C3=B3mon M= olina Menor > > Ugh=E2=80=A6 that didn=E2=80=99t come out as expected after the UTF-8 con= version >_>... From owner-svn-src-all@freebsd.org Thu Feb 23 21: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 385DBCEB828; Thu, 23 Feb 2017 21:54:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5CE6C3E; Thu, 23 Feb 2017 21:54:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NLsH3h086249; Thu, 23 Feb 2017 21:54:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NLsHs7086248; Thu, 23 Feb 2017 21:54:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702232154.v1NLsHs7086248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 21:54: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: r314182 - stable/10/lib/libmd 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, 23 Feb 2017 21:54:18 -0000 Author: avg Date: Thu Feb 23 21:54:16 2017 New Revision: 314182 URL: https://svnweb.freebsd.org/changeset/base/314182 Log: fixup r314143, MFC of r285366 didn't remove files that it should have Deleted: stable/10/lib/libmd/sha256.h stable/10/lib/libmd/sha256c.c From owner-svn-src-all@freebsd.org Thu Feb 23 22:08: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 75DD9CEBB38; Thu, 23 Feb 2017 22:08:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402DE11E1; Thu, 23 Feb 2017 22:08:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NM8Zwi090413; Thu, 23 Feb 2017 22:08:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NM8Zow090412; Thu, 23 Feb 2017 22:08:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702232208.v1NM8Zow090412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 22:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314183 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 22:08:36 -0000 Author: avg Date: Thu Feb 23 22:08:35 2017 New Revision: 314183 URL: https://svnweb.freebsd.org/changeset/base/314183 Log: add jedec_ts.4 to the list of manual pages Reported by: rpokala MFC after: 3 days Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Feb 23 21:54:16 2017 (r314182) +++ head/share/man/man4/Makefile Thu Feb 23 22:08:35 2017 (r314183) @@ -241,6 +241,7 @@ MAN= aac.4 \ ixgbe.4 \ ixl.4 \ ixlv.4 \ + jedec_ts.4 \ jme.4 \ joy.4 \ kbdmux.4 \ From owner-svn-src-all@freebsd.org Thu Feb 23 22:10: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 C8760CEBC48; Thu, 23 Feb 2017 22:10:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A069114B4; Thu, 23 Feb 2017 22:10:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NMAcDN090565; Thu, 23 Feb 2017 22:10:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NMAc6O090558; Thu, 23 Feb 2017 22:10:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702232210.v1NMAc6O090558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 22:10: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: r314184 - stable/10/lib/libmd 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, 23 Feb 2017 22:10:39 -0000 Author: avg Date: Thu Feb 23 22:10:37 2017 New Revision: 314184 URL: https://svnweb.freebsd.org/changeset/base/314184 Log: MFC r282774: Unbreak MIPS build following r282726 (MFCed in r314144) Modified: stable/10/lib/libmd/Makefile stable/10/lib/libmd/md4c.c stable/10/lib/libmd/md5c.c stable/10/lib/libmd/mdXhl.c stable/10/lib/libmd/rmd160c.c stable/10/lib/libmd/sha1c.c stable/10/lib/libmd/sha512c.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmd/Makefile ============================================================================== --- stable/10/lib/libmd/Makefile Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/Makefile Thu Feb 23 22:10:37 2017 (r314184) @@ -42,7 +42,13 @@ CLEANFILES+= md[245]hl.c md[245].ref md[ sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ sha256.ref sha256hl.c sha512.ref sha512hl.c -CFLAGS+= -I${.CURDIR} +# Define WEAK_REFS to provide weak aliases for libmd symbols +# +# Note that the same sources are also used internally by libcrypt, +# in which case: +# * macros are used to rename symbols to libcrypt internal names +# * no weak aliases are generated +CFLAGS+= -I${.CURDIR} -DWEAK_REFS .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) Modified: stable/10/lib/libmd/md4c.c ============================================================================== --- stable/10/lib/libmd/md4c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/md4c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -291,6 +291,11 @@ unsigned int len; (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD4Init __weak_reference(_libmd_MD4Init, MD4Init); #undef MD4Update @@ -299,3 +304,4 @@ __weak_reference(_libmd_MD4Update, MD4Up __weak_reference(_libmd_MD4Pad, MD4Pad); #undef MD4Final __weak_reference(_libmd_MD4Final, MD4Final); +#endif Modified: stable/10/lib/libmd/md5c.c ============================================================================== --- stable/10/lib/libmd/md5c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/md5c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -336,6 +336,11 @@ MD5Transform (state, block) memset ((void *)x, 0, sizeof (x)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD5Init __weak_reference(_libmd_MD5Init, MD5Init); #undef MD5Update @@ -346,3 +351,4 @@ __weak_reference(_libmd_MD5Pad, MD5Pad); __weak_reference(_libmd_MD5Final, MD5Final); #undef MD5Transform __weak_reference(_libmd_MD5Transform, MD5Transform); +#endif Modified: stable/10/lib/libmd/mdXhl.c ============================================================================== --- stable/10/lib/libmd/mdXhl.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/mdXhl.c Thu Feb 23 22:10:37 2017 (r314184) @@ -97,6 +97,11 @@ MDXData (const void *data, unsigned int return (MDXEnd(&ctx, buf)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MDXEnd __weak_reference(_libmd_MDXEnd, MDXEnd); #undef MDXFile @@ -105,3 +110,4 @@ __weak_reference(_libmd_MDXFile, MDXFile __weak_reference(_libmd_MDXFileChunk, MDXFileChunk); #undef MDXData __weak_reference(_libmd_MDXData, MDXData); +#endif Modified: stable/10/lib/libmd/rmd160c.c ============================================================================== --- stable/10/lib/libmd/rmd160c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/rmd160c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -546,6 +546,11 @@ unsigned long *l; } #endif +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef RIPEMD160_Init __weak_reference(_libmd_RIPEMD160_Init, RIPEMD160_Init); #undef RIPEMD160_Update @@ -558,3 +563,4 @@ __weak_reference(_libmd_RIPEMD160_Transf __weak_reference(_libmd_RMD160_version, RMD160_version); #undef ripemd160_block __weak_reference(_libmd_ripemd160_block, ripemd160_block); +#endif Modified: stable/10/lib/libmd/sha1c.c ============================================================================== --- stable/10/lib/libmd/sha1c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/sha1c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -488,7 +488,11 @@ SHA_CTX *c; /* memset((char *)&c,0,sizeof(c));*/ } - +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA_Init __weak_reference(_libmd_SHA_Init, SHA_Init); #undef SHA_Update @@ -513,3 +517,4 @@ __weak_reference(_libmd_SHA1_Transform, __weak_reference(_libmd_SHA1_version, SHA1_version); #undef sha1_block __weak_reference(_libmd_sha1_block, sha1_block); +#endif Modified: stable/10/lib/libmd/sha512c.c ============================================================================== --- stable/10/lib/libmd/sha512c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/sha512c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -319,6 +319,11 @@ SHA512_Final(unsigned char digest[64], S memset((void *)ctx, 0, sizeof(*ctx)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA512_Init __weak_reference(_libmd_SHA512_Init, SHA512_Init); #undef SHA512_Update @@ -327,5 +332,4 @@ __weak_reference(_libmd_SHA512_Update, S __weak_reference(_libmd_SHA512_Final, SHA512_Final); #undef SHA512_Transform __weak_reference(_libmd_SHA512_Transform, SHA512_Transform); -#undef SHA512_version -__weak_reference(_libmd_SHA512_version, SHA512_version); +#endif From owner-svn-src-all@freebsd.org Thu Feb 23 22:46: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 D8967CEB411; Thu, 23 Feb 2017 22:46:02 +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 99122646; Thu, 23 Feb 2017 22:46:02 +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 v1NMk1Rr006908; Thu, 23 Feb 2017 22:46:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NMk12O006907; Thu, 23 Feb 2017 22:46:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702232246.v1NMk12O006907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 23 Feb 2017 22:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314185 - 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, 23 Feb 2017 22:46:02 -0000 Author: mjg Date: Thu Feb 23 22:46:01 2017 New Revision: 314185 URL: https://svnweb.freebsd.org/changeset/base/314185 Log: mtx: microoptimize lockstat handling in spin mutexes and thread lock While here make the code compilablle on kernels with LOCK_PROFILING but without KDTRACE_HOOKS. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Thu Feb 23 22:10:37 2017 (r314184) +++ head/sys/kern/kern_mutex.c Thu Feb 23 22:46:01 2017 (r314185) @@ -468,7 +468,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, u_int sleep_cnt = 0; int64_t sleep_time = 0; int64_t all_time = 0; - int doing_lockstat; +#endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + int doing_lockprof; #endif if (SCHEDULER_STOPPED()) @@ -510,13 +512,11 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR4(KTR_LOCK, "_mtx_lock_sleep: %s contested (lock=%p) at %s:%d", m->lock_object.lo_name, (void *)m->mtx_lock, file, line); -#ifdef KDTRACE_HOOKS #ifdef LOCK_PROFILING - doing_lockstat = 1; -#else - doing_lockstat = lockstat_enabled; -#endif - if (__predict_false(doing_lockstat)) + doing_lockprof = 1; +#elif KDTRACE_HOOKS + doing_lockprof = lockstat_enabled; + if (__predict_false(doing_lockprof)) all_time -= lockstat_nsecs(&m->lock_object); #endif @@ -631,9 +631,11 @@ __mtx_lock_sleep(volatile uintptr_t *c, m->lock_object.lo_name, (void *)tid, file, line); } #endif -#ifdef KDTRACE_HOOKS - if (__predict_true(!doing_lockstat)) +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) return; +#endif +#ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&m->lock_object); #endif LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, m, contested, @@ -689,6 +691,9 @@ _mtx_lock_spin_cookie(volatile uintptr_t #ifdef KDTRACE_HOOKS int64_t spin_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + int doing_lockprof; +#endif if (SCHEDULER_STOPPED()) return; @@ -713,8 +718,12 @@ _mtx_lock_spin_cookie(volatile uintptr_t PMC_SOFT_CALL( , , lock, failed); #endif lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); -#ifdef KDTRACE_HOOKS - spin_time -= lockstat_nsecs(&m->lock_object); +#ifdef LOCK_PROFILING + doing_lockprof = 1; +#elif KDTRACE_HOOKS + doing_lockprof = lockstat_enabled; + if (__predict_false(doing_lockprof)) + spin_time -= lockstat_nsecs(&m->lock_object); #endif for (;;) { if (v == MTX_UNOWNED) { @@ -740,18 +749,22 @@ _mtx_lock_spin_cookie(volatile uintptr_t } while (v != MTX_UNOWNED); spinlock_enter(); } -#ifdef KDTRACE_HOOKS - spin_time += lockstat_nsecs(&m->lock_object); -#endif if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), "running"); +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) + return; +#endif #ifdef KDTRACE_HOOKS + spin_time += lockstat_nsecs(&m->lock_object); +#endif LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, contested, waittime, file, line); +#ifdef KDTRACE_HOOKS if (spin_time != 0) LOCKSTAT_RECORD1(spin__spin, m, spin_time); #endif @@ -771,6 +784,9 @@ thread_lock_flags_(struct thread *td, in #ifdef KDTRACE_HOOKS int64_t spin_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + int doing_lockprof = 1; +#endif tid = (uintptr_t)curthread; @@ -786,8 +802,12 @@ thread_lock_flags_(struct thread *td, in lock_delay_arg_init(&lda, &mtx_spin_delay); -#ifdef KDTRACE_HOOKS - spin_time -= lockstat_nsecs(&td->td_lock->lock_object); +#ifdef LOCK_PROFILING + doing_lockprof = 1; +#elif KDTRACE_HOOKS + doing_lockprof = lockstat_enabled; + if (__predict_false(doing_lockprof)) + spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif for (;;) { retry: @@ -843,15 +863,20 @@ retry: break; __mtx_unlock_spin(m); /* does spinlock_exit() */ } + LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, + line); + WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); + +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) + return; +#endif #ifdef KDTRACE_HOOKS spin_time += lockstat_nsecs(&m->lock_object); #endif if (m->mtx_recurse == 0) LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, contested, waittime, file, line); - LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, - line); - WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); #ifdef KDTRACE_HOOKS if (spin_time != 0) LOCKSTAT_RECORD1(thread__spin, m, spin_time); From owner-svn-src-all@freebsd.org Thu Feb 23 23: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 A5234CEB8FE; Thu, 23 Feb 2017 23:02:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::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 6122E102B; Thu, 23 Feb 2017 23:02:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22c.google.com with SMTP id n21so5023548qta.1; Thu, 23 Feb 2017 15:02:55 -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=hEtMnmocj7nkOEv90H6PNdJXO/+VlikYvp6TwtpyjYw=; b=CevUGOiIG7fSCDXfi7q7SZ6/+A97OS6+/utk8iRV7Ga92kbhf4r8iJOTVPyE//sZ1n 1ofuzwZsfEXKAVl9+Rb00TgpY17tqOCE1Yx4HKGsvfers7vrwRVWzGFAaJmbGDsLj38k hcUYpdmhcBFx19roEH0YVe8GucStL54iFkyTVRzlD8nkh1j5sD/CW0MefnHr5uoJpliQ RgZRPBFxSbFr6mrTlA6z1P8Q2tifQaJcgTJYkklizGxc9RvW4/ewlwHdFuD28JdwJGJR 0siM4YZiFTbVfMlkjIIUkjXvP8AEnhHwSX7L8T8VH71fiErJpu4d7MQjCPw/7L9PwMBx lO6A== 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=hEtMnmocj7nkOEv90H6PNdJXO/+VlikYvp6TwtpyjYw=; b=R4hZISGyaSGfJWoiyCv0s49MGVLJRuxighMHuNOixMKjthYgi30ZWPsFUvDvzOgU3E uKkEpsM4Ivs8NC9h5aYnwY9hbgX37+ibMIuJQbMbgzUF2JQKpMVuc5MXVNvA2lGiqWIO aZ7SxWImrxVnCF1zcLigv3pysdn5iSSeQ9qZGNQ6GpgdO1r8zFcMNnWUqW2bEtotQZM9 EBXhZB5r9DNrgU2bQ07zQXBqhOvz+bSzNSESEj89r4iE6gNl6oSHvx2GTr+pCwJ9/6O6 hemSHTWnR9FQaMQO9wvM/HMy9AYNXeefwrmQegtFQCBbCpghsWIMyMwuJwjrp+QQC2Wk 4SVg== X-Gm-Message-State: AMke39ktP0VF0jlZHZrXcIRn3/QQRbz6pfRsvwqbGh5AgHPIFrDF9XWPJz7ROscITRfgJH98xrsDePYLP/q0MQ== X-Received: by 10.237.48.105 with SMTP id 96mr15362828qte.246.1487890974297; Thu, 23 Feb 2017 15:02:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Thu, 23 Feb 2017 15:02:53 -0800 (PST) In-Reply-To: <201702231936.v1NJadRa029404@repo.freebsd.org> References: <201702231936.v1NJadRa029404@repo.freebsd.org> From: Ngie Cooper Date: Thu, 23 Feb 2017 15:02:53 -0800 Message-ID: Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern To: Eric van Gyzen 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: Thu, 23 Feb 2017 23:02:55 -0000 On Thu, Feb 23, 2017 at 11:36 AM, Eric van Gyzen wrote: > Author: vangyzen > Date: Thu Feb 23 19:36:38 2017 > New Revision: 314179 > URL: https://svnweb.freebsd.org/changeset/base/314179 > > Log: > Add sem_clockwait_np() > > This function allows the caller to specify the reference clock > and choose between absolute and relative mode. In relative mode, > the remaining time can be returned. > > The API is similar to clock_nanosleep(3). Thanks to Ed Schouten > for that suggestion. > > While I'm here, reduce the sleep time in the semaphore "child" > test to greatly reduce its runtime. Also add a reasonable timeout. > > Reviewed by: ed (userland) > MFC after: 2 weeks > Relnotes: yes > Sponsored by: Dell EMC > Differential Revision: https://reviews.freebsd.org/D9656 > > Modified: > head/contrib/netbsd-tests/lib/librt/t_sem.c > head/include/semaphore.h > head/lib/libc/gen/Makefile.inc > head/lib/libc/gen/Symbol.map > head/lib/libc/gen/sem_new.c > head/lib/libc/gen/sem_timedwait.3 > head/lib/libc/include/namespace.h > head/lib/libc/include/un-namespace.h > head/share/man/man3/pthread_testcancel.3 > head/sys/kern/kern_umtx.c > > Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c ... *sigh* I really wish people would read MAINTAINERS and include me on CRs to contrib/netbsd-tests/ (especially since I spent a few weekends cleaning this up to diff reduce and contribute back changes to NetBSD). Thanks, -Ngie From owner-svn-src-all@freebsd.org Thu Feb 23 23:48: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 95FEBCEB16B; Thu, 23 Feb 2017 23:48:45 +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 58E06CC; Thu, 23 Feb 2017 23:48:45 +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 v1NNmiac031218; Thu, 23 Feb 2017 23:48:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NNmiED031217; Thu, 23 Feb 2017 23:48:44 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702232348.v1NNmiED031217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Feb 2017 23:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314186 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 23 Feb 2017 23:48:45 -0000 Author: pfg Date: Thu Feb 23 23:48:44 2017 New Revision: 314186 URL: https://svnweb.freebsd.org/changeset/base/314186 Log: at91: double assignment. Found with: coccinelle (da.cocci) Suggested by: cognet Modified: head/sys/arm/at91/at91sam9260.c Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Thu Feb 23 22:46:01 2017 (r314185) +++ head/sys/arm/at91/at91sam9260.c Thu Feb 23 23:48:44 2017 (r314186) @@ -193,7 +193,6 @@ at91_clock_init(void) */ clk = at91_pmc_clock_ref("pllb"); clk->pll_min_in = SAM9260_PLL_B_MIN_IN_FREQ; /* 1 MHz */ - clk->pll_max_in = SAM9260_PLL_B_MAX_IN_FREQ; /* 5 MHz */ clk->pll_max_in = 2999999; /* ~3 MHz */ clk->pll_min_out = SAM9260_PLL_B_MIN_OUT_FREQ; /* 70 MHz */ clk->pll_max_out = SAM9260_PLL_B_MAX_OUT_FREQ; /* 130 MHz */ From owner-svn-src-all@freebsd.org Fri Feb 24 00:05: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 45EA3CEB779 for ; Fri, 24 Feb 2017 00:05:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D926EBE1 for ; Fri, 24 Feb 2017 00:05:31 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: f1aa1e07-fa24-11e6-95b5-6dfd7dbb0ee5 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.eu.mailhop.org (Halon) with ESMTPSA id f1aa1e07-fa24-11e6-95b5-6dfd7dbb0ee5; Fri, 24 Feb 2017 00:05:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1O05HCN002052; Thu, 23 Feb 2017 17:05:17 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487894717.25520.18.camel@freebsd.org> Subject: Re: svn commit: r314186 - head/sys/arm/at91 From: Ian Lepore To: "Pedro F. Giffuni" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 23 Feb 2017 17:05:17 -0700 In-Reply-To: <201702232348.v1NNmiED031217@repo.freebsd.org> References: <201702232348.v1NNmiED031217@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, 24 Feb 2017 00:05:33 -0000 On Thu, 2017-02-23 at 23:48 +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Feb 23 23:48:44 2017 > New Revision: 314186 > URL: https://svnweb.freebsd.org/changeset/base/314186 > > Log: >   at91: double assignment. >    >   Found with: coccinelle (da.cocci) >   Suggested by: cognet > > Modified: >   head/sys/arm/at91/at91sam9260.c > > Modified: head/sys/arm/at91/at91sam9260.c > ===================================================================== > ========= > --- head/sys/arm/at91/at91sam9260.c Thu Feb 23 22:46:01 2017 > (r314185) > +++ head/sys/arm/at91/at91sam9260.c Thu Feb 23 23:48:44 2017 > (r314186) > @@ -193,7 +193,6 @@ at91_clock_init(void) >    */ >   clk = at91_pmc_clock_ref("pllb"); >   clk->pll_min_in    = SAM9260_PLL_B_MIN_IN_FREQ; > /*   1 MHz */ > - clk->pll_max_in    = SAM9260_PLL_B_MAX_IN_FREQ; > /*   5 MHz */ >   clk->pll_max_in    = 2999999; > /*  ~3 MHz */ >   clk->pll_min_out   = SAM9260_PLL_B_MIN_OUT_FREQ; /*   > 70 MHz */ >   clk->pll_max_out   = SAM9260_PLL_B_MAX_OUT_FREQ; /* > 130 MHz */ > Just looking at this by eye (but without digging out the at91 manuals) I'd say this looks like fallout from a mismerge and the correct line to keep would be the named constant.  Keeping the one that has actually been in effect all this time isn't the same as keeping the right one, and this deletion may remove the only clue someone might find when they eventually get around to debugging this (if ever, the sam9260 is a pretty old chip). -- ian From owner-svn-src-all@freebsd.org Fri Feb 24 00:15: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 0988CCEBA7C for ; Fri, 24 Feb 2017 00:15:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 C67431172 for ; Fri, 24 Feb 2017 00:15:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id 203so5075690ith.0 for ; Thu, 23 Feb 2017 16:15:17 -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=eWww+WELQo8Z/1rGWUX50vb3D4k1qZwREj7YBdNpqRk=; b=ay7E8VZWeyZKVjQEeVMc4NICpySd2NJAXp38RsXVVOnFkNLbTraHU1SwsNtR8PZq+U wrZACwYIdDY9O7HyCtxrNZQy3maHEuIiBzSy0pdiBDxylwF/mlciayRbFe3M6dtkB1hk j9aE+3u865z32yiMCjnVrlwCYkoBY7Nl1UdPl+y0whgpoN0hFxK22Ny4CwNcon5dy9iD Qb6G6/AeXok0huhkfZ3sbQjECF9NKI4wb8r53bOpcga92YnXecTSJqa/2mKG0iUZgHkp nNq6q+kVKzOb7PM/6j+VTWJFBIYzcWmORBQg/4jR1F0JC7igmkqccvWjXetsds8X0TcY wJWw== 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=eWww+WELQo8Z/1rGWUX50vb3D4k1qZwREj7YBdNpqRk=; b=LAHgA0dZ37rj8a/gw2DfVCyRWJZJzhFN94veezpYzCmUcReim28n5t9IwubmK2vQTz Qto6sQsgHYvsnatNyAv1L+zHev0fl5Fl58y6KfnyeLVLMCRBJYgv5K27ZCZ6tp1f6lEv nzRoXzoCTndOJXI3AXL5MBZRBGtAAQYSurXyAy19gYyURvPwQ0WisgtKX0gnm8eObiIl 7EZJddCFeirDhBrb8uF2COfofrZtFXSjqze/ovB3RHBd8iMDkJPhIZTdKLYOEDOo/e+z C+pOKY/6axRQYynVd9FYcVr0bngNGqP5hkVfPsGvAFcfu2C91zc07usnC+p0OcpnaXdm Rvzw== X-Gm-Message-State: AMke39kr+df5wQiw0h3DejDdgLB9nWVKkSZST8jTwj58hwa4i3TesH6nyUZriV5IuixBfE5NbcPC+PbUFbBaVQ== X-Received: by 10.107.139.131 with SMTP id n125mr425295iod.166.1487895317059; Thu, 23 Feb 2017 16:15:17 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.132 with HTTP; Thu, 23 Feb 2017 16:15:16 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <1487894717.25520.18.camel@freebsd.org> References: <201702232348.v1NNmiED031217@repo.freebsd.org> <1487894717.25520.18.camel@freebsd.org> From: Warner Losh Date: Thu, 23 Feb 2017 17:15:16 -0700 X-Google-Sender-Auth: 8uUUoNS7Dai3zDVtpy-E6TKySw8 Message-ID: Subject: Re: svn commit: r314186 - head/sys/arm/at91 To: Ian Lepore Cc: "Pedro F. Giffuni" , 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: Fri, 24 Feb 2017 00:15:18 -0000 On Thu, Feb 23, 2017 at 5:05 PM, Ian Lepore wrote: > On Thu, 2017-02-23 at 23:48 +0000, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Thu Feb 23 23:48:44 2017 >> New Revision: 314186 >> URL: https://svnweb.freebsd.org/changeset/base/314186 >> >> Log: >> at91: double assignment. >> >> Found with: coccinelle (da.cocci) >> Suggested by: cognet >> >> Modified: >> head/sys/arm/at91/at91sam9260.c >> >> Modified: head/sys/arm/at91/at91sam9260.c >> ===================================================================== >> ========= >> --- head/sys/arm/at91/at91sam9260.c Thu Feb 23 22:46:01 2017 >> (r314185) >> +++ head/sys/arm/at91/at91sam9260.c Thu Feb 23 23:48:44 2017 >> (r314186) >> @@ -193,7 +193,6 @@ at91_clock_init(void) >> */ >> clk = at91_pmc_clock_ref("pllb"); >> clk->pll_min_in = SAM9260_PLL_B_MIN_IN_FREQ; >> /* 1 MHz */ >> - clk->pll_max_in = SAM9260_PLL_B_MAX_IN_FREQ; >> /* 5 MHz */ >> clk->pll_max_in = 2999999; >> /* ~3 MHz */ >> clk->pll_min_out = SAM9260_PLL_B_MIN_OUT_FREQ; /* >> 70 MHz */ >> clk->pll_max_out = SAM9260_PLL_B_MAX_OUT_FREQ; /* >> 130 MHz */ >> > > Just looking at this by eye (but without digging out the at91 manuals) > I'd say this looks like fallout from a mismerge and the correct line to > keep would be the named constant. Keeping the one that has actually > been in effect all this time isn't the same as keeping the right one, > and this deletion may remove the only clue someone might find when they > eventually get around to debugging this (if ever, the sam9260 is a > pretty old chip). I was going to test boot on my SAM9260EK board since I had the same thought, but wasn't completely sure. Warner From owner-svn-src-all@freebsd.org Fri Feb 24 00:23: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 CAA28CEBD51 for ; Fri, 24 Feb 2017 00:23:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 90B6F16DD for ; Fri, 24 Feb 2017 00:23:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: (qmail 49406 invoked by uid 99); 24 Feb 2017 00:23:40 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2017 00:23:40 +0000 Received: from [192.168.0.104] (unknown [190.157.139.67]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 6827E1A03A6; Fri, 24 Feb 2017 00:23:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r314186 - head/sys/arm/at91 From: Pedro Giffuni In-Reply-To: <1487894717.25520.18.camel@freebsd.org> Date: Thu, 23 Feb 2017 19:23:36 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <66C0031D-1C8C-4922-B452-4E5874D75156@FreeBSD.org> References: <201702232348.v1NNmiED031217@repo.freebsd.org> <1487894717.25520.18.camel@freebsd.org> To: Ian Lepore 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: Fri, 24 Feb 2017 00:23:41 -0000 Hi; > Il giorno 23 feb 2017, alle ore 19:05, Ian Lepore ha = scritto: >=20 > On Thu, 2017-02-23 at 23:48 +0000, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Thu Feb 23 23:48:44 2017 >> New Revision: 314186 >> URL: https://svnweb.freebsd.org/changeset/base/314186 >>=20 >> Log: >> at91: double assignment. >> =20 >> Found with: coccinelle (da.cocci) >> Suggested by: cognet >>=20 >> Modified: >> head/sys/arm/at91/at91sam9260.c >>=20 >> Modified: head/sys/arm/at91/at91sam9260.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/at91/at91sam9260.c Thu Feb 23 22:46:01 2017=09 >> (r314185) >> +++ head/sys/arm/at91/at91sam9260.c Thu Feb 23 23:48:44 2017=09 >> (r314186) >> @@ -193,7 +193,6 @@ at91_clock_init(void) >> */ >> clk =3D at91_pmc_clock_ref("pllb"); >> clk->pll_min_in =3D SAM9260_PLL_B_MIN_IN_FREQ; =09 >> /* 1 MHz */ >> - clk->pll_max_in =3D SAM9260_PLL_B_MAX_IN_FREQ; =09 >> /* 5 MHz */ >> clk->pll_max_in =3D 2999999; =09 >> /* ~3 MHz */ >> clk->pll_min_out =3D SAM9260_PLL_B_MIN_OUT_FREQ; /* =20 >> 70 MHz */ >> clk->pll_max_out =3D SAM9260_PLL_B_MAX_OUT_FREQ; /* >> 130 MHz */ >>=20 >=20 > Just looking at this by eye (but without digging out the at91 manuals) > I'd say this looks like fallout from a mismerge and the correct line = to > keep would be the named constant. Keeping the one that has actually > been in effect all this time isn't the same as keeping the right one, > and this deletion may remove the only clue someone might find when = they > eventually get around to debugging this (if ever, the sam9260 is a > pretty old chip). >=20 > -- ian >=20 >=20 According to SVN annotations it is not a mismerge:. The first line looks = more technical but cognet@ stated from the second one is correct and = matches the (long) initial comment. It=E2=80=99s also what is in effective use now, so I wouldn=E2=80=99t = change it unless someone with the hardware confirms first. Pedro. From owner-svn-src-all@freebsd.org Fri Feb 24 00:28: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 F1F0FCEBF43; Fri, 24 Feb 2017 00:28:44 +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 DC0611A26; Fri, 24 Feb 2017 00:28:44 +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 v1O0SbAb018572 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Feb 2017 16:28:37 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1O0Sbdr018571; Thu, 23 Feb 2017 16:28:37 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 23 Feb 2017 16:28:37 -0800 From: Gleb Smirnoff To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314142 - head/sys/dev/ce Message-ID: <20170224002837.GU8899@FreeBSD.org> References: <201702231530.v1NFULwx024028@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702231530.v1NFULwx024028@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, 24 Feb 2017 00:28:45 -0000 On Thu, Feb 23, 2017 at 03:30:21PM +0000, Pedro F. Giffuni wrote: P> Author: pfg P> Date: Thu Feb 23 15:30:21 2017 P> New Revision: 314142 P> URL: https://svnweb.freebsd.org/changeset/base/314142 P> P> Log: P> dev/ce: double assignment. P> P> The code is not operational right now so just comment away an obviously P> useless assignment. Fix some typos while here. P> P> Found with: coccinelle (da.cocci) What is interesting is that vendor still exists and sells the hardware, but explicitly says "FreeBSD 7.x isn't supported" :) http://cronyx.ru/hardware/tau32.html I don't see any reasons for the driver to get broken between 6.0 and 7.0. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Feb 24 00:53: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 3AD67CE8765; Fri, 24 Feb 2017 00:53:31 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (kanar.ci0.org [IPv6:2001:bc8:35e6::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 CE20D91C; Fri, 24 Feb 2017 00:53:30 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.9/8.14.8) with ESMTP id v1O0rRHN046698; Fri, 24 Feb 2017 01:53:27 +0100 (CET) (envelope-from cognet@ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.9/8.14.8/Submit) id v1O0rRIA046697; Fri, 24 Feb 2017 01:53:27 +0100 (CET) (envelope-from cognet@ci0.org) X-Authentication-Warning: kanar.ci0.org: doginou set sender to cognet@ci0.org using -f Date: Fri, 24 Feb 2017 01:53:27 +0100 From: Olivier Houchard To: Pedro Giffuni Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314186 - head/sys/arm/at91 Message-ID: <20170224005327.GA46682@ci0.org> References: <201702232348.v1NNmiED031217@repo.freebsd.org> <1487894717.25520.18.camel@freebsd.org> <66C0031D-1C8C-4922-B452-4E5874D75156@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66C0031D-1C8C-4922-B452-4E5874D75156@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 00:53:31 -0000 On Thu, Feb 23, 2017 at 07:23:36PM -0500, Pedro Giffuni wrote: > Hi; > > > Il giorno 23 feb 2017, alle ore 19:05, Ian Lepore ha scritto: > > > > On Thu, 2017-02-23 at 23:48 +0000, Pedro F. Giffuni wrote: > >> Author: pfg > >> Date: Thu Feb 23 23:48:44 2017 > >> New Revision: 314186 > >> URL: https://svnweb.freebsd.org/changeset/base/314186 > >> > >> Log: > >> at91: double assignment. > >> > >> Found with: coccinelle (da.cocci) > >> Suggested by: cognet > >> > >> Modified: > >> head/sys/arm/at91/at91sam9260.c > >> > >> Modified: head/sys/arm/at91/at91sam9260.c > >> ===================================================================== > >> ========= > >> --- head/sys/arm/at91/at91sam9260.c Thu Feb 23 22:46:01 2017 > >> (r314185) > >> +++ head/sys/arm/at91/at91sam9260.c Thu Feb 23 23:48:44 2017 > >> (r314186) > >> @@ -193,7 +193,6 @@ at91_clock_init(void) > >> */ > >> clk = at91_pmc_clock_ref("pllb"); > >> clk->pll_min_in = SAM9260_PLL_B_MIN_IN_FREQ; > >> /* 1 MHz */ > >> - clk->pll_max_in = SAM9260_PLL_B_MAX_IN_FREQ; > >> /* 5 MHz */ > >> clk->pll_max_in = 2999999; > >> /* ~3 MHz */ > >> clk->pll_min_out = SAM9260_PLL_B_MIN_OUT_FREQ; /* > >> 70 MHz */ > >> clk->pll_max_out = SAM9260_PLL_B_MAX_OUT_FREQ; /* > >> 130 MHz */ > >> > > > > Just looking at this by eye (but without digging out the at91 manuals) > > I'd say this looks like fallout from a mismerge and the correct line to > > keep would be the named constant. Keeping the one that has actually > > been in effect all this time isn't the same as keeping the right one, > > and this deletion may remove the only clue someone might find when they > > eventually get around to debugging this (if ever, the sam9260 is a > > pretty old chip). > > > > -- ian > > > > > > According to SVN annotations it is not a mismerge:. The first line looks more technical but cognet@ stated from the second one is correct and matches the (long) initial comment. > > It???s also what is in effective use now, so I wouldn???t change it unless someone with the hardware confirms first. > As Pedro says, there's a large comment that says : * Fudge MAX pll in frequence down below 3.0 MHz to ensure * PMC alogrithm choose the divisor that causes the input clock * to be near the optimal 2 MHz per datasheet. We know * we are going to be using this for the USB * clock at 96 MHz. * Causes no extra frequency deviation for all recommended crystal * values. See Note 1, table 40-16 SAM9260 doc. So I just assumed it was OK. (And it's been that way since the code was first submitted). Olivier From owner-svn-src-all@freebsd.org Fri Feb 24 01:31: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 0F5D4CE8D0B for ; Fri, 24 Feb 2017 01:31:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::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 B76C31715 for ; Fri, 24 Feb 2017 01:31:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id y135so6752517itc.1 for ; Thu, 23 Feb 2017 17:31:46 -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=tC22iJiMo+GyJxXL1UC3fN+J8UR2Lo9s3VRpfbLEJmA=; b=WEnzQbL/OReo9FeIW0QIPZMTPoD5dnCHpMJXxPxMeo4xiSTTi6nqocbJujwYy7BK4t wwfdxPL5GYw39rNtWO9EJlWKMiJUvvyrmTkTwpQKhxVxzqdbhjDpIV3KxR8jjRvNDogI AYd0A08oyvzoOtlaFAVH7s+j1lB04IDeKxbf0UINUZnbtpK/PinbiZ/mqNqusrZUB49T B3xlEF8gUfMie35oJzAH18FJ+uOMH3VmVwSvmbG3zJ1UMjp0RwNYphzJpPvTvm8dpE+y ZvMsNaFNxeUOKdDPf367On9zNMBDJQlzcK/XMp1NcB3ApeZB21k17AInX+nz7v97paUt HPmg== 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=tC22iJiMo+GyJxXL1UC3fN+J8UR2Lo9s3VRpfbLEJmA=; b=RapR7HhqMskeFX16fqdCdhu2EexYbkAPwvsCH3aPWHZmexH3hPKtk/DkoI6xMPV3Oo PgHEyEhEZHbpgUnr8Ew9Knw6C+8c07hoRIndfB2uiirEI1jx0fVB3zKasa2GKhdH0gIC 4nzaqRjiMdZSe5ofhRXRL4kx45aSp2ptITXszQORKnvqZRkNVxqovkJOkxeZf3qHl/0j ZIjrIH0V04x0IZAFGfGTdqdDY/CSxk43okdqpnfyA1FCt1RIsHSvv6u/4cRah0ytdXJ5 8M1vPeRbRL4/xtyFq4IhHQEwbniCGi1NLHFq9OoUdvEgYqiKRLkk8IZGDCVNY+q/2DF7 wiqA== X-Gm-Message-State: AMke39lFl5aUxFV0M6Ibmcnc0c5sKl/KkLV7gdDzmvWHCV6J//+NJGHGPqQDFsmw82oj5WTQ9wMLpXkeVxgLyg== X-Received: by 10.36.93.213 with SMTP id w204mr552062ita.60.1487899906091; Thu, 23 Feb 2017 17:31:46 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.132 with HTTP; Thu, 23 Feb 2017 17:31:45 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <20170224002837.GU8899@FreeBSD.org> References: <201702231530.v1NFULwx024028@repo.freebsd.org> <20170224002837.GU8899@FreeBSD.org> From: Warner Losh Date: Thu, 23 Feb 2017 18:31:45 -0700 X-Google-Sender-Auth: 0k7l9qfDOHavjC_6nhUafrgoYWY Message-ID: Subject: Re: svn commit: r314142 - head/sys/dev/ce To: Gleb Smirnoff Cc: "Pedro F. Giffuni" , 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: Fri, 24 Feb 2017 01:31:47 -0000 On Thu, Feb 23, 2017 at 5:28 PM, Gleb Smirnoff wrote: > On Thu, Feb 23, 2017 at 03:30:21PM +0000, Pedro F. Giffuni wrote: > P> Author: pfg > P> Date: Thu Feb 23 15:30:21 2017 > P> New Revision: 314142 > P> URL: https://svnweb.freebsd.org/changeset/base/314142 > P> > P> Log: > P> dev/ce: double assignment. > P> > P> The code is not operational right now so just comment away an obviously > P> useless assignment. Fix some typos while here. > P> > P> Found with: coccinelle (da.cocci) > > What is interesting is that vendor still exists and sells the hardware, but > explicitly says "FreeBSD 7.x isn't supported" :) > > http://cronyx.ru/hardware/tau32.html > > I don't see any reasons for the driver to get broken between 6.0 and 7.0. Murray Stokely was the contact for this hardware. I think he gave it to me years ago, but I just checked and I can't find it in the usual places. IIRC, they were ISA cards though, not PCI... Warner From owner-svn-src-all@freebsd.org Fri Feb 24 01:39: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 014EACE8EF4; Fri, 24 Feb 2017 01:39: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 B0F8E1966; Fri, 24 Feb 2017 01:39:09 +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 v1O1d8oC075688; Fri, 24 Feb 2017 01:39:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O1d86T075687; Fri, 24 Feb 2017 01:39:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702240139.v1O1d86T075687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 24 Feb 2017 01:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314187 - 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, 24 Feb 2017 01:39:10 -0000 Author: imp Date: Fri Feb 24 01:39:08 2017 New Revision: 314187 URL: https://svnweb.freebsd.org/changeset/base/314187 Log: KDTRACE_HOOKS isn't guaranteed to be defined. Change to check to see if it is defined or not rather than if it is non-zero. Sponsored by: Netflix, Inc Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Thu Feb 23 23:48:44 2017 (r314186) +++ head/sys/kern/kern_mutex.c Fri Feb 24 01:39:08 2017 (r314187) @@ -514,7 +514,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, m->lock_object.lo_name, (void *)m->mtx_lock, file, line); #ifdef LOCK_PROFILING doing_lockprof = 1; -#elif KDTRACE_HOOKS +#elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; if (__predict_false(doing_lockprof)) all_time -= lockstat_nsecs(&m->lock_object); @@ -720,7 +720,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); #ifdef LOCK_PROFILING doing_lockprof = 1; -#elif KDTRACE_HOOKS +#elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; if (__predict_false(doing_lockprof)) spin_time -= lockstat_nsecs(&m->lock_object); @@ -804,7 +804,7 @@ thread_lock_flags_(struct thread *td, in #ifdef LOCK_PROFILING doing_lockprof = 1; -#elif KDTRACE_HOOKS +#elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; if (__predict_false(doing_lockprof)) spin_time -= lockstat_nsecs(&td->td_lock->lock_object); From owner-svn-src-all@freebsd.org Fri Feb 24 01: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 33652CE8F22; Fri, 24 Feb 2017 01:39:14 +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 0318E198B; Fri, 24 Feb 2017 01:39:13 +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 v1O1dDid075740; Fri, 24 Feb 2017 01:39:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O1dDLu075739; Fri, 24 Feb 2017 01:39:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702240139.v1O1dDLu075739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 24 Feb 2017 01:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314188 - 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, 24 Feb 2017 01:39:14 -0000 Author: imp Date: Fri Feb 24 01:39:12 2017 New Revision: 314188 URL: https://svnweb.freebsd.org/changeset/base/314188 Log: Cast values to (int) before comparing them to the range of the enum. This ensures they are in range w/o the warnings. Modified: head/sys/kern/kern_pmc.c Modified: head/sys/kern/kern_pmc.c ============================================================================== --- head/sys/kern/kern_pmc.c Fri Feb 24 01:39:08 2017 (r314187) +++ head/sys/kern/kern_pmc.c Fri Feb 24 01:39:12 2017 (r314188) @@ -287,8 +287,8 @@ pmc_soft_ev_deregister(struct pmc_soft * if (ps->ps_ev.pm_ev_code != 0 && (ps->ps_ev.pm_ev_code - PMC_EV_SOFT_FIRST) < pmc_softevents) { - KASSERT(ps->ps_ev.pm_ev_code >= PMC_EV_SOFT_FIRST && - ps->ps_ev.pm_ev_code <= PMC_EV_SOFT_LAST, + KASSERT((int)ps->ps_ev.pm_ev_code >= PMC_EV_SOFT_FIRST && + (int)ps->ps_ev.pm_ev_code <= PMC_EV_SOFT_LAST, ("pmc_soft_deregister: invalid event value")); pmc_softs[ps->ps_ev.pm_ev_code - PMC_EV_SOFT_FIRST] = NULL; } @@ -304,8 +304,8 @@ pmc_soft_ev_acquire(enum pmc_event ev) if (ev == 0 || (ev - PMC_EV_SOFT_FIRST) >= pmc_softevents) return NULL; - KASSERT(ev >= PMC_EV_SOFT_FIRST && - ev <= PMC_EV_SOFT_LAST, + KASSERT((int)ev >= PMC_EV_SOFT_FIRST && + (int)ev <= PMC_EV_SOFT_LAST, ("event out of range")); mtx_lock_spin(&pmc_softs_mtx); From owner-svn-src-all@freebsd.org Fri Feb 24 03:05: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 CC9DACEA6E5; Fri, 24 Feb 2017 03:05:46 +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 AD02C801; Fri, 24 Feb 2017 03:05:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 0B07340ED; Fri, 24 Feb 2017 03:05:46 +0000 (UTC) Date: Fri, 24 Feb 2017 03:05:46 +0000 From: Alexey Dokuchaev To: Pedro Giffuni Cc: Benjamin Kaduk , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r314142 - head/sys/dev/ce Message-ID: <20170224030545.GA39731@FreeBSD.org> References: <201702231530.v1NFULwx024028@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 24 Feb 2017 03:05:46 -0000 On Thu, Feb 23, 2017 at 12:49:01PM -0500, Pedro Giffuni wrote: > On 2/23/2017 12:13 PM, Benjamin Kaduk wrote: > > On Thu, Feb 23, 2017 at 9:30 AM, Pedro F. Giffuni > > wrote: > > @@ -632,8 +632,8 @@ void ce_stop_chan (ce_chan_t *c) > > "UserRequest (%s:%d)\n", > > __FUNCTION__, __LINE__)); > > return; > > } > > - req->Command = TAU32_Configure_Commit | > > - TAU32_Tx_Stop | TAU32_Rx_Stop; > > +// req->Command = TAU32_Configure_Commit | > > +// TAU32_Tx_Stop | TAU32_Rx_Stop; > > > > Should probably stick to C-style comments, though. > > They are valid C99 comments but I understand what you mean, Using comments (regardless of style) for disabling a code block is wrong; may I suggest `#if 0' instead? (This also does not hurt `svn blame'.) ./danfe From owner-svn-src-all@freebsd.org Fri Feb 24 04:09: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 E0A51CEB5F9 for ; Fri, 24 Feb 2017 04:09:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm27.bullet.mail.ne1.yahoo.com (nm27.bullet.mail.ne1.yahoo.com [98.138.90.90]) (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 945E51E1 for ; Fri, 24 Feb 2017 04:09:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1487909390; bh=kfKznVJraRlzSyHtGM3mBfQEooSyLS5Ji0JsrzfM6F0=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=iPakUEZztCLy/yieqF13oGnBpOiRzNXAa3LbfDYKioSaB/CtaA8LWgtoLAgc/dvZmMdTBPV0HPMgFoAHv9yNFp7+XMwTkYYZD4tlWzZax5s0xRcrHYsTjcJMqhNJyBcGmBxvHTJLl6/crRw9zcGVm4SN9k5x8CYW6yBb/WSFcUF7DPAj2WWedWBzqcvZ1U4IYrurFmC7FcpyFPMmkeIbdn2Q0Enq9eVLILA9w5ngwL8ioqd/2zDljsklosnDDebGAlWO1RM/cU8t7aaLvmARUl2sqzdE61iJVg0+xCgcgtkpX20IYqJl6nPUcAENL6+u33nk2wVkqeXzJ9fGBCb/kg== Received: from [98.138.101.131] by nm27.bullet.mail.ne1.yahoo.com with NNFMP; 24 Feb 2017 04:09:50 -0000 Received: from [98.138.104.115] by tm19.bullet.mail.ne1.yahoo.com with NNFMP; 24 Feb 2017 04:09:50 -0000 Received: from [127.0.0.1] by smtp224.mail.ne1.yahoo.com with NNFMP; 24 Feb 2017 04:09:50 -0000 X-Yahoo-Newman-Id: 913656.86247.bm@smtp224.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CQk_1rcVM1k_H1fHNwBzuKlJQK2fIXXnvc5z3aKX.zsRn9W FcStG940NDbEFdE8jOIsylmwOL_HtDuEI157KDkGJMc8yiqdEyU3XPMdbDGY RzEMOIF9mWX0VLxroFlO7dJwbe.6sGYFfMj_oCXpzztvddxZJBdmAizYJdao F41hkCBqhjHECtinnWohnhgPe5TX.h91fDxwD1tJyd6dxPg.SEmPDApkxh_6 aI1kGX58yyWsD8F02sKXydxPeNZTMA3_klT7hCpW0bjpuhhSYaA1N8wnDbQB MbVXJiHekPChoVPmSY5Fsz3kKtuF4L_gGEvuceiSCEKxf3mYlkWkZOfUJq8z DOWqFxV9qvq_Fkr25NJ0PQivy7byKpGwgNBI3b2qYFhwse17oSlYVWCbQr3z qk7cmgdmqY5PQnPiHUcusrOAoPlzlQaPfW1DYNB5gJzMOvSKqWymqI7Fhm7L 1v14gf3jMRhShNdS1hyTFgSvFOHCtsfUZBtKZwqSPgMznAicOte0BWR8SR2H 8tEjXizq7jjukIf6mDfv36Cx.qsvVk8f.zlaEH1s9V_nYcR0- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r314142 - head/sys/dev/ce To: Alexey Dokuchaev References: <201702231530.v1NFULwx024028@repo.freebsd.org> <20170224030545.GA39731@FreeBSD.org> Cc: Benjamin Kaduk , rik@FreeBSD.org, "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Pedro Giffuni Message-ID: <87c0c8ff-e80d-6b6b-a9a7-c3da2ae4da84@FreeBSD.org> Date: Thu, 23 Feb 2017 23:12:33 -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: <20170224030545.GA39731@FreeBSD.org> 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: Fri, 24 Feb 2017 04:09:59 -0000 Hello, On 2/23/2017 10:05 PM, Alexey Dokuchaev wrote: > On Thu, Feb 23, 2017 at 12:49:01PM -0500, Pedro Giffuni wrote: >> On 2/23/2017 12:13 PM, Benjamin Kaduk wrote: >>> On Thu, Feb 23, 2017 at 9:30 AM, Pedro F. Giffuni >> > wrote: >>> @@ -632,8 +632,8 @@ void ce_stop_chan (ce_chan_t *c) >>> "UserRequest (%s:%d)\n", >>> __FUNCTION__, __LINE__)); >>> return; >>> } >>> - req->Command = TAU32_Configure_Commit | >>> - TAU32_Tx_Stop | TAU32_Rx_Stop; >>> +// req->Command = TAU32_Configure_Commit | >>> +// TAU32_Tx_Stop | TAU32_Rx_Stop; >>> >>> Should probably stick to C-style comments, though. >> They are valid C99 comments but I understand what you mean, > Using comments (regardless of style) for disabling a code block is wrong; > may I suggest `#if 0' instead? (This also does not hurt `svn blame'.) This is not covered by style(9) so I guess it's personal choice. As I see it, '#if 0' is WIP: code that is not ready but is kept to be enabled at later time. I would generally prefer to remove such code and hunt it back through svn if I need it. In this case the code is only to serve as a reference, JIC someone wants to implement it for real. Since the main comment starts with "XXXRIK: .." and states "it is VERY BUGGY!!! Do not use it ... ", I just don't think it is worth to spend much time deciding how to comment it out. Let me CC rik@ though, maybe he has a real fix ;). Pedro. ps. for Roman ... we are discussing this change: https://svnweb.freebsd.org/changeset/base/314142 Feel free to chime in if you have a cleaner workaround. From owner-svn-src-all@freebsd.org Fri Feb 24 06: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 4CDA2CEBFD4; Fri, 24 Feb 2017 06:24: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 19F751840; Fri, 24 Feb 2017 06:24: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 v1O6OdNU094468; Fri, 24 Feb 2017 06:24:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O6OdRr094467; Fri, 24 Feb 2017 06:24:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702240624.v1O6OdRr094467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 24 Feb 2017 06:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314189 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 06:24:40 -0000 Author: ngie Date: Fri Feb 24 06:24:39 2017 New Revision: 314189 URL: https://svnweb.freebsd.org/changeset/base/314189 Log: Fix up NULL/'\0' uses and fix 2 derefs after NULL MFC after: 2 weeks Reported by: Coverity CID: 1018898, 1018899 Differential Revision: https://reviews.freebsd.org/D6142 Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/scsi_cmdparse.c Modified: head/lib/libcam/scsi_cmdparse.c ============================================================================== --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 01:39:12 2017 (r314188) +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:24:39 2017 (r314189) @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le *(va_arg(*ap, int *)) = (ARG); \ assigned++; \ } \ - field_name[0] = 0; \ + field_name[0] = '\0'; \ suppress = 0; \ } while (0) u_char bits = 0; /* For bit fields */ int shift = 0; /* Bits already shifted out */ suppress = 0; - field_name[0] = 0; + field_name[0] = '\0'; while (!done) { switch(letter = *fmt) { @@ -169,9 +169,9 @@ do_buff_decode(u_int8_t *buff, size_t le fmt++; } - if (fmt) + if (*fmt == '\0') fmt++; /* Skip '}' */ - field_name[i] = 0; + field_name[i] = '\0'; break; } @@ -255,7 +255,7 @@ do_buff_decode(u_int8_t *buff, size_t le break; } if (!suppress) { - if (arg_put) + if (arg_put != NULL) (*arg_put)(puthook, (letter == 't' ? 'b' : letter), &buff[ind], width, field_name); @@ -268,7 +268,7 @@ do_buff_decode(u_int8_t *buff, size_t le for (p = dest + width - 1; p >= dest && *p == ' '; p--) - *p = 0; + *p = '\0'; } } assigned++; @@ -379,22 +379,22 @@ next_field(const char **pp, char *fmt, i field_size = 8; /* Default to byte field type... */ *fmt = 'i'; field_width = 1; /* 1 byte wide */ - if (name) - *name = 0; + if (name != NULL) + *name = '\0'; state = BETWEEN_FIELDS; while (state != DONE) { switch(state) { case BETWEEN_FIELDS: - if (*p == 0) + if (*p == '\0') state = DONE; else if (isspace(*p)) p++; else if (*p == '#') { while (*p && *p != '\n') p++; - if (p) + if (*p != '\0') p++; } else if (*p == '{') { int i = 0; @@ -410,7 +410,7 @@ next_field(const char **pp, char *fmt, i } if(name && i < n_name) - name[i] = 0; + name[i] = '\0'; if (*p == '}') p++; @@ -568,7 +568,7 @@ do_encode(u_char *buff, size_t vec_max, if (suppress) value = 0; else - value = arg_get ? + value = arg_get != NULL ? (*arg_get)(gethook, field_name) : va_arg(*ap, int); } @@ -672,8 +672,8 @@ csio_decode(struct ccb_scsiio *csio, con va_start(ap, fmt); - retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, 0, 0, - fmt, &ap); + retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, + NULL, NULL, fmt, &ap); va_end(ap); @@ -705,7 +705,7 @@ buff_decode(u_int8_t *buff, size_t len, va_start(ap, fmt); - retval = do_buff_decode(buff, len, 0, 0, fmt, &ap); + retval = do_buff_decode(buff, len, NULL, NULL, fmt, &ap); va_end(ap); @@ -819,7 +819,8 @@ csio_encode(struct ccb_scsiio *csio, con va_start(ap, fmt); - retval = do_encode(csio->data_ptr, csio->dxfer_len, 0, 0, 0, fmt, &ap); + retval = do_encode(csio->data_ptr, csio->dxfer_len, NULL, NULL, NULL, + fmt, &ap); va_end(ap); @@ -838,7 +839,7 @@ buff_encode_visit(u_int8_t *buff, size_t if (arg_get == NULL) return(-1); - return (do_encode(buff, len, 0, arg_get, gethook, fmt, NULL)); + return (do_encode(buff, len, NULL, arg_get, gethook, fmt, NULL)); } int @@ -853,6 +854,6 @@ csio_encode_visit(struct ccb_scsiio *csi if (arg_get == NULL) return(-1); - return (do_encode(csio->data_ptr, csio->dxfer_len, 0, arg_get, + return (do_encode(csio->data_ptr, csio->dxfer_len, NULL, arg_get, gethook, fmt, NULL)); } From owner-svn-src-all@freebsd.org Fri Feb 24 06:28: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 EC913CEB048; Fri, 24 Feb 2017 06:28: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 A27E719CE; Fri, 24 Feb 2017 06:28: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 v1O6SwbU094661; Fri, 24 Feb 2017 06:28:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O6SwmA094660; Fri, 24 Feb 2017 06:28:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702240628.v1O6SwmA094660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 24 Feb 2017 06:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314190 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 06:29:00 -0000 Author: ngie Date: Fri Feb 24 06:28:58 2017 New Revision: 314190 URL: https://svnweb.freebsd.org/changeset/base/314190 Log: Fix some minor style nits: put parentheses around return values MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/scsi_cmdparse.c Modified: head/lib/libcam/scsi_cmdparse.c ============================================================================== --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:24:39 2017 (r314189) +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:28:58 2017 (r314190) @@ -530,7 +530,7 @@ next_field(const char **pp, char *fmt, i if (is_error) { *error_p = 1; - return 0; + return (0); } *error_p = 0; @@ -659,9 +659,9 @@ do_encode(u_char *buff, size_t vec_max, *used = ind; if (error) - return -1; + return (-1); - return encoded; + return (encoded); } int @@ -723,7 +723,7 @@ buff_decode_visit(u_int8_t *buff, size_t * the arg_put function. */ if (arg_put == NULL) - return(-1); + return (-1); return (do_buff_decode(buff, len, arg_put, puthook, fmt, NULL)); } @@ -779,20 +779,20 @@ csio_build_visit(struct ccb_scsiio *csio int retval; if (csio == NULL) - return(0); + return (0); /* * We need something to encode, but we can't get it without the * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); bzero(csio, sizeof(struct ccb_scsiio)); if ((retval = do_encode(csio->cdb_io.cdb_bytes, SCSI_MAX_CDBLEN, &cmdlen, arg_get, gethook, cmd_spec, NULL)) == -1) - return(retval); + return (retval); cam_fill_csio(csio, /* retries */ retry_count, @@ -805,7 +805,7 @@ csio_build_visit(struct ccb_scsiio *csio /* cdb_len */ cmdlen, /* timeout */ timeout ? timeout : 5000); - return(retval); + return (retval); } int @@ -837,7 +837,7 @@ buff_encode_visit(u_int8_t *buff, size_t * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); return (do_encode(buff, len, NULL, arg_get, gethook, fmt, NULL)); } @@ -852,7 +852,7 @@ csio_encode_visit(struct ccb_scsiio *csi * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); return (do_encode(csio->data_ptr, csio->dxfer_len, NULL, arg_get, gethook, fmt, NULL)); From owner-svn-src-all@freebsd.org Fri Feb 24 06:49: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 29EB3CEB5C1; Fri, 24 Feb 2017 06:49: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 DF958254; Fri, 24 Feb 2017 06:49: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 v1O6nWLZ002923; Fri, 24 Feb 2017 06:49:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O6nWMh002922; Fri, 24 Feb 2017 06:49:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702240649.v1O6nWMh002922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 24 Feb 2017 06:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314191 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 06:49:33 -0000 Author: ngie Date: Fri Feb 24 06:49:31 2017 New Revision: 314191 URL: https://svnweb.freebsd.org/changeset/base/314191 Log: Fix up r314189 The conditional in do_buff_decode(..) after the while loop was accidentally inverted. Only increment the pointer for fmt if it's not NUL. MFC after: 2 weeks X-MFC with: r314189 Reported by: pstef Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/scsi_cmdparse.c Modified: head/lib/libcam/scsi_cmdparse.c ============================================================================== --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:28:58 2017 (r314190) +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:49:31 2017 (r314191) @@ -169,7 +169,7 @@ do_buff_decode(u_int8_t *buff, size_t le fmt++; } - if (*fmt == '\0') + if (*fmt != '\0') fmt++; /* Skip '}' */ field_name[i] = '\0'; break; From owner-svn-src-all@freebsd.org Fri Feb 24 07: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 6A6FCCEB897; Fri, 24 Feb 2017 07:08: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 1F3CCC28; Fri, 24 Feb 2017 07:08: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 v1O77xvn011116; Fri, 24 Feb 2017 07:07:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O77wAs011110; Fri, 24 Feb 2017 07:07:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702240707.v1O77wAs011110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 24 Feb 2017 07:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314192 - 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: Fri, 24 Feb 2017 07:08:00 -0000 Author: adrian Date: Fri Feb 24 07:07:58 2017 New Revision: 314192 URL: https://svnweb.freebsd.org/changeset/base/314192 Log: [iwm] Add support for Firmware paging, needed for newer 8000C firmware. * Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware what memory ranges to use for paging. Obtained from: dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b402f18 Modified: head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_debug.h head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h head/sys/modules/iwm/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 24 06:49:31 2017 (r314191) +++ head/sys/conf/files Fri Feb 24 07:07:58 2017 (r314192) @@ -1864,6 +1864,7 @@ dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_7000.c optional iwm dev/iwm/if_iwm_8000.c optional iwm dev/iwm/if_iwm_binding.c optional iwm +dev/iwm/if_iwm_fw.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm dev/iwm/if_iwm_notif_wait.c optional iwm Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri Feb 24 06:49:31 2017 (r314191) +++ head/sys/dev/iwm/if_iwm.c Fri Feb 24 07:07:58 2017 (r314192) @@ -166,6 +166,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include const uint8_t iwm_nvm_channels[] = { /* 2.4 GHz */ @@ -2869,9 +2870,21 @@ iwm_mvm_load_ucode_wait_alive(struct iwm * included in the IWM_UCODE_INIT image. */ if (fw->paging_mem_size) { - /* XXX implement FW paging */ - device_printf(sc->sc_dev, - "%s: XXX FW paging not implemented yet\n", __func__); + error = iwm_save_fw_paging(sc, fw); + if (error) { + device_printf(sc->sc_dev, + "%s: failed to save the FW paging image\n", + __func__); + return error; + } + + error = iwm_send_paging_cmd(sc, fw); + if (error) { + device_printf(sc->sc_dev, + "%s: failed to send the paging cmd\n", __func__); + iwm_free_fw_paging(sc); + return error; + } } if (!error) @@ -5517,6 +5530,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_REMOVE_STA: case IWM_TXPATH_FLUSH: case IWM_LQ_CMD: + case IWM_FW_PAGING_BLOCK_CMD: case IWM_BT_CONFIG: case IWM_REPLY_THERMAL_MNG_BACKOFF: cresp = (void *)pkt->data; @@ -6475,6 +6489,8 @@ iwm_detach_local(struct iwm_softc *sc, i iwm_dma_contig_free(&sc->kw_dma); iwm_dma_contig_free(&sc->fw_dma); + iwm_free_fw_paging(sc); + /* Finished with the hardware - detach things */ iwm_pci_detach(dev); Modified: head/sys/dev/iwm/if_iwm_debug.h ============================================================================== --- head/sys/dev/iwm/if_iwm_debug.h Fri Feb 24 06:49:31 2017 (r314191) +++ head/sys/dev/iwm/if_iwm_debug.h Fri Feb 24 07:07:58 2017 (r314192) @@ -42,6 +42,7 @@ enum { IWM_DEBUG_TRANS = 0x00040000, /* Transport layer (eg PCIe) */ IWM_DEBUG_EEPROM = 0x00080000, /* EEPROM/channel information */ IWM_DEBUG_TEMP = 0x00100000, /* Thermal Sensor handling */ + IWM_DEBUG_FW = 0x00200000, /* Firmware management */ 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 Fri Feb 24 06:49:31 2017 (r314191) +++ head/sys/dev/iwm/if_iwmreg.h Fri Feb 24 07:07:58 2017 (r314192) @@ -888,28 +888,6 @@ 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 @@ -1842,12 +1820,8 @@ enum { IWM_LQ_CMD = 0x4e, - /* Calibration */ - IWM_TEMPERATURE_NOTIFICATION = 0x62, - IWM_CALIBRATION_CFG_CMD = 0x65, - IWM_CALIBRATION_RES_NOTIFICATION = 0x66, - IWM_CALIBRATION_COMPLETE_NOTIFICATION = 0x67, - IWM_RADIO_VERSION_NOTIFICATION = 0x68, + /* paging block to FW cpu2 */ + IWM_FW_PAGING_BLOCK_CMD = 0x4f, /* Scan offload */ IWM_SCAN_OFFLOAD_REQUEST_CMD = 0x51, @@ -2092,6 +2066,44 @@ struct iwm_nvm_access_cmd { uint8_t data[]; } __packed; /* IWM_NVM_ACCESS_CMD_API_S_VER_2 */ +#define IWM_NUM_OF_FW_PAGING_BLOCKS 33 /* 32 for data and 1 block for CSS */ + +/* + * struct iwm_fw_paging_cmd - paging layout + * + * (IWM_FW_PAGING_BLOCK_CMD = 0x4f) + * + * Send to FW the paging layout in the driver. + * + * @flags: various flags for the command + * @block_size: the block size in powers of 2 + * @block_num: number of blocks specified in the command. + * @device_phy_addr: virtual addresses from device side +*/ +struct iwm_fw_paging_cmd { + uint32_t flags; + uint32_t block_size; + uint32_t block_num; + uint32_t device_phy_addr[IWM_NUM_OF_FW_PAGING_BLOCKS]; +} __packed; /* IWM_FW_PAGING_BLOCK_CMD_API_S_VER_1 */ + +/* + * Fw items ID's + * + * @IWM_FW_ITEM_ID_PAGING: Address of the pages that the FW will upload + * download + */ +enum iwm_fw_item_id { + IWM_FW_ITEM_ID_PAGING = 3, +}; + +/* + * struct iwm_fw_get_item_cmd - get an item from the fw + */ +struct iwm_fw_get_item_cmd { + uint32_t item_id; +} __packed; /* IWM_FW_GET_ITEM_CMD_API_S_VER_1 */ + /** * struct iwm_nvm_access_resp_ver2 - response to IWM_NVM_ACCESS_CMD * @offset: offset in bytes into the section Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri Feb 24 06:49:31 2017 (r314191) +++ head/sys/dev/iwm/if_iwmvar.h Fri Feb 24 07:07:58 2017 (r314192) @@ -246,6 +246,16 @@ struct iwm_dma_info { bus_size_t size; }; +/** + * struct iwm_fw_paging + * @fw_paging_block: dma memory info + * @fw_paging_size: page size + */ +struct iwm_fw_paging { + struct iwm_dma_info fw_paging_block; + uint32_t fw_paging_size; +}; + #define IWM_TX_RING_COUNT 256 #define IWM_TX_RING_LOMARK 192 #define IWM_TX_RING_HIMARK 224 @@ -500,6 +510,14 @@ struct iwm_softc { uint32_t log_event_table; uint32_t umac_error_event_table; int support_umac_log; + + /* + * Paging parameters - All of the parameters should be set by the + * opmode when paging is enabled + */ + struct iwm_fw_paging fw_paging_db[IWM_NUM_OF_FW_PAGING_BLOCKS]; + uint16_t num_of_paging_blk; + uint16_t num_of_pages_in_last_blk; }; #define IWM_LOCK_INIT(_sc) \ Modified: head/sys/modules/iwm/Makefile ============================================================================== --- head/sys/modules/iwm/Makefile Fri Feb 24 06:49:31 2017 (r314191) +++ head/sys/modules/iwm/Makefile Fri Feb 24 07:07:58 2017 (r314192) @@ -7,7 +7,7 @@ KMOD= if_iwm 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 if_iwm_notif_wait.c -SRCS+= if_iwm_7000.c if_iwm_8000.c +SRCS+= if_iwm_7000.c if_iwm_8000.c if_iwm_fw.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 Fri Feb 24 07:47: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 DFD2ACEA193; Fri, 24 Feb 2017 07:47: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 A03891C26; Fri, 24 Feb 2017 07:47: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 v1O7lo6Y027232; Fri, 24 Feb 2017 07:47:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O7lomv027231; Fri, 24 Feb 2017 07:47:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702240747.v1O7lomv027231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Feb 2017 07:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314193 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 07:47:52 -0000 Author: mav Date: Fri Feb 24 07:47:50 2017 New Revision: 314193 URL: https://svnweb.freebsd.org/changeset/base/314193 Log: Some code cleanup. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 07:07:58 2017 (r314192) +++ head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 07:47:50 2017 (r314193) @@ -836,52 +836,32 @@ ctlfestart(struct cam_periph *periph, un (io->io_hdr.flags & CTL_FLAG_ABORT_STATUS) == 0) { io->io_hdr.flags &= ~CTL_FLAG_STATUS_QUEUED; - /* - * If this command was aborted, we don't - * need to send status back to the SIM. - * Just free the CTIO and ctl_io, and - * recycle the ATIO back to the SIM. - */ - xpt_print(periph->path, "%s: aborted " - "command 0x%04x discarded\n", - __func__, io->scsiio.tag_num); - /* - * For a wildcard attachment, commands can - * come in with a specific target/lun. Reset - * the target and LUN fields back to the - * wildcard values before we send them back - * down to the SIM. The SIM has a wildcard - * LUN enabled, not whatever target/lun - * these happened to be. - */ - if (softc->flags & CTLFE_LUN_WILDCARD) { - atio->ccb_h.target_id = CAM_TARGET_WILDCARD; - atio->ccb_h.target_lun = CAM_LUN_WILDCARD; - } - - if (atio->ccb_h.func_code != XPT_ACCEPT_TARGET_IO) { - xpt_print(periph->path, "%s: func_code " - "is %#x\n", __func__, - atio->ccb_h.func_code); - } + /* Tell the SIM that we've aborted this ATIO */ +#ifdef CTLFEDEBUG + printf("%s: tag %04x abort\n", __func__, atio->tag_id); +#endif + KASSERT(atio->ccb_h.func_code == XPT_ACCEPT_TARGET_IO, + ("func_code %#x is not ATIO", atio->ccb_h.func_code)); start_ccb->ccb_h.func_code = XPT_ABORT; start_ccb->cab.abort_ccb = (union ccb *)atio; - - /* Tell the SIM that we've aborted this ATIO */ xpt_action(start_ccb); softc->ccbs_freed++; xpt_release_ccb(start_ccb); /* * Send the ATIO back down to the SIM. + * For a wildcard attachment, commands can come in + * with a specific target/lun. Reset the target and + * LUN fields back to the wildcard values before we + * send them back down to the SIM. */ + if (softc->flags & CTLFE_LUN_WILDCARD) { + atio->ccb_h.target_id = CAM_TARGET_WILDCARD; + atio->ccb_h.target_lun = CAM_LUN_WILDCARD; + } xpt_action((union ccb *)atio); - /* - * If we still have work to do, ask for - * another CCB. Otherwise, deactivate our - * callout. - */ + /* If we still have work to do, ask for another CCB. */ if (!TAILQ_EMPTY(&softc->work_queue)) xpt_schedule(periph, /*priority*/ 1); return; @@ -905,9 +885,6 @@ ctlfestart(struct cam_periph *periph, un if (csio->sense_len != 0) { csio->sense_data = io->scsiio.sense_data; flags |= CAM_SEND_SENSE; - } else if (scsi_status == SCSI_STATUS_CHECK_COND) { - xpt_print(periph->path, "%s: check condition " - "with no sense\n", __func__); } } From owner-svn-src-all@freebsd.org Fri Feb 24 07:53: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 1DBA8CEA51C; Fri, 24 Feb 2017 07:53:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98DB233; Fri, 24 Feb 2017 07:53:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1O7rvfc030981; Fri, 24 Feb 2017 07:53:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O7ruDG030977; Fri, 24 Feb 2017 07:53:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702240753.v1O7ruDG030977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 Feb 2017 07:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314194 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs cddl/contrib/opensolaris/uts/common/sys conf modules/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: Fri, 24 Feb 2017 07:53:58 -0000 Author: avg Date: Fri Feb 24 07:53:56 2017 New Revision: 314194 URL: https://svnweb.freebsd.org/changeset/base/314194 Log: zfs: clean up unused files and definitions MFC after: 1 month X-MFC after: r314048 Deleted: head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c head/sys/cddl/contrib/opensolaris/uts/common/sys/gfs.h Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c head/sys/cddl/compat/opensolaris/sys/pathname.h head/sys/conf/files head/sys/modules/zfs/Makefile Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Fri Feb 24 07:47:50 2017 (r314193) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Fri Feb 24 07:53:56 2017 (r314194) @@ -62,55 +62,3 @@ lookupnameat(char *dirname, enum uio_seg vn_lock(startvp, ltype | LK_RETRY); return (error); } - -int -traverse(vnode_t **cvpp, int lktype) -{ - vnode_t *cvp; - vnode_t *tvp; - vfs_t *vfsp; - int error; - - cvp = *cvpp; - tvp = NULL; - - /* - * If this vnode is mounted on, then we transparently indirect - * to the vnode which is the root of the mounted file system. - * Before we do this we must check that an unmount is not in - * progress on this vnode. - */ - - for (;;) { - /* - * Reached the end of the mount chain? - */ - vfsp = vn_mountedvfs(cvp); - if (vfsp == NULL) - break; - error = vfs_busy(vfsp, 0); - - /* - * tvp is NULL for *cvpp vnode, which we can't unlock. - */ - if (tvp != NULL) - vput(cvp); - else - vrele(cvp); - if (error) - return (error); - - /* - * The read lock must be held across the call to VFS_ROOT() to - * prevent a concurrent unmount from destroying the vfs. - */ - error = VFS_ROOT(vfsp, lktype, &tvp); - vfs_unbusy(vfsp); - if (error != 0) - return (error); - cvp = tvp; - } - - *cvpp = cvp; - return (0); -} Modified: head/sys/cddl/compat/opensolaris/sys/pathname.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/pathname.h Fri Feb 24 07:47:50 2017 (r314193) +++ head/sys/cddl/compat/opensolaris/sys/pathname.h Fri Feb 24 07:53:56 2017 (r314194) @@ -34,20 +34,9 @@ #include #include -typedef struct pathname { - char *pn_buf; /* underlying storage */ - char *pn_path; /* remaining pathname */ - size_t pn_pathlen; /* remaining length */ - size_t pn_bufsize; /* total size of pn_buf */ -} pathname_t; - -#define pn_alloc(pnp) panic("pn_alloc() called") -#define pn_free(pnp) panic("pn_free() called") - int lookupname(char *, enum uio_seg, enum symfollow, vnode_t **, vnode_t **); int lookupnameat(char *, enum uio_seg, enum symfollow, vnode_t **, vnode_t **, vnode_t *); -int traverse(vnode_t **, int); #endif /* _KERNEL */ Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 24 07:47:50 2017 (r314193) +++ head/sys/conf/files Fri Feb 24 07:53:56 2017 (r314194) @@ -158,7 +158,6 @@ cddl/contrib/opensolaris/common/zfs/zfs_ cddl/contrib/opensolaris/common/zfs/zfs_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zpool_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zprop_common.c optional zfs compile-with "${ZFS_C}" -cddl/contrib/opensolaris/uts/common/fs/gfs.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/vnode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c optional zfs compile-with "${ZFS_C}" Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Fri Feb 24 07:47:50 2017 (r314193) +++ head/sys/modules/zfs/Makefile Fri Feb 24 07:53:56 2017 (r314194) @@ -46,7 +46,6 @@ SRCS+= opensolaris_atomic.c .endif .PATH: ${SUNW}/uts/common/fs -SRCS+= gfs.c SRCS+= vnode.c .PATH: ${SUNW}/uts/common/os From owner-svn-src-all@freebsd.org Fri Feb 24 08:09: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 E4CE9CEAB0C; Fri, 24 Feb 2017 08:09: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 B1DC5A93; Fri, 24 Feb 2017 08:09:17 +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 v1O89GQN035401; Fri, 24 Feb 2017 08:09:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O89G3w035400; Fri, 24 Feb 2017 08:09:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702240809.v1O89G3w035400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 08:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314195 - 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: Fri, 24 Feb 2017 08:09:18 -0000 Author: kib Date: Fri Feb 24 08:09:16 2017 New Revision: 314195 URL: https://svnweb.freebsd.org/changeset/base/314195 Log: Properly handle possible underflow in vm_fault_prefault(). In vm_fault_prefault(), if backward count causes underflow in calculation of starta = addra - backward * PAGE_SIZE; then starta must be clipped to entry->start, instead of zero. Clipping to zero allowed mapping outside of the map entries address ranges, in particular, map at zero. Submitted by: Yanko Yankulov Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Feb 24 07:53:56 2017 (r314194) +++ head/sys/vm/vm_fault.c Fri Feb 24 08:09:16 2017 (r314195) @@ -1368,11 +1368,12 @@ vm_fault_prefault(const struct faultstat entry = fs->entry; - starta = addra - backward * PAGE_SIZE; - if (starta < entry->start) { + if (addra < backward * PAGE_SIZE) { starta = entry->start; - } else if (starta > addra) { - starta = 0; + } else { + starta = addra - backward * PAGE_SIZE; + if (starta < entry->start) + starta = entry->start; } /* From owner-svn-src-all@freebsd.org Fri Feb 24 08:27: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 CD885CEAE6A; Fri, 24 Feb 2017 08:27:36 +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 34164131E; Fri, 24 Feb 2017 08:27:35 +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 v1O8RVPd069701 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Feb 2017 10:27:31 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v1O8RVPd069701 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v1O8RVwu069700; Fri, 24 Feb 2017 10:27:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Feb 2017 10:27:31 +0200 From: Konstantin Belousov To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern Message-ID: <20170224082731.GT2092@kib.kiev.ua> References: <201702231936.v1NJadRa029404@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702231936.v1NJadRa029404@repo.freebsd.org> 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: Fri, 24 Feb 2017 08:27:36 -0000 On Thu, Feb 23, 2017 at 07:36:39PM +0000, Eric van Gyzen wrote: > Modified: head/include/semaphore.h > ============================================================================== > --- head/include/semaphore.h Thu Feb 23 19:32:25 2017 (r314178) > +++ head/include/semaphore.h Thu Feb 23 19:36:38 2017 (r314179) > @@ -59,6 +59,8 @@ int sem_init(sem_t *, int, unsigned int > sem_t *sem_open(const char *, int, ...); > int sem_post(sem_t *); > int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict); > +int sem_clockwait_np(sem_t * __restrict, __clockid_t, int, > + const struct timespec *, struct timespec *); I argue that semaphore.h is POSIX include file and the declaration of sem_clockwait_np(), despite being in implementation (non-portable) namespace, still should be braced with #if __BSD_VISIBLE. > int sem_trywait(sem_t *); > int sem_unlink(const char *); > int sem_wait(sem_t *); > From owner-svn-src-all@freebsd.org Fri Feb 24 09:16: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 E9E3ECEBB0B; Fri, 24 Feb 2017 09:16:22 +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 A82A6AE3; Fri, 24 Feb 2017 09:16:22 +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 v1O9GLu7063502; Fri, 24 Feb 2017 09:16:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O9GLY0063501; Fri, 24 Feb 2017 09:16:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702240916.v1O9GLY0063501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Feb 2017 09:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314196 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 09:16:23 -0000 Author: mav Date: Fri Feb 24 09:16:21 2017 New Revision: 314196 URL: https://svnweb.freebsd.org/changeset/base/314196 Log: Unify ATIO/INOT CCBs requeuing. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 08:09:16 2017 (r314195) +++ head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 09:16:21 2017 (r314196) @@ -210,6 +210,10 @@ static void ctlfe_dump_queue(struct ctl static void ctlfe_datamove(union ctl_io *io); static void ctlfe_done(union ctl_io *io); static void ctlfe_dump(void); +static void ctlfe_free_ccb(struct cam_periph *periph, + union ccb *ccb); +static void ctlfe_requeue_ccb(struct cam_periph *periph, + union ccb *ccb, int unlock); static struct periph_driver ctlfe_driver = { @@ -802,6 +806,7 @@ ctlfestart(struct cam_periph *periph, un softc = (struct ctlfe_lun_softc *)periph->softc; softc->ccbs_alloced++; +next: ccb_h = TAILQ_FIRST(&softc->work_queue); if (ccb_h == NULL) { softc->ccbs_freed++; @@ -845,26 +850,12 @@ ctlfestart(struct cam_periph *periph, un start_ccb->ccb_h.func_code = XPT_ABORT; start_ccb->cab.abort_ccb = (union ccb *)atio; xpt_action(start_ccb); - softc->ccbs_freed++; - xpt_release_ccb(start_ccb); - /* - * Send the ATIO back down to the SIM. - * For a wildcard attachment, commands can come in - * with a specific target/lun. Reset the target and - * LUN fields back to the wildcard values before we - * send them back down to the SIM. - */ - if (softc->flags & CTLFE_LUN_WILDCARD) { - atio->ccb_h.target_id = CAM_TARGET_WILDCARD; - atio->ccb_h.target_lun = CAM_LUN_WILDCARD; - } - xpt_action((union ccb *)atio); + ctlfe_requeue_ccb(periph, (union ccb *)atio, + /* unlock */0); - /* If we still have work to do, ask for another CCB. */ - if (!TAILQ_EMPTY(&softc->work_queue)) - xpt_schedule(periph, /*priority*/ 1); - return; + /* XPT_ABORT is not queued, so we can take next I/O. */ + goto next; } data_ptr = NULL; dxfer_len = 0; @@ -997,6 +988,37 @@ ctlfe_free_ccb(struct cam_periph *periph } } +/* + * Send the ATIO/INOT back to the SIM, or free it if periph was invalidated. + */ +static void +ctlfe_requeue_ccb(struct cam_periph *periph, union ccb *ccb, int unlock) +{ + struct ctlfe_lun_softc *softc; + + if (periph->flags & CAM_PERIPH_INVALID) { + ctlfe_free_ccb(periph, ccb); + if (unlock) + cam_periph_unlock(periph); + return; + } + if (unlock) + cam_periph_unlock(periph); + + /* + * For a wildcard attachment, commands can come in with a specific + * target/lun. Reset the target and LUN fields back to the wildcard + * values before we send them back down to the SIM. + */ + softc = (struct ctlfe_lun_softc *)periph->softc; + if (softc->flags & CTLFE_LUN_WILDCARD) { + ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; + } + + xpt_action(ccb); +} + static int ctlfe_adjust_cdb(struct ccb_accept_tio *atio, uint32_t offset) { @@ -1260,25 +1282,9 @@ ctlfedone(struct cam_periph *periph, uni if ((io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { softc->ccbs_freed++; xpt_release_ccb(done_ccb); - /* - * For a wildcard attachment, commands can come in - * with a specific target/lun. Reset the target - * and LUN fields back to the wildcard values before - * we send them back down to the SIM. The SIM has - * a wildcard LUN enabled, not whatever target/lun - * these happened to be. - */ - if (softc->flags & CTLFE_LUN_WILDCARD) { - atio->ccb_h.target_id = CAM_TARGET_WILDCARD; - atio->ccb_h.target_lun = CAM_LUN_WILDCARD; - } - if (periph->flags & CAM_PERIPH_INVALID) { - ctlfe_free_ccb(periph, (union ccb *)atio); - } else { - mtx_unlock(mtx); - xpt_action((union ccb *)atio); - return; - } + ctlfe_requeue_ccb(periph, (union ccb *)atio, + /* unlock */1); + return; } else { struct ctlfe_cmd_info *cmd_info; struct ccb_scsiio *csio; @@ -1483,18 +1489,11 @@ ctlfedone(struct cam_periph *periph, uni break; } case XPT_NOTIFY_ACKNOWLEDGE: - if (periph->flags & CAM_PERIPH_INVALID) { - ctlfe_free_ccb(periph, done_ccb); - goto out; - } - - /* - * Queue this back down to the SIM as an immediate notify. - */ + /* Queue this back down to the SIM as an immediate notify. */ done_ccb->ccb_h.status = CAM_REQ_INPROG; done_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; - xpt_action(done_ccb); - break; + ctlfe_requeue_ccb(periph, done_ccb, /* unlock */1); + return; case XPT_SET_SIM_KNOB: case XPT_GET_SIM_KNOB: case XPT_GET_SIM_KNOB_OLD: @@ -1998,17 +1997,8 @@ ctlfe_done(union ctl_io *io) ccb->cna2.arg |= scsi_3btoul(io->taskio.task_resp) << 8; xpt_action(ccb); } else if (io->io_hdr.flags & CTL_FLAG_STATUS_SENT) { - if (softc->flags & CTLFE_LUN_WILDCARD) { - ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; - ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; - } - if (periph->flags & CAM_PERIPH_INVALID) { - ctlfe_free_ccb(periph, ccb); - } else { - cam_periph_unlock(periph); - xpt_action(ccb); - return; - } + ctlfe_requeue_ccb(periph, ccb, /* unlock */1); + return; } else { io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, From owner-svn-src-all@freebsd.org Fri Feb 24 09:30: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 ECCD3CEBF94; Fri, 24 Feb 2017 09:30:52 +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 BC26211CB; Fri, 24 Feb 2017 09:30:52 +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 v1O9UpZ1069678; Fri, 24 Feb 2017 09:30:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O9UpH3069677; Fri, 24 Feb 2017 09:30:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702240930.v1O9UpH3069677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 09:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314197 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 09:30:53 -0000 Author: kib Date: Fri Feb 24 09:30:51 2017 New Revision: 314197 URL: https://svnweb.freebsd.org/changeset/base/314197 Log: MFC r313493: Define ELF_ST_VISIBILITY(). Modified: stable/10/sys/sys/elf_generic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_generic.h ============================================================================== --- stable/10/sys/sys/elf_generic.h Fri Feb 24 09:16:21 2017 (r314196) +++ stable/10/sys/sys/elf_generic.h Fri Feb 24 09:30:51 2017 (r314197) @@ -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 Fri Feb 24 10:20: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 80F55CEB0F1; Fri, 24 Feb 2017 10:20:15 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 331FD1103; Fri, 24 Feb 2017 10:20:15 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1OAKE5t088952; Fri, 24 Feb 2017 10:20:14 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OAKEJb088950; Fri, 24 Feb 2017 10:20:14 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201702241020.v1OAKEJb088950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 24 Feb 2017 10:20: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: r314198 - 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: Fri, 24 Feb 2017 10:20:15 -0000 Author: royger Date: Fri Feb 24 10:20:13 2017 New Revision: 314198 URL: https://svnweb.freebsd.org/changeset/base/314198 Log: MFC r313871 x86: fix MTRR initialization if EARLY_AP_STARTUP is used Sponsored by: Citrix Systems R&D Modified: stable/11/sys/amd64/amd64/amd64_mem.c stable/11/sys/i386/i386/i686_mem.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/amd64_mem.c ============================================================================== --- stable/11/sys/amd64/amd64/amd64_mem.c Fri Feb 24 09:30:51 2017 (r314197) +++ stable/11/sys/amd64/amd64/amd64_mem.c Fri Feb 24 10:20:13 2017 (r314198) @@ -609,6 +609,10 @@ amd64_mrinit(struct mem_range_softc *sc) u_int regs[4]; int i, nmdesc = 0, pabits; + if (sc->mr_desc != NULL) + /* Already initialized. */ + return; + mtrrcap = rdmsr(MSR_MTRRcap); mtrrdef = rdmsr(MSR_MTRRdefType); @@ -750,5 +754,6 @@ amd64_mem_drvinit(void *unused) return; } mem_range_softc.mr_op = &amd64_mrops; + amd64_mrinit(&mem_range_softc); } -SYSINIT(amd64memdev, SI_SUB_DRIVERS, SI_ORDER_FIRST, amd64_mem_drvinit, NULL); +SYSINIT(amd64memdev, SI_SUB_CPU, SI_ORDER_ANY, amd64_mem_drvinit, NULL); Modified: stable/11/sys/i386/i386/i686_mem.c ============================================================================== --- stable/11/sys/i386/i386/i686_mem.c Fri Feb 24 09:30:51 2017 (r314197) +++ stable/11/sys/i386/i386/i686_mem.c Fri Feb 24 10:20:13 2017 (r314198) @@ -588,6 +588,10 @@ i686_mrinit(struct mem_range_softc *sc) u_int regs[4]; int i, nmdesc = 0, pabits; + if (sc->mr_desc != NULL) + /* Already initialized. */ + return; + mtrrcap = rdmsr(MSR_MTRRcap); mtrrdef = rdmsr(MSR_MTRRdefType); @@ -716,5 +720,6 @@ i686_mem_drvinit(void *unused) return; } mem_range_softc.mr_op = &i686_mrops; + i686_mrinit(&mem_range_softc); } -SYSINIT(i686memdev, SI_SUB_DRIVERS, SI_ORDER_FIRST, i686_mem_drvinit, NULL); +SYSINIT(i686memdev, SI_SUB_CPU, SI_ORDER_ANY, i686_mem_drvinit, NULL); From owner-svn-src-all@freebsd.org Fri Feb 24 11:07: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 967C5CEBC29; Fri, 24 Feb 2017 11:07:50 +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 587BF687; Fri, 24 Feb 2017 11:07:50 +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 v1OB7nDu009092; Fri, 24 Feb 2017 11:07:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OB7nrv009091; Fri, 24 Feb 2017 11:07:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702241107.v1OB7nrv009091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 11:07: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: r314199 - stable/10/libexec/rtld-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: Fri, 24 Feb 2017 11:07:50 -0000 Author: kib Date: Fri Feb 24 11:07:49 2017 New Revision: 314199 URL: https://svnweb.freebsd.org/changeset/base/314199 Log: MFC r313494: Handle protected symbols in rtld. Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Fri Feb 24 10:20:13 2017 (r314198) +++ stable/10/libexec/rtld-elf/rtld.c Fri Feb 24 11:07:49 2017 (r314199) @@ -3833,15 +3833,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 Fri Feb 24 11: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 BC0C6CEA28A; Fri, 24 Feb 2017 11:25:33 +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 8BB871168; Fri, 24 Feb 2017 11:25:33 +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 v1OBPWF2017640; Fri, 24 Feb 2017 11:25:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OBPW6f017639; Fri, 24 Feb 2017 11:25:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702241125.v1OBPW6f017639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Feb 2017 11:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314200 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 11:25:33 -0000 Author: mav Date: Fri Feb 24 11:25:32 2017 New Revision: 314200 URL: https://svnweb.freebsd.org/changeset/base/314200 Log: We can't access periph after ctlfe_free_ccb(). MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 11:07:49 2017 (r314199) +++ head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 11:25:32 2017 (r314200) @@ -995,11 +995,13 @@ static void ctlfe_requeue_ccb(struct cam_periph *periph, union ccb *ccb, int unlock) { struct ctlfe_lun_softc *softc; + struct mtx *mtx; if (periph->flags & CAM_PERIPH_INVALID) { + mtx = cam_periph_mtx(periph); ctlfe_free_ccb(periph, ccb); if (unlock) - cam_periph_unlock(periph); + mtx_unlock(mtx); return; } if (unlock) From owner-svn-src-all@freebsd.org Fri Feb 24 11:30: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 DE427CEA50B; Fri, 24 Feb 2017 11:30:29 +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 A7D0C149C; Fri, 24 Feb 2017 11:30: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 v1OBUSNH017887; Fri, 24 Feb 2017 11:30:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OBUS3G017886; Fri, 24 Feb 2017 11:30:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702241130.v1OBUS3G017886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 11:30: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: r314201 - stable/10/sys/fs/nfsclient 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, 24 Feb 2017 11:30:30 -0000 Author: kib Date: Fri Feb 24 11:30:28 2017 New Revision: 314201 URL: https://svnweb.freebsd.org/changeset/base/314201 Log: MFC r313800: Do not access memory past the buffer end. Do not accept and silently truncate too long hostname. Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Fri Feb 24 11:25:32 2017 (r314200) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Fri Feb 24 11:30:28 2017 (r314201) @@ -1149,8 +1149,13 @@ nfs_mount(struct mount *mp) error = EINVAL; goto out; } - bcopy(args.hostname, hst, MNAMELEN); - hst[MNAMELEN - 1] = '\0'; + if (len >= MNAMELEN) { + vfs_mount_error(mp, "Hostname too long"); + error = EINVAL; + goto out; + } + bcopy(args.hostname, hst, len); + hst[len] = '\0'; } if (vfs_getopt(mp->mnt_optnew, "principal", (void **)&name, NULL) == 0) From owner-svn-src-all@freebsd.org Fri Feb 24 11:34: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 09DABCEA791; Fri, 24 Feb 2017 11:34:02 +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 A59EA18B3; Fri, 24 Feb 2017 11:34:01 +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 v1OBY0ZY021669; Fri, 24 Feb 2017 11:34:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OBY0T6021668; Fri, 24 Feb 2017 11:34:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702241134.v1OBY0T6021668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 11:34: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: r314202 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 11:34:02 -0000 Author: kib Date: Fri Feb 24 11:34:00 2017 New Revision: 314202 URL: https://svnweb.freebsd.org/changeset/base/314202 Log: MFC r313496: Increase a chance of devfs_close() calling d_close cdevsw method. Modified: stable/10/sys/kern/vfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_vnops.c ============================================================================== --- stable/10/sys/kern/vfs_vnops.c Fri Feb 24 11:30:28 2017 (r314201) +++ stable/10/sys/kern/vfs_vnops.c Fri Feb 24 11:34:00 2017 (r314202) @@ -412,12 +412,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; @@ -438,11 +435,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. */ @@ -1624,16 +1632,15 @@ vn_closefile(fp, td) 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 (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) - vref(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 (fp->f_type == DTYPE_VNODE && fp->f_flag & FHASLOCK) { + 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 24 12:11: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 0CC49CEB7C5; Fri, 24 Feb 2017 12:11: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 D09CEE53; Fri, 24 Feb 2017 12:11:18 +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 v1OCBHg1035034; Fri, 24 Feb 2017 12:11:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OCBH6a035033; Fri, 24 Feb 2017 12:11:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702241211.v1OCBH6a035033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Feb 2017 12:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314203 - 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, 24 Feb 2017 12:11:19 -0000 Author: mav Date: Fri Feb 24 12:11:17 2017 New Revision: 314203 URL: https://svnweb.freebsd.org/changeset/base/314203 Log: Fix missing xpt_done() for ATIO/INOT on missing LUN. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Feb 24 11:34:00 2017 (r314202) +++ head/sys/dev/isp/isp_freebsd.c Fri Feb 24 12:11:17 2017 (r314203) @@ -3428,9 +3428,10 @@ isp_action(struct cam_sim *sim, union cc else str = "XPT_ACCEPT_TARGET_IO"; ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, - "%s: [0x%x] no state pointer found for %s\n", + "%s: no state pointer found for %s\n", __func__, str); ccb->ccb_h.status = CAM_DEV_NOT_THERE; + xpt_done(ccb); break; } ccb->ccb_h.spriv_field0 = 0; From owner-svn-src-all@freebsd.org Fri Feb 24 12:12: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 1B25ECEB848; Fri, 24 Feb 2017 12:12:32 +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 DC7AB106F; Fri, 24 Feb 2017 12:12:31 +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 v1OCCUL1037870; Fri, 24 Feb 2017 12:12:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OCCUf0037869; Fri, 24 Feb 2017 12:12:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702241212.v1OCCUf0037869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Feb 2017 12:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314204 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 12:12:32 -0000 Author: mav Date: Fri Feb 24 12:12:30 2017 New Revision: 314204 URL: https://svnweb.freebsd.org/changeset/base/314204 Log: Explicitly abort ATIO if CTIO sending status has failed. This helps SIM to free related resources in questionable cases. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 12:11:17 2017 (r314203) +++ head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 12:12:30 2017 (r314204) @@ -1282,6 +1282,14 @@ ctlfedone(struct cam_periph *periph, uni * datamove done routine. */ if ((io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { + /* Abort ATIO if CTIO sending status has failed. */ + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != + CAM_REQ_CMP) { + done_ccb->ccb_h.func_code = XPT_ABORT; + done_ccb->cab.abort_ccb = (union ccb *)atio; + xpt_action(done_ccb); + } + softc->ccbs_freed++; xpt_release_ccb(done_ccb); ctlfe_requeue_ccb(periph, (union ccb *)atio, From owner-svn-src-all@freebsd.org Fri Feb 24 12:53: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 65D7FCEB6FD; Fri, 24 Feb 2017 12:53:42 +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 D7E7F5E6; Fri, 24 Feb 2017 12:53:41 +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 v1OCradr028392 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Feb 2017 14:53:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v1OCradr028392 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v1OCrZZ3028391; Fri, 24 Feb 2017 14:53:35 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Feb 2017 14:53:35 +0200 From: Konstantin Belousov To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314087 - head/sys/x86/x86 Message-ID: <20170224125335.GV2092@kib.kiev.ua> References: <201702220707.v1M7764i020598@repo.freebsd.org> <20170223053954.J1044@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170223053954.J1044@besplex.bde.org> 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: Fri, 24 Feb 2017 12:53:42 -0000 On Thu, Feb 23, 2017 at 06:33:43AM +1100, Bruce Evans wrote: > On Wed, 22 Feb 2017, Konstantin Belousov wrote: > > > Log: > > More fixes for regression in r313898 on i386. > > Use long long constants where needed. > > The long long abomination is never needed, and is always a style bug. I never saw any explanation behind this claim. Esp. the first part of it, WRT 'never needed'. > I don't like using explicit long constants either. Here the number of bits > in the register is fixed by the hardware at 64. The number of bits in a > long on amd64 and a long on i386 is only fixed by ABI because the ABI is > broken for historical reasons. I really cannot make any sense of this statement. > Only very MD code can safely assume the > size of long and long long. This code was MD enough before it was merged, > but now it shouldn't use long since that varies between amd64 and i386, > and it shouldn't use long long since that is a style bug. Well, I do not see anything wrong with long long, at least until explained. Anyway, below is the patch to use uint64_t cast in important place, and removal of LL suffix in unimportant expression. diff --git a/sys/x86/x86/x86_mem.c b/sys/x86/x86/x86_mem.c index d639224f840..8bc4d3917a0 100644 --- a/sys/x86/x86/x86_mem.c +++ b/sys/x86/x86/x86_mem.c @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) /* Compute the range from the mask. Ick. */ mrd->mr_len = (~(msrv & mtrr_physmask) & - (mtrr_physmask | 0xfffLL)) + 1; + (mtrr_physmask | 0xfff)) + 1; if (!mrvalid(mrd->mr_base, mrd->mr_len)) mrd->mr_flags |= MDF_BOGUS; @@ -638,7 +638,8 @@ x86_mrinit(struct mem_range_softc *sc) * Determine the size of the PhysMask and PhysBase fields in * the variable range MTRRs. */ - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & + ~(uint64_t)0xfff; /* If fixed MTRRs supported and enabled. */ if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { From owner-svn-src-all@freebsd.org Fri Feb 24 14:10: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 56A92CEBAF2; Fri, 24 Feb 2017 14:10:18 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 105DFF38; Fri, 24 Feb 2017 14:10:17 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id hGZac0qXskevuhGZbcD3uA; Fri, 24 Feb 2017 07:10:16 -0700 X-Authority-Analysis: v=2.2 cv=BLbDlBYG 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=URSiASqk1ivqLT6sM50A: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 3CAEA3B2; Fri, 24 Feb 2017 06:10:14 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1OEADdD023440; Fri, 24 Feb 2017 06:10:13 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702241410.v1OEADdD023440@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: Adrian Chadd cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314192 - in head/sys: conf dev/iwm modules/iwm In-Reply-To: Message from Adrian Chadd of "Fri, 24 Feb 2017 07:07:58 +0000." <201702240707.v1O77wAs011110@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Feb 2017 06:10:13 -0800 X-CMAE-Envelope: MS4wfPSpCsk9V/ZbILuFoD3QRq/UZFN5WFqMzhdsjlx5mAOu3Y+Ohvz3THN89vtBje14fI2U1jsj8MaqYbkY39NKIceShmSKAIN+0D4QCBS9FlXYggfZXZUJ tgZtUdzbteP5os6qqgKPQDLXaH9Socz38gbr7mXvqvxQLf1SQGsWjSZLDsvjsCCzB9ILy9agU8uDLBDXIw9zPU0VKIZVHWWxFAs08A0ep6sm2AxYujf76026 CJNyXO1W/dCrtcRtvpevBpGJPiR8yEQgba2NbrDfSA2hpO2ogAem058cIysuGj6f X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 14:10:18 -0000 In message <201702240707.v1O77wAs011110@repo.freebsd.org>, Adrian Chadd writes: > Author: adrian > Date: Fri Feb 24 07:07:58 2017 > New Revision: 314192 > URL: https://svnweb.freebsd.org/changeset/base/314192 > > Log: > [iwm] Add support for Firmware paging, needed for newer 8000C firmware. > > * Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware > what memory ranges to use for paging. > > Obtained from: dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b402f > 18 > > Modified: > head/sys/conf/files > head/sys/dev/iwm/if_iwm.c > head/sys/dev/iwm/if_iwm_debug.h > head/sys/dev/iwm/if_iwmreg.h > head/sys/dev/iwm/if_iwmvar.h > head/sys/modules/iwm/Makefile Looks like you forgot svn add. --- all_subdir_iwm --- make[4]: make[4]: don't know how to make if_iwm_fw.c. Stop make[4]: stopped in /opt/src/svn-current/sys/modules/iwm *** [all_subdir_iwm] Error code 2 make[3]: stopped in /opt/src/svn-current/sys/modules -- 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 24 14:22: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 CA994CEBF17; Fri, 24 Feb 2017 14:22:25 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id B3AC719ED; Fri, 24 Feb 2017 14:22:25 +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 DE42656483; Fri, 24 Feb 2017 08:22:24 -0600 (CST) Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern To: Ngie Cooper References: <201702231936.v1NJadRa029404@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Eric van Gyzen Message-ID: <31cd29ad-6c34-f3d0-b71c-04857b013d02@FreeBSD.org> Date: Fri, 24 Feb 2017 08:22: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: Fri, 24 Feb 2017 14:22:25 -0000 >> Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c > > ... > > *sigh* I really wish people would read MAINTAINERS and include me on > CRs to contrib/netbsd-tests/ (especially since I spent a few weekends > cleaning this up to diff reduce and contribute back changes to > NetBSD). Drat. I totally failed to check MAINTAINERS. Sorry, Ngie. Thanks for reminding me. I welcome any feedback. I plan to contribute a variant this entire commit--or at least raise the idea--to the NetBSD folks. If that fails, I'll at least try to contribute/diff-reduce the unit test. By the way, have you considered adding a Herald rule on Phabricator? Phab is not perfect, but a lot of folks use it, and the Herald rules are a very effective way to watch them play in one's area. Cheers, Eric From owner-svn-src-all@freebsd.org Fri Feb 24 14:23: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 4C5F7CEBFE4; Fri, 24 Feb 2017 14:23:48 +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 18EA71C06; Fri, 24 Feb 2017 14:23:48 +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 v1OENlLg091397; Fri, 24 Feb 2017 14:23:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OENlhh091396; Fri, 24 Feb 2017 14:23:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702241423.v1OENlhh091396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 24 Feb 2017 14:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314205 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 14:23:48 -0000 Author: hselasky Date: Fri Feb 24 14:23:46 2017 New Revision: 314205 URL: https://svnweb.freebsd.org/changeset/base/314205 Log: Implement BIT_ULL() macro in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Fri Feb 24 12:12:30 2017 (r314204) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Fri Feb 24 14:23:46 2017 (r314205) @@ -37,6 +37,7 @@ #include #define BIT(nr) (1UL << (nr)) +#define BIT_ULL(nr) (1ULL << (nr)) #ifdef __LP64__ #define BITS_PER_LONG 64 #else From owner-svn-src-all@freebsd.org Fri Feb 24 14: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 5D9E0CEB2CB; Fri, 24 Feb 2017 14:37:56 +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 2A9EE2D2; Fri, 24 Feb 2017 14:37:56 +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 v1OEbtG7095822; Fri, 24 Feb 2017 14:37:55 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OEbttr095821; Fri, 24 Feb 2017 14:37:55 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702241437.v1OEbttr095821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 24 Feb 2017 14:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314206 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 14:37:56 -0000 Author: vangyzen Date: Fri Feb 24 14:37:55 2017 New Revision: 314206 URL: https://svnweb.freebsd.org/changeset/base/314206 Log: Guard sem_clockwait_np() declaration with __BSD_VISIBLE This is a POSIX header file, so keep the namespace clean. Reported by: kib MFC after: 13 days X-MFC with: r314179 Sponsored by: Dell EMC Modified: head/include/semaphore.h Modified: head/include/semaphore.h ============================================================================== --- head/include/semaphore.h Fri Feb 24 14:23:46 2017 (r314205) +++ head/include/semaphore.h Fri Feb 24 14:37:55 2017 (r314206) @@ -59,8 +59,10 @@ int sem_init(sem_t *, int, unsigned int sem_t *sem_open(const char *, int, ...); int sem_post(sem_t *); int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict); +#if __BSD_VISIBLE int sem_clockwait_np(sem_t * __restrict, __clockid_t, int, const struct timespec *, struct timespec *); +#endif int sem_trywait(sem_t *); int sem_unlink(const char *); int sem_wait(sem_t *); From owner-svn-src-all@freebsd.org Fri Feb 24 14:38: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 65789CEB35C; Fri, 24 Feb 2017 14:38:52 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB8A64C; Fri, 24 Feb 2017 14:38:52 +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 CD1EB56483; Fri, 24 Feb 2017 08:38:51 -0600 (CST) Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern To: Konstantin Belousov References: <201702231936.v1NJadRa029404@repo.freebsd.org> <20170224082731.GT2092@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eric van Gyzen Message-ID: Date: Fri, 24 Feb 2017 08:38:48 -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: <20170224082731.GT2092@kib.kiev.ua> 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: Fri, 24 Feb 2017 14:38:52 -0000 On 02/24/2017 02:27, Konstantin Belousov wrote: > On Thu, Feb 23, 2017 at 07:36:39PM +0000, Eric van Gyzen wrote: >> +int sem_clockwait_np(sem_t * __restrict, __clockid_t, int, >> + const struct timespec *, struct timespec *); > I argue that semaphore.h is POSIX include file and the declaration of > sem_clockwait_np(), despite being in implementation (non-portable) > namespace, still should be braced with #if __BSD_VISIBLE. Good idea. I didn't think of that. Thanks for noticing. Eric From owner-svn-src-all@freebsd.org Fri Feb 24 14:40: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 88311CEB3DE; Fri, 24 Feb 2017 14:40:16 +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 576AF81D; Fri, 24 Feb 2017 14:40:16 +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 v1OEeFsm095969; Fri, 24 Feb 2017 14:40:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OEeFJa095968; Fri, 24 Feb 2017 14:40:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702241440.v1OEeFJa095968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 24 Feb 2017 14:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314207 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 14:40:16 -0000 Author: hselasky Date: Fri Feb 24 14:40:15 2017 New Revision: 314207 URL: https://svnweb.freebsd.org/changeset/base/314207 Log: Implement srcu_dereference() macro in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:37:55 2017 (r314206) +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:40:15 2017 (r314207) @@ -34,6 +34,8 @@ struct srcu_struct { struct ck_epoch_record *ss_epoch_record; }; +#define srcu_dereference(ptr,srcu) ((__typeof(*(ptr)) *)(ptr)) + /* prototypes */ extern int srcu_read_lock(struct srcu_struct *); From owner-svn-src-all@freebsd.org Fri Feb 24 14:43: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 55902CEB712; Fri, 24 Feb 2017 14:43:30 +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 33C31C74; Fri, 24 Feb 2017 14:43:30 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 7BDC72D06; Fri, 24 Feb 2017 14:43:29 +0000 (UTC) Date: Fri, 24 Feb 2017 14:43:29 +0000 From: Alexey Dokuchaev To: Eric van Gyzen Cc: Ngie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern Message-ID: <20170224144329.GA13444@FreeBSD.org> References: <201702231936.v1NJadRa029404@repo.freebsd.org> <31cd29ad-6c34-f3d0-b71c-04857b013d02@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31cd29ad-6c34-f3d0-b71c-04857b013d02@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, 24 Feb 2017 14:43:30 -0000 On Fri, Feb 24, 2017 at 08:22:21AM -0600, Eric van Gyzen wrote: > By the way, have you considered adding a Herald rule on Phabricator? > Phab is not perfect, but a lot of folks use it, and the Herald rules > are a very effective way to watch them play in one's area. +1, we need more Herald rules to make Phabricator more efficient. Of course there are #manpages or #network groups, but often it is a bit hard to come up with whom you'd want to place on the review list (like if MAINTAINERS does not mention who's responsible and/or willing to review the code you touch, and obviously you don't want to annoy some random people just because you think they are technically qualified enough or have required domain knowledge). Sending "Hey check this out guys, Dxxxx" emails on e.g. -hackers@ is not a good option either (as it would annoy even more people). ./danfe From owner-svn-src-all@freebsd.org Fri Feb 24 14: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 D6908CEB7AF; Fri, 24 Feb 2017 14:48:18 +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 95D3EE5E; Fri, 24 Feb 2017 14:48:18 +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 v1OEmHDc000104; Fri, 24 Feb 2017 14:48:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OEmHR4000103; Fri, 24 Feb 2017 14:48:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702241448.v1OEmHR4000103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Feb 2017 14:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314208 - 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, 24 Feb 2017 14:48:18 -0000 Author: mav Date: Fri Feb 24 14:48:17 2017 New Revision: 314208 URL: https://svnweb.freebsd.org/changeset/base/314208 Log: Respecting r314204 tighten ATIO cleanup requirements. Every ATIO must complete with either successfully sent status or XPT_ABORT. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Feb 24 14:40:15 2017 (r314207) +++ head/sys/dev/isp/isp_freebsd.c Fri Feb 24 14:48:17 2017 (r314208) @@ -2289,6 +2289,8 @@ isp_handle_platform_ctio(ispsoftc_t *isp return; } if (ct->ct_nphdl == CT_HBA_RESET) { + sentstatus = (ccb->ccb_h.flags & CAM_SEND_STATUS) && + (atp->sendst == 0); failure = CAM_UNREC_HBA_ERROR; } else { sentstatus = ct->ct_flags & CT7_SENDSTATUS; @@ -2311,6 +2313,8 @@ isp_handle_platform_ctio(ispsoftc_t *isp return; } if (ct->ct_status == CT_HBA_RESET) { + sentstatus = (ccb->ccb_h.flags & CAM_SEND_STATUS) && + (atp->sendst == 0); failure = CAM_UNREC_HBA_ERROR; } else { sentstatus = ct->ct_flags & CT2_SENDSTATUS; @@ -2356,9 +2360,10 @@ isp_handle_platform_ctio(ispsoftc_t *isp } /* - * If we sent status or error happened, we are done with this ATIO. + * We are done with this ATIO if we successfully sent status. + * In all other cases expect either another CTIO or XPT_ABORT. */ - if (sentstatus || !ok) + if (ok && sentstatus) isp_put_atpd(isp, bus, atp); /* From owner-svn-src-all@freebsd.org Fri Feb 24 15:06: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 B8E7CCEBC25; Fri, 24 Feb 2017 15:06:38 +0000 (UTC) (envelope-from mjguzik@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 7C04118CA; Fri, 24 Feb 2017 15:06:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id 68so1135629pfx.2; Fri, 24 Feb 2017 07:06:38 -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=GWEguUqvZG8CyUkbOS8Gtq4tEeFIscLm9PLDT+Ruat4=; b=dFVtHrrZ6WPINTEdtavhUzSokf5poh4hmzCx4GlAQ9Xe1xnmDynSFwblcT8mgH7WT1 BzGbCZtAvY7B0MoQFRuYiPNRnfWHKARZydz58jDUFcLC+//Hf9uwi2kLNRSjwJ1Cne77 nvpw5VnDximqdjaBP7PufJycedi+DKQKrN+8DdxEeKciC2I14gIT1gU9EyaYxVFQEp9j GZGPnsMmBzFz4wlO9LlE+e5WGJotlZgJnhGLMF/iJ1UsWSh3u7L0sNchfsbGkGRPqWdD 3WDRBef04VyhPxhNigsFciwlgaP3Wpj8oB4dEgf4ACQZWzIA+bF7D9TSvowLWwF+m+lu 86rw== 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=GWEguUqvZG8CyUkbOS8Gtq4tEeFIscLm9PLDT+Ruat4=; b=QOl+UxuwqsEvmrl4GpotCFuOSnwUKWp0QQCsJPxV/6aLpbIFl6TJajq1yncYS2cu55 bMfIf0gJPJBVBaaahOxcKRWgKCvm5H7J6RVCpCswHJ+mjX/qfNgW8LL5S3BtDQB96YZe INxnGf0qUtRwO/AYs2bFzVOYShdW0WyL/QrjUroDMvlsXEqJOh2B0+u/YxmxJvy70xok awxhIb5k92RTbn/GZnYFGkplRmwNcC2rOtMi4pBZIzQs97Jq77CkUEwwv36Spi/9uJk5 hqyCrMWx0q8rgB1lXOiNXKvu6BatBFMPMsQk3SlBLfh4iRHXt6rELf1Uaq1oEppJt+vF jQag== X-Gm-Message-State: AMke39lNk5M2Xgm+nWu/e+CGIC2PAbRnhgnzyKGPEDO1zrgIfa69qwi4xKzz86OvNTGE1w== X-Received: by 10.98.216.202 with SMTP id e193mr4014702pfg.80.1487948797774; Fri, 24 Feb 2017 07:06:37 -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 s64sm15768323pfe.27.2017.02.24.07.06.34 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 24 Feb 2017 07:06:37 -0800 (PST) Date: Fri, 24 Feb 2017 16:06:28 +0100 From: Mateusz Guzik To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314207 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20170224150628.GA19697@dft-labs.eu> References: <201702241440.v1OEeFJa095968@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201702241440.v1OEeFJa095968@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: Fri, 24 Feb 2017 15:06:38 -0000 On Fri, Feb 24, 2017 at 02:40:15PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Feb 24 14:40:15 2017 > New Revision: 314207 > URL: https://svnweb.freebsd.org/changeset/base/314207 > > Log: > Implement srcu_dereference() macro in the LinuxKPI. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/srcu.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h > ============================================================================== > --- head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:37:55 2017 (r314206) > +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:40:15 2017 (r314207) > @@ -34,6 +34,8 @@ struct srcu_struct { > struct ck_epoch_record *ss_epoch_record; > }; > > +#define srcu_dereference(ptr,srcu) ((__typeof(*(ptr)) *)(ptr)) > + Should not this cast to volatile and read through that? -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Feb 24 15:17: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 72A9ECEBE5D; Fri, 24 Feb 2017 15:17: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 301B71DBD; Fri, 24 Feb 2017 15:17:44 +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 v1OFHhRQ012564; Fri, 24 Feb 2017 15:17:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OFHhdw012562; Fri, 24 Feb 2017 15:17:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702241517.v1OFHhdw012562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 24 Feb 2017 15:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314209 - 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: Fri, 24 Feb 2017 15:17:44 -0000 Author: adrian Date: Fri Feb 24 15:17:43 2017 New Revision: 314209 URL: https://svnweb.freebsd.org/changeset/base/314209 Log: [iwm] add if_iwm_fw.c. Added: head/sys/dev/iwm/if_iwm_fw.c (contents, props changed) head/sys/dev/iwm/if_iwm_fw.h (contents, props changed) Added: head/sys/dev/iwm/if_iwm_fw.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_fw.c Fri Feb 24 15:17:43 2017 (r314209) @@ -0,0 +1,341 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + * Driver version we are currently based off of is + * Linux 4.7.3 (tag id d7f6728f57e3ecbb7ef34eb7d9f564d514775d75) + * + *********************************************************************** + * + * 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) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 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) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * 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 +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +void +iwm_free_fw_paging(struct iwm_softc *sc) +{ + int i; + + if (sc->fw_paging_db[0].fw_paging_block.vaddr == NULL) + return; + + for (i = 0; i < IWM_NUM_OF_FW_PAGING_BLOCKS; i++) { + iwm_dma_contig_free(&sc->fw_paging_db[i].fw_paging_block); + } + + memset(sc->fw_paging_db, 0, sizeof(sc->fw_paging_db)); +} + +static int +iwm_fill_paging_mem(struct iwm_softc *sc, const struct iwm_fw_sects *image) +{ + int sec_idx, idx; + uint32_t offset = 0; + + /* + * find where is the paging image start point: + * if CPU2 exist and it's in paging format, then the image looks like: + * CPU1 sections (2 or more) + * CPU1_CPU2_SEPARATOR_SECTION delimiter - separate between CPU1 to CPU2 + * CPU2 sections (not paged) + * PAGING_SEPARATOR_SECTION delimiter - separate between CPU2 + * non paged to CPU2 paging sec + * CPU2 paging CSS + * CPU2 paging image (including instruction and data) + */ + for (sec_idx = 0; sec_idx < IWM_UCODE_SECTION_MAX; sec_idx++) { + if (image->fw_sect[sec_idx].offset == IWM_PAGING_SEPARATOR_SECTION) { + sec_idx++; + break; + } + } + + /* + * If paging is enabled there should be at least 2 more sections left + * (one for CSS and one for Paging data) + */ + if (sec_idx >= nitems(image->fw_sect) - 1) { + device_printf(sc->sc_dev, + "Paging: Missing CSS and/or paging sections\n"); + iwm_free_fw_paging(sc); + return EINVAL; + } + + /* copy the CSS block to the dram */ + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: load paging CSS to FW, sec = %d\n", + sec_idx); + + memcpy(sc->fw_paging_db[0].fw_paging_block.vaddr, + image->fw_sect[sec_idx].data, + sc->fw_paging_db[0].fw_paging_size); + + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: copied %d CSS bytes to first block\n", + sc->fw_paging_db[0].fw_paging_size); + + sec_idx++; + + /* + * copy the paging blocks to the dram + * loop index start from 1 since that CSS block already copied to dram + * and CSS index is 0. + * loop stop at num_of_paging_blk since that last block is not full. + */ + for (idx = 1; idx < sc->num_of_paging_blk; idx++) { + memcpy(sc->fw_paging_db[idx].fw_paging_block.vaddr, + (const char *)image->fw_sect[sec_idx].data + offset, + sc->fw_paging_db[idx].fw_paging_size); + + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: copied %d paging bytes to block %d\n", + sc->fw_paging_db[idx].fw_paging_size, + idx); + + offset += sc->fw_paging_db[idx].fw_paging_size; + } + + /* copy the last paging block */ + if (sc->num_of_pages_in_last_blk > 0) { + memcpy(sc->fw_paging_db[idx].fw_paging_block.vaddr, + (const char *)image->fw_sect[sec_idx].data + offset, + IWM_FW_PAGING_SIZE * sc->num_of_pages_in_last_blk); + + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: copied %d pages in the last block %d\n", + sc->num_of_pages_in_last_blk, idx); + } + + return 0; +} + +static int +iwm_alloc_fw_paging_mem(struct iwm_softc *sc, const struct iwm_fw_sects *image) +{ + int blk_idx = 0; + int error, num_of_pages; + + if (sc->fw_paging_db[0].fw_paging_block.vaddr != NULL) { + int i; + /* Device got reset, and we setup firmware paging again */ + for (i = 0; i < sc->num_of_paging_blk + 1; i++) { + bus_dmamap_sync(sc->sc_dmat, + sc->fw_paging_db[i].fw_paging_block.map, + BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); + } + return 0; + } + + /* ensure IWM_BLOCK_2_EXP_SIZE is power of 2 of IWM_PAGING_BLOCK_SIZE */ + _Static_assert((1 << IWM_BLOCK_2_EXP_SIZE) == IWM_PAGING_BLOCK_SIZE, + "IWM_BLOCK_2_EXP_SIZE must be power of 2 of IWM_PAGING_BLOCK_SIZE"); + + num_of_pages = image->paging_mem_size / IWM_FW_PAGING_SIZE; + sc->num_of_paging_blk = ((num_of_pages - 1) / + IWM_NUM_OF_PAGE_PER_GROUP) + 1; + + sc->num_of_pages_in_last_blk = + num_of_pages - + IWM_NUM_OF_PAGE_PER_GROUP * (sc->num_of_paging_blk - 1); + + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: allocating mem for %d paging blocks, each block holds 8 pages, last block holds %d pages\n", + sc->num_of_paging_blk, + sc->num_of_pages_in_last_blk); + + /* allocate block of 4Kbytes for paging CSS */ + error = iwm_dma_contig_alloc(sc->sc_dmat, + &sc->fw_paging_db[blk_idx].fw_paging_block, IWM_FW_PAGING_SIZE, + 4096); + if (error) { + /* free all the previous pages since we failed */ + iwm_free_fw_paging(sc); + return ENOMEM; + } + + sc->fw_paging_db[blk_idx].fw_paging_size = IWM_FW_PAGING_SIZE; + + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: allocated 4K(CSS) bytes for firmware paging.\n"); + + /* + * allocate blocks in dram. + * since that CSS allocated in fw_paging_db[0] loop start from index 1 + */ + for (blk_idx = 1; blk_idx < sc->num_of_paging_blk + 1; blk_idx++) { + /* allocate block of IWM_PAGING_BLOCK_SIZE (32K) */ + /* XXX Use iwm_dma_contig_alloc for allocating */ + error = iwm_dma_contig_alloc(sc->sc_dmat, + &sc->fw_paging_db[blk_idx].fw_paging_block, + IWM_PAGING_BLOCK_SIZE, 4096); + if (error) { + /* free all the previous pages since we failed */ + iwm_free_fw_paging(sc); + return ENOMEM; + } + + sc->fw_paging_db[blk_idx].fw_paging_size = IWM_PAGING_BLOCK_SIZE; + + IWM_DPRINTF(sc, IWM_DEBUG_FW, + "Paging: allocated 32K bytes for firmware paging.\n"); + } + + return 0; +} + +int +iwm_save_fw_paging(struct iwm_softc *sc, const struct iwm_fw_sects *fw) +{ + int ret; + + ret = iwm_alloc_fw_paging_mem(sc, fw); + if (ret) + return ret; + + return iwm_fill_paging_mem(sc, fw); +} + +/* send paging cmd to FW in case CPU2 has paging image */ +int +iwm_send_paging_cmd(struct iwm_softc *sc, const struct iwm_fw_sects *fw) +{ + int blk_idx; + uint32_t dev_phy_addr; + struct iwm_fw_paging_cmd fw_paging_cmd = { + .flags = + htole32(IWM_PAGING_CMD_IS_SECURED | + IWM_PAGING_CMD_IS_ENABLED | + (sc->num_of_pages_in_last_blk << + IWM_PAGING_CMD_NUM_OF_PAGES_IN_LAST_GRP_POS)), + .block_size = htole32(IWM_BLOCK_2_EXP_SIZE), + .block_num = htole32(sc->num_of_paging_blk), + }; + + /* loop for for all paging blocks + CSS block */ + for (blk_idx = 0; blk_idx < sc->num_of_paging_blk + 1; blk_idx++) { + dev_phy_addr = htole32( + sc->fw_paging_db[blk_idx].fw_paging_block.paddr >> + IWM_PAGE_2_EXP_SIZE); + fw_paging_cmd.device_phy_addr[blk_idx] = dev_phy_addr; + bus_dmamap_sync(sc->sc_dmat, + sc->fw_paging_db[blk_idx].fw_paging_block.map, + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + } + + return iwm_mvm_send_cmd_pdu(sc, iwm_cmd_id(IWM_FW_PAGING_BLOCK_CMD, + IWM_ALWAYS_LONG_GROUP, 0), + 0, sizeof(fw_paging_cmd), &fw_paging_cmd); +} Added: head/sys/dev/iwm/if_iwm_fw.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_fw.h Fri Feb 24 15:17:43 2017 (r314209) @@ -0,0 +1,113 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + * Driver version we are currently based off of is + * Linux 4.7.3 (tag id d7f6728f57e3ecbb7ef34eb7d9f564d514775d75) + * + *********************************************************************** + * + * 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) 2008 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 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. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 Intel Deutschland GmbH + * 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_IWM_FW_H__ +#define __IF_IWM_FW_H__ + +/* + * 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) + +/* Virtual address signature */ +#define IWM_PAGING_ADDR_SIG 0xAA000000 + +#define IWM_PAGING_CMD_IS_SECURED (1 << 9) +#define IWM_PAGING_CMD_IS_ENABLED (1 << 8) +#define IWM_PAGING_CMD_NUM_OF_PAGES_IN_LAST_GRP_POS 0 +#define IWM_PAGING_TLV_SECURE_MASK 1 + +extern void iwm_free_fw_paging(struct iwm_softc *); +extern int iwm_save_fw_paging(struct iwm_softc *, const struct iwm_fw_sects *); +extern int iwm_send_paging_cmd(struct iwm_softc *, const struct iwm_fw_sects *); + +#endif /* __IF_IWM_FW_H__ */ From owner-svn-src-all@freebsd.org Fri Feb 24 15:29: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 262C8CEB0CD; Fri, 24 Feb 2017 15:29:09 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D93DE651; Fri, 24 Feb 2017 15:29:08 +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 406CE1FE086; Fri, 24 Feb 2017 16:28:54 +0100 (CET) Subject: Re: svn commit: r314207 - head/sys/compat/linuxkpi/common/include/linux To: Mateusz Guzik References: <201702241440.v1OEeFJa095968@repo.freebsd.org> <20170224150628.GA19697@dft-labs.eu> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <7bdb0e95-9dcd-f015-6b59-525642d9f405@selasky.org> Date: Fri, 24 Feb 2017 16:28:21 +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: <20170224150628.GA19697@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: Fri, 24 Feb 2017 15:29:09 -0000 On 02/24/17 16:06, Mateusz Guzik wrote: > On Fri, Feb 24, 2017 at 02:40:15PM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Fri Feb 24 14:40:15 2017 >> New Revision: 314207 >> URL: https://svnweb.freebsd.org/changeset/base/314207 >> >> Log: >> Implement srcu_dereference() macro in the LinuxKPI. >> >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/compat/linuxkpi/common/include/linux/srcu.h >> >> Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h >> ============================================================================== >> --- head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:37:55 2017 (r314206) >> +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h Fri Feb 24 14:40:15 2017 (r314207) >> @@ -34,6 +34,8 @@ struct srcu_struct { >> struct ck_epoch_record *ss_epoch_record; >> }; >> >> +#define srcu_dereference(ptr,srcu) ((__typeof(*(ptr)) *)(ptr)) >> + > > Should not this cast to volatile and read through that? > Hi, This macro should only be used inside a srcu_read_lock() and srcu_read_unlock() section and then volatile is not part of the game I think. The srcu argument is passed so that checks can be added to assert this. --HPS From owner-svn-src-all@freebsd.org Fri Feb 24 15:36: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 E60F0CEB2D9 for ; Fri, 24 Feb 2017 15:36:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB7D6B37 for ; Fri, 24 Feb 2017 15:36:41 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: f6a803a9-faa6-11e6-b3c2-c9f38144898e 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id f6a803a9-faa6-11e6-b3c2-c9f38144898e; Fri, 24 Feb 2017 15:36:09 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1OFaXX1003714; Fri, 24 Feb 2017 08:36:33 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487950593.25520.20.camel@freebsd.org> Subject: Re: svn commit: r314189 - head/lib/libcam From: Ian Lepore To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 24 Feb 2017 08:36:33 -0700 In-Reply-To: <201702240624.v1O6OdRr094467@repo.freebsd.org> References: <201702240624.v1O6OdRr094467@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, 24 Feb 2017 15:36:42 -0000 On Fri, 2017-02-24 at 06:24 +0000, Ngie Cooper wrote: > Author: ngie > Date: Fri Feb 24 06:24:39 2017 > New Revision: 314189 > URL: https://svnweb.freebsd.org/changeset/base/314189 > > Log: >   Fix up NULL/'\0' uses and fix 2 derefs after NULL >    >   MFC after: 2 weeks >   Reported by: Coverity >   CID: 1018898, 1018899 >   Differential Revision: https://reviews.freebsd.org/D6142 >   Sponsored by: Dell EMC Isilon > > Modified: >   head/lib/libcam/scsi_cmdparse.c > > Modified: head/lib/libcam/scsi_cmdparse.c > ===================================================================== > ========= > --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 01:39:12 2017 > (r314188) > +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:24:39 2017 > (r314189) > @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le >   *(va_arg(*ap, int *)) = (ARG); \ >   assigned++; \ >   } \ > - field_name[0] = 0; \ > + field_name[0] = '\0'; \ Is coverity seriously complaining about using 0 instead of '\0'?  What possible *real* benefit (not just shutting up coverity) does this churn bring? -- Ian >   suppress = 0; \ >   } while (0) >   >   u_char bits = 0; /* For bit fields */ >   int shift = 0; /* Bits already shifted out */ >   suppress = 0; > - field_name[0] = 0; > + field_name[0] = '\0'; >   >   while (!done) { >   switch(letter = *fmt) { > @@ -169,9 +169,9 @@ do_buff_decode(u_int8_t *buff, size_t le >   >   fmt++; >   } > - if (fmt) > + if (*fmt == '\0') >   fmt++; /* Skip '}' */ > - field_name[i] = 0; > + field_name[i] = '\0'; >   break; >   } >   > @@ -255,7 +255,7 @@ do_buff_decode(u_int8_t *buff, size_t le >   break; >   } >   if (!suppress) { > - if (arg_put) > + if (arg_put != NULL) >   (*arg_put)(puthook, >       (letter == 't' ? 'b' : > letter), >       &buff[ind], width, > field_name); > @@ -268,7 +268,7 @@ do_buff_decode(u_int8_t *buff, size_t le >   for (p = dest + > width - 1; >       p >= dest && *p > == ' '; >       p--) > - *p = 0; > + *p = '\0'; >   } >   } >   assigned++; > @@ -379,22 +379,22 @@ next_field(const char **pp, char *fmt, i >   field_size = 8; /* Default to byte field > type... */ >   *fmt = 'i'; >   field_width = 1; /* 1 byte wide */ > - if (name) > - *name = 0; > + if (name != NULL) > + *name = '\0'; >   >   state = BETWEEN_FIELDS; >   >   while (state != DONE) { >   switch(state) { >   case BETWEEN_FIELDS: > - if (*p == 0) > + if (*p == '\0') >   state = DONE; >   else if (isspace(*p)) >   p++; >   else if (*p == '#') { >   while (*p && *p != '\n') >   p++; > - if (p) > + if (*p != '\0') >   p++; >   } else if (*p == '{') { >   int i = 0; > @@ -410,7 +410,7 @@ next_field(const char **pp, char *fmt, i >   } >   >   if(name && i < n_name) > - name[i] = 0; > + name[i] = '\0'; >   >   if (*p == '}') >   p++; > @@ -568,7 +568,7 @@ do_encode(u_char *buff, size_t vec_max,  >   if (suppress) >   value = 0; >   else > - value = arg_get ? > + value = arg_get != NULL ? >   (*arg_get)(gethook, > field_name) : >   va_arg(*ap, int); >   } > @@ -672,8 +672,8 @@ csio_decode(struct ccb_scsiio *csio, con >   >   va_start(ap, fmt); >   > - retval = do_buff_decode(csio->data_ptr, (size_t)csio- > >dxfer_len, 0, 0, > -  fmt, &ap); > + retval = do_buff_decode(csio->data_ptr, (size_t)csio- > >dxfer_len, > +     NULL, NULL, fmt, &ap); >   >   va_end(ap); >   > @@ -705,7 +705,7 @@ buff_decode(u_int8_t *buff, size_t len,  >   >   va_start(ap, fmt); >   > - retval = do_buff_decode(buff, len, 0, 0, fmt, &ap); > + retval = do_buff_decode(buff, len, NULL, NULL, fmt, &ap); >   >   va_end(ap); >   > @@ -819,7 +819,8 @@ csio_encode(struct ccb_scsiio *csio, con >   >   va_start(ap, fmt); >   > - retval = do_encode(csio->data_ptr, csio->dxfer_len, 0, 0, 0, > fmt, &ap); > + retval = do_encode(csio->data_ptr, csio->dxfer_len, NULL, > NULL, NULL, > +     fmt, &ap); >   >   va_end(ap); >   > @@ -838,7 +839,7 @@ buff_encode_visit(u_int8_t *buff, size_t >   if (arg_get == NULL) >   return(-1); >   > - return (do_encode(buff, len, 0, arg_get, gethook, fmt, > NULL)); > + return (do_encode(buff, len, NULL, arg_get, gethook, fmt, > NULL)); >  } >   >  int > @@ -853,6 +854,6 @@ csio_encode_visit(struct ccb_scsiio *csi >   if (arg_get == NULL) >   return(-1); >   > - return (do_encode(csio->data_ptr, csio->dxfer_len, 0, > arg_get, > + return (do_encode(csio->data_ptr, csio->dxfer_len, NULL, > arg_get, >    gethook, fmt, NULL)); >  } > From owner-svn-src-all@freebsd.org Fri Feb 24 15:39: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 63EB1CEB382; Fri, 24 Feb 2017 15:39:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::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 E5BECCD6; Fri, 24 Feb 2017 15:39:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id g10so13726130wrg.2; Fri, 24 Feb 2017 07:39:35 -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=eaNFLyQ7X0V1s6SF4hA0nH0HJs22caRWV4wTwnRsE9o=; b=HtFg99ad5d3oqWvfhZ0pM0exP5kTbS5KQz2sCGtLWUfY0EmtJ6HB3UIKFBKazd3/vg zYLsBU5datqcpuuxrBV97E/iG9bQusmEWkrw2b31uTAPieCkXntoH2LQg/WN81IWggqN rZkUNRSCypZx5qQG2vsFKo00kfYoHSo/hNrv6ilJ1WSGKJOGtb/7jWli+/9ki8aCn7gq X/eIXuj5Bwps9FyTUzn9b7bEr73exY8vfG06g/YGWOlrUhqlJH1Nngj3PkEE95rVeiwz iKg7WW7+OiBrGpiRo3ltN+XCjyf1TCXep0pSOedIGrc56KEJK3pQyAxcsOPvmEsnmIG3 2cbw== 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=eaNFLyQ7X0V1s6SF4hA0nH0HJs22caRWV4wTwnRsE9o=; b=l2q3Ot6Oe+yEswD1Ecg5QUyHhAk6PI1W8cCCeZNeF/DDAwUbxmABCDmOEXU/QD5Of0 sgunz3XT+DcyFCTvYZa6f+o8AXAwmlcsfcgqqPNzIa+qmmZ/AOxH7FQdV8kbdeB5lbJT km41mQu3fOIbujsA3tJAXLmBSImibCGcsIUa2reGBPVkWQbve1JV3qnwDfZUt3HB+ABY /ru9seqcS8h2SUIda2QDdcdBKu/zyIu9b0jLLVemw08COI09fiVkEcJ1RRKtwk8e64cU D/313qoIC2ZHr+rlCbVfmzfGUjYCGFTfuukLLi4W3R4YB6aA69UpkC+99AkTF13j7cde rl2g== X-Gm-Message-State: AMke39lQkU8ukwwQDE7Gm6Kfsjd99SmYAYjZeEyC5KEL2IFrR1HmtL2QeB80vfRxHtXgZmG+hu5LLIOzA7VKNw== X-Received: by 10.223.147.1 with SMTP id 1mr3073140wro.60.1487950773332; Fri, 24 Feb 2017 07:39:33 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.28.128.133 with HTTP; Fri, 24 Feb 2017 07:39:32 -0800 (PST) In-Reply-To: <201702241410.v1OEADdD023440@slippy.cwsent.com> References: <201702240707.v1O77wAs011110@repo.freebsd.org> <201702241410.v1OEADdD023440@slippy.cwsent.com> From: Adrian Chadd Date: Fri, 24 Feb 2017 07:39:32 -0800 X-Google-Sender-Auth: XUT7ffeNWWB7TZfsugrl1nT6HY8 Message-ID: Subject: Re: svn commit: r314192 - in head/sys: conf dev/iwm modules/iwm To: Cy Schubert 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, 24 Feb 2017 15:39:36 -0000 Fixed! -a On 24 February 2017 at 06:10, Cy Schubert wrote: > In message <201702240707.v1O77wAs011110@repo.freebsd.org>, Adrian Chadd > writes: >> Author: adrian >> Date: Fri Feb 24 07:07:58 2017 >> New Revision: 314192 >> URL: https://svnweb.freebsd.org/changeset/base/314192 >> >> Log: >> [iwm] Add support for Firmware paging, needed for newer 8000C firmware. >> >> * Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware >> what memory ranges to use for paging. >> >> Obtained from: dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b402f >> 18 >> >> Modified: >> head/sys/conf/files >> head/sys/dev/iwm/if_iwm.c >> head/sys/dev/iwm/if_iwm_debug.h >> head/sys/dev/iwm/if_iwmreg.h >> head/sys/dev/iwm/if_iwmvar.h >> head/sys/modules/iwm/Makefile > > Looks like you forgot svn add. > > --- all_subdir_iwm --- > make[4]: make[4]: don't know how to make if_iwm_fw.c. Stop > > make[4]: stopped in /opt/src/svn-current/sys/modules/iwm > *** [all_subdir_iwm] Error code 2 > > make[3]: stopped in /opt/src/svn-current/sys/modules > > > -- > 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 24 16:02: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 51D67CEBDDA; Fri, 24 Feb 2017 16:02: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 14E336E7; Fri, 24 Feb 2017 16:02: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 v1OG23WS034543; Fri, 24 Feb 2017 16:02:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OG21SM034524; Fri, 24 Feb 2017 16:02:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702241602.v1OG21SM034524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 16:02:01 +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: r314210 - in stable/11/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 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, 24 Feb 2017 16:02:04 -0000 Author: kib Date: Fri Feb 24 16:02:01 2017 New Revision: 314210 URL: https://svnweb.freebsd.org/changeset/base/314210 Log: MFC r313154: For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE and device npx. Modified: stable/11/sys/conf/files.i386 stable/11/sys/conf/options.i386 stable/11/sys/i386/conf/DEFAULTS stable/11/sys/i386/conf/NOTES stable/11/sys/i386/i386/elf_machdep.c stable/11/sys/i386/i386/exception.s stable/11/sys/i386/i386/initcpu.c stable/11/sys/i386/i386/machdep.c stable/11/sys/i386/i386/mp_machdep.c stable/11/sys/i386/i386/pmap.c stable/11/sys/i386/i386/ptrace_machdep.c stable/11/sys/i386/i386/support.s stable/11/sys/i386/i386/swtch.s stable/11/sys/i386/i386/trap.c stable/11/sys/i386/i386/vm86bios.s stable/11/sys/i386/i386/vm_machdep.c stable/11/sys/i386/include/atomic.h stable/11/sys/i386/isa/npx.c stable/11/sys/i386/linux/linux_ptrace.c stable/11/sys/x86/acpica/acpi_wakeup.c stable/11/sys/x86/x86/cpu_machdep.c stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/conf/files.i386 Fri Feb 24 16:02:01 2017 (r314210) @@ -528,7 +528,7 @@ i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 i386/isa/elink.c optional ep | ie -i386/isa/npx.c optional npx +i386/isa/npx.c standard i386/isa/pmtimer.c optional pmtimer i386/isa/prof_machdep.c optional profiling-routine i386/isa/spic.c optional spic Modified: stable/11/sys/conf/options.i386 ============================================================================== --- stable/11/sys/conf/options.i386 Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/conf/options.i386 Fri Feb 24 16:02:01 2017 (r314210) @@ -50,8 +50,6 @@ CPU_BTB_EN opt_cpu.h CPU_CYRIX_NO_LOCK opt_cpu.h CPU_DIRECT_MAPPED_CACHE opt_cpu.h CPU_DISABLE_5X86_LSSER opt_cpu.h -CPU_DISABLE_CMPXCHG opt_global.h # XXX global, unlike other CPU_* -CPU_DISABLE_SSE opt_cpu.h CPU_ELAN opt_cpu.h CPU_ELAN_PPS opt_cpu.h CPU_ELAN_XTAL opt_cpu.h @@ -113,7 +111,6 @@ NETGRAPH_CRONYX opt_ng_cronyx.h # Device options DEV_APIC opt_apic.h DEV_ATPIC opt_atpic.h -DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h Modified: stable/11/sys/i386/conf/DEFAULTS ============================================================================== --- stable/11/sys/i386/conf/DEFAULTS Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/conf/DEFAULTS Fri Feb 24 16:02:01 2017 (r314210) @@ -9,9 +9,6 @@ machine i386 device isa options ISAPNP -# Floating point support. -device npx - # Pseudo devices. device mem # Memory and kernel memory devices device io # I/O device Modified: stable/11/sys/i386/conf/NOTES ============================================================================== --- stable/11/sys/i386/conf/NOTES Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/conf/NOTES Fri Feb 24 16:02:01 2017 (r314210) @@ -115,15 +115,6 @@ cpu I686_CPU # aka Pentium Pro(tm) # reorder). This option should not be used if you use memory mapped # I/O device(s). # -# CPU_DISABLE_CMPXCHG disables the CMPXCHG instruction on > i386 IA32 -# machines. VmWare 3.x seems to emulate this instruction poorly, causing -# the guest OS to run very slowly. This problem appears to be fixed in -# VmWare 4.x, at least in version 4.5.2, so that enabling this option with -# VmWare 4.x will result in locking operations to be 20-30 times slower. -# Enabling this with an SMP kernel will cause the kernel to be unusable. -# -# CPU_DISABLE_SSE explicitly prevents I686_CPU from turning on SSE. -# # CPU_ELAN enables support for AMDs ElanSC520 CPU. # CPU_ELAN_PPS enables precision timestamp code. # CPU_ELAN_XTAL sets the clock crystal frequency in Hz. @@ -201,8 +192,6 @@ options CPU_BLUELIGHTNING_FPU_OP_CACHE options CPU_BTB_EN options CPU_DIRECT_MAPPED_CACHE options CPU_DISABLE_5X86_LSSER -options CPU_DISABLE_CMPXCHG -#options CPU_DISABLE_SSE options CPU_ELAN options CPU_ELAN_PPS options CPU_ELAN_XTAL=32768000 @@ -313,7 +302,7 @@ device apm_saver # Requires APM # # ISA bus # -device isa # Required by npx(4) +device isa # # Options for `isa': @@ -395,8 +384,7 @@ device dpms # DPMS suspend & resume vi options X86BIOS # -# The Numeric Processing eXtension driver. This is non-optional. -device npx +# Hints for the non-optional Numeric Processing eXtension driver. hint.npx.0.flags="0x0" hint.npx.0.irq="13" Modified: stable/11/sys/i386/i386/elf_machdep.c ============================================================================== --- stable/11/sys/i386/i386/elf_machdep.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/elf_machdep.c Fri Feb 24 16:02:01 2017 (r314210) @@ -49,10 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -143,13 +139,10 @@ SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_AN void elf32_dump_thread(struct thread *td, void *dst, size_t *off) { -#ifdef CPU_ENABLE_SSE void *buf; -#endif size_t len; len = 0; -#ifdef CPU_ENABLE_SSE if (use_xsave) { if (dst != NULL) { npxgetregs(td); @@ -162,7 +155,6 @@ elf32_dump_thread(struct thread *td, voi len += elf32_populate_note(NT_X86_XSTATE, NULL, NULL, cpu_max_ext_state_size, NULL); } -#endif *off = len; } Modified: stable/11/sys/i386/i386/exception.s ============================================================================== --- stable/11/sys/i386/i386/exception.s Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/exception.s Fri Feb 24 16:02:01 2017 (r314210) @@ -37,7 +37,6 @@ #include "opt_apic.h" #include "opt_atpic.h" #include "opt_hwpmc_hooks.h" -#include "opt_npx.h" #include #include Modified: stable/11/sys/i386/i386/initcpu.c ============================================================================== --- stable/11/sys/i386/i386/initcpu.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/initcpu.c Fri Feb 24 16:02:01 2017 (r314210) @@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - #ifdef I486_CPU static void init_5x86(void); static void init_bluelightning(void); @@ -758,12 +754,10 @@ initializecpu(void) default: break; } -#if defined(CPU_ENABLE_SSE) if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { load_cr4(rcr4() | CR4_FXSR | CR4_XMM); cpu_fxsr = hw_instruction_sse = 1; } -#endif #if defined(PAE) || defined(PAE_TABLES) if ((amd_feature & AMDID_NX) != 0) { uint64_t msr; Modified: stable/11/sys/i386/i386/machdep.c ============================================================================== --- stable/11/sys/i386/i386/machdep.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/machdep.c Fri Feb 24 16:02:01 2017 (r314210) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_maxmem.h" #include "opt_mp_watchdog.h" -#include "opt_npx.h" #include "opt_perfmon.h" #include "opt_platform.h" #include "opt_xbox.h" @@ -166,10 +165,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern register_t init386(int first); extern void dblfault_handler(void); -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - static void cpu_startup(void *); static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp, @@ -635,14 +630,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); -#ifdef CPU_ENABLE_SSE if (cpu_max_ext_state_size > sizeof(union savefpu) && use_xsave) { xfpusave_len = cpu_max_ext_state_size - sizeof(union savefpu); xfpusave = __builtin_alloca(xfpusave_len); } else { -#else - { -#endif xfpusave_len = 0; xfpusave = NULL; } @@ -2449,9 +2440,7 @@ init386(int first) struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; struct pcpu *pc; -#ifdef CPU_ENABLE_SSE struct xstate_hdr *xhdr; -#endif int late_console; thread0.td_kstack = proc0kstack; @@ -2713,9 +2702,7 @@ init386(int first) i386_kdb_init(); msgbufinit(msgbufp, msgbufsize); -#ifdef DEV_NPX npxinit(true); -#endif /* * Set up thread0 pcb after npxinit calculated pcb + fpu save * area size. Zero out the extended state header in fpu save @@ -2723,13 +2710,11 @@ init386(int first) */ thread0.td_pcb = get_pcb_td(&thread0); bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size); -#ifdef CPU_ENABLE_SSE if (use_xsave) { xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) + 1); xhdr->xstate_bv = xsave_mask; } -#endif PCPU_SET(curpcb, thread0.td_pcb); /* Move esp0 in the tss to its final place. */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ @@ -2998,17 +2983,11 @@ fill_fpregs(struct thread *td, struct fp KASSERT(td == curthread || TD_IS_SUSPENDED(td) || P_SHOULDSTOP(td->td_proc), ("not suspended thread %p", td)); -#ifdef DEV_NPX npxgetregs(td); -#else - bzero(fpregs, sizeof(*fpregs)); -#endif -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) npx_fill_fpregs_xmm(&get_pcb_user_save_td(td)->sv_xmm, (struct save87 *)fpregs); else -#endif /* CPU_ENABLE_SSE */ bcopy(&get_pcb_user_save_td(td)->sv_87, fpregs, sizeof(*fpregs)); return (0); @@ -3018,17 +2997,13 @@ int set_fpregs(struct thread *td, struct fpreg *fpregs) { -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) npx_set_fpregs_xmm((struct save87 *)fpregs, &get_pcb_user_save_td(td)->sv_xmm); else -#endif /* CPU_ENABLE_SSE */ bcopy(fpregs, &get_pcb_user_save_td(td)->sv_87, sizeof(*fpregs)); -#ifdef DEV_NPX npxuserinited(td); -#endif return (0); } @@ -3137,20 +3112,12 @@ static void get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, size_t xfpusave_len) { -#ifdef CPU_ENABLE_SSE size_t max_len, len; -#endif -#ifndef DEV_NPX - mcp->mc_fpformat = _MC_FPFMT_NODEV; - mcp->mc_ownedfp = _MC_FPOWNED_NONE; - bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); -#else mcp->mc_ownedfp = npxgetregs(td); bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = npxformat(); -#ifdef CPU_ENABLE_SSE if (!use_xsave || xfpusave_len == 0) return; max_len = cpu_max_ext_state_size - sizeof(union savefpu); @@ -3162,8 +3129,6 @@ get_fpcontext(struct thread *td, mcontex mcp->mc_flags |= _MC_HASFPXSTATE; mcp->mc_xfpustate_len = len; bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len); -#endif -#endif } static int @@ -3184,16 +3149,10 @@ set_fpcontext(struct thread *td, mcontex error = 0; } else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || mcp->mc_ownedfp == _MC_FPOWNED_PCB) { -#ifdef DEV_NPX fpstate = (union savefpu *)&mcp->mc_fpstate; -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) fpstate->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask; -#endif error = npxsetregs(td, fpstate, xfpustate, xfpustate_len); -#else - error = EINVAL; -#endif } else return (EINVAL); return (error); @@ -3205,10 +3164,8 @@ fpstate_drop(struct thread *td) KASSERT(PCB_USER_FPU(td->td_pcb), ("fpstate_drop: kernel-owned fpu")); critical_enter(); -#ifdef DEV_NPX if (PCPU_GET(fpcurthread) == td) npxdrop(); -#endif /* * XXX force a full drop of the npx. The above only drops it if we * owned it. npxgetregs() has the same bug in the !cpu_fxsr case. Modified: stable/11/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/11/sys/i386/i386/mp_machdep.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/mp_machdep.c Fri Feb 24 16:02:01 2017 (r314210) @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #ifndef DEV_APIC #error The apic device is required for SMP, add "device apic" to your config file. #endif -#if defined(CPU_DISABLE_CMPXCHG) && !defined(COMPILING_LINT) -#error SMP not supported with CPU_DISABLE_CMPXCHG -#endif #endif /* not lint */ #include Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/pmap.c Fri Feb 24 16:02:01 2017 (r314210) @@ -152,10 +152,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -4231,11 +4227,9 @@ pagezero(void *page) { #if defined(I686_CPU) if (cpu_class == CPUCLASS_686) { -#if defined(CPU_ENABLE_SSE) if (cpu_feature & CPUID_SSE2) sse2_pagezero(page); else -#endif i686_pagezero(page); } else #endif Modified: stable/11/sys/i386/i386/ptrace_machdep.c ============================================================================== --- stable/11/sys/i386/i386/ptrace_machdep.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/ptrace_machdep.c Fri Feb 24 16:02:01 2017 (r314210) @@ -39,11 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - -#ifdef CPU_ENABLE_SSE static int cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data) { @@ -114,12 +109,10 @@ cpu_ptrace_xstate(struct thread *td, int return (error); } -#endif static int cpu_ptrace_xmm(struct thread *td, int req, void *addr, int data) { -#ifdef CPU_ENABLE_SSE struct savexmm *fpstate; int error; @@ -152,9 +145,6 @@ cpu_ptrace_xmm(struct thread *td, int re } return (error); -#else - return (EINVAL); -#endif } int Modified: stable/11/sys/i386/i386/support.s ============================================================================== --- stable/11/sys/i386/i386/support.s Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/support.s Fri Feb 24 16:02:01 2017 (r314210) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#include "opt_npx.h" - #include #include #include Modified: stable/11/sys/i386/i386/swtch.s ============================================================================== --- stable/11/sys/i386/i386/swtch.s Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/swtch.s Fri Feb 24 16:02:01 2017 (r314210) @@ -32,7 +32,6 @@ * $FreeBSD$ */ -#include "opt_npx.h" #include "opt_sched.h" #include @@ -152,7 +151,6 @@ ENTRY(cpu_switch) movl %eax,PCB_DR0(%edx) 1: -#ifdef DEV_NPX /* have we used fp, and need a save? */ cmpl %ecx,PCPU(FPCURTHREAD) jne 1f @@ -160,7 +158,6 @@ ENTRY(cpu_switch) call npxsave /* do it in a big C function */ popl %eax 1: -#endif /* Save is done. Now fire up new thread. Leave old vmspace. */ movl 4(%esp),%edi Modified: stable/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/trap.c Fri Feb 24 16:02:01 2017 (r314210) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_isa.h" #include "opt_kdb.h" -#include "opt_npx.h" #include "opt_stack.h" #include "opt_trap.h" @@ -335,13 +334,9 @@ user_trctrap_out: break; case T_ARITHTRAP: /* arithmetic trap */ -#ifdef DEV_NPX ucode = npxtrap_x87(); if (ucode == -1) goto userout; -#else - ucode = 0; -#endif i = SIGFPE; break; @@ -475,13 +470,11 @@ user_trctrap_out: break; case T_DNA: -#ifdef DEV_NPX KASSERT(PCB_USER_FPU(td->td_pcb), ("kernel FPU ctx has leaked")); /* transparent fault (due to context switch "late") */ if (npxdna()) goto userout; -#endif uprintf("pid %d killed due to lack of floating point\n", p->p_pid); i = SIGKILL; @@ -494,13 +487,9 @@ user_trctrap_out: break; case T_XMMFLT: /* SIMD floating-point exception */ -#if defined(DEV_NPX) && !defined(CPU_DISABLE_SSE) && defined(I686_CPU) ucode = npxtrap_sse(); if (ucode == -1) goto userout; -#else - ucode = 0; -#endif i = SIGFPE; break; #ifdef KDTRACE_HOOKS @@ -524,12 +513,10 @@ user_trctrap_out: goto out; case T_DNA: -#ifdef DEV_NPX if (PCB_USER_FPU(td->td_pcb)) panic("Unregistered use of FPU in kernel"); if (npxdna()) goto out; -#endif break; case T_ARITHTRAP: /* arithmetic trap */ Modified: stable/11/sys/i386/i386/vm86bios.s ============================================================================== --- stable/11/sys/i386/i386/vm86bios.s Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/vm86bios.s Fri Feb 24 16:02:01 2017 (r314210) @@ -26,8 +26,6 @@ * $FreeBSD$ */ -#include "opt_npx.h" - #include /* miscellaneous asm macros */ #include @@ -63,7 +61,6 @@ ENTRY(vm86_bioscall) pushl %edi pushl %gs -#ifdef DEV_NPX pushfl cli movl PCPU(CURTHREAD),%ecx @@ -77,7 +74,6 @@ ENTRY(vm86_bioscall) popl %edx /* recover our pcb */ 1: popfl -#endif movl SCR_VMFRAME(%edx),%ebx /* target frame location */ movl %ebx,%edi /* destination */ Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/i386/vm_machdep.c Fri Feb 24 16:02:01 2017 (r314210) @@ -103,10 +103,6 @@ __FBSDID("$FreeBSD$"); #define NSFBUFS (512 + maxusers * 16) #endif -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct pcpu, pc_curthread), "OFFSETOF_CURTHREAD does not correspond with offset of pc_curthread."); _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), @@ -156,18 +152,14 @@ void * alloc_fpusave(int flags) { void *res; -#ifdef CPU_ENABLE_SSE struct savefpu_ymm *sf; -#endif res = malloc(cpu_max_ext_state_size, M_DEVBUF, flags); -#ifdef CPU_ENABLE_SSE if (use_xsave) { sf = (struct savefpu_ymm *)res; bzero(&sf->sv_xstate.sx_hd, sizeof(sf->sv_xstate.sx_hd)); sf->sv_xstate.sx_hd.xstate_bv = xsave_mask; } -#endif return (res); } /* @@ -207,12 +199,10 @@ cpu_fork(struct thread *td1, struct proc /* Ensure that td1's pcb is up to date. */ if (td1 == curthread) td1->td_pcb->pcb_gs = rgs(); -#ifdef DEV_NPX critical_enter(); if (PCPU_GET(fpcurthread) == td1) npxsave(td1->td_pcb->pcb_save); critical_exit(); -#endif /* Point the pcb to the top of the stack */ pcb2 = get_pcb_td(td2); @@ -351,12 +341,10 @@ void cpu_thread_exit(struct thread *td) { -#ifdef DEV_NPX critical_enter(); if (td == PCPU_GET(fpcurthread)) npxdrop(); critical_exit(); -#endif /* Disable any hardware breakpoints. */ if (td->td_pcb->pcb_flags & PCB_DBREGS) { @@ -397,21 +385,17 @@ void cpu_thread_alloc(struct thread *td) { struct pcb *pcb; -#ifdef CPU_ENABLE_SSE struct xstate_hdr *xhdr; -#endif td->td_pcb = pcb = get_pcb_td(td); td->td_frame = (struct trapframe *)((caddr_t)pcb - 16) - 1; pcb->pcb_ext = NULL; pcb->pcb_save = get_pcb_user_save_pcb(pcb); -#ifdef CPU_ENABLE_SSE if (use_xsave) { xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1); bzero(xhdr, sizeof(*xhdr)); xhdr->xstate_bv = xsave_mask; } -#endif } void Modified: stable/11/sys/i386/include/atomic.h ============================================================================== --- stable/11/sys/i386/include/atomic.h Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/include/atomic.h Fri Feb 24 16:02:01 2017 (r314210) @@ -169,33 +169,6 @@ struct __hack * Returns 0 on failure, non-zero on success */ -#ifdef CPU_DISABLE_CMPXCHG - -static __inline int -atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) -{ - u_char res; - - __asm __volatile( - " pushfl ; " - " cli ; " - " cmpl %3,%1 ; " - " jne 1f ; " - " movl %2,%1 ; " - "1: " - " sete %0 ; " - " popfl ; " - "# atomic_cmpset_int" - : "=q" (res), /* 0 */ - "+m" (*dst) /* 1 */ - : "r" (src), /* 2 */ - "r" (expect) /* 3 */ - : "memory"); - return (res); -} - -#else /* !CPU_DISABLE_CMPXCHG */ - static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { @@ -214,8 +187,6 @@ atomic_cmpset_int(volatile u_int *dst, u return (res); } -#endif /* CPU_DISABLE_CMPXCHG */ - /* * Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. Modified: stable/11/sys/i386/isa/npx.c ============================================================================== --- stable/11/sys/i386/isa/npx.c Fri Feb 24 15:17:43 2017 (r314209) +++ stable/11/sys/i386/isa/npx.c Fri Feb 24 16:02:01 2017 (r314210) @@ -74,10 +74,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - /* * 387 and 287 Numeric Coprocessor Extension (NPX) Driver. */ @@ -93,7 +89,6 @@ __FBSDID("$FreeBSD$"); #define fp_divide_by_0() __asm __volatile( \ "fldz; fld1; fdiv %st,%st(1); fnop") #define frstor(addr) __asm __volatile("frstor %0" : : "m" (*(addr))) -#ifdef CPU_ENABLE_SSE #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) @@ -130,7 +125,6 @@ xsaveopt(char *addr, uint64_t mask) __asm __volatile("xsaveopt %0" : "=m" (*addr) : "a" (low), "d" (hi) : "memory"); } -#endif #else /* !(__GNUCLIKE_ASM && !lint) */ void fldcw(u_short cw); @@ -141,7 +135,6 @@ void fnstcw(caddr_t addr); void fnstsw(caddr_t addr); void fp_divide_by_0(void); void frstor(caddr_t addr); -#ifdef CPU_ENABLE_SSE void fxsave(caddr_t addr); void fxrstor(caddr_t addr); void ldmxcsr(u_int csr); @@ -149,14 +142,12 @@ void stmxcsr(u_int *csr); void xrstor(char *addr, uint64_t mask); void xsave(char *addr, uint64_t mask); void xsaveopt(char *addr, uint64_t mask); -#endif #endif /* __GNUCLIKE_ASM && !lint */ #define start_emulating() load_cr0(rcr0() | CR0_TS) #define stop_emulating() clts() -#ifdef CPU_ENABLE_SSE #define GET_FPU_CW(thread) \ (cpu_fxsr ? \ (thread)->td_pcb->pcb_save->sv_xmm.sv_env.en_cw : \ @@ -171,16 +162,7 @@ void xsaveopt(char *addr, uint64_t mask) else \ (savefpu)->sv_87.sv_env.en_cw = (value); \ } while (0) -#else /* CPU_ENABLE_SSE */ -#define GET_FPU_CW(thread) \ - (thread->td_pcb->pcb_save->sv_87.sv_env.en_cw) -#define GET_FPU_SW(thread) \ - (thread->td_pcb->pcb_save->sv_87.sv_env.en_sw) -#define SET_FPU_CW(savefpu, value) \ - (savefpu)->sv_87.sv_env.en_cw = (value) -#endif /* CPU_ENABLE_SSE */ -#ifdef CPU_ENABLE_SSE CTASSERT(sizeof(union savefpu) == 512); CTASSERT(sizeof(struct xstate_hdr) == 64); CTASSERT(sizeof(struct savefpu_ymm) == 832); @@ -200,7 +182,6 @@ CTASSERT(X86_XSTATE_XCR0_OFFSET >= offse X86_XSTATE_XCR0_OFFSET + sizeof(uint64_t) <= sizeof(struct savexmm)); static void fpu_clean_state(void); -#endif static void fpusave(union savefpu *); static void fpurstor(union savefpu *); @@ -210,21 +191,17 @@ int hw_float; SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, "Floating point instructions executed in hardware"); -#ifdef CPU_ENABLE_SSE int use_xsave; uint64_t xsave_mask; -#endif static uma_zone_t fpu_save_area_zone; static union savefpu *npx_initialstate; -#ifdef CPU_ENABLE_SSE struct xsave_area_elm_descr { u_int offset; u_int size; } *xsave_area_desc; static int use_xsaveopt; -#endif static volatile u_int npx_traps_while_probing; @@ -340,7 +317,6 @@ cleanup: return (hw_float); } -#ifdef CPU_ENABLE_SSE /* * Enable XSAVE if supported and allowed by user. * Calculate the xsave_mask. @@ -376,7 +352,7 @@ npxinit_bsp1(void) if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) use_xsaveopt = 1; } -#endif + /* * Calculate the fpu save area size. @@ -384,7 +360,6 @@ npxinit_bsp1(void) static void npxinit_bsp2(void) { -#ifdef CPU_ENABLE_SSE u_int cp[4]; if (use_xsave) { @@ -397,7 +372,6 @@ npxinit_bsp2(void) do_cpuid(1, cp); cpu_feature2 = cp[2]; } else -#endif cpu_max_ext_state_size = sizeof(union savefpu); } @@ -409,25 +383,19 @@ npxinit(bool bsp) { static union savefpu dummy; register_t saveintr; -#ifdef CPU_ENABLE_SSE u_int mxcsr; -#endif u_short control; if (bsp) { if (!npx_probe()) return; -#ifdef CPU_ENABLE_SSE npxinit_bsp1(); -#endif } -#ifdef CPU_ENABLE_SSE if (use_xsave) { load_cr4(rcr4() | CR4_XSAVE); load_xcr(XCR0, xsave_mask); } -#endif /* * XCR0 shall be set up before CPU can report the save area size. @@ -444,20 +412,16 @@ npxinit(bool bsp) */ saveintr = intr_disable(); stop_emulating(); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) fninit(); else -#endif fnsave(&dummy); control = __INITIAL_NPXCW__; fldcw(control); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) { mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); } -#endif start_emulating(); intr_restore(saveintr); } @@ -471,9 +435,7 @@ static void npxinitstate(void *arg __unused) { register_t saveintr; -#ifdef CPU_ENABLE_SSE int cp[4], i, max_ext_n; -#endif if (!hw_float) return; @@ -484,7 +446,6 @@ npxinitstate(void *arg __unused) stop_emulating(); fpusave(npx_initialstate); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) { if (npx_initialstate->sv_xmm.sv_env.en_mxcsr_mask) cpu_mxcsr_mask = @@ -506,11 +467,9 @@ npxinitstate(void *arg __unused) bzero(npx_initialstate->sv_xmm.sv_xmm, sizeof(npx_initialstate->sv_xmm.sv_xmm)); } else -#endif bzero(npx_initialstate->sv_87.sv_ac, sizeof(npx_initialstate->sv_87.sv_ac)); -#ifdef CPU_ENABLE_SSE /* * Create a table describing the layout of the CPU Extended * Save Area. @@ -535,7 +494,6 @@ npxinitstate(void *arg __unused) xsave_area_desc[i].size = cp[0]; } } -#endif fpu_save_area_zone = uma_zcreate("FPU_save_area", cpu_max_ext_state_size, NULL, NULL, NULL, NULL, @@ -585,10 +543,8 @@ npxformat(void) if (!hw_float) return (_MC_FPFMT_NODEV); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) return (_MC_FPFMT_XMM); -#endif return (_MC_FPFMT_387); } @@ -809,7 +765,6 @@ npxtrap_x87(void) return (fpetable[status & ((~control & 0x3f) | 0x40)]); } -#ifdef CPU_ENABLE_SSE int npxtrap_sse(void) { @@ -829,7 +784,6 @@ npxtrap_sse(void) critical_exit(); return (fpetable[(mxcsr & (~mxcsr >> 7)) & 0x3f]); } -#endif /* * Implement device not available (DNA) exception @@ -868,10 +822,8 @@ npxdna(void) */ PCPU_SET(fpcurthread, curthread); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) fpu_clean_state(); -#endif if ((curpcb->pcb_flags & PCB_NPXINITDONE) == 0) { /* @@ -913,11 +865,9 @@ npxsave(addr) { stop_emulating(); -#ifdef CPU_ENABLE_SSE if (use_xsaveopt) xsaveopt((char *)addr, xsave_mask); else -#endif fpusave(addr); start_emulating(); PCPU_SET(fpcurthread, NULL); @@ -968,9 +918,7 @@ npxdrop(void) * Discard pending exceptions in the !cpu_fxsr case so that unmasked * ones don't cause a panic on the next frstor. */ -#ifdef CPU_ENABLE_SSE if (!cpu_fxsr) -#endif fnclex(); td = PCPU_GET(fpcurthread); @@ -990,11 +938,9 @@ int npxgetregs(struct thread *td) { struct pcb *pcb; -#ifdef CPU_ENABLE_SSE uint64_t *xstate_bv, bit; char *sa; int max_ext_n, i; -#endif int owned; if (!hw_float) @@ -1011,9 +957,7 @@ npxgetregs(struct thread *td) critical_enter(); if (td == PCPU_GET(fpcurthread)) { fpusave(get_pcb_user_save_pcb(pcb)); -#ifdef CPU_ENABLE_SSE if (!cpu_fxsr) -#endif /* * fnsave initializes the FPU and destroys whatever * context it contains. Make sure the FPU owner @@ -1025,7 +969,6 @@ npxgetregs(struct thread *td) owned = _MC_FPOWNED_PCB; } critical_exit(); -#ifdef CPU_ENABLE_SSE if (use_xsave) { /* * Handle partially saved state. @@ -1048,7 +991,6 @@ npxgetregs(struct thread *td) *xstate_bv |= bit; } } -#endif return (owned); } @@ -1063,7 +1005,6 @@ npxuserinited(struct thread *td) pcb->pcb_flags |= PCB_NPXUSERINITDONE; } -#ifdef CPU_ENABLE_SSE int npxsetxstate(struct thread *td, char *xfpustate, size_t xfpustate_size) { @@ -1101,16 +1042,13 @@ npxsetxstate(struct thread *td, char *xf return (0); } -#endif int npxsetregs(struct thread *td, union savefpu *addr, char *xfpustate, size_t xfpustate_size) { struct pcb *pcb; -#ifdef CPU_ENABLE_SSE int error; -#endif if (!hw_float) return (ENXIO); @@ -1118,14 +1056,12 @@ npxsetregs(struct thread *td, union save pcb = td->td_pcb; critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { -#ifdef CPU_ENABLE_SSE error = npxsetxstate(td, xfpustate, xfpustate_size); if (error != 0) { critical_exit(); return (error); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 24 16:11: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 87166CEBEC6; Fri, 24 Feb 2017 16:11:57 +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 46CE8BE1; Fri, 24 Feb 2017 16:11:57 +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 v1OGBujS036461; Fri, 24 Feb 2017 16:11:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OGBu3B036457; Fri, 24 Feb 2017 16:11:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702241611.v1OGBu3B036457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Feb 2017 16:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314211 - in head/sys: dev/acpica kern sys 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: Fri, 24 Feb 2017 16:11:57 -0000 Author: kib Date: Fri Feb 24 16:11:55 2017 New Revision: 314211 URL: https://svnweb.freebsd.org/changeset/base/314211 Log: Remove cpu_deepest_sleep variable. On Core2 and older Intel CPUs, where TSC stops in C2, system does not allow C2 entrance if timecounter hardware is TSC. This is done by tc_windup() which tests for TC_FLAGS_C2STOP flag of the new timecounter and increases cpu_disable_c2_sleep if flag is set. Right now init_TSC_tc() only sets the flag if cpu_deepest_sleep >= 2, but TSC is initialized too early for this variable to be set by acpi_cpu.c. There is no reason to require that ACPI reported C2 and deeper states to set TC_FLAGS_C2STOP, so remove cpu_deepest_sleep test from init_TSC_tc() condition. And since this is the only use of the variable, remove it at all. Reported and submitted by: Jia-Shiun Li Suggested by: jhb MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_cpu.c head/sys/kern/kern_clocksource.c head/sys/sys/systm.h head/sys/x86/x86/tsc.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Fri Feb 24 16:02:01 2017 (r314210) +++ head/sys/dev/acpica/acpi_cpu.c Fri Feb 24 16:11:55 2017 (r314211) @@ -703,7 +703,6 @@ acpi_cpu_generic_cx_probe(struct acpi_cp sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; - cpu_deepest_sleep = 1; /* * The spec says P_BLK must be 6 bytes long. However, some systems @@ -729,7 +728,6 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr++; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; - cpu_deepest_sleep = 2; } } if (sc->cpu_p_blk_len < 6) @@ -746,7 +744,6 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency; cx_ptr++; sc->cpu_cx_count++; - cpu_deepest_sleep = 3; } } } @@ -831,7 +828,6 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s cx_ptr->type = ACPI_STATE_C0; cx_ptr++; sc->cpu_cx_count++; - cpu_deepest_sleep = 1; /* Set up all valid states. */ for (i = 0; i < count; i++) { @@ -884,8 +880,6 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s continue; case ACPI_STATE_C2: sc->cpu_non_c3 = sc->cpu_cx_count; - if (cpu_deepest_sleep < 2) - cpu_deepest_sleep = 2; break; case ACPI_STATE_C3: default: @@ -894,8 +888,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s "acpi_cpu%d: C3[%d] not available.\n", device_get_unit(sc->cpu_dev), i)); continue; - } else - cpu_deepest_sleep = 3; + } break; } Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Fri Feb 24 16:02:01 2017 (r314210) +++ head/sys/kern/kern_clocksource.c Fri Feb 24 16:11:55 2017 (r314211) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -int cpu_deepest_sleep = 0; /* Deepest Cx state available. */ int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */ int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */ Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Feb 24 16:02:01 2017 (r314210) +++ head/sys/sys/systm.h Fri Feb 24 16:11:55 2017 (r314211) @@ -321,7 +321,6 @@ sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); void cpu_et_frequency(struct eventtimer *et, uint64_t newfreq); -extern int cpu_deepest_sleep; extern int cpu_disable_c2_sleep; extern int cpu_disable_c3_sleep; Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Fri Feb 24 16:02:01 2017 (r314210) +++ head/sys/x86/x86/tsc.c Fri Feb 24 16:11:55 2017 (r314211) @@ -542,7 +542,7 @@ init_TSC_tc(void) * result incorrect runtimes for kernel idle threads (but not * for any non-idle threads). */ - if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL && + if (cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP; if (bootverbose) From owner-svn-src-all@freebsd.org Fri Feb 24 16: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 66E99CEC4CC; Fri, 24 Feb 2017 16:37:36 +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 36B6316C9; Fri, 24 Feb 2017 16:37:36 +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 v1OGbZ14047176; Fri, 24 Feb 2017 16:37:35 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OGbZ1e047175; Fri, 24 Feb 2017 16:37:35 GMT (envelope-from br@FreeBSD.org) Message-Id: <201702241637.v1OGbZ1e047175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 24 Feb 2017 16:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314212 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 16:37:36 -0000 Author: br Date: Fri Feb 24 16:37:35 2017 New Revision: 314212 URL: https://svnweb.freebsd.org/changeset/base/314212 Log: Use correct macro for Synopsys UART driver declaration. Modified: head/sys/dev/uart/uart_dev_snps.c Modified: head/sys/dev/uart/uart_dev_snps.c ============================================================================== --- head/sys/dev/uart/uart_dev_snps.c Fri Feb 24 16:11:55 2017 (r314211) +++ head/sys/dev/uart/uart_dev_snps.c Fri Feb 24 16:37:35 2017 (r314212) @@ -104,7 +104,7 @@ static struct ofw_compat_data compat_dat { "snps,dw-apb-uart", (uintptr_t)&uart_snps_class }, { NULL, (uintptr_t)NULL } }; -UART_FDT_CLASS(compat_data); +UART_FDT_CLASS_AND_DEVICE(compat_data); #ifdef EXT_RESOURCES static int From owner-svn-src-all@freebsd.org Fri Feb 24 16:52: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 2F425CEC851; Fri, 24 Feb 2017 16:52:59 +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 F2A961F70; Fri, 24 Feb 2017 16:52:58 +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 v1OGqwEh055134; Fri, 24 Feb 2017 16:52:58 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OGqwDi055133; Fri, 24 Feb 2017 16:52:58 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702241652.v1OGqwDi055133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 24 Feb 2017 16:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314213 - head/sys/boot/geli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 16:52:59 -0000 Author: allanjude Date: Fri Feb 24 16:52:57 2017 New Revision: 314213 URL: https://svnweb.freebsd.org/changeset/base/314213 Log: Remove control+r handling from geliboot's pwgets() pwgets() is based on ngets() from libstand, which includes a feature that is not wanted in a very of the function designed for password handling. Pressing control+r echos out the entered string This commit removes that feature from pwgets() PR: 217298 Reported by: ehaupt Reviewed by: kristof, tsoome, ehaupt Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D9782 Modified: head/sys/boot/geli/pwgets.c Modified: head/sys/boot/geli/pwgets.c ============================================================================== --- head/sys/boot/geli/pwgets.c Fri Feb 24 16:37:35 2017 (r314212) +++ head/sys/boot/geli/pwgets.c Fri Feb 24 16:52:57 2017 (r314213) @@ -60,14 +60,6 @@ pwgets(char *buf, int n) putchar('\b'); } break; - case 'r'&037: { - char *p; - - putchar('\n'); - for (p = buf; p < lp; ++p) - putchar(*p); - break; - } case 'u'&037: case 'w'&037: lp = buf; From owner-svn-src-all@freebsd.org Fri Feb 24 16:53: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 1E587CEC89E; Fri, 24 Feb 2017 16:53:33 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.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 CC107110; Fri, 24 Feb 2017 16:53:32 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v1OGrSwH028385; Fri, 24 Feb 2017 08:53:28 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v1OGrRTJ028384; Fri, 24 Feb 2017 08:53:27 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201702241653.v1OGrRTJ028384@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r314210 - in stable/11/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 In-Reply-To: <201702241602.v1OG21SM034524@repo.freebsd.org> To: Konstantin Belousov Date: Fri, 24 Feb 2017 08:53:27 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 16:53:33 -0000 > Author: kib > Date: Fri Feb 24 16:02:01 2017 > New Revision: 314210 > URL: https://svnweb.freebsd.org/changeset/base/314210 > > Log: > MFC r313154: > For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE > and device npx. Um, why????? Makes it much easier to test soft float if we can remove the npx device. Or has soft float support died yet again? Yes, an i386 without an FPU is anchient by why are we removing working functionality? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Feb 24 17:03: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 09AC5CECBF4; Fri, 24 Feb 2017 17:03:16 +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 CCEEAA0A; Fri, 24 Feb 2017 17:03:15 +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 v1OH3EVm059359; Fri, 24 Feb 2017 17:03:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OH3EQn059358; Fri, 24 Feb 2017 17:03:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702241703.v1OH3EQn059358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 24 Feb 2017 17:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314214 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 17:03:16 -0000 Author: hselasky Date: Fri Feb 24 17:03:14 2017 New Revision: 314214 URL: https://svnweb.freebsd.org/changeset/base/314214 Log: Prototype device structure to ensure LinuxKPI header file can be included standalone. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/device.h Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Fri Feb 24 16:52:57 2017 (r314213) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Fri Feb 24 17:03:14 2017 (r314214) @@ -49,6 +49,8 @@ enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED, IRQ_WAKE_THREAD, }; typedef enum irqreturn irqreturn_t; +struct device; + struct class { const char *name; struct module *owner; From owner-svn-src-all@freebsd.org Fri Feb 24 17:14: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 37205CECD7A; Fri, 24 Feb 2017 17:14:12 +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 9C616EAD; Fri, 24 Feb 2017 17:14:11 +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 v1OHE5uo086397 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Feb 2017 19:14:05 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v1OHE5uo086397 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v1OHE5VO086396; Fri, 24 Feb 2017 19:14:05 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Feb 2017 19:14:05 +0200 From: Konstantin Belousov To: "Rodney W. Grimes" 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: r314210 - in stable/11/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 Message-ID: <20170224171405.GX2092@kib.kiev.ua> References: <201702241602.v1OG21SM034524@repo.freebsd.org> <201702241653.v1OGrRTJ028384@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702241653.v1OGrRTJ028384@pdx.rh.CN85.dnsmgr.net> 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: Fri, 24 Feb 2017 17:14:12 -0000 On Fri, Feb 24, 2017 at 08:53:27AM -0800, Rodney W. Grimes wrote: > > Author: kib > > Date: Fri Feb 24 16:02:01 2017 > > New Revision: 314210 > > URL: https://svnweb.freebsd.org/changeset/base/314210 > > > > Log: > > MFC r313154: > > For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE > > and device npx. > > Um, why????? Makes it much easier to test soft float if we can remove > the npx device. Or has soft float support died yet again? Soft float was removed very long time ago. > > Yes, an i386 without an FPU is anchient by why are we removing working > functionality? This question makes an impression that you think that kernel would not boot on a machine without FPU. The code to tolerate such configuration is there, but it is not tested for obvious reasons. Completely different issue is that userspace requires FPU and e.g. /bin/sh traps on the next setjmp(3) call. Also, we do not run on real 386, only on 486+, and there was probably only Intel 486SX CPU model which has all 486 features but no FPU. From owner-svn-src-all@freebsd.org Fri Feb 24 17:36: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 0F812CEB5DA; Fri, 24 Feb 2017 17:36:57 +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 C1F3A1F27; Fri, 24 Feb 2017 17:36:56 +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 v1OHatpV072198; Fri, 24 Feb 2017 17:36:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OHatUB072197; Fri, 24 Feb 2017 17:36:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201702241736.v1OHatUB072197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 24 Feb 2017 17:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314215 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 17:36:57 -0000 Author: hselasky Date: Fri Feb 24 17:36:55 2017 New Revision: 314215 URL: https://svnweb.freebsd.org/changeset/base/314215 Log: Implement more string functions in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/string.h Modified: head/sys/compat/linuxkpi/common/include/linux/string.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/string.h Fri Feb 24 17:03:14 2017 (r314214) +++ head/sys/compat/linuxkpi/common/include/linux/string.h Fri Feb 24 17:36:55 2017 (r314215) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,29 +31,111 @@ #ifndef _LINUX_STRING_H_ #define _LINUX_STRING_H_ +#include + #include #include #include +#include +#include #include #define strnicmp(...) strncasecmp(__VA_ARGS__) +static inline int +match_string(const char *const *table, int n, const char *key) +{ + int i; + + for (i = 0; i != n && table[i] != NULL; i++) { + if (strcmp(table[i], key) == 0) + return (i); + } + return (-EINVAL); +} + +static inline void * +memdup_user(const void *ptr, size_t len) +{ + void *retval; + int error; + + retval = malloc(len, M_KMALLOC, M_WAITOK); + error = linux_copyin(ptr, retval, len); + if (error != 0) { + free(retval, M_KMALLOC); + return (ERR_PTR(error)); + } + return (retval); +} + static inline void * kmemdup(const void *src, size_t len, gfp_t gfp) { void *dst; dst = kmalloc(len, gfp); - if (dst) + if (dst != NULL) memcpy(dst, src, len); return (dst); } +static inline char * +kstrdup(const char *string, gfp_t gfp) +{ + char *retval; + size_t len; + + len = strlen(string) + 1; + retval = kmalloc(len, gfp); + if (retval != NULL) + memcpy(retval, string, len); + return (retval); +} + +static inline char * +kstrndup(const char *string, size_t len, gfp_t gfp) +{ + char *retval; + + retval = kmalloc(len + 1, gfp); + if (retval != NULL) + strncpy(retval, string, len); + return (retval); +} + static inline const char * kstrdup_const(const char *src, gfp_t gfp) { return (kmemdup(src, strlen(src) + 1, gfp)); } -#endif /* _LINUX_STRING_H_ */ +static inline char * +skip_spaces(const char *str) +{ + while (isspace(*str)) + ++str; + return (__DECONST(char *, str)); +} + +static inline void * +memchr_inv(const void *start, int c, size_t length) +{ + const u8 *ptr; + const u8 *end; + u8 ch; + + ch = c; + ptr = start; + end = ptr + length; + + while (ptr != end) { + if (*ptr != ch) + return (__DECONST(void *, ptr)); + ptr++; + } + return (NULL); +} + +#endif /* _LINUX_STRING_H_ */ From owner-svn-src-all@freebsd.org Fri Feb 24 17:57: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 A165DCEBA4E; Fri, 24 Feb 2017 17:57:31 +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 7C873B9E; Fri, 24 Feb 2017 17:57:30 +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 2C68210A7B9; Fri, 24 Feb 2017 12:57:29 -0500 (EST) From: John Baldwin To: Konstantin Belousov Cc: "Rodney W. Grimes" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r314210 - in stable/11/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 Date: Fri, 24 Feb 2017 09:56:03 -0800 Message-ID: <2826708.tPzGBbFfxk@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170224171405.GX2092@kib.kiev.ua> References: <201702241602.v1OG21SM034524@repo.freebsd.org> <201702241653.v1OGrRTJ028384@pdx.rh.CN85.dnsmgr.net> <20170224171405.GX2092@kib.kiev.ua> 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, 24 Feb 2017 12:57:29 -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, 24 Feb 2017 17:57:31 -0000 On Friday, February 24, 2017 07:14:05 PM Konstantin Belousov wrote: > On Fri, Feb 24, 2017 at 08:53:27AM -0800, Rodney W. Grimes wrote: > > > Author: kib > > > Date: Fri Feb 24 16:02:01 2017 > > > New Revision: 314210 > > > URL: https://svnweb.freebsd.org/changeset/base/314210 > > > > > > Log: > > > MFC r313154: > > > For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE > > > and device npx. > > > > Um, why????? Makes it much easier to test soft float if we can remove > > the npx device. Or has soft float support died yet again? > Soft float was removed very long time ago. I think it was gone in 5.0. > > Yes, an i386 without an FPU is anchient by why are we removing working > > functionality? > This question makes an impression that you think that kernel would not > boot on a machine without FPU. The code to tolerate such configuration > is there, but it is not tested for obvious reasons. > > Completely different issue is that userspace requires FPU and e.g. /bin/sh > traps on the next setjmp(3) call. > > Also, we do not run on real 386, only on 486+, and there was probably only > Intel 486SX CPU model which has all 486 features but no FPU. Yes, we effectively require an FPU on i386. I'd be tempted to start requiring a built-in FPU (so INT 16 vs IRQ 13) so we could further reduce diffs with amd64 and eventually have an "x86" fpu.c. That would only drop support for systems using a 486sx with an external FPU. Those systems are probably happier running FreeBSD 4.x than 12 anyway. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Feb 24 18:56: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 3CBBDCEC8DB; Fri, 24 Feb 2017 18:56:02 +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 09D14B14; Fri, 24 Feb 2017 18:56:01 +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 v1OIu1dO004904; Fri, 24 Feb 2017 18:56:01 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OIu150004903; Fri, 24 Feb 2017 18:56:01 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201702241856.v1OIu150004903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 24 Feb 2017 18:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314216 - head/sys/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: Fri, 24 Feb 2017 18:56:02 -0000 Author: jtl Date: Fri Feb 24 18:56:00 2017 New Revision: 314216 URL: https://svnweb.freebsd.org/changeset/base/314216 Log: We have seen several cases recently where we appear to get a double-fault: We have an original panic. Then, instead of writing the core to the dump device, the kernel has a second panic: "smp_targeted_tlb_shootdown: interrupts disabled". This change is an attempt to fix that second panic. When the other CPUs are stopped, we can't notify them of the TLB shootdown, so we skip that operation. However, when the CPUs come back up, we invalidate the TLB to ensure they correctly observe any changes to the page mappings. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D9786 Modified: head/sys/x86/x86/mp_x86.c Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Feb 24 17:36:55 2017 (r314215) +++ head/sys/x86/x86/mp_x86.c Fri Feb 24 18:56:00 2017 (r314216) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #ifdef GPROF #include #endif +#include #include #include #include @@ -1269,6 +1270,12 @@ cpustop_handler_post(u_int cpu) CPU_CLR_ATOMIC(cpu, &started_cpus); CPU_CLR_ATOMIC(cpu, &stopped_cpus); + /* + * We don't broadcast TLB invalidations to other CPUs when they are + * stopped. Hence, we clear the TLB before resuming. + */ + invltlb_glob(); + #if defined(__amd64__) && defined(DDB) amd64_db_resume_dbreg(); #endif @@ -1427,6 +1434,10 @@ smp_targeted_tlb_shootdown(cpuset_t mask uint32_t generation; int cpu; + /* It is not necessary to signal other CPUs while in the debugger. */ + if (kdb_active || panicstr != NULL) + return; + /* * Check for other cpus. Return if none. */ From owner-svn-src-all@freebsd.org Fri Feb 24 18:57: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 B3B52CEC978; Fri, 24 Feb 2017 18:57:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 5CD16CC0; Fri, 24 Feb 2017 18:57:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id v77so21416145wmv.1; Fri, 24 Feb 2017 10:57: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; bh=1ZC5vCTluQGDIjOhXbQJIecIJjFX/Dx6R8wAyLKJIsU=; b=ZRz5kNdIzSVRYDm1s1xp4PHwLkXmQDodA8An/bE2pOw+ZSHz9BXzABkGEgc4IZAVZy yDfRpa7ZDZdEuEZluTrXkcOWuRmXl1kLQfcNTCzZGRj2XuIFzoMi02E3jh4Q5pVfgrde W3vsudues/c9zlVFfTfhfuRSwHbqj7w2ldQCO3gVNGKA9uRrNRFSifQ3BDKFtfqli7Vq WmxrMQCFEiA2zRNzEw1EXHDEcn2lMjcE12PLOMBGB/mDcaOoKiDxdZ17eNQuBSjhA6XB UCEVeritOvcISMYf7A+Hd+raw0aq4cmawYCK5PKhzVN03VMQD7roM71MWIle0A2gLdX/ Tw4A== 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; bh=1ZC5vCTluQGDIjOhXbQJIecIJjFX/Dx6R8wAyLKJIsU=; b=cvpoz9Yd+aUxC/pZqlpCCP30dPqZ1K+1M/WD6kG68it1hRMOtZgHY1iLs4qCyPG2fW HoxSiF0e2MJeDg7FHIVwD5+QQgpVtpoVhB/CSTbjRtL/+5+tJkzhSmIejogiW3/q0i0+ eTG4ScAvlcnDSoYVzKvlCj9Rsa4b9GFtYe0IEyif3Cet+OQqJHst4vSvMvQF7mm50Q3Q 0ZsmaS6W5ES7NKSUxAmnf4qUEk2H7OW3fJgAiLzOO5QhNUZhS6+uto7CjLjKlikzPCDF 8FIoWYgrOODPpFXgTdR4f1aMF/FIZj+IuTwcGI5mveE/i9bvdpY+shLSlwNfpXumJFwS e66w== X-Gm-Message-State: AMke39ncKRX0wupbp2qTbX2N79G+mEq4RqApX2R/Jn9LyA4ij2tDsy0gGZwcwwJLJFa8JMKco7A8snSRR9LUew== X-Received: by 10.28.17.20 with SMTP id 20mr4076251wmr.106.1487962658247; Fri, 24 Feb 2017 10:57:38 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.28.128.133 with HTTP; Fri, 24 Feb 2017 10:57:37 -0800 (PST) In-Reply-To: <201702241517.v1OFHhdw012562@repo.freebsd.org> References: <201702241517.v1OFHhdw012562@repo.freebsd.org> From: Adrian Chadd Date: Fri, 24 Feb 2017 10:57:37 -0800 X-Google-Sender-Auth: BL6QNFKtTaNNbvwgGidv1SJWQQQ Message-ID: Subject: Re: svn commit: r314209 - head/sys/dev/iwm To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 18:57:41 -0000 [snip] (adrian ran out of coffee at home three days ago.) -adrian From owner-svn-src-all@freebsd.org Fri Feb 24 19:22: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 702FECECEF4; Fri, 24 Feb 2017 19:22:19 +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 2E1871A04; Fri, 24 Feb 2017 19:22:19 +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 v1OJMI8b016097; Fri, 24 Feb 2017 19:22:18 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OJMHmH016092; Fri, 24 Feb 2017 19:22:17 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201702241922.v1OJMHmH016092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Fri, 24 Feb 2017 19:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314217 - 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: Fri, 24 Feb 2017 19:22:19 -0000 Author: mmokhi (ports committer) Date: Fri Feb 24 19:22:17 2017 New Revision: 314217 URL: https://svnweb.freebsd.org/changeset/base/314217 Log: Add linux_preadv() and linux_pwritev() syscalls to Linuxulator. Reviewed by: dchagin Approved by: dchagin, trasz (src committers) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9722 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Fri Feb 24 18:56:00 2017 (r314216) +++ head/sys/amd64/linux/linux_dummy.c Fri Feb 24 19:22:17 2017 (r314217) @@ -110,9 +110,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ -DUMMY(preadv); -DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.38: */ Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Fri Feb 24 18:56:00 2017 (r314216) +++ head/sys/amd64/linux32/linux32_dummy.c Fri Feb 24 19:22:17 2017 (r314217) @@ -110,9 +110,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ -DUMMY(preadv); -DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Fri Feb 24 18:56:00 2017 (r314216) +++ head/sys/amd64/linux32/linux32_machdep.c Fri Feb 24 19:22:17 2017 (r314217) @@ -241,6 +241,52 @@ linux_writev(struct thread *td, struct l return (error); } +int +linux_preadv(struct thread *td, struct linux_preadv_args *uap) +{ + struct uio *auio; + int error; + off_t offset; + + error = linux32_copyinuio((struct l_iovec32 *)uap->vec, + uap->vlen, &auio); + if (error) + return (error); + /* + * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES + * pos_l and pos_h, respectively, contain the + * low order and high order 32 bits of offset. + */ + offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << + (sizeof(offset) * 4)) | uap->pos_l; + error = kern_preadv(td, uap->fd, auio, offset); + free(auio, M_IOV); + return (error); +} + +int +linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) +{ + struct uio *auio; + int error; + off_t offset; + + error = linux32_copyinuio((struct l_iovec32 *)uap->vec, + uap->vlen, &auio); + if (error) + return (error); + /* + * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES + * pos_l and pos_h, respectively, contain the + * low order and high order 32 bits of offset. + */ + offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << + (sizeof(offset) * 4)) | uap->pos_l; + error = kern_pwritev(td, uap->fd, auio, offset); + free(auio, M_IOV); + return (error); +} + struct l_ipc_kludge { l_uintptr_t msgp; l_long msgtyp; Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Fri Feb 24 18:56:00 2017 (r314216) +++ head/sys/compat/linux/linux_file.c Fri Feb 24 19:22:17 2017 (r314217) @@ -1027,6 +1027,52 @@ linux_pwrite(struct thread *td, struct l return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } +#if !(defined(__amd64__) && defined(COMPAT_LINUX32)) +int +linux_preadv(struct thread *td, struct linux_preadv_args *uap) +{ + struct uio *auio; + int error; + off_t offset; + + error = copyinuio(uap->vec, uap->vlen, &auio); + if (error) + return (error); + /* + * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES + * pos_l and pos_h, respectively, contain the + * low order and high order 32 bits of offset. + */ + offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << + (sizeof(offset) * 4)) | uap->pos_l; + error = kern_preadv(td, uap->fd, auio, offset); + free(auio, M_IOV); + return (error); +} + +int +linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) +{ + struct uio *auio; + int error; + off_t offset; + + error = copyinuio(uap->vec, uap->vlen, &auio); + if (error) + return (error); + /* + * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES + * pos_l and pos_h, respectively, contain the + * low order and high order 32 bits of offset. + */ + offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << + (sizeof(offset) * 4)) | uap->pos_l; + error = kern_pwritev(td, uap->fd, auio, offset); + free(auio, M_IOV); + return (error); +} +#endif /* !(__amd64__ && COMPAT_LINUX32) */ + int linux_mount(struct thread *td, struct linux_mount_args *args) { Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Fri Feb 24 18:56:00 2017 (r314216) +++ head/sys/i386/linux/linux_dummy.c Fri Feb 24 19:22:17 2017 (r314217) @@ -106,9 +106,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ -DUMMY(preadv); -DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ From owner-svn-src-all@freebsd.org Fri Feb 24 19:47: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 66659CEC1C3; Fri, 24 Feb 2017 19:47:29 +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 1718A2E2; Fri, 24 Feb 2017 19:47:29 +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 v1OJlSIh025170; Fri, 24 Feb 2017 19:47:28 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OJlRKT025165; Fri, 24 Feb 2017 19:47:27 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201702241947.v1OJlRKT025165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Fri, 24 Feb 2017 19:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314218 - 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: Fri, 24 Feb 2017 19:47:29 -0000 Author: dchagin Date: Fri Feb 24 19:47:27 2017 New Revision: 314218 URL: https://svnweb.freebsd.org/changeset/base/314218 Log: Revert r314217. Commit is not match that I have approved. Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Fri Feb 24 19:22:17 2017 (r314217) +++ head/sys/amd64/linux/linux_dummy.c Fri Feb 24 19:47:27 2017 (r314218) @@ -110,6 +110,9 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.38: */ Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Fri Feb 24 19:22:17 2017 (r314217) +++ head/sys/amd64/linux32/linux32_dummy.c Fri Feb 24 19:47:27 2017 (r314218) @@ -110,6 +110,9 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Fri Feb 24 19:22:17 2017 (r314217) +++ head/sys/amd64/linux32/linux32_machdep.c Fri Feb 24 19:47:27 2017 (r314218) @@ -241,52 +241,6 @@ linux_writev(struct thread *td, struct l return (error); } -int -linux_preadv(struct thread *td, struct linux_preadv_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = linux32_copyinuio((struct l_iovec32 *)uap->vec, - uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_preadv(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} - -int -linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = linux32_copyinuio((struct l_iovec32 *)uap->vec, - uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_pwritev(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} - struct l_ipc_kludge { l_uintptr_t msgp; l_long msgtyp; Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Fri Feb 24 19:22:17 2017 (r314217) +++ head/sys/compat/linux/linux_file.c Fri Feb 24 19:47:27 2017 (r314218) @@ -1027,52 +1027,6 @@ linux_pwrite(struct thread *td, struct l return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } -#if !(defined(__amd64__) && defined(COMPAT_LINUX32)) -int -linux_preadv(struct thread *td, struct linux_preadv_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = copyinuio(uap->vec, uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_preadv(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} - -int -linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = copyinuio(uap->vec, uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_pwritev(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} -#endif /* !(__amd64__ && COMPAT_LINUX32) */ - int linux_mount(struct thread *td, struct linux_mount_args *args) { Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Fri Feb 24 19:22:17 2017 (r314217) +++ head/sys/i386/linux/linux_dummy.c Fri Feb 24 19:47:27 2017 (r314218) @@ -106,6 +106,9 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ From owner-svn-src-all@freebsd.org Fri Feb 24 19:52: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 4D463CEC3B9; Fri, 24 Feb 2017 19:52:32 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::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 18D1E9C4; Fri, 24 Feb 2017 19:52:32 +0000 (UTC) (envelope-from mokhi64@gmail.com) Received: by mail-it0-x242.google.com with SMTP id r141so5365693ita.1; Fri, 24 Feb 2017 11:52:32 -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=dQoqvVaWxoYo1Z5o+slnPgDptxumjn6UKC9Vlf1TjDo=; b=bLyb23J8xA0fEmuLcICVGziQyhCxfy9xfahfIIsP6GUZqv8j6+k1c9XnUic+RXTRHI nqfafe7ELXCJGLkQC7okvIfG0sdMxsM5i99OFeI5HE6bsRcYmC/F4I76Nm3fRUs8yCx5 uvpyGXwM/sQm7e1/wpksK16EwAnoeEWwq8EOu634hbVOdw663PWGikVFJ4k89bG7qGck aIfnmvH2QfMAUmu21sevsR+QgyT6hC4rx3zFA6QTNJRH6i1PSjlm3Eh5UTWbSLIfeLZU Oh7eNnCLmTCejWgJqaQLuVcHP81lWF782FqvHvNkBrek1cHg0pKLDKiB3ufnYdpPIY5V Duxg== 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=dQoqvVaWxoYo1Z5o+slnPgDptxumjn6UKC9Vlf1TjDo=; b=kGxqmLPiJC704bC8kiYDcWtEjo3zL2OlLbRQfTITK2nnlBqpDB9UhVQeQrABGY7GNA dXi7OWrCYEBR9wy/gMIGR+FY8qDCNVIWRRO2z9Mi0P1kysGHHjlj3D1Kc3VymOvMBqkv 7NiAWMACG0Jj1IwrVOXvKJZW/jnjUQw99icariQLWTajm3G9ru+HiFw4aEDhldjy7Lr5 qvYAm9IRuYfraZvwz7/eqfNokNPqdBYNcLkNgH7SfxAv89TDtlnjTZkozwk/gO1lNWIx Es7G0PRoFOTAhhztdVxvd6xyJUqjwLWA8Nm1F0gMhRQFAqLm5vV8IVaG/rwi/Smt+eYK T2iw== X-Gm-Message-State: AMke39nQtNysvG8ukD2AN9IT7e6cJu+DeVJhdY0u0JsxIle3yVAKvMhqfON3j/U3VUFYgWTCAQBIX8FoSYrEpg== X-Received: by 10.36.83.209 with SMTP id n200mr3691234itb.9.1487965951320; Fri, 24 Feb 2017 11:52:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.136.21 with HTTP; Fri, 24 Feb 2017 11:52:30 -0800 (PST) In-Reply-To: <201702241947.v1OJlRKT025165@repo.freebsd.org> References: <201702241947.v1OJlRKT025165@repo.freebsd.org> From: mokhi Date: Fri, 24 Feb 2017 23:22:30 +0330 Message-ID: Subject: Re: svn commit: r314218 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux To: Dmitry Chagin 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, 24 Feb 2017 19:52:32 -0000 Thanks for fixing it. I'm gonna apply correct patch soon __/\__ -- Best regards, MMokhi. From owner-svn-src-all@freebsd.org Fri Feb 24 20:04: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 833A4CEC5E1; Fri, 24 Feb 2017 20:04:04 +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 35A321027; Fri, 24 Feb 2017 20:04:04 +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 v1OK43kj033265; Fri, 24 Feb 2017 20:04:03 GMT (envelope-from mmokhi@FreeBSD.org) Received: (from mmokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OK42Kb033259; Fri, 24 Feb 2017 20:04:02 GMT (envelope-from mmokhi@FreeBSD.org) Message-Id: <201702242004.v1OK42Kb033259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmokhi set sender to mmokhi@FreeBSD.org using -f From: Mahdi Mokhtari Date: Fri, 24 Feb 2017 20:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314219 - 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: Fri, 24 Feb 2017 20:04:04 -0000 Author: mmokhi (ports committer) Date: Fri Feb 24 20:04:02 2017 New Revision: 314219 URL: https://svnweb.freebsd.org/changeset/base/314219 Log: Add linux_preadv() and linux_pwritev() syscalls to Linuxulator. Reviewed by: dchagin Approved by: dchagin, trasz (src committers) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9722 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux.h head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Fri Feb 24 19:47:27 2017 (r314218) +++ head/sys/amd64/linux/linux_dummy.c Fri Feb 24 20:04:02 2017 (r314219) @@ -110,9 +110,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ -DUMMY(preadv); -DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.38: */ Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Fri Feb 24 19:47:27 2017 (r314218) +++ head/sys/amd64/linux32/linux.h Fri Feb 24 20:04:02 2017 (r314219) @@ -663,6 +663,7 @@ struct l_user_desc { (((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1) struct iovec; +struct uio; struct l_iovec32 { uint32_t iov_base; @@ -671,6 +672,8 @@ struct l_iovec32 { int linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt, struct iovec **iovp, int error); +int linux32_copyinuio(struct l_iovec32 *iovp, l_ulong iovcnt, + struct uio **uiop); int linux_copyout_rusage(struct rusage *ru, void *uaddr); /* robust futexes */ Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Fri Feb 24 19:47:27 2017 (r314218) +++ head/sys/amd64/linux32/linux32_dummy.c Fri Feb 24 20:04:02 2017 (r314219) @@ -110,9 +110,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ -DUMMY(preadv); -DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Fri Feb 24 19:47:27 2017 (r314218) +++ head/sys/amd64/linux32/linux32_machdep.c Fri Feb 24 20:04:02 2017 (r314219) @@ -144,7 +144,7 @@ linux_execve(struct thread *td, struct l CTASSERT(sizeof(struct l_iovec32) == 8); -static int +int linux32_copyinuio(struct l_iovec32 *iovp, l_ulong iovcnt, struct uio **uiop) { struct l_iovec32 iov32; Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Fri Feb 24 19:47:27 2017 (r314218) +++ head/sys/compat/linux/linux_file.c Fri Feb 24 20:04:02 2017 (r314219) @@ -1028,6 +1028,62 @@ linux_pwrite(struct thread *td, struct l } int +linux_preadv(struct thread *td, struct linux_preadv_args *uap) +{ + struct uio *auio; + int error; + off_t offset; + + /* + * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES + * pos_l and pos_h, respectively, contain the + * low order and high order 32 bits of offset. + */ + offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << + (sizeof(offset) * 4)) | uap->pos_l; + if (offset < 0) + return (EINVAL); +#ifdef COMPAT_LINUX32 + error = linux32_copyinuio(PTRIN(uap->vec), uap->vlen, &auio); +#else + error = copyinuio(uap->vec, uap->vlen, &auio); +#endif + if (error != 0) + return (error); + error = kern_preadv(td, uap->fd, auio, offset); + free(auio, M_IOV); + return (error); +} + +int +linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) +{ + struct uio *auio; + int error; + off_t offset; + + /* + * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES + * pos_l and pos_h, respectively, contain the + * low order and high order 32 bits of offset. + */ + offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << + (sizeof(offset) * 4)) | uap->pos_l; + if (offset < 0) + return (EINVAL); +#ifdef COMPAT_LINUX32 + error = linux32_copyinuio(PTRIN(uap->vec), uap->vlen, &auio); +#else + error = copyinuio(uap->vec, uap->vlen, &auio); +#endif + if (error != 0) + return (error); + error = kern_pwritev(td, uap->fd, auio, offset); + free(auio, M_IOV); + return (error); +} + +int linux_mount(struct thread *td, struct linux_mount_args *args) { char fstypename[MFSNAMELEN]; Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Fri Feb 24 19:47:27 2017 (r314218) +++ head/sys/i386/linux/linux_dummy.c Fri Feb 24 20:04:02 2017 (r314219) @@ -106,9 +106,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ -DUMMY(preadv); -DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ From owner-svn-src-all@freebsd.org Fri Feb 24 20:19: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 B81EACEC99B; Fri, 24 Feb 2017 20:19:27 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id A2ED11BA8; Fri, 24 Feb 2017 20:19:27 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 7BF9A179B3; Fri, 24 Feb 2017 12:19:22 -0800 (PST) Date: Fri, 24 Feb 2017 12:19:22 -0800 From: hiren panchasara To: "Jonathan T. Looney" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314216 - head/sys/x86/x86 Message-ID: <20170224201922.GA18343@strugglingcoder.info> References: <201702241856.v1OIu150004903@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <201702241856.v1OIu150004903@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 24 Feb 2017 20:19:27 -0000 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/24/17 at 06:56P, Jonathan T. Looney wrote: > Author: jtl > Date: Fri Feb 24 18:56:00 2017 > New Revision: 314216 > URL: https://svnweb.freebsd.org/changeset/base/314216 >=20 > Log: > We have seen several cases recently where we appear to get a double-fau= lt: > We have an original panic. Then, instead of writing the core to the dump > device, the kernel has a second panic: "smp_targeted_tlb_shootdown: > interrupts disabled". This change is an attempt to fix that second pani= c. > =20 > When the other CPUs are stopped, we can't notify them of the TLB shootd= own, > so we skip that operation. However, when the CPUs come back up, we > invalidate the TLB to ensure they correctly observe any changes to the > page mappings. > =20 > Reviewed by: kib > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D9786 Can this be MFCd to 11? Cheers, Hiren --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJYsJVHXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lBv0IAJ18WZy81Zg3cD1Fp4OSh94r Jg+3AAhn8jmRkss6GAXbZQTzviifzLNvKz554+7jdxdL9uBRBMWlStj3KFByO5KV 5kQH8ynpw1BrUh0Ajovhsb1UhyyoMuWisXnTMbLMvDah/ytxOgkAO0fl/n2xGT5G gafmL3zU4+nPDqIyWbPgrssvG/vUZQDkAjemgpVWj8eJzYie7vLAWGs5D4RstJsE K3f+CXQSPPnedSWEpf/cUzRqRZW5cVdyxuFW2fILFDD7N+0cCdmgLA2gljEbj/ww 4eeimJI9ie8WBdo6l2yq+8UKukyJG4Tx2vzsyHUgx49Z6fcFomeL1HujhP72p+w= =9L9k -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3-- From owner-svn-src-all@freebsd.org Fri Feb 24 20: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 199F9CEB080; Fri, 24 Feb 2017 20:47:58 +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 D21FAAE1; Fri, 24 Feb 2017 20:47:57 +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 v1OKlvVW050288; Fri, 24 Feb 2017 20:47:57 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OKluhL050281; Fri, 24 Feb 2017 20:47:56 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201702242047.v1OKluhL050281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 24 Feb 2017 20:47:56 +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: r314220 - stable/11/sbin/camcontrol 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, 24 Feb 2017 20:47:58 -0000 Author: ken Date: Fri Feb 24 20:47:56 2017 New Revision: 314220 URL: https://svnweb.freebsd.org/changeset/base/314220 Log: MFC r313893 ------------------------------------------------------------------------ r313893 | ken | 2017-02-17 13:04:22 -0700 (Fri, 17 Feb 2017) | 48 lines Add task attribute support to camcontrol(8). Users can use the new generic argument, -Q task_attr, to specify a task attribute (simple, ordered, head of queue, aca) for the commands issued. The the default is simple, which works with all SCSI devices that support tagged queueing. This will mostly be useful for debugging target behavior in certain situations. You can try it out by compiling CTL with CTL_IO_DELAY turned on (in sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL LUNs: ctladm delay 0:0 -l done -t 10 camcontrol tur da34 -v And at then before the 10 second timer is up, in another terminal: camcontrol inquiry da34 -Q ordered -v The Inquiry should complete just after the TUR completes. Ordinarily it would complete first because of the delay injection, but because the task attribute is set to ordered in this case, CTL holds it up until the previous command has completed. sbin/camcontrol/camcontrol.c: Add the new generic argument, -Q, which allows the user to specify a SCSI task attribute. The user can specify task attributes by name or numerically. Add a new task_attr arguments to SCSI sub-functions. sbin/camcontrol/attrib.c, sbin/camcontrol/camcontrol.h, sbin/camcontrol/fwdownload.c, sbin/camcontrol/modeedit.c, sbin/camcontrol/persist.c, sbin/camcontrol/timestamp.c, sbin/camcontrol/zone.c: Add the new task_attr argument to SCSI sub-functions. sbin/camcontrol/camcontrol.8: Document the new -Q option, and add an example. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/11/sbin/camcontrol/attrib.c stable/11/sbin/camcontrol/camcontrol.8 stable/11/sbin/camcontrol/camcontrol.c stable/11/sbin/camcontrol/camcontrol.h stable/11/sbin/camcontrol/fwdownload.c stable/11/sbin/camcontrol/modeedit.c stable/11/sbin/camcontrol/persist.c stable/11/sbin/camcontrol/timestamp.c stable/11/sbin/camcontrol/zone.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/attrib.c ============================================================================== --- stable/11/sbin/camcontrol/attrib.c Fri Feb 24 20:04:02 2017 (r314219) +++ stable/11/sbin/camcontrol/attrib.c Fri Feb 24 20:47:56 2017 (r314220) @@ -106,7 +106,8 @@ static struct scsi_nv output_format_map[ int scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout, int verbosemode, int err_recover) + int task_attr, int retry_count, int timeout, int verbosemode, + int err_recover) { union ccb *ccb = NULL; int attr_num = -1; @@ -317,7 +318,7 @@ scsiattrib(struct cam_device *device, in scsi_read_attribute(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*service_action*/ read_service_action, /*element*/ element_address, /*elem_type*/ element_type, Modified: stable/11/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.8 Fri Feb 24 20:04:02 2017 (r314219) +++ stable/11/sbin/camcontrol/camcontrol.8 Fri Feb 24 20:47:56 2017 (r314220) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2017 +.Dd February 17, 2017 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -422,6 +422,17 @@ It may take some other actions, dependin the command. .It Fl n Ar dev_name Specify the device type to operate on, e.g.\& "da", "cd". +.It Fl Q Ar task_attr +.Tn SCSI +task attribute for the command, if it is a +.Tn SCSI +command. +This may be ordered, simple, head, or aca. +In most cases this is not needed. +The default is simple, which works with all +.Tn SCSI +devices. +The task attribute may also be specified numerically. .It Fl t Ar timeout SCSI command timeout in seconds. This overrides the default timeout for @@ -2509,7 +2520,7 @@ information if the command fails since t .Fl v switch was not specified. .Bd -literal -offset indent -camcontrol tur da1 -E -C 4 -t 50 -v +camcontrol tur da1 -E -C 4 -t 50 -Q head -v .Ed .Pp Send a test unit ready command to da1. @@ -2522,6 +2533,9 @@ flag) if the command fails. Since error recovery is turned on, the disk will be spun up if it is not currently spinning. The +.Tn SCSI +task attribute for the command will be set to Head of Queue. +The .Nm utility will report whether the disk is ready. .Bd -literal -offset indent Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Fri Feb 24 20:04:02 2017 (r314219) +++ stable/11/sbin/camcontrol/camcontrol.c Fri Feb 24 20:47:56 2017 (r314220) @@ -171,6 +171,14 @@ struct ata_set_max_pwd u_int16_t reserved2[239]; }; +static struct scsi_nv task_attrs[] = { + { "simple", MSG_SIMPLE_Q_TAG }, + { "head", MSG_HEAD_OF_Q_TAG }, + { "ordered", MSG_ORDERED_Q_TAG }, + { "iwr", MSG_IGN_WIDE_RESIDUE }, + { "aca", MSG_ACA_TASK } +}; + static const char scsicmd_opts[] = "a:c:dfi:o:r"; static const char readdefect_opts[] = "f:GPqsS:X"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; @@ -265,12 +273,14 @@ static int getdevlist(struct cam_device #endif /* MINIMALISTIC */ static int getdevtree(int argc, char **argv, char *combinedopt); #ifndef MINIMALISTIC -static int testunitready(struct cam_device *device, int retry_count, - int timeout, int quiet); +static int testunitready(struct cam_device *device, int task_attr, + int retry_count, int timeout, int quiet); static int scsistart(struct cam_device *device, int startstop, int loadeject, - int retry_count, int timeout); -static int scsiinquiry(struct cam_device *device, int retry_count, int timeout); -static int scsiserial(struct cam_device *device, int retry_count, int timeout); + int task_attr, int retry_count, int timeout); +static int scsiinquiry(struct cam_device *device, int task_attr, + int retry_count, int timeout); +static int scsiserial(struct cam_device *device, int task_attr, + int retry_count, int timeout); #endif /* MINIMALISTIC */ static int parse_btl(char *tstr, path_id_t *bus, target_id_t *target, lun_id_t *lun, cam_argmask *arglst); @@ -280,11 +290,14 @@ static int scanlun_or_reset_dev(path_id_ lun_id_t lun, int scan); #ifndef MINIMALISTIC static int readdefects(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static void modepage(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsicmd(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int smpcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int smpreportgeneral(struct cam_device *device, int argc, char **argv, @@ -309,16 +322,21 @@ static int get_cpi(struct cam_device *de static int get_cgd(struct cam_device *device, struct ccb_getdev *cgd); static int get_print_cts(struct cam_device *device, int user_settings, int quiet, struct ccb_trans_settings *cts); -static int ratecontrol(struct cam_device *device, int retry_count, - int timeout, int argc, char **argv, char *combinedopt); +static int ratecontrol(struct cam_device *device, int task_attr, + int retry_count, int timeout, int argc, char **argv, + char *combinedopt); static int scsiformat(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsisanitize(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsireportluns(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsireadcapacity(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int atapm(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int atasecurity(struct cam_device *device, int retry_count, int timeout, @@ -331,8 +349,8 @@ static int scsiprintoneopcode(struct cam static int scsiprintopcodes(struct cam_device *device, int td_req, uint8_t *buf, uint32_t valid_len); static int scsiopcodes(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, - int verbose); + char *combinedopt, int task_attr, int retry_count, + int timeout, int verbose); static int scsireprobe(struct cam_device *device); #endif /* MINIMALISTIC */ @@ -650,8 +668,8 @@ getdevtree(int argc, char **argv, char * #ifndef MINIMALISTIC static int -testunitready(struct cam_device *device, int retry_count, int timeout, - int quiet) +testunitready(struct cam_device *device, int task_attr, int retry_count, + int timeout, int quiet) { int error = 0; union ccb *ccb; @@ -661,7 +679,7 @@ testunitready(struct cam_device *device, scsi_test_unit_ready(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* sense_len */ SSD_FULL_SIZE, /* timeout */ timeout ? timeout : 5000); @@ -705,7 +723,7 @@ testunitready(struct cam_device *device, static int scsistart(struct cam_device *device, int startstop, int loadeject, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { union ccb *ccb; int error = 0; @@ -716,13 +734,19 @@ scsistart(struct cam_device *device, int * If we're stopping, send an ordered tag so the drive in question * will finish any previously queued writes before stopping. If * the device isn't capable of tagged queueing, or if tagged - * queueing is turned off, the tag action is a no-op. - */ + * queueing is turned off, the tag action is a no-op. We override + * the default simple tag, although this also has the effect of + * overriding the user's wishes if he wanted to specify a simple + * tag. + */ + if ((startstop == 0) + && (task_attr == MSG_SIMPLE_Q_TAG)) + task_attr = MSG_ORDERED_Q_TAG; + scsi_start_stop(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ startstop ? MSG_SIMPLE_Q_TAG : - MSG_ORDERED_Q_TAG, + /* tag_action */ task_attr, /* start/stop */ startstop, /* load_eject */ loadeject, /* immediate */ 0, @@ -783,7 +807,7 @@ scsistart(struct cam_device *device, int int scsidoinquiry(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { int c; int error = 0; @@ -812,13 +836,13 @@ scsidoinquiry(struct cam_device *device, arglist |= CAM_ARG_INQ_MASK; if (arglist & CAM_ARG_GET_STDINQ) - error = scsiinquiry(device, retry_count, timeout); + error = scsiinquiry(device, task_attr, retry_count, timeout); if (error != 0) return(error); if (arglist & CAM_ARG_GET_SERIAL) - scsiserial(device, retry_count, timeout); + scsiserial(device, task_attr, retry_count, timeout); if (arglist & CAM_ARG_GET_XFERRATE) error = camxferrate(device); @@ -827,7 +851,8 @@ scsidoinquiry(struct cam_device *device, } static int -scsiinquiry(struct cam_device *device, int retry_count, int timeout) +scsiinquiry(struct cam_device *device, int task_attr, int retry_count, + int timeout) { union ccb *ccb; struct scsi_inquiry_data *inq_buf; @@ -889,7 +914,7 @@ scsiinquiry(struct cam_device *device, i scsi_inquiry(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* inq_buf */ (u_int8_t *)inq_buf, /* inq_len */ SHORT_INQUIRY_LENGTH, /* evpd */ 0, @@ -941,7 +966,8 @@ scsiinquiry(struct cam_device *device, i } static int -scsiserial(struct cam_device *device, int retry_count, int timeout) +scsiserial(struct cam_device *device, int task_attr, int retry_count, + int timeout) { union ccb *ccb; struct scsi_vpd_unit_serial_number *serial_buf; @@ -970,7 +996,7 @@ scsiserial(struct cam_device *device, in scsi_inquiry(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* inq_buf */ (u_int8_t *)serial_buf, /* inq_len */ sizeof(*serial_buf), /* evpd */ 1, @@ -3405,7 +3431,7 @@ static struct scsi_nv defect_list_type_m static int readdefects(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb = NULL; struct scsi_read_defect_data_hdr_10 *hdr10 = NULL; @@ -3547,7 +3573,7 @@ next_batch: scsi_read_defects(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*list_format*/ list_format, /*addr_desc_index*/ starting_offset, /*data_ptr*/ defect_list, @@ -3985,7 +4011,8 @@ reassignblocks(struct cam_device *device #ifndef MINIMALISTIC void mode_sense(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retry_count, int timeout, u_int8_t *data, int datalen) + int task_attr, int retry_count, int timeout, u_int8_t *data, + int datalen) { union ccb *ccb; int retval; @@ -4000,7 +4027,7 @@ mode_sense(struct cam_device *device, in scsi_mode_sense_subpage(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* dbd */ dbd, /* pc */ pc << 6, /* page */ page, @@ -4035,8 +4062,8 @@ mode_sense(struct cam_device *device, in } void -mode_select(struct cam_device *device, int save_pages, int retry_count, - int timeout, u_int8_t *data, int datalen) +mode_select(struct cam_device *device, int save_pages, int task_attr, + int retry_count, int timeout, u_int8_t *data, int datalen) { union ccb *ccb; int retval; @@ -4051,7 +4078,7 @@ mode_select(struct cam_device *device, i scsi_mode_select(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* scsi_page_fmt */ 1, /* save_pages */ save_pages, /* param_buf */ data, @@ -4086,7 +4113,7 @@ mode_select(struct cam_device *device, i void modepage(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { char *str_subpage; int c, page = -1, subpage = -1, pc = 0; @@ -4133,16 +4160,17 @@ modepage(struct cam_device *device, int errx(1, "you must specify a mode page!"); if (list != 0) { - mode_list(device, dbd, pc, list > 1, retry_count, timeout); + mode_list(device, dbd, pc, list > 1, task_attr, retry_count, + timeout); } else { mode_edit(device, dbd, pc, page, subpage, edit, binary, - retry_count, timeout); + task_attr, retry_count, timeout); } } static int scsicmd(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { union ccb *ccb; u_int32_t flags = CAM_DIR_NONE; @@ -4387,7 +4415,7 @@ scsicmd(struct cam_device *device, int a /*retries*/ retry_count, /*cbfcnp*/ NULL, /*flags*/ flags, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*data_ptr*/ data_ptr, /*dxfer_len*/ data_bytes, /*sense_len*/ SSD_FULL_SIZE, @@ -5498,8 +5526,8 @@ get_print_cts_bailout: } static int -ratecontrol(struct cam_device *device, int retry_count, int timeout, - int argc, char **argv, char *combinedopt) +ratecontrol(struct cam_device *device, int task_attr, int retry_count, + int timeout, int argc, char **argv, char *combinedopt) { int c; union ccb *ccb; @@ -5829,7 +5857,7 @@ ratecontrol(struct cam_device *device, i } } if (send_tur) { - retval = testunitready(device, retry_count, timeout, + retval = testunitready(device, task_attr, retry_count, timeout, (arglist & CAM_ARG_VERBOSE) ? 0 : 1); /* * If the TUR didn't succeed, just bail. @@ -5854,7 +5882,7 @@ ratecontrol_bailout: static int scsiformat(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; int c; @@ -5903,7 +5931,7 @@ scsiformat(struct cam_device *device, in "following device:\n"); error = scsidoinquiry(device, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); if (error != 0) { warnx("scsiformat: error sending inquiry"); @@ -5975,7 +6003,7 @@ scsiformat(struct cam_device *device, in scsi_format_unit(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* byte2 */ byte2, /* ileave */ 0, /* data_ptr */ data_ptr, @@ -6034,7 +6062,7 @@ doreport: scsi_test_unit_ready(&ccb->csio, /* retries */ 0, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 5000); @@ -6144,7 +6172,7 @@ scsiformat_bailout: static int scsisanitize(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; u_int8_t action = 0; @@ -6309,7 +6337,7 @@ scsisanitize(struct cam_device *device, "following device:\n"); error = scsidoinquiry(device, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); if (error != 0) { warnx("scsisanitize: error sending inquiry"); @@ -6367,7 +6395,7 @@ scsisanitize(struct cam_device *device, scsi_sanitize(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* byte2 */ byte2, /* control */ 0, /* data_ptr */ data_ptr, @@ -6442,7 +6470,7 @@ doreport: scsi_test_unit_ready(&ccb->csio, /* retries */ 0, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 5000); @@ -6554,7 +6582,7 @@ scsisanitize_bailout: static int scsireportluns(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; int c, countonly, lunsonly; @@ -6631,7 +6659,7 @@ retry: scsi_report_luns(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*select_report*/ report_type, /*rpl_buf*/ lundata, /*alloc_len*/ alloc_len, @@ -6796,7 +6824,7 @@ bailout: static int scsireadcapacity(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; int blocksizeonly, humanize, numblocks, quiet, sizeonly, baseten; @@ -6882,7 +6910,7 @@ scsireadcapacity(struct cam_device *devi scsi_read_capacity(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, &rcap, SSD_FULL_SIZE, /*timeout*/ timeout ? timeout : 5000); @@ -6924,7 +6952,7 @@ scsireadcapacity(struct cam_device *devi scsi_read_capacity_16(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*lba*/ 0, /*reladdr*/ 0, /*pmi*/ 0, @@ -8365,8 +8393,8 @@ ataaxm(struct cam_device *device, int ar int scsigetopcodes(struct cam_device *device, int opcode_set, int opcode, int show_sa_errors, int sa_set, int service_action, - int timeout_desc, int retry_count, int timeout, int verbosemode, - uint32_t *fill_len, uint8_t **data_ptr) + int timeout_desc, int task_attr, int retry_count, int timeout, + int verbosemode, uint32_t *fill_len, uint8_t **data_ptr) { union ccb *ccb = NULL; uint8_t *buf = NULL; @@ -8433,7 +8461,7 @@ retry_alloc: scsi_report_supported_opcodes(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*options*/ options, /*req_opcode*/ opcode, /*req_service_action*/ service_action, @@ -8733,7 +8761,8 @@ bailout: static int scsiopcodes(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, int verbosemode) + char *combinedopt, int task_attr, int retry_count, int timeout, + int verbosemode) { int c; uint32_t opcode = 0, service_action = 0; @@ -8797,8 +8826,9 @@ scsiopcodes(struct cam_device *device, i goto bailout; } retval = scsigetopcodes(device, opcode_set, opcode, show_sa_errors, - sa_set, service_action, td_set, retry_count, - timeout, verbosemode, &valid_len, &buf); + sa_set, service_action, td_set, task_attr, + retry_count, timeout, verbosemode, &valid_len, + &buf); if (retval != 0) goto bailout; @@ -8992,6 +9022,7 @@ usage(int printlong) "-u unit specify unit number, e.g. \"0\", \"5\"\n" "-E have the kernel attempt to perform SCSI error recovery\n" "-C count specify the SCSI command retry count (needs -E to work)\n" +"-Q task_attr specify ordered, simple or head tag type for SCSI cmds\n" "modepage arguments:\n" "-l list all available mode pages\n" "-m page specify the mode page to view or edit\n" @@ -9196,10 +9227,11 @@ main(int argc, char **argv) int timeout = 0, retry_count = 1; camcontrol_optret optreturn; char *tstr; - const char *mainopt = "C:En:t:u:v"; + const char *mainopt = "C:En:Q:t:u:v"; const char *subopt = NULL; char combinedopt[256]; int error = 0, optstart = 2; + int task_attr = MSG_SIMPLE_Q_TAG; int devopen = 1; #ifndef MINIMALISTIC path_id_t bus; @@ -9353,6 +9385,40 @@ main(int argc, char **argv) tstr++; device = (char *)strdup(tstr); break; + case 'Q': { + char *endptr; + int table_entry = 0; + + tstr = optarg; + while (isspace(*tstr) && (*tstr != '\0')) + tstr++; + if (isdigit(*tstr)) { + task_attr = strtol(tstr, &endptr, 0); + if (*endptr != '\0') { + errx(1, "Invalid queue option " + "%s", tstr); + } + } else { + size_t table_size; + scsi_nv_status status; + + table_size = sizeof(task_attrs) / + sizeof(task_attrs[0]); + status = scsi_get_nv(task_attrs, + table_size, tstr, &table_entry, + SCSI_NV_FLAG_IG_CASE); + if (status == SCSI_NV_FOUND) + task_attr = task_attrs[ + table_entry].value; + else { + errx(1, "%s option %s", + (status == SCSI_NV_AMBIGUOUS)? + "ambiguous" : "invalid", + tstr); + } + } + break; + } case 't': timeout = strtol(optarg, NULL, 0); if (timeout < 0) @@ -9418,19 +9484,20 @@ main(int argc, char **argv) break; #ifndef MINIMALISTIC case CAM_CMD_TUR: - error = testunitready(cam_dev, retry_count, timeout, 0); + error = testunitready(cam_dev, task_attr, retry_count, + timeout, 0); break; case CAM_CMD_INQUIRY: error = scsidoinquiry(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_IDENTIFY: error = ataidentify(cam_dev, retry_count, timeout); break; case CAM_CMD_STARTSTOP: error = scsistart(cam_dev, arglist & CAM_ARG_START_UNIT, - arglist & CAM_ARG_EJECT, retry_count, - timeout); + arglist & CAM_ARG_EJECT, task_attr, + retry_count, timeout); break; #endif /* MINIMALISTIC */ case CAM_CMD_RESCAN: @@ -9442,15 +9509,15 @@ main(int argc, char **argv) #ifndef MINIMALISTIC case CAM_CMD_READ_DEFECTS: error = readdefects(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_MODE_PAGE: modepage(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_SCSI_CMD: error = scsicmd(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_SMP_CMD: error = smpcmd(cam_dev, argc, argv, combinedopt, @@ -9480,22 +9547,23 @@ main(int argc, char **argv) error = tagcontrol(cam_dev, argc, argv, combinedopt); break; case CAM_CMD_RATE: - error = ratecontrol(cam_dev, retry_count, timeout, - argc, argv, combinedopt); + error = ratecontrol(cam_dev, task_attr, retry_count, + timeout, argc, argv, combinedopt); break; case CAM_CMD_FORMAT: error = scsiformat(cam_dev, argc, argv, - combinedopt, retry_count, timeout); + combinedopt, task_attr, retry_count, + timeout); break; case CAM_CMD_REPORTLUNS: error = scsireportluns(cam_dev, argc, argv, - combinedopt, retry_count, - timeout); + combinedopt, task_attr, + retry_count, timeout); break; case CAM_CMD_READCAP: error = scsireadcapacity(cam_dev, argc, argv, - combinedopt, retry_count, - timeout); + combinedopt, task_attr, + retry_count, timeout); break; case CAM_CMD_IDLE: case CAM_CMD_STANDBY: @@ -9514,32 +9582,38 @@ main(int argc, char **argv) break; case CAM_CMD_DOWNLOAD_FW: error = fwdownload(cam_dev, argc, argv, combinedopt, - arglist & CAM_ARG_VERBOSE, retry_count, timeout); + arglist & CAM_ARG_VERBOSE, task_attr, retry_count, + timeout); break; case CAM_CMD_SANITIZE: error = scsisanitize(cam_dev, argc, argv, - combinedopt, retry_count, timeout); + combinedopt, task_attr, + retry_count, timeout); break; case CAM_CMD_PERSIST: error = scsipersist(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE, arglist & CAM_ARG_ERR_RECOVER); break; case CAM_CMD_ATTRIB: error = scsiattrib(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE, arglist & CAM_ARG_ERR_RECOVER); break; case CAM_CMD_OPCODES: error = scsiopcodes(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE); + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE); break; case CAM_CMD_REPROBE: error = scsireprobe(cam_dev); break; case CAM_CMD_ZONE: error = zone(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE); + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE); break; case CAM_CMD_EPC: error = epc(cam_dev, argc, argv, combinedopt, @@ -9547,7 +9621,8 @@ main(int argc, char **argv) break; case CAM_CMD_TIMESTAMP: error = timestamp(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE); + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE); break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: Modified: stable/11/sbin/camcontrol/camcontrol.h ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.h Fri Feb 24 20:04:02 2017 (r314219) +++ stable/11/sbin/camcontrol/camcontrol.h Fri Feb 24 20:47:56 2017 (r314220) @@ -75,36 +75,39 @@ int get_ata_status(struct cam_device *de uint8_t *status); int camxferrate(struct cam_device *device); int fwdownload(struct cam_device *device, int argc, char **argv, - char *combinedopt, int printerrors, int retry_count, - int timeout); + char *combinedopt, int printerrors, int task_attr, + int retry_count, int timeout); int zone(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout, int verbosemode); + int task_attr, int retry_count, int timeout, int verbosemode); int epc(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout, int verbosemode); int timestamp(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, + char *combinedopt, int task_attr, int retry_count, int timeout, int verbosemode); void mode_sense(struct cam_device *device, int dbd, int pc, int page, - int subpage, int retry_count, int timeout, uint8_t *data, - int datalen); -void mode_select(struct cam_device *device, int save_pages, int retry_count, - int timeout, u_int8_t *data, int datalen); -void mode_edit(struct cam_device *device, int dbd, int pc, int page, int subpage, - int edit, int binary, int retry_count, int timeout); -void mode_list(struct cam_device *device, int dbd, int pc, int subpages, + int subpage, int task_attr, int retry_count, int timeout, + uint8_t *data, int datalen); +void mode_select(struct cam_device *device, int save_pages, int task_attr, + int retry_count, int timeout, u_int8_t *data, int datalen); +void mode_edit(struct cam_device *device, int dbd, int pc, int page, + int subpage, int edit, int binary, int task_attr, int retry_count, int timeout); +void mode_list(struct cam_device *device, int dbd, int pc, int subpages, + int task_attr, int retry_count, int timeout); int scsidoinquiry(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); int scsigetopcodes(struct cam_device *device, int opcode_set, int opcode, int show_sa_errors, int sa_set, int service_action, - int timeout_desc, int retry_count, int timeout, - int verbosemode, uint32_t *fill_len, uint8_t **data_ptr); + int timeout_desc, int task_attr, int retry_count, + int timeout, int verbosemode, uint32_t *fill_len, + uint8_t **data_ptr); int scsipersist(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, int verbose, - int err_recover); + char *combinedopt, int task_attr, int retry_count, + int timeout, int verbose, int err_recover); int scsiattrib(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, int verbose, - int err_recover); + char *combinedopt, int task_attr, int retry_count, int timeout, + int verbose, int err_recover); char *cget(void *hook, char *name); int iget(void *hook, char *name); void arg_put(void *hook, int letter, void *arg, int count, char *name); Modified: stable/11/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/11/sbin/camcontrol/fwdownload.c Fri Feb 24 20:04:02 2017 (r314219) +++ stable/11/sbin/camcontrol/fwdownload.c Fri Feb 24 20:47:56 2017 (r314220) @@ -263,7 +263,7 @@ static const struct fw_timeout_desc fw_t static struct fw_vendor *fw_get_vendor(struct cam_device *cam_dev, struct ata_params *ident_buf); static int fw_get_timeout(struct cam_device *cam_dev, struct fw_vendor *vp, - int retry_count, int timeout); + int task_attr, int retry_count, int timeout); static int fw_validate_ibm(struct cam_device *dev, int retry_count, int timeout, int fd, char *buf, const char *fw_img_path, int quiet); @@ -317,7 +317,7 @@ fw_get_vendor(struct cam_device *cam_dev static int fw_get_timeout(struct cam_device *cam_dev, struct fw_vendor *vp, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { struct scsi_report_supported_opcodes_one *one; struct scsi_report_supported_opcodes_timeout *td; @@ -349,6 +349,7 @@ fw_get_timeout(struct cam_device *cam_de /*sa_set*/ 0, /*service_action*/ 0, /*timeout_desc*/ 1, + /*task_attr*/ task_attr, /*retry_count*/ retry_count, /*timeout*/ 10000, /*verbose*/ 0, @@ -919,7 +920,8 @@ bailout: int fwdownload(struct cam_device *device, int argc, char **argv, - char *combinedopt, int printerrors, int retry_count, int timeout) + char *combinedopt, int printerrors, int task_attr, int retry_count, + int timeout) { struct fw_vendor *vp; char *fw_img_path = NULL; @@ -994,7 +996,7 @@ fwdownload(struct cam_device *device, in && (devtype == CC_DT_SCSI)) errx(1, "Unsupported device"); - retval = fw_get_timeout(device, vp, retry_count, timeout); + retval = fw_get_timeout(device, vp, task_attr, retry_count, timeout); if (retval != 0) { warnx("Unable to get a firmware download timeout value"); goto bailout; @@ -1012,8 +1014,8 @@ fwdownload(struct cam_device *device, in " into the following device:\n", fw_img_path); if (devtype == CC_DT_SCSI) { - if (scsidoinquiry(device, argc, argv, combinedopt, 0, - 5000) != 0) { + if (scsidoinquiry(device, argc, argv, combinedopt, + MSG_SIMPLE_Q_TAG, 0, 5000) != 0) { warnx("Error sending inquiry"); retval = 1; goto bailout; Modified: stable/11/sbin/camcontrol/modeedit.c ============================================================================== --- stable/11/sbin/camcontrol/modeedit.c Fri Feb 24 20:04:02 2017 (r314219) +++ stable/11/sbin/camcontrol/modeedit.c Fri Feb 24 20:47:56 2017 (r314220) @@ -106,10 +106,11 @@ static int editentry_set(char *name, c int editonly); static void editlist_populate(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retries, int timeout); + int task_attr, int retries, + int timeout); static void editlist_save(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retries, int timeout); + int task_attr, int retries, int timeout); static void nameentry_create(int page, int subpage, char *name); static struct pagename *nameentry_lookup(int page, int subpage); static int load_format(const char *pagedb_path, int lpage, @@ -118,8 +119,8 @@ static int modepage_write(FILE *file, static int modepage_read(FILE *file); static void modepage_edit(void); static void modepage_dump(struct cam_device *device, int dbd, - int pc, int page, int subpage, int retries, - int timeout); + int pc, int page, int subpage, int task_attr, + int retries, int timeout); static void cleanup_editfile(void); @@ -550,7 +551,7 @@ load_format(const char *pagedb_path, int static void editlist_populate(struct cam_device *device, int dbd, int pc, int page, - int subpage, int retries, int timeout) + int subpage, int task_attr, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ @@ -562,8 +563,8 @@ editlist_populate(struct cam_device *dev STAILQ_INIT(&editlist); /* Fetch changeable values; use to build initial editlist. */ - mode_sense(device, dbd, 1, page, subpage, retries, timeout, data, - sizeof(data)); + mode_sense(device, dbd, 1, page, subpage, task_attr, retries, timeout, + data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; mph = MODE_PAGE_HEADER(mh); @@ -581,14 +582,14 @@ editlist_populate(struct cam_device *dev buff_decode_visit(mode_pars, len, format, editentry_create, 0); /* Fetch the current/saved values; use to set editentry values. */ - mode_sense(device, dbd, pc, page, subpage, retries, timeout, + mode_sense(device, dbd, pc, page, subpage, task_attr, retries, timeout, data, sizeof(data)); buff_decode_visit(mode_pars, len, format, editentry_update, 0); } static void editlist_save(struct cam_device *device, int dbd, int pc, int page, - int subpage, int retries, int timeout) + int subpage, int task_attr, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ @@ -602,7 +603,7 @@ editlist_save(struct cam_device *device, return; /* Preload the CDB buffer with the current mode page data. */ - mode_sense(device, dbd, pc, page, subpage, retries, timeout, + mode_sense(device, dbd, pc, page, subpage, task_attr, retries, timeout, data, sizeof(data)); /* Initial headers & offsets. */ @@ -639,7 +640,8 @@ editlist_save(struct cam_device *device, * recorded. */ mode_select(device, (pc << PAGE_CTRL_SHIFT == SMS_PAGE_CTRL_SAVED), - retries, timeout, (u_int8_t *)mh, sizeof(*mh) + hlen + len); + task_attr, retries, timeout, (u_int8_t *)mh, + sizeof(*mh) + hlen + len); } static int @@ -809,7 +811,7 @@ modepage_edit(void) static void modepage_dump(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retries, int timeout) + int task_attr, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ @@ -818,7 +820,7 @@ modepage_dump(struct cam_device *device, struct scsi_mode_page_header_sp *mphsp; size_t indx, len; - mode_sense(device, dbd, pc, page, subpage, retries, timeout, + mode_sense(device, dbd, pc, page, subpage, task_attr, retries, timeout, data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; @@ -853,7 +855,7 @@ cleanup_editfile(void) void mode_edit(struct cam_device *device, int dbd, int pc, int page, int subpage, - int edit, int binary, int retry_count, int timeout) + int edit, int binary, int task_attr, int retry_count, int timeout) { const char *pagedb_path; /* Path to modepage database. */ @@ -884,8 +886,8 @@ mode_edit(struct cam_device *device, int exit(EX_OSFILE); } - editlist_populate(device, dbd, pc, page, subpage, retry_count, - timeout); + editlist_populate(device, dbd, pc, page, subpage, task_attr, + retry_count, timeout); } if (edit) { @@ -894,10 +896,12 @@ mode_edit(struct cam_device *device, int errx(EX_USAGE, "it only makes sense to edit page 0 " "(current) or page 3 (saved values)"); modepage_edit(); - editlist_save(device, dbd, pc, page, subpage, retry_count, timeout); + editlist_save(device, dbd, pc, page, subpage, task_attr, + retry_count, timeout); } else if (binary || STAILQ_EMPTY(&editlist)) { /* Display without formatting information. */ - modepage_dump(device, dbd, pc, page, subpage, retry_count, timeout); + modepage_dump(device, dbd, pc, page, subpage, task_attr, + retry_count, timeout); } else { /* Display with format. */ modepage_write(stdout, 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 24 20: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 561B1CEB27A; Fri, 24 Feb 2017 20:51:41 +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 1717DE07; Fri, 24 Feb 2017 20:51:41 +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 v1OKpegw051879; Fri, 24 Feb 2017 20:51:40 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OKpdcE051872; Fri, 24 Feb 2017 20:51:39 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201702242051.v1OKpdcE051872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 24 Feb 2017 20:51: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: r314221 - stable/10/sbin/camcontrol 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, 24 Feb 2017 20:51:41 -0000 Author: ken Date: Fri Feb 24 20:51:39 2017 New Revision: 314221 URL: https://svnweb.freebsd.org/changeset/base/314221 Log: MFC r313893 ------------------------------------------------------------------------ r313893 | ken | 2017-02-17 13:04:22 -0700 (Fri, 17 Feb 2017) | 48 lines Add task attribute support to camcontrol(8). Users can use the new generic argument, -Q task_attr, to specify a task attribute (simple, ordered, head of queue, aca) for the commands issued. The the default is simple, which works with all SCSI devices that support tagged queueing. This will mostly be useful for debugging target behavior in certain situations. You can try it out by compiling CTL with CTL_IO_DELAY turned on (in sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL LUNs: ctladm delay 0:0 -l done -t 10 camcontrol tur da34 -v And at then before the 10 second timer is up, in another terminal: camcontrol inquiry da34 -Q ordered -v The Inquiry should complete just after the TUR completes. Ordinarily it would complete first because of the delay injection, but because the task attribute is set to ordered in this case, CTL holds it up until the previous command has completed. sbin/camcontrol/camcontrol.c: Add the new generic argument, -Q, which allows the user to specify a SCSI task attribute. The user can specify task attributes by name or numerically. Add a new task_attr arguments to SCSI sub-functions. sbin/camcontrol/attrib.c, sbin/camcontrol/camcontrol.h, sbin/camcontrol/fwdownload.c, sbin/camcontrol/modeedit.c, sbin/camcontrol/persist.c, sbin/camcontrol/timestamp.c, sbin/camcontrol/zone.c: Add the new task_attr argument to SCSI sub-functions. sbin/camcontrol/camcontrol.8: Document the new -Q option, and add an example. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/10/sbin/camcontrol/attrib.c stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c stable/10/sbin/camcontrol/camcontrol.h stable/10/sbin/camcontrol/fwdownload.c stable/10/sbin/camcontrol/modeedit.c stable/10/sbin/camcontrol/persist.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/attrib.c ============================================================================== --- stable/10/sbin/camcontrol/attrib.c Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/attrib.c Fri Feb 24 20:51:39 2017 (r314221) @@ -106,7 +106,8 @@ static struct scsi_nv output_format_map[ int scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout, int verbosemode, int err_recover) + int task_attr, int retry_count, int timeout, int verbosemode, + int err_recover) { union ccb *ccb = NULL; int attr_num = -1; @@ -317,7 +318,7 @@ scsiattrib(struct cam_device *device, in scsi_read_attribute(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*service_action*/ read_service_action, /*element*/ element_address, /*elem_type*/ element_type, Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/camcontrol.8 Fri Feb 24 20:51:39 2017 (r314221) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2017 +.Dd February 17, 2017 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -397,6 +397,17 @@ It may take some other actions, dependin the command. .It Fl n Ar dev_name Specify the device type to operate on, e.g.\& "da", "cd". +.It Fl Q Ar task_attr +.Tn SCSI +task attribute for the command, if it is a +.Tn SCSI +command. +This may be ordered, simple, head, or aca. +In most cases this is not needed. +The default is simple, which works with all +.Tn SCSI +devices. +The task attribute may also be specified numerically. .It Fl t Ar timeout SCSI command timeout in seconds. This overrides the default timeout for @@ -2143,7 +2154,7 @@ information if the command fails since t .Fl v switch was not specified. .Bd -literal -offset indent -camcontrol tur da1 -E -C 4 -t 50 -v +camcontrol tur da1 -E -C 4 -t 50 -Q head -v .Ed .Pp Send a test unit ready command to da1. @@ -2156,6 +2167,9 @@ flag) if the command fails. Since error recovery is turned on, the disk will be spun up if it is not currently spinning. The +.Tn SCSI +task attribute for the command will be set to Head of Queue. +The .Nm utility will report whether the disk is ready. .Bd -literal -offset indent Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/camcontrol.c Fri Feb 24 20:51:39 2017 (r314221) @@ -168,6 +168,14 @@ struct ata_set_max_pwd u_int16_t reserved2[239]; }; +static struct scsi_nv task_attrs[] = { + { "simple", MSG_SIMPLE_Q_TAG }, + { "head", MSG_HEAD_OF_Q_TAG }, + { "ordered", MSG_ORDERED_Q_TAG }, + { "iwr", MSG_IGN_WIDE_RESIDUE }, + { "aca", MSG_ACA_TASK } +}; + static const char scsicmd_opts[] = "a:c:dfi:o:r"; static const char readdefect_opts[] = "f:GPqsS:X"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; @@ -259,12 +267,14 @@ static int getdevlist(struct cam_device #endif /* MINIMALISTIC */ static int getdevtree(int argc, char **argv, char *combinedopt); #ifndef MINIMALISTIC -static int testunitready(struct cam_device *device, int retry_count, - int timeout, int quiet); +static int testunitready(struct cam_device *device, int task_attr, + int retry_count, int timeout, int quiet); static int scsistart(struct cam_device *device, int startstop, int loadeject, - int retry_count, int timeout); -static int scsiinquiry(struct cam_device *device, int retry_count, int timeout); -static int scsiserial(struct cam_device *device, int retry_count, int timeout); + int task_attr, int retry_count, int timeout); +static int scsiinquiry(struct cam_device *device, int task_attr, + int retry_count, int timeout); +static int scsiserial(struct cam_device *device, int task_attr, + int retry_count, int timeout); #endif /* MINIMALISTIC */ static int parse_btl(char *tstr, path_id_t *bus, target_id_t *target, lun_id_t *lun, cam_argmask *arglst); @@ -274,11 +284,14 @@ static int scanlun_or_reset_dev(path_id_ lun_id_t lun, int scan); #ifndef MINIMALISTIC static int readdefects(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static void modepage(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsicmd(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int smpcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int smpreportgeneral(struct cam_device *device, int argc, char **argv, @@ -303,16 +316,21 @@ static int get_cpi(struct cam_device *de static int get_cgd(struct cam_device *device, struct ccb_getdev *cgd); static int get_print_cts(struct cam_device *device, int user_settings, int quiet, struct ccb_trans_settings *cts); -static int ratecontrol(struct cam_device *device, int retry_count, - int timeout, int argc, char **argv, char *combinedopt); +static int ratecontrol(struct cam_device *device, int task_attr, + int retry_count, int timeout, int argc, char **argv, + char *combinedopt); static int scsiformat(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsisanitize(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsireportluns(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int scsireadcapacity(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); static int atapm(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int atasecurity(struct cam_device *device, int retry_count, int timeout, @@ -325,8 +343,8 @@ static int scsiprintoneopcode(struct cam static int scsiprintopcodes(struct cam_device *device, int td_req, uint8_t *buf, uint32_t valid_len); static int scsiopcodes(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, - int verbose); + char *combinedopt, int task_attr, int retry_count, + int timeout, int verbose); static int scsireprobe(struct cam_device *device); #endif /* MINIMALISTIC */ @@ -644,8 +662,8 @@ getdevtree(int argc, char **argv, char * #ifndef MINIMALISTIC static int -testunitready(struct cam_device *device, int retry_count, int timeout, - int quiet) +testunitready(struct cam_device *device, int task_attr, int retry_count, + int timeout, int quiet) { int error = 0; union ccb *ccb; @@ -655,7 +673,7 @@ testunitready(struct cam_device *device, scsi_test_unit_ready(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* sense_len */ SSD_FULL_SIZE, /* timeout */ timeout ? timeout : 5000); @@ -699,7 +717,7 @@ testunitready(struct cam_device *device, static int scsistart(struct cam_device *device, int startstop, int loadeject, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { union ccb *ccb; int error = 0; @@ -710,13 +728,19 @@ scsistart(struct cam_device *device, int * If we're stopping, send an ordered tag so the drive in question * will finish any previously queued writes before stopping. If * the device isn't capable of tagged queueing, or if tagged - * queueing is turned off, the tag action is a no-op. - */ + * queueing is turned off, the tag action is a no-op. We override + * the default simple tag, although this also has the effect of + * overriding the user's wishes if he wanted to specify a simple + * tag. + */ + if ((startstop == 0) + && (task_attr == MSG_SIMPLE_Q_TAG)) + task_attr = MSG_ORDERED_Q_TAG; + scsi_start_stop(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ startstop ? MSG_SIMPLE_Q_TAG : - MSG_ORDERED_Q_TAG, + /* tag_action */ task_attr, /* start/stop */ startstop, /* load_eject */ loadeject, /* immediate */ 0, @@ -777,7 +801,7 @@ scsistart(struct cam_device *device, int int scsidoinquiry(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { int c; int error = 0; @@ -806,13 +830,13 @@ scsidoinquiry(struct cam_device *device, arglist |= CAM_ARG_INQ_MASK; if (arglist & CAM_ARG_GET_STDINQ) - error = scsiinquiry(device, retry_count, timeout); + error = scsiinquiry(device, task_attr, retry_count, timeout); if (error != 0) return(error); if (arglist & CAM_ARG_GET_SERIAL) - scsiserial(device, retry_count, timeout); + scsiserial(device, task_attr, retry_count, timeout); if (arglist & CAM_ARG_GET_XFERRATE) error = camxferrate(device); @@ -821,7 +845,8 @@ scsidoinquiry(struct cam_device *device, } static int -scsiinquiry(struct cam_device *device, int retry_count, int timeout) +scsiinquiry(struct cam_device *device, int task_attr, int retry_count, + int timeout) { union ccb *ccb; struct scsi_inquiry_data *inq_buf; @@ -883,7 +908,7 @@ scsiinquiry(struct cam_device *device, i scsi_inquiry(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* inq_buf */ (u_int8_t *)inq_buf, /* inq_len */ SHORT_INQUIRY_LENGTH, /* evpd */ 0, @@ -935,7 +960,8 @@ scsiinquiry(struct cam_device *device, i } static int -scsiserial(struct cam_device *device, int retry_count, int timeout) +scsiserial(struct cam_device *device, int task_attr, int retry_count, + int timeout) { union ccb *ccb; struct scsi_vpd_unit_serial_number *serial_buf; @@ -964,7 +990,7 @@ scsiserial(struct cam_device *device, in scsi_inquiry(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* inq_buf */ (u_int8_t *)serial_buf, /* inq_len */ sizeof(*serial_buf), /* evpd */ 1, @@ -3400,7 +3426,7 @@ static struct scsi_nv defect_list_type_m static int readdefects(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb = NULL; struct scsi_read_defect_data_hdr_10 *hdr10 = NULL; @@ -3542,7 +3568,7 @@ next_batch: scsi_read_defects(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*list_format*/ list_format, /*addr_desc_index*/ starting_offset, /*data_ptr*/ defect_list, @@ -3980,7 +4006,8 @@ reassignblocks(struct cam_device *device #ifndef MINIMALISTIC void mode_sense(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retry_count, int timeout, u_int8_t *data, int datalen) + int task_attr, int retry_count, int timeout, u_int8_t *data, + int datalen) { union ccb *ccb; int retval; @@ -3995,7 +4022,7 @@ mode_sense(struct cam_device *device, in scsi_mode_sense_subpage(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* dbd */ dbd, /* pc */ pc << 6, /* page */ page, @@ -4030,8 +4057,8 @@ mode_sense(struct cam_device *device, in } void -mode_select(struct cam_device *device, int save_pages, int retry_count, - int timeout, u_int8_t *data, int datalen) +mode_select(struct cam_device *device, int save_pages, int task_attr, + int retry_count, int timeout, u_int8_t *data, int datalen) { union ccb *ccb; int retval; @@ -4046,7 +4073,7 @@ mode_select(struct cam_device *device, i scsi_mode_select(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* scsi_page_fmt */ 1, /* save_pages */ save_pages, /* param_buf */ data, @@ -4081,7 +4108,7 @@ mode_select(struct cam_device *device, i void modepage(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { char *str_subpage; int c, page = -1, subpage = -1, pc = 0; @@ -4128,16 +4155,17 @@ modepage(struct cam_device *device, int errx(1, "you must specify a mode page!"); if (list != 0) { - mode_list(device, dbd, pc, list > 1, retry_count, timeout); + mode_list(device, dbd, pc, list > 1, task_attr, retry_count, + timeout); } else { mode_edit(device, dbd, pc, page, subpage, edit, binary, - retry_count, timeout); + task_attr, retry_count, timeout); } } static int scsicmd(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { union ccb *ccb; u_int32_t flags = CAM_DIR_NONE; @@ -4382,7 +4410,7 @@ scsicmd(struct cam_device *device, int a /*retries*/ retry_count, /*cbfcnp*/ NULL, /*flags*/ flags, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*data_ptr*/ data_ptr, /*dxfer_len*/ data_bytes, /*sense_len*/ SSD_FULL_SIZE, @@ -5333,8 +5361,8 @@ get_print_cts_bailout: } static int -ratecontrol(struct cam_device *device, int retry_count, int timeout, - int argc, char **argv, char *combinedopt) +ratecontrol(struct cam_device *device, int task_attr, int retry_count, + int timeout, int argc, char **argv, char *combinedopt) { int c; union ccb *ccb; @@ -5664,7 +5692,7 @@ ratecontrol(struct cam_device *device, i } } if (send_tur) { - retval = testunitready(device, retry_count, timeout, + retval = testunitready(device, task_attr, retry_count, timeout, (arglist & CAM_ARG_VERBOSE) ? 0 : 1); /* * If the TUR didn't succeed, just bail. @@ -5689,7 +5717,7 @@ ratecontrol_bailout: static int scsiformat(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; int c; @@ -5738,7 +5766,7 @@ scsiformat(struct cam_device *device, in "following device:\n"); error = scsidoinquiry(device, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); if (error != 0) { warnx("scsiformat: error sending inquiry"); @@ -5810,7 +5838,7 @@ scsiformat(struct cam_device *device, in scsi_format_unit(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* byte2 */ byte2, /* ileave */ 0, /* data_ptr */ data_ptr, @@ -5869,7 +5897,7 @@ doreport: scsi_test_unit_ready(&ccb->csio, /* retries */ 0, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 5000); @@ -5979,7 +6007,7 @@ scsiformat_bailout: static int scsisanitize(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; u_int8_t action = 0; @@ -6144,7 +6172,7 @@ scsisanitize(struct cam_device *device, "following device:\n"); error = scsidoinquiry(device, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); if (error != 0) { warnx("scsisanitize: error sending inquiry"); @@ -6202,7 +6230,7 @@ scsisanitize(struct cam_device *device, scsi_sanitize(&ccb->csio, /* retries */ retry_count, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* byte2 */ byte2, /* control */ 0, /* data_ptr */ data_ptr, @@ -6277,7 +6305,7 @@ doreport: scsi_test_unit_ready(&ccb->csio, /* retries */ 0, /* cbfcnp */ NULL, - /* tag_action */ MSG_SIMPLE_Q_TAG, + /* tag_action */ task_attr, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 5000); @@ -6389,7 +6417,7 @@ scsisanitize_bailout: static int scsireportluns(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; int c, countonly, lunsonly; @@ -6466,7 +6494,7 @@ retry: scsi_report_luns(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*select_report*/ report_type, /*rpl_buf*/ lundata, /*alloc_len*/ alloc_len, @@ -6631,7 +6659,7 @@ bailout: static int scsireadcapacity(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout) + char *combinedopt, int task_attr, int retry_count, int timeout) { union ccb *ccb; int blocksizeonly, humanize, numblocks, quiet, sizeonly, baseten; @@ -6717,7 +6745,7 @@ scsireadcapacity(struct cam_device *devi scsi_read_capacity(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, &rcap, SSD_FULL_SIZE, /*timeout*/ timeout ? timeout : 5000); @@ -6759,7 +6787,7 @@ scsireadcapacity(struct cam_device *devi scsi_read_capacity_16(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*lba*/ 0, /*reladdr*/ 0, /*pmi*/ 0, @@ -8200,8 +8228,8 @@ ataaxm(struct cam_device *device, int ar int scsigetopcodes(struct cam_device *device, int opcode_set, int opcode, int show_sa_errors, int sa_set, int service_action, - int timeout_desc, int retry_count, int timeout, int verbosemode, - uint32_t *fill_len, uint8_t **data_ptr) + int timeout_desc, int task_attr, int retry_count, int timeout, + int verbosemode, uint32_t *fill_len, uint8_t **data_ptr) { union ccb *ccb = NULL; uint8_t *buf = NULL; @@ -8268,7 +8296,7 @@ retry_alloc: scsi_report_supported_opcodes(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, - /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*tag_action*/ task_attr, /*options*/ options, /*req_opcode*/ opcode, /*req_service_action*/ service_action, @@ -8568,7 +8596,8 @@ bailout: static int scsiopcodes(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, int verbosemode) + char *combinedopt, int task_attr, int retry_count, int timeout, + int verbosemode) { int c; uint32_t opcode = 0, service_action = 0; @@ -8632,8 +8661,9 @@ scsiopcodes(struct cam_device *device, i goto bailout; } retval = scsigetopcodes(device, opcode_set, opcode, show_sa_errors, - sa_set, service_action, td_set, retry_count, - timeout, verbosemode, &valid_len, &buf); + sa_set, service_action, td_set, task_attr, + retry_count, timeout, verbosemode, &valid_len, + &buf); if (retval != 0) goto bailout; @@ -8816,6 +8846,7 @@ usage(int printlong) "-u unit specify unit number, e.g. \"0\", \"5\"\n" "-E have the kernel attempt to perform SCSI error recovery\n" "-C count specify the SCSI command retry count (needs -E to work)\n" +"-Q task_attr specify ordered, simple or head tag type for SCSI cmds\n" "modepage arguments:\n" "-l list all available mode pages\n" "-m page specify the mode page to view or edit\n" @@ -8988,10 +9019,11 @@ main(int argc, char **argv) int timeout = 0, retry_count = 1; camcontrol_optret optreturn; char *tstr; - const char *mainopt = "C:En:t:u:v"; + const char *mainopt = "C:En:Q:t:u:v"; const char *subopt = NULL; char combinedopt[256]; int error = 0, optstart = 2; + int task_attr = MSG_SIMPLE_Q_TAG; int devopen = 1; #ifndef MINIMALISTIC path_id_t bus; @@ -9145,6 +9177,40 @@ main(int argc, char **argv) tstr++; device = (char *)strdup(tstr); break; + case 'Q': { + char *endptr; + int table_entry = 0; + + tstr = optarg; + while (isspace(*tstr) && (*tstr != '\0')) + tstr++; + if (isdigit(*tstr)) { + task_attr = strtol(tstr, &endptr, 0); + if (*endptr != '\0') { + errx(1, "Invalid queue option " + "%s", tstr); + } + } else { + size_t table_size; + scsi_nv_status status; + + table_size = sizeof(task_attrs) / + sizeof(task_attrs[0]); + status = scsi_get_nv(task_attrs, + table_size, tstr, &table_entry, + SCSI_NV_FLAG_IG_CASE); + if (status == SCSI_NV_FOUND) + task_attr = task_attrs[ + table_entry].value; + else { + errx(1, "%s option %s", + (status == SCSI_NV_AMBIGUOUS)? + "ambiguous" : "invalid", + tstr); + } + } + break; + } case 't': timeout = strtol(optarg, NULL, 0); if (timeout < 0) @@ -9210,19 +9276,20 @@ main(int argc, char **argv) break; #ifndef MINIMALISTIC case CAM_CMD_TUR: - error = testunitready(cam_dev, retry_count, timeout, 0); + error = testunitready(cam_dev, task_attr, retry_count, + timeout, 0); break; case CAM_CMD_INQUIRY: error = scsidoinquiry(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_IDENTIFY: error = ataidentify(cam_dev, retry_count, timeout); break; case CAM_CMD_STARTSTOP: error = scsistart(cam_dev, arglist & CAM_ARG_START_UNIT, - arglist & CAM_ARG_EJECT, retry_count, - timeout); + arglist & CAM_ARG_EJECT, task_attr, + retry_count, timeout); break; #endif /* MINIMALISTIC */ case CAM_CMD_RESCAN: @@ -9234,15 +9301,15 @@ main(int argc, char **argv) #ifndef MINIMALISTIC case CAM_CMD_READ_DEFECTS: error = readdefects(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_MODE_PAGE: modepage(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_SCSI_CMD: error = scsicmd(cam_dev, argc, argv, combinedopt, - retry_count, timeout); + task_attr, retry_count, timeout); break; case CAM_CMD_SMP_CMD: error = smpcmd(cam_dev, argc, argv, combinedopt, @@ -9272,22 +9339,23 @@ main(int argc, char **argv) error = tagcontrol(cam_dev, argc, argv, combinedopt); break; case CAM_CMD_RATE: - error = ratecontrol(cam_dev, retry_count, timeout, - argc, argv, combinedopt); + error = ratecontrol(cam_dev, task_attr, retry_count, + timeout, argc, argv, combinedopt); break; case CAM_CMD_FORMAT: error = scsiformat(cam_dev, argc, argv, - combinedopt, retry_count, timeout); + combinedopt, task_attr, retry_count, + timeout); break; case CAM_CMD_REPORTLUNS: error = scsireportluns(cam_dev, argc, argv, - combinedopt, retry_count, - timeout); + combinedopt, task_attr, + retry_count, timeout); break; case CAM_CMD_READCAP: error = scsireadcapacity(cam_dev, argc, argv, - combinedopt, retry_count, - timeout); + combinedopt, task_attr, + retry_count, timeout); break; case CAM_CMD_IDLE: case CAM_CMD_STANDBY: @@ -9306,25 +9374,30 @@ main(int argc, char **argv) break; case CAM_CMD_DOWNLOAD_FW: error = fwdownload(cam_dev, argc, argv, combinedopt, - arglist & CAM_ARG_VERBOSE, retry_count, timeout); + arglist & CAM_ARG_VERBOSE, task_attr, retry_count, + timeout); break; case CAM_CMD_SANITIZE: error = scsisanitize(cam_dev, argc, argv, - combinedopt, retry_count, timeout); + combinedopt, task_attr, + retry_count, timeout); break; case CAM_CMD_PERSIST: error = scsipersist(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE, arglist & CAM_ARG_ERR_RECOVER); break; case CAM_CMD_ATTRIB: error = scsiattrib(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE, arglist & CAM_ARG_ERR_RECOVER); break; case CAM_CMD_OPCODES: error = scsiopcodes(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE); + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE); break; case CAM_CMD_REPROBE: error = scsireprobe(cam_dev); Modified: stable/10/sbin/camcontrol/camcontrol.h ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.h Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/camcontrol.h Fri Feb 24 20:51:39 2017 (r314221) @@ -71,29 +71,32 @@ void build_ata_cmd(union ccb *ccb, uint3 camcontrol_devtype devtype); int camxferrate(struct cam_device *device); int fwdownload(struct cam_device *device, int argc, char **argv, - char *combinedopt, int printerrors, int retry_count, - int timeout); + char *combinedopt, int printerrors, int task_attr, + int retry_count, int timeout); void mode_sense(struct cam_device *device, int dbd, int pc, int page, - int subpage, int retry_count, int timeout, uint8_t *data, - int datalen); -void mode_select(struct cam_device *device, int save_pages, int retry_count, - int timeout, u_int8_t *data, int datalen); -void mode_edit(struct cam_device *device, int dbd, int pc, int page, int subpage, - int edit, int binary, int retry_count, int timeout); -void mode_list(struct cam_device *device, int dbd, int pc, int subpages, + int subpage, int task_attr, int retry_count, int timeout, + uint8_t *data, int datalen); +void mode_select(struct cam_device *device, int save_pages, int task_attr, + int retry_count, int timeout, u_int8_t *data, int datalen); +void mode_edit(struct cam_device *device, int dbd, int pc, int page, + int subpage, int edit, int binary, int task_attr, int retry_count, int timeout); +void mode_list(struct cam_device *device, int dbd, int pc, int subpages, + int task_attr, int retry_count, int timeout); int scsidoinquiry(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int task_attr, int retry_count, + int timeout); int scsigetopcodes(struct cam_device *device, int opcode_set, int opcode, int show_sa_errors, int sa_set, int service_action, - int timeout_desc, int retry_count, int timeout, - int verbosemode, uint32_t *fill_len, uint8_t **data_ptr); + int timeout_desc, int task_attr, int retry_count, + int timeout, int verbosemode, uint32_t *fill_len, + uint8_t **data_ptr); int scsipersist(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, int verbose, - int err_recover); + char *combinedopt, int task_attr, int retry_count, + int timeout, int verbose, int err_recover); int scsiattrib(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout, int verbose, - int err_recover); + char *combinedopt, int task_attr, int retry_count, int timeout, + int verbose, int err_recover); char *cget(void *hook, char *name); int iget(void *hook, char *name); void arg_put(void *hook, int letter, void *arg, int count, char *name); Modified: stable/10/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/10/sbin/camcontrol/fwdownload.c Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/fwdownload.c Fri Feb 24 20:51:39 2017 (r314221) @@ -263,7 +263,7 @@ static const struct fw_timeout_desc fw_t static struct fw_vendor *fw_get_vendor(struct cam_device *cam_dev, struct ata_params *ident_buf); static int fw_get_timeout(struct cam_device *cam_dev, struct fw_vendor *vp, - int retry_count, int timeout); + int task_attr, int retry_count, int timeout); static int fw_validate_ibm(struct cam_device *dev, int retry_count, int timeout, int fd, char *buf, const char *fw_img_path, int quiet); @@ -317,7 +317,7 @@ fw_get_vendor(struct cam_device *cam_dev static int fw_get_timeout(struct cam_device *cam_dev, struct fw_vendor *vp, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { struct scsi_report_supported_opcodes_one *one; struct scsi_report_supported_opcodes_timeout *td; @@ -349,6 +349,7 @@ fw_get_timeout(struct cam_device *cam_de /*sa_set*/ 0, /*service_action*/ 0, /*timeout_desc*/ 1, + /*task_attr*/ task_attr, /*retry_count*/ retry_count, /*timeout*/ 10000, /*verbose*/ 0, @@ -901,7 +902,8 @@ bailout: int fwdownload(struct cam_device *device, int argc, char **argv, - char *combinedopt, int printerrors, int retry_count, int timeout) + char *combinedopt, int printerrors, int task_attr, int retry_count, + int timeout) { struct fw_vendor *vp; char *fw_img_path = NULL; @@ -976,7 +978,7 @@ fwdownload(struct cam_device *device, in && (devtype == CC_DT_SCSI)) errx(1, "Unsupported device"); - retval = fw_get_timeout(device, vp, retry_count, timeout); + retval = fw_get_timeout(device, vp, task_attr, retry_count, timeout); if (retval != 0) { warnx("Unable to get a firmware download timeout value"); goto bailout; @@ -994,8 +996,8 @@ fwdownload(struct cam_device *device, in " into the following device:\n", fw_img_path); if (devtype == CC_DT_SCSI) { - if (scsidoinquiry(device, argc, argv, combinedopt, 0, - 5000) != 0) { + if (scsidoinquiry(device, argc, argv, combinedopt, + MSG_SIMPLE_Q_TAG, 0, 5000) != 0) { warnx("Error sending inquiry"); retval = 1; goto bailout; Modified: stable/10/sbin/camcontrol/modeedit.c ============================================================================== --- stable/10/sbin/camcontrol/modeedit.c Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/modeedit.c Fri Feb 24 20:51:39 2017 (r314221) @@ -106,10 +106,11 @@ static int editentry_set(char *name, c int editonly); static void editlist_populate(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retries, int timeout); + int task_attr, int retries, + int timeout); static void editlist_save(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retries, int timeout); + int task_attr, int retries, int timeout); static void nameentry_create(int page, int subpage, char *name); static struct pagename *nameentry_lookup(int page, int subpage); static int load_format(const char *pagedb_path, int lpage, @@ -118,8 +119,8 @@ static int modepage_write(FILE *file, static int modepage_read(FILE *file); static void modepage_edit(void); static void modepage_dump(struct cam_device *device, int dbd, - int pc, int page, int subpage, int retries, - int timeout); + int pc, int page, int subpage, int task_attr, + int retries, int timeout); static void cleanup_editfile(void); @@ -550,7 +551,7 @@ load_format(const char *pagedb_path, int static void editlist_populate(struct cam_device *device, int dbd, int pc, int page, - int subpage, int retries, int timeout) + int subpage, int task_attr, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ @@ -562,8 +563,8 @@ editlist_populate(struct cam_device *dev STAILQ_INIT(&editlist); /* Fetch changeable values; use to build initial editlist. */ - mode_sense(device, dbd, 1, page, subpage, retries, timeout, data, - sizeof(data)); + mode_sense(device, dbd, 1, page, subpage, task_attr, retries, timeout, + data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; mph = MODE_PAGE_HEADER(mh); @@ -581,14 +582,14 @@ editlist_populate(struct cam_device *dev buff_decode_visit(mode_pars, len, format, editentry_create, 0); /* Fetch the current/saved values; use to set editentry values. */ - mode_sense(device, dbd, pc, page, subpage, retries, timeout, + mode_sense(device, dbd, pc, page, subpage, task_attr, retries, timeout, data, sizeof(data)); buff_decode_visit(mode_pars, len, format, editentry_update, 0); } static void editlist_save(struct cam_device *device, int dbd, int pc, int page, - int subpage, int retries, int timeout) + int subpage, int task_attr, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ @@ -602,7 +603,7 @@ editlist_save(struct cam_device *device, return; /* Preload the CDB buffer with the current mode page data. */ - mode_sense(device, dbd, pc, page, subpage, retries, timeout, + mode_sense(device, dbd, pc, page, subpage, task_attr, retries, timeout, data, sizeof(data)); /* Initial headers & offsets. */ @@ -639,7 +640,8 @@ editlist_save(struct cam_device *device, * recorded. */ mode_select(device, (pc << PAGE_CTRL_SHIFT == SMS_PAGE_CTRL_SAVED), - retries, timeout, (u_int8_t *)mh, sizeof(*mh) + hlen + len); + task_attr, retries, timeout, (u_int8_t *)mh, + sizeof(*mh) + hlen + len); } static int @@ -809,7 +811,7 @@ modepage_edit(void) static void modepage_dump(struct cam_device *device, int dbd, int pc, int page, int subpage, - int retries, int timeout) + int task_attr, int retries, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ u_int8_t *mode_pars; /* Pointer to modepage params. */ @@ -818,7 +820,7 @@ modepage_dump(struct cam_device *device, struct scsi_mode_page_header_sp *mphsp; size_t indx, len; - mode_sense(device, dbd, pc, page, subpage, retries, timeout, + mode_sense(device, dbd, pc, page, subpage, task_attr, retries, timeout, data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; @@ -853,7 +855,7 @@ cleanup_editfile(void) void mode_edit(struct cam_device *device, int dbd, int pc, int page, int subpage, - int edit, int binary, int retry_count, int timeout) + int edit, int binary, int task_attr, int retry_count, int timeout) { const char *pagedb_path; /* Path to modepage database. */ @@ -884,8 +886,8 @@ mode_edit(struct cam_device *device, int exit(EX_OSFILE); } - editlist_populate(device, dbd, pc, page, subpage, retry_count, - timeout); + editlist_populate(device, dbd, pc, page, subpage, task_attr, + retry_count, timeout); } if (edit) { @@ -894,10 +896,12 @@ mode_edit(struct cam_device *device, int errx(EX_USAGE, "it only makes sense to edit page 0 " "(current) or page 3 (saved values)"); modepage_edit(); - editlist_save(device, dbd, pc, page, subpage, retry_count, timeout); + editlist_save(device, dbd, pc, page, subpage, task_attr, + retry_count, timeout); } else if (binary || STAILQ_EMPTY(&editlist)) { /* Display without formatting information. */ - modepage_dump(device, dbd, pc, page, subpage, retry_count, timeout); + modepage_dump(device, dbd, pc, page, subpage, task_attr, + retry_count, timeout); } else { /* Display with format. */ modepage_write(stdout, 0); @@ -906,7 +910,7 @@ mode_edit(struct cam_device *device, int void mode_list(struct cam_device *device, int dbd, int pc, int subpages, - int retry_count, int timeout) + int task_attr, int retry_count, int timeout) { u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */ struct scsi_mode_header_6 *mh; /* Location of mode header. */ @@ -927,7 +931,7 @@ mode_list(struct cam_device *device, int /* Build the list of all mode pages by querying the "all pages" page. */ mode_sense(device, dbd, pc, SMS_ALL_PAGES_PAGE, subpages ? SMS_SUBPAGE_ALL : 0, - retry_count, timeout, data, sizeof(data)); + task_attr, retry_count, timeout, data, sizeof(data)); mh = (struct scsi_mode_header_6 *)data; len = sizeof(*mh) + mh->blk_desc_len; /* Skip block descriptors. */ Modified: stable/10/sbin/camcontrol/persist.c ============================================================================== --- stable/10/sbin/camcontrol/persist.c Fri Feb 24 20:47:56 2017 (r314220) +++ stable/10/sbin/camcontrol/persist.c Fri Feb 24 20:51:39 2017 (r314221) @@ -423,7 +423,8 @@ persist_print_full(struct scsi_per_res_i int scsipersist(struct cam_device *device, int argc, char **argv, char *combinedopt, - int retry_count, int timeout, int verbosemode, int err_recover) + int task_attr, int retry_count, int timeout, int verbosemode, + int err_recover) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 24 20: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 7B108CEB432; Fri, 24 Feb 2017 20:58:21 +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 43A5E11E9; Fri, 24 Feb 2017 20:58:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id z128so4314109pgb.3; Fri, 24 Feb 2017 12:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ON9B+YLD13Mfddp2AuuLrjrRDBge0TUD2Wj9gl0hpzw=; b=dCQsyXQVG7NLwBK8CFkJfk0OuKHng+URC+pLXlzF6mFioT1qKMigFPawstCXCN48H5 C+9/D04+Oqaae94HF4ADPqQpYd/w+6QY0YazGbmher4PD3leAXpcmec4VjufTa0yByiO ohDWpnQ39i+qSijjUVrhP8/l6OGkbfU+StIRn3kGq+qhKRkfhGS6rNR8K4DQwvwQahA/ aZHq/S0P0ae3oD7V69/S6K8QVETC3n467GJO4YNmo6P5/eF04uOKK/lCxgU5vbNZeijN xN95lYXIU5P4Z9Yysf74YxcHxg40Y91HJpArHNHeOfTSDMVkdbhprhCaeiuDo5O1/QSL dAyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ON9B+YLD13Mfddp2AuuLrjrRDBge0TUD2Wj9gl0hpzw=; b=tHTppwS1zxSVIdFCyiFfcI/VfCE5Yp8DShiQ4ver3sg3/HIzQNaWdmWOUzw27NsaUp 1BVngNNdwLp/6o3jdwFwQGuM+cB3aCMi9FLbVmmWQbVDBIlNrtQ50RkYeSPSW58Bwtcm IgyMOqEwTpBuQSf2fRmioKLNVkcFNFVEzeOD055xnJviMzjY/o117JHBZMNORL22XDqD pP/5E2kvEOCGViIqNclpVTfJbcSqM5skWrxyG9otbEIDakdLFmBLgCwRr825VAaI4FMt RFcSAy9xocQXXswlivYm9U7uPedINPPKJHCiP2KcuZNvpexls+1Frphd9bZWmENdakor HH2w== X-Gm-Message-State: AMke39lYzF1jCNK7ngB/7SK7Oi9tLIJ7qBIGhID3l9DrmtOzktsQW3ZPd9Z8Ne2eGTuwAA== X-Received: by 10.84.232.5 with SMTP id h5mr6631435plk.134.1487969900660; Fri, 24 Feb 2017 12:58:20 -0800 (PST) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y184sm16689669pfg.86.2017.02.24.12.58.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Feb 2017 12:58:19 -0800 (PST) From: "Ngie Cooper (yaneurabeya)" Message-Id: <067FDB11-2808-4F27-AAEA-5595207749D4@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_B7987210-E34E-483A-8533-89AE065E84B4"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern Date: Fri, 24 Feb 2017 12:58:19 -0800 In-Reply-To: <20170224144329.GA13444@FreeBSD.org> Cc: Eric van Gyzen , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" To: Alexey Dokuchaev References: <201702231936.v1NJadRa029404@repo.freebsd.org> <31cd29ad-6c34-f3d0-b71c-04857b013d02@FreeBSD.org> <20170224144329.GA13444@FreeBSD.org> X-Mailer: Apple Mail (2.3259) 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, 24 Feb 2017 20:58:21 -0000 --Apple-Mail=_B7987210-E34E-483A-8533-89AE065E84B4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 24, 2017, at 6:43 AM, Alexey Dokuchaev = wrote: >=20 > On Fri, Feb 24, 2017 at 08:22:21AM -0600, Eric van Gyzen wrote: >> By the way, have you considered adding a Herald rule on Phabricator? >> Phab is not perfect, but a lot of folks use it, and the Herald rules >> are a very effective way to watch them play in one's area. >=20 > +1, we need more Herald rules to make Phabricator more efficient. Of > course there are #manpages or #network groups, but often it is a bit > hard to come up with whom you'd want to place on the review list (like > if MAINTAINERS does not mention who's responsible and/or willing to > review the code you touch, and obviously you don't want to annoy some > random people just because you think they are technically qualified > enough or have required domain knowledge). Sending "Hey check this = out > guys, Dxxxx" emails on e.g. -hackers@ is not a good option either (as > it would annoy even more people). Yes, I have been looking into Herald(/MAINTAINERS integration): = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217316 = . I=E2=80=99v= e put up a series of rules for contrib/netbsd-tests and *.test.mk, so = I=E2=80=99ll at least be pinged when changes are made to these areas. Thanks, -Ngie --Apple-Mail=_B7987210-E34E-483A-8533-89AE065E84B4 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYsJ5tAAoJEPWDqSZpMIYVMzoP/0tuECQ+7ot4hFqEprcQ2A1B kdF/9qQxXAkaVxBDOzRqhyO1ltMZBJ7rpg0SKMq/RdCYcJRuFtZ1WZMwHSlM+C29 iR422TlB9YXbnNQIaB64W9/lcjyRo7lQvAPOspntopAazVSEgAokzRZR8l1caJaA S+fDW6cofFrITOqVSjWXhIHPhSmCgEjKSeH54wiGEuzJmn6ptBa/pBhcu8+2bAZq 3ZCyogq1A1VGSYIwEPdMZ4JYc1fgk2i604en2HRJI6k4fNityXqxQ2cnHZkoqRmF 5caCq/tnKDNb4xEI98FGRp68ob8xrUYM+DRuwRjtSwXRGF7lXON2F+7gP7uqbAJp hJ8CUxhdWvCOGBp1QpuCntti0WctGTApZ+p/KpU566Rpls6zfFyfSQiXO1j2OdyW Ill/YSuQIVryZ1qHrSHYI47bvbuG0qWtFYJLAvz3YzOOn3y4EaoPGsDMGJRSEilE PSh9HyYz9OkxIDBI457EozDtn5rh3dcx0SEwSk3Jj3SBvDJT/4nyfvk+y6SdFMSL gLvqrsDhGmEUiCd6YD8RUEzBEXAAKJmCHkvSUC7XUmh5iFa1BeYMP7d3fLvBNKEi YG1m1HwRKeD2sdHXrtxBoP7Yy9zhntcfS/8riTTKTRwSkASj8m3VyyKM3aDuwVAA meVEc/hBhTKYB9hg5xW9 =TNi2 -----END PGP SIGNATURE----- --Apple-Mail=_B7987210-E34E-483A-8533-89AE065E84B4-- From owner-svn-src-all@freebsd.org Fri Feb 24 21:02: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 75AF1CEB629; Fri, 24 Feb 2017 21:02:51 +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 3C57B1685; Fri, 24 Feb 2017 21:02:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id s67so4334299pgb.1; Fri, 24 Feb 2017 13:02:51 -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=NsylnvdjXnmmZutbH0MWvwQ137VEFZ0pK6LcX5Q8Yjs=; b=I8dJ4rl1+QHU4j4jEKPRKJY+dHLy8MSViBZwafdp4M4GPcZlxmOo+hPBtzXlFb8rSg efL9hw8ISFDKTKqvgbmfJD4R1cIvdFJdSJNxNUpj3o5PiMFaf/5LtayGYLk7u1TbCbea PC/WYjC6SJkneIMyCUrjmlk406fdx1y+IF7wbA1C19WapsS5u8W8vbLHXV1CKRbWApNB jII4vi10ASHQajSUxL/YJ4pmRCY59CFICq1vWGO7bzAimGEatolGOm5d/g5XXQQj43O3 44JKO6ah6aRZykEVDUrtsJn11UGrW5xuEB2BdJUlo3usUQIQyQnsjFfCLFVajFY5LKxn V3gw== 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=NsylnvdjXnmmZutbH0MWvwQ137VEFZ0pK6LcX5Q8Yjs=; b=r6FIkdiQNZs/2KaPVmi81eGtEdhlNYKfOguE+S/yPeEFY779U+G29WaYiJicpRvVQo jrBJxQWipPvzr5Grb+N5RLkoATlisn6L/uV9JjaplGgyLv8uBl8gP8YcrRekXEGETILr 31jrOQ2dZbDgSNWqv08c9VuBInxO7hOJ5Sg0uh8k24J7jt+H4ZrCNfSjjzdP8LAr/Qae piawyxDDD4yAVIbZAWbDlq7+vCN2MxcxPN9A9dI3orRzNfR9Nkq2V4lV8+9gCXHF3k/W kex92k0Puofl5ftzEXQFYZ1+aGv1i573vUjNMs95kjuMmJNtW77MIPn9PiC9GoyAQnW1 X4Aw== X-Gm-Message-State: AMke39m117szGcPYr/qQaYv/kNO334pXffG5I8S9ZHa0PmWJjwigsVQ5lUBWsRvTIOczoQ== X-Received: by 10.98.36.92 with SMTP id r89mr936062pfj.3.1487970170485; Fri, 24 Feb 2017 13:02:50 -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 r12sm6006109pgn.26.2017.02.24.13.02.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Feb 2017 13:02:49 -0800 (PST) Subject: Re: svn commit: r314189 - head/lib/libcam Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5975614E-6F25-463B-A3BD-086AF3A1614E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <1487950593.25520.20.camel@freebsd.org> Date: Fri, 24 Feb 2017 13:02:48 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> References: <201702240624.v1O6OdRr094467@repo.freebsd.org> <1487950593.25520.20.camel@freebsd.org> To: Ian Lepore 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, 24 Feb 2017 21:02:51 -0000 --Apple-Mail=_5975614E-6F25-463B-A3BD-086AF3A1614E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 24, 2017, at 07:36, Ian Lepore wrote: >=20 > On Fri, 2017-02-24 at 06:24 +0000, Ngie Cooper wrote: >> Author: ngie >> Date: Fri Feb 24 06:24:39 2017 >> New Revision: 314189 >> URL: https://svnweb.freebsd.org/changeset/base/314189 >>=20 >> Log: >> Fix up NULL/'\0' uses and fix 2 derefs after NULL >>=20 >> MFC after: 2 weeks >> Reported by: Coverity >> CID: 1018898, 1018899 >> Differential Revision: https://reviews.freebsd.org/D6142 >> Sponsored by: Dell EMC Isilon >>=20 >> Modified: >> head/lib/libcam/scsi_cmdparse.c >>=20 >> Modified: head/lib/libcam/scsi_cmdparse.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/lib/libcam/scsi_cmdparse.c Fri Feb 24 01:39:12 2017 >> (r314188) >> +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:24:39 2017 >> (r314189) >> @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le >> *(va_arg(*ap, int *)) =3D (ARG); \ >> assigned++; \ >> } \ >> - field_name[0] =3D 0; \ >> + field_name[0] =3D '\0'; \ >=20 > Is coverity seriously complaining about using 0 instead of '\0'? What > possible *real* benefit (not just shutting up coverity) does this = churn > bring? Warner made the same comment. It was actually a combination of issues brought up by Coverity = and coccinelle (badzero.cocci). The forward-NULL CIDs noted were pointed = out by Coverity. The NULL/=E2=80=98\0=E2=80=99 use issues were pointed = out by coccinelle. Thanks! -Ngie --Apple-Mail=_5975614E-6F25-463B-A3BD-086AF3A1614E 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 iQIcBAEBCgAGBQJYsJ94AAoJEPWDqSZpMIYVniIQANU5r6hhcQVnXMTZHgGotzuk dQkaW876l2MnzH32vkCkgyeeBQyMIsX1Mb7kU6W3NsDy8A/FTcQyhYXJQtUn1Kv8 Pb4tbwz7xczJ7USL65boY5k7ArCSJKHCoff3tt1i/UkhSQ8S96+/K+CHY+2BveFU 2F4A9AlKCBA2Kyq8iWmgxUa59cj6jzm3BwT4CrxfMa9AJZNsYnMDrdUELCI0ZD/z yR7qIZ3MLMg/U6UKnA7uYeqnTFiiuNw6ofxlA3hFhxcBxa0jbggu+zVshke7oY/1 z5zZx4REsgJ4RRT25CAYURwMQZprRR9SpIobYLFzht+5derzXUzpCLW3W08fOgr9 JbqxbFGJMLXCdGDVn7JE0A/Qv7GKWt0Yese9m2en21N51ZyWbl70AOfrDbadlGiy F9OGI7HhQdpsHtNsIXY3j1OxwzYUniln7TLcxKetGTERfWsikhGvvz3dwCf+OYQk Ptyb2MNDH8AD9gHmxIfX/6gWrhohMtD8aV9H1zJbaKmsphXBy1vjWoo1XFUxYJ3H 7RJlzcWrK7LSev2MU3bwHOqhyEvX99BM+kqOM3vovtQg+v0t4QtFRzhBSD8y5fam fsFRV3kyPFrQx7uwTBalkUfQPyYoMiDhipS3I+V8JFBAGYGuGgo7y3bZk6fRgvip IIBBo3MAPywWIfYBLv7g =qawt -----END PGP SIGNATURE----- --Apple-Mail=_5975614E-6F25-463B-A3BD-086AF3A1614E-- From owner-svn-src-all@freebsd.org Fri Feb 24 21:17: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 18CD6CEB9C8 for ; Fri, 24 Feb 2017 21:17:57 +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 F0A4C1D77 for ; Fri, 24 Feb 2017 21:17:56 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bfda5d48-fad6-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 bfda5d48-fad6-11e6-ba57-8bc134ee460a; Fri, 24 Feb 2017 21:18:13 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1OLHmYv004348; Fri, 24 Feb 2017 14:17:48 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487971068.25520.45.camel@freebsd.org> Subject: Re: svn commit: r314189 - head/lib/libcam From: Ian Lepore To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 24 Feb 2017 14:17:48 -0700 In-Reply-To: <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> References: <201702240624.v1O6OdRr094467@repo.freebsd.org> <1487950593.25520.20.camel@freebsd.org> <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> Content-Type: text/plain; charset="windows-1251" 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, 24 Feb 2017 21:17:57 -0000 On Fri, 2017-02-24 at 13:02 -0800, Ngie Cooper (yaneurabeya) wrote: > > > > On Feb 24, 2017, at 07:36, Ian Lepore wrote: > > > > On Fri, 2017-02-24 at 06:24 +0000, Ngie Cooper wrote: > > > > > > Author: ngie > > > Date: Fri Feb 24 06:24:39 2017 > > > New Revision: 314189 > > > URL: https://svnweb.freebsd.org/changeset/base/314189 > > > > > > Log: > > >   Fix up NULL/'\0' uses and fix 2 derefs after NULL > > > > > >   MFC after: 2 weeks > > >   Reported by: Coverity > > >   CID: 1018898, 1018899 > > >   Differential Revision: https://reviews.freebsd.org/D6142 > > >   Sponsored by: Dell EMC Isilon > > > > > > Modified: > > >   head/lib/libcam/scsi_cmdparse.c > > > > > > Modified: head/lib/libcam/scsi_cmdparse.c > > > ================================================================= > > > ==== > > > ========= > > > --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 01:39:12 > > > 2017 > > > (r314188) > > > +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:24:39 > > > 2017 > > > (r314189) > > > @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le > > >   *(va_arg(*ap, int *)) = (ARG); \ > > >   assigned++; \ > > >   } \ > > > - field_name[0] = 0; \ > > > + field_name[0] = '\0'; \ > > Is coverity seriously complaining about using 0 instead of > > '\0'?  What > > possible *real* benefit (not just shutting up coverity) does this > > churn > > bring? > Warner made the same comment. > It was actually a combination of issues brought up by Coverity > and coccinelle (badzero.cocci). The forward-NULL CIDs noted were > pointed out by Coverity. The NULL/‘\0’ use issues were pointed out by > coccinelle. > Thanks! > -Ngie Alright.  That answers everything except the actual important question.  So, again: What *real* benefit does this churn bring? -- Ian From owner-svn-src-all@freebsd.org Fri Feb 24 21:19: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 C6C95CEBA44; Fri, 24 Feb 2017 21:19:41 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 779B81ECB; Fri, 24 Feb 2017 21:19:41 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1OLJe9D063139; Fri, 24 Feb 2017 21:19:40 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLJeIo063136; Fri, 24 Feb 2017 21:19:40 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201702242119.v1OLJeIo063136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 24 Feb 2017 21:19: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: r314222 - in stable/11/sys/dev: iwi ral usb/wlan 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, 24 Feb 2017 21:19:41 -0000 Author: avos Date: Fri Feb 24 21:19:40 2017 New Revision: 314222 URL: https://svnweb.freebsd.org/changeset/base/314222 Log: MFC r313906: iwi, ral, zyd: fix possible use-after-free. Modified: stable/11/sys/dev/iwi/if_iwi.c stable/11/sys/dev/ral/rt2661.c stable/11/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/11/sys/dev/iwi/if_iwi.c Fri Feb 24 20:51:39 2017 (r314221) +++ stable/11/sys/dev/iwi/if_iwi.c Fri Feb 24 21:19:40 2017 (r314222) @@ -1979,9 +1979,9 @@ iwi_start(struct iwi_softc *sc) } ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (iwi_tx_start(sc, m, ni, ac) != 0) { - ieee80211_free_node(ni); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); break; } sc->sc_tx_timer = 5; Modified: stable/11/sys/dev/ral/rt2661.c ============================================================================== --- stable/11/sys/dev/ral/rt2661.c Fri Feb 24 20:51:39 2017 (r314221) +++ stable/11/sys/dev/ral/rt2661.c Fri Feb 24 21:19:40 2017 (r314222) @@ -1619,9 +1619,9 @@ rt2661_start(struct rt2661_softc *sc) } ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (rt2661_tx_data(sc, m, ni, ac) != 0) { - ieee80211_free_node(ni); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); break; } sc->sc_tx_timer = 5; Modified: stable/11/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_zyd.c Fri Feb 24 20:51:39 2017 (r314221) +++ stable/11/sys/dev/usb/wlan/if_zyd.c Fri Feb 24 21:19:40 2017 (r314222) @@ -2570,10 +2570,10 @@ zyd_start(struct zyd_softc *sc) while (sc->tx_nfree > 0 && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (zyd_tx_start(sc, m, ni) != 0) { - ieee80211_free_node(ni); m_freem(m); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); break; } } From owner-svn-src-all@freebsd.org Fri Feb 24 21:20: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 09039CEBC31; Fri, 24 Feb 2017 21:20:50 +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 D51EB9A; Fri, 24 Feb 2017 21:20:49 +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 v1OLKmVE063259; Fri, 24 Feb 2017 21:20:48 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLKmCT063253; Fri, 24 Feb 2017 21:20:48 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702242120.v1OLKmCT063253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Feb 2017 21:20: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: r314223 - in stable/11/sys/dev: hpt27xx hptnr hptrr 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, 24 Feb 2017 21:20:50 -0000 Author: pfg Date: Fri Feb 24 21:20:48 2017 New Revision: 314223 URL: https://svnweb.freebsd.org/changeset/base/314223 Log: MFC r313554: 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: stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/11/sys/dev/hpt27xx/ldm.h stable/11/sys/dev/hptnr/hptnr_osm_bsd.c stable/11/sys/dev/hptnr/ldm.h stable/11/sys/dev/hptrr/hptrr_osm_bsd.c stable/11/sys/dev/hptrr/ldm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) @@ -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: stable/11/sys/dev/hpt27xx/ldm.h ============================================================================== --- stable/11/sys/dev/hpt27xx/ldm.h Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hpt27xx/ldm.h Fri Feb 24 21:20:48 2017 (r314223) @@ -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: stable/11/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) @@ -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: stable/11/sys/dev/hptnr/ldm.h ============================================================================== --- stable/11/sys/dev/hptnr/ldm.h Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptnr/ldm.h Fri Feb 24 21:20:48 2017 (r314223) @@ -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: stable/11/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) @@ -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: stable/11/sys/dev/hptrr/ldm.h ============================================================================== --- stable/11/sys/dev/hptrr/ldm.h Fri Feb 24 21:19:40 2017 (r314222) +++ stable/11/sys/dev/hptrr/ldm.h Fri Feb 24 21:20:48 2017 (r314223) @@ -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 24 21:22: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 2FF75CEBCEB; Fri, 24 Feb 2017 21:22:15 +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 0814666B; Fri, 24 Feb 2017 21:22:14 +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 v1OLMEck066340; Fri, 24 Feb 2017 21:22:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLMD3e066334; Fri, 24 Feb 2017 21:22:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702242122.v1OLMD3e066334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Feb 2017 21:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314224 - in stable/10/sys/dev: hpt27xx hptnr hptrr 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, 24 Feb 2017 21:22:15 -0000 Author: pfg Date: Fri Feb 24 21:22:13 2017 New Revision: 314224 URL: https://svnweb.freebsd.org/changeset/base/314224 Log: MFC r313554: 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: stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/10/sys/dev/hpt27xx/ldm.h stable/10/sys/dev/hptnr/hptnr_osm_bsd.c stable/10/sys/dev/hptnr/ldm.h stable/10/sys/dev/hptrr/hptrr_osm_bsd.c stable/10/sys/dev/hptrr/ldm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) +++ stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Feb 24 21:22:13 2017 (r314224) @@ -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: stable/10/sys/dev/hpt27xx/ldm.h ============================================================================== --- stable/10/sys/dev/hpt27xx/ldm.h Fri Feb 24 21:20:48 2017 (r314223) +++ stable/10/sys/dev/hpt27xx/ldm.h Fri Feb 24 21:22:13 2017 (r314224) @@ -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: stable/10/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) +++ stable/10/sys/dev/hptnr/hptnr_osm_bsd.c Fri Feb 24 21:22:13 2017 (r314224) @@ -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: stable/10/sys/dev/hptnr/ldm.h ============================================================================== --- stable/10/sys/dev/hptnr/ldm.h Fri Feb 24 21:20:48 2017 (r314223) +++ stable/10/sys/dev/hptnr/ldm.h Fri Feb 24 21:22:13 2017 (r314224) @@ -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: stable/10/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 24 21:20:48 2017 (r314223) +++ stable/10/sys/dev/hptrr/hptrr_osm_bsd.c Fri Feb 24 21:22:13 2017 (r314224) @@ -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: stable/10/sys/dev/hptrr/ldm.h ============================================================================== --- stable/10/sys/dev/hptrr/ldm.h Fri Feb 24 21:20:48 2017 (r314223) +++ stable/10/sys/dev/hptrr/ldm.h Fri Feb 24 21:22:13 2017 (r314224) @@ -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 24 21:28: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 53F0ECEBE76; Fri, 24 Feb 2017 21:28:36 +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 1FE4DA9C; Fri, 24 Feb 2017 21:28:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id o64so1423794pfb.1; Fri, 24 Feb 2017 13:28:36 -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=YUvW94MGUR9x6ZlmmzBZGPzknc4RIbxC2oW3UQcvGew=; b=Czcgwtq26xrnACOyTGdDTopNODJsNG4ymhbrULnRVJRJvk8gFPYcOwW9Hq5s46yS44 LxT8Dw3/h6jcof5s6EcZEjF7j/f2kJo8vOSg57X89U0Vu4pxLRH+vZGzbMfniZMgcK/8 aynVaH58tyZeITq16Ho+e+3MaogoDfGKn1ivTRJ+plWYcJII9CAALVdadOBZ0qXlYCjF BeOVZ+FzXjm+J2e4NY77/OKlMHDTZUYhjKwm9teBMT27nJ/f+6LWRpImUphMAjv4blq9 kH8vgDMxR3hzP9pAa54hzmZt/HKOWA+sJRW3PjJHACJeBbPQ4zoFDy0xVh4d9Q4EX+DQ i8Cg== 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=YUvW94MGUR9x6ZlmmzBZGPzknc4RIbxC2oW3UQcvGew=; b=jRx6PTq2MJucSfm2Kv1dNhM+Wyg19vsTEqW04D6oyhf9c0AmZ9L//cyNkdzCH5I7Yc 65MaoiIAyokiwA2RXD8pgJ/5oTG8QMBVaEGm2fUHJfI51n+G27UQ99WLx3j0Qzs8w0Jx 8k8ip4HGQ2SHfdrgeaOPmLWloJFuc9U9RWyk5cYSyCF3FKfmWyuGEgX4plHK/YyrzPZP P77RHUNoZYsUAA8fovW/uJBZ9gCDdHdZOqUJhf568HE07Wmy7oexBKCSztOcZgA9qyS9 L5zmbv+IaMBq88j6S3vU0PQqB3w1LqsN43WHKIfvzXnKzHUIM3cbTj7tF9/SoP55C8F1 4HYA== X-Gm-Message-State: AMke39lmIP385qbtGB1BBQ8/9WpYVK9hG6q0DtNME6dOCBS46byAzWUt+jdwl2D2iv/PGQ== X-Received: by 10.84.204.8 with SMTP id a8mr6679182ple.171.1487971715554; Fri, 24 Feb 2017 13:28:35 -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 s4sm16706494pfi.74.2017.02.24.13.28.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Feb 2017 13:28:34 -0800 (PST) Subject: Re: svn commit: r314189 - head/lib/libcam Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BDDEB071-7AED-4936-9956-9CD61CCB4301"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <1487971068.25520.45.camel@freebsd.org> Date: Fri, 24 Feb 2017 13:28:33 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702240624.v1O6OdRr094467@repo.freebsd.org> <1487950593.25520.20.camel@freebsd.org> <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> <1487971068.25520.45.camel@freebsd.org> To: Ian Lepore 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, 24 Feb 2017 21:28:36 -0000 --Apple-Mail=_BDDEB071-7AED-4936-9956-9CD61CCB4301 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 24, 2017, at 13:17, Ian Lepore wrote: =E2=80=A6 > Alright. That answers everything except the actual important = question. > So, again: >=20 > What *real* benefit does this churn bring? The benefits are: clarity in intent in the code and fixing dead (always = false or always true) branches. The point you brought up is addressing = the first goal. Thanks, -Ngie --Apple-Mail=_BDDEB071-7AED-4936-9956-9CD61CCB4301 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 iQIcBAEBCgAGBQJYsKWCAAoJEPWDqSZpMIYVIx8QAJPk6ASScAfY2It5bGNH5jgh 1AakFjJpsxx35pPpbuf2NcZvV3MMOMpRZeUz3d11EwSymQBZ3XHywumglwqqSvZP USEpQ/8plu4CzRb/0CyEeRpj5+lKrcZMyRGkijWlGHW1N5ieCsIxxroayXcLIAbz E/X8j2Kdl2N4ascLKMceTK0ePWvLACV5W/zPc3yW6G1eCnuLmBi78897pPNgLZnj 6Hk2QjcXpXfsZ/+mhbVILSLwFFc9LE1GUPFWlKH+R6yeMlZ8kDhbvw9SwrGvhTtY o9vl5ki90hSi1xkZRtBkqBh7BWvChwv23osWM/ndPoNTvmKzja3UVSC0MDOAO5jZ gOsmag1tu9I0mbfGaQOAOIcAioQI8T4euYWI+mb2opgiY1+jWP5t1WAEAYGXBFJL k/WBdnKlZwG/RnecbemAysrkitMIcbLuEruEPIN7BCCRK11+CfWgJuDTRFxZzfuw pwdRGbp+JK5flj2Z32TcOl0IPnywvb7TxLVBciUIZt7f1zcXcRgSinQhSbSxPu4n uqXSgYRInQIaKiYRbLUY3/4uztndgatHiJ0Ryn2RjVsKgYO0h1KFV/trsX8+jhY3 QdrSy+UiFmmNhDeRoziabHyKYtOXT8JvaZfPrB2/pQY7DNHJ4dmZpG8ous6VSzNe UkjMJhlx2ShXOF67z7Fb =cuzJ -----END PGP SIGNATURE----- --Apple-Mail=_BDDEB071-7AED-4936-9956-9CD61CCB4301-- From owner-svn-src-all@freebsd.org Fri Feb 24 21:35: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 A3D1BCEC0C9; Fri, 24 Feb 2017 21:35:54 +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 72915FBA; Fri, 24 Feb 2017 21:35:54 +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 v1OLZrYT071462; Fri, 24 Feb 2017 21:35:53 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLZrpE071461; Fri, 24 Feb 2017 21:35:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702242135.v1OLZrpE071461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Feb 2017 21:35:53 +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: r314225 - stable/11/sys/fs/ext2fs 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, 24 Feb 2017 21:35:54 -0000 Author: pfg Date: Fri Feb 24 21:35:53 2017 New Revision: 314225 URL: https://svnweb.freebsd.org/changeset/base/314225 Log: MFC r313897: ext2fs: Remove unused assignment. The value is re-assigned a few lines later without being read. Found by: Clang static analyzer Modified: stable/11/sys/fs/ext2fs/ext2_htree.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- stable/11/sys/fs/ext2fs/ext2_htree.c Fri Feb 24 21:22:13 2017 (r314224) +++ stable/11/sys/fs/ext2fs/ext2_htree.c Fri Feb 24 21:35:53 2017 (r314225) @@ -766,7 +766,6 @@ ext2_htree_add_entry(struct vnode *dvp, root_entires = info.h_levels[0].h_entries; newidxblock = malloc(blksize, M_TEMP, M_WAITOK | M_ZERO); dst_node = (struct ext2fs_htree_node *)newidxblock; - dst_entries = dst_node->h_entries; memset(&dst_node->h_fake_dirent, 0, sizeof(dst_node->h_fake_dirent)); dst_node->h_fake_dirent.e2d_reclen = blksize; From owner-svn-src-all@freebsd.org Fri Feb 24 21:36: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 9E8F8CEC0FB; Fri, 24 Feb 2017 21:36:00 +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 6A6C4FEB; Fri, 24 Feb 2017 21:36: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 v1OLZxSu071512; Fri, 24 Feb 2017 21:35:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLZxqr071511; Fri, 24 Feb 2017 21:35:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702242135.v1OLZxqr071511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 24 Feb 2017 21:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314226 - 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: Fri, 24 Feb 2017 21:36:00 -0000 Author: ngie Date: Fri Feb 24 21:35:59 2017 New Revision: 314226 URL: https://svnweb.freebsd.org/changeset/base/314226 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.sbin/syslogd/Makefile Modified: head/usr.sbin/syslogd/Makefile ============================================================================== --- head/usr.sbin/syslogd/Makefile Fri Feb 24 21:35:53 2017 (r314225) +++ head/usr.sbin/syslogd/Makefile Fri Feb 24 21:35:59 2017 (r314226) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../usr.bin/wall +.PATH: ${SRCTOP}/usr.bin/wall PROG= syslogd MAN= syslog.conf.5 syslogd.8 @@ -20,6 +20,6 @@ CFLAGS+= -DINET CFLAGS+= -DINET6 .endif -CFLAGS+= -I${.CURDIR}/../../usr.bin/wall +CFLAGS+= -I${SRCTOP}/usr.bin/wall .include From owner-svn-src-all@freebsd.org Fri Feb 24 21:38: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 65CA5CEC19E; Fri, 24 Feb 2017 21:38:42 +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 34BA41253; Fri, 24 Feb 2017 21:38:42 +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 v1OLcfcp071776; Fri, 24 Feb 2017 21:38:41 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1OLcf41071775; Fri, 24 Feb 2017 21:38:41 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702242138.v1OLcf41071775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Feb 2017 21:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314227 - stable/10/sys/fs/ext2fs 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, 24 Feb 2017 21:38:42 -0000 Author: pfg Date: Fri Feb 24 21:38:41 2017 New Revision: 314227 URL: https://svnweb.freebsd.org/changeset/base/314227 Log: MFC r313897: ext2fs: Remove unused assignment. The value is re-assigned a few lines later without being read. Found by: Clang static analyzer Modified: stable/10/sys/fs/ext2fs/ext2_htree.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_htree.c Fri Feb 24 21:35:59 2017 (r314226) +++ stable/10/sys/fs/ext2fs/ext2_htree.c Fri Feb 24 21:38:41 2017 (r314227) @@ -766,7 +766,6 @@ ext2_htree_add_entry(struct vnode *dvp, root_entires = info.h_levels[0].h_entries; newidxblock = malloc(blksize, M_TEMP, M_WAITOK | M_ZERO); dst_node = (struct ext2fs_htree_node *)newidxblock; - dst_entries = dst_node->h_entries; memset(&dst_node->h_fake_dirent, 0, sizeof(dst_node->h_fake_dirent)); dst_node->h_fake_dirent.e2d_reclen = blksize; From owner-svn-src-all@freebsd.org Fri Feb 24 21:54: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 36F42CEC80B for ; Fri, 24 Feb 2017 21:54:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F32D1C8E for ; Fri, 24 Feb 2017 21:54:43 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c983270d-fadb-11e6-b3c2-c9f38144898e 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id c983270d-fadb-11e6-b3c2-c9f38144898e; Fri, 24 Feb 2017 21:54:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1OLsfwX004421; Fri, 24 Feb 2017 14:54:41 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487973281.25520.51.camel@freebsd.org> Subject: Re: svn commit: r314189 - head/lib/libcam From: Ian Lepore To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 24 Feb 2017 14:54:41 -0700 In-Reply-To: References: <201702240624.v1O6OdRr094467@repo.freebsd.org> <1487950593.25520.20.camel@freebsd.org> <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> <1487971068.25520.45.camel@freebsd.org> Content-Type: text/plain; charset="windows-1251" 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, 24 Feb 2017 21:54:44 -0000 On Fri, 2017-02-24 at 13:28 -0800, Ngie Cooper (yaneurabeya) wrote: > > > > On Feb 24, 2017, at 13:17, Ian Lepore wrote: > … > > > > > Alright.  That answers everything except the actual important > > question. > >  So, again: > > > > What *real* benefit does this churn bring? > The benefits are: clarity in intent in the code and fixing dead > (always false or always true) branches. The point you brought up is > addressing the first goal. > Thanks, > -Ngie What I'masking has nothing to do with dead branches.  So, no real benefit then.   I'm agnostic about using bare 0 versus '\0' in a context where the type is char.  The type of '\0' in plain-C is exactly the same as the type of a bare 0 -- both are just integer constants. style(9) prefers the '\0' form, but style(9) also offers these words of wisdom: Stylistic changes (including whitespace changes) are hard on the source repository and are to be avoided without good reason. I sure hope we're not going to see a big round of 'svn blame'-ruining commits just to change 0 to '\0' throughout the repo. -- Ian From owner-svn-src-all@freebsd.org Fri Feb 24 23:57: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 4AACCCEC10A; Fri, 24 Feb 2017 23:57:53 +0000 (UTC) (envelope-from jonlooney@gmail.com) 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 D7FBC1038; Fri, 24 Feb 2017 23:57:52 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id v77so25601329wmv.0; Fri, 24 Feb 2017 15:57:52 -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=RN8b1Bh1KPkqu7SnGDCbwz3g3YaDyV9qBBuJImIH4IE=; b=RYjTd03MoVOurEQqqCnbtXanRAEdCp/L3G17DHRvQbmwFJtVMG+qQ1Vj0DZV5jztv8 hlW9ND7BLYN2cPwECOF/nXsPoeA8YE84mh7SqoFRaQ/t3E5iI8resVVdn6l8k+DoAHg8 Iif4vRtafqZi/wvGBGXbiibwlqs5qtLJYOhgjISI/XhhLkDhGYKdSTNJ1fu3RUKoG1zS o+ip8w216DGc54ehuj7vcCbg+IBrrWJgwQA9eA+P+CIz7D8cvJ+86Q6p+14NdAaEw1b7 Xab5ZG3Lq2qyMIB10TWoNbFk3onYMPnVoxgqEFPZF5h4smjv+lWMUOxP1aXPAWaMo9gu ZmeQ== 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=RN8b1Bh1KPkqu7SnGDCbwz3g3YaDyV9qBBuJImIH4IE=; b=jjBstYr/RC8j0gsPNJisRSygdAWoiF1DNrYqJJ/cowLVeDHQTKplF9ZiEC2EkBJ5it GNtZAaj504E9lLnxM55KvVSiyhS501AzSpkRkKx66Id3wZnZqMaecMSibZJgA2AxhR69 2TvAjx9r5ADshNNEs8h0hxbjDPx1jXoKuN1oim4warDw3cqd4w2gfkG2EQUGA6bbJhLD wMFAR/G/gcm0m/OH3+SgzTRwHJrqJ2oU5zyjv7kL2Bz7qeUt22NmBUaFNlc+UtLZ9tLN 6gdSkGqwdKo04G5BcdKEYYnfzS7vHf5CJXd8u5t2+5EkVfuHScC9a2/njQ4dUOGYySPL IWLg== X-Gm-Message-State: AMke39mKOLmTTwHquRPXSVE51a+Otq/EOMMUkUjck2aMtFgF8nECWfpG37dviMI/4u9Nrjxw62uI/BFCn2FbVA== X-Received: by 10.28.24.198 with SMTP id 189mr4735317wmy.131.1487980671097; Fri, 24 Feb 2017 15:57:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.142.205 with HTTP; Fri, 24 Feb 2017 15:57:50 -0800 (PST) In-Reply-To: <20170224201922.GA18343@strugglingcoder.info> References: <201702241856.v1OIu150004903@repo.freebsd.org> <20170224201922.GA18343@strugglingcoder.info> From: Jonathan Looney Date: Fri, 24 Feb 2017 18:57:50 -0500 Message-ID: Subject: Re: svn commit: r314216 - head/sys/x86/x86 To: hiren panchasara Cc: "Jonathan T. Looney" , 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, 24 Feb 2017 23:57:53 -0000 On Fri, Feb 24, 2017 at 3:19 PM, hiren panchasara < hiren@strugglingcoder.info> wrote: > On 02/24/17 at 06:56P, Jonathan T. Looney wrote: > > Author: jtl > > Date: Fri Feb 24 18:56:00 2017 > > New Revision: 314216 > > URL: https://svnweb.freebsd.org/changeset/base/314216 > > > > Log: > > We have seen several cases recently where we appear to get a > double-fault: > > We have an original panic. Then, instead of writing the core to the > dump > > device, the kernel has a second panic: "smp_targeted_tlb_shootdown: > > interrupts disabled". This change is an attempt to fix that second > panic. > > > > When the other CPUs are stopped, we can't notify them of the TLB > shootdown, > > so we skip that operation. However, when the CPUs come back up, we > > invalidate the TLB to ensure they correctly observe any changes to the > > page mappings. > > > > Reviewed by: kib > > Sponsored by: Netflix > > Differential Revision: https://reviews.freebsd.org/D9786 > > Can this be MFCd to 11? > It can be. I didn't propose it because I have only seen the problem on -CURRENT. But, I see no obstacle to MFCing to stable/11, if you want to see it there. Jonathan From owner-svn-src-all@freebsd.org Sat Feb 25 00:09: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 599BFCEC579; Sat, 25 Feb 2017 00:09: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 293E11617; Sat, 25 Feb 2017 00:09: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 v1P092T1033005; Sat, 25 Feb 2017 00:09:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P092cI033004; Sat, 25 Feb 2017 00:09:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250009.v1P092cI033004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 00:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314228 - 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: Sat, 25 Feb 2017 00:09:03 -0000 Author: imp Date: Sat Feb 25 00:09:02 2017 New Revision: 314228 URL: https://svnweb.freebsd.org/changeset/base/314228 Log: Fix typos in output. Sponsored by: Netflix Modified: head/sbin/nvmecontrol/logpage.c Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Fri Feb 24 21:38:41 2017 (r314227) +++ head/sbin/nvmecontrol/logpage.c Sat Feb 25 00:09:02 2017 (r314228) @@ -714,13 +714,13 @@ print_hgst_info_temp_history(void *buf, printf(" %-30s: %d C\n", "Minimum Temperature", *walker++); min = le32dec(walker); walker += 4; - printf(" %-30s: %d:%02d:00\n", "Max Temperture Time", min / 60, min % 60); + printf(" %-30s: %d:%02d:00\n", "Max Temperature Time", min / 60, min % 60); min = le32dec(walker); walker += 4; - printf(" %-30s: %d:%02d:00\n", "Over Temperture Duration", min / 60, min % 60); + printf(" %-30s: %d:%02d:00\n", "Over Temperature Duration", min / 60, min % 60); min = le32dec(walker); walker += 4; - printf(" %-30s: %d:%02d:00\n", "Min Temperture Time", min / 60, min % 60); + printf(" %-30s: %d:%02d:00\n", "Min Temperature Time", min / 60, min % 60); } static void From owner-svn-src-all@freebsd.org Sat Feb 25 00:09: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 6B242CEC5AE; Sat, 25 Feb 2017 00:09:13 +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 395D8168F; Sat, 25 Feb 2017 00:09:13 +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 v1P09Cl9033061; Sat, 25 Feb 2017 00:09:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P09CMq033060; Sat, 25 Feb 2017 00:09:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250009.v1P09CMq033060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 00:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314229 - 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: Sat, 25 Feb 2017 00:09:13 -0000 Author: imp Date: Sat Feb 25 00:09:12 2017 New Revision: 314229 URL: https://svnweb.freebsd.org/changeset/base/314229 Log: Exit with usage if argv[1] is NULL in dispatch. This fixes core dumps when a command has subcommands, but the user doesn't give the parameters on the command line. Sponsored by: Netflix Modified: head/sbin/nvmecontrol/nvmecontrol.c Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Sat Feb 25 00:09:02 2017 (r314228) +++ head/sbin/nvmecontrol/nvmecontrol.c Sat Feb 25 00:09:12 2017 (r314229) @@ -75,6 +75,11 @@ dispatch(int argc, char *argv[], struct { struct nvme_function *f = tbl; + if (argv[1] == NULL) { + gen_usage(tbl); + return; + } + while (f->name != NULL) { if (strcmp(argv[1], f->name) == 0) f->fn(argc-1, &argv[1]); From owner-svn-src-all@freebsd.org Sat Feb 25 00:09: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 829F7CEC5D8; Sat, 25 Feb 2017 00:09:18 +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 42A271723; Sat, 25 Feb 2017 00:09:18 +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 v1P09HGt033115; Sat, 25 Feb 2017 00:09:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P09Hv6033112; Sat, 25 Feb 2017 00:09:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250009.v1P09Hv6033112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 00:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314230 - 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: Sat, 25 Feb 2017 00:09:18 -0000 Author: imp Date: Sat Feb 25 00:09:16 2017 New Revision: 314230 URL: https://svnweb.freebsd.org/changeset/base/314230 Log: Make nvmecontrol logpage -p help list known pages. Make -p help and -v help list all the pages we know about. Add -v to usage. Update the man page. Sponsored by: Netflix Modified: head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.8 head/sbin/nvmecontrol/nvmecontrol.h Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Sat Feb 25 00:09:12 2017 (r314229) +++ head/sbin/nvmecontrol/logpage.c Sat Feb 25 00:09:16 2017 (r314230) @@ -369,7 +369,7 @@ print_intel_write_lat_log(void *buf, uin } /* - * Table 19. 5.4 SMART Attributes + * Table 19. 5.4 SMART Attributes. Samsung also implements this and some extra data not documented. */ static void print_intel_add_smart(void *buf, uint32_t size __unused) @@ -835,34 +835,39 @@ print_hgst_info_log(void *buf, uint32_t /* * Table of log page printer / sizing. * - * This includes Intel specific pages that are widely implemented. Not - * sure how best to switch between different vendors. + * This includes Intel specific pages that are widely implemented. + * Make sure you keep all the pages of one vendor together so -v help + * lists all the vendors pages. */ static struct logpage_function { uint8_t log_page; const char *vendor; + const char *name; print_fn_t print_fn; size_t size; } logfuncs[] = { - {NVME_LOG_ERROR, NULL, print_log_error, - 0}, - {NVME_LOG_HEALTH_INFORMATION, NULL, print_log_health, - sizeof(struct nvme_health_information_page)}, - {NVME_LOG_FIRMWARE_SLOT, NULL, print_log_firmware, - 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, - DEFAULT_SIZE}, - {INTEL_LOG_WRITE_LAT_LOG, "intel", print_intel_write_lat_log, - DEFAULT_SIZE}, - {INTEL_LOG_ADD_SMART, "intel", print_intel_add_smart, - DEFAULT_SIZE}, - {0, NULL, NULL, 0}, + {NVME_LOG_ERROR, NULL, "Drive Error Log", + print_log_error, 0}, + {NVME_LOG_HEALTH_INFORMATION, NULL, "Health/SMART Data", + print_log_health, sizeof(struct nvme_health_information_page)}, + {NVME_LOG_FIRMWARE_SLOT, NULL, "Firmware Information", + print_log_firmware, sizeof(struct nvme_firmware_page)}, + {HGST_INFO_LOG, "hgst", "Detailed Health/SMART", + print_hgst_info_log, DEFAULT_SIZE}, + {HGST_INFO_LOG, "wds", "Detailed Health/SMART", + print_hgst_info_log, DEFAULT_SIZE}, + {INTEL_LOG_TEMP_STATS, "intel", "Temperature Stats", + print_intel_temp_stats, sizeof(struct intel_log_temp_stats)}, + {INTEL_LOG_READ_LAT_LOG, "intel", "Read Latencies", + print_intel_read_lat_log, DEFAULT_SIZE}, + {INTEL_LOG_WRITE_LAT_LOG, "intel", "Write Latencies", + print_intel_write_lat_log, DEFAULT_SIZE}, + {INTEL_LOG_ADD_SMART, "intel", "Extra Health/SMART Data", + print_intel_add_smart, DEFAULT_SIZE}, + {INTEL_LOG_ADD_SMART, "samsung", "Extra Health/SMART Data", + print_intel_add_smart, DEFAULT_SIZE}, + + {0, NULL, NULL, NULL, 0}, }; static void @@ -873,6 +878,23 @@ logpage_usage(void) exit(1); } +static void +logpage_help(void) +{ + struct logpage_function *f; + const char *v; + + fprintf(stderr, "\n"); + fprintf(stderr, "%-8s %-10s %s\n", "Page", "Vendor","Page Name"); + fprintf(stderr, "-------- ---------- ----------\n"); + for (f = logfuncs; f->log_page > 0; f++) { + v = f->vendor == NULL ? "-" : f->vendor; + fprintf(stderr, "0x%02x %-10s %s\n", f->log_page, v, f->name); + } + + exit(1); +} + void logpage(int argc, char *argv[]) { @@ -894,6 +916,9 @@ logpage(int argc, char *argv[]) binflag = true; break; case 'p': + if (strcmp(optarg, "help") == 0) + logpage_help(); + /* TODO: Add human-readable ASCII page IDs */ log_page = strtol(optarg, &p, 0); if (p != NULL && *p != '\0') { @@ -908,6 +933,8 @@ logpage(int argc, char *argv[]) hexflag = true; break; case 'v': + if (strcmp(optarg, "help") == 0) + logpage_help(); vendor = optarg; break; } Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sat Feb 25 00:09:12 2017 (r314229) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sat Feb 25 00:09:16 2017 (r314230) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2017 +.Dd February 24, 2017 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -108,6 +108,15 @@ Page 0xc1 is read latency stats for inte Page 0xc2 is write latency stats for intel. Page 0xc5 is temperature stats for intel. Page 0xca is advanced smart information for intel. +.Pp +Specifying +.Fl p +.Ic help +will list all valid vendors and pages. +.Fl x +will print the page as hex. +.Fl b +will print the binary data for the page. .Ss wdc The various wdc command retrieve log data from the wdc/hgst drives. The Modified: head/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.h Sat Feb 25 00:09:12 2017 (r314229) +++ head/sbin/nvmecontrol/nvmecontrol.h Sat Feb 25 00:09:16 2017 (r314230) @@ -58,7 +58,7 @@ struct nvme_function { " nvmecontrol reset \n" #define LOGPAGE_USAGE \ -" nvmecontrol logpage <-p page_id> [-x] \n" \ +" nvmecontrol logpage <-p page_id> [-b] [-v vendor] [-x] \n" \ #define FIRMWARE_USAGE \ " nvmecontrol firmware [-s slot] [-f path_to_firmware] [-a] \n" From owner-svn-src-all@freebsd.org Sat Feb 25 00:09: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 1A9D7CEC611; Sat, 25 Feb 2017 00:09:23 +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 D7EB717B9; Sat, 25 Feb 2017 00:09:22 +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 v1P09LBD033169; Sat, 25 Feb 2017 00:09:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P09L9F033168; Sat, 25 Feb 2017 00:09:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250009.v1P09L9F033168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 00:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314231 - head/lib/libefivar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 00:09:23 -0000 Author: imp Date: Sat Feb 25 00:09:21 2017 New Revision: 314231 URL: https://svnweb.freebsd.org/changeset/base/314231 Log: Don't convert ENOENT to nothing for individual lookup, just for the iterative get_next interface. This prevents efivar(3) from printing 4k of 0's when a variable isn't set. Sponsored by: Netflix Modified: head/lib/libefivar/efivar.c Modified: head/lib/libefivar/efivar.c ============================================================================== --- head/lib/libefivar/efivar.c Sat Feb 25 00:09:16 2017 (r314230) +++ head/lib/libefivar/efivar.c Sat Feb 25 00:09:21 2017 (r314231) @@ -132,10 +132,7 @@ rv_to_linux_rv(int rv) { if (rv == 0) rv = 1; - else if (errno == ENOENT) { - rv = 0; - errno = 0; - } else + else rv = -errno; return (rv); } @@ -266,6 +263,11 @@ errout: /* XXX The linux interface expects name to be a static buffer -- fix or leak memory? */ done: + if (errno == ENOENT) { + errno = 0; + return 0; + } + return (rv_to_linux_rv(rv)); } From owner-svn-src-all@freebsd.org Sat Feb 25 00:09: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 BB647CEC64C; Sat, 25 Feb 2017 00:09:27 +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 88B921866; Sat, 25 Feb 2017 00:09:27 +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 v1P09Q0I033220; Sat, 25 Feb 2017 00:09:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P09QVL033219; Sat, 25 Feb 2017 00:09:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250009.v1P09QVL033219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 00:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314232 - head/usr.sbin/efivar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 00:09:27 -0000 Author: imp Date: Sat Feb 25 00:09:26 2017 New Revision: 314232 URL: https://svnweb.freebsd.org/changeset/base/314232 Log: Exit when we can't print a variable. Exit after printing a message on stderr when we can't get a message. This is slightly different than linux, but keeps shell scripts from thinking the value of the variable is the error message and so is a net win. Sponsored by: Netflix Modified: head/usr.sbin/efivar/efivar.c Modified: head/usr.sbin/efivar/efivar.c ============================================================================== --- head/usr.sbin/efivar/efivar.c Sat Feb 25 00:09:21 2017 (r314231) +++ head/usr.sbin/efivar/efivar.c Sat Feb 25 00:09:26 2017 (r314232) @@ -205,21 +205,20 @@ print_var(efi_guid_t *guid, char *name) int rv; efi_guid_to_str(guid, &gname); - if (!Nflag) - printf("%s-%s", gname, name); if (pflag) { rv = efi_get_variable(*guid, name, &data, &datalen, &att); if (rv < 0) - printf("\n --- Error getting value --- %d", errno); - else { - if (Aflag) - asciidump(data, datalen); - else if (bflag) - bindump(data, datalen); - else - hexdump(data, datalen); - } + err(1, "%s-%s", gname, name); + + if (!Nflag) + printf("%s-%s", gname, name); + if (Aflag) + asciidump(data, datalen); + else if (bflag) + bindump(data, datalen); + else + hexdump(data, datalen); } free(gname); if (!Nflag) From owner-svn-src-all@freebsd.org Sat Feb 25 00:12: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 2BF70CEC8D9; Sat, 25 Feb 2017 00:12:31 +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 D3FDC1FFD; Sat, 25 Feb 2017 00:12: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 v1P0CTe9037092; Sat, 25 Feb 2017 00:12:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P0CTVC037091; Sat, 25 Feb 2017 00:12:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250012.v1P0CTVC037091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 00:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314233 - 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: Sat, 25 Feb 2017 00:12:31 -0000 Author: ngie Date: Sat Feb 25 00:12:29 2017 New Revision: 314233 URL: https://svnweb.freebsd.org/changeset/base/314233 Log: Parameterize out the length of struct filed->f_lasttime as `MAXDATELEN` This removes the hardcoded value for the field (16) and the equivalent hardcoded lengths in logmsg(..). This change is being done to help stage future work to add RFC5424/RFC5434 support to syslogd(8). Obtained from: Isilon OneFS (dcd33d13da) (as part of a larger change) Submitted by: John Bauman MFC after: 2 weeks 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 Sat Feb 25 00:09:26 2017 (r314232) +++ head/usr.sbin/syslogd/syslogd.c Sat Feb 25 00:12:29 2017 (r314233) @@ -68,6 +68,8 @@ __FBSDID("$FreeBSD$"); * Priority comparison code by Harlan Stenn. */ +/* Maximum number of characters in time of last occurrence */ +#define MAXDATELEN 16 #define MAXLINE 1024 /* maximum line length */ #define MAXSVLINE MAXLINE /* maximum saved line length */ #define DEFUPRI (LOG_USER|LOG_NOTICE) @@ -212,7 +214,7 @@ struct filed { #define fu_pipe_pname f_un.f_pipe.f_pname #define fu_pipe_pid f_un.f_pipe.f_pid char f_prevline[MAXSVLINE]; /* last message logged */ - char f_lasttime[16]; /* time of last occurrence */ + char f_lasttime[MAXDATELEN]; /* time of last occurrence */ char f_prevhost[MAXHOSTNAMELEN]; /* host from which recd. */ int f_prevpri; /* pri of f_prevline */ int f_prevlen; /* length of f_prevline */ @@ -1034,7 +1036,7 @@ logmsg(int pri, const char *msg, const c * Check to see if msg looks non-standard. */ msglen = strlen(msg); - if (msglen < 16 || msg[3] != ' ' || msg[6] != ' ' || + if (msglen < MAXDATELEN || msg[3] != ' ' || msg[6] != ' ' || msg[9] != ':' || msg[12] != ':' || msg[15] != ' ') flags |= ADDDATE; @@ -1043,8 +1045,8 @@ logmsg(int pri, const char *msg, const c timestamp = ctime(&now) + 4; } else { timestamp = msg; - msg += 16; - msglen -= 16; + msg += MAXDATELEN; + msglen -= MAXDATELEN; } /* skip leading blanks */ From owner-svn-src-all@freebsd.org Sat Feb 25 00:18: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 DB85ECEC9AF; Sat, 25 Feb 2017 00:18:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 798D127E; Sat, 25 Feb 2017 00:18:41 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 0F61B3CC5F4; Sat, 25 Feb 2017 11:18:31 +1100 (AEDT) Date: Sat, 25 Feb 2017 11:18:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Konstantin Belousov , "Rodney W. Grimes" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r314210 - in stable/11/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 In-Reply-To: <2826708.tPzGBbFfxk@ralph.baldwin.cx> Message-ID: <20170225085937.O1026@besplex.bde.org> References: <201702241602.v1OG21SM034524@repo.freebsd.org> <201702241653.v1OGrRTJ028384@pdx.rh.CN85.dnsmgr.net> <20170224171405.GX2092@kib.kiev.ua> <2826708.tPzGBbFfxk@ralph.baldwin.cx> 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=Ca543Pjl c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=sDp809hHjrCLAIVfDQsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 00:18:43 -0000 On Fri, 24 Feb 2017, John Baldwin wrote: > On Friday, February 24, 2017 07:14:05 PM Konstantin Belousov wrote: >> On Fri, Feb 24, 2017 at 08:53:27AM -0800, Rodney W. Grimes wrote: >>>> Author: kib >>>> Date: Fri Feb 24 16:02:01 2017 >>>> New Revision: 314210 >>>> URL: https://svnweb.freebsd.org/changeset/base/314210 >>>> >>>> Log: >>>> MFC r313154: >>>> For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE >>>> and device npx. >>> >>> Um, why????? Since the static configuration is only useful for testing, and complicates the code, and tends to rot (it was most recently broken by only adding fcmpset() in the !CPU_DISABLE_CMPXCHG clause of atomic.h and then using fcmpset() in MI code without any ifdef). >>> Makes it much easier to test soft float if we can remove >>> the npx device. Or has soft float support died yet again? Not much easier. First you have to fix the bitrot. Than maybe rewrite the static configuration code to be less complicated and more maintainable. It is easier to use dynamic configuration for everything. This only costs a few hundred bytes (unless you have really large and complicated ifdefs to omit more code statically) and a few cycles quite often at runtime. No one cares much about the few cycles. >> Soft float was removed very long time ago. > > I think it was gone in 5.0. > >>> Yes, an i386 without an FPU is anchient by why are we removing working >>> functionality? >> This question makes an impression that you think that kernel would not >> boot on a machine without FPU. The code to tolerate such configuration >> is there, but it is not tested for obvious reasons. >> >> Completely different issue is that userspace requires FPU and e.g. /bin/sh >> traps on the next setjmp(3) call. This is my context-switching code for the FPU in setjmp(). It requires either an FPU or an emulator, and there was an emulator when it was written. When I discussed removing the static configuration code with kib, I mentioned that SSE is still not properly supported on i386, but haven't got around to responding with the details. The main one is this code in setjmp(). It is is still completely missing SSE support. So FPU+SSE states set by fenv get restored inconsistently by longjmp(). The current brokenness seems to be: - i386 restores the control word for the i387 only. fenve has dynamic SSE tests, and it sets both the x87 and the SSE control works for things like fesetround(). Then longjmp() leaves the SSE control word inconsistent. - both amd64 and i386 attempt to preserve the exception flags. This might be useful, but is quite broken. My original fixes cleared the i387 env before restoring the control word. Other systems were broken in not restoring anything or more broken in not clearing anything. According to das's commits that changed this, other systems still didn't restore the control word(s) 16 years later in 2008, and C99 doesn't require restoring the control words, but C99 does require restoring the status word. I couldn't find where C99 requires this. For the i387 or any FPU with similar or even more imprecise exceptions, leaving unmasked exceptions to trap again later would be painful. Anyway, das's changes don't really work: - kib committed my fix to stop clearing x87 exception flags in the kernel part of the SIGFPE handler in 2012. This makes x87 exceptions faults (repeat at the FP instruction that trapped, if a SIGFPE handler returns), which is too surprising for most applications, but few notice because few even unmask the traps. So it is now possible to recover the exception flags. But this is quite complicated, and far too hard to do in longjmp() from a signal handler. So the flags aren't actually preserved for the longjmp() freom a signal handler. - for the x87, there is other state to restore or clear. The status word contains the stack pointer together with the exception flags. The tag word contains the status of the 8 registers on the stack. The stack pointer can be anything provided the tag word is clear. For longjmp() from signal handlers, we depend on signal handlers getting a clean state so that there is no garbage on the stack. I'm not sure if all combinations of kernels and libraries are consistent about this (old signal handlers don't do this, but should only be used with old setjmp()/longjmp() that clear the state). For longjmp() not from signal handlers, we depend on the ABI guaranteeing that there is no garbage on the stack or in the FP env when longjmp() is called. Dynamic SSE tests can probably be done better using vdso, but only if vdso is almost free. I don't know if it requires a syscall to set up, or is automatic but costs all applications to set up. Otherwise, sigsetjmp() and siglongjmp() are already very slow (they do too many syscalls), so even another syscall to detect SSE would not make them much slower. They can share the SSE detection with fenv. This would work OK, but is inconvenient since fenv lives in libm. >> Also, we do not run on real 386, only on 486+, and there was probably only >> Intel 486SX CPU model which has all 486 features but no FPU. > > Yes, we effectively require an FPU on i386. I'd be tempted to start requiring > a built-in FPU (so INT 16 vs IRQ 13) so we could further reduce diffs with > amd64 and eventually have an "x86" fpu.c. That would only drop support for That would be backwords. amd64 should have an "x86" npx.c. The kernel does almost no FPU handling, so npx is a better name than fpu. It is even better than in 1991, since the numeric extensions are not limited to floating point ones. First there was mmx, then Intel started unimproving names with sse, then intel got tired of changing the prefix and started using nondescript sse numbers. > systems using a 486sx with an external FPU. Those systems are probably happier > running FreeBSD 4.x than 12 anyway. Bruce From owner-svn-src-all@freebsd.org Sat Feb 25 00:40: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 077F5CECFED; Sat, 25 Feb 2017 00:40:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B89301028; Sat, 25 Feb 2017 00:40:51 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1P0eogZ046242; Sat, 25 Feb 2017 00:40:50 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P0eo0V046240; Sat, 25 Feb 2017 00:40:50 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201702250040.v1P0eo0V046240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 25 Feb 2017 00:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314234 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 00:40:52 -0000 Author: avos Date: Sat Feb 25 00:40:50 2017 New Revision: 314234 URL: https://svnweb.freebsd.org/changeset/base/314234 Log: iwn: some initialization / RF switch state change fixes. - Check return code from initialization path; otherwise, vap state may be wrong after an error. - Do not try to run iwn_stop() / iwn_init() multiple times. - Merge iwn_radio_on/off() and move RFKILL bit check into the task. - Try to handle possible RF switch state change in S3 state (PR 181694). PR: 181694 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9797 Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Feb 25 00:12:29 2017 (r314233) +++ head/sys/dev/iwn/if_iwn.c Sat Feb 25 00:40:50 2017 (r314234) @@ -217,7 +217,7 @@ static void iwn_ampdu_tx_done(struct iwn static void iwn_cmd_done(struct iwn_softc *, struct iwn_rx_desc *); static void iwn_notif_intr(struct iwn_softc *); static void iwn_wakeup_intr(struct iwn_softc *); -static void iwn_rftoggle_intr(struct iwn_softc *); +static void iwn_rftoggle_task(void *, int); static void iwn_fatal_intr(struct iwn_softc *); static void iwn_intr(void *); static void iwn4965_update_sched(struct iwn_softc *, int, int, uint8_t, @@ -334,11 +334,9 @@ static int iwn5000_nic_config(struct iwn static int iwn_hw_prepare(struct iwn_softc *); static int iwn_hw_init(struct iwn_softc *); static void iwn_hw_stop(struct iwn_softc *); -static void iwn_radio_on(void *, int); -static void iwn_radio_off(void *, int); static void iwn_panicked(void *, int); -static void iwn_init_locked(struct iwn_softc *); -static void iwn_init(struct iwn_softc *); +static int iwn_init_locked(struct iwn_softc *); +static int iwn_init(struct iwn_softc *); static void iwn_stop_locked(struct iwn_softc *); static void iwn_stop(struct iwn_softc *); static void iwn_scan_start(struct ieee80211com *); @@ -679,8 +677,7 @@ iwn_attach(device_t dev) callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->scan_timeout, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); - TASK_INIT(&sc->sc_radioon_task, 0, iwn_radio_on, sc); - TASK_INIT(&sc->sc_radiooff_task, 0, iwn_radio_off, sc); + TASK_INIT(&sc->sc_rftoggle_task, 0, iwn_rftoggle_task, sc); TASK_INIT(&sc->sc_panic_task, 0, iwn_panicked, sc); TASK_INIT(&sc->sc_xmit_task, 0, iwn_xmit_task, sc); @@ -1401,8 +1398,6 @@ iwn_detach(device_t dev) iwn_xmit_queue_drain(sc); IWN_UNLOCK(sc); - ieee80211_draintask(&sc->sc_ic, &sc->sc_radioon_task); - ieee80211_draintask(&sc->sc_ic, &sc->sc_radiooff_task); iwn_stop(sc); taskqueue_drain_all(sc->sc_tq); @@ -4013,19 +4008,28 @@ iwn_wakeup_intr(struct iwn_softc *sc) } static void -iwn_rftoggle_intr(struct iwn_softc *sc) +iwn_rftoggle_task(void *arg, int npending) { + struct iwn_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; - uint32_t tmp = IWN_READ(sc, IWN_GP_CNTRL); + uint32_t tmp; - IWN_LOCK_ASSERT(sc); + IWN_LOCK(sc); + tmp = IWN_READ(sc, IWN_GP_CNTRL); + IWN_UNLOCK(sc); device_printf(sc->sc_dev, "RF switch: radio %s\n", (tmp & IWN_GP_CNTRL_RFKILL) ? "enabled" : "disabled"); - if (tmp & IWN_GP_CNTRL_RFKILL) - ieee80211_runtask(ic, &sc->sc_radioon_task); - else - ieee80211_runtask(ic, &sc->sc_radiooff_task); + if (!(tmp & IWN_GP_CNTRL_RFKILL)) { + ieee80211_suspend_all(ic); + + /* Enable interrupts to get RF toggle notification. */ + IWN_LOCK(sc); + IWN_WRITE(sc, IWN_INT, 0xffffffff); + IWN_WRITE(sc, IWN_INT_MASK, sc->int_mask); + IWN_UNLOCK(sc); + } else + ieee80211_resume_all(ic); } /* @@ -4139,7 +4143,7 @@ iwn_intr(void *arg) IWN_WRITE(sc, IWN_FH_INT, r2); if (r1 & IWN_INT_RF_TOGGLED) { - iwn_rftoggle_intr(sc); + taskqueue_enqueue(sc->sc_tq, &sc->sc_rftoggle_task); goto done; } if (r1 & IWN_INT_CT_REACHED) { @@ -5084,25 +5088,28 @@ static void iwn_parent(struct ieee80211com *ic) { struct iwn_softc *sc = ic->ic_softc; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - int startall = 0, stop = 0; - - IWN_LOCK(sc); + struct ieee80211vap *vap; + int error; + if (ic->ic_nrunning > 0) { - if (!(sc->sc_flags & IWN_FLAG_RUNNING)) { - iwn_init_locked(sc); - if (IWN_READ(sc, IWN_GP_CNTRL) & IWN_GP_CNTRL_RFKILL) - startall = 1; - else - stop = 1; + error = iwn_init(sc); + + switch (error) { + case 0: + ieee80211_start_all(ic); + break; + case EAGAIN: + /* radio is disabled via RFkill switch */ + taskqueue_enqueue(sc->sc_tq, &sc->sc_rftoggle_task); + break; + default: + vap = TAILQ_FIRST(&ic->ic_vaps); + if (vap != NULL) + ieee80211_stop(vap); + break; } - } else if (sc->sc_flags & IWN_FLAG_RUNNING) - iwn_stop_locked(sc); - IWN_UNLOCK(sc); - if (startall) - ieee80211_start_all(ic); - else if (vap != NULL && stop) - ieee80211_stop(vap); + } else + iwn_stop(sc); } /* @@ -8681,41 +8688,6 @@ iwn_hw_stop(struct iwn_softc *sc) } static void -iwn_radio_on(void *arg0, int pending) -{ - struct iwn_softc *sc = arg0; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - - DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); - - if (vap != NULL) { - iwn_init(sc); - ieee80211_init(vap); - } -} - -static void -iwn_radio_off(void *arg0, int pending) -{ - struct iwn_softc *sc = arg0; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - - DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); - - iwn_stop(sc); - if (vap != NULL) - ieee80211_stop(vap); - - /* Enable interrupts to get RF toggle notification. */ - IWN_LOCK(sc); - IWN_WRITE(sc, IWN_INT, 0xffffffff); - IWN_WRITE(sc, IWN_INT_MASK, sc->int_mask); - IWN_UNLOCK(sc); -} - -static void iwn_panicked(void *arg0, int pending) { struct iwn_softc *sc = arg0; @@ -8746,7 +8718,11 @@ iwn_panicked(void *arg0, int pending) IWN_LOCK(sc); iwn_stop_locked(sc); - iwn_init_locked(sc); + if ((error = iwn_init_locked(sc)) != 0) { + device_printf(sc->sc_dev, + "%s: could not init hardware\n", __func__); + goto unlock; + } if (vap->iv_state >= IEEE80211_S_AUTH && (error = iwn_auth(sc, vap)) != 0) { device_printf(sc->sc_dev, @@ -8758,11 +8734,12 @@ iwn_panicked(void *arg0, int pending) "%s: could not move to run state\n", __func__); } +unlock: IWN_UNLOCK(sc); #endif } -static void +static int iwn_init_locked(struct iwn_softc *sc) { int error; @@ -8771,6 +8748,9 @@ iwn_init_locked(struct iwn_softc *sc) IWN_LOCK_ASSERT(sc); + if (sc->sc_flags & IWN_FLAG_RUNNING) + goto end; + sc->sc_flags |= IWN_FLAG_RUNNING; if ((error = iwn_hw_prepare(sc)) != 0) { @@ -8785,12 +8765,8 @@ iwn_init_locked(struct iwn_softc *sc) /* Check that the radio is not disabled by hardware switch. */ if (!(IWN_READ(sc, IWN_GP_CNTRL) & IWN_GP_CNTRL_RFKILL)) { - device_printf(sc->sc_dev, - "radio is disabled by hardware switch\n"); - /* Enable interrupts to get RF toggle notifications. */ - IWN_WRITE(sc, IWN_INT, 0xffffffff); - IWN_WRITE(sc, IWN_INT_MASK, sc->int_mask); - return; + error = EAGAIN; + goto fail; } /* Read firmware images from the filesystem. */ @@ -8821,26 +8797,29 @@ iwn_init_locked(struct iwn_softc *sc) callout_reset(&sc->watchdog_to, hz, iwn_watchdog, sc); +end: DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); - return; + return (0); fail: - sc->sc_flags &= ~IWN_FLAG_RUNNING; iwn_stop_locked(sc); + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end in error\n",__func__); + + return (error); } -static void +static int iwn_init(struct iwn_softc *sc) { + int error; IWN_LOCK(sc); - iwn_init_locked(sc); + error = iwn_init_locked(sc); IWN_UNLOCK(sc); - if (sc->sc_flags & IWN_FLAG_RUNNING) - ieee80211_start_all(&sc->sc_ic); + return (error); } static void @@ -8849,6 +8828,9 @@ iwn_stop_locked(struct iwn_softc *sc) IWN_LOCK_ASSERT(sc); + if (!(sc->sc_flags & IWN_FLAG_RUNNING)) + return; + sc->sc_is_scanning = 0; sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Sat Feb 25 00:12:29 2017 (r314233) +++ head/sys/dev/iwn/if_iwnvar.h Sat Feb 25 00:40:50 2017 (r314234) @@ -305,8 +305,7 @@ struct iwn_softc { int sc_cap_off; /* PCIe Capabilities. */ /* Tasks used by the driver */ - struct task sc_radioon_task; - struct task sc_radiooff_task; + struct task sc_rftoggle_task; struct task sc_panic_task; struct task sc_xmit_task; From owner-svn-src-all@freebsd.org Sat Feb 25 00:42: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 0F883CEB1C9; Sat, 25 Feb 2017 00:42:19 +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 D0FC813B6; Sat, 25 Feb 2017 00:42: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 v1P0gHBW049293; Sat, 25 Feb 2017 00:42:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P0gHgp049292; Sat, 25 Feb 2017 00:42:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250042.v1P0gHgp049292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 00:42: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: r314235 - 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: Sat, 25 Feb 2017 00:42:19 -0000 Author: ngie Date: Sat Feb 25 00:42:17 2017 New Revision: 314235 URL: https://svnweb.freebsd.org/changeset/base/314235 Log: MFC r313924,r313925: r313924: Quote path to doxygen/kyua in test(1) -x check This is a basic stopgap against ${LOCALBASE} containing spaces in it r313925: Include ${LOCALBASE}/bin in $PATH when running "make checkworld" Some of the tests in devel/atf // devel/kyua rely on the tools being in $PATH, which means that the tests fail when run via "make checkworld" because $PATH is restricted to exclude directory elements like "${LOCALBASE}/bin". Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sat Feb 25 00:40:50 2017 (r314234) +++ stable/11/Makefile.inc1 Sat Feb 25 00:42:17 2017 (r314235) @@ -1479,11 +1479,11 @@ sign-packages: _pkgbootstrap .PHONY # Run test suite on installed world. # checkworld: .PHONY - @if [ ! -x ${LOCALBASE}/bin/kyua ]; then \ + @if [ ! -x "${LOCALBASE}/bin/kyua" ]; then \ echo "You need kyua (devel/kyua) to run the test suite." | /usr/bin/fmt; \ exit 1; \ fi - ${_+_}${LOCALBASE}/bin/kyua test -k ${TESTSBASE}/Kyuafile + ${_+_}PATH="$$PATH:${LOCALBASE}/bin" kyua test -k ${TESTSBASE}/Kyuafile # # @@ -1492,7 +1492,7 @@ checkworld: .PHONY # Build the API documentation with doxygen # doxygen: .PHONY - @if [ ! -x ${LOCALBASE}/bin/doxygen ]; then \ + @if [ ! -x "${LOCALBASE}/bin/doxygen" ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi From owner-svn-src-all@freebsd.org Sat Feb 25 00:42: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 6CB5BCEB264; Sat, 25 Feb 2017 00:42: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 3B0A3159D; Sat, 25 Feb 2017 00:42: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 v1P0gisC049351; Sat, 25 Feb 2017 00:42:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P0gioU049350; Sat, 25 Feb 2017 00:42:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250042.v1P0gioU049350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 00:42: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: r314236 - 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: Sat, 25 Feb 2017 00:42:45 -0000 Author: ngie Date: Sat Feb 25 00:42:44 2017 New Revision: 314236 URL: https://svnweb.freebsd.org/changeset/base/314236 Log: MFC r313924,r313925: r313924: Quote path to doxygen/kyua in test(1) -x check This is a basic stopgap against ${LOCALBASE} containing spaces in it r313925: Include ${LOCALBASE}/bin in $PATH when running "make checkworld" Some of the tests in devel/atf // devel/kyua rely on the tools being in $PATH, which means that the tests fail when run via "make checkworld" because $PATH is restricted to exclude directory elements like "${LOCALBASE}/bin". Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Feb 25 00:42:17 2017 (r314235) +++ stable/10/Makefile.inc1 Sat Feb 25 00:42:44 2017 (r314236) @@ -1199,11 +1199,11 @@ packagekernel: # Run test suite on installed world. # checkworld: .PHONY - @if [ ! -x ${LOCALBASE}/bin/kyua ]; then \ + @if [ ! -x "${LOCALBASE}/bin/kyua" ]; then \ echo "You need kyua (devel/kyua) to run the test suite." | /usr/bin/fmt; \ exit 1; \ fi - ${_+_}${LOCALBASE}/bin/kyua test -k ${TESTSBASE}/Kyuafile + ${_+_}PATH="$$PATH:${LOCALBASE}/bin" kyua test -k ${TESTSBASE}/Kyuafile # # @@ -1212,7 +1212,7 @@ checkworld: .PHONY # Build the API documentation with doxygen # doxygen: .PHONY - @if [ ! -x ${LOCALBASE}/bin/doxygen ]; then \ + @if [ ! -x "${LOCALBASE}/bin/doxygen" ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi From owner-svn-src-all@freebsd.org Sat Feb 25 01:52: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 27A35CEC269; Sat, 25 Feb 2017 01:52:09 +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 DB36A1224; Sat, 25 Feb 2017 01:52:08 +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 v1P1q72T074552; Sat, 25 Feb 2017 01:52:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P1q7Jc074551; Sat, 25 Feb 2017 01:52:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702250152.v1P1q7Jc074551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 01:52: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: r314237 - 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: Sat, 25 Feb 2017 01:52:09 -0000 Author: mav Date: Sat Feb 25 01:52:07 2017 New Revision: 314237 URL: https://svnweb.freebsd.org/changeset/base/314237 Log: MFC r313910: Change XCOPY memory allocations. Before this change XCOPY code could allocate memory in chunks up to 16-32MB (VMware does XCOPY in 4MB chunks by default), that could be difficult for VM subsystem to do due to KVA fragmentation, that sometimes created huge allocation delays, blocking any I/O for respective LU for that time. This change limits allocations down to TPC_MAX_IO_SIZE, which is 1MB now. 1MB is also not a cookie, but ZFS also can do that for large blocks, so it should be less dramatic. As drawback this increases CPU overhead, but it still look acceptable comparing to time consumed by ZFS read/write. Modified: stable/11/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_tpc.c Sat Feb 25 00:42:44 2017 (r314236) +++ stable/11/sys/cam/ctl/ctl_tpc.c Sat Feb 25 01:52:07 2017 (r314237) @@ -85,6 +85,7 @@ struct tpc_io { uint8_t target; uint32_t cscd; uint64_t lun; + uint8_t *buf; struct tpc_list *list; struct runl run; TAILQ_ENTRY(tpc_io) rlinks; @@ -127,7 +128,6 @@ struct tpc_list { off_t curbytes; int curops; int stage; - uint8_t *buf; off_t segsectors; off_t segbytes; int tbdio; @@ -813,9 +813,9 @@ tpc_process_b2b(struct tpc_list *list) while ((tior = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tior, links); ctl_free_io(tior->io); + free(tior->buf, M_CTL); free(tior, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -874,7 +874,6 @@ tpc_process_b2b(struct tpc_list *list) return (CTL_RETVAL_ERROR); } - list->buf = malloc(numbytes, M_CTL, M_WAITOK); list->segbytes = numbytes; list->segsectors = numbytes / dstblock; donebytes = 0; @@ -894,11 +893,12 @@ tpc_process_b2b(struct tpc_list *list) tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); + tior->buf = malloc(roundbytes, M_CTL, M_WAITOK); tior->list = list; TAILQ_INSERT_TAIL(&list->allio, tior, links); tior->io = tpcl_alloc_io(); ctl_scsi_read_write(tior->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 1, /*byte2*/ 0, @@ -919,7 +919,7 @@ tpc_process_b2b(struct tpc_list *list) TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); ctl_scsi_read_write(tiow->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 0, /*byte2*/ 0, @@ -1029,9 +1029,9 @@ tpc_process_register_key(struct tpc_list while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); ctl_free_io(tio->io); + free(tio->buf, M_CTL); free(tio, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -1064,9 +1064,9 @@ tpc_process_register_key(struct tpc_list TAILQ_INSERT_TAIL(&list->allio, tio, links); tio->io = tpcl_alloc_io(); datalen = sizeof(struct scsi_per_res_out_parms); - list->buf = malloc(datalen, M_CTL, M_WAITOK); + tio->buf = malloc(datalen, M_CTL, M_WAITOK); ctl_scsi_persistent_res_out(tio->io, - list->buf, datalen, SPRO_REGISTER, -1, + tio->buf, datalen, SPRO_REGISTER, -1, scsi_8btou64(seg->res_key), scsi_8btou64(seg->sa_res_key), /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); tio->io->io_hdr.retries = 3; @@ -1166,9 +1166,9 @@ tpc_process_wut(struct tpc_list *list) while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); ctl_free_io(tio->io); + free(tio->buf, M_CTL); free(tio, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -1233,8 +1233,6 @@ tpc_process_wut(struct tpc_list *list) return (CTL_RETVAL_ERROR); } - list->buf = malloc(numbytes, M_CTL, M_WAITOK | - (list->token == NULL ? M_ZERO : 0)); list->segbytes = numbytes; list->segsectors = numbytes / dstblock; //printf("Copy chunk of %ju sectors from %ju to %ju\n", list->segsectors, @@ -1257,11 +1255,12 @@ tpc_process_wut(struct tpc_list *list) tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); + tior->buf = malloc(roundbytes, M_CTL, M_WAITOK); tior->list = list; TAILQ_INSERT_TAIL(&list->allio, tior, links); tior->io = tpcl_alloc_io(); ctl_scsi_read_write(tior->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 1, /*byte2*/ 0, @@ -1280,7 +1279,7 @@ tpc_process_wut(struct tpc_list *list) TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); ctl_scsi_read_write(tiow->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 0, /*byte2*/ 0, From owner-svn-src-all@freebsd.org Sat Feb 25 01:53: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 2EF0ACEC2D7; Sat, 25 Feb 2017 01:53:47 +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 E4108139D; Sat, 25 Feb 2017 01:53: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 v1P1rkt2077668; Sat, 25 Feb 2017 01:53:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P1rkH4077667; Sat, 25 Feb 2017 01:53:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702250153.v1P1rkH4077667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 01:53: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: r314238 - 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: Sat, 25 Feb 2017 01:53:47 -0000 Author: mav Date: Sat Feb 25 01:53:45 2017 New Revision: 314238 URL: https://svnweb.freebsd.org/changeset/base/314238 Log: MFC r313910: Change XCOPY memory allocations. Before this change XCOPY code could allocate memory in chunks up to 16-32MB (VMware does XCOPY in 4MB chunks by default), that could be difficult for VM subsystem to do due to KVA fragmentation, that sometimes created huge allocation delays, blocking any I/O for respective LU for that time. This change limits allocations down to TPC_MAX_IO_SIZE, which is 1MB now. 1MB is also not a cookie, but ZFS also can do that for large blocks, so it should be less dramatic. As drawback this increases CPU overhead, but it still look acceptable comparing to time consumed by ZFS read/write. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Sat Feb 25 01:52:07 2017 (r314237) +++ stable/10/sys/cam/ctl/ctl_tpc.c Sat Feb 25 01:53:45 2017 (r314238) @@ -85,6 +85,7 @@ struct tpc_io { uint8_t target; uint32_t cscd; uint64_t lun; + uint8_t *buf; struct tpc_list *list; struct runl run; TAILQ_ENTRY(tpc_io) rlinks; @@ -127,7 +128,6 @@ struct tpc_list { off_t curbytes; int curops; int stage; - uint8_t *buf; off_t segsectors; off_t segbytes; int tbdio; @@ -813,9 +813,9 @@ tpc_process_b2b(struct tpc_list *list) while ((tior = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tior, links); ctl_free_io(tior->io); + free(tior->buf, M_CTL); free(tior, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -874,7 +874,6 @@ tpc_process_b2b(struct tpc_list *list) return (CTL_RETVAL_ERROR); } - list->buf = malloc(numbytes, M_CTL, M_WAITOK); list->segbytes = numbytes; list->segsectors = numbytes / dstblock; donebytes = 0; @@ -894,11 +893,12 @@ tpc_process_b2b(struct tpc_list *list) tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); + tior->buf = malloc(roundbytes, M_CTL, M_WAITOK); tior->list = list; TAILQ_INSERT_TAIL(&list->allio, tior, links); tior->io = tpcl_alloc_io(); ctl_scsi_read_write(tior->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 1, /*byte2*/ 0, @@ -919,7 +919,7 @@ tpc_process_b2b(struct tpc_list *list) TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); ctl_scsi_read_write(tiow->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 0, /*byte2*/ 0, @@ -1029,9 +1029,9 @@ tpc_process_register_key(struct tpc_list while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); ctl_free_io(tio->io); + free(tio->buf, M_CTL); free(tio, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -1064,9 +1064,9 @@ tpc_process_register_key(struct tpc_list TAILQ_INSERT_TAIL(&list->allio, tio, links); tio->io = tpcl_alloc_io(); datalen = sizeof(struct scsi_per_res_out_parms); - list->buf = malloc(datalen, M_CTL, M_WAITOK); + tio->buf = malloc(datalen, M_CTL, M_WAITOK); ctl_scsi_persistent_res_out(tio->io, - list->buf, datalen, SPRO_REGISTER, -1, + tio->buf, datalen, SPRO_REGISTER, -1, scsi_8btou64(seg->res_key), scsi_8btou64(seg->sa_res_key), /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); tio->io->io_hdr.retries = 3; @@ -1166,9 +1166,9 @@ tpc_process_wut(struct tpc_list *list) while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); ctl_free_io(tio->io); + free(tio->buf, M_CTL); free(tio, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -1233,8 +1233,6 @@ tpc_process_wut(struct tpc_list *list) return (CTL_RETVAL_ERROR); } - list->buf = malloc(numbytes, M_CTL, M_WAITOK | - (list->token == NULL ? M_ZERO : 0)); list->segbytes = numbytes; list->segsectors = numbytes / dstblock; //printf("Copy chunk of %ju sectors from %ju to %ju\n", list->segsectors, @@ -1257,11 +1255,12 @@ tpc_process_wut(struct tpc_list *list) tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); + tior->buf = malloc(roundbytes, M_CTL, M_WAITOK); tior->list = list; TAILQ_INSERT_TAIL(&list->allio, tior, links); tior->io = tpcl_alloc_io(); ctl_scsi_read_write(tior->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 1, /*byte2*/ 0, @@ -1280,7 +1279,7 @@ tpc_process_wut(struct tpc_list *list) TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); ctl_scsi_read_write(tiow->io, - /*data_ptr*/ &list->buf[donebytes], + /*data_ptr*/ tior->buf, /*data_len*/ roundbytes, /*read_op*/ 0, /*byte2*/ 0, From owner-svn-src-all@freebsd.org Sat Feb 25 02:05: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 6D136CEC4C4; Sat, 25 Feb 2017 02:05:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 19791183A; Sat, 25 Feb 2017 02:05:17 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 8C9A43CAF74; Sat, 25 Feb 2017 13:05:14 +1100 (AEDT) Date: Sat, 25 Feb 2017 13:05:14 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314179 - in head: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include share/man/man3 sys/kern In-Reply-To: <20170224082731.GT2092@kib.kiev.ua> Message-ID: <20170225111845.S1026@besplex.bde.org> References: <201702231936.v1NJadRa029404@repo.freebsd.org> <20170224082731.GT2092@kib.kiev.ua> 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=Ca543Pjl c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=5sy2TOZFcCSr07xv5CcA: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: Sat, 25 Feb 2017 02:05:18 -0000 On Fri, 24 Feb 2017, Konstantin Belousov wrote: > On Thu, Feb 23, 2017 at 07:36:39PM +0000, Eric van Gyzen wrote: >> Modified: head/include/semaphore.h >> ============================================================================== >> --- head/include/semaphore.h Thu Feb 23 19:32:25 2017 (r314178) >> +++ head/include/semaphore.h Thu Feb 23 19:36:38 2017 (r314179) >> @@ -59,6 +59,8 @@ int sem_init(sem_t *, int, unsigned int >> sem_t *sem_open(const char *, int, ...); >> int sem_post(sem_t *); >> int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict); >> +int sem_clockwait_np(sem_t * __restrict, __clockid_t, int, >> + const struct timespec *, struct timespec *); > I argue that semaphore.h is POSIX include file and the declaration of > sem_clockwait_np(), despite being in implementation (non-portable) > namespace, still should be braced with #if __BSD_VISIBLE. This declaration also unsorts the list. Similarly in the man page, except at least 4 shorter lists are unsorted and sorting them would hide the primary API. This declaration has rather too much pollution avoidance. It is almost unusable without including another header that declares clockid_t, and of course the man page gives not even a hint about this. The implementation and POSIX has or had the same bug for sem_timewait(). That uses struct timespec, but in the 2001 version wasn't required to declare struct timespec. The 2007 draft version is even worse. It still doesn't require to declare struct timespec, but allows to be polluted with all the symbols in . I haven't checked later versions. POSIX generally "fixes" such bugs by requiring declarations of all relevant types but allowing low quality implemenations to do this by including massive pollution. At least it documents the pollution. I don't like multiple functions per man page. mostly has separate ones. It has 11 functions and at least 8 separate man pages. Details like extra headers being needed are easier to organize in separate man pages (but both clockid_t and struct timespec need the same man page ). >> int sem_trywait(sem_t *); >> int sem_unlink(const char *); >> int sem_wait(sem_t *); FreeBSD is still missing clock_nanosleep(), and has a broken nanosleep() that sleeps on a wrong clock id. I would have thought that this standard function was needed more than a nonstandard semaphore function. Eric even mentioned clock_nanosleep() in the commit log. Interestingly, sem_timedwait() is not broken like nanosleep(). POSIX specifies that both sleep on CLOCK_REALTIME. It isn't clear what this means if someone steps the clock to adjust it, but it clearly requires jumping by a second or 2 for leap seconds, and the implementation doesn't do that very well (it should wake up a second or 2 early in case there is a leap second, or for long sleeps a few percent early in case there is clock drift, then micro-sleep to the final time). kern_sem_wait() uses an old-style wait loop with the right clock id but a low precision (getnanotime() uses CLOCK_REALTIME_FAST, not CLOCK_REALTIME, so its id is not quite right either). nanosleep() originally used the wrong clock id CLOCK_MONOTONIC_FAST via getnanotime() in an old-style wait loop. Now it uses sbintimes via tsleep_sbt(). Sbintime APIs only support monotonic clocks, so changing to the correct clock is not so easy. POSIX timers seem to be little used, and the POSIX timer code that supports clock ids and absolute times hasn't been converted to use sbintimes. It uses kernel timeouts, which are fundamentally based on monotonic clocks, and isn't careful to wake up early to handle leap seconds or drift. The benefit from using sbintimes for nanosleep() seems to be just that you can avoid reqesting a high precision, and with a little more precision control you could reqest an early wakeup. IIRC, the current precision control is biased towards waking up late, and in a keyboard function I had to fudge it to wake up early or late with no bias, but in nanosleep() early wakeups would be preferred and for long timeouts and timeouts across clock steps early wakeups should be mandatory. This shows a good way to handle all clock steps: wake up immediately to let the wait loop check the time and usually restart. Only higher levels can know the correct handling. They should already be prepared for early wakeups because these are caused by interrupts. kern_sem_wait() does check after an interrupt, but not after a timeout (it assumes that timeouts in hz ticks with the monotonic hz clock are accurate for the CLOCK_REALTIME[_FAST] timecounter clock). kern_nanosleep() used to check after a timeout, but it now depends on timeouts in sbintimes with the monotonic sbintime clock being accurate... The sbintime clock is essentially CLOCK_MONOTONIC_[FAST], so it is accurate enough, but with a wrong clock id. Bruce From owner-svn-src-all@freebsd.org Sat Feb 25 03:11: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 16EBBCEB764; Sat, 25 Feb 2017 03:11: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 C6A0F196B; Sat, 25 Feb 2017 03:11:09 +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 v1P3B8wP008307; Sat, 25 Feb 2017 03:11:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3B89W008306; Sat, 25 Feb 2017 03:11:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250311.v1P3B89W008306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 03:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314239 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:11:10 -0000 Author: ngie Date: Sat Feb 25 03:11:08 2017 New Revision: 314239 URL: https://svnweb.freebsd.org/changeset/base/314239 Log: Add shutdown/poweroff support to rescue(8) shutdown is a safer way to power off than reboot (in general), because of the added shutdown process that it executes via /etc/rc.shutdown . It was odd that it was missing from rescue(8) since reboot and friends were added in past commits. While here, alias poweroff to shutdown for parity with sbin/shutdown/Makefile MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sat Feb 25 01:53:45 2017 (r314238) +++ head/rescue/rescue/Makefile Sat Feb 25 03:11:08 2017 (r314239) @@ -99,7 +99,7 @@ CRUNCH_PROGS_sbin= badsect \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ restore rcorder route routed rtquery rtsol savecore \ - spppcontrol swapon sysctl tunefs umount + shutdown spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" CRUNCH_PROGS_sbin+= atmconfig @@ -166,6 +166,7 @@ CRUNCH_ALIAS_restore= rrestore CRUNCH_ALIAS_dump= rdump CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs CRUNCH_ALIAS_geom= glabel gpart +CRUNCH_ALIAS_shutdown= poweroff # dhclient has historically been troublesome... CRUNCH_PROGS_sbin+= dhclient From owner-svn-src-all@freebsd.org Sat Feb 25 03:17: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 E0831CEB815; Sat, 25 Feb 2017 03:17:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 911B61D62; Sat, 25 Feb 2017 03:17:32 +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 mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 63B3ED4DFD4; Sat, 25 Feb 2017 14:17:23 +1100 (AEDT) Date: Sat, 25 Feb 2017 14:17:23 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314087 - head/sys/x86/x86 In-Reply-To: <20170224125335.GV2092@kib.kiev.ua> Message-ID: <20170225130549.C1026@besplex.bde.org> References: <201702220707.v1M7764i020598@repo.freebsd.org> <20170223053954.J1044@besplex.bde.org> <20170224125335.GV2092@kib.kiev.ua> 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=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=Wprkr_MR3Ar5J1-hRocA:9 a=yrhAz4GM2nK4HfPb:21 a=No_fGCopjTXwDP6x:21 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: Sat, 25 Feb 2017 03:17:33 -0000 On Fri, 24 Feb 2017, Konstantin Belousov wrote: > On Thu, Feb 23, 2017 at 06:33:43AM +1100, Bruce Evans wrote: >> On Wed, 22 Feb 2017, Konstantin Belousov wrote: >> >>> Log: >>> More fixes for regression in r313898 on i386. >>> Use long long constants where needed. >> >> The long long abomination is never needed, and is always a style bug. > I never saw any explanation behind this claim. Esp. the first part > of it, WRT 'never needed'. I hope I wrote enough about this in log messages when I cleaned up the long longs 20 years ago :-). long long was a hack to work around intmax_t not existing and long being unexpandable in practice because it was used in ABIs. It should have gone away when intmax_t was standardized. Unfortunately, long long was standardised too. It is "never needed" since anything that can be done with it can be done better using intmax_t or intN_t or int_fastN_T or int_leastN_t. Except, there is no suffix for explicit intmax_t constants, so you would have to write such constants using INTMAX_C() or better a cast to intmax_t if the constant is not needed in a cpp expression. >> I don't like using explicit long constants either. Here the number of bits >> in the register is fixed by the hardware at 64. The number of bits in a >> long on amd64 and a long on i386 is only fixed by ABI because the ABI is >> broken for historical reasons. > I really cannot make any sense of this statement. To know that the ULL suffix is correct for 64-bit types, you have to now that long longs are 64 bits on all arches supported by the code. Then to use this suffix, you have to hard-code this knowledge. Then to read the code, the reader has to translate back to 64 bits. The translations were easier 1 arch at a time. Casting to uint64_t is clearer, but doesn't work in cpp expressions. In cpp expressions, use UINT64_C(). Almost no one knows about it uses this. There are 5 examples of using it in /sys (3 in arm64 pte.h, 1 in powerpc pte.h, and 1 in mips xlr_machdep.c, where the use is unnecessary but interesting: it is ~UINT64_C(0). We used to have squillions of magic ~0's for the rman max limit. This was spelled ~0U, ~0UL and perhaps even plain ~0. Plain ~0 worked best except on unsupported 1's complement machines, since it normally gets sign extended to as many bits as necessary. Now this is spelled RM_MAX_END, which is implemented non-magically using a cast: (~(rman_res_t)0). Grepping for ~0[uU] in dev/* shows only 1 obvious unconverted place. >> Only very MD code can safely assume the >> size of long and long long. This code was MD enough before it was merged, >> but now it shouldn't use long since that varies between amd64 and i386, >> and it shouldn't use long long since that is a style bug. > > Well, I do not see anything wrong with long long, at least until > explained. > > Anyway, below is the patch to use uint64_t cast in important place, > and removal of LL suffix in unimportant expression. This is correct. > diff --git a/sys/x86/x86/x86_mem.c b/sys/x86/x86/x86_mem.c > index d639224f840..8bc4d3917a0 100644 > --- a/sys/x86/x86/x86_mem.c > +++ b/sys/x86/x86/x86_mem.c > @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) > > /* Compute the range from the mask. Ick. */ > mrd->mr_len = (~(msrv & mtrr_physmask) & > - (mtrr_physmask | 0xfffLL)) + 1; > + (mtrr_physmask | 0xfff)) + 1; > if (!mrvalid(mrd->mr_base, mrd->mr_len)) > mrd->mr_flags |= MDF_BOGUS; > > @@ -638,7 +638,8 @@ x86_mrinit(struct mem_range_softc *sc) > * Determine the size of the PhysMask and PhysBase fields in > * the variable range MTRRs. > */ > - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; > + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & > + ~(uint64_t)0xfff; > > /* If fixed MTRRs supported and enabled. */ > if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { Now I wonder what these magic 0xfff's are. Are they PAGE_MASK, where the register is encoded like a page table to put metadata in the low bits? There is already a macro MTRR_PHYSBASE_PHYSMASK which looks like it should be used here, except it is zero in the top 12 bits too. There is no macro for 0xfff, but you get that by ORing the bits for other macros. 0xfff is just as readable. The MTRR_* macros are in x86/specialreg.h, and are spelled without ULL suffixes. I prefer the latter, but seem to rememeber bugs elsewhere caused by using expressions like ~FOO where FOO happens to be small. Actually the problems are mostly when FOO happens to be between INT_MAX+1U and UINT_MAX. When FOO is small and has no suffix, e.g., if it is 0, then its type is int and ~FOO has type int and sign-extends to 64 bits if necessary. But if FOO is say 0x80000000, it has type u_int so ~FOO doesn't sign-extend. (Decimal constants without a suffix never have an unsigned type and the hex constant here lets me write this number and automatically give it an unsigned type. Normally this type is best.) Explicit type suffixes mainly hide these problems. If FOO is 0x80000000ULL, then it has the correct type for ~FOO to work in expressions where everything has type unsigned long long, but in other expressions a cast might still be needed. Bruce From owner-svn-src-all@freebsd.org Sat Feb 25 03: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 26B94CEB8C8; Sat, 25 Feb 2017 03:20:07 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 CF2461ECD; Sat, 25 Feb 2017 03:20:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id hStwcDZYysa1khStxc8mcy; Fri, 24 Feb 2017 20:20:05 -0700 X-Authority-Analysis: v=2.2 cv=W+NIbVek 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=2F5m3MzYjF7Il7eBOSIA: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 DC7BDF8; Fri, 24 Feb 2017 19:20:03 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1P3K3um004893; Fri, 24 Feb 2017 19:20:03 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702250320.v1P3K3um004893@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: Adrian Chadd cc: Cy Schubert , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r314192 - in head/sys: conf dev/iwm modules/iwm In-Reply-To: Message from Adrian Chadd of "Fri, 24 Feb 2017 07:39:32 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Feb 2017 19:20:03 -0800 X-CMAE-Envelope: MS4wfKkc4IthUkTOFwHcFWEgrBoKcXBr6GOBnzAXsYZSHtl678LkQ3ICNMJwS4MUBw5Pwz/helpcHYbf4qAGwZ9vDTVARZqvgiddHnXSP1An/nuTWCaisZxt tMYtD8M2QbC/HtM33Tg0Mnm0dCtjG2iqClrQDvIO74214qlzwm7A0+TUFyk/EVmfyOKPXeNeeRLKv25iz2XwNDKEFOe++LKSFFotijCbjWfnQNJoc2rdGUCI 4XGPMJosMwD51Slj1T7H2IXWwDCVjwTJjgrxqhtpjIIvjWOLzBLRSyYH9LSJSzmT X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:20:07 -0000 Cool! Thanks. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message , Adrian Chadd writes: > Fixed! > > > -a > > > On 24 February 2017 at 06:10, Cy Schubert wrote: > > In message <201702240707.v1O77wAs011110@repo.freebsd.org>, Adrian Chadd > > writes: > >> Author: adrian > >> Date: Fri Feb 24 07:07:58 2017 > >> New Revision: 314192 > >> URL: https://svnweb.freebsd.org/changeset/base/314192 > >> > >> Log: > >> [iwm] Add support for Firmware paging, needed for newer 8000C firmware. > >> > >> * Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware > >> what memory ranges to use for paging. > >> > >> Obtained from: dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b4 > 02f > >> 18 > >> > >> Modified: > >> head/sys/conf/files > >> head/sys/dev/iwm/if_iwm.c > >> head/sys/dev/iwm/if_iwm_debug.h > >> head/sys/dev/iwm/if_iwmreg.h > >> head/sys/dev/iwm/if_iwmvar.h > >> head/sys/modules/iwm/Makefile > > > > Looks like you forgot svn add. > > > > --- all_subdir_iwm --- > > make[4]: make[4]: don't know how to make if_iwm_fw.c. Stop > > > > make[4]: stopped in /opt/src/svn-current/sys/modules/iwm > > *** [all_subdir_iwm] Error code 2 > > > > make[3]: stopped in /opt/src/svn-current/sys/modules > > > > > > -- > > 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 Sat Feb 25 03:22: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 53C36CEBA8F; Sat, 25 Feb 2017 03:22:36 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 095E638A; Sat, 25 Feb 2017 03:22:35 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id hSwLcDaKFsa1khSwMc8nDT; Fri, 24 Feb 2017 20:22:35 -0700 X-Authority-Analysis: v=2.2 cv=W+NIbVek 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=s9xSdIHDodU6CmG84C8A:9 a=CjuIK1q_8ugA:10 a=2HRX3DRajJwA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id AD0B5106; Fri, 24 Feb 2017 19:22:33 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v1P3MXhs004924; Fri, 24 Feb 2017 19:22:33 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702250322.v1P3MXhs004924@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: Adrian Chadd cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r314209 - head/sys/dev/iwm In-Reply-To: Message from Adrian Chadd of "Fri, 24 Feb 2017 10:57:37 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Feb 2017 19:22:33 -0800 X-CMAE-Envelope: MS4wfBCOuOngn9hJBUGGbF6FkM2RSj02o18JX904jA/HfbJ8QA9fbd+KQK/hHENgA/qL8dqEvK5ZEGgfU09JVBW0FDaPq+iipqta/fOaUkftViw8L/ttWyFu sXupRD8LxokjuPFZDRxZWxsS5B+4aDE8irliCnkkgPz3G/9OpcYKMErpcIKiRupAhf0XmdtFVhXJRnUfN7KsT1FdZ1R/HUyZu/C8Mg6xKGX94t4KRcC5CpfY GNryaHMXlMAIHk/8fDx55KVNpibqQNl0r6XaApolpHZkxWTTpCMV+S//1M9ChLcy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:22:36 -0000 In message , Adrian Chadd writes: > [snip] > > (adrian ran out of coffee at home three days ago.) I make sure I have lots of the stuff here. I can't survive without my 4-shot Americanos. -- 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 Sat Feb 25 03:23: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 D1B06CEBAFE; Sat, 25 Feb 2017 03:23: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 87CCB74E; Sat, 25 Feb 2017 03:23: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 v1P3NBZg014832; Sat, 25 Feb 2017 03:23:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3NB0G014830; Sat, 25 Feb 2017 03:23:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250323.v1P3NB0G014830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 03:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314240 - in head: rescue/rescue tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:23:12 -0000 Author: ngie Date: Sat Feb 25 03:23:11 2017 New Revision: 314240 URL: https://svnweb.freebsd.org/changeset/base/314240 Log: Conditionally compile certain programs into rescue(8) if requested MK_CCD - ccdconfig MK_ROUTED - routed, rtquery MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/rescue/rescue/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sat Feb 25 03:11:08 2017 (r314239) +++ head/rescue/rescue/Makefile Sat Feb 25 03:23:11 2017 (r314240) @@ -90,7 +90,7 @@ CRUNCH_SUPPRESS_LINK_-tcsh= 1 # CRUNCH_SRCDIRS+= sbin CRUNCH_PROGS_sbin= badsect \ - camcontrol ccdconfig clri devfs dmesg dump \ + camcontrol clri devfs dmesg dump \ dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \ fsirand gbde geom ifconfig init \ kldconfig kldload kldstat kldunload ldconfig \ @@ -98,13 +98,17 @@ CRUNCH_PROGS_sbin= badsect \ mount_msdosfs mount_nfs mount_nullfs \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ - restore rcorder route routed rtquery rtsol savecore \ + restore rcorder route rtsol savecore \ shutdown spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" CRUNCH_PROGS_sbin+= atmconfig .endif +.if ${MK_CCD} != "no" +CRUNCH_PROGS_sbin+= ccdconfig +.endif + .if ${MK_INET6_SUPPORT} != "no" CRUNCH_PROGS_sbin+= ping6 .endif @@ -112,6 +116,11 @@ CRUNCH_PROGS_sbin+= ping6 .if ${MK_IPFILTER} != "no" CRUNCH_PROGS_sbin+= ipf .endif + +.if ${MK_ROUTED} != "no" +CRUNCH_PROGS_sbin+= routed rtquery +.endif + .if ${MK_ZFS} != "no" CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:11:08 2017 (r314239) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:23:11 2017 (r314240) @@ -1197,6 +1197,7 @@ OLD_FILES+=usr/share/man/man8/casperd.8. .if ${MK_CCD} == no OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=rescue/ccdconfig OLD_FILES+=sbin/ccdconfig OLD_FILES+=usr/share/man/man4/ccd.4.gz OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz @@ -7466,6 +7467,8 @@ OLD_FILES+=usr/share/man/man8/rwhod.8.gz #.endif .if ${MK_ROUTED} == no +OLD_FILES+=rescue/routed +OLD_FILES+=rescue/rtquery OLD_FILES+=sbin/routed OLD_FILES+=sbin/rtquery OLD_FILES+=usr/share/man/man8/routed.8.gz From owner-svn-src-all@freebsd.org Sat Feb 25 03:28: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 95C1CCEBBA4; Sat, 25 Feb 2017 03:28: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 62A04900; Sat, 25 Feb 2017 03:28: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 v1P3SnDt015094; Sat, 25 Feb 2017 03:28:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3Snhb015093; Sat, 25 Feb 2017 03:28:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250328.v1P3Snhb015093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 03:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314241 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:28:50 -0000 Author: ngie Date: Sat Feb 25 03:28:49 2017 New Revision: 314241 URL: https://svnweb.freebsd.org/changeset/base/314241 Log: Fill in MK_RESCUE by finding paths in ${DESTDIR}/rescue and adding them to OLD_FILES/OLD_DIRS, as necessary. MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:23:11 2017 (r314240) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:28:49 2017 (r314241) @@ -7462,9 +7462,14 @@ OLD_FILES+=usr/share/man/man8/rshd.8.gz OLD_FILES+=usr/share/man/man8/rwhod.8.gz .endif -#.if ${MK_RESCUE} == no -# to be filled in or replaced with a special target -#.endif +.if ${MK_RESCUE} == no +. if exists(${DESTDIR}${TESTSBASE}) +RESCUE_DIRS!=find ${DESTDIR}/rescue -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${RESCUE_DIRS} +RESCUE_FILES!=find ${DESTDIR}/rescue \! -type d | sed -e 's,^${DESTDIR}/,,'; echo +OLD_FILES+=${RESCUE_FILES} +. endif +.endif .if ${MK_ROUTED} == no OLD_FILES+=rescue/routed From owner-svn-src-all@freebsd.org Sat Feb 25 03:33: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 1C698CEBDCF; Sat, 25 Feb 2017 03:33: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 DD877CE1; Sat, 25 Feb 2017 03:33: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 v1P3X9He018821; Sat, 25 Feb 2017 03:33:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3X9UO018820; Sat, 25 Feb 2017 03:33:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250333.v1P3X9UO018820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 03:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314242 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:33:11 -0000 Author: ngie Date: Sat Feb 25 03:33:09 2017 New Revision: 314242 URL: https://svnweb.freebsd.org/changeset/base/314242 Log: Remove MK_CRYPT stub It doesn't directly control what gets installed today; it indirectly pulls other knobs (like MK_KERBEROS, etc). MFC after: 1 weeks Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:28:49 2017 (r314241) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:33:09 2017 (r314242) @@ -1515,10 +1515,6 @@ OLD_FILES+=usr/bin/cpp OLD_FILES+=usr/share/man/man1/cpp.1.gz .endif -#.if ${MK_CRYPT} == no -# to be filled in -#.endif - .if ${MK_CTM} == no OLD_FILES+=usr/sbin/ctm OLD_FILES+=usr/sbin/ctm_dequeue From owner-svn-src-all@freebsd.org Sat Feb 25 03:34: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 D4ABCCEBEB0; Sat, 25 Feb 2017 03:34:24 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB42E3F; Sat, 25 Feb 2017 03:34:24 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1P3YNgM018912; Sat, 25 Feb 2017 03:34:23 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3YMT3018903; Sat, 25 Feb 2017 03:34:22 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201702250334.v1P3YMT3018903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sat, 25 Feb 2017 03:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314243 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:34:24 -0000 Author: jpaetzel Date: Sat Feb 25 03:34:22 2017 New Revision: 314243 URL: https://svnweb.freebsd.org/changeset/base/314243 Log: 6676 Race between unique_insert() and unique_remove() causes ZFS fsid change illumos/illumos-gate@40510e8eba18690b9a9843b26393725eeb0f1dac https://github.com/illumos/illumos-gate/commit/40510e8eba18690b9a9843b26393725eeb0f1dac https://www.illumos.org/issues/6676 The fsid of zfs filesystems might change after reboot or remount. The problem seems to be caused by a race between unique_insert() and unique_remove(). The unique_remove() is called from dsl_dataset_evict() which is now an asynchronous thread. In a case the dsl_dataset_evict() thread is very slow and calls unique_remove() too late we will end up with changed fsid on zfs mount. This problem is very likely caused by #5056. Steps to Reproduce Note: I'm able to reproduce this always on a single core (virtual) machine. On multicore machines it is not so easy to reproduce. # uname -a SunOS openindiana 5.11 illumos-633aa80 i86pc i386 i86pc Solaris # zfs create rpool/TEST # FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}') # echo $FS::print vfs_t vfs_fsid | mdb -k vfs_fsid = { vfs_fsid.val = [ 0x54d7028a, 0x70311508 ] } # zfs umount rpool/TEST # zfs mount rpool/TEST # FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}') # echo $FS::print vfs_t vfs_fsid | mdb -k vfs_fsid = { vfs_fsid.val = [ 0xd9454e49, 0x6b36d08 ] } # Impact The persistent fsid (filesystem id) is essential for proper NFS functionality. If the fsid of a filesystem changes on remount (or after reboot) the NFS clients might not be able to automatically recover from such event and the manual remount of the NFS filesystems on every NFS client might be needed. Author: Josef 'Jeff' Sipek Reviewed by: Saso Kiselkov Reviewed by: Sanjay Nadkarni Reviewed by: Dan Vatca Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Sebastien Roy Approved by: Robert Mustacchi Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Feb 25 03:34:22 2017 (r314243) @@ -54,7 +54,9 @@ static void dbuf_write(dbuf_dirty_record #ifndef __lint extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu, - dmu_buf_evict_func_t *evict_func, dmu_buf_t **clear_on_evict_dbufp); + dmu_buf_evict_func_t *evict_func_sync, + dmu_buf_evict_func_t *evict_func_async, + dmu_buf_t **clear_on_evict_dbufp); #endif /* ! __lint */ /* @@ -361,11 +363,24 @@ dbuf_evict_user(dmu_buf_impl_t *db) #endif /* - * Invoke the callback from a taskq to avoid lock order reversals - * and limit stack depth. - */ - taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func, dbu, 0, - &dbu->dbu_tqent); + * There are two eviction callbacks - one that we call synchronously + * and one that we invoke via a taskq. The async one is useful for + * avoiding lock order reversals and limiting stack depth. + * + * Note that if we have a sync callback but no async callback, + * it's likely that the sync callback will free the structure + * containing the dbu. In that case we need to take care to not + * dereference dbu after calling the sync evict func. + */ + boolean_t has_async = (dbu->dbu_evict_func_async != NULL); + + if (dbu->dbu_evict_func_sync != NULL) + dbu->dbu_evict_func_sync(dbu); + + if (has_async) { + taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func_async, + dbu, 0, &dbu->dbu_tqent); + } } boolean_t Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Feb 25 03:34:22 2017 (r314243) @@ -1009,7 +1009,7 @@ dnode_special_open(objset_t *os, dnode_p } static void -dnode_buf_pageout(void *dbu) +dnode_buf_evict_async(void *dbu) { dnode_children_t *children_dnodes = dbu; int i; @@ -1135,8 +1135,8 @@ dnode_hold_impl(objset_t *os, uint64_t o for (i = 0; i < epb; i++) { zrl_init(&dnh[i].dnh_zrlock); } - dmu_buf_init_user(&children_dnodes->dnc_dbu, - dnode_buf_pageout, NULL); + dmu_buf_init_user(&children_dnodes->dnc_dbu, NULL, + dnode_buf_evict_async, NULL); winner = dmu_buf_set_user(&db->db, &children_dnodes->dnc_dbu); if (winner != NULL) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Feb 25 03:34:22 2017 (r314243) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -272,16 +272,30 @@ dsl_dataset_block_freeable(dsl_dataset_t return (B_TRUE); } +/* + * We have to release the fsid syncronously or we risk that a subsequent + * mount of the same dataset will fail to unique_insert the fsid. This + * failure would manifest itself as the fsid of this dataset changing + * between mounts which makes NFS clients quite unhappy. + */ static void -dsl_dataset_evict(void *dbu) +dsl_dataset_evict_sync(void *dbu) { dsl_dataset_t *ds = dbu; ASSERT(ds->ds_owner == NULL); - ds->ds_dbuf = NULL; - unique_remove(ds->ds_fsid_guid); +} + +static void +dsl_dataset_evict_async(void *dbu) +{ + dsl_dataset_t *ds = dbu; + + ASSERT(ds->ds_owner == NULL); + + ds->ds_dbuf = NULL; if (ds->ds_objset != NULL) dmu_objset_evict(ds->ds_objset); @@ -517,7 +531,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds->ds_reserved = ds->ds_quota = 0; } - dmu_buf_init_user(&ds->ds_dbu, dsl_dataset_evict, &ds->ds_dbuf); + dmu_buf_init_user(&ds->ds_dbu, dsl_dataset_evict_sync, + dsl_dataset_evict_async, &ds->ds_dbuf); if (err == 0) winner = dmu_buf_set_user_ie(dbuf, &ds->ds_dbu); @@ -540,6 +555,16 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } else { ds->ds_fsid_guid = unique_insert(dsl_dataset_phys(ds)->ds_fsid_guid); + if (ds->ds_fsid_guid != + dsl_dataset_phys(ds)->ds_fsid_guid) { + zfs_dbgmsg("ds_fsid_guid changed from " + "%llx to %llx for pool %s dataset id %llu", + (long long) + dsl_dataset_phys(ds)->ds_fsid_guid, + (long long)ds->ds_fsid_guid, + spa_name(dp->dp_spa), + dsobj); + } } } ASSERT3P(ds->ds_dbuf, ==, dbuf); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Sat Feb 25 03:34:22 2017 (r314243) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2013 Martin Matuska. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -128,7 +128,7 @@ extern inline dsl_dir_phys_t *dsl_dir_ph static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd); static void -dsl_dir_evict(void *dbu) +dsl_dir_evict_async(void *dbu) { dsl_dir_t *dd = dbu; dsl_pool_t *dp = dd->dd_pool; @@ -235,7 +235,8 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_ dmu_buf_rele(origin_bonus, FTAG); } - dmu_buf_init_user(&dd->dd_dbu, dsl_dir_evict, &dd->dd_dbuf); + dmu_buf_init_user(&dd->dd_dbu, NULL, dsl_dir_evict_async, + &dd->dd_dbuf); winner = dmu_buf_set_user_ie(dbuf, &dd->dd_dbu); if (winner != NULL) { if (dd->dd_parent) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c Sat Feb 25 03:34:22 2017 (r314243) @@ -22,7 +22,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 iXsystems, Inc - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -1296,7 +1296,7 @@ sa_build_index(sa_handle_t *hdl, sa_buf_ /*ARGSUSED*/ static void -sa_evict(void *dbu) +sa_evict_sync(void *dbu) { panic("evicting sa dbuf\n"); } @@ -1380,7 +1380,8 @@ sa_handle_get_from_db(objset_t *os, dmu_ sa_handle_t *winner = NULL; handle = kmem_cache_alloc(sa_cache, KM_SLEEP); - handle->sa_dbu.dbu_evict_func = NULL; + handle->sa_dbu.dbu_evict_func_sync = NULL; + handle->sa_dbu.dbu_evict_func_async = NULL; handle->sa_userp = userp; handle->sa_bonus = db; handle->sa_os = os; @@ -1391,7 +1392,8 @@ sa_handle_get_from_db(objset_t *os, dmu_ error = sa_build_index(handle, SA_BONUS); if (hdl_type == SA_HDL_SHARED) { - dmu_buf_init_user(&handle->sa_dbu, sa_evict, NULL); + dmu_buf_init_user(&handle->sa_dbu, sa_evict_sync, NULL, + NULL); winner = dmu_buf_set_user_ie(db, &handle->sa_dbu); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h Sat Feb 25 03:34:22 2017 (r314243) @@ -537,8 +537,14 @@ typedef struct dmu_buf_user { */ taskq_ent_t dbu_tqent; - /* This instance's eviction function pointer. */ - dmu_buf_evict_func_t *dbu_evict_func; + /* + * This instance's eviction function pointers. + * + * dbu_evict_func_sync is called synchronously and then + * dbu_evict_func_async is executed asynchronously on a taskq. + */ + dmu_buf_evict_func_t *dbu_evict_func_sync; + dmu_buf_evict_func_t *dbu_evict_func_async; #ifdef ZFS_DEBUG /* * Pointer to user's dbuf pointer. NULL for clients that do @@ -562,15 +568,19 @@ typedef struct dmu_buf_user { /* Very ugly, but it beats issuing suppression directives in many Makefiles. */ extern void dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_t **clear_on_evict_dbufp); + dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp); #else /* __lint */ inline void -dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_t **clear_on_evict_dbufp) +dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, + dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) { - ASSERT(dbu->dbu_evict_func == NULL); - ASSERT(evict_func != NULL); - dbu->dbu_evict_func = evict_func; + ASSERT(dbu->dbu_evict_func_sync == NULL); + ASSERT(dbu->dbu_evict_func_async == NULL); + + /* must have at least one evict func */ + IMPLY(evict_func_sync == NULL, evict_func_async != NULL); + dbu->dbu_evict_func_sync = evict_func_sync; + dbu->dbu_evict_func_async = evict_func_async; #ifdef ZFS_DEBUG dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp; #endif Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h Sat Feb 25 03:34:22 2017 (r314243) @@ -199,7 +199,7 @@ boolean_t zap_match(zap_name_t *zn, cons int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp); void zap_unlockdir(zap_t *zap, void *tag); -void zap_evict(void *dbu); +void zap_evict_sync(void *dbu); zap_name_t *zap_name_alloc(zap_t *zap, const char *key, matchtype_t mt); void zap_name_free(zap_name_t *zn); int zap_hashbits(zap_t *zap); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c Sat Feb 25 03:34:22 2017 (r314243) @@ -81,7 +81,8 @@ fzap_upgrade(zap_t *zap, dmu_tx_t *tx, z ASSERT(RW_WRITE_HELD(&zap->zap_rwlock)); zap->zap_ismicro = FALSE; - zap->zap_dbu.dbu_evict_func = zap_evict; + zap->zap_dbu.dbu_evict_func_sync = zap_evict_sync; + zap->zap_dbu.dbu_evict_func_async = NULL; mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0); zap->zap_f.zap_block_shift = highbit64(zap->zap_dbuf->db_size) - 1; @@ -399,7 +400,7 @@ zap_allocate_blocks(zap_t *zap, int nblo } static void -zap_leaf_pageout(void *dbu) +zap_leaf_evict_sync(void *dbu) { zap_leaf_t *l = dbu; @@ -423,7 +424,7 @@ zap_create_leaf(zap_t *zap, dmu_tx_t *tx VERIFY(0 == dmu_buf_hold(zap->zap_objset, zap->zap_object, l->l_blkid << FZAP_BLOCK_SHIFT(zap), NULL, &l->l_dbuf, DMU_READ_NO_PREFETCH)); - dmu_buf_init_user(&l->l_dbu, zap_leaf_pageout, &l->l_dbuf); + dmu_buf_init_user(&l->l_dbu, zap_leaf_evict_sync, NULL, &l->l_dbuf); winner = dmu_buf_set_user(l->l_dbuf, &l->l_dbu); ASSERT(winner == NULL); dmu_buf_will_dirty(l->l_dbuf, tx); @@ -470,13 +471,13 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t l->l_bs = highbit64(db->db_size) - 1; l->l_dbuf = db; - dmu_buf_init_user(&l->l_dbu, zap_leaf_pageout, &l->l_dbuf); + dmu_buf_init_user(&l->l_dbu, zap_leaf_evict_sync, NULL, &l->l_dbuf); winner = dmu_buf_set_user(db, &l->l_dbu); rw_exit(&l->l_rwlock); if (winner != NULL) { /* someone else set it first */ - zap_leaf_pageout(&l->l_dbu); + zap_leaf_evict_sync(&l->l_dbu); l = winner; } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sat Feb 25 03:33:09 2017 (r314242) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sat Feb 25 03:34:22 2017 (r314243) @@ -397,7 +397,7 @@ mzap_open(objset_t *os, uint64_t obj, dm * it, because zap_lockdir() checks zap_ismicro without the lock * held. */ - dmu_buf_init_user(&zap->zap_dbu, zap_evict, &zap->zap_dbuf); + dmu_buf_init_user(&zap->zap_dbu, zap_evict_sync, NULL, &zap->zap_dbuf); winner = dmu_buf_set_user(db, &zap->zap_dbu); if (winner != NULL) @@ -736,7 +736,7 @@ zap_destroy(objset_t *os, uint64_t zapob } void -zap_evict(void *dbu) +zap_evict_sync(void *dbu) { zap_t *zap = dbu; From owner-svn-src-all@freebsd.org Sat Feb 25 03:35: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 67C20CEBF0F; Sat, 25 Feb 2017 03:35: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 34E9DF69; Sat, 25 Feb 2017 03:35: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 v1P3ZQeS019004; Sat, 25 Feb 2017 03:35:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3ZQte019003; Sat, 25 Feb 2017 03:35:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250335.v1P3ZQte019003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 03:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314244 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:35:27 -0000 Author: ngie Date: Sat Feb 25 03:35:26 2017 New Revision: 314244 URL: https://svnweb.freebsd.org/changeset/base/314244 Log: Remove MK_OBJC block It is no longer represented via src.conf(5) MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:34:22 2017 (r314243) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:35:26 2017 (r314244) @@ -7014,10 +7014,6 @@ OLD_FILES+=usr/share/man/man8/ntpq.8.gz OLD_FILES+=usr/share/man/man8/ntptime.8.gz .endif -#.if ${MK_OBJC} == no -# to be filled in -#.endif - .if ${MK_OPENSSH} == no OLD_FILES+=etc/rc.d/sshd OLD_FILES+=etc/ssh/moduli From owner-svn-src-all@freebsd.org Sat Feb 25 03:44: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 50AABCEC24E; Sat, 25 Feb 2017 03:44: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 2057C1475; Sat, 25 Feb 2017 03:44: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 v1P3iprt022875; Sat, 25 Feb 2017 03:44:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P3ipLv022874; Sat, 25 Feb 2017 03:44:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702250344.v1P3ipLv022874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 25 Feb 2017 03:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314245 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 03:44:52 -0000 Author: ngie Date: Sat Feb 25 03:44:51 2017 New Revision: 314245 URL: https://svnweb.freebsd.org/changeset/base/314245 Log: Fill MK_LIBTHR as far as lib/libthr is concerned There are other areas of the tree that will need to be evaluated for sanity if they're supposed to be conditionally compiled out of the build/install, like libzpool MFC after: 1 month Relnotes: yes (this might break someone's system if have the knob set) Sponsored by: Dell EMC Isilon Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:35:26 2017 (r314244) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Feb 25 03:44:51 2017 (r314245) @@ -4809,9 +4809,12 @@ OLD_DIRS+=usr/include/c++/v1/ext OLD_DIRS+=usr/include/c++/v1 .endif -#.if ${MK_LIBTHR} == no -# to be filled in -#.endif +.if ${MK_LIBTHR} == no +OLD_LIBS+=lib/libthr.so.3 +OLD_FILES+=usr/lib/libthr.a +OLD_FILES+=usr/lib/libthr_p.a +OLD_FILES+=usr/share/man/man3/libthr.3.gz +.endif .if ${MK_LLD} == no OLD_FILES+=usr/bin/ld.lld From owner-svn-src-all@freebsd.org Sat Feb 25 04: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 4CBB3CEC5B3; Sat, 25 Feb 2017 04:04:13 +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 0C6681C68; Sat, 25 Feb 2017 04:04:12 +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 v1P44CbU031079; Sat, 25 Feb 2017 04:04:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P44C5l031078; Sat, 25 Feb 2017 04:04:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702250404.v1P44C5l031078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 04:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314246 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 04:04:13 -0000 Author: mav Date: Sat Feb 25 04:04:11 2017 New Revision: 314246 URL: https://svnweb.freebsd.org/changeset/base/314246 Log: Improve CAM target frontend reference counting. Before this change it was possible to trigger some use-after-free panics by disabling LUNs/ports under heavy load. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sat Feb 25 03:44:51 2017 (r314245) +++ head/sys/cam/ctl/scsi_ctl.c Sat Feb 25 04:04:11 2017 (r314246) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -103,15 +104,11 @@ struct ctlfe_lun_softc { struct ctlfe_softc *parent_softc; struct cam_periph *periph; ctlfe_lun_flags flags; - uint64_t ccbs_alloced; - uint64_t ccbs_freed; - uint64_t ctios_sent; - uint64_t ctios_returned; - uint64_t atios_alloced; - uint64_t atios_freed; - uint64_t inots_alloced; - uint64_t inots_freed; - /* bus_dma_tag_t dma_tag; */ + int ctios_sent; /* Number of active CTIOs */ + int refcount; /* Number of active xpt_action() */ + int atios_alloced; /* Number of ATIOs not freed */ + int inots_alloced; /* Number of INOTs not freed */ + struct task refdrain_task; TAILQ_HEAD(, ccb_hdr) work_queue; STAILQ_ENTRY(ctlfe_lun_softc) links; }; @@ -677,18 +674,14 @@ ctlfecleanup(struct cam_periph *periph) softc = (struct ctlfe_lun_softc *)periph->softc; - KASSERT(softc->ccbs_freed == softc->ccbs_alloced, ("%s: " - "ccbs_freed %ju != ccbs_alloced %ju", __func__, - softc->ccbs_freed, softc->ccbs_alloced)); - KASSERT(softc->ctios_returned == softc->ctios_sent, ("%s: " - "ctios_returned %ju != ctios_sent %ju", __func__, - softc->ctios_returned, softc->ctios_sent)); - KASSERT(softc->atios_freed == softc->atios_alloced, ("%s: " - "atios_freed %ju != atios_alloced %ju", __func__, - softc->atios_freed, softc->atios_alloced)); - KASSERT(softc->inots_freed == softc->inots_alloced, ("%s: " - "inots_freed %ju != inots_alloced %ju", __func__, - softc->inots_freed, softc->inots_alloced)); + KASSERT(softc->ctios_sent == 0, ("%s: ctios_sent %d != 0", + __func__, softc->ctios_sent)); + KASSERT(softc->refcount == 0, ("%s: refcount %d != 0", + __func__, softc->refcount)); + KASSERT(softc->atios_alloced == 0, ("%s: atios_alloced %d != 0", + __func__, softc->atios_alloced)); + KASSERT(softc->inots_alloced == 0, ("%s: inots_alloced %d != 0", + __func__, softc->inots_alloced)); free(softc, M_CTLFE); } @@ -804,12 +797,10 @@ ctlfestart(struct cam_periph *periph, un uint8_t scsi_status; softc = (struct ctlfe_lun_softc *)periph->softc; - softc->ccbs_alloced++; next: ccb_h = TAILQ_FIRST(&softc->work_queue); if (ccb_h == NULL) { - softc->ccbs_freed++; xpt_release_ccb(start_ccb); return; } @@ -931,16 +922,32 @@ next: io->io_hdr.flags &= ~(CTL_FLAG_DMA_QUEUED | CTL_FLAG_STATUS_QUEUED); softc->ctios_sent++; - + softc->refcount++; cam_periph_unlock(periph); xpt_action(start_ccb); cam_periph_lock(periph); + softc->refcount--; /* * If we still have work to do, ask for another CCB. */ if (!TAILQ_EMPTY(&softc->work_queue)) - xpt_schedule(periph, /*priority*/ 1); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); +} + +static void +ctlfe_drain(void *context, int pending) +{ + struct cam_periph *periph = context; + struct ctlfe_lun_softc *softc = periph->softc; + + cam_periph_lock(periph); + while (softc->refcount != 0) { + cam_periph_sleep(periph, &softc->refcount, PRIBIO, + "ctlfe_drain", 1); + } + cam_periph_unlock(periph); + cam_periph_release(periph); } static void @@ -955,13 +962,13 @@ ctlfe_free_ccb(struct cam_periph *periph switch (ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: - softc->atios_freed++; + softc->atios_alloced--; cmd_info = PRIV_INFO(io); free(cmd_info, M_CTLFE); break; case XPT_IMMEDIATE_NOTIFY: case XPT_NOTIFY_ACKNOWLEDGE: - softc->inots_freed++; + softc->inots_alloced--; break; default: break; @@ -970,21 +977,24 @@ ctlfe_free_ccb(struct cam_periph *periph ctl_free_io(io); free(ccb, M_CTLFE); - KASSERT(softc->atios_freed <= softc->atios_alloced, ("%s: " - "atios_freed %ju > atios_alloced %ju", __func__, - softc->atios_freed, softc->atios_alloced)); - KASSERT(softc->inots_freed <= softc->inots_alloced, ("%s: " - "inots_freed %ju > inots_alloced %ju", __func__, - softc->inots_freed, softc->inots_alloced)); + KASSERT(softc->atios_alloced >= 0, ("%s: atios_alloced %d < 0", + __func__, softc->atios_alloced)); + KASSERT(softc->inots_alloced >= 0, ("%s: inots_alloced %d < 0", + __func__, softc->inots_alloced)); /* * If we have received all of our CCBs, we can release our * reference on the peripheral driver. It will probably go away * now. */ - if ((softc->atios_freed == softc->atios_alloced) - && (softc->inots_freed == softc->inots_alloced)) { - cam_periph_release_locked(periph); + if (softc->atios_alloced == 0 && softc->inots_alloced == 0) { + if (softc->refcount == 0) { + cam_periph_release_locked(periph); + } else { + TASK_INIT(&softc->refdrain_task, 0, ctlfe_drain, periph); + taskqueue_enqueue(taskqueue_thread, + &softc->refdrain_task); + } } } @@ -1210,7 +1220,7 @@ ctlfedone(struct cam_periph *periph, uni atio = (struct ccb_accept_tio *)done_ccb->ccb_h.ccb_atio; io = (union ctl_io *)atio->ccb_h.io_ptr; - softc->ctios_returned++; + softc->ctios_sent--; #ifdef CTLFEDEBUG printf("%s: got XPT_CONT_TARGET_IO tag %#x flags %#x\n", __func__, atio->tag_id, done_ccb->ccb_h.flags); @@ -1246,11 +1256,10 @@ ctlfedone(struct cam_periph *periph, uni 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); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); break; } @@ -1261,7 +1270,6 @@ ctlfedone(struct cam_periph *periph, uni * should work. */ if (srr && (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { - softc->ccbs_freed++; xpt_release_ccb(done_ccb); if (ctlfe_adjust_cdb(atio, srr_off) == 0) { done_ccb = (union ccb *)atio; @@ -1290,7 +1298,6 @@ ctlfedone(struct cam_periph *periph, uni xpt_action(done_ccb); } - softc->ccbs_freed++; xpt_release_ccb(done_ccb); ctlfe_requeue_ccb(periph, (union ccb *)atio, /* unlock */1); @@ -1389,7 +1396,6 @@ ctlfedone(struct cam_periph *periph, uni * Release the CTIO. The ATIO will be sent back * down to the SIM once we send status. */ - softc->ccbs_freed++; xpt_release_ccb(done_ccb); mtx_unlock(mtx); @@ -1923,16 +1929,8 @@ ctlfe_dump_queue(struct ctlfe_lun_softc } } - xpt_print(periph->path, "%d requests total waiting for CCBs\n", - num_items); - xpt_print(periph->path, "%ju CCBs outstanding (%ju allocated, %ju " - "freed)\n", (uintmax_t)(softc->ccbs_alloced - - softc->ccbs_freed), (uintmax_t)softc->ccbs_alloced, - (uintmax_t)softc->ccbs_freed); - xpt_print(periph->path, "%ju CTIOs outstanding (%ju sent, %ju " - "returned\n", (uintmax_t)(softc->ctios_sent - - softc->ctios_returned), softc->ctios_sent, - softc->ctios_returned); + xpt_print(periph->path, "%d requests waiting for CCBs\n", num_items); + xpt_print(periph->path, "%d CTIOs outstanding\n", softc->ctios_sent); } /* @@ -1960,7 +1958,7 @@ ctlfe_datamove(union ctl_io *io) io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, periph_links.tqe); - xpt_schedule(periph, /*priority*/ 1); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); cam_periph_unlock(periph); } @@ -2013,7 +2011,7 @@ ctlfe_done(union ctl_io *io) io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED; TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, periph_links.tqe); - xpt_schedule(periph, /*priority*/ 1); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); } cam_periph_unlock(periph); From owner-svn-src-all@freebsd.org Sat Feb 25 04:24: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 CD6BACECC64; Sat, 25 Feb 2017 04:24:52 +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 A540612D5; Sat, 25 Feb 2017 04:24:52 +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 v1P4OpnM040615; Sat, 25 Feb 2017 04:24:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P4OpAF040614; Sat, 25 Feb 2017 04:24:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702250424.v1P4OpAF040614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 04:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314247 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 04:24:52 -0000 Author: mav Date: Sat Feb 25 04:24:51 2017 New Revision: 314247 URL: https://svnweb.freebsd.org/changeset/base/314247 Log: Axe out some forever disabled questionable functionality. This code is complicated enough even in its base shape. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sat Feb 25 04:04:11 2017 (r314246) +++ head/sys/cam/ctl/scsi_ctl.c Sat Feb 25 04:24:51 2017 (r314247) @@ -90,10 +90,6 @@ struct ctlfe_softc { STAILQ_HEAD(, ctlfe_softc) ctlfe_softc_list; struct mtx ctlfe_list_mtx; static char ctlfe_mtx_desc[] = "ctlfelist"; -#ifdef CTLFE_INIT_ENABLE -static int ctlfe_max_targets = 1; -static int ctlfe_num_targets = 0; -#endif typedef enum { CTLFE_LUN_NONE = 0x00, @@ -152,12 +148,9 @@ struct ctlfe_cmd_info { #define CTLFE_IN_PER_LUN 1024 /* - * Timeout (in seconds) on CTIO CCB allocation for doing a DMA or sending - * status to the initiator. The SIM is expected to have its own timeouts, - * so we're not putting this timeout around the CCB execution time. The - * SIM should timeout and let us know if it has an issue. + * Timeout (in seconds) on CTIO CCB doing DMA or sending status */ -#define CTLFE_DMA_TIMEOUT 60 +#define CTLFE_TIMEOUT 5 /* * Turn this on to enable extra debugging prints. @@ -166,15 +159,6 @@ struct ctlfe_cmd_info { #define CTLFE_DEBUG #endif -/* - * Use randomly assigned WWNN/WWPN values. This is to work around an issue - * in the FreeBSD initiator that makes it unable to rescan the target if - * the target gets rebooted and the WWNN/WWPN stay the same. - */ -#if 0 -#define RANDOM_WWNN -#endif - MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CAM CTL FE interface"); #define io_ptr ppriv_ptr0 @@ -305,49 +289,6 @@ ctlfeasync(void *callback_arg, uint32_t break; } -#ifdef CTLFE_INIT_ENABLE - if (ctlfe_num_targets >= ctlfe_max_targets) { - union ccb *ccb; - - ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, - M_NOWAIT | M_ZERO); - if (ccb == NULL) { - printf("%s: unable to malloc CCB!\n", __func__); - return; - } - xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE); - - ccb->ccb_h.func_code = XPT_SET_SIM_KNOB; - ccb->knob.xport_specific.valid = KNOB_VALID_ROLE; - ccb->knob.xport_specific.fc.role = KNOB_ROLE_INITIATOR; - - xpt_action(ccb); - - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != - CAM_REQ_CMP) { - printf("%s: SIM %s%d (path id %d) initiator " - "enable failed with status %#x\n", - __func__, cpi->dev_name, - cpi->unit_number, cpi->ccb_h.path_id, - ccb->ccb_h.status); - } else { - printf("%s: SIM %s%d (path id %d) initiator " - "enable succeeded\n", - __func__, cpi->dev_name, - cpi->unit_number, cpi->ccb_h.path_id); - } - - free(ccb, M_TEMP); - - break; - } else { - ctlfe_num_targets++; - } - - printf("%s: ctlfe_num_targets = %d\n", __func__, - ctlfe_num_targets); -#endif /* CTLFE_INIT_ENABLE */ - /* * We're in an interrupt context here, so we have to * use M_NOWAIT. Of course this means trouble if we @@ -385,7 +326,7 @@ ctlfeasync(void *callback_arg, uint32_t port->port_type = CTL_PORT_SCSI; /* XXX KDM what should the real number be here? */ - port->num_requested_ctl_io = 4096; + port->num_requested_ctl_io = CTLFE_REQ_CTL_IO; snprintf(softc->port_name, sizeof(softc->port_name), "%s%d", cpi->dev_name, cpi->unit_number); /* @@ -404,15 +345,7 @@ ctlfeasync(void *callback_arg, uint32_t port->fe_datamove = ctlfe_datamove; port->fe_done = ctlfe_done; port->targ_port = -1; - - /* - * XXX KDM need to figure out whether we're the master or - * slave. - */ -#ifdef CTLFEDEBUG - printf("%s: calling ctl_port_register() for %s%d\n", - __func__, cpi->dev_name, cpi->unit_number); -#endif + retval = ctl_port_register(port); if (retval != 0) { printf("%s: ctl_port_register() failed with " @@ -914,7 +847,7 @@ next: scsi_status, /*data_ptr*/ data_ptr, /*dxfer_len*/ dxfer_len, - /*timeout*/ 5 * 1000); + /*timeout*/ CTLFE_TIMEOUT * 1000); start_ccb->ccb_h.flags |= CAM_UNLOCKED; start_ccb->ccb_h.ccb_atio = atio; if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) @@ -1382,7 +1315,7 @@ ctlfedone(struct cam_periph *periph, uni 0, /*data_ptr*/ data_ptr, /*dxfer_len*/ dxfer_len, - /*timeout*/ 5 * 1000); + CTLFE_TIMEOUT * 1000); csio->ccb_h.flags |= CAM_UNLOCKED; csio->resid = 0; @@ -1562,9 +1495,6 @@ ctlfe_onoffline(void *arg, int online) */ if (online != 0) { if ((ccb->knob.xport_specific.valid & KNOB_VALID_ADDRESS) != 0){ -#ifdef RANDOM_WWNN - uint64_t random_bits; -#endif printf("%s: %s current WWNN %#jx\n", __func__, bus_softc->port_name, @@ -1573,45 +1503,6 @@ ctlfe_onoffline(void *arg, int online) bus_softc->port_name, ccb->knob.xport_specific.fc.wwpn); -#ifdef RANDOM_WWNN - arc4rand(&random_bits, sizeof(random_bits), 0); -#endif - - /* - * XXX KDM this is a bit of a kludge for now. We - * take the current WWNN/WWPN from the card, and - * replace the company identifier and the NL-Port - * indicator and the port number (for the WWPN). - * This should be replaced later with ddb_GetWWNN, - * or possibly a more centralized scheme. (It - * would be nice to have the WWNN/WWPN for each - * port stored in the ctl_port structure.) - */ -#ifdef RANDOM_WWNN - ccb->knob.xport_specific.fc.wwnn = - (random_bits & - 0x0000000fffffff00ULL) | - /* Company ID */ 0x5000ED5000000000ULL | - /* NL-Port */ 0x0300; - ccb->knob.xport_specific.fc.wwpn = - (random_bits & - 0x0000000fffffff00ULL) | - /* Company ID */ 0x5000ED5000000000ULL | - /* NL-Port */ 0x3000 | - /* Port Num */ (bus_softc->port.targ_port & 0xff); - - /* - * This is a bit of an API break/reversal, but if - * we're doing the random WWNN that's a little - * different anyway. So record what we're actually - * using with the frontend code so it's reported - * accurately. - */ - ctl_port_set_wwns(&bus_softc->port, - true, ccb->knob.xport_specific.fc.wwnn, - true, ccb->knob.xport_specific.fc.wwpn); - set_wwnn = 1; -#else /* RANDOM_WWNN */ /* * If the user has specified a WWNN/WWPN, send them * down to the SIM. Otherwise, record what the SIM @@ -1637,7 +1528,6 @@ ctlfe_onoffline(void *arg, int online) false, 0, true, ccb->knob.xport_specific.fc.wwpn); } -#endif /* RANDOM_WWNN */ if (set_wwnn != 0) { From owner-svn-src-all@freebsd.org Sat Feb 25 06:11: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 1D481CEC19D; Sat, 25 Feb 2017 06:11:38 +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 C2A34F8F; Sat, 25 Feb 2017 06:11:37 +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 v1P6Ba8H080855; Sat, 25 Feb 2017 06:11:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P6Bamt080852; Sat, 25 Feb 2017 06:11:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250611.v1P6Bamt080852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 06:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314248 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 06:11:38 -0000 Author: imp Date: Sat Feb 25 06:11:36 2017 New Revision: 314248 URL: https://svnweb.freebsd.org/changeset/base/314248 Log: Create pcib_request_feature. pcib_request_feature allows drivers to request the firmware (ACPI) release certain features it may be using. ACPI normally manages things like hot plug, advanced error reporting and other features until the OS requests ACPI to relenquish control since it is taking over. Sponsored by: Netflix Modified: head/sys/dev/pci/pci_if.m head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_if.m Modified: head/sys/dev/pci/pci_if.m ============================================================================== --- head/sys/dev/pci/pci_if.m Sat Feb 25 04:24:51 2017 (r314247) +++ head/sys/dev/pci/pci_if.m Sat Feb 25 06:11:36 2017 (r314248) @@ -60,6 +60,11 @@ HEADER { PCI_ID_RID, PCI_ID_MSI, }; + + enum pci_feature { + PCI_FEATURE_HP, /* Hot Plug feature */ + PCI_FEATURE_AER, /* Advanced Error Reporting */ + }; } Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Feb 25 04:24:51 2017 (r314247) +++ head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:36 2017 (r314248) @@ -76,6 +76,8 @@ static void pcib_pcie_ab_timeout(void * static void pcib_pcie_cc_timeout(void *arg); static void pcib_pcie_dll_timeout(void *arg); #endif +static int pcib_request_feature(device_t pcib, device_t dev, + enum pci_feature feature); static device_method_t pcib_methods[] = { /* Device interface */ @@ -119,6 +121,7 @@ static device_method_t pcib_methods[] = DEVMETHOD(pcib_try_enable_ari, pcib_try_enable_ari), DEVMETHOD(pcib_ari_enabled, pcib_ari_enabled), DEVMETHOD(pcib_decode_rid, pcib_ari_decode_rid), + DEVMETHOD(pcib_request_feature, pcib_request_feature), DEVMETHOD_END }; @@ -2829,3 +2832,24 @@ pcib_try_enable_ari(device_t pcib, devic return (0); } + +/* + * Pass the request to use this PCI feature up the tree. Either there's a + * firmware like ACPI that's using this feature that will approve (or deny) the + * request to take it over, or the platform has no such firmware, in which case + * the request will be approved. If the request is approved, the OS is expected + * to make use of the feature or render it harmless. + */ +static int +pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) +{ + device_t bus; + + /* + * Our parent is necessarily a pci bus. Its parent will either be + * another pci bridge (which passes it up) or a host bridge that can + * approve or reject the request. + */ + bus = device_get_parent(pcib); + return (PCIB_REQUEST_FEATURE(device_get_parent(bus), dev, feature)); +} Modified: head/sys/dev/pci/pcib_if.m ============================================================================== --- head/sys/dev/pci/pcib_if.m Sat Feb 25 04:24:51 2017 (r314247) +++ head/sys/dev/pci/pcib_if.m Sat Feb 25 06:11:36 2017 (r314248) @@ -212,3 +212,12 @@ METHOD void decode_rid { int *slot; int *func; } DEFAULT pcib_decode_rid; + +# +# Request control of PCI features from host firmware, if any. +# +METHOD int request_feature { + device_t pcib; + device_t dev; + enum pci_feature feature; +}; From owner-svn-src-all@freebsd.org Sat Feb 25 06:11: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 A06ADCEC2E5; Sat, 25 Feb 2017 06:11:51 +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 704BE1082; Sat, 25 Feb 2017 06:11:51 +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 v1P6BoM3080909; Sat, 25 Feb 2017 06:11:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P6BoOH080908; Sat, 25 Feb 2017 06:11:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250611.v1P6BoOH080908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 06:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314249 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 06:11:51 -0000 Author: imp Date: Sat Feb 25 06:11:50 2017 New Revision: 314249 URL: https://svnweb.freebsd.org/changeset/base/314249 Log: Rename pci_pcie_intr to pci_pcie_intr_hotplug. Sponsored by: Netflix Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:36 2017 (r314248) +++ head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:50 2017 (r314249) @@ -1148,7 +1148,7 @@ pcib_pcie_hotplug_update(struct pcib_sof } static void -pcib_pcie_intr(void *arg) +pcib_pcie_intr_hotplug(void *arg) { struct pcib_softc *sc; device_t dev; @@ -1261,7 +1261,7 @@ pcib_pcie_cc_timeout(void *arg) } else { device_printf(dev, "Missed HotPlug interrupt waiting for Command Completion\n"); - pcib_pcie_intr(sc); + pcib_pcie_intr_hotplug(sc); } } @@ -1284,7 +1284,7 @@ pcib_pcie_dll_timeout(void *arg) } else if (sta != sc->pcie_link_sta) { device_printf(dev, "Missed HotPlug interrupt waiting for DLL Active\n"); - pcib_pcie_intr(sc); + pcib_pcie_intr_hotplug(sc); } } @@ -1330,7 +1330,7 @@ pcib_alloc_pcie_irq(struct pcib_softc *s } error = bus_setup_intr(dev, sc->pcie_irq, INTR_TYPE_MISC, - NULL, pcib_pcie_intr, sc, &sc->pcie_ihand); + NULL, pcib_pcie_intr_hotplug, sc, &sc->pcie_ihand); if (error) { device_printf(dev, "Failed to setup PCI-e interrupt handler\n"); bus_release_resource(dev, SYS_RES_IRQ, rid, sc->pcie_irq); From owner-svn-src-all@freebsd.org Sat Feb 25 06:12: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 A866ECEC33A; Sat, 25 Feb 2017 06:12: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 75E0611D6; Sat, 25 Feb 2017 06:12: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 v1P6C23a084009; Sat, 25 Feb 2017 06:12:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P6BxIY083971; Sat, 25 Feb 2017 06:11:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702250611.v1P6BxIY083971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 06:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314250 - in head/sys: arm/mv arm/nvidia arm/versatile arm/xscale/i8134x arm/xscale/ixp425 dev/acpica dev/hyperv/pcib dev/ofw dev/pci dev/xen/pcifront mips/adm5120 mips/atheros mips/cav... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 06:12:03 -0000 Author: imp Date: Sat Feb 25 06:11:59 2017 New Revision: 314250 URL: https://svnweb.freebsd.org/changeset/base/314250 Log: Convert PCIe Hot Plug to using pci_request_feature Convert PCIe hot plug support over to asking the firmware, if any, for permission to use the HotPlug hardware. Implement pci_request_feature for ACPI. All other host pci connections to allowing all valid feature requests. Sponsored by: Netflix Modified: head/sys/arm/mv/mv_pci.c head/sys/arm/nvidia/tegra_pcie.c head/sys/arm/versatile/versatile_pci.c head/sys/arm/xscale/i8134x/i81342_pci.c head/sys/arm/xscale/ixp425/ixp425_pci.c head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/hyperv/pcib/vmbus_pcib.c head/sys/dev/ofw/ofwpci.c head/sys/dev/pci/pci_host_generic_fdt.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h head/sys/dev/xen/pcifront/pcifront.c head/sys/mips/adm5120/admpci.c head/sys/mips/atheros/ar71xx_pci.c head/sys/mips/atheros/ar724x_pci.c head/sys/mips/atheros/qca955x_pci.c head/sys/mips/cavium/octopci.c head/sys/mips/idt/idtpci.c head/sys/mips/malta/gt_pci.c head/sys/mips/mediatek/mtk_pcie.c head/sys/mips/nlm/xlp_pci.c head/sys/mips/rmi/xlr_pci.c head/sys/mips/rt305x/rt305x_pci.c head/sys/mips/sibyte/sb_zbpci.c head/sys/powerpc/ofw/ofw_pcib_pci.c head/sys/powerpc/powermac/cpcht.c head/sys/sparc64/pci/apb.c head/sys/sparc64/pci/fire.c head/sys/sparc64/pci/ofw_pcib.c head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c head/sys/x86/pci/pci_bus.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/arm/mv/mv_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -368,7 +368,7 @@ static device_method_t mv_pcib_methods[] DEVMETHOD(pcib_read_config, mv_pcib_read_config), DEVMETHOD(pcib_write_config, mv_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mv_pcib_route_interrupt), - + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), #if defined(SOC_MV_ARMADAXP) DEVMETHOD(pcib_alloc_msi, mv_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, mv_pcib_release_msi), Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/arm/nvidia/tegra_pcie.c Sat Feb 25 06:11:59 2017 (r314250) @@ -1601,6 +1601,7 @@ static device_method_t tegra_pcib_method DEVMETHOD(pcib_alloc_msi, tegra_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, tegra_pcib_release_msi), DEVMETHOD(pcib_map_msi, tegra_pcib_map_msi), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), #ifdef TEGRA_PCIB_MSI_ENABLE /* MSI/MSI-X */ Modified: head/sys/arm/versatile/versatile_pci.c ============================================================================== --- head/sys/arm/versatile/versatile_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/arm/versatile/versatile_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -505,6 +505,7 @@ static device_method_t versatile_pci_met DEVMETHOD(pcib_read_config, versatile_pci_read_config), DEVMETHOD(pcib_write_config, versatile_pci_write_config), DEVMETHOD(pcib_route_interrupt, versatile_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/arm/xscale/i8134x/i81342_pci.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/arm/xscale/i8134x/i81342_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -529,6 +529,7 @@ static device_method_t i81342_pci_method DEVMETHOD(pcib_read_config, i81342_pci_read_config), DEVMETHOD(pcib_write_config, i81342_pci_write_config), DEVMETHOD(pcib_route_interrupt, i81342_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/arm/xscale/ixp425/ixp425_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -466,6 +466,7 @@ static device_method_t ixppcib_methods[] DEVMETHOD(pcib_read_config, ixppcib_read_config), DEVMETHOD(pcib_write_config, ixppcib_write_config), DEVMETHOD(pcib_route_interrupt, ixppcib_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Sat Feb 25 06:11:59 2017 (r314250) @@ -61,6 +61,7 @@ struct acpi_hpcib_softc { device_t ap_dev; ACPI_HANDLE ap_handle; int ap_flags; + uint32_t ap_osc_ctl; int ap_segment; /* PCI domain */ int ap_bus; /* bios-assigned bus number */ @@ -105,6 +106,8 @@ static int acpi_pcib_acpi_release_resou struct resource *r); #endif #endif +static int acpi_pcib_request_feature(device_t pcib, device_t dev, + enum pci_feature feature); static device_method_t acpi_pcib_acpi_methods[] = { /* Device interface */ @@ -145,6 +148,7 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, acpi_pcib_map_msi), DEVMETHOD(pcib_power_for_sleep, acpi_pcib_power_for_sleep), + DEVMETHOD(pcib_request_feature, acpi_pcib_request_feature), DEVMETHOD_END }; @@ -298,8 +302,8 @@ first_decoded_bus(struct acpi_hpcib_soft } #endif -static void -acpi_pcib_osc(struct acpi_hpcib_softc *sc) +static int +acpi_pcib_osc(struct acpi_hpcib_softc *sc, uint32_t osc_ctl) { ACPI_STATUS status; uint32_t cap_set[3]; @@ -317,33 +321,27 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s PCIM_OSC_SUPPORT_MSI; /* Control Field */ - cap_set[PCI_OSC_CTL] = 0; - -#ifdef PCI_HP - /* Control Field: PCI Express Native Hot Plug */ - cap_set[PCI_OSC_CTL] |= PCIM_OSC_CTL_PCIE_HP; -#endif + sc->ap_osc_ctl |= osc_ctl; + cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl; status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1, nitems(cap_set), cap_set, cap_set, false); if (ACPI_FAILURE(status)) { if (status == AE_NOT_FOUND) - return; + return (0); device_printf(sc->ap_dev, "_OSC failed: %s\n", AcpiFormatException(status)); - return; + return (EIO); } - if (cap_set[PCI_OSC_STATUS] != 0) { - device_printf(sc->ap_dev, "_OSC returned error %#x\n", - cap_set[0]); - } + if (cap_set[PCI_OSC_STATUS] == 0) + sc->ap_osc_ctl = cap_set[PCI_OSC_CTL]; -#ifdef PCI_HP - if ((cap_set[PCI_OSC_CTL] & PCIM_OSC_CTL_PCIE_HP) == 0 && bootverbose) { - device_printf(sc->ap_dev, "_OSC didn't allow HP control\n"); - } -#endif + if (cap_set[PCI_OSC_STATUS] != 0 || + (cap_set[PCI_OSC_CTL] & osc_ctl) != osc_ctl) + return (EIO); + + return (0); } static int @@ -372,7 +370,7 @@ acpi_pcib_acpi_attach(device_t dev) if (!acpi_DeviceIsPresent(dev)) return (ENXIO); - acpi_pcib_osc(sc); + acpi_pcib_osc(sc, 0); /* * Get our segment number by evaluating _SEG. @@ -722,3 +720,25 @@ acpi_pcib_acpi_release_resource(device_t } #endif #endif + +static int +acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) +{ + uint32_t osc_ctl; + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + + switch (feature) { + case PCI_FEATURE_HP: + osc_ctl = PCIM_OSC_CTL_PCIE_HP; + break; + case PCI_FEATURE_AER: + osc_ctl = PCIM_OSC_CTL_PCIE_AER; + break; + default: + return (EINVAL); + } + + return (acpi_pcib_osc(sc, osc_ctl)); +} Modified: head/sys/dev/hyperv/pcib/vmbus_pcib.c ============================================================================== --- head/sys/dev/hyperv/pcib/vmbus_pcib.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/hyperv/pcib/vmbus_pcib.c Sat Feb 25 06:11:59 2017 (r314250) @@ -1780,6 +1780,7 @@ static device_method_t vmbus_pcib_method DEVMETHOD(pcib_alloc_msix, vmbus_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, vmbus_pcib_release_msix), DEVMETHOD(pcib_map_msi, vmbus_pcib_map_msi), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/dev/ofw/ofwpci.c ============================================================================== --- head/sys/dev/ofw/ofwpci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/ofw/ofwpci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -123,6 +123,7 @@ static device_method_t ofw_pci_methods[] /* pcib interface */ DEVMETHOD(pcib_maxslots, ofw_pci_maxslots), DEVMETHOD(pcib_route_interrupt, ofw_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pci_get_node), Modified: head/sys/dev/pci/pci_host_generic_fdt.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_fdt.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/pci/pci_host_generic_fdt.c Sat Feb 25 06:11:59 2017 (r314250) @@ -618,6 +618,7 @@ static device_method_t generic_pcie_fdt_ DEVMETHOD(pcib_release_msix, generic_pcie_fdt_release_msix), DEVMETHOD(pcib_map_msi, generic_pcie_fdt_map_msi), DEVMETHOD(pcib_get_id, generic_pcie_get_id), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, generic_pcie_ofw_get_devinfo), Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -960,6 +960,17 @@ pcib_probe_hotplug(struct pcib_softc *sc } } + /* + * Now that we're sure we want to do hot plug, ask the + * firmware, if any, if that's OK. + */ + if (pcib_request_feature(device_get_parent(device_get_parent(dev)), dev, + PCI_FEATURE_HP) != 0) { + if (bootverbose) + device_printf(dev, "Unable to activate hot plug feature.\n"); + return; + } + sc->flags |= PCIB_HOTPLUG; } @@ -2833,6 +2844,25 @@ pcib_try_enable_ari(device_t pcib, devic return (0); } +int +pcib_request_feature_allow(device_t pcib, device_t dev, + enum pci_feature feature) +{ + /* + * No host firmwrae we have to negotiate with, so we allow + * every valid feature requested. + */ + switch (feature) { + case PCI_FEATURE_AER: + case PCI_FEATURE_HP: + break; + default: + return (EINVAL); + } + + return (0); +} + /* * Pass the request to use this PCI feature up the tree. Either there's a * firmware like ACPI that's using this feature that will approve (or deny) the Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/pci/pcib_private.h Sat Feb 25 06:11:59 2017 (r314250) @@ -193,5 +193,6 @@ int pcib_get_id(device_t pcib, device_t uintptr_t *id); void pcib_decode_rid(device_t pcib, uint16_t rid, int *bus, int *slot, int *func); +int pcib_request_feature_allow(device_t pcib, device_t dev, enum pci_feature feature); #endif Modified: head/sys/dev/xen/pcifront/pcifront.c ============================================================================== --- head/sys/dev/xen/pcifront/pcifront.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/dev/xen/pcifront/pcifront.c Sat Feb 25 06:11:59 2017 (r314250) @@ -668,6 +668,7 @@ static device_method_t xpcib_methods[] = DEVMETHOD(pcib_read_config, xpcib_read_config), DEVMETHOD(pcib_write_config, xpcib_write_config), DEVMETHOD(pcib_route_interrupt, xpcib_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/adm5120/admpci.c ============================================================================== --- head/sys/mips/adm5120/admpci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/adm5120/admpci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -486,6 +486,7 @@ static device_method_t admpci_methods[] DEVMETHOD(pcib_read_config, admpci_read_config), DEVMETHOD(pcib_write_config, admpci_write_config), DEVMETHOD(pcib_route_interrupt, admpci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/atheros/ar71xx_pci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/atheros/ar71xx_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -689,6 +689,7 @@ static device_method_t ar71xx_pci_method DEVMETHOD(pcib_read_config, ar71xx_pci_read_config), DEVMETHOD(pcib_write_config, ar71xx_pci_write_config), DEVMETHOD(pcib_route_interrupt, ar71xx_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/atheros/ar724x_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -649,6 +649,7 @@ static device_method_t ar724x_pci_method DEVMETHOD(pcib_read_config, ar724x_pci_read_config), DEVMETHOD(pcib_write_config, ar724x_pci_write_config), DEVMETHOD(pcib_route_interrupt, ar724x_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/atheros/qca955x_pci.c ============================================================================== --- head/sys/mips/atheros/qca955x_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/atheros/qca955x_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -589,6 +589,7 @@ static device_method_t qca955x_pci_metho DEVMETHOD(pcib_read_config, qca955x_pci_read_config), DEVMETHOD(pcib_write_config, qca955x_pci_write_config), DEVMETHOD(pcib_route_interrupt, qca955x_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/cavium/octopci.c ============================================================================== --- head/sys/mips/cavium/octopci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/cavium/octopci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -978,6 +978,7 @@ static device_method_t octopci_methods[] DEVMETHOD(pcib_read_config, octopci_read_config), DEVMETHOD(pcib_write_config, octopci_write_config), DEVMETHOD(pcib_route_interrupt, octopci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/idt/idtpci.c ============================================================================== --- head/sys/mips/idt/idtpci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/idt/idtpci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -541,6 +541,7 @@ static device_method_t idtpci_methods[] DEVMETHOD(pcib_read_config, idtpci_read_config), DEVMETHOD(pcib_write_config, idtpci_write_config), DEVMETHOD(pcib_route_interrupt, idtpci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/malta/gt_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -758,6 +758,7 @@ static device_method_t gt_pci_methods[] DEVMETHOD(pcib_read_config, gt_pci_read_config), DEVMETHOD(pcib_write_config, gt_pci_write_config), DEVMETHOD(pcib_route_interrupt, gt_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/mediatek/mtk_pcie.c ============================================================================== --- head/sys/mips/mediatek/mtk_pcie.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/mediatek/mtk_pcie.c Sat Feb 25 06:11:59 2017 (r314250) @@ -726,6 +726,7 @@ static device_method_t mtk_pci_methods[] DEVMETHOD(pcib_read_config, mtk_pci_read_config), DEVMETHOD(pcib_write_config, mtk_pci_write_config), DEVMETHOD(pcib_route_interrupt, mtk_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* OFW bus interface */ DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), Modified: head/sys/mips/nlm/xlp_pci.c ============================================================================== --- head/sys/mips/nlm/xlp_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/nlm/xlp_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -557,6 +557,7 @@ static device_method_t xlp_pcib_methods[ DEVMETHOD(pcib_read_config, xlp_pcib_read_config), DEVMETHOD(pcib_write_config, xlp_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mips_pcib_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD(pcib_alloc_msi, xlp_alloc_msi), DEVMETHOD(pcib_release_msi, xlp_release_msi), Modified: head/sys/mips/rmi/xlr_pci.c ============================================================================== --- head/sys/mips/rmi/xlr_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/rmi/xlr_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -638,6 +638,7 @@ static device_method_t xlr_pcib_methods[ DEVMETHOD(pcib_read_config, xlr_pcib_read_config), DEVMETHOD(pcib_write_config, xlr_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mips_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD(pcib_alloc_msi, xlr_alloc_msi), DEVMETHOD(pcib_release_msi, xlr_release_msi), Modified: head/sys/mips/rt305x/rt305x_pci.c ============================================================================== --- head/sys/mips/rt305x/rt305x_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/rt305x/rt305x_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -481,6 +481,7 @@ static device_method_t rt305x_pci_method DEVMETHOD(pcib_read_config, rt305x_pci_read_config), DEVMETHOD(pcib_write_config, rt305x_pci_write_config), DEVMETHOD(pcib_route_interrupt, rt305x_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/mips/sibyte/sb_zbpci.c ============================================================================== --- head/sys/mips/sibyte/sb_zbpci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/mips/sibyte/sb_zbpci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -446,6 +446,7 @@ static device_method_t zbpci_methods[] = DEVMETHOD(pcib_read_config, zbpci_read_config), DEVMETHOD(pcib_write_config, zbpci_write_config), DEVMETHOD(pcib_route_interrupt, zbpci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), { 0, 0 } }; Modified: head/sys/powerpc/ofw/ofw_pcib_pci.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcib_pci.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/powerpc/ofw/ofw_pcib_pci.c Sat Feb 25 06:11:59 2017 (r314250) @@ -61,6 +61,7 @@ static device_method_t ofw_pcib_pci_meth /* pcib interface */ DEVMETHOD(pcib_route_interrupt, ofw_pcib_pci_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_pci_get_node), Modified: head/sys/powerpc/powermac/cpcht.c ============================================================================== --- head/sys/powerpc/powermac/cpcht.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/powerpc/powermac/cpcht.c Sat Feb 25 06:11:59 2017 (r314250) @@ -103,6 +103,7 @@ static device_method_t cpcht_methods[] = DEVMETHOD(pcib_alloc_msix, cpcht_alloc_msix), DEVMETHOD(pcib_release_msix, cpcht_release_msix), DEVMETHOD(pcib_map_msi, cpcht_map_msi), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; Modified: head/sys/sparc64/pci/apb.c ============================================================================== --- head/sys/sparc64/pci/apb.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/sparc64/pci/apb.c Sat Feb 25 06:11:59 2017 (r314250) @@ -92,6 +92,7 @@ static device_method_t apb_methods[] = { /* pcib interface */ DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), Modified: head/sys/sparc64/pci/fire.c ============================================================================== --- head/sys/sparc64/pci/fire.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/sparc64/pci/fire.c Sat Feb 25 06:11:59 2017 (r314250) @@ -152,6 +152,7 @@ static device_method_t fire_methods[] = DEVMETHOD(pcib_alloc_msix, fire_alloc_msix), DEVMETHOD(pcib_release_msix, fire_release_msix), DEVMETHOD(pcib_map_msi, fire_map_msi), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pci_get_node), Modified: head/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- head/sys/sparc64/pci/ofw_pcib.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/sparc64/pci/ofw_pcib.c Sat Feb 25 06:11:59 2017 (r314250) @@ -72,6 +72,7 @@ static device_method_t ofw_pcib_methods[ /* pcib interface */ DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/sparc64/pci/psycho.c Sat Feb 25 06:11:59 2017 (r314250) @@ -141,6 +141,7 @@ static device_method_t psycho_methods[] DEVMETHOD(pcib_read_config, psycho_read_config), DEVMETHOD(pcib_write_config, psycho_write_config), DEVMETHOD(pcib_route_interrupt, psycho_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pci_get_node), Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/sparc64/pci/schizo.c Sat Feb 25 06:11:59 2017 (r314250) @@ -138,6 +138,7 @@ static device_method_t schizo_methods[] DEVMETHOD(pcib_read_config, schizo_read_config), DEVMETHOD(pcib_write_config, schizo_write_config), DEVMETHOD(pcib_route_interrupt, schizo_route_interrupt), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pci_get_node), Modified: head/sys/x86/pci/pci_bus.c ============================================================================== --- head/sys/x86/pci/pci_bus.c Sat Feb 25 06:11:50 2017 (r314249) +++ head/sys/x86/pci/pci_bus.c Sat Feb 25 06:11:59 2017 (r314250) @@ -663,6 +663,7 @@ static device_method_t legacy_pcib_metho DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi), + DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), DEVMETHOD_END }; From owner-svn-src-all@freebsd.org Sat Feb 25 06:16: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 F1538CEC3EB; Sat, 25 Feb 2017 06:16:35 +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 D37BC1475; Sat, 25 Feb 2017 06:16:35 +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 v1P6GSe0029461 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Feb 2017 22:16:28 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1P6GSRR029460; Fri, 24 Feb 2017 22:16:28 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 24 Feb 2017 22:16:28 -0800 From: Gleb Smirnoff To: Warner Losh Cc: "Pedro F. Giffuni" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r314142 - head/sys/dev/ce Message-ID: <20170225061628.GB8899@FreeBSD.org> References: <201702231530.v1NFULwx024028@repo.freebsd.org> <20170224002837.GU8899@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 25 Feb 2017 06:16:36 -0000 On Thu, Feb 23, 2017 at 06:31:45PM -0700, Warner Losh wrote: W> On Thu, Feb 23, 2017 at 5:28 PM, Gleb Smirnoff wrote: W> > On Thu, Feb 23, 2017 at 03:30:21PM +0000, Pedro F. Giffuni wrote: W> > P> Author: pfg W> > P> Date: Thu Feb 23 15:30:21 2017 W> > P> New Revision: 314142 W> > P> URL: https://svnweb.freebsd.org/changeset/base/314142 W> > P> W> > P> Log: W> > P> dev/ce: double assignment. W> > P> W> > P> The code is not operational right now so just comment away an obviously W> > P> useless assignment. Fix some typos while here. W> > P> W> > P> Found with: coccinelle (da.cocci) W> > W> > What is interesting is that vendor still exists and sells the hardware, but W> > explicitly says "FreeBSD 7.x isn't supported" :) W> > W> > http://cronyx.ru/hardware/tau32.html W> > W> > I don't see any reasons for the driver to get broken between 6.0 and 7.0. W> W> Murray Stokely was the contact for this hardware. I think he gave it W> to me years ago, but I just checked and I can't find it in the usual W> places. IIRC, they were ISA cards though, not PCI... He probably brought one from Moscow 10 years ago. :) There was ISA version even earlier, and it had driver for FreeBSD, but AFAIK the driver never made it to the tree. At the moment when rik@ got commit bit, Cronyx was producing and supporing only PCI Taus. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Sat Feb 25 07:07: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 574FBCECE43; Sat, 25 Feb 2017 07:07:28 +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 37823891; Sat, 25 Feb 2017 07:07:27 +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 v1P77QxF029689 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Feb 2017 23:07:26 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v1P77PIW029688; Fri, 24 Feb 2017 23:07:25 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 24 Feb 2017 23:07:25 -0800 From: Gleb Smirnoff To: hiren panchasara Cc: "Simon J. Gerraty" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r278729 - head/sys/sys Message-ID: <20170225070725.GC8899@FreeBSD.org> References: <201502132319.t1DNJZuP057045@svn.freebsd.org> <20150311213607.GN88380@strugglingcoder.info> <20150316123940.GA17947@FreeBSD.org> <20150317010654.GB53237@strugglingcoder.info> <20150319180812.GI53237@strugglingcoder.info> <20170217190621.GE66077@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170217190621.GE66077@strugglingcoder.info> 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, 25 Feb 2017 07:07:28 -0000 On Fri, Feb 17, 2017 at 11:06:21AM -0800, hiren panchasara wrote: h> On 03/19/15 at 11:08P, hiren panchasara wrote: h> > On 03/16/15 at 06:06P, hiren panchasara wrote: h> > > On 03/16/15 at 03:39P, Gleb Smirnoff wrote: h> > > > On Wed, Mar 11, 2015 at 02:36:07PM -0700, hiren panchasara wrote: h> > > > h> On 02/13/15 at 11:19P, Simon J. Gerraty wrote: h> > > > h> > Author: sjg h> > > > h> > Date: Fri Feb 13 23:19:35 2015 h> > > > h> > New Revision: 278729 h> > > > h> > URL: https://svnweb.freebsd.org/changeset/base/278729 h> > > > h> > h> > > > h> > Log: h> > > > h> > sbspace: size of bleft, mleft must match sockbuf fields to avoid h> > > > h> > overflow on amd64 h> > > > h> > h> > > > h> > Submitted by: anshukla@juniper.net h> > > > h> > Obtained from: Juniper Networks h> > > > h> h> > > > h> Talking to sjg on -arch to MFC this. If he cannot get around doing that, h> > > > h> I'll do it tomorrow. h> > > > h> h> > > > h> Letting people know here to see if there are any objections. h> > > > h> > > > Would that fix the bug we've been discussing? h> > > h> > > Unsure as I am not sure what caused the issue I saw. h> > > h> > > For those who do not know the details, we recently saw a userland h> > > process stuck spinning at 100% around sbcut_internal(). Inside h> > > sbflush_internal(), the sb_cc was grown to be about 4G. And before h> > > passing it to sbcut_internal(), we cast it from uint to int which h> > > would make that valud -ve. h> > > h> > > Gleb pointed out to me that sbspace() is supposed to check/stop sb_cc h> > > from growing that large. h> > > h> > > Now, I am not sure if we'd ever run into this situation again but h> > > current fix is a great catch anyways. h> > > h> > > I still have 2 questions around what we saw. It'd be great if someone can h> > > clarify them for my understanding: h> > > h> > > 1) Even if we get into such a scenario that we were in, following would h> > > help by not looping endlessly. h> > > h> > > --- uipc_sockbuf.c.0 2015-03-11 15:49:52.000000000 -0700 h> > > +++ uipc_sockbuf.c 2015-03-11 15:51:48.000000000 -0700 h> > > @@ -877,6 +877,9 @@ h> > > { h> > > struct mbuf *m, *n, *next, *mfree; h> > > h> > > + if (len < 0) h> > > + panic("%s: len is %d and it is supposed to be +ve", h> > > + __func__, len); h> > > + h> > > next = (m = sb->sb_mb) ? m->m_nextpkt : 0; h> > > mfree = NULL h> > > h> > > 2) We need 1) because we are casting a uint to int which _may_ rander a h> > > value -ve. Is there a way we can avoid the casting? h> > h> > It'd be useful if someone with knowledge in this area can weigh in. h> h> Ran into this again today. While the real question of how sb_ccc grew h> this large is still unsolved, any objection to adding this patch to h> avoid a hang and panic instead? I am all for adding KASSERT now and then fixing the bug. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Sat Feb 25 07:51: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 38AEECECBB9; Sat, 25 Feb 2017 07:51:19 +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 EC15A1BD5; Sat, 25 Feb 2017 07:51:17 +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 JAA07343; Sat, 25 Feb 2017 09:51:09 +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 1chX8H-00025d-9b; Sat, 25 Feb 2017 09:51:09 +0200 Subject: Re: svn commit: r314216 - head/sys/x86/x86 To: "Jonathan T. Looney" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201702241856.v1OIu150004903@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Sat, 25 Feb 2017 09:50:32 +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: <201702241856.v1OIu150004903@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 07:51:19 -0000 On 24/02/2017 20:56, Jonathan T. Looney wrote: > Author: jtl > Date: Fri Feb 24 18:56:00 2017 > New Revision: 314216 > URL: https://svnweb.freebsd.org/changeset/base/314216 > > Log: > We have seen several cases recently where we appear to get a double-fault: > We have an original panic. Then, instead of writing the core to the dump > device, the kernel has a second panic: "smp_targeted_tlb_shootdown: > interrupts disabled". This change is an attempt to fix that second panic. Just curious if you were able to find out what code caused those shootdowns to be sent. It's pretty unusual for the after-panic code to do things like that. > When the other CPUs are stopped, we can't notify them of the TLB shootdown, > so we skip that operation. However, when the CPUs come back up, we > invalidate the TLB to ensure they correctly observe any changes to the > page mappings. > > Reviewed by: kib > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D9786 > > Modified: > head/sys/x86/x86/mp_x86.c > > Modified: head/sys/x86/x86/mp_x86.c > ============================================================================== > --- head/sys/x86/x86/mp_x86.c Fri Feb 24 17:36:55 2017 (r314215) > +++ head/sys/x86/x86/mp_x86.c Fri Feb 24 18:56:00 2017 (r314216) > @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); > #ifdef GPROF > #include > #endif > +#include > #include > #include > #include > @@ -1269,6 +1270,12 @@ cpustop_handler_post(u_int cpu) > CPU_CLR_ATOMIC(cpu, &started_cpus); > CPU_CLR_ATOMIC(cpu, &stopped_cpus); > > + /* > + * We don't broadcast TLB invalidations to other CPUs when they are > + * stopped. Hence, we clear the TLB before resuming. > + */ > + invltlb_glob(); > + > #if defined(__amd64__) && defined(DDB) > amd64_db_resume_dbreg(); > #endif > @@ -1427,6 +1434,10 @@ smp_targeted_tlb_shootdown(cpuset_t mask > uint32_t generation; > int cpu; > > + /* It is not necessary to signal other CPUs while in the debugger. */ > + if (kdb_active || panicstr != NULL) > + return; > + > /* > * Check for other cpus. Return if none. > */ > -- Andriy Gapon From owner-svn-src-all@freebsd.org Sat Feb 25 07:53: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 6E5FBCECE32; Sat, 25 Feb 2017 07:53:43 +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 2AA85DB; Sat, 25 Feb 2017 07:53:41 +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 JAA07352; Sat, 25 Feb 2017 09:53:40 +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 1chXAi-00025o-JX; Sat, 25 Feb 2017 09:53:40 +0200 Subject: Re: svn commit: r314239 - head/rescue/rescue To: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201702250311.v1P3B89W008306@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Sat, 25 Feb 2017 09:52:45 +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: <201702250311.v1P3B89W008306@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 07:53:43 -0000 On 25/02/2017 05:11, Ngie Cooper wrote: > Author: ngie > Date: Sat Feb 25 03:11:08 2017 > New Revision: 314239 > URL: https://svnweb.freebsd.org/changeset/base/314239 > > Log: > Add shutdown/poweroff support to rescue(8) > > shutdown is a safer way to power off than reboot (in general), because of > the added shutdown process that it executes via /etc/rc.shutdown . It was > odd that it was missing from rescue(8) since reboot and friends were > added in past commits. Just a note that rescue is typically used in situations where rc.shutdown is of little use. E.g., most likely there won't be any daemons running, etc. > While here, alias poweroff to shutdown for parity with sbin/shutdown/Makefile > > MFC after: 2 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/rescue/rescue/Makefile > > Modified: head/rescue/rescue/Makefile > ============================================================================== > --- head/rescue/rescue/Makefile Sat Feb 25 01:53:45 2017 (r314238) > +++ head/rescue/rescue/Makefile Sat Feb 25 03:11:08 2017 (r314239) > @@ -99,7 +99,7 @@ CRUNCH_PROGS_sbin= badsect \ > mount_udf mount_unionfs newfs \ > newfs_msdos nos-tun ping reboot \ > restore rcorder route routed rtquery rtsol savecore \ > - spppcontrol swapon sysctl tunefs umount > + shutdown spppcontrol swapon sysctl tunefs umount > > .if ${MK_ATM} != "no" > CRUNCH_PROGS_sbin+= atmconfig > @@ -166,6 +166,7 @@ CRUNCH_ALIAS_restore= rrestore > CRUNCH_ALIAS_dump= rdump > CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs > CRUNCH_ALIAS_geom= glabel gpart > +CRUNCH_ALIAS_shutdown= poweroff > > # dhclient has historically been troublesome... > CRUNCH_PROGS_sbin+= dhclient > -- Andriy Gapon From owner-svn-src-all@freebsd.org Sat Feb 25 08:07: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 4123DCEC3BE; Sat, 25 Feb 2017 08:07:30 +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 1BAFA8F2; Sat, 25 Feb 2017 08:07:30 +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 v1P87Tme028665; Sat, 25 Feb 2017 08:07:29 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P87SpI028662; Sat, 25 Feb 2017 08:07:28 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702250807.v1P87SpI028662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 25 Feb 2017 08:07:28 +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: r314251 - in stable: 10/contrib/ipfilter/lib 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/lib 11/sys/contrib/ipfilter/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: Sat, 25 Feb 2017 08:07:30 -0000 Author: cy Date: Sat Feb 25 08:07:28 2017 New Revision: 314251 URL: https://svnweb.freebsd.org/changeset/base/314251 Log: MFC r312787: Currently the fragment info is placed at the top of the linked list under a shared read lock. This patch attempts to upgrade the lock to an exclusive write lock. If the exclusive write lock fails to be obtained, the current fragment is not placed at the head of the list. This portion of the patch was inspired by NetBSD ip_frag.c r1.4 (which effectively removed the section of code that performed the reordering). The patch to sys/contrib/ipfilter/netinet/ip_compat.h adds the MUTEX_TRY_UPGRADE macro to support the patch to ip_frag.c. The patch to contrib/ipfilter/lib/rwlock_emul.c supports this patch by emulating the mutex in userspace when exercised by ipftest(1). Inspired by: NetBSD ip_frag.c r1.4 Modified: stable/11/contrib/ipfilter/lib/rwlock_emul.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_frag.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/lib/rwlock_emul.c stable/10/sys/contrib/ipfilter/netinet/ip_compat.h stable/10/sys/contrib/ipfilter/netinet/ip_frag.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/lib/rwlock_emul.c ============================================================================== --- stable/11/contrib/ipfilter/lib/rwlock_emul.c Sat Feb 25 06:11:59 2017 (r314250) +++ stable/11/contrib/ipfilter/lib/rwlock_emul.c Sat Feb 25 08:07:28 2017 (r314251) @@ -56,6 +56,27 @@ void eMrwlock_write_enter(rw, file, line } +void eMrwlock_try_upgrade(rw, file, line) + eMrwlock_t *rw; + char *file; + int line; +{ + if (rw->eMrw_magic != EMM_MAGIC) { + fprintf(stderr, "%s:eMrwlock_write_enter(%p): bad magic: %#x\n", + rw->eMrw_owner, rw, rw->eMrw_magic); + abort(); + } + if (rw->eMrw_read != 0 || rw->eMrw_write != 0) { + fprintf(stderr, + "%s:eMrwlock_try_upgrade(%p): already locked: %d/%d\n", + rw->eMrw_owner, rw, rw->eMrw_read, rw->eMrw_write); + abort(); + } + rw->eMrw_write++; + rw->eMrw_heldin = file; + rw->eMrw_heldat = line; +} + void eMrwlock_downgrade(rw, file, line) eMrwlock_t *rw; char *file; Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Sat Feb 25 06:11:59 2017 (r314250) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Sat Feb 25 08:07:28 2017 (r314251) @@ -165,6 +165,7 @@ struct ether_addr { # define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) # define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) # define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) +# define MUTEX_TRY_UPGRADE(x) rw_try_upgrade(&(x)->ipf_lk) # define RWLOCK_INIT(x,y) rw_init(&(x)->ipf_lk, (y)) # define RW_DESTROY(x) rw_destroy(&(x)->ipf_lk) # define RWLOCK_EXIT(x) do { \ @@ -420,6 +421,8 @@ extern void freembt __P((mb_t *)); # define MUTEX_DOWNGRADE(x) eMrwlock_downgrade(&(x)->ipf_emu, \ __FILE__, __LINE__) +# define MUTEX_TRY_UPGRADE(x) eMrwlock_try_upgrade(&(x)->ipf_emu, \ + __FILE__, __LINE__) # define READ_ENTER(x) eMrwlock_read_enter(&(x)->ipf_emu, \ __FILE__, __LINE__) # define RWLOCK_INIT(x, y) eMrwlock_init(&(x)->ipf_emu, y) @@ -670,6 +673,7 @@ extern char *ipf_getifname __P((struct i # define READ_ENTER(x) ; # define WRITE_ENTER(x) ; # define MUTEX_DOWNGRADE(x) ; +# define MUTEX_TRY_UPGRADE(x) ; # define RWLOCK_INIT(x, y) ; # define RWLOCK_EXIT(x) ; # define RW_DESTROY(x) ; Modified: stable/11/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_frag.c Sat Feb 25 06:11:59 2017 (r314250) +++ stable/11/sys/contrib/ipfilter/netinet/ip_frag.c Sat Feb 25 08:07:28 2017 (r314251) @@ -745,7 +745,7 @@ ipf_frag_lookup(softc, softf, fin, table } else if (off == 0) f->ipfr_seen0 = 1; - if (f != table[idx]) { + if (f != table[idx] && MUTEX_TRY_UPGRADE(lock)) { ipfr_t **fp; /* @@ -763,6 +763,7 @@ ipf_frag_lookup(softc, softf, fin, table table[idx]->ipfr_hprev = &f->ipfr_hnext; f->ipfr_hprev = table + idx; table[idx] = f; + MUTEX_DOWNGRADE(lock); } /* From owner-svn-src-all@freebsd.org Sat Feb 25 08:07: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 AC07ACEC3C5; Sat, 25 Feb 2017 08:07:30 +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 869418F3; Sat, 25 Feb 2017 08:07:30 +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 v1P87TB8028673; Sat, 25 Feb 2017 08:07:29 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1P87TNJ028670; Sat, 25 Feb 2017 08:07:29 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201702250807.v1P87TNJ028670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 25 Feb 2017 08:07: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: r314251 - in stable: 10/contrib/ipfilter/lib 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter/lib 11/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, 25 Feb 2017 08:07:30 -0000 Author: cy Date: Sat Feb 25 08:07:28 2017 New Revision: 314251 URL: https://svnweb.freebsd.org/changeset/base/314251 Log: MFC r312787: Currently the fragment info is placed at the top of the linked list under a shared read lock. This patch attempts to upgrade the lock to an exclusive write lock. If the exclusive write lock fails to be obtained, the current fragment is not placed at the head of the list. This portion of the patch was inspired by NetBSD ip_frag.c r1.4 (which effectively removed the section of code that performed the reordering). The patch to sys/contrib/ipfilter/netinet/ip_compat.h adds the MUTEX_TRY_UPGRADE macro to support the patch to ip_frag.c. The patch to contrib/ipfilter/lib/rwlock_emul.c supports this patch by emulating the mutex in userspace when exercised by ipftest(1). Inspired by: NetBSD ip_frag.c r1.4 Modified: stable/10/contrib/ipfilter/lib/rwlock_emul.c stable/10/sys/contrib/ipfilter/netinet/ip_compat.h stable/10/sys/contrib/ipfilter/netinet/ip_frag.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/lib/rwlock_emul.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_frag.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/lib/rwlock_emul.c ============================================================================== --- stable/10/contrib/ipfilter/lib/rwlock_emul.c Sat Feb 25 06:11:59 2017 (r314250) +++ stable/10/contrib/ipfilter/lib/rwlock_emul.c Sat Feb 25 08:07:28 2017 (r314251) @@ -56,6 +56,27 @@ void eMrwlock_write_enter(rw, file, line } +void eMrwlock_try_upgrade(rw, file, line) + eMrwlock_t *rw; + char *file; + int line; +{ + if (rw->eMrw_magic != EMM_MAGIC) { + fprintf(stderr, "%s:eMrwlock_write_enter(%p): bad magic: %#x\n", + rw->eMrw_owner, rw, rw->eMrw_magic); + abort(); + } + if (rw->eMrw_read != 0 || rw->eMrw_write != 0) { + fprintf(stderr, + "%s:eMrwlock_try_upgrade(%p): already locked: %d/%d\n", + rw->eMrw_owner, rw, rw->eMrw_read, rw->eMrw_write); + abort(); + } + rw->eMrw_write++; + rw->eMrw_heldin = file; + rw->eMrw_heldat = line; +} + void eMrwlock_downgrade(rw, file, line) eMrwlock_t *rw; char *file; Modified: stable/10/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Sat Feb 25 06:11:59 2017 (r314250) +++ stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Sat Feb 25 08:07:28 2017 (r314251) @@ -162,6 +162,7 @@ struct ether_addr { # define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) # define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) # define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) +# define MUTEX_TRY_UPGRADE(x) rw_try_upgrade(&(x)->ipf_lk) # define RWLOCK_INIT(x,y) rw_init(&(x)->ipf_lk, (y)) # define RW_DESTROY(x) rw_destroy(&(x)->ipf_lk) # define RWLOCK_EXIT(x) do { \ @@ -406,6 +407,8 @@ extern void freembt __P((mb_t *)); # define MUTEX_DOWNGRADE(x) eMrwlock_downgrade(&(x)->ipf_emu, \ __FILE__, __LINE__) +# define MUTEX_TRY_UPGRADE(x) eMrwlock_try_upgrade(&(x)->ipf_emu, \ + __FILE__, __LINE__) # define READ_ENTER(x) eMrwlock_read_enter(&(x)->ipf_emu, \ __FILE__, __LINE__) # define RWLOCK_INIT(x, y) eMrwlock_init(&(x)->ipf_emu, y) @@ -656,6 +659,7 @@ extern char *ipf_getifname __P((struct i # define READ_ENTER(x) ; # define WRITE_ENTER(x) ; # define MUTEX_DOWNGRADE(x) ; +# define MUTEX_TRY_UPGRADE(x) ; # define RWLOCK_INIT(x, y) ; # define RWLOCK_EXIT(x) ; # define RW_DESTROY(x) ; Modified: stable/10/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_frag.c Sat Feb 25 06:11:59 2017 (r314250) +++ stable/10/sys/contrib/ipfilter/netinet/ip_frag.c Sat Feb 25 08:07:28 2017 (r314251) @@ -743,7 +743,7 @@ ipf_frag_lookup(softc, softf, fin, table } else if (off == 0) f->ipfr_seen0 = 1; - if (f != table[idx]) { + if (f != table[idx] && MUTEX_TRY_UPGRADE(lock)) { ipfr_t **fp; /* @@ -761,6 +761,7 @@ ipf_frag_lookup(softc, softf, fin, table table[idx]->ipfr_hprev = &f->ipfr_hnext; f->ipfr_hprev = table + idx; table[idx] = f; + MUTEX_DOWNGRADE(lock); } /* From owner-svn-src-all@freebsd.org Sat Feb 25 08:09: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 EBDF0CEC4B1; Sat, 25 Feb 2017 08:09:48 +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 94ABCB60; Sat, 25 Feb 2017 08:09:48 +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 v1P89g5q083828 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Feb 2017 10:09:42 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v1P89g5q083828 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v1P89gqA083827; Sat, 25 Feb 2017 10:09:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 25 Feb 2017 10:09:42 +0200 From: Konstantin Belousov To: Andriy Gapon Cc: "Jonathan T. Looney" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r314216 - head/sys/x86/x86 Message-ID: <20170225080942.GA2092@kib.kiev.ua> References: <201702241856.v1OIu150004903@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Sat, 25 Feb 2017 08:09:49 -0000 On Sat, Feb 25, 2017 at 09:50:32AM +0200, Andriy Gapon wrote: > On 24/02/2017 20:56, Jonathan T. Looney wrote: > > Author: jtl > > Date: Fri Feb 24 18:56:00 2017 > > New Revision: 314216 > > URL: https://svnweb.freebsd.org/changeset/base/314216 > > > > Log: > > We have seen several cases recently where we appear to get a double-fault: > > We have an original panic. Then, instead of writing the core to the dump > > device, the kernel has a second panic: "smp_targeted_tlb_shootdown: > > interrupts disabled". This change is an attempt to fix that second panic. > > Just curious if you were able to find out what code caused those shootdowns to > be sent. > It's pretty unusual for the after-panic code to do things like that. Memory allocations for busdma in coredumping path do that. I know this from spending a lot of time making core dumps working with DMAR busdma. > > > > When the other CPUs are stopped, we can't notify them of the TLB shootdown, > > so we skip that operation. However, when the CPUs come back up, we > > invalidate the TLB to ensure they correctly observe any changes to the > > page mappings. > > > > Reviewed by: kib > > Sponsored by: Netflix > > Differential Revision: https://reviews.freebsd.org/D9786 > > > > Modified: > > head/sys/x86/x86/mp_x86.c > > > > Modified: head/sys/x86/x86/mp_x86.c > > ============================================================================== > > --- head/sys/x86/x86/mp_x86.c Fri Feb 24 17:36:55 2017 (r314215) > > +++ head/sys/x86/x86/mp_x86.c Fri Feb 24 18:56:00 2017 (r314216) > > @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); > > #ifdef GPROF > > #include > > #endif > > +#include > > #include > > #include > > #include > > @@ -1269,6 +1270,12 @@ cpustop_handler_post(u_int cpu) > > CPU_CLR_ATOMIC(cpu, &started_cpus); > > CPU_CLR_ATOMIC(cpu, &stopped_cpus); > > > > + /* > > + * We don't broadcast TLB invalidations to other CPUs when they are > > + * stopped. Hence, we clear the TLB before resuming. > > + */ > > + invltlb_glob(); > > + > > #if defined(__amd64__) && defined(DDB) > > amd64_db_resume_dbreg(); > > #endif > > @@ -1427,6 +1434,10 @@ smp_targeted_tlb_shootdown(cpuset_t mask > > uint32_t generation; > > int cpu; > > > > + /* It is not necessary to signal other CPUs while in the debugger. */ > > + if (kdb_active || panicstr != NULL) > > + return; > > + > > /* > > * Check for other cpus. Return if none. > > */ > > > > > -- > Andriy Gapon From owner-svn-src-all@freebsd.org Sat Feb 25 08:47: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 8F3B6CECCE8; Sat, 25 Feb 2017 08:47:00 +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 298AF1B14; Sat, 25 Feb 2017 08:46:59 +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 v1P8kniW092577 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Feb 2017 10:46:49 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v1P8kniW092577 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v1P8km15092576; Sat, 25 Feb 2017 10:46:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 25 Feb 2017 10:46:48 +0200 From: Konstantin Belousov To: Bruce Evans Cc: John Baldwin , "Rodney W. Grimes" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r314210 - in stable/11/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 Message-ID: <20170225084648.GB2092@kib.kiev.ua> References: <201702241602.v1OG21SM034524@repo.freebsd.org> <201702241653.v1OGrRTJ028384@pdx.rh.CN85.dnsmgr.net> <20170224171405.GX2092@kib.kiev.ua> <2826708.tPzGBbFfxk@ralph.baldwin.cx> <20170225085937.O1026@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170225085937.O1026@besplex.bde.org> 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: Sat, 25 Feb 2017 08:47:00 -0000 On Sat, Feb 25, 2017 at 11:18:30AM +1100, Bruce Evans wrote: > On Fri, 24 Feb 2017, John Baldwin wrote: > > > On Friday, February 24, 2017 07:14:05 PM Konstantin Belousov wrote: > >> On Fri, Feb 24, 2017 at 08:53:27AM -0800, Rodney W. Grimes wrote: > >>>> Author: kib > >>>> Date: Fri Feb 24 16:02:01 2017 > >>>> New Revision: 314210 > >>>> URL: https://svnweb.freebsd.org/changeset/base/314210 > >>>> > >>>> Log: > >>>> MFC r313154: > >>>> For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE > >>>> and device npx. > >>> > >>> Um, why????? > > Since the static configuration is only useful for testing, and complicates > the code, and tends to rot (it was most recently broken by only adding > fcmpset() in the !CPU_DISABLE_CMPXCHG clause of atomic.h and then using > fcmpset() in MI code without any ifdef). > > >>> Makes it much easier to test soft float if we can remove > >>> the npx device. Or has soft float support died yet again? > > Not much easier. First you have to fix the bitrot. Than maybe rewrite > the static configuration code to be less complicated and more maintainable. > It is easier to use dynamic configuration for everything. This only costs > a few hundred bytes (unless you have really large and complicated ifdefs > to omit more code statically) and a few cycles quite often at runtime. No > one cares much about the few cycles. > > >> Soft float was removed very long time ago. > > > > I think it was gone in 5.0. > > > >>> Yes, an i386 without an FPU is anchient by why are we removing working > >>> functionality? > >> This question makes an impression that you think that kernel would not > >> boot on a machine without FPU. The code to tolerate such configuration > >> is there, but it is not tested for obvious reasons. > >> > >> Completely different issue is that userspace requires FPU and e.g. /bin/sh > >> traps on the next setjmp(3) call. > > This is my context-switching code for the FPU in setjmp(). It requires > either an FPU or an emulator, and there was an emulator when it was written. > > When I discussed removing the static configuration code with kib, I > mentioned that SSE is still not properly supported on i386, but haven't > got around to responding with the details. The main one is this code > in setjmp(). It is is still completely missing SSE support. So FPU+SSE > states set by fenv get restored inconsistently by longjmp(). The current > brokenness seems to be: > - i386 restores the control word for the i387 only. fenve has dynamic > SSE tests, and it sets both the x87 and the SSE control works for > things like fesetround(). Then longjmp() leaves the SSE control word > inconsistent. We do not have unused space in the jmp_buf to preserve SSE state. Do you mean to restore SSE MXCSR control bits to the same state as x87 cw ? > - both amd64 and i386 attempt to preserve the exception flags. This > might be useful, but is quite broken. > > My original fixes cleared the i387 env before restoring the control > word. Other systems were broken in not restoring anything or more > broken in not clearing anything. According to das's commits that > changed this, other systems still didn't restore the control word(s) > 16 years later in 2008, and C99 doesn't require restoring the control > words, but C99 does require restoring the status word. I couldn't > find where C99 requires this. > > For the i387 or any FPU with similar or even more imprecise exceptions, > leaving unmasked exceptions to trap again later would be painful. > > Anyway, das's changes don't really work: > - kib committed my fix to stop clearing x87 exception flags in the > kernel part of the SIGFPE handler in 2012. This makes x87 exceptions > faults (repeat at the FP instruction that trapped, if a SIGFPE handler > returns), which is too surprising for most applications, but few notice > because few even unmask the traps. So it is now possible to recover > the exception flags. But this is quite complicated, and far too hard > to do in longjmp() from a signal handler. So the flags aren't actually > preserved for the longjmp() freom a signal handler. > - for the x87, there is other state to restore or clear. The status word > contains the stack pointer together with the exception flags. The tag > word contains the status of the 8 registers on the stack. The stack > pointer can be anything provided the tag word is clear. For longjmp() > from signal handlers, we depend on signal handlers getting a clean > state so that there is no garbage on the stack. I'm not sure if all > combinations of kernels and libraries are consistent about this (old > signal handlers don't do this, but should only be used with old > setjmp()/longjmp() that clear the state). For longjmp() not from > signal handlers, we depend on the ABI guaranteeing that there is > no garbage on the stack or in the FP env when longjmp() is called. > > Dynamic SSE tests can probably be done better using vdso, but only if > vdso is almost free. I don't know if it requires a syscall to set up, > or is automatic but costs all applications to set up. Otherwise, > sigsetjmp() and siglongjmp() are already very slow (they do too many > syscalls), so even another syscall to detect SSE would not make them > much slower. They can share the SSE detection with fenv. This would > work OK, but is inconvenient since fenv lives in libm. SSE detection is done by CPUID and a single bit test, it does not require a syscall. There are some plans and WIP to bring analog of cpu_feature* variables into libc, but it is not too critically important. Libc and indirectly libthr already detect XSAVE support and use it for full context saving and for deferred signal delivery in threaded critical section. sigsetjmp and siglongjmp only execute one syscall each on x86. In principle, we can try to increase jmp_buf size to provide more hardware registers saved and restored by *jmp functions, but this is quite painful and should be proven to provide real benefits besides theoretical correctness. E.g., some high-profile application which depends on restoration of SSE state after siglongjmp from a signal handler would do it, otherwise ABI breakage makes it better to not try. > > >> Also, we do not run on real 386, only on 486+, and there was probably only > >> Intel 486SX CPU model which has all 486 features but no FPU. > > > > Yes, we effectively require an FPU on i386. I'd be tempted to start requiring > > a built-in FPU (so INT 16 vs IRQ 13) so we could further reduce diffs with > > amd64 and eventually have an "x86" fpu.c. That would only drop support for > > That would be backwords. amd64 should have an "x86" npx.c. The kernel does > almost no FPU handling, so npx is a better name than fpu. It is even better > than in 1991, since the numeric extensions are not limited to floating > point ones. First there was mmx, then Intel started unimproving names with > sse, then intel got tired of changing the prefix and started using > nondescript sse numbers. > > > systems using a 486sx with an external FPU. Those systems are probably happier > > running FreeBSD 4.x than 12 anyway. > > Bruce From owner-svn-src-all@freebsd.org Sat Feb 25 10:09: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 D48C1CEB0B7; Sat, 25 Feb 2017 10:09:59 +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 A107F3D1; Sat, 25 Feb 2017 10:09:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id m88so436525pfi.3; Sat, 25 Feb 2017 02:09: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=gfuvKkV4S+mxQ/asj/IGk9hUGSFAnLwOmY3alVmx/z8=; b=oKVWnlDBeG+S3j8tGwe/FdHYNXyKpktIR4hRD3XmUN2+qIC3NsPqVedlY1DgX2CdmC BcANpvTtHl8W4KOgCiZfn+PR+PiAOWuZUzeJqGvJjlmEF/Eoe/WEgnyma6HLRhQDuhxN bS1aWwikzmoxMQqEbMuPY2xYRdkCOCrxf5+W4gALxN3JIDnCjEOqRrDhXKoBIUOpwnFy 257BBhNCnmEH33qxjlgy7KvlOXi6KYOgkafPBkFq2BUndXjWJ3GYdpYO8CBWa+/ka5uF Z/v+xOnpxgCZmsrrm44if2jZfBaY7PkkvN7VvOyYt9d2ABuLwVh6qQqZWrYOIo4JAv3I MpNw== 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=gfuvKkV4S+mxQ/asj/IGk9hUGSFAnLwOmY3alVmx/z8=; b=CyklkJGHFZ7Eacc9dsVz6GYVREMgK8qQemU6P39b05cy3L5RMxo6C8s7nXIR1nuijU TcyRZ4ZOt5drimm3z+6FAm/79HNPErINSR8K5UtZoJp3CgxlWiS1t3H3hm8I/V/jtDFF kV1EyyVs/qv3RPVddyzzG91IdIYg1PRytWaujuvk8feZzr5owfOP5MjiOwGryVxIE3TR YfjsQfSuB6TC2QezqDPeoUHt8Wd6+QQznybS7QYRwmepstZjXE6mo+cnMRsK2kKdLet0 hPmVSyvPA+fWtN02gqjQJlE96GKv0byCril0TR44ji0xkS1+NSoZ+tsR1/8twdg33K08 mo0Q== X-Gm-Message-State: AMke39k5hfxNfqyuw73UETIwY43aLJ7KhmMS6ukdIPuDnH3pk4S7yr4zir8rnVmfocnDrw== X-Received: by 10.99.52.70 with SMTP id b67mr9050399pga.131.1488017398976; Sat, 25 Feb 2017 02:09:58 -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 z27sm19684704pfg.38.2017.02.25.02.09.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 25 Feb 2017 02:09:57 -0800 (PST) Subject: Re: svn commit: r314239 - head/rescue/rescue Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_006A577F-0B2D-4F5D-86EF-3714470751C3"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Sat, 25 Feb 2017 02:09:54 -0800 Cc: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-Id: <0F63A844-8094-4200-ABAD-C0BB60CABF8C@gmail.com> References: <201702250311.v1P3B89W008306@repo.freebsd.org> To: Andriy Gapon 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, 25 Feb 2017 10:09:59 -0000 --Apple-Mail=_006A577F-0B2D-4F5D-86EF-3714470751C3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 24, 2017, at 23:52, Andriy Gapon wrote: >=20 > On 25/02/2017 05:11, Ngie Cooper wrote: >> Author: ngie >> Date: Sat Feb 25 03:11:08 2017 >> New Revision: 314239 >> URL: https://svnweb.freebsd.org/changeset/base/314239 >>=20 >> Log: >> Add shutdown/poweroff support to rescue(8) >>=20 >> shutdown is a safer way to power off than reboot (in general), = because of >> the added shutdown process that it executes via /etc/rc.shutdown . = It was >> odd that it was missing from rescue(8) since reboot and friends were >> added in past commits. >=20 > Just a note that rescue is typically used in situations where = rc.shutdown is of > little use. E.g., most likely there won't be any daemons running, = etc. Yeah.. or arguably ones of value. I still like the fact that it=E2=80=99s = running =E2=80=9Cservice stop=E2=80=9D on /etc/rc.d scripts in = reverse to shut things down cleanly, as opposed to reboot(8) which just = reboots. This can make a bit of a difference if you just set up a system = and still have mount points setup, etc. But in most cases, yes, I would totally agree. -Ngie --Apple-Mail=_006A577F-0B2D-4F5D-86EF-3714470751C3 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 iQIcBAEBCgAGBQJYsVf0AAoJEPWDqSZpMIYV0GAP/0cEY2HouAgx5xzPwtE+brBR eW9QWMTHDA5cjb2ZN8EFnGl7mwY9mxDD+nW6SsXELUwqKmh/Et+REYL5xzOavEIu 47vPKuI+v1YQ60yvAnpaEHCeToT71pJEolJlE0ZEuwFtYdQnnz/EgU74txpYyfxv BgahG6AocryUXjy5vgqfCEuiDh1V+cOqz9Gkny9j6/z2YsQ45ouJqJnW8N7waBRJ kMZVNoO8R5dGI77pR+xugRVloPytgtYh1yNFo9P761K/gvtuzxVpFYwM5i5RtD1D MEIbEhsM4UQ5xiMTn4XefQV+UimN/l/QOjik/S/UDlxuwpOGHgwI7Y+7iV/2zQt5 lyMnN5212OGZNQMj22aJYwKYwgq9F9R1LfRcffomIZTZRYyhqkcBdf+S5b/AKehW Scgadu0s6vo1LxLpQomYSZ/8/JMjkAAzYrn5ebkksx/KNi8+/S6G35B5/39auQ8V 4Z8ImFPv/jkqosrrT20QNJtz/QEV3my1wMTAfdCJjeNnL+eTX75GXn4Bt+hZhTol 4GpLvRO2U5lhaqUMj3j34JFxjsIC3xpQOxvdQ2cq8a+p3CQp+pBM9DYdiAJVyQX9 wqd3c8oEG0tub1074sBbWN8X94Jf31sNVdtQId94GvSgcrOQ6XavjptHVf6ehab9 vj8IeiUlRc3uHgBduM1m =fWuv -----END PGP SIGNATURE----- --Apple-Mail=_006A577F-0B2D-4F5D-86EF-3714470751C3-- From owner-svn-src-all@freebsd.org Sat Feb 25 10:15: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 AFA98CEB2E6; Sat, 25 Feb 2017 10:15:51 +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 337C6A6E; Sat, 25 Feb 2017 10:15:51 +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 v1PAFhZT011800 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Feb 2017 12:15:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v1PAFhZT011800 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v1PAFhG9011789; Sat, 25 Feb 2017 12:15:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 25 Feb 2017 12:15:43 +0200 From: Konstantin Belousov To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314087 - head/sys/x86/x86 Message-ID: <20170225101543.GC2092@kib.kiev.ua> References: <201702220707.v1M7764i020598@repo.freebsd.org> <20170223053954.J1044@besplex.bde.org> <20170224125335.GV2092@kib.kiev.ua> <20170225130549.C1026@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170225130549.C1026@besplex.bde.org> 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: Sat, 25 Feb 2017 10:15:51 -0000 On Sat, Feb 25, 2017 at 02:17:23PM +1100, Bruce Evans wrote: > On Fri, 24 Feb 2017, Konstantin Belousov wrote: > > > On Thu, Feb 23, 2017 at 06:33:43AM +1100, Bruce Evans wrote: > >> On Wed, 22 Feb 2017, Konstantin Belousov wrote: > >> > >>> Log: > >>> More fixes for regression in r313898 on i386. > >>> Use long long constants where needed. > >> > >> The long long abomination is never needed, and is always a style bug. > > I never saw any explanation behind this claim. Esp. the first part > > of it, WRT 'never needed'. > > I hope I wrote enough about this in log messages when I cleaned up the > long longs 20 years ago :-). > > long long was a hack to work around intmax_t not existing and long being > unexpandable in practice because it was used in ABIs. It should have gone > away when intmax_t was standardized. Unfortunately, long long was > standardised too. It does not make a sense even more. long long is native compiler type, while anything_t is a typename to provide MI fixed type. long long was obviosvly choosen to extend types without requiring new keyword. > > It is "never needed" since anything that can be done with it can be done > better using intmax_t or intN_t or int_fastN_T or int_leastN_t. Except, > there is no suffix for explicit intmax_t constants, so you would have to > write such constants using INTMAX_C() or better a cast to intmax_t if > the constant is not needed in a cpp expression. If you replace long long with int there, the same logical structure of sentences will hold. Does it mean that 'int' is abomination since we have int32_t which allows everything to be done better ? > > >> I don't like using explicit long constants either. Here the number of bits > >> in the register is fixed by the hardware at 64. The number of bits in a > >> long on amd64 and a long on i386 is only fixed by ABI because the ABI is > >> broken for historical reasons. > > I really cannot make any sense of this statement. > > To know that the ULL suffix is correct for 64-bit types, you have to now > that long longs are 64 bits on all arches supported by the code. Then > to use this suffix, you have to hard-code this knowledge. Then to read > the code, the reader has to translate back to 64 bits. The translations > were easier 1 arch at a time. And why it is bad ? Same is true for int and long, which are often used in MD code to provide specific word size. In fact, there is not much for a programmer to know: we and any other UNIX supports either ILP32 or LP64 for the given architecture. > Casting to uint64_t is clearer, but doesn't > work in cpp expressions. In cpp expressions, use UINT64_C(). Almost no > one knows about it uses this. There are 5 examples of using it in /sys > (3 in arm64 pte.h, 1 in powerpc pte.h, and 1 in mips xlr_machdep.c, > where the use is unnecessary but interesting: it is ~UINT64_C(0). We > used to have squillions of magic ~0's for the rman max limit. This was > spelled ~0U, ~0UL and perhaps even plain ~0. Plain ~0 worked best except > on unsupported 1's complement machines, since it normally gets sign extended > to as many bits as necessary. Now this is spelled RM_MAX_END, which is > implemented non-magically using a cast: (~(rman_res_t)0). Grepping for > ~0[uU] in dev/* shows only 1 obvious unconverted place. This clearly demonstrates why ULL/UL notation is superior to UINT64_C() or any other obfuscation. > > >> Only very MD code can safely assume the > >> size of long and long long. This code was MD enough before it was merged, > >> but now it shouldn't use long since that varies between amd64 and i386, > >> and it shouldn't use long long since that is a style bug. > > > > Well, I do not see anything wrong with long long, at least until > > explained. > > > > Anyway, below is the patch to use uint64_t cast in important place, > > and removal of LL suffix in unimportant expression. > > This is correct. > > > diff --git a/sys/x86/x86/x86_mem.c b/sys/x86/x86/x86_mem.c > > index d639224f840..8bc4d3917a0 100644 > > --- a/sys/x86/x86/x86_mem.c > > +++ b/sys/x86/x86/x86_mem.c > > @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) > > > > /* Compute the range from the mask. Ick. */ > > mrd->mr_len = (~(msrv & mtrr_physmask) & > > - (mtrr_physmask | 0xfffLL)) + 1; > > + (mtrr_physmask | 0xfff)) + 1; > > if (!mrvalid(mrd->mr_base, mrd->mr_len)) > > mrd->mr_flags |= MDF_BOGUS; > > > > @@ -638,7 +638,8 @@ x86_mrinit(struct mem_range_softc *sc) > > * Determine the size of the PhysMask and PhysBase fields in > > * the variable range MTRRs. > > */ > > - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; > > + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & > > + ~(uint64_t)0xfff; > > > > /* If fixed MTRRs supported and enabled. */ > > if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { > > Now I wonder what these magic 0xfff's are. Are they PAGE_MASK, where the > register is encoded like a page table to put metadata in the low bits? Many Intel registers have a structure where bits N:12 denote a physical address aligned at page boundary, and bits 11:0 are used for attributes not directly related to addresses. We do not use PAGE_MASK there traditionally, PAGE_MASK is only used to mask the page offset in actual virtual address. > > There is already a macro MTRR_PHYSBASE_PHYSMASK which looks like it should > be used here, except it is zero in the top 12 bits too. > > There is no macro for 0xfff, but you get that by ORing the bits for other > macros. 0xfff is just as readable. > > The MTRR_* macros are in x86/specialreg.h, and are spelled without ULL > suffixes. I prefer the latter, but seem to rememeber bugs elsewhere > caused by using expressions like ~FOO where FOO happens to be small. > Actually the problems are mostly when FOO happens to be between > INT_MAX+1U and UINT_MAX. When FOO is small and has no suffix, e.g., > if it is 0, then its type is int and ~FOO has type int and sign-extends > to 64 bits if necessary. But if FOO is say 0x80000000, it has type u_int > so ~FOO doesn't sign-extend. (Decimal constants without a suffix never > have an unsigned type and the hex constant here lets me write this number > and automatically give it an unsigned type. Normally this type is best.) > > Explicit type suffixes mainly hide these problems. If FOO is 0x80000000ULL, > then it has the correct type for ~FOO to work in expressions where everything > has type unsigned long long, but in other expressions a cast might still > be needed. Yes, yet another (and most useful) reason to use ULL and ignore a FUD about it. From owner-svn-src-all@freebsd.org Sat Feb 25 10:32: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 58DA4CEB895; Sat, 25 Feb 2017 10:32: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 1DD822FE; Sat, 25 Feb 2017 10:32: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 v1PAWoTw089948; Sat, 25 Feb 2017 10:32:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PAWovs089947; Sat, 25 Feb 2017 10:32:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702251032.v1PAWovs089947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Feb 2017 10:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314252 - head/sys/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: Sat, 25 Feb 2017 10:32:51 -0000 Author: kib Date: Sat Feb 25 10:32:49 2017 New Revision: 314252 URL: https://svnweb.freebsd.org/changeset/base/314252 Log: Do not use ULL suffix. Cast to uint64_t where the suffix is needed, and just remove it in another place. Requested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/x86_mem.c Modified: head/sys/x86/x86/x86_mem.c ============================================================================== --- head/sys/x86/x86/x86_mem.c Sat Feb 25 08:07:28 2017 (r314251) +++ head/sys/x86/x86/x86_mem.c Sat Feb 25 10:32:49 2017 (r314252) @@ -260,7 +260,7 @@ x86_mrfetch(struct mem_range_softc *sc) /* Compute the range from the mask. Ick. */ mrd->mr_len = (~(msrv & mtrr_physmask) & - (mtrr_physmask | 0xfffLL)) + 1; + (mtrr_physmask | 0xfff)) + 1; if (!mrvalid(mrd->mr_base, mrd->mr_len)) mrd->mr_flags |= MDF_BOGUS; @@ -638,7 +638,8 @@ x86_mrinit(struct mem_range_softc *sc) * Determine the size of the PhysMask and PhysBase fields in * the variable range MTRRs. */ - mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & ~0xfffULL; + mtrr_physmask = (((uint64_t)1 << cpu_maxphyaddr) - 1) & + ~(uint64_t)0xfff; /* If fixed MTRRs supported and enabled. */ if ((mtrrcap & MTRR_CAP_FIXED) && (mtrrdef & MTRR_DEF_FIXED_ENABLE)) { From owner-svn-src-all@freebsd.org Sat Feb 25 10:38: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 4CCCFCEB96D; Sat, 25 Feb 2017 10:38: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 0A79B6AB; Sat, 25 Feb 2017 10:38:19 +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 v1PAcJPY090201; Sat, 25 Feb 2017 10:38:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PAcIwH090194; Sat, 25 Feb 2017 10:38:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702251038.v1PAcIwH090194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Feb 2017 10:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314253 - in head/sys: fs/nfsserver kern sys ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 10:38:20 -0000 Author: kib Date: Sat Feb 25 10:38:18 2017 New Revision: 314253 URL: https://svnweb.freebsd.org/changeset/base/314253 Log: Do not leak mount references for dying threads. Thread might create a condition for delayed SU cleanup, which creates a reference to the mount point in td_su, but exit without returning through userret(), e.g. when terminating due to single-threading or process exit. In this case, td_su reference is not dropped and mount point cannot be freed. Handle the situation by clearing td_su also in the thread destructor and in exit1(). softdep_ast_cleanup() has to receive the thread as argument, since e.g. thread destructor is executed in different context. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c head/sys/kern/kern_exit.c head/sys/kern/kern_thread.c head/sys/kern/subr_trap.c head/sys/sys/proc.h head/sys/sys/systm.h head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Feb 25 10:38:18 2017 (r314253) @@ -304,8 +304,7 @@ nfssvc_program(struct svc_req *rqst, SVC svc_freereq(rqst); out: - if (softdep_ast_cleanup != NULL) - softdep_ast_cleanup(); + td_softdep_cleanup(curthread); NFSEXITCODE(0); } Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/kern/kern_exit.c Sat Feb 25 10:38:18 2017 (r314253) @@ -207,8 +207,7 @@ exit1(struct thread *td, int rval, int s /* * Deref SU mp, since the thread does not return to userspace. */ - if (softdep_ast_cleanup != NULL) - softdep_ast_cleanup(); + td_softdep_cleanup(td); /* * MUST abort all other threads before proceeding past here. Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/kern/kern_thread.c Sat Feb 25 10:38:18 2017 (r314253) @@ -192,6 +192,8 @@ thread_dtor(void *mem, int size, void *a #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); + td_softdep_cleanup(td); + MPASS(td->td_su == NULL); EVENTHANDLER_INVOKE(thread_dtor, td); tid_free(td->td_tid); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/kern/subr_trap.c Sat Feb 25 10:38:18 2017 (r314253) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); #include -void (*softdep_ast_cleanup)(void); +void (*softdep_ast_cleanup)(struct thread *); /* * Define the code needed before returning to user mode, for trap and @@ -128,8 +128,8 @@ userret(struct thread *td, struct trapfr #ifdef KTRACE KTRUSERRET(td); #endif - if (softdep_ast_cleanup != NULL) - softdep_ast_cleanup(); + td_softdep_cleanup(td); + MPASS(td->td_su == NULL); /* * If this thread tickled GEOM, we need to wait for the giggling to Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/sys/proc.h Sat Feb 25 10:38:18 2017 (r314253) @@ -1114,6 +1114,15 @@ td_get_sched(struct thread *td) return ((struct td_sched *)&td[1]); } +extern void (*softdep_ast_cleanup)(struct thread *); +static __inline void +td_softdep_cleanup(struct thread *td) +{ + + if (td->td_su != NULL && softdep_ast_cleanup != NULL) + softdep_ast_cleanup(td); +} + #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */ Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/sys/systm.h Sat Feb 25 10:38:18 2017 (r314253) @@ -452,8 +452,6 @@ void free_unr(struct unrhdr *uh, u_int i void intr_prof_stack_use(struct thread *td, struct trapframe *frame); -extern void (*softdep_ast_cleanup)(void); - void counted_warning(unsigned *counter, const char *msg); __NULLABILITY_PRAGMA_POP Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sat Feb 25 10:32:49 2017 (r314252) +++ head/sys/ufs/ffs/ffs_softdep.c Sat Feb 25 10:38:18 2017 (r314253) @@ -902,7 +902,7 @@ static int pagedep_find(struct pagedep_h static void pause_timer(void *); static int request_cleanup(struct mount *, int); static void schedule_cleanup(struct mount *); -static void softdep_ast_cleanup_proc(void); +static void softdep_ast_cleanup_proc(struct thread *); static int process_worklist_item(struct mount *, int, int); static void process_removes(struct vnode *); static void process_truncates(struct vnode *); @@ -13445,15 +13445,13 @@ schedule_cleanup(struct mount *mp) } static void -softdep_ast_cleanup_proc(void) +softdep_ast_cleanup_proc(struct thread *td) { - struct thread *td; struct mount *mp; struct ufsmount *ump; int error; bool req; - td = curthread; while ((mp = td->td_su) != NULL) { td->td_su = NULL; error = vfs_busy(mp, MBF_NOWAIT); @@ -13491,6 +13489,10 @@ softdep_ast_cleanup_proc(void) } vfs_unbusy(mp); } + if ((mp = td->td_su) != NULL) { + td->td_su = NULL; + vfs_rel(mp); + } } /* From owner-svn-src-all@freebsd.org Sat Feb 25 12:11: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 3FB9BCEC7B4; Sat, 25 Feb 2017 12:11:09 +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 108C61DE; Sat, 25 Feb 2017 12:11:08 +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 v1PCB8EW026091; Sat, 25 Feb 2017 12:11:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PCB8GZ026090; Sat, 25 Feb 2017 12:11:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702251211.v1PCB8GZ026090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 12:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314254 - head/sys/dev/usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 12:11:09 -0000 Author: mav Date: Sat Feb 25 12:11:07 2017 New Revision: 314254 URL: https://svnweb.freebsd.org/changeset/base/314254 Log: Update kern_data_resid according to r312291. This now mandatory for correct operation. Modified: head/sys/dev/usb/storage/cfumass.c Modified: head/sys/dev/usb/storage/cfumass.c ============================================================================== --- head/sys/dev/usb/storage/cfumass.c Sat Feb 25 10:38:18 2017 (r314253) +++ head/sys/dev/usb/storage/cfumass.c Sat Feb 25 12:11:07 2017 (r314254) @@ -720,11 +720,6 @@ cfumass_t_data_out_callback(struct usb_x int actlen, ctl_sg_count; sc = usbd_xfer_softc(xfer); - - CFUMASS_DEBUG(sc, "go"); - - usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); - io = sc->sc_ctl_io; if (io->scsiio.kern_sg_entries > 0) { @@ -741,25 +736,17 @@ cfumass_t_data_out_callback(struct usb_x case USB_ST_TRANSFERRED: CFUMASS_DEBUG(sc, "USB_ST_TRANSFERRED"); - /* - * If the host sent less data than required, zero-out - * the remaining buffer space, to prevent a malicious host - * to writing uninitialized kernel memory to the disk. - */ + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); if (actlen != ctl_sglist[0].len) { KASSERT(actlen <= ctl_sglist[0].len, ("actlen %d > ctl_sglist.len %zd", actlen, ctl_sglist[0].len)); - CFUMASS_DEBUG(sc, "host transferred %d bytes" "instead of expected %zd bytes", actlen, ctl_sglist[0].len); - - memset((char *)(ctl_sglist[0].addr) + actlen, 0, - ctl_sglist[0].len - actlen); } - - sc->sc_current_residue = 0; + sc->sc_current_residue -= actlen; + io->scsiio.kern_data_resid -= actlen; io->scsiio.be_move_done(io); sc->sc_ctl_io = NULL; break; @@ -795,17 +782,18 @@ cfumass_t_data_in_callback(struct usb_xf union ctl_io *io; uint32_t max_bulk; struct ctl_sg_entry ctl_sg_entry, *ctl_sglist; - int ctl_sg_count; + int actlen, ctl_sg_count; sc = usbd_xfer_softc(xfer); - max_bulk = usbd_xfer_max_len(xfer); - io = sc->sc_ctl_io; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: CFUMASS_DEBUG(sc, "USB_ST_TRANSFERRED"); + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + sc->sc_current_residue -= actlen; + io->scsiio.kern_data_resid -= actlen; io->scsiio.be_move_done(io); sc->sc_ctl_io = NULL; break; @@ -829,12 +817,9 @@ tr_setup: "we will send %ju and stall", sc->sc_current_transfer_length, (uintmax_t)io->scsiio.kern_total_len); - sc->sc_current_residue = sc->sc_current_transfer_length - - io->scsiio.kern_total_len; - } else { - sc->sc_current_residue = 0; } + max_bulk = usbd_xfer_max_len(xfer); CFUMASS_DEBUG(sc, "max_bulk %d, requested size %d, " "CTL segment size %zd", max_bulk, sc->sc_current_transfer_length, ctl_sglist[0].len); @@ -956,8 +941,6 @@ cfumass_datamove(union ctl_io *io) goto fail; } - /* We hadn't received anything during this datamove yet. */ - io->scsiio.ext_data_filled = 0; cfumass_transfer_start(sc, CFUMASS_T_DATA_OUT); } @@ -1028,8 +1011,7 @@ cfumass_init(void) cfumass_port.frontend = &cfumass_frontend; cfumass_port.port_type = CTL_PORT_UMASS; - /* XXX KDM what should the real number be here? */ - cfumass_port.num_requested_ctl_io = 4096; + cfumass_port.num_requested_ctl_io = 1; cfumass_port.port_name = "cfumass"; cfumass_port.physical_port = 0; cfumass_port.virtual_port = 0; From owner-svn-src-all@freebsd.org Sat Feb 25 14:20: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 0BC61CED27F; Sat, 25 Feb 2017 14:20:32 +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 BE06E15C; Sat, 25 Feb 2017 14:20:31 +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 v1PEKUmi076703; Sat, 25 Feb 2017 14:20:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEKUSn076701; Sat, 25 Feb 2017 14:20:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702251420.v1PEKUSn076701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 14:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314255 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 14:20:32 -0000 Author: mav Date: Sat Feb 25 14:20:30 2017 New Revision: 314255 URL: https://svnweb.freebsd.org/changeset/base/314255 Log: Reenable CTL_WITH_CA, optimizing it for lower memory usage. This code was disabled due to its high memory usage. But now we need this functionality for cfumass(4) frontend, since USB MS BBB transport does not support autosense. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Feb 25 12:11:07 2017 (r314254) +++ head/sys/cam/ctl/ctl.c Sat Feb 25 14:20:30 2017 (r314255) @@ -2146,8 +2146,8 @@ ctl_add_initiator(struct ctl_port *port, port->wwpn_iid[iid].name); /* - * XXX KDM clear have_ca and ua_pending on each LUN for - * this initiator. + * XXX KDM clear pending_sense and pending_ua on each LUN + * for this initiator. */ } take: @@ -9145,7 +9145,7 @@ ctl_request_sense(struct ctl_scsiio *cts struct ctl_softc *softc = CTL_SOFTC(ctsio); struct ctl_lun *lun = CTL_LUN(ctsio); struct scsi_request_sense *cdb; - struct scsi_sense_data *sense_ptr; + struct scsi_sense_data *sense_ptr, *ps; uint32_t initidx; int have_error; u_int sense_len = SSD_FULL_SIZE; @@ -9201,15 +9201,17 @@ ctl_request_sense(struct ctl_scsiio *cts * Pending sense gets returned first, then pending unit attentions. */ mtx_lock(&lun->lun_lock); -#ifdef CTL_WITH_CA - if (ctl_is_set(lun->have_ca, initidx)) { + ps = lun->pending_sense[initidx / CTL_MAX_INIT_PER_PORT]; + if (ps != NULL) + ps += initidx % CTL_MAX_INIT_PER_PORT; + if (ps != NULL && ps->error_code != 0) { scsi_sense_data_type stored_format; /* * Check to see which sense format was used for the stored * sense data. */ - stored_format = scsi_sense_type(&lun->pending_sense[initidx]); + stored_format = scsi_sense_type(ps); /* * If the user requested a different sense format than the @@ -9224,23 +9226,17 @@ ctl_request_sense(struct ctl_scsiio *cts if ((stored_format == SSD_TYPE_FIXED) && (sense_format == SSD_TYPE_DESC)) ctl_sense_to_desc((struct scsi_sense_data_fixed *) - &lun->pending_sense[initidx], - (struct scsi_sense_data_desc *)sense_ptr); + ps, (struct scsi_sense_data_desc *)sense_ptr); else if ((stored_format == SSD_TYPE_DESC) && (sense_format == SSD_TYPE_FIXED)) ctl_sense_to_fixed((struct scsi_sense_data_desc *) - &lun->pending_sense[initidx], - (struct scsi_sense_data_fixed *)sense_ptr); + ps, (struct scsi_sense_data_fixed *)sense_ptr); else - memcpy(sense_ptr, &lun->pending_sense[initidx], - MIN(sizeof(*sense_ptr), - sizeof(lun->pending_sense[initidx]))); + memcpy(sense_ptr, ps, sizeof(*sense_ptr)); - ctl_clear_mask(lun->have_ca, initidx); + ps->error_code = 0; have_error = 1; - } else -#endif - if (have_error == 0) { + } else { ua_type = ctl_build_ua(lun, initidx, sense_ptr, &sense_len, sense_format); if (ua_type != CTL_UA_NONE) @@ -11360,17 +11356,19 @@ ctl_scsiio_precheck(struct ctl_softc *so initidx = ctl_get_initindex(&ctsio->io_hdr.nexus); -#ifdef CTL_WITH_CA /* * If we've got a request sense, it'll clear the contingent * allegiance condition. Otherwise, if we have a CA condition for * this initiator, clear it, because it sent down a command other * than request sense. */ - if ((ctsio->cdb[0] != REQUEST_SENSE) - && (ctl_is_set(lun->have_ca, initidx))) - ctl_clear_mask(lun->have_ca, initidx); -#endif + if (ctsio->cdb[0] != REQUEST_SENSE) { + struct scsi_sense_data *ps; + + ps = lun->pending_sense[initidx / CTL_MAX_INIT_PER_PORT]; + if (ps != NULL) + ps[initidx % CTL_MAX_INIT_PER_PORT].error_code = 0; + } /* * If the command has this flag set, it handles its own unit @@ -11708,10 +11706,10 @@ ctl_do_lun_reset(struct ctl_lun *lun, un */ lun->flags &= ~CTL_LUN_RESERVED; -#ifdef CTL_WITH_CA - for (i = 0; i < CTL_MAX_INITIATORS; i++) - ctl_clear_mask(lun->have_ca, i); -#endif + for (i = 0; i < CTL_MAX_PORTS; i++) { + free(lun->pending_sense[i], M_CTL); + lun->pending_sense[i] = NULL; + } lun->prevent_count = 0; if (lun->prevent) { for (i = 0; i < CTL_MAX_INITIATORS; i++) @@ -11837,6 +11835,7 @@ ctl_i_t_nexus_reset(union ctl_io *io) { struct ctl_softc *softc = CTL_SOFTC(io); struct ctl_lun *lun; + struct scsi_sense_data *ps; uint32_t initidx; if (!(io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) { @@ -11857,9 +11856,9 @@ ctl_i_t_nexus_reset(union ctl_io *io) mtx_lock(&lun->lun_lock); ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, io->io_hdr.nexus.initid, 1); -#ifdef CTL_WITH_CA - ctl_clear_mask(lun->have_ca, initidx); -#endif + ps = lun->pending_sense[initidx / CTL_MAX_INIT_PER_PORT]; + if (ps != NULL) + ps[initidx % CTL_MAX_INIT_PER_PORT].error_code = 0; if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == initidx)) lun->flags &= ~CTL_LUN_RESERVED; if (lun->prevent && ctl_is_set(lun->prevent, initidx)) { @@ -13117,7 +13116,6 @@ bailout: fe_done(io); } -#ifdef CTL_WITH_CA /* * Front end should call this if it doesn't do autosense. When the request * sense comes back in from the initiator, we'll dequeue this and send it. @@ -13128,7 +13126,8 @@ ctl_queue_sense(union ctl_io *io) struct ctl_softc *softc = CTL_SOFTC(io); struct ctl_port *port = CTL_PORT(io); struct ctl_lun *lun; - uint32_t initidx, targ_lun; + struct scsi_sense_data *ps; + uint32_t initidx, p, targ_lun; CTL_DEBUG_PRINT(("ctl_queue_sense\n")); @@ -13151,26 +13150,29 @@ ctl_queue_sense(union ctl_io *io) mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); - /* - * Already have CA set for this LUN...toss the sense information. - */ initidx = ctl_get_initindex(&io->io_hdr.nexus); - if (ctl_is_set(lun->have_ca, initidx)) { + p = initidx / CTL_MAX_INIT_PER_PORT; + if ((ps = lun->pending_sense[p]) == NULL) { mtx_unlock(&lun->lun_lock); - goto bailout; + ps = malloc(sizeof(*ps) * CTL_MAX_INIT_PER_PORT, M_CTL, + M_WAITOK | M_ZERO); + mtx_lock(&lun->lun_lock); + if (lun->pending_sense[p] == NULL) { + lun->pending_sense[p] = ps; + } else { + free(ps, M_CTL); + ps = lun->pending_sense[p]; + } } - - memcpy(&lun->pending_sense[initidx], &io->scsiio.sense_data, - MIN(sizeof(lun->pending_sense[initidx]), - sizeof(io->scsiio.sense_data))); - ctl_set_mask(lun->have_ca, initidx); + ps += initidx % CTL_MAX_INIT_PER_PORT; + memset(ps, 0, sizeof(*ps)); + memcpy(ps, &io->scsiio.sense_data, io->scsiio.sense_len); mtx_unlock(&lun->lun_lock); bailout: ctl_free_io(io); return (CTL_RETVAL_COMPLETE); } -#endif /* * Primary command inlet from frontend ports. All SCSI and task I/O Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Sat Feb 25 12:11:07 2017 (r314254) +++ head/sys/cam/ctl/ctl_private.h Sat Feb 25 14:20:30 2017 (r314255) @@ -390,10 +390,7 @@ struct ctl_lun { TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue; STAILQ_ENTRY(ctl_lun) links; -#ifdef CTL_WITH_CA - uint32_t have_ca[CTL_MAX_INITIATORS >> 5]; - struct scsi_sense_data pending_sense[CTL_MAX_INITIATORS]; -#endif + struct scsi_sense_data *pending_sense[CTL_MAX_PORTS]; ctl_ua_type *pending_ua[CTL_MAX_PORTS]; uint8_t ua_tpt_info[8]; time_t lasttpt; From owner-svn-src-all@freebsd.org Sat Feb 25 14:24: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 90714CED431; Sat, 25 Feb 2017 14:24: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 5FFB77F5; Sat, 25 Feb 2017 14:24: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 v1PEOTN9080321; Sat, 25 Feb 2017 14:24:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEOTSl080320; Sat, 25 Feb 2017 14:24:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702251424.v1PEOTSl080320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 14:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314256 - head/sys/dev/usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 14:24:30 -0000 Author: mav Date: Sat Feb 25 14:24:29 2017 New Revision: 314256 URL: https://svnweb.freebsd.org/changeset/base/314256 Log: Use ctl_queue_sense() to implement sense data reporting. USB MS BBB transport does not support autosense, so we have to queue any sense data back to CTL for later fetching via REQUEST SENSE. Modified: head/sys/dev/usb/storage/cfumass.c Modified: head/sys/dev/usb/storage/cfumass.c ============================================================================== --- head/sys/dev/usb/storage/cfumass.c Sat Feb 25 14:20:30 2017 (r314255) +++ head/sys/dev/usb/storage/cfumass.c Sat Feb 25 14:24:29 2017 (r314256) @@ -987,19 +987,21 @@ cfumass_done(union ctl_io *io) return; } - switch (io->scsiio.scsi_status) { - case SCSI_STATUS_OK: + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) sc->sc_current_status = 0; - break; - default: + else sc->sc_current_status = 1; - break; - } + + /* XXX: How should we report BUSY, RESERVATION CONFLICT, etc? */ + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR && + io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND) + ctl_queue_sense(io); + else + ctl_free_io(io); CFUMASS_LOCK(sc); cfumass_transfer_start(sc, CFUMASS_T_STATUS); CFUMASS_UNLOCK(sc); - ctl_free_io(io); refcount_release(&sc->sc_queued); } From owner-svn-src-all@freebsd.org Sat Feb 25 14:36: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 95F40CED6AE; Sat, 25 Feb 2017 14:36:25 +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 65652DEF; Sat, 25 Feb 2017 14:36:25 +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 v1PEaODb084436; Sat, 25 Feb 2017 14:36:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEaOqs084434; Sat, 25 Feb 2017 14:36:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702251436.v1PEaOqs084434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Feb 2017 14:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314257 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 14:36:25 -0000 Author: mav Date: Sat Feb 25 14:36:24 2017 New Revision: 314257 URL: https://svnweb.freebsd.org/changeset/base/314257 Log: Add reporting SAS protocol, in case we ever have one. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Feb 25 14:24:29 2017 (r314256) +++ head/sys/cam/ctl/ctl.c Sat Feb 25 14:36:24 2017 (r314257) @@ -9549,6 +9549,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio if (port && port->port_type == CTL_PORT_FC) proto = SCSI_PROTO_FC << 4; + else if (port->port_type == CTL_PORT_SAS) + proto = SCSI_PROTO_SAS << 4; else if (port && port->port_type == CTL_PORT_ISCSI) proto = SCSI_PROTO_ISCSI << 4; else Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Sat Feb 25 14:24:29 2017 (r314256) +++ head/sys/cam/ctl/ctl_frontend.c Sat Feb 25 14:36:24 2017 (r314257) @@ -264,6 +264,8 @@ ctl_port_set_wwns(struct ctl_port *port, if (port->port_type == CTL_PORT_FC) proto = SCSI_PROTO_FC << 4; + else if (port->port_type == CTL_PORT_SAS) + proto = SCSI_PROTO_SAS << 4; else if (port->port_type == CTL_PORT_ISCSI) proto = SCSI_PROTO_ISCSI << 4; else From owner-svn-src-all@freebsd.org Sat Feb 25 14: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 03E6ACED812; Sat, 25 Feb 2017 14:40:39 +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 A499C1EA; Sat, 25 Feb 2017 14:40:38 +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 v1PEebOc084963; Sat, 25 Feb 2017 14:40:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEebgm084962; Sat, 25 Feb 2017 14:40:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEebgm084962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314259 - vendor/llvm/llvm-release_40-r296202 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, 25 Feb 2017 14:40:39 -0000 Author: dim Date: Sat Feb 25 14:40:37 2017 New Revision: 314259 URL: https://svnweb.freebsd.org/changeset/base/314259 Log: Tag llvm release_40 branch r296202. Added: vendor/llvm/llvm-release_40-r296202/ - copied from r314258, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sat Feb 25 14:40: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 EF71ECED809; Sat, 25 Feb 2017 14:40: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 93A851DE; Sat, 25 Feb 2017 14:40: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 v1PEeYBv084916; Sat, 25 Feb 2017 14:40:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEeXjG084905; Sat, 25 Feb 2017 14:40:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEeXjG084905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314258 - in vendor/llvm/dist: docs include/llvm/Transforms/Vectorize lib/Target/AMDGPU lib/Transforms/Scalar lib/Transforms/Vectorize test/CodeGen/AMDGPU test/Transforms/CorrelatedValu... 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, 25 Feb 2017 14:40:36 -0000 Author: dim Date: Sat Feb 25 14:40:33 2017 New Revision: 314258 URL: https://svnweb.freebsd.org/changeset/base/314258 Log: Vendor import of llvm release_40 branch r296202: https://llvm.org/svn/llvm-project/llvm/branches/release_40@296202 Modified: vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/Transforms/Vectorize/SLPVectorizer.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/trunc.ll vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/add.ll vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/horizontal-list.ll Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Feb 25 14:40:33 2017 (r314258) @@ -5,12 +5,6 @@ LLVM 4.0.0 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 4.0.0 release. You may - prefer the `LLVM 3.9 Release Notes `_. - - Introduction ============ @@ -28,74 +22,56 @@ them. Non-comprehensive list of changes in this release ================================================= -* The C API functions LLVMAddFunctionAttr, LLVMGetFunctionAttr, - LLVMRemoveFunctionAttr, LLVMAddAttribute, LLVMRemoveAttribute, - LLVMGetAttribute, LLVMAddInstrAttribute and - LLVMRemoveInstrAttribute have been removed. - -* The C API enum LLVMAttribute has been deleted. - -.. NOTE - For small 1-3 sentence descriptions, just add an entry at the end of - this list. If your description won't fit comfortably in one bullet - point (e.g. maybe you would like to give an example of the - functionality, or simply have a lot to talk about), see the `NOTE` below - for adding a new subsection. - -* The definition and uses of LLVM_ATRIBUTE_UNUSED_RESULT in the LLVM source - were replaced with LLVM_NODISCARD, which matches the C++17 [[nodiscard]] - semantics rather than gcc's __attribute__((warn_unused_result)). - * Minimum compiler version to build has been raised to GCC 4.8 and VS 2015. +* The C API functions ``LLVMAddFunctionAttr``, ``LLVMGetFunctionAttr``, + ``LLVMRemoveFunctionAttr``, ``LLVMAddAttribute``, ``LLVMRemoveAttribute``, + ``LLVMGetAttribute``, ``LLVMAddInstrAttribute`` and + ``LLVMRemoveInstrAttribute`` have been removed. + +* The C API enum ``LLVMAttribute`` has been deleted. + +* The definition and uses of ``LLVM_ATRIBUTE_UNUSED_RESULT`` in the LLVM source + were replaced with ``LLVM_NODISCARD``, which matches the C++17 ``[[nodiscard]]`` + semantics rather than gcc's ``__attribute__((warn_unused_result))``. + * The Timer related APIs now expect a Name and Description. When upgrading code the previously used names should become descriptions and a short name in the style of a programming language identifier should be added. -* LLVM now handles invariant.group across different basic blocks, which makes +* 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 +* The aggressive dead code elimination phase ("adce") now removes 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 + with LLVM option ``-adce-remove-loops`` when the loop body otherwise has no live operations. * The GVNHoist pass is now enabled by default. The new pass based on Global Value Numbering detects similar computations in branch code and replaces multiple instances of the same computation with a unique expression. The transform benefits code size and generates better schedules. GVNHoist is - more aggressive at -Os and -Oz, hoisting more expressions at the expense of - execution time degradations. + more aggressive at ``-Os`` and ``-Oz``, hoisting more expressions at the + expense of execution time degradations. * The llvm-cov tool can now export coverage data as json. Its html output mode has also improved. -* ... next change ... +Improvements to ThinLTO (-flto=thin) +------------------------------------ +Integration with profile data (PGO). When available, profile data +enables more accurate function importing decisions, as well as +cross-module indirect call promotion. -.. NOTE - If you would like to document a larger change, then you can add a - subsection about it right here. You can copy the following boilerplate - and un-indent it (the indentation causes it to be inside this comment). - - Special New Feature - ------------------- - - Makes programs 10x faster by doing Special New Thing. - - Improvements to ThinLTO (-flto=thin) - ------------------------------------ - * Integration with profile data (PGO). When available, profile data - enables more accurate function importing decisions, as well as - cross-module indirect call promotion. - * Significant build-time and binary-size improvements when compiling with - debug info (-g). +Significant build-time and binary-size improvements when compiling with +debug info (-g). LLVM Coroutines --------------- Experimental support for :doc:`Coroutines` was added, which can be enabled -with ``-enable-coroutines`` in ``opt`` command tool or using +with ``-enable-coroutines`` in ``opt`` the command tool or using the ``addCoroutinePassesToExtensionPoints`` API when building the optimization pipeline. @@ -106,18 +82,18 @@ For more information on LLVM Coroutines Regcall and Vectorcall Calling Conventions -------------------------------------------------- -Support was added for _regcall calling convention. -Existing __vectorcall calling convention support was extended to include +Support was added for ``_regcall`` calling convention. +Existing ``__vectorcall`` calling convention support was extended to include correct handling of HVAs. -The __vectorcall calling convention was introduced by Microsoft to +The ``__vectorcall`` calling convention was introduced by Microsoft to enhance register usage when passing parameters. For more information please read `__vectorcall documentation `_. -The __regcall calling convention was introduced by Intel to +The ``__regcall`` calling convention was introduced by Intel to optimize parameter transfer on function call. -This calling convention ensures that as many values as possible are +This calling convention ensures that as many values as possible are passed or returned in registers. For more information please read `__regcall documentation `_. @@ -127,7 +103,7 @@ 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 +``-stop-after``, ``-stop-before``, ``-start-after``, ``-start-before`` to run a single pass of the code generation pipeline, or to stop or start the code generation pipeline at a given point. @@ -211,9 +187,6 @@ changes landed in this release. ``&*I`` (if not ``end()``); alternatively, clients may refactor to use references for known-good nodes. -Changes to the LLVM IR ----------------------- - Changes to the ARM Targets -------------------------- @@ -244,28 +217,6 @@ Changes to the ARM Targets A lot of work has also been done in LLD for ARM, which now supports more relocations and TLS. - -Changes to the MIPS Target --------------------------- - - During this release ... - - -Changes to the PowerPC Target ------------------------------ - - During this release ... - -Changes to the X86 Target -------------------------- - - During this release ... - -Changes to the AMDGPU Target ------------------------------ - - During this release ... - Changes to the AVR Target ----------------------------- @@ -297,8 +248,6 @@ Changes to the OCaml bindings External Open Source Projects Using LLVM 4.0.0 ============================================== -* A project... - LDC - the LLVM-based D compiler ------------------------------- Modified: vendor/llvm/dist/include/llvm/Transforms/Vectorize/SLPVectorizer.h ============================================================================== --- vendor/llvm/dist/include/llvm/Transforms/Vectorize/SLPVectorizer.h Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/include/llvm/Transforms/Vectorize/SLPVectorizer.h Sat Feb 25 14:40:33 2017 (r314258) @@ -92,12 +92,6 @@ private: /// collected in GEPs. bool vectorizeGEPIndices(BasicBlock *BB, slpvectorizer::BoUpSLP &R); - /// Try to find horizontal reduction or otherwise vectorize a chain of binary - /// operators. - bool vectorizeRootInstruction(PHINode *P, Value *V, BasicBlock *BB, - slpvectorizer::BoUpSLP &R, - TargetTransformInfo *TTI); - /// \brief Scan the basic block and look for patterns that are likely to start /// a vectorization chain. bool vectorizeChainsInBlock(BasicBlock *BB, slpvectorizer::BoUpSLP &R); Modified: vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td Sat Feb 25 14:40:33 2017 (r314258) @@ -997,6 +997,11 @@ def : Pat < >; def : Pat < + (i1 (trunc i16:$a)), + (V_CMP_EQ_U32_e64 (S_AND_B32 (i32 1), $a), (i32 1)) +>; + +def : Pat < (i1 (trunc i64:$a)), (V_CMP_EQ_U32_e64 (S_AND_B32 (i32 1), (i32 (EXTRACT_SUBREG $a, sub0))), (i32 1)) Modified: vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td Sat Feb 25 14:40:33 2017 (r314258) @@ -607,12 +607,6 @@ def : Pat< (COPY $src) >; -def : Pat< - (i1 (trunc i16:$src)), - (COPY $src) ->; - - def : Pat < (i16 (trunc i64:$src)), (EXTRACT_SUBREG $src, sub0) Modified: vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Sat Feb 25 14:40:33 2017 (r314258) @@ -41,6 +41,8 @@ STATISTIC(NumSDivs, "Number of sdiv STATISTIC(NumAShrs, "Number of ashr converted to lshr"); STATISTIC(NumSRems, "Number of srem converted to urem"); +static cl::opt DontProcessAdds("cvp-dont-process-adds", cl::init(true)); + namespace { class CorrelatedValuePropagation : public FunctionPass { public: @@ -405,6 +407,9 @@ static bool processAShr(BinaryOperator * static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) { typedef OverflowingBinaryOperator OBO; + if (DontProcessAdds) + return false; + if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp)) return false; Modified: vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp Sat Feb 25 14:40:33 2017 (r314258) @@ -1521,8 +1521,8 @@ Value *ReassociatePass::OptimizeAdd(Inst if (ConstantInt *CI = dyn_cast(Factor)) { if (CI->isNegative() && !CI->isMinValue(true)) { Factor = ConstantInt::get(CI->getContext(), -CI->getValue()); - assert(!Duplicates.count(Factor) && - "Shouldn't have two constant factors, missed a canonicalize"); + if (!Duplicates.insert(Factor).second) + continue; unsigned Occ = ++FactorOccurrences[Factor]; if (Occ > MaxOcc) { MaxOcc = Occ; @@ -1534,8 +1534,8 @@ Value *ReassociatePass::OptimizeAdd(Inst APFloat F(CF->getValueAPF()); F.changeSign(); Factor = ConstantFP::get(CF->getContext(), F); - assert(!Duplicates.count(Factor) && - "Shouldn't have two constant factors, missed a canonicalize"); + if (!Duplicates.insert(Factor).second) + continue; unsigned Occ = ++FactorOccurrences[Factor]; if (Occ > MaxOcc) { MaxOcc = Occ; Modified: vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Feb 25 14:40:33 2017 (r314258) @@ -4026,40 +4026,36 @@ bool SLPVectorizerPass::tryToVectorize(B if (!V) return false; - Value *P = V->getParent(); - - // Vectorize in current basic block only. - auto *Op0 = dyn_cast(V->getOperand(0)); - auto *Op1 = dyn_cast(V->getOperand(1)); - if (!Op0 || !Op1 || Op0->getParent() != P || Op1->getParent() != P) - return false; - // Try to vectorize V. - if (tryToVectorizePair(Op0, Op1, R)) + if (tryToVectorizePair(V->getOperand(0), V->getOperand(1), R)) return true; - auto *A = dyn_cast(Op0); - auto *B = dyn_cast(Op1); + BinaryOperator *A = dyn_cast(V->getOperand(0)); + BinaryOperator *B = dyn_cast(V->getOperand(1)); // Try to skip B. if (B && B->hasOneUse()) { - auto *B0 = dyn_cast(B->getOperand(0)); - auto *B1 = dyn_cast(B->getOperand(1)); - if (B0 && B0->getParent() == P && tryToVectorizePair(A, B0, R)) + BinaryOperator *B0 = dyn_cast(B->getOperand(0)); + BinaryOperator *B1 = dyn_cast(B->getOperand(1)); + if (tryToVectorizePair(A, B0, R)) { return true; - if (B1 && B1->getParent() == P && tryToVectorizePair(A, B1, R)) + } + if (tryToVectorizePair(A, B1, R)) { return true; + } } // Try to skip A. if (A && A->hasOneUse()) { - auto *A0 = dyn_cast(A->getOperand(0)); - auto *A1 = dyn_cast(A->getOperand(1)); - if (A0 && A0->getParent() == P && tryToVectorizePair(A0, B, R)) + BinaryOperator *A0 = dyn_cast(A->getOperand(0)); + BinaryOperator *A1 = dyn_cast(A->getOperand(1)); + if (tryToVectorizePair(A0, B, R)) { return true; - if (A1 && A1->getParent() == P && tryToVectorizePair(A1, B, R)) + } + if (tryToVectorizePair(A1, B, R)) { return true; + } } - return false; + return 0; } /// \brief Generate a shuffle mask to be used in a reduction tree. @@ -4511,143 +4507,29 @@ static Value *getReductionValue(const Do return nullptr; } -namespace { -/// Tracks instructons and its children. -class WeakVHWithLevel final : public CallbackVH { - /// Operand index of the instruction currently beeing analized. - unsigned Level = 0; - /// Is this the instruction that should be vectorized, or are we now - /// processing children (i.e. operands of this instruction) for potential - /// vectorization? - bool IsInitial = true; - -public: - explicit WeakVHWithLevel() = default; - WeakVHWithLevel(Value *V) : CallbackVH(V){}; - /// Restart children analysis each time it is repaced by the new instruction. - void allUsesReplacedWith(Value *New) override { - setValPtr(New); - Level = 0; - IsInitial = true; - } - /// Check if the instruction was not deleted during vectorization. - bool isValid() const { return !getValPtr(); } - /// Is the istruction itself must be vectorized? - bool isInitial() const { return IsInitial; } - /// Try to vectorize children. - void clearInitial() { IsInitial = false; } - /// Are all children processed already? - bool isFinal() const { - assert(getValPtr() && - (isa(getValPtr()) && - cast(getValPtr())->getNumOperands() >= Level)); - return getValPtr() && - cast(getValPtr())->getNumOperands() == Level; - } - /// Get next child operation. - Value *nextOperand() { - assert(getValPtr() && isa(getValPtr()) && - cast(getValPtr())->getNumOperands() > Level); - return cast(getValPtr())->getOperand(Level++); - } - virtual ~WeakVHWithLevel() = default; -}; -} // namespace - /// \brief Attempt to reduce a horizontal reduction. /// If it is legal to match a horizontal reduction feeding -/// the phi node P with reduction operators Root in a basic block BB, then check -/// if it can be done. +/// the phi node P with reduction operators BI, then check if it +/// can be done. /// \returns true if a horizontal reduction was matched and reduced. /// \returns false if a horizontal reduction was not matched. -static bool canBeVectorized( - PHINode *P, Instruction *Root, BasicBlock *BB, BoUpSLP &R, - TargetTransformInfo *TTI, - const function_ref Vectorize) { +static bool canMatchHorizontalReduction(PHINode *P, BinaryOperator *BI, + BoUpSLP &R, TargetTransformInfo *TTI, + unsigned MinRegSize) { if (!ShouldVectorizeHor) return false; - if (!Root) + HorizontalReduction HorRdx(MinRegSize); + if (!HorRdx.matchAssociativeReduction(P, BI)) return false; - if (Root->getParent() != BB) - return false; - SmallVector Stack(1, Root); - SmallSet VisitedInstrs; - bool Res = false; - while (!Stack.empty()) { - Value *V = Stack.back(); - if (!V) { - Stack.pop_back(); - continue; - } - auto *Inst = dyn_cast(V); - if (!Inst || isa(Inst)) { - Stack.pop_back(); - continue; - } - if (Stack.back().isInitial()) { - Stack.back().clearInitial(); - if (auto *BI = dyn_cast(Inst)) { - HorizontalReduction HorRdx(R.getMinVecRegSize()); - if (HorRdx.matchAssociativeReduction(P, BI)) { - // If there is a sufficient number of reduction values, reduce - // to a nearby power-of-2. Can safely generate oversized - // vectors and rely on the backend to split them to legal sizes. - HorRdx.ReduxWidth = - std::max((uint64_t)4, PowerOf2Floor(HorRdx.numReductionValues())); - - if (HorRdx.tryToReduce(R, TTI)) { - Res = true; - P = nullptr; - continue; - } - } - if (P) { - Inst = dyn_cast(BI->getOperand(0)); - if (Inst == P) - Inst = dyn_cast(BI->getOperand(1)); - if (!Inst) { - P = nullptr; - continue; - } - } - } - P = nullptr; - if (Vectorize(dyn_cast(Inst), R)) { - Res = true; - continue; - } - } - if (Stack.back().isFinal()) { - Stack.pop_back(); - continue; - } + // If there is a sufficient number of reduction values, reduce + // to a nearby power-of-2. Can safely generate oversized + // vectors and rely on the backend to split them to legal sizes. + HorRdx.ReduxWidth = + std::max((uint64_t)4, PowerOf2Floor(HorRdx.numReductionValues())); - if (auto *NextV = dyn_cast(Stack.back().nextOperand())) - if (NextV->getParent() == BB && VisitedInstrs.insert(NextV).second && - Stack.size() < RecursionMaxDepth) - Stack.push_back(NextV); - } - return Res; -} - -bool SLPVectorizerPass::vectorizeRootInstruction(PHINode *P, Value *V, - BasicBlock *BB, BoUpSLP &R, - TargetTransformInfo *TTI) { - if (!V) - return false; - auto *I = dyn_cast(V); - if (!I) - return false; - - if (!isa(I)) - P = nullptr; - // Try to match and vectorize a horizontal reduction. - return canBeVectorized(P, I, BB, R, TTI, - [this](BinaryOperator *BI, BoUpSLP &R) -> bool { - return tryToVectorize(BI, R); - }); + return HorRdx.tryToReduce(R, TTI); } bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) { @@ -4717,42 +4599,67 @@ bool SLPVectorizerPass::vectorizeChainsI if (P->getNumIncomingValues() != 2) return Changed; + Value *Rdx = getReductionValue(DT, P, BB, LI); + + // Check if this is a Binary Operator. + BinaryOperator *BI = dyn_cast_or_null(Rdx); + if (!BI) + continue; + // Try to match and vectorize a horizontal reduction. - if (vectorizeRootInstruction(P, getReductionValue(DT, P, BB, LI), BB, R, - TTI)) { + if (canMatchHorizontalReduction(P, BI, R, TTI, R.getMinVecRegSize())) { + Changed = true; + it = BB->begin(); + e = BB->end(); + continue; + } + + Value *Inst = BI->getOperand(0); + if (Inst == P) + Inst = BI->getOperand(1); + + if (tryToVectorize(dyn_cast(Inst), R)) { + // We would like to start over since some instructions are deleted + // and the iterator may become invalid value. Changed = true; it = BB->begin(); e = BB->end(); continue; } + continue; } - if (ShouldStartVectorizeHorAtStore) { - if (StoreInst *SI = dyn_cast(it)) { - // Try to match and vectorize a horizontal reduction. - if (vectorizeRootInstruction(nullptr, SI->getValueOperand(), BB, R, - TTI)) { - Changed = true; - it = BB->begin(); - e = BB->end(); - continue; + if (ShouldStartVectorizeHorAtStore) + if (StoreInst *SI = dyn_cast(it)) + if (BinaryOperator *BinOp = + dyn_cast(SI->getValueOperand())) { + if (canMatchHorizontalReduction(nullptr, BinOp, R, TTI, + R.getMinVecRegSize()) || + tryToVectorize(BinOp, R)) { + Changed = true; + it = BB->begin(); + e = BB->end(); + continue; + } } - } - } // Try to vectorize horizontal reductions feeding into a return. - if (ReturnInst *RI = dyn_cast(it)) { - if (RI->getNumOperands() != 0) { - // Try to match and vectorize a horizontal reduction. - if (vectorizeRootInstruction(nullptr, RI->getOperand(0), BB, R, TTI)) { - Changed = true; - it = BB->begin(); - e = BB->end(); - continue; + if (ReturnInst *RI = dyn_cast(it)) + if (RI->getNumOperands() != 0) + if (BinaryOperator *BinOp = + dyn_cast(RI->getOperand(0))) { + DEBUG(dbgs() << "SLP: Found a return to vectorize.\n"); + if (canMatchHorizontalReduction(nullptr, BinOp, R, TTI, + R.getMinVecRegSize()) || + tryToVectorizePair(BinOp->getOperand(0), BinOp->getOperand(1), + R)) { + Changed = true; + it = BB->begin(); + e = BB->end(); + continue; + } } - } - } // Try to vectorize trees that start at compare instructions. if (CmpInst *CI = dyn_cast(it)) { @@ -4765,14 +4672,16 @@ bool SLPVectorizerPass::vectorizeChainsI continue; } - for (int I = 0; I < 2; ++I) { - if (vectorizeRootInstruction(nullptr, CI->getOperand(I), BB, R, TTI)) { - Changed = true; - // We would like to start over since some instructions are deleted - // and the iterator may become invalid value. - it = BB->begin(); - e = BB->end(); - break; + for (int i = 0; i < 2; ++i) { + if (BinaryOperator *BI = dyn_cast(CI->getOperand(i))) { + if (tryToVectorizePair(BI->getOperand(0), BI->getOperand(1), R)) { + Changed = true; + // We would like to start over since some instructions are deleted + // and the iterator may become invalid value. + it = BB->begin(); + e = BB->end(); + break; + } } } continue; Modified: vendor/llvm/dist/test/CodeGen/AMDGPU/trunc.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/AMDGPU/trunc.ll Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/test/CodeGen/AMDGPU/trunc.ll Sat Feb 25 14:40:33 2017 (r314258) @@ -1,13 +1,15 @@ -; RUN: llc -march=amdgcn -verify-machineinstrs< %s | FileCheck -check-prefix=SI %s +; RUN: llc -march=amdgcn -verify-machineinstrs< %s | FileCheck -check-prefix=GCN -check-prefix=SI %s +; RUN: llc -march=amdgcn -mcpu=fiji -verify-machineinstrs< %s | FileCheck -check-prefix=GCN -check-prefix=VI %s ; RUN: llc -march=r600 -mcpu=cypress < %s | FileCheck -check-prefix=EG %s declare i32 @llvm.r600.read.tidig.x() nounwind readnone define void @trunc_i64_to_i32_store(i32 addrspace(1)* %out, i64 %in) { -; SI-LABEL: {{^}}trunc_i64_to_i32_store: -; SI: s_load_dword [[SLOAD:s[0-9]+]], s[0:1], 0xb -; SI: v_mov_b32_e32 [[VLOAD:v[0-9]+]], [[SLOAD]] +; GCN-LABEL: {{^}}trunc_i64_to_i32_store: +; GCN: s_load_dword [[SLOAD:s[0-9]+]], s[0:1], +; GCN: v_mov_b32_e32 [[VLOAD:v[0-9]+]], [[SLOAD]] ; SI: buffer_store_dword [[VLOAD]] +; VI: flat_store_dword v[{{[0-9:]+}}], [[VLOAD]] ; EG-LABEL: {{^}}trunc_i64_to_i32_store: ; EG: MEM_RAT_CACHELESS STORE_RAW T0.X, T1.X, 1 @@ -18,12 +20,14 @@ define void @trunc_i64_to_i32_store(i32 ret void } -; SI-LABEL: {{^}}trunc_load_shl_i64: -; SI-DAG: s_load_dwordx2 -; SI-DAG: s_load_dword [[SREG:s[0-9]+]], -; SI: s_lshl_b32 [[SHL:s[0-9]+]], [[SREG]], 2 -; SI: v_mov_b32_e32 [[VSHL:v[0-9]+]], [[SHL]] -; SI: buffer_store_dword [[VSHL]], +; GCN-LABEL: {{^}}trunc_load_shl_i64: +; GCN-DAG: s_load_dwordx2 +; GCN-DAG: s_load_dword [[SREG:s[0-9]+]], +; GCN: s_lshl_b32 [[SHL:s[0-9]+]], [[SREG]], 2 +; GCN: v_mov_b32_e32 [[VSHL:v[0-9]+]], [[SHL]] +; SI: buffer_store_dword [[VSHL]] +; VI: flat_store_dword v[{{[0-9:]+}}], [[VSHL]] + define void @trunc_load_shl_i64(i32 addrspace(1)* %out, i64 %a) { %b = shl i64 %a, 2 %result = trunc i64 %b to i32 @@ -31,15 +35,17 @@ define void @trunc_load_shl_i64(i32 addr ret void } -; SI-LABEL: {{^}}trunc_shl_i64: +; GCN-LABEL: {{^}}trunc_shl_i64: ; SI: s_load_dwordx2 s{{\[}}[[LO_SREG:[0-9]+]]:{{[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0xd -; SI: s_lshl_b64 s{{\[}}[[LO_SHL:[0-9]+]]:{{[0-9]+\]}}, s{{\[}}[[LO_SREG]]:{{[0-9]+\]}}, 2 -; SI: s_add_u32 s[[LO_SREG2:[0-9]+]], s[[LO_SHL]], -; SI: v_mov_b32_e32 v[[LO_VREG:[0-9]+]], s[[LO_SREG2]] -; SI: s_addc_u32 +; VI: s_load_dwordx2 s{{\[}}[[LO_SREG:[0-9]+]]:{{[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}}, 0x34 +; GCN: s_lshl_b64 s{{\[}}[[LO_SHL:[0-9]+]]:{{[0-9]+\]}}, s{{\[}}[[LO_SREG]]:{{[0-9]+\]}}, 2 +; GCN: s_add_u32 s[[LO_SREG2:[0-9]+]], s[[LO_SHL]], +; GCN: v_mov_b32_e32 v[[LO_VREG:[0-9]+]], s[[LO_SREG2]] +; GCN: s_addc_u32 ; SI: buffer_store_dword v[[LO_VREG]], -; SI: v_mov_b32_e32 -; SI: v_mov_b32_e32 +; VI: flat_store_dword v[{{[0-9:]+}}], v[[LO_VREG]] +; GCN: v_mov_b32_e32 +; GCN: v_mov_b32_e32 define void @trunc_shl_i64(i64 addrspace(1)* %out2, i32 addrspace(1)* %out, i64 %a) { %aa = add i64 %a, 234 ; Prevent shrinking store. %b = shl i64 %aa, 2 @@ -49,9 +55,9 @@ define void @trunc_shl_i64(i64 addrspace ret void } -; SI-LABEL: {{^}}trunc_i32_to_i1: -; SI: v_and_b32_e32 v{{[0-9]+}}, 1, v{{[0-9]+}} -; SI: v_cmp_eq_u32 +; GCN-LABEL: {{^}}trunc_i32_to_i1: +; GCN: v_and_b32_e32 v{{[0-9]+}}, 1, v{{[0-9]+}} +; GCN: v_cmp_eq_u32 define void @trunc_i32_to_i1(i32 addrspace(1)* %out, i32 addrspace(1)* %ptr) { %a = load i32, i32 addrspace(1)* %ptr, align 4 %trunc = trunc i32 %a to i1 @@ -60,9 +66,30 @@ define void @trunc_i32_to_i1(i32 addrspa ret void } -; SI-LABEL: {{^}}sgpr_trunc_i32_to_i1: -; SI: s_and_b32 s{{[0-9]+}}, 1, s{{[0-9]+}} -; SI: v_cmp_eq_u32 +; GCN-LABEL: {{^}}trunc_i8_to_i1: +; GCN: v_and_b32_e32 v{{[0-9]+}}, 1, v{{[0-9]+}} +; GCN: v_cmp_eq_u32 +define void @trunc_i8_to_i1(i8 addrspace(1)* %out, i8 addrspace(1)* %ptr) { + %a = load i8, i8 addrspace(1)* %ptr, align 4 + %trunc = trunc i8 %a to i1 + %result = select i1 %trunc, i8 1, i8 0 + store i8 %result, i8 addrspace(1)* %out, align 4 + ret void +} + +; GCN-LABEL: {{^}}sgpr_trunc_i16_to_i1: +; GCN: s_and_b32 s{{[0-9]+}}, 1, s{{[0-9]+}} +; GCN: v_cmp_eq_u32 +define void @sgpr_trunc_i16_to_i1(i16 addrspace(1)* %out, i16 %a) { + %trunc = trunc i16 %a to i1 + %result = select i1 %trunc, i16 1, i16 0 + store i16 %result, i16 addrspace(1)* %out, align 4 + ret void +} + +; GCN-LABEL: {{^}}sgpr_trunc_i32_to_i1: +; GCN: s_and_b32 s{{[0-9]+}}, 1, s{{[0-9]+}} +; GCN: v_cmp_eq_u32 define void @sgpr_trunc_i32_to_i1(i32 addrspace(1)* %out, i32 %a) { %trunc = trunc i32 %a to i1 %result = select i1 %trunc, i32 1, i32 0 @@ -70,11 +97,12 @@ define void @sgpr_trunc_i32_to_i1(i32 ad ret void } -; SI-LABEL: {{^}}s_trunc_i64_to_i1: +; GCN-LABEL: {{^}}s_trunc_i64_to_i1: ; SI: s_load_dwordx2 s{{\[}}[[SLO:[0-9]+]]:{{[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0xb -; SI: s_and_b32 [[MASKED:s[0-9]+]], 1, s[[SLO]] -; SI: v_cmp_eq_u32_e64 s{{\[}}[[VLO:[0-9]+]]:[[VHI:[0-9]+]]], [[MASKED]], 1{{$}} -; SI: v_cndmask_b32_e64 {{v[0-9]+}}, -12, 63, s{{\[}}[[VLO]]:[[VHI]]] +; VI: s_load_dwordx2 s{{\[}}[[SLO:[0-9]+]]:{{[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0x2c +; GCN: s_and_b32 [[MASKED:s[0-9]+]], 1, s[[SLO]] +; GCN: v_cmp_eq_u32_e64 s{{\[}}[[VLO:[0-9]+]]:[[VHI:[0-9]+]]], [[MASKED]], 1{{$}} +; GCN: v_cndmask_b32_e64 {{v[0-9]+}}, -12, 63, s{{\[}}[[VLO]]:[[VHI]]] define void @s_trunc_i64_to_i1(i32 addrspace(1)* %out, i64 %x) { %trunc = trunc i64 %x to i1 %sel = select i1 %trunc, i32 63, i32 -12 @@ -82,11 +110,12 @@ define void @s_trunc_i64_to_i1(i32 addrs ret void } -; SI-LABEL: {{^}}v_trunc_i64_to_i1: +; GCN-LABEL: {{^}}v_trunc_i64_to_i1: ; SI: buffer_load_dwordx2 v{{\[}}[[VLO:[0-9]+]]:{{[0-9]+\]}} -; SI: v_and_b32_e32 [[MASKED:v[0-9]+]], 1, v[[VLO]] -; SI: v_cmp_eq_u32_e32 vcc, 1, [[MASKED]] -; SI: v_cndmask_b32_e64 {{v[0-9]+}}, -12, 63, vcc +; VI: flat_load_dwordx2 v{{\[}}[[VLO:[0-9]+]]:{{[0-9]+\]}} +; GCN: v_and_b32_e32 [[MASKED:v[0-9]+]], 1, v[[VLO]] +; GCN: v_cmp_eq_u32_e32 vcc, 1, [[MASKED]] +; GCN: v_cndmask_b32_e64 {{v[0-9]+}}, -12, 63, vcc define void @v_trunc_i64_to_i1(i32 addrspace(1)* %out, i64 addrspace(1)* %in) { %tid = call i32 @llvm.r600.read.tidig.x() nounwind readnone %gep = getelementptr i64, i64 addrspace(1)* %in, i32 %tid Modified: vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/add.ll ============================================================================== --- vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/add.ll Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/add.ll Sat Feb 25 14:40:33 2017 (r314258) @@ -1,4 +1,4 @@ -; RUN: opt < %s -correlated-propagation -S | FileCheck %s +; RUN: opt < %s -correlated-propagation -cvp-dont-process-adds=false -S | FileCheck %s ; CHECK-LABEL: @test0( define void @test0(i32 %a) { Modified: vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll ============================================================================== --- vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll Sat Feb 25 14:40:33 2017 (r314258) @@ -222,3 +222,23 @@ define i32 @test15(i32 %X1, i32 %X2, i32 ; CHECK-LABEL: @test15 ; CHECK: and i1 %A, %B } + +; PR30256 - previously this asserted. +; CHECK-LABEL: @test16 +; CHECK: %[[FACTOR:.*]] = mul i64 %a, -4 +; CHECK-NEXT: %[[RES:.*]] = add i64 %[[FACTOR]], %b +; CHECK-NEXT: ret i64 %[[RES]] +define i64 @test16(i1 %cmp, i64 %a, i64 %b) { +entry: + %shl = shl i64 %a, 1 + %shl.neg = sub i64 0, %shl + br i1 %cmp, label %if.then, label %if.end + +if.then: ; preds = %entry + %add1 = add i64 %shl.neg, %shl.neg + %add2 = add i64 %add1, %b + ret i64 %add2 + +if.end: ; preds = %entry + ret i64 0 +} Modified: vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/horizontal-list.ll ============================================================================== --- vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/horizontal-list.ll Sat Feb 25 14:36:24 2017 (r314257) +++ vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/horizontal-list.ll Sat Feb 25 14:40:33 2017 (r314258) @@ -12,25 +12,26 @@ define float @baz() { ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* @n, align 4 ; CHECK-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP0]], 3 ; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[MUL]] to float -; CHECK-NEXT: [[TMP1:%.*]] = load <2 x float>, <2 x float>* bitcast ([20 x float]* @arr to <2 x float>*), align 16 -; CHECK-NEXT: [[TMP2:%.*]] = load <2 x float>, <2 x float>* bitcast ([20 x float]* @arr1 to <2 x float>*), align 16 -; CHECK-NEXT: [[TMP3:%.*]] = fmul fast <2 x float> [[TMP2]], [[TMP1]] -; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x float> [[TMP3]], i32 0 -; CHECK-NEXT: [[ADD:%.*]] = fadd fast float [[TMP4]], [[CONV]] -; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x float> [[TMP3]], i32 1 -; CHECK-NEXT: [[ADD_1:%.*]] = fadd fast float [[TMP5]], [[ADD]] -; CHECK-NEXT: [[TMP6:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 2) to <2 x float>*), align 8 -; CHECK-NEXT: [[TMP7:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 2) to <2 x float>*), align 8 -; CHECK-NEXT: [[TMP8:%.*]] = fmul fast <2 x float> [[TMP7]], [[TMP6]] -; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x float> [[TMP8]], i32 0 -; CHECK-NEXT: [[ADD_2:%.*]] = fadd fast float [[TMP9]], [[ADD_1]] -; CHECK-NEXT: [[TMP10:%.*]] = extractelement <2 x float> [[TMP8]], i32 1 -; CHECK-NEXT: [[ADD_3:%.*]] = fadd fast float [[TMP10]], [[ADD_2]] +; CHECK-NEXT: [[TMP1:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 0), align 16 +; CHECK-NEXT: [[TMP2:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 0), align 16 +; CHECK-NEXT: [[MUL4:%.*]] = fmul fast float [[TMP2]], [[TMP1]] +; CHECK-NEXT: [[ADD:%.*]] = fadd fast float [[MUL4]], [[CONV]] +; CHECK-NEXT: [[TMP3:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 1), align 4 +; CHECK-NEXT: [[TMP4:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 1), align 4 +; CHECK-NEXT: [[MUL4_1:%.*]] = fmul fast float [[TMP4]], [[TMP3]] +; CHECK-NEXT: [[ADD_1:%.*]] = fadd fast float [[MUL4_1]], [[ADD]] +; CHECK-NEXT: [[TMP5:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 2) to <2 x float>*), align 8 +; CHECK-NEXT: [[TMP6:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 2) to <2 x float>*), align 8 +; CHECK-NEXT: [[TMP7:%.*]] = fmul fast <2 x float> [[TMP6]], [[TMP5]] +; CHECK-NEXT: [[TMP8:%.*]] = extractelement <2 x float> [[TMP7]], i32 0 +; CHECK-NEXT: [[ADD_2:%.*]] = fadd fast float [[TMP8]], [[ADD_1]] +; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x float> [[TMP7]], i32 1 +; CHECK-NEXT: [[ADD_3:%.*]] = fadd fast float [[TMP9]], [[ADD_2]] ; CHECK-NEXT: [[ADD7:%.*]] = fadd fast float [[ADD_3]], [[CONV]] -; CHECK-NEXT: [[ADD19:%.*]] = fadd fast float [[TMP4]], [[ADD7]] -; CHECK-NEXT: [[ADD19_1:%.*]] = fadd fast float [[TMP5]], [[ADD19]] -; CHECK-NEXT: [[ADD19_2:%.*]] = fadd fast float [[TMP9]], [[ADD19_1]] -; CHECK-NEXT: [[ADD19_3:%.*]] = fadd fast float [[TMP10]], [[ADD19_2]] +; CHECK-NEXT: [[ADD19:%.*]] = fadd fast float [[MUL4]], [[ADD7]] +; CHECK-NEXT: [[ADD19_1:%.*]] = fadd fast float [[MUL4_1]], [[ADD19]] +; CHECK-NEXT: [[ADD19_2:%.*]] = fadd fast float [[TMP8]], [[ADD19_1]] +; CHECK-NEXT: [[ADD19_3:%.*]] = fadd fast float [[TMP9]], [[ADD19_2]] ; CHECK-NEXT: store float [[ADD19_3]], float* @res, align 4 ; CHECK-NEXT: ret float [[ADD19_3]] ; @@ -69,37 +70,40 @@ define float @bazz() { ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* @n, align 4 ; CHECK-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP0]], 3 ; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[MUL]] to float -; CHECK-NEXT: [[TMP1:%.*]] = load <2 x float>, <2 x float>* bitcast ([20 x float]* @arr to <2 x float>*), align 16 -; CHECK-NEXT: [[TMP2:%.*]] = load <2 x float>, <2 x float>* bitcast ([20 x float]* @arr1 to <2 x float>*), align 16 -; CHECK-NEXT: [[TMP3:%.*]] = fmul fast <2 x float> [[TMP2]], [[TMP1]] -; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x float> [[TMP3]], i32 0 -; CHECK-NEXT: [[ADD:%.*]] = fadd fast float [[TMP4]], [[CONV]] -; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x float> [[TMP3]], i32 1 -; CHECK-NEXT: [[ADD_1:%.*]] = fadd fast float [[TMP5]], [[ADD]] -; CHECK-NEXT: [[TMP6:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 2) to <2 x float>*), align 8 -; CHECK-NEXT: [[TMP7:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 2) to <2 x float>*), align 8 -; CHECK-NEXT: [[TMP8:%.*]] = fmul fast <2 x float> [[TMP7]], [[TMP6]] -; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x float> [[TMP8]], i32 0 -; CHECK-NEXT: [[ADD_2:%.*]] = fadd fast float [[TMP9]], [[ADD_1]] -; CHECK-NEXT: [[TMP10:%.*]] = extractelement <2 x float> [[TMP8]], i32 1 -; CHECK-NEXT: [[ADD_3:%.*]] = fadd fast float [[TMP10]], [[ADD_2]] +; CHECK-NEXT: [[TMP1:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 0), align 16 +; CHECK-NEXT: [[TMP2:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 0), align 16 +; CHECK-NEXT: [[MUL4:%.*]] = fmul fast float [[TMP2]], [[TMP1]] +; CHECK-NEXT: [[ADD:%.*]] = fadd fast float [[MUL4]], [[CONV]] +; CHECK-NEXT: [[TMP3:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 1), align 4 +; CHECK-NEXT: [[TMP4:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 1), align 4 +; CHECK-NEXT: [[MUL4_1:%.*]] = fmul fast float [[TMP4]], [[TMP3]] +; CHECK-NEXT: [[ADD_1:%.*]] = fadd fast float [[MUL4_1]], [[ADD]] +; CHECK-NEXT: [[TMP5:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 2), align 8 +; CHECK-NEXT: [[TMP6:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 2), align 8 +; CHECK-NEXT: [[MUL4_2:%.*]] = fmul fast float [[TMP6]], [[TMP5]] +; CHECK-NEXT: [[ADD_2:%.*]] = fadd fast float [[MUL4_2]], [[ADD_1]] +; CHECK-NEXT: [[TMP7:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 3), align 4 +; CHECK-NEXT: [[TMP8:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 3), align 4 +; CHECK-NEXT: [[MUL4_3:%.*]] = fmul fast float [[TMP8]], [[TMP7]] +; CHECK-NEXT: [[ADD_3:%.*]] = fadd fast float [[MUL4_3]], [[ADD_2]] ; CHECK-NEXT: [[MUL5:%.*]] = shl nsw i32 [[TMP0]], 2 ; CHECK-NEXT: [[CONV6:%.*]] = sitofp i32 [[MUL5]] to float ; CHECK-NEXT: [[ADD7:%.*]] = fadd fast float [[ADD_3]], [[CONV6]] -; CHECK-NEXT: [[TMP11:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 4) to <2 x float>*), align 16 -; CHECK-NEXT: [[TMP12:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 4) to <2 x float>*), align 16 -; CHECK-NEXT: [[TMP13:%.*]] = fmul fast <2 x float> [[TMP12]], [[TMP11]] -; CHECK-NEXT: [[TMP14:%.*]] = extractelement <2 x float> [[TMP13]], i32 0 -; CHECK-NEXT: [[ADD19:%.*]] = fadd fast float [[TMP14]], [[ADD7]] -; CHECK-NEXT: [[TMP15:%.*]] = extractelement <2 x float> [[TMP13]], i32 1 -; CHECK-NEXT: [[ADD19_1:%.*]] = fadd fast float [[TMP15]], [[ADD19]] -; CHECK-NEXT: [[TMP16:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 6) to <2 x float>*), align 8 -; CHECK-NEXT: [[TMP17:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 6) to <2 x float>*), align 8 -; CHECK-NEXT: [[TMP18:%.*]] = fmul fast <2 x float> [[TMP17]], [[TMP16]] -; CHECK-NEXT: [[TMP19:%.*]] = extractelement <2 x float> [[TMP18]], i32 0 -; CHECK-NEXT: [[ADD19_2:%.*]] = fadd fast float [[TMP19]], [[ADD19_1]] -; CHECK-NEXT: [[TMP20:%.*]] = extractelement <2 x float> [[TMP18]], i32 1 -; CHECK-NEXT: [[ADD19_3:%.*]] = fadd fast float [[TMP20]], [[ADD19_2]] +; CHECK-NEXT: [[TMP9:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 4), align 16 +; CHECK-NEXT: [[TMP10:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 4), align 16 +; CHECK-NEXT: [[MUL18:%.*]] = fmul fast float [[TMP10]], [[TMP9]] +; CHECK-NEXT: [[ADD19:%.*]] = fadd fast float [[MUL18]], [[ADD7]] +; CHECK-NEXT: [[TMP11:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 5), align 4 +; CHECK-NEXT: [[TMP12:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 5), align 4 +; CHECK-NEXT: [[MUL18_1:%.*]] = fmul fast float [[TMP12]], [[TMP11]] +; CHECK-NEXT: [[ADD19_1:%.*]] = fadd fast float [[MUL18_1]], [[ADD19]] +; CHECK-NEXT: [[TMP13:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 6) to <2 x float>*), align 8 +; CHECK-NEXT: [[TMP14:%.*]] = load <2 x float>, <2 x float>* bitcast (float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 6) to <2 x float>*), align 8 +; CHECK-NEXT: [[TMP15:%.*]] = fmul fast <2 x float> [[TMP14]], [[TMP13]] +; CHECK-NEXT: [[TMP16:%.*]] = extractelement <2 x float> [[TMP15]], i32 0 +; CHECK-NEXT: [[ADD19_2:%.*]] = fadd fast float [[TMP16]], [[ADD19_1]] +; CHECK-NEXT: [[TMP17:%.*]] = extractelement <2 x float> [[TMP15]], i32 1 +; CHECK-NEXT: [[ADD19_3:%.*]] = fadd fast float [[TMP17]], [[ADD19_2]] ; CHECK-NEXT: store float [[ADD19_3]], float* @res, align 4 ; CHECK-NEXT: ret float [[ADD19_3]] ; @@ -151,20 +155,24 @@ define float @bazzz() { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* @n, align 4 ; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP0]] to float -; CHECK-NEXT: [[TMP1:%.*]] = load <4 x float>, <4 x float>* bitcast ([20 x float]* @arr to <4 x float>*), align 16 -; CHECK-NEXT: [[TMP2:%.*]] = load <4 x float>, <4 x float>* bitcast ([20 x float]* @arr1 to <4 x float>*), align 16 -; CHECK-NEXT: [[TMP3:%.*]] = fmul fast <4 x float> [[TMP2]], [[TMP1]] -; CHECK-NEXT: [[TMP4:%.*]] = fadd fast float undef, undef -; CHECK-NEXT: [[TMP5:%.*]] = fadd fast float undef, [[TMP4]] -; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <4 x float> [[TMP3]], <4 x float> undef, <4 x i32> -; CHECK-NEXT: [[BIN_RDX:%.*]] = fadd fast <4 x float> [[TMP3]], [[RDX_SHUF]] -; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <4 x float> [[BIN_RDX]], <4 x float> undef, <4 x i32> -; CHECK-NEXT: [[BIN_RDX2:%.*]] = fadd fast <4 x float> [[BIN_RDX]], [[RDX_SHUF1]] -; CHECK-NEXT: [[TMP6:%.*]] = extractelement <4 x float> [[BIN_RDX2]], i32 0 -; CHECK-NEXT: [[TMP7:%.*]] = fadd fast float undef, [[TMP5]] -; CHECK-NEXT: [[TMP8:%.*]] = fmul fast float [[CONV]], [[TMP6]] -; CHECK-NEXT: store float [[TMP8]], float* @res, align 4 -; CHECK-NEXT: ret float [[TMP8]] +; CHECK-NEXT: [[TMP1:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 0), align 16 +; CHECK-NEXT: [[TMP2:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 0), align 16 +; CHECK-NEXT: [[MUL:%.*]] = fmul fast float [[TMP2]], [[TMP1]] +; CHECK-NEXT: [[TMP3:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 1), align 4 +; CHECK-NEXT: [[TMP4:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 1), align 4 +; CHECK-NEXT: [[MUL_1:%.*]] = fmul fast float [[TMP4]], [[TMP3]] +; CHECK-NEXT: [[TMP5:%.*]] = fadd fast float [[MUL_1]], [[MUL]] +; CHECK-NEXT: [[TMP6:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 2), align 8 +; CHECK-NEXT: [[TMP7:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 2), align 8 +; CHECK-NEXT: [[MUL_2:%.*]] = fmul fast float [[TMP7]], [[TMP6]] +; CHECK-NEXT: [[TMP8:%.*]] = fadd fast float [[MUL_2]], [[TMP5]] +; CHECK-NEXT: [[TMP9:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 3), align 4 +; CHECK-NEXT: [[TMP10:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 3), align 4 +; CHECK-NEXT: [[MUL_3:%.*]] = fmul fast float [[TMP10]], [[TMP9]] +; CHECK-NEXT: [[TMP11:%.*]] = fadd fast float [[MUL_3]], [[TMP8]] +; CHECK-NEXT: [[TMP12:%.*]] = fmul fast float [[CONV]], [[TMP11]] +; CHECK-NEXT: store float [[TMP12]], float* @res, align 4 +; CHECK-NEXT: ret float [[TMP12]] ; entry: %0 = load i32, i32* @n, align 4 @@ -194,19 +202,23 @@ define i32 @foo() { ; CHECK-NEXT: entry: ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* @n, align 4 ; CHECK-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP0]] to float -; CHECK-NEXT: [[TMP1:%.*]] = load <4 x float>, <4 x float>* bitcast ([20 x float]* @arr to <4 x float>*), align 16 -; CHECK-NEXT: [[TMP2:%.*]] = load <4 x float>, <4 x float>* bitcast ([20 x float]* @arr1 to <4 x float>*), align 16 -; CHECK-NEXT: [[TMP3:%.*]] = fmul fast <4 x float> [[TMP2]], [[TMP1]] -; CHECK-NEXT: [[TMP4:%.*]] = fadd fast float undef, undef -; CHECK-NEXT: [[TMP5:%.*]] = fadd fast float undef, [[TMP4]] -; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <4 x float> [[TMP3]], <4 x float> undef, <4 x i32> -; CHECK-NEXT: [[BIN_RDX:%.*]] = fadd fast <4 x float> [[TMP3]], [[RDX_SHUF]] -; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <4 x float> [[BIN_RDX]], <4 x float> undef, <4 x i32> -; CHECK-NEXT: [[BIN_RDX2:%.*]] = fadd fast <4 x float> [[BIN_RDX]], [[RDX_SHUF1]] -; CHECK-NEXT: [[TMP6:%.*]] = extractelement <4 x float> [[BIN_RDX2]], i32 0 -; CHECK-NEXT: [[TMP7:%.*]] = fadd fast float undef, [[TMP5]] -; CHECK-NEXT: [[TMP8:%.*]] = fmul fast float [[CONV]], [[TMP6]] -; CHECK-NEXT: [[CONV4:%.*]] = fptosi float [[TMP8]] to i32 +; CHECK-NEXT: [[TMP1:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 0), align 16 +; CHECK-NEXT: [[TMP2:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 0), align 16 +; CHECK-NEXT: [[MUL:%.*]] = fmul fast float [[TMP2]], [[TMP1]] +; CHECK-NEXT: [[TMP3:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 1), align 4 +; CHECK-NEXT: [[TMP4:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 1), align 4 +; CHECK-NEXT: [[MUL_1:%.*]] = fmul fast float [[TMP4]], [[TMP3]] +; CHECK-NEXT: [[TMP5:%.*]] = fadd fast float [[MUL_1]], [[MUL]] +; CHECK-NEXT: [[TMP6:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 2), align 8 +; CHECK-NEXT: [[TMP7:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 2), align 8 +; CHECK-NEXT: [[MUL_2:%.*]] = fmul fast float [[TMP7]], [[TMP6]] +; CHECK-NEXT: [[TMP8:%.*]] = fadd fast float [[MUL_2]], [[TMP5]] +; CHECK-NEXT: [[TMP9:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr, i64 0, i64 3), align 4 +; CHECK-NEXT: [[TMP10:%.*]] = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @arr1, i64 0, i64 3), align 4 +; CHECK-NEXT: [[MUL_3:%.*]] = fmul fast float [[TMP10]], [[TMP9]] +; CHECK-NEXT: [[TMP11:%.*]] = fadd fast float [[MUL_3]], [[TMP8]] +; CHECK-NEXT: [[TMP12:%.*]] = fmul fast float [[CONV]], [[TMP11]] +; CHECK-NEXT: [[CONV4:%.*]] = fptosi float [[TMP12]] to i32 ; CHECK-NEXT: store i32 [[CONV4]], i32* @n, align 4 ; CHECK-NEXT: ret i32 [[CONV4]] ; From owner-svn-src-all@freebsd.org Sat Feb 25 14:40: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 684E1CED858; Sat, 25 Feb 2017 14:40: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 2B1C4255; Sat, 25 Feb 2017 14:40: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 v1PEehIp087094; Sat, 25 Feb 2017 14:40:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEegEb087087; Sat, 25 Feb 2017 14:40:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEegEb087087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314260 - in vendor/clang/dist: docs lib/CodeGen lib/Frontend lib/StaticAnalyzer/Checkers test/Analysis test/OpenMP test/Sema 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, 25 Feb 2017 14:40:44 -0000 Author: dim Date: Sat Feb 25 14:40:42 2017 New Revision: 314260 URL: https://svnweb.freebsd.org/changeset/base/314260 Log: Vendor import of clang release_40 branch r296202: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296202 Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp vendor/clang/dist/test/Analysis/virtualcall.cpp vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp vendor/clang/dist/test/Sema/atomic-ops.c Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/docs/ReleaseNotes.rst Sat Feb 25 14:40:42 2017 (r314260) @@ -1,6 +1,6 @@ -======================================= -Clang 4.0.0 (In-Progress) Release Notes -======================================= +========================= +Clang 4.0.0 Release Notes +========================= .. contents:: :local: @@ -8,12 +8,6 @@ Clang 4.0.0 (In-Progress) Release Notes Written by the `LLVM Team `_ -.. warning:: - - These are in-progress notes for the upcoming Clang 4.0.0 release. You may - prefer the `Clang 3.9 Release Notes - `_. - Introduction ============ @@ -42,7 +36,8 @@ sections with improvements to Clang's su Major New Features ------------------ -- The ``diagnose_if`` attribute has been added to clang. This attribute allows +- The `diagnose_if `_ attribute has been + added to clang. This attribute allows clang to emit a warning or error if a function call meets one or more user-specified conditions. @@ -65,76 +60,24 @@ Major New Features } -- ... - Improvements to ThinLTO (-flto=thin) ------------------------------------ - Integration with profile data (PGO). When available, profile data enables more accurate function importing decisions, as well as cross-module indirect call promotion. - Significant build-time and binary-size improvements when compiling with debug - info (-g). - -Improvements to Clang's diagnostics -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- ... + info (``-g``). New Compiler Flags ------------------ -The option -Og has been added to optimize the debugging experience. -For now, this option is exactly the same as -O1. However, in the future, -some other optimizations might be enabled or disabled. - -The option -MJ has been added to simplify adding JSON compilation -database output into existing build systems. - -The option .... - -New Pragmas in Clang ------------------------ - -Clang now supports the ... - - -Attribute Changes in Clang --------------------------- - -- ... - -Windows Support ---------------- - -Clang's support for building native Windows programs ... - - -C Language Changes in Clang ---------------------------- - -- ... - -... - -C11 Feature Support -^^^^^^^^^^^^^^^^^^^ - -... +- The option ``-Og`` has been added to optimize the debugging experience. + For now, this option is exactly the same as ``-O1``. However, in the future, + some other optimizations might be enabled or disabled. -C++ Language Changes in Clang ------------------------------ +- The option ``-MJ`` has been added to simplify adding JSON compilation + database output into existing build systems. -... - -C++1z Feature Support -^^^^^^^^^^^^^^^^^^^^^ - -... - -Objective-C Language Changes in Clang -------------------------------------- - -... OpenCL C Language Changes in Clang ---------------------------------- @@ -206,42 +149,14 @@ OpenCL C Language Changes in Clang which is now handled as a compiler builtin function with an integer value passed into it. * Change fake address space map to use the SPIR convention. -* Added `the OpenCL manual - `_ to Clang +* Added `the OpenCL manual `_ to Clang documentation. -OpenMP Support in Clang ----------------------------------- - -... - -Internal API Changes --------------------- - -These are major API changes that have happened since the 3.9 release of -Clang. If upgrading an external codebase that uses Clang as a library, -this section should help get you past the largest hurdles of upgrading. - -- ... - -AST Matchers ------------- - -... - -libclang --------- - -... - -With the option --show-description, scan-build's list of defects will also -show the description of the defects. - Static Analyzer --------------- -With the option --show-description, scan-build's list of defects will also +With the option ``--show-description``, scan-build's list of defects will also show the description of the defects. The analyzer now provides better support of code that uses gtest. @@ -250,29 +165,19 @@ Several new checks were added: - The analyzer warns when virtual calls are made from constructors or destructors. This check is off by default but can be enabled by passing the - following command to scan-build: -enable-checker optin.cplusplus.VirtualCall. + following command to scan-build: ``-enable-checker optin.cplusplus.VirtualCall``. - The analyzer checks for synthesized copy properties of mutable types in - Objective C, such as NSMutableArray. Calling the setter for these properties + Objective C, such as ``NSMutableArray``. Calling the setter for these properties will store an immutable copy of the value. -- The analyzer checks for calls to dispatch_once() that use an Objective-C +- The analyzer checks for calls to ``dispatch_once()`` that use an Objective-C instance variable as the predicate. Using an instance variable as a predicate may result in the passed-in block being executed multiple times or not at all. These calls should be rewritten either to use a lock or to store the predicate in a global or static variable. -- The analyzer checks for unintended comparisons of NSNumber, CFNumberRef, and +- The analyzer checks for unintended comparisons of ``NSNumber``, ``CFNumberRef``, and other Cocoa number objects to scalar values. -Python Binding Changes ----------------------- - -The following methods have been added: - -- ... - -Significant Known Problems -========================== - Additional Information ====================== Modified: vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp Sat Feb 25 14:40:42 2017 (r314260) @@ -4697,7 +4697,9 @@ void CGOpenMPRuntime::emitCancellationPo // global_tid, kmp_int32 cncl_kind); if (auto *OMPRegionInfo = dyn_cast_or_null(CGF.CapturedStmtInfo)) { - if (OMPRegionInfo->hasCancel()) { + // For 'cancellation point taskgroup', the task region info may not have a + // cancel. This may instead happen in another adjacent task. + if (CancelRegion == OMPD_taskgroup || OMPRegionInfo->hasCancel()) { llvm::Value *Args[] = { emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc), CGF.Builder.getInt32(getCancellationKind(CancelRegion))}; Modified: vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp Sat Feb 25 14:40:42 2017 (r314260) @@ -286,12 +286,12 @@ static void DefineFastIntType(unsigned T /// Get the value the ATOMIC_*_LOCK_FREE macro should have for a type with /// the specified properties. -static const char *getLockFreeValue(unsigned TypeWidth, unsigned InlineWidth) { +static const char *getLockFreeValue(unsigned TypeWidth, unsigned TypeAlign, + unsigned InlineWidth) { // Fully-aligned, power-of-2 sizes no larger than the inline // width will be inlined as lock-free operations. - // Note: we do not need to check alignment since _Atomic(T) is always - // appropriately-aligned in clang. - if ((TypeWidth & (TypeWidth - 1)) == 0 && TypeWidth <= InlineWidth) + if (TypeWidth == TypeAlign && (TypeWidth & (TypeWidth - 1)) == 0 && + TypeWidth <= InlineWidth) return "2"; // "always lock free" // We cannot be certain what operations the lib calls might be // able to implement as lock-free on future processors. @@ -881,6 +881,7 @@ static void InitializePredefinedMacros(c #define DEFINE_LOCK_FREE_MACRO(TYPE, Type) \ Builder.defineMacro("__GCC_ATOMIC_" #TYPE "_LOCK_FREE", \ getLockFreeValue(TI.get##Type##Width(), \ + TI.get##Type##Align(), \ InlineWidthBits)); DEFINE_LOCK_FREE_MACRO(BOOL, Bool); DEFINE_LOCK_FREE_MACRO(CHAR, Char); @@ -893,6 +894,7 @@ static void InitializePredefinedMacros(c DEFINE_LOCK_FREE_MACRO(LLONG, LongLong); Builder.defineMacro("__GCC_ATOMIC_POINTER_LOCK_FREE", getLockFreeValue(TI.getPointerWidth(0), + TI.getPointerAlign(0), InlineWidthBits)); #undef DEFINE_LOCK_FREE_MACRO } Modified: vendor/clang/dist/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp ============================================================================== --- vendor/clang/dist/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp Sat Feb 25 14:40:42 2017 (r314260) @@ -179,7 +179,8 @@ void WalkAST::VisitCXXMemberCallExpr(Cal } // Get the callee. - const CXXMethodDecl *MD = dyn_cast(CE->getDirectCallee()); + const CXXMethodDecl *MD = + dyn_cast_or_null(CE->getDirectCallee()); if (MD && MD->isVirtual() && !callIsNonVirtual && !MD->hasAttr() && !MD->getParent()->hasAttr()) ReportVirtualCall(CE, MD->isPure()); Modified: vendor/clang/dist/test/Analysis/virtualcall.cpp ============================================================================== --- vendor/clang/dist/test/Analysis/virtualcall.cpp Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/test/Analysis/virtualcall.cpp Sat Feb 25 14:40:42 2017 (r314260) @@ -115,12 +115,23 @@ public: int foo() override; }; +// Regression test: don't crash when there's no direct callee. +class F { +public: + F() { + void (F::* ptr)() = &F::foo; + (this->*ptr)(); + } + void foo(); +}; + int main() { A *a; B *b; C *c; D *d; E *e; + F *f; } #include "virtualcall.h" Modified: vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp ============================================================================== --- vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp Sat Feb 25 14:40:42 2017 (r314260) @@ -78,6 +78,12 @@ for (int i = 0; i < argc; ++i) { } // CHECK: call i8* @__kmpc_omp_task_alloc( // CHECK: call i32 @__kmpc_omp_task( +#pragma omp task +{ +#pragma omp cancellation point taskgroup +} +// CHECK: call i8* @__kmpc_omp_task_alloc( +// CHECK: call i32 @__kmpc_omp_task( #pragma omp parallel sections { { @@ -125,6 +131,15 @@ for (int i = 0; i < argc; ++i) { // CHECK: [[RETURN]] // CHECK: ret i32 0 +// CHECK: define internal i32 @{{[^(]+}}(i32 +// CHECK: [[RES:%.+]] = call i32 @__kmpc_cancellationpoint(%ident_t* {{[^,]+}}, i32 {{[^,]+}}, i32 4) +// CHECK: [[CMP:%.+]] = icmp ne i32 [[RES]], 0 +// CHECK: br i1 [[CMP]], label %[[EXIT:[^,]+]], +// CHECK: [[EXIT]] +// CHECK: br label %[[RETURN:.+]] +// CHECK: [[RETURN]] +// CHECK: ret i32 0 + // CHECK: define internal void @{{[^(]+}}(i32* {{[^,]+}}, i32* {{[^,]+}}) // CHECK: call void @__kmpc_for_static_init_4( // CHECK: [[RES:%.+]] = call i32 @__kmpc_cancellationpoint(%ident_t* {{[^,]+}}, i32 [[GTID:%.+]], i32 3) Modified: vendor/clang/dist/test/Sema/atomic-ops.c ============================================================================== --- vendor/clang/dist/test/Sema/atomic-ops.c Sat Feb 25 14:40:37 2017 (r314259) +++ vendor/clang/dist/test/Sema/atomic-ops.c Sat Feb 25 14:40:42 2017 (r314260) @@ -14,7 +14,11 @@ _Static_assert(__GCC_ATOMIC_WCHAR_T_LOCK _Static_assert(__GCC_ATOMIC_SHORT_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_INT_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_LONG_LOCK_FREE == 2, ""); +#ifdef __i386__ +_Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 1, ""); +#else _Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 2, ""); +#endif _Static_assert(__GCC_ATOMIC_POINTER_LOCK_FREE == 2, ""); _Static_assert(__c11_atomic_is_lock_free(1), ""); From owner-svn-src-all@freebsd.org Sat Feb 25 14:40: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 AAEC3CED869; Sat, 25 Feb 2017 14:40:47 +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 456F12C1; Sat, 25 Feb 2017 14:40:47 +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 v1PEekpX087141; Sat, 25 Feb 2017 14:40:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEekc3087140; Sat, 25 Feb 2017 14:40:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEekc3087140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314261 - vendor/clang/clang-release_40-r296202 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, 25 Feb 2017 14:40:47 -0000 Author: dim Date: Sat Feb 25 14:40:46 2017 New Revision: 314261 URL: https://svnweb.freebsd.org/changeset/base/314261 Log: Tag clang release_40 branch r296202. Added: vendor/clang/clang-release_40-r296202/ - copied from r314260, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sat Feb 25 14:40: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 AC1F6CED8A2; Sat, 25 Feb 2017 14:40: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 60356377; Sat, 25 Feb 2017 14:40: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 v1PEepw0087189; Sat, 25 Feb 2017 14:40:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEepNm087188; Sat, 25 Feb 2017 14:40:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEepNm087188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314262 - vendor/compiler-rt/compiler-rt-release_40-r296202 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, 25 Feb 2017 14:40:52 -0000 Author: dim Date: Sat Feb 25 14:40:51 2017 New Revision: 314262 URL: https://svnweb.freebsd.org/changeset/base/314262 Log: Tag compiler-rt release_40 branch r296202. Added: vendor/compiler-rt/compiler-rt-release_40-r296202/ - copied from r314261, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sat Feb 25 14: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 5F2BDCED8E8; Sat, 25 Feb 2017 14:40: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 070083FE; Sat, 25 Feb 2017 14:40: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 v1PEetti087237; Sat, 25 Feb 2017 14:40:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEetnA087236; Sat, 25 Feb 2017 14:40:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEetnA087236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314263 - vendor/libc++/libc++-release_40-r296202 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, 25 Feb 2017 14:40:56 -0000 Author: dim Date: Sat Feb 25 14:40:54 2017 New Revision: 314263 URL: https://svnweb.freebsd.org/changeset/base/314263 Log: Tag libc++ release_40 branch r296202. Added: vendor/libc++/libc++-release_40-r296202/ - copied from r314262, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sat Feb 25 14: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 0086BCED924; Sat, 25 Feb 2017 14:41:00 +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 C84FB693; Sat, 25 Feb 2017 14:40: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 v1PEewFk087285; Sat, 25 Feb 2017 14:40:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEewhq087284; Sat, 25 Feb 2017 14:40:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251440.v1PEewhq087284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:40:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314264 - 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, 25 Feb 2017 14:41:00 -0000 Author: dim Date: Sat Feb 25 14:40:58 2017 New Revision: 314264 URL: https://svnweb.freebsd.org/changeset/base/314264 Log: Vendor import of lld release_40 branch r296202: https://llvm.org/svn/llvm-project/lld/branches/release_40@296202 Modified: vendor/lld/dist/docs/ReleaseNotes.rst Modified: vendor/lld/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/lld/dist/docs/ReleaseNotes.rst Sat Feb 25 14:40:54 2017 (r314263) +++ vendor/lld/dist/docs/ReleaseNotes.rst Sat Feb 25 14:40:58 2017 (r314264) @@ -5,9 +5,6 @@ LLD 4.0.0 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 4.0.0 release. - Introduction ============ @@ -15,7 +12,7 @@ LLD is a linker which supports ELF (Unix (macOS). It is generally faster than the GNU BFD/gold linkers or the MSVC linker. -LLD is designed to be a drop-in replacmenet for the system linkers, so +LLD is designed to be a drop-in replacement for the system linkers, so that users don't need to change their build systems other than swapping the linker command. @@ -49,17 +46,17 @@ Other notable changes are listed below: but the source location of unresolved symbols. * Error messages are printed in red just like Clang by default. You - can disable it by passing -no-color-diagnostics. + can disable it by passing ``-no-color-diagnostics``. * LLD's version string is now embedded in a .comment section in the result output file. You can dump it with this command: ``objdump -j -s .comment ``. -* The -Map option is supported. With that, you can print out section +* The ``-Map`` option is supported. With that, you can print out section and symbol information to a specified file. This feature is useful for analyzing link results. -* The file format for the -reproduce option has changed from cpio to +* The file format for the ``-reproduce`` option has changed from cpio to tar. * When creating a copy relocation for a symbol, LLD now scans the @@ -67,8 +64,8 @@ Other notable changes are listed below: space for the copy relocation is reserved in .bss.rel.ro instead of .bss. This fixes a security issue that read-only data in a DSO becomes writable if it is copied by a copy relocation. This issue - was disclosed originally on the binutils mailing list at - ``. + was disclosed originally on the + `binutils mailing list `_. * Compressed input sections are supported. @@ -76,7 +73,7 @@ Other notable changes are listed below: ``-Ttext``, ``-b binary``, ``-build-id=uuid``, ``-no-rosegment``, ``-nopie``, ``-nostdlib``, ``-omagic``, ``-retain-symbols-file``, ``-sort-section``, ``-z max-page-size`` and ``-z wxneeded`` are - suppoorted. + supported. * A lot of linker script directives have been added. @@ -84,15 +81,15 @@ Other notable changes are listed below: 0x200000 to make it huge-page friendly. * ARM port now supports GNU ifunc, the ARM C++ exceptions ABI, TLS - relocations and static linking. Problems with dlopen() on systems + relocations and static linking. Problems with ``dlopen()`` on systems using eglibc fixed. * MIPS port now supports input files in new R6 revision of MIPS ABIs or N32 ABI. Generated file now contains .MIPS.abiflags section and complete set of ELF headers flags. -* Relocations produced by the ``-mxgot`` compiler's flag is supported - for MIPS. Now it is possible to generate "large" GOT exceeds 64K +* Relocations produced by the ``-mxgot`` compiler flag is supported + for MIPS. Now it is possible to generate "large" GOT that exceeds the 64K limit. COFF Improvements From owner-svn-src-all@freebsd.org Sat Feb 25 14:41: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 0D8C9CED93B; Sat, 25 Feb 2017 14:41:03 +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 B3CEC74D; Sat, 25 Feb 2017 14:41:02 +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 v1PEf1vv087336; Sat, 25 Feb 2017 14:41:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEf19U087335; Sat, 25 Feb 2017 14:41:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251441.v1PEf19U087335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314265 - vendor/lld/lld-release_40-r296202 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, 25 Feb 2017 14:41:03 -0000 Author: dim Date: Sat Feb 25 14:41:01 2017 New Revision: 314265 URL: https://svnweb.freebsd.org/changeset/base/314265 Log: Tag lld release_40 branch r296202. Added: vendor/lld/lld-release_40-r296202/ - copied from r314264, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sat Feb 25 14: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 581F3CED973; Sat, 25 Feb 2017 14:41:08 +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 06AC3809; Sat, 25 Feb 2017 14:41:07 +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 v1PEf7F3087384; Sat, 25 Feb 2017 14:41:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEf7vV087383; Sat, 25 Feb 2017 14:41:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251441.v1PEf7vV087383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 14:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314266 - vendor/lldb/lldb-release_40-r296202 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, 25 Feb 2017 14:41:08 -0000 Author: dim Date: Sat Feb 25 14:41:06 2017 New Revision: 314266 URL: https://svnweb.freebsd.org/changeset/base/314266 Log: Tag lldb release_40 branch r296202. Added: vendor/lldb/lldb-release_40-r296202/ - copied from r314265, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sat Feb 25 14:45: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 C060FCEDC92; Sat, 25 Feb 2017 14:45:56 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A07E225; Sat, 25 Feb 2017 14:45:56 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PEjtDU088985; Sat, 25 Feb 2017 14:45:55 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEjsaQ088975; Sat, 25 Feb 2017 14:45:54 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201702251445.v1PEjsaQ088975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sat, 25 Feb 2017 14:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314267 - 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: Sat, 25 Feb 2017 14:45:56 -0000 Author: jpaetzel Date: Sat Feb 25 14:45:54 2017 New Revision: 314267 URL: https://svnweb.freebsd.org/changeset/base/314267 Log: MFV 314243 6676 Race between unique_insert() and unique_remove() causes ZFS fsid change illumos/illumos-gate@40510e8eba18690b9a9843b26393725eeb0f1dac https://github.com/illumos/illumos-gate/commit/40510e8eba18690b9a9843b26393725eeb0f1dac https://www.illumos.org/issues/6676 The fsid of zfs filesystems might change after reboot or remount. The problem seems to be caused by a race between unique_insert() and unique_remove(). The unique_remove() is called from dsl_dataset_evict() which is now an asynchronous thread. In a case the dsl_dataset_evict() thread is very slow and calls unique_remove() too late we will end up with changed fsid on zfs mount. This problem is very likely caused by #5056. Steps to Reproduce Note: I'm able to reproduce this always on a single core (virtual) machine. On multicore machines it is not so easy to reproduce. # uname -a SunOS openindiana 5.11 illumos-633aa80 i86pc i386 i86pc Solaris # zfs create rpool/TEST # FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}') # echo $FS::print vfs_t vfs_fsid | mdb -k vfs_fsid = { vfs_fsid.val = [ 0x54d7028a, 0x70311508 ] } # zfs umount rpool/TEST # zfs mount rpool/TEST # FS=$(echo ::fsinfo | mdb -k | grep TEST | awk '{print $1}') # echo $FS::print vfs_t vfs_fsid | mdb -k vfs_fsid = { vfs_fsid.val = [ 0xd9454e49, 0x6b36d08 ] } # Impact The persistent fsid (filesystem id) is essential for proper NFS functionality. If the fsid of a filesystem changes on remount (or after reboot) the NFS clients might not be able to automatically recover from such event and the manual remount of the NFS filesystems on every NFS client might be needed. Author: Josef 'Jeff' Sipek Reviewed by: Saso Kiselkov Reviewed by: Sanjay Nadkarni Reviewed by: Dan Vatca Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Sebastien Roy Approved by: Robert Mustacchi Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Feb 25 14:45:54 2017 (r314267) @@ -54,7 +54,9 @@ static void dbuf_write(dbuf_dirty_record #ifndef __lint extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu, - dmu_buf_evict_func_t *evict_func, dmu_buf_t **clear_on_evict_dbufp); + dmu_buf_evict_func_t *evict_func_sync, + dmu_buf_evict_func_t *evict_func_async, + dmu_buf_t **clear_on_evict_dbufp); #endif /* ! __lint */ /* @@ -361,11 +363,24 @@ dbuf_evict_user(dmu_buf_impl_t *db) #endif /* - * Invoke the callback from a taskq to avoid lock order reversals - * and limit stack depth. - */ - taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func, dbu, 0, - &dbu->dbu_tqent); + * There are two eviction callbacks - one that we call synchronously + * and one that we invoke via a taskq. The async one is useful for + * avoiding lock order reversals and limiting stack depth. + * + * Note that if we have a sync callback but no async callback, + * it's likely that the sync callback will free the structure + * containing the dbu. In that case we need to take care to not + * dereference dbu after calling the sync evict func. + */ + boolean_t has_async = (dbu->dbu_evict_func_async != NULL); + + if (dbu->dbu_evict_func_sync != NULL) + dbu->dbu_evict_func_sync(dbu); + + if (has_async) { + taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func_async, + dbu, 0, &dbu->dbu_tqent); + } } boolean_t Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Sat Feb 25 14:45:54 2017 (r314267) @@ -1014,7 +1014,7 @@ dnode_special_open(objset_t *os, dnode_p } static void -dnode_buf_pageout(void *dbu) +dnode_buf_evict_async(void *dbu) { dnode_children_t *children_dnodes = dbu; int i; @@ -1140,8 +1140,8 @@ dnode_hold_impl(objset_t *os, uint64_t o for (i = 0; i < epb; i++) { zrl_init(&dnh[i].dnh_zrlock); } - dmu_buf_init_user(&children_dnodes->dnc_dbu, - dnode_buf_pageout, NULL); + dmu_buf_init_user(&children_dnodes->dnc_dbu, NULL, + dnode_buf_evict_async, NULL); winner = dmu_buf_set_user(&db->db, &children_dnodes->dnc_dbu); if (winner != NULL) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Feb 25 14:45:54 2017 (r314267) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright (c) 2011 Martin Matuska - * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -279,16 +279,30 @@ dsl_dataset_block_freeable(dsl_dataset_t return (B_TRUE); } +/* + * We have to release the fsid syncronously or we risk that a subsequent + * mount of the same dataset will fail to unique_insert the fsid. This + * failure would manifest itself as the fsid of this dataset changing + * between mounts which makes NFS clients quite unhappy. + */ static void -dsl_dataset_evict(void *dbu) +dsl_dataset_evict_sync(void *dbu) { dsl_dataset_t *ds = dbu; ASSERT(ds->ds_owner == NULL); - ds->ds_dbuf = NULL; - unique_remove(ds->ds_fsid_guid); +} + +static void +dsl_dataset_evict_async(void *dbu) +{ + dsl_dataset_t *ds = dbu; + + ASSERT(ds->ds_owner == NULL); + + ds->ds_dbuf = NULL; if (ds->ds_objset != NULL) dmu_objset_evict(ds->ds_objset); @@ -528,7 +542,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds->ds_reserved = ds->ds_quota = 0; } - dmu_buf_init_user(&ds->ds_dbu, dsl_dataset_evict, &ds->ds_dbuf); + dmu_buf_init_user(&ds->ds_dbu, dsl_dataset_evict_sync, + dsl_dataset_evict_async, &ds->ds_dbuf); if (err == 0) winner = dmu_buf_set_user_ie(dbuf, &ds->ds_dbu); @@ -551,6 +566,16 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } else { ds->ds_fsid_guid = unique_insert(dsl_dataset_phys(ds)->ds_fsid_guid); + if (ds->ds_fsid_guid != + dsl_dataset_phys(ds)->ds_fsid_guid) { + zfs_dbgmsg("ds_fsid_guid changed from " + "%llx to %llx for pool %s dataset id %llu", + (long long) + dsl_dataset_phys(ds)->ds_fsid_guid, + (long long)ds->ds_fsid_guid, + spa_name(dp->dp_spa), + dsobj); + } } } ASSERT3P(ds->ds_dbuf, ==, dbuf); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Sat Feb 25 14:45:54 2017 (r314267) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. @@ -133,7 +133,7 @@ extern inline dsl_dir_phys_t *dsl_dir_ph static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd); static void -dsl_dir_evict(void *dbu) +dsl_dir_evict_async(void *dbu) { dsl_dir_t *dd = dbu; dsl_pool_t *dp = dd->dd_pool; @@ -240,7 +240,8 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_ dmu_buf_rele(origin_bonus, FTAG); } - dmu_buf_init_user(&dd->dd_dbu, dsl_dir_evict, &dd->dd_dbuf); + dmu_buf_init_user(&dd->dd_dbu, NULL, dsl_dir_evict_async, + &dd->dd_dbuf); winner = dmu_buf_set_user_ie(dbuf, &dd->dd_dbu); if (winner != NULL) { if (dd->dd_parent) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Feb 25 14:45:54 2017 (r314267) @@ -22,7 +22,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 iXsystems, Inc - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -1299,7 +1299,7 @@ sa_build_index(sa_handle_t *hdl, sa_buf_ /*ARGSUSED*/ static void -sa_evict(void *dbu) +sa_evict_sync(void *dbu) { panic("evicting sa dbuf\n"); } @@ -1383,7 +1383,8 @@ sa_handle_get_from_db(objset_t *os, dmu_ sa_handle_t *winner = NULL; handle = kmem_cache_alloc(sa_cache, KM_SLEEP); - handle->sa_dbu.dbu_evict_func = NULL; + handle->sa_dbu.dbu_evict_func_sync = NULL; + handle->sa_dbu.dbu_evict_func_async = NULL; handle->sa_userp = userp; handle->sa_bonus = db; handle->sa_os = os; @@ -1394,7 +1395,8 @@ sa_handle_get_from_db(objset_t *os, dmu_ error = sa_build_index(handle, SA_BONUS); if (hdl_type == SA_HDL_SHARED) { - dmu_buf_init_user(&handle->sa_dbu, sa_evict, NULL); + dmu_buf_init_user(&handle->sa_dbu, sa_evict_sync, NULL, + NULL); winner = dmu_buf_set_user_ie(db, &handle->sa_dbu); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Sat Feb 25 14:45:54 2017 (r314267) @@ -539,8 +539,14 @@ typedef struct dmu_buf_user { */ taskq_ent_t dbu_tqent; - /* This instance's eviction function pointer. */ - dmu_buf_evict_func_t *dbu_evict_func; + /* + * This instance's eviction function pointers. + * + * dbu_evict_func_sync is called synchronously and then + * dbu_evict_func_async is executed asynchronously on a taskq. + */ + dmu_buf_evict_func_t *dbu_evict_func_sync; + dmu_buf_evict_func_t *dbu_evict_func_async; #ifdef ZFS_DEBUG /* * Pointer to user's dbuf pointer. NULL for clients that do @@ -564,15 +570,19 @@ typedef struct dmu_buf_user { /* Very ugly, but it beats issuing suppression directives in many Makefiles. */ extern void dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_t **clear_on_evict_dbufp); + dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp); #else /* __lint */ inline void -dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_t **clear_on_evict_dbufp) +dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, + dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) { - ASSERT(dbu->dbu_evict_func == NULL); - ASSERT(evict_func != NULL); - dbu->dbu_evict_func = evict_func; + ASSERT(dbu->dbu_evict_func_sync == NULL); + ASSERT(dbu->dbu_evict_func_async == NULL); + + /* must have at least one evict func */ + IMPLY(evict_func_sync == NULL, evict_func_async != NULL); + dbu->dbu_evict_func_sync = evict_func_sync; + dbu->dbu_evict_func_async = evict_func_async; #ifdef ZFS_DEBUG dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp; #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h Sat Feb 25 14:45:54 2017 (r314267) @@ -199,7 +199,7 @@ boolean_t zap_match(zap_name_t *zn, cons int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp); void zap_unlockdir(zap_t *zap, void *tag); -void zap_evict(void *dbu); +void zap_evict_sync(void *dbu); zap_name_t *zap_name_alloc(zap_t *zap, const char *key, matchtype_t mt); void zap_name_free(zap_name_t *zn); int zap_hashbits(zap_t *zap); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c Sat Feb 25 14:45:54 2017 (r314267) @@ -81,7 +81,8 @@ fzap_upgrade(zap_t *zap, dmu_tx_t *tx, z ASSERT(RW_WRITE_HELD(&zap->zap_rwlock)); zap->zap_ismicro = FALSE; - zap->zap_dbu.dbu_evict_func = zap_evict; + zap->zap_dbu.dbu_evict_func_sync = zap_evict_sync; + zap->zap_dbu.dbu_evict_func_async = NULL; mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0); zap->zap_f.zap_block_shift = highbit64(zap->zap_dbuf->db_size) - 1; @@ -399,7 +400,7 @@ zap_allocate_blocks(zap_t *zap, int nblo } static void -zap_leaf_pageout(void *dbu) +zap_leaf_evict_sync(void *dbu) { zap_leaf_t *l = dbu; @@ -423,7 +424,7 @@ zap_create_leaf(zap_t *zap, dmu_tx_t *tx VERIFY(0 == dmu_buf_hold(zap->zap_objset, zap->zap_object, l->l_blkid << FZAP_BLOCK_SHIFT(zap), NULL, &l->l_dbuf, DMU_READ_NO_PREFETCH)); - dmu_buf_init_user(&l->l_dbu, zap_leaf_pageout, &l->l_dbuf); + dmu_buf_init_user(&l->l_dbu, zap_leaf_evict_sync, NULL, &l->l_dbuf); winner = dmu_buf_set_user(l->l_dbuf, &l->l_dbu); ASSERT(winner == NULL); dmu_buf_will_dirty(l->l_dbuf, tx); @@ -470,13 +471,13 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t l->l_bs = highbit64(db->db_size) - 1; l->l_dbuf = db; - dmu_buf_init_user(&l->l_dbu, zap_leaf_pageout, &l->l_dbuf); + dmu_buf_init_user(&l->l_dbu, zap_leaf_evict_sync, NULL, &l->l_dbuf); winner = dmu_buf_set_user(db, &l->l_dbu); rw_exit(&l->l_rwlock); if (winner != NULL) { /* someone else set it first */ - zap_leaf_pageout(&l->l_dbu); + zap_leaf_evict_sync(&l->l_dbu); l = winner; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Sat Feb 25 14:41:06 2017 (r314266) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Sat Feb 25 14:45:54 2017 (r314267) @@ -403,7 +403,7 @@ mzap_open(objset_t *os, uint64_t obj, dm * it, because zap_lockdir() checks zap_ismicro without the lock * held. */ - dmu_buf_init_user(&zap->zap_dbu, zap_evict, &zap->zap_dbuf); + dmu_buf_init_user(&zap->zap_dbu, zap_evict_sync, NULL, &zap->zap_dbuf); winner = dmu_buf_set_user(db, &zap->zap_dbu); if (winner != NULL) @@ -747,7 +747,7 @@ zap_destroy(objset_t *os, uint64_t zapob } void -zap_evict(void *dbu) +zap_evict_sync(void *dbu) { zap_t *zap = dbu; From owner-svn-src-all@freebsd.org Sat Feb 25 14:50: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 AA521CEDEE2; Sat, 25 Feb 2017 14:50:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77A2FAA3; Sat, 25 Feb 2017 14:50:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PEor4Q090000; Sat, 25 Feb 2017 14:50:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PEor0V089999; Sat, 25 Feb 2017 14:50:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702251450.v1PEor0V089999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 25 Feb 2017 14:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314268 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 14:50:54 -0000 Author: avg Date: Sat Feb 25 14:50:53 2017 New Revision: 314268 URL: https://svnweb.freebsd.org/changeset/base/314268 Log: add chromebook_platform.4 to the list of manual pages Reported by: Wolfgang Zenker Pointyhat to: avg MFC after: 5 days Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sat Feb 25 14:45:54 2017 (r314267) +++ head/share/man/man4/Makefile Sat Feb 25 14:50:53 2017 (r314268) @@ -104,6 +104,7 @@ MAN= aac.4 \ cfi.4 \ cfumass.4 \ ch.4 \ + chromebook_platform.4 \ ciss.4 \ cloudabi.4 \ cm.4 \ From owner-svn-src-all@freebsd.org Sat Feb 25 15:55: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 DE9A1CED822; Sat, 25 Feb 2017 15:55:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB603ACE; Sat, 25 Feb 2017 15:55:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PFtk6F016927; Sat, 25 Feb 2017 15:55:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PFtkUv016926; Sat, 25 Feb 2017 15:55:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702251555.v1PFtkUv016926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 25 Feb 2017 15:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314271 - head/sys/dev/chromebook_platform X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 15:55:48 -0000 Author: avg Date: Sat Feb 25 15:55:46 2017 New Revision: 314271 URL: https://svnweb.freebsd.org/changeset/base/314271 Log: chromebook_platform: catch up with ig4iic -> ig4iic_pci in r310621 Reported by: Wolfgang Zenker Tested by: Wolfgang Zenker MFC after: 5 days Modified: head/sys/dev/chromebook_platform/chromebook_platform.c Modified: head/sys/dev/chromebook_platform/chromebook_platform.c ============================================================================== --- head/sys/dev/chromebook_platform/chromebook_platform.c Sat Feb 25 15:04:19 2017 (r314270) +++ head/sys/dev/chromebook_platform/chromebook_platform.c Sat Feb 25 15:55:46 2017 (r314271) @@ -69,7 +69,7 @@ chromebook_i2c_identify(driver_t *driver * See http://lxr.free-electrons.com/source/drivers/platform/chrome/chromeos_laptop.c */ controller = device_get_parent(bus); - if (strcmp(device_get_name(controller), "ig4iic") != 0) + if (strcmp(device_get_name(controller), "ig4iic_pci") != 0) return; for (i = 0; i < nitems(slaves); i++) { From owner-svn-src-all@freebsd.org Sat Feb 25 16:06: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 59202CEDB1C for ; Sat, 25 Feb 2017 16:06:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::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 2B7CC147 for ; Sat, 25 Feb 2017 16:06:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id y135so46527107itc.1 for ; Sat, 25 Feb 2017 08:06:55 -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=1EwLde0xJ0Za/98Uh0Gx/ImhnzMHpM3r4rEgXGS3huM=; b=uKnhaMx+tMNTve6NnIUYob7uhuLojBKYgLuxJhhIXCc2SVpygVp2NCOA74bu/XqAjM sy/HpGxO53EFlXTRCU52h5rzJN3NSrWR7wDMVIwx+h5ISj9lfWcKPi2zEsSE+AakMyya 3YIqXn42o98TM8/dRWRALcJHpbrBDYlnU1EqHX06wgH6F1d5Jx3Wxl5hXMLCRXkoTWRs IuhYIzo/pV98FFqi1Nt50PzTC43s8FyTwhlxmeoklnfBOjxhdrbDTWHa6lHyCH4jlKzz xz1vS9Ronz7YtPYCWWgIQX8Zg2mrB4JW0bypzZclBC9Zc5N7IG9+vBwsV33BPEZtjfEB jExQ== 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=1EwLde0xJ0Za/98Uh0Gx/ImhnzMHpM3r4rEgXGS3huM=; b=oiU6s2Qd1NsOGzM3rEr22+GYq8vVcnhJuiccNuH7/tsTiYarbmhTpjEvYriwCQdxJj MqccWcxjo01El5i1wyEoEoWnUN+8ZGVtibYmDebZiFWYjgmniYzSBPqu/1Sib+MDhuQB nenmOYXl9sMzUglZUhkLxjgOZymCn7MT/dqdg3w75/33WKEvPMOeklnBRabgd/pVdo+A PaS39NsuZltEHWxhxYy2fcY9us7BvvVBYKVxdFFdgxSjuSXbnTjxGt6+TDAjOC0nWVS2 VjsAnqejlmycbTTkluJRYG/+N+rGKg+rDcTzAusuIcR4j5+2R3m4LUiFjcxJ5bN2c3g+ yB5g== X-Gm-Message-State: AMke39kP+LEZh7IRMe+6UfDZX7zlB0ORLC0XGD4+gTQ0tkN7j3KCH3fBV2WFtmPEzINxua+pROJA4VBHfGxo0Q== X-Received: by 10.36.79.13 with SMTP id c13mr6998314itb.103.1488038815084; Sat, 25 Feb 2017 08:06:55 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.132 with HTTP; Sat, 25 Feb 2017 08:06:54 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702250611.v1P6Bamt080852@repo.freebsd.org> References: <201702250611.v1P6Bamt080852@repo.freebsd.org> From: Warner Losh Date: Sat, 25 Feb 2017 09:06:54 -0700 X-Google-Sender-Auth: O-8XZK7_QTC4qcQLSOGpxg3lihQ Message-ID: Subject: Re: svn commit: r314248 - head/sys/dev/pci To: Warner Losh 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, 25 Feb 2017 16:06:56 -0000 On Fri, Feb 24, 2017 at 11:11 PM, Warner Losh wrote: > Author: imp > Date: Sat Feb 25 06:11:36 2017 > New Revision: 314248 > URL: https://svnweb.freebsd.org/changeset/base/314248 > > Log: > Create pcib_request_feature. > > pcib_request_feature allows drivers to request the firmware (ACPI) > release certain features it may be using. ACPI normally manages things > like hot plug, advanced error reporting and other features until the > OS requests ACPI to relenquish control since it is taking over. > > Sponsored by: Netflix Forgot to add 'Differential Review: https://reviews.freebsd.org/D9715 > Modified: > head/sys/dev/pci/pci_if.m > head/sys/dev/pci/pci_pci.c > head/sys/dev/pci/pcib_if.m > > Modified: head/sys/dev/pci/pci_if.m > ============================================================================== > --- head/sys/dev/pci/pci_if.m Sat Feb 25 04:24:51 2017 (r314247) > +++ head/sys/dev/pci/pci_if.m Sat Feb 25 06:11:36 2017 (r314248) > @@ -60,6 +60,11 @@ HEADER { > PCI_ID_RID, > PCI_ID_MSI, > }; > + > + enum pci_feature { > + PCI_FEATURE_HP, /* Hot Plug feature */ > + PCI_FEATURE_AER, /* Advanced Error Reporting */ > + }; > } > > > > Modified: head/sys/dev/pci/pci_pci.c > ============================================================================== > --- head/sys/dev/pci/pci_pci.c Sat Feb 25 04:24:51 2017 (r314247) > +++ head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:36 2017 (r314248) > @@ -76,6 +76,8 @@ static void pcib_pcie_ab_timeout(void * > static void pcib_pcie_cc_timeout(void *arg); > static void pcib_pcie_dll_timeout(void *arg); > #endif > +static int pcib_request_feature(device_t pcib, device_t dev, > + enum pci_feature feature); > > static device_method_t pcib_methods[] = { > /* Device interface */ > @@ -119,6 +121,7 @@ static device_method_t pcib_methods[] = > DEVMETHOD(pcib_try_enable_ari, pcib_try_enable_ari), > DEVMETHOD(pcib_ari_enabled, pcib_ari_enabled), > DEVMETHOD(pcib_decode_rid, pcib_ari_decode_rid), > + DEVMETHOD(pcib_request_feature, pcib_request_feature), > > DEVMETHOD_END > }; > @@ -2829,3 +2832,24 @@ pcib_try_enable_ari(device_t pcib, devic > > return (0); > } > + > +/* > + * Pass the request to use this PCI feature up the tree. Either there's a > + * firmware like ACPI that's using this feature that will approve (or deny) the > + * request to take it over, or the platform has no such firmware, in which case > + * the request will be approved. If the request is approved, the OS is expected > + * to make use of the feature or render it harmless. > + */ > +static int > +pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) > +{ > + device_t bus; > + > + /* > + * Our parent is necessarily a pci bus. Its parent will either be > + * another pci bridge (which passes it up) or a host bridge that can > + * approve or reject the request. > + */ > + bus = device_get_parent(pcib); > + return (PCIB_REQUEST_FEATURE(device_get_parent(bus), dev, feature)); > +} > > Modified: head/sys/dev/pci/pcib_if.m > ============================================================================== > --- head/sys/dev/pci/pcib_if.m Sat Feb 25 04:24:51 2017 (r314247) > +++ head/sys/dev/pci/pcib_if.m Sat Feb 25 06:11:36 2017 (r314248) > @@ -212,3 +212,12 @@ METHOD void decode_rid { > int *slot; > int *func; > } DEFAULT pcib_decode_rid; > + > +# > +# Request control of PCI features from host firmware, if any. > +# > +METHOD int request_feature { > + device_t pcib; > + device_t dev; > + enum pci_feature feature; > +}; > From owner-svn-src-all@freebsd.org Sat Feb 25 16:08: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 984ADCEDBCE for ; Sat, 25 Feb 2017 16:08:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::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 61C532FF for ; Sat, 25 Feb 2017 16:08:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id h10so39902004ith.1 for ; Sat, 25 Feb 2017 08:08:28 -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=ev1MJCZSTXXMWoRFlLaLhzVBWIxl/l55wJILZbmSppQ=; b=cED1XRBhxgobbe4WlY0ZZ99nsAG0I+8MgzE+wLk5Vhb+huljuxTLBLcPfDiWiIRRAR 0a8nQBxs7UevRSUr5In2PVtB0GCyeKMB3sCv/9Qtx2bA0MVlLabSXgbCvS5YU+Zyt6G/ c0Fn1w+pY6q5jJx1lhNhIJ6fKzG3X0DXSYu2aSTEtonOCW1EDp61KHAf7UpzbK5tmKwM y3DjYNGLRq6UaIglwVEHkrUa6F5v+aQs8IrlKHBqFj13aX4XztISnEeIrr4c1CkMLZr/ 7LWCTavsxLtlVPSfaK3u12+ctcg5UGPjWpsYCWRCm5am1HZ8QZcsFQD2t0gqFcXREtt0 a34Q== 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=ev1MJCZSTXXMWoRFlLaLhzVBWIxl/l55wJILZbmSppQ=; b=nGRcKUPXYRz0VA3ZB+FxnE3Fz25MPwhJPs7MilthiU3BJsubBQw03SDjhleijTVKSr /UAg6Pf7VvDjJ1hp8vrvPtnhmggtQYHqnj3OlToX0ZpcBIEPGDIk5pjSY4CvGq4Gxt/l 3IYf4xBDx6ElyGMzllWUHjUPjU6cnKNlhd6f2ll99juZ4wYB6c2a0RCbdzNZD28PT6vD X14JHj7hPhN3dtg8MZ4vRCC/LrV7SN+jStHFOMk/pTT8lxNh5jS+bFT+qpsve9DQ57XT XDLMXfTbd31Ct0wgUfoE2fy9l6cediNWQOKVuWqC83U/dP7mu1TNxcdXQMgQYaNhgfpq Q6Bw== X-Gm-Message-State: AMke39lDra5gFFmXpFlJ+imhCDkYuQarU084AJeHmLWgJQyQ9CTgWDetILjnNHeYwDNmKTlCoaW9+ptTettwEw== X-Received: by 10.36.93.213 with SMTP id w204mr8110014ita.60.1488038907606; Sat, 25 Feb 2017 08:08:27 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.132 with HTTP; Sat, 25 Feb 2017 08:08:27 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702250611.v1P6BoOH080908@repo.freebsd.org> References: <201702250611.v1P6BoOH080908@repo.freebsd.org> From: Warner Losh Date: Sat, 25 Feb 2017 09:08:27 -0700 X-Google-Sender-Auth: 4U0ghvCrzpqXn7Suc2u2uTdUJZc Message-ID: Subject: Re: svn commit: r314249 - head/sys/dev/pci To: Warner Losh 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, 25 Feb 2017 16:08:28 -0000 On Fri, Feb 24, 2017 at 11:11 PM, Warner Losh wrote: > Author: imp > Date: Sat Feb 25 06:11:50 2017 > New Revision: 314249 > URL: https://svnweb.freebsd.org/changeset/base/314249 > > Log: > Rename pci_pcie_intr to pci_pcie_intr_hotplug. > > Sponsored by: Netflix Forgot to add Differential Review: https://reviews.freebsd.org/D9716 > Modified: > head/sys/dev/pci/pci_pci.c > > Modified: head/sys/dev/pci/pci_pci.c > ============================================================================== > --- head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:36 2017 (r314248) > +++ head/sys/dev/pci/pci_pci.c Sat Feb 25 06:11:50 2017 (r314249) > @@ -1148,7 +1148,7 @@ pcib_pcie_hotplug_update(struct pcib_sof > } > > static void > -pcib_pcie_intr(void *arg) > +pcib_pcie_intr_hotplug(void *arg) > { > struct pcib_softc *sc; > device_t dev; > @@ -1261,7 +1261,7 @@ pcib_pcie_cc_timeout(void *arg) > } else { > device_printf(dev, > "Missed HotPlug interrupt waiting for Command Completion\n"); > - pcib_pcie_intr(sc); > + pcib_pcie_intr_hotplug(sc); > } > } > > @@ -1284,7 +1284,7 @@ pcib_pcie_dll_timeout(void *arg) > } else if (sta != sc->pcie_link_sta) { > device_printf(dev, > "Missed HotPlug interrupt waiting for DLL Active\n"); > - pcib_pcie_intr(sc); > + pcib_pcie_intr_hotplug(sc); > } > } > > @@ -1330,7 +1330,7 @@ pcib_alloc_pcie_irq(struct pcib_softc *s > } > > error = bus_setup_intr(dev, sc->pcie_irq, INTR_TYPE_MISC, > - NULL, pcib_pcie_intr, sc, &sc->pcie_ihand); > + NULL, pcib_pcie_intr_hotplug, sc, &sc->pcie_ihand); > if (error) { > device_printf(dev, "Failed to setup PCI-e interrupt handler\n"); > bus_release_resource(dev, SYS_RES_IRQ, rid, sc->pcie_irq); > From owner-svn-src-all@freebsd.org Sat Feb 25 16:10: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 91BF9CEDC4F for ; Sat, 25 Feb 2017 16:10:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::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 59967685 for ; Sat, 25 Feb 2017 16:10:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id j18so10438303ioe.2 for ; Sat, 25 Feb 2017 08:10:07 -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=ScpDI9VwMdpmQIlw287YHlar+alPzsmV4AfwoIwx/Zw=; b=XBuoqoMHf3vGVZ0SwFkV4fb+rehrsfG9uts+5sJJBAEJOAIn6gxAuYK7ALsfvhCGjl dGVx0h6pVncw8H6WjUvmHp2tVwZraA43Jf8tzPfB0gFuc4DwlKrIt57jSY5ZjwnAXKp9 yDJ+1S5aFvnKdtyUHKS7kvj1Wr0Yf4VRrrLU3pSdePrFbnVxLcXlzHql4FaRQXqkFbSR kg4D34/VH7F3TPUBufG8bTddHnhl7YSg3EL0j8yanEeCShQ/uroWYUUdzjkWP+ViH31B rKOWzJ0TPboggdNf53dhq2TgQwx3AoeA4W2DZsLltGap1nVQpqw1I7+QPxUxTv133a6D Zqug== 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=ScpDI9VwMdpmQIlw287YHlar+alPzsmV4AfwoIwx/Zw=; b=PI5kGv30QtHvO1nvq9z6kjFQo+WcCMmV9vSI01gqIN2hAzhiTBD4eb2VqX6UyLdMA8 aH4SSeWrANB+NdtFYVMtRjn5OzOO6+dFbGyz8Hlte9HaBT06BFUNe8dh+Q0SDnzVTjTC SmEpEGosqEeg1xw6XVTXrZhVu+HXJ1bwsai7dyuuNtPk92KGLXPllOOGKsZUjoM9uw2C wmHLOjp7+vXYg24fKnv8FWWiA22+XBJQuvRtohiKXg/BnDH22APTKqfSit0OL2sucnox h8O5zJtXdBrV9n9zpKh4+7ujMwQmF3VmnOhjch74kyukMlXoA4JXJ5FR5HS0STH30fxM XbKw== X-Gm-Message-State: AMke39kCAa47eoJ4G6KxrNeBx7tn2uZXwFKq3gOyOhkYt3IZezywxWUGWMM+UC5bF2mQtF0ZiyqNH5vqpxpocw== X-Received: by 10.107.11.216 with SMTP id 85mr7611188iol.0.1488039006703; Sat, 25 Feb 2017 08:10:06 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.132 with HTTP; Sat, 25 Feb 2017 08:10:06 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <201702250611.v1P6BxIY083971@repo.freebsd.org> References: <201702250611.v1P6BxIY083971@repo.freebsd.org> From: Warner Losh Date: Sat, 25 Feb 2017 09:10:06 -0700 X-Google-Sender-Auth: _CtyT-uOg6WarPWMYmDnplyXGO4 Message-ID: Subject: Re: svn commit: r314250 - in head/sys: arm/mv arm/nvidia arm/versatile arm/xscale/i8134x arm/xscale/ixp425 dev/acpica dev/hyperv/pcib dev/ofw dev/pci dev/xen/pcifront mips/adm5120 mips/atheros mips/cav... To: Warner Losh 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, 25 Feb 2017 16:10:07 -0000 On Fri, Feb 24, 2017 at 11:11 PM, Warner Losh wrote: > Author: imp > Date: Sat Feb 25 06:11:59 2017 > New Revision: 314250 > URL: https://svnweb.freebsd.org/changeset/base/314250 > > Log: > Convert PCIe Hot Plug to using pci_request_feature > > Convert PCIe hot plug support over to asking the firmware, if any, for > permission to use the HotPlug hardware. Implement pci_request_feature > for ACPI. All other host pci connections to allowing all valid feature > requests. > > Sponsored by: Netflix Forgot to add Differential Review: https://reviews.freebsd.org/D9718 > Modified: > head/sys/arm/mv/mv_pci.c > head/sys/arm/nvidia/tegra_pcie.c > head/sys/arm/versatile/versatile_pci.c > head/sys/arm/xscale/i8134x/i81342_pci.c > head/sys/arm/xscale/ixp425/ixp425_pci.c > head/sys/dev/acpica/acpi_pcib_acpi.c > head/sys/dev/hyperv/pcib/vmbus_pcib.c > head/sys/dev/ofw/ofwpci.c > head/sys/dev/pci/pci_host_generic_fdt.c > head/sys/dev/pci/pci_pci.c > head/sys/dev/pci/pcib_private.h > head/sys/dev/xen/pcifront/pcifront.c > head/sys/mips/adm5120/admpci.c > head/sys/mips/atheros/ar71xx_pci.c > head/sys/mips/atheros/ar724x_pci.c > head/sys/mips/atheros/qca955x_pci.c > head/sys/mips/cavium/octopci.c > head/sys/mips/idt/idtpci.c > head/sys/mips/malta/gt_pci.c > head/sys/mips/mediatek/mtk_pcie.c > head/sys/mips/nlm/xlp_pci.c > head/sys/mips/rmi/xlr_pci.c > head/sys/mips/rt305x/rt305x_pci.c > head/sys/mips/sibyte/sb_zbpci.c > head/sys/powerpc/ofw/ofw_pcib_pci.c > head/sys/powerpc/powermac/cpcht.c > head/sys/sparc64/pci/apb.c > head/sys/sparc64/pci/fire.c > head/sys/sparc64/pci/ofw_pcib.c > head/sys/sparc64/pci/psycho.c > head/sys/sparc64/pci/schizo.c > head/sys/x86/pci/pci_bus.c >[truncated] From owner-svn-src-all@freebsd.org Sat Feb 25 16:39: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 DE40BCED49D; Sat, 25 Feb 2017 16:39:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8D25C50; Sat, 25 Feb 2017 16:39:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PGdLca032898; Sat, 25 Feb 2017 16:39:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PGdL9s032894; Sat, 25 Feb 2017 16:39:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702251639.v1PGdL9s032894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 25 Feb 2017 16:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314272 - 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, 25 Feb 2017 16:39:23 -0000 Author: avg Date: Sat Feb 25 16:39:21 2017 New Revision: 314272 URL: https://svnweb.freebsd.org/changeset/base/314272 Log: call vm_lowmem hook in uma_reclaim_worker A comment near kmem_reclaim() implies that we already did that. Calling the hook is useful, because some handlers, e.g. ARC, might be able to release significant amounts of KVA. Now that we have more than one place where vm_lowmem hook is called, use this change as an opportunity to introduce flags that describe a reason for calling the hook. No handler makes use of the flags yet. Reviewed by: markj, kib MFC after: 1 week Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D9764 Modified: head/sys/vm/uma_core.c head/sys/vm/vm_kern.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pageout.h Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sat Feb 25 15:55:46 2017 (r314271) +++ head/sys/vm/uma_core.c Sat Feb 25 16:39:21 2017 (r314272) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3199,6 +3200,9 @@ uma_reclaim_worker(void *arg __unused) "umarcl", 0); if (uma_reclaim_needed) { uma_reclaim_needed = 0; + sx_xunlock(&uma_drain_lock); + EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM); + sx_xlock(&uma_drain_lock); uma_reclaim_locked(true); } } Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Sat Feb 25 15:55:46 2017 (r314271) +++ head/sys/vm/vm_kern.c Sat Feb 25 16:39:21 2017 (r314272) @@ -552,11 +552,13 @@ debug_vm_lowmem(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &i, 0, req); if (error) return (error); - if (i) - EVENTHANDLER_INVOKE(vm_lowmem, 0); + if ((i & ~(VM_LOW_KMEM | VM_LOW_PAGES)) != 0) + return (EINVAL); + if (i != 0) + EVENTHANDLER_INVOKE(vm_lowmem, i); return (0); } SYSCTL_PROC(_debug, OID_AUTO, vm_lowmem, CTLTYPE_INT | CTLFLAG_RW, 0, 0, - debug_vm_lowmem, "I", "set to trigger vm_lowmem event"); + debug_vm_lowmem, "I", "set to trigger vm_lowmem event with given flags"); #endif Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Feb 25 15:55:46 2017 (r314271) +++ head/sys/vm/vm_pageout.c Sat Feb 25 16:39:21 2017 (r314272) @@ -1332,7 +1332,7 @@ vm_pageout_scan(struct vm_domain *vmd, i * Decrease registered cache sizes. */ SDT_PROBE0(vm, , , vm__lowmem_scan); - EVENTHANDLER_INVOKE(vm_lowmem, 0); + EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_PAGES); /* * We do this explicitly after the caches have been * drained above. Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Sat Feb 25 15:55:46 2017 (r314271) +++ head/sys/vm/vm_pageout.h Sat Feb 25 16:39:21 2017 (r314272) @@ -87,6 +87,12 @@ extern bool vm_pages_needed; #define VM_OOM_SWAPZ 2 /* + * vm_lowmem flags. + */ +#define VM_LOW_KMEM 0x01 +#define VM_LOW_PAGES 0x02 + +/* * Exported routines. */ From owner-svn-src-all@freebsd.org Sat Feb 25 16:45: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 B3B73CED681; Sat, 25 Feb 2017 16:45:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7484A9A; Sat, 25 Feb 2017 16:45:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PGjrn7036635; Sat, 25 Feb 2017 16:45:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PGjrNP036632; Sat, 25 Feb 2017 16:45:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702251645.v1PGjrNP036632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 25 Feb 2017 16:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314273 - 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: Sat, 25 Feb 2017 16:45:54 -0000 Author: avg Date: Sat Feb 25 16:45:53 2017 New Revision: 314273 URL: https://svnweb.freebsd.org/changeset/base/314273 Log: zfs: call spa_deadman on a taskqueue thread callout(9) prohibits callout functions from sleeping. illumos mutexes are emulated using sx(9). spa_deadman() calls vdev_deadman() and the latter acquires vq_lock. As a result we can get a more confusing panic instead of a specific panic or no panic: sleepq_add: td 0xfffff80019669960 to sleep on wchan 0xfffff8001cff4d88 with sleeping prohibited This change adds another level of indirection where the deadman callout schedules spa_deadman() to be executed on taskqueue_thread. While there, use callout_schedule(0 instead of callout_reset() in spa_sync(). Discussed with: mav MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9762 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Feb 25 16:39:21 2017 (r314272) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Feb 25 16:45:53 2017 (r314273) @@ -174,10 +174,6 @@ uint_t zio_taskq_basedc = 80; /* base boolean_t spa_create_process = B_TRUE; /* no process ==> no sysdc */ extern int zfs_sync_pass_deferred_free; -#ifndef illumos -extern void spa_deadman(void *arg); -#endif - /* * This (illegal) pool name is used when temporarily importing a spa_t in order * to get the vdev stats associated with the imported devices. @@ -6883,8 +6879,8 @@ spa_sync(spa_t *spa, uint64_t txg) spa->spa_sync_starttime + spa->spa_deadman_synctime)); #else /* !illumos */ #ifdef _KERNEL - callout_reset(&spa->spa_deadman_cycid, - hz * spa->spa_deadman_synctime / NANOSEC, spa_deadman, spa); + callout_schedule(&spa->spa_deadman_cycid, + hz * spa->spa_deadman_synctime / NANOSEC); #endif #endif /* illumos */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Sat Feb 25 16:39:21 2017 (r314272) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Sat Feb 25 16:45:53 2017 (r314273) @@ -597,8 +597,8 @@ spa_lookup(const char *name) * If the zfs_deadman_enabled flag is set then it inspects all vdev queues * looking for potentially hung I/Os. */ -void -spa_deadman(void *arg) +static void +spa_deadman(void *arg, int pending) { spa_t *spa = arg; @@ -627,6 +627,16 @@ spa_deadman(void *arg) #endif } +#if defined(__FreeBSD__) && defined(_KERNEL) +static void +spa_deadman_timeout(void *arg) +{ + spa_t *spa = arg; + + taskqueue_enqueue(taskqueue_thread, &spa->spa_deadman_task); +} +#endif + /* * Create an uninitialized spa_t with the given name. Requires * spa_namespace_lock. The caller must ensure that the spa_t doesn't already @@ -698,7 +708,23 @@ spa_add(const char *name, nvlist_t *conf mutex_exit(&cpu_lock); #else /* !illumos */ #ifdef _KERNEL + /* + * callout(9) does not provide a way to initialize a callout with + * a function and an argument, so we use callout_reset() to schedule + * the callout in the very distant future. Even if that event ever + * fires, it should be okayas we won't have any active zio-s. + * But normally spa_sync() will reschedule the callout with a proper + * timeout. + * callout(9) does not allow the callback function to sleep but + * vdev_deadman() needs to acquire vq_lock and illumos mutexes are + * emulated using sx(9). For this reason spa_deadman_timeout() + * will schedule spa_deadman() as task on a taskqueue that allows + * sleeping. + */ + TASK_INIT(&spa->spa_deadman_task, 0, spa_deadman, spa); callout_init(&spa->spa_deadman_cycid, 1); + callout_reset_sbt(&spa->spa_deadman_cycid, SBT_MAX, 0, + spa_deadman_timeout, spa, 0); #endif #endif refcount_create(&spa->spa_refcount); @@ -811,6 +837,7 @@ spa_remove(spa_t *spa) #else /* !illumos */ #ifdef _KERNEL callout_drain(&spa->spa_deadman_cycid); + taskqueue_drain(taskqueue_thread, &spa->spa_deadman_task); #endif #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Sat Feb 25 16:39:21 2017 (r314272) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Sat Feb 25 16:45:53 2017 (r314273) @@ -267,6 +267,7 @@ struct spa { #else /* !illumos */ #ifdef _KERNEL struct callout spa_deadman_cycid; /* callout id */ + struct task spa_deadman_task; #endif #endif /* illumos */ uint64_t spa_deadman_calls; /* number of deadman calls */ From owner-svn-src-all@freebsd.org Sat Feb 25 16:50: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 A8B79CED871; Sat, 25 Feb 2017 16:50:47 +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 966656B4; Sat, 25 Feb 2017 16:50:45 +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 SAA08245; Sat, 25 Feb 2017 18:50:44 +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 1chfYS-0002VA-5L; Sat, 25 Feb 2017 18:50:44 +0200 Subject: Re: svn commit: r314273 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201702251645.v1PGjrNP036632@repo.freebsd.org> From: Andriy Gapon Message-ID: <4ee5dd9d-a72e-f21b-ebac-b13dd8b45439@FreeBSD.org> Date: Sat, 25 Feb 2017 18:49:47 +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: <201702251645.v1PGjrNP036632@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 16:50:47 -0000 On 25/02/2017 18:45, Andriy Gapon wrote: > Author: avg > Date: Sat Feb 25 16:45:53 2017 > New Revision: 314273 > URL: https://svnweb.freebsd.org/changeset/base/314273 > > Log: > zfs: call spa_deadman on a taskqueue thread > > callout(9) prohibits callout functions from sleeping. > illumos mutexes are emulated using sx(9). > spa_deadman() calls vdev_deadman() and the latter acquires vq_lock. > > As a result we can get a more confusing panic instead of a specific > panic or no panic: > sleepq_add: td 0xfffff80019669960 to sleep on wchan 0xfffff8001cff4d88 with sleeping prohibited > > This change adds another level of indirection where the deadman > callout schedules spa_deadman() to be executed on taskqueue_thread. > > While there, use callout_schedule(0 instead of callout_reset() > in spa_sync(). > > Discussed with: mav > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D9762 Sponsored by: Panzura -- Andriy Gapon From owner-svn-src-all@freebsd.org Sat Feb 25 17:03: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 49442CEDD56; Sat, 25 Feb 2017 17:03:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02A04FFF; Sat, 25 Feb 2017 17:03:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PH3nxM044475; Sat, 25 Feb 2017 17:03:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PH3nQd044474; Sat, 25 Feb 2017 17:03:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702251703.v1PH3nQd044474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 25 Feb 2017 17:03:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314274 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 17:03:50 -0000 Author: avg Date: Sat Feb 25 17:03:48 2017 New Revision: 314274 URL: https://svnweb.freebsd.org/changeset/base/314274 Log: l2arc: try to fix write size calculation broken by Compressed ARC commit While there, make a change to not evict a first buffer outside the requested eviciton range. To do: - give more consistent names to the size variables - upstream to OpenZFS PR: 216178 Reported by: lev Tested by: lev MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Feb 25 16:45:53 2017 (r314273) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Feb 25 17:03:48 2017 (r314274) @@ -6897,7 +6897,7 @@ top: } if (!all && HDR_HAS_L2HDR(hdr) && - (hdr->b_l2hdr.b_daddr > taddr || + (hdr->b_l2hdr.b_daddr >= taddr || hdr->b_l2hdr.b_daddr < dev->l2ad_hand)) { /* * We've evicted to the target address, @@ -7031,7 +7031,22 @@ l2arc_write_buffers(spa_t *spa, l2arc_de continue; } - if ((write_asize + HDR_GET_LSIZE(hdr)) > target_sz) { + /* + * We rely on the L1 portion of the header below, so + * it's invalid for this header to have been evicted out + * of the ghost cache, prior to being written out. The + * ARC_FLAG_L2_WRITING bit ensures this won't happen. + */ + ASSERT(HDR_HAS_L1HDR(hdr)); + + ASSERT3U(HDR_GET_PSIZE(hdr), >, 0); + ASSERT3P(hdr->b_l1hdr.b_pdata, !=, NULL); + ASSERT3U(arc_hdr_size(hdr), >, 0); + uint64_t size = arc_hdr_size(hdr); + uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, + size); + + if ((write_psize + asize) > target_sz) { full = B_TRUE; mutex_exit(hash_lock); ARCSTAT_BUMP(arcstat_l2_write_full); @@ -7066,21 +7081,6 @@ l2arc_write_buffers(spa_t *spa, l2arc_de list_insert_head(&dev->l2ad_buflist, hdr); mutex_exit(&dev->l2ad_mtx); - /* - * We rely on the L1 portion of the header below, so - * it's invalid for this header to have been evicted out - * of the ghost cache, prior to being written out. The - * ARC_FLAG_L2_WRITING bit ensures this won't happen. - */ - ASSERT(HDR_HAS_L1HDR(hdr)); - - ASSERT3U(HDR_GET_PSIZE(hdr), >, 0); - ASSERT3P(hdr->b_l1hdr.b_pdata, !=, NULL); - ASSERT3U(arc_hdr_size(hdr), >, 0); - uint64_t size = arc_hdr_size(hdr); - uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, - size); - (void) refcount_add_many(&dev->l2ad_alloc, size, hdr); /* @@ -7142,7 +7142,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de return (0); } - ASSERT3U(write_asize, <=, target_sz); + ASSERT3U(write_psize, <=, target_sz); ARCSTAT_BUMP(arcstat_l2_writes_sent); ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); From owner-svn-src-all@freebsd.org Sat Feb 25 18:02: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 DDEB7CEDB1C; Sat, 25 Feb 2017 18:02:25 +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 64FD93CD; Sat, 25 Feb 2017 18:02:24 +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 548E7D6491C; Sun, 26 Feb 2017 04:43:13 +1100 (AEDT) Date: Sun, 26 Feb 2017 04:43:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314087 - head/sys/x86/x86 In-Reply-To: <20170225101543.GC2092@kib.kiev.ua> Message-ID: <20170226013936.S856@besplex.bde.org> References: <201702220707.v1M7764i020598@repo.freebsd.org> <20170223053954.J1044@besplex.bde.org> <20170224125335.GV2092@kib.kiev.ua> <20170225130549.C1026@besplex.bde.org> <20170225101543.GC2092@kib.kiev.ua> 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=Ca543Pjl c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=I_TMtod9YpQ6doVccOMA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=j5ywNiUMiySMPHyG:21 a=MdKjPmp1KRRXr8Wd:21 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: Sat, 25 Feb 2017 18:02:26 -0000 On Sat, 25 Feb 2017, Konstantin Belousov wrote: > On Sat, Feb 25, 2017 at 02:17:23PM +1100, Bruce Evans wrote: >> On Fri, 24 Feb 2017, Konstantin Belousov wrote: >> >>> On Thu, Feb 23, 2017 at 06:33:43AM +1100, Bruce Evans wrote: >>>> On Wed, 22 Feb 2017, Konstantin Belousov wrote: >>>> >>>>> Log: >>>>> More fixes for regression in r313898 on i386. >>>>> Use long long constants where needed. >>>> >>>> The long long abomination is never needed, and is always a style bug. >>> I never saw any explanation behind this claim. Esp. the first part >>> of it, WRT 'never needed'. >> >> I hope I wrote enough about this in log messages when I cleaned up the >> long longs 20 years ago :-). >> >> long long was a hack to work around intmax_t not existing and long being >> unexpandable in practice because it was used in ABIs. It should have gone >> away when intmax_t was standardized. Unfortunately, long long was >> standardised too. > It does not make a sense even more. long long is native compiler type, It is only native since C99 broke C under pressure from misimplementatations with long long. In unbroken C, long is the longest type, and lots of code depended on this (the main correct main was casting integers to long for printing, and the main incorrect use was using long for almost everything while assuming that int is 16 or 32 bits and not using typedefs much). Correct implementations used an extended integer type (extended integer types were also nonstandard before C99, and making them longer than long also breaks C). 4.4BSD used quad_t and required it to be not actually a quad int, but precisely 64 bits, and used long excessively (for example, pid_t was long on all arches). This is essentially the long long mistake, with long long spelled better as quad_t, combined with similar mistakes from a previous generation where int was 16 bits. Long was used excessively as a simple way to get integers with at least 32 bits, although BSD never supported systems with int smaller than 32 bits AFAIK, and 4.4BSD certainly didn't support such systems. But BSD broke the type of at least pid_t by sprinkling longs. In FreeBSD-1 from Net/2, pid_t was short. BSD wanted to expand PID_MAX from 30000, and did this wrong by expanding pid_t from short to long, just in time for this to be wrong in practice since 64-bit systems were becoming available so that long could easily be longer than int. (Net)BSD for alpha wasn't burdened with ABIs requiring long to be 32 bits, so it made long 64 bits and didn't need long long (except even plain long should be actually long, so it should be twice as wide as a register and thus 128 bits on alpha). NetBSD cleaned up the sprinkling of longs at much the same time that 4.4BSD-Lite1 sprinkled them, to avoid getting silly sizes like 64 bits for pid_t and related compatibilityroblems. I think NetBSD actually never imported 4.4BSD- Lite1, but later merged Lite1 or Lite2 and kept its typedefs instead of clobbering them with the long sprinkling. FreeBSD was handicapped by the USL lawsuit. It had to import Lite1. It only fixed the long sprinkling much later by merging Lite2. I think Lite2 got got the better types from NetBSD. This is summarised in the FreeBSD commit log using essentially "Splat!" :-(. > while anything_t is a typename to provide MI fixed type. long long was > obviosvly choosen to extend types without requiring new keyword. Abusing a standard keyword doesn't do much except ensure a syntax error if code with the extended type is compiler with a compiler that doesn't support the extension. BSD's quad_t is in the application namespace. __quad_t would be better. The errors are now being repeated with extensions to 128-bit integers. At least they are being spelled better as __int128_t instead of long long long or full doubling (long long long long = 128 bits). C doesn't alllow __int128_t even as an extended type unless intmax_t is at least 128 bits. Compatibility, ABI and bloat problems prevent enlarging intmax_t from 64 bits to 128 bits on LP64 systems just like they prevented the misimplementations enlarging long from 32 bits on LP32 and L32P64 systems. >> It is "never needed" since anything that can be done with it can be done >> better using intmax_t or intN_t or int_fastN_T or int_leastN_t. Except, >> there is no suffix for explicit intmax_t constants, so you would have to >> write such constants using INTMAX_C() or better a cast to intmax_t if >> the constant is not needed in a cpp expression. > If you replace long long with int there, the same logical structure of > sentences will hold. Does it mean that 'int' is abomination since we > have int32_t which allows everything to be done better ? No, since correct uses of int are possible. int32_t allows almost everything to be done worse. It should only be used in software and hardware ABIs (like pid_t and network software packet layouts in software, and memory-mapped device registers and network hardware packet layouts in hardware). Using it asks precisely 32 bits 2's complement with no padding bits at any cost. Using it is unportable, but in practice the implementation has to emulate it if it is not a natural type for the CPU. There aren't many CPUs like that any more. Ones with native 1's complement and no native support for 2's complement used to be more common. The original alpha didn't have 8-bit loads and stores; I don't know if it had 32-bit ones. Emulation just takes time for software, but for memory-mapped device registers it takes hardware support to avoid side effects from wider loads and stores. Hardware tends to have this automatically -- even on i386, it is common to map 8-bit registers to 32-bit words in PCI space, and if 8-bit accesses are impossible then the hardware needs to be more careful with address selection to avoid using the 24 top bits in each word. Typedefs are hard to use, but unavoidable when an API specifies them. Then a constant ABI may also make the typedefs inefficient in space and time. To avoid the space/time efficiencies, int_least32_t and int_fast32_t should be used instead of int32_t. These are also hard to use, and almost never used in practice. It is easier to hard-code int32_t and assume that this is efficient in space and time. But it is more correct to use plain int (except for ABIs). In plain C and in POSIX before ~2007, plain int is essentially a convenient spelling of int_fast16_t. POSIX changed this in ~2007 to require 32-bit ints, so int is now a convenient spelling of int_fast32_t, just like it has always been in BSD. I just noticed some complications the non 2's complement cases. C and POSIX still support 1's complement and this weakens the fast and least types. E.g., INT32_MIN is -2**32, but this is not representable using 32 bits except in the 2's complement case, and C doesn't require int_fast32_t or int_least32_t to be able to represent it. This makes the signed fast and least types difficult to use correctly. Code like the following is invalid: struct sc { int_least32_t least_reg_image; ... }; int_fast32_t fast_reg_image; int32_t reg_image; ... reg_image = bus_space_read_4(bst, bsh, off); /* not quite correct */ fast_reg_image = reg_image; /* copy it for time efficiency */ fast_reg_image = adjust(fast_reg_image); sc.least_reg_image = fast_reg_image; /* pack it for space effic. */ because the space and time conversions, and the adjustment using the fast type might clobber the INT32_MIN bit except in the 2's complement case. Of course, code accessing device registers would use unsigned types and automatically avoid the problem. It was already an error to convert the uint32_t returned by bus_space_read_4() to int32_t, although this conversion would not clobber the INT32_MIN since int32_t is 2's complement. POSIX code can now simply use int or u_int if it just needs 32 bits. Similarly for portable code that just needs 16 bits. int is the only type which is easy to use, so it should be used if possible. It is supposed to be as space/time efficient as possible, subject to the constraint that it is 16 or 32 bits. The fast and least types only give one of these at a time and are harder to use since their rank is opaque so you have to know too much about them to know if other types promote to them of if they promote to int or long, etc. Even unsigned and long are not so easy to use. Unsigned must sometimes be used to get 2's complement behaviour or extra range, but using it gives sign extension problems. long is too long for general use, and the promotion rules to it doesn't occur automatically like it does for int. long long is even less usable than long. >>>> I don't like using explicit long constants either. Here the number of bits >>>> in the register is fixed by the hardware at 64. The number of bits in a >>>> long on amd64 and a long on i386 is only fixed by ABI because the ABI is >>>> broken for historical reasons. >>> I really cannot make any sense of this statement. >> >> To know that the ULL suffix is correct for 64-bit types, you have to now >> that long longs are 64 bits on all arches supported by the code. Then >> to use this suffix, you have to hard-code this knowledge. Then to read >> the code, the reader has to translate back to 64 bits. The translations >> were easier 1 arch at a time. > And why it is bad ? Same is true for int and long, which are often used > in MD code to provide specific word size. In fact, there is not much for > a programmer to know: we and any other UNIX supports either ILP32 or LP64 > for the given architecture. I used basic types intentionally in i386 headers -- always use [u_]char, [u_short and [u_]int or perhaps a vm type like vm_offset_t and never [u_]intN_t. This doesn't work so well for longs or long longs. I supported i386 with correctly sized longs -- twice as long as a register. This gave I32L64P32. Merging the x86 headers churned many of the shorter type declarations for [u_]intN_t, but had to be more careful with longs because these differ between amd64 and i386, and more careful with long longs because although these don't differ in size, long long is unnatural on amd64 so tends to cause warnings. In general, it is unclear if a fixed-width type is used because it is related to the word size, an API or an ABI. u_int might mean precisely 32 bits. u_long might mean the word size; it is easier to write, but is broken for i386 with correctly-sized longs, so I removed most uses of it for the word size. unsigned long might mean precisely 64 bits, but is harder to write than uint64_t except in literal suffixes, and has a logical type mismatch on amd64, so is rarely use. >> Casting to uint64_t is clearer, but doesn't >> work in cpp expressions. In cpp expressions, use UINT64_C(). Almost no >> one knows about it uses this. There are 5 examples of using it in /sys >> (3 in arm64 pte.h, 1 in powerpc pte.h, and 1 in mips xlr_machdep.c, >> where the use is unnecessary but interesting: it is ~UINT64_C(0). We >> used to have squillions of magic ~0's for the rman max limit. This was >> spelled ~0U, ~0UL and perhaps even plain ~0. Plain ~0 worked best except >> on unsupported 1's complement machines, since it normally gets sign extended >> to as many bits as necessary. Now this is spelled RM_MAX_END, which is >> implemented non-magically using a cast: (~(rman_res_t)0). Grepping for >> ~0[uU] in dev/* shows only 1 obvious unconverted place. > This clearly demonstrates why ULL/UL notation is superior to UINT64_C() or > any other obfuscation. RM_MAX_END is an unobfuscation. Unconditional use of ULL just asks for future unportabilities and compiler warnings now. On amd64, long long is never needed since it is no longer than long, and compilers could reasonably complain about uses when they can't see that its use has no effect or when they are generating portability warnings. >> The MTRR_* macros are in x86/specialreg.h, and are spelled without ULL >> suffixes. I prefer the latter, but seem to rememeber bugs elsewhere >> caused by using expressions like ~FOO where FOO happens to be small. >> Actually the problems are mostly when FOO happens to be between >> INT_MAX+1U and UINT_MAX. When FOO is small and has no suffix, e.g., >> if it is 0, then its type is int and ~FOO has type int and sign-extends >> to 64 bits if necessary. But if FOO is say 0x80000000, it has type u_int >> so ~FOO doesn't sign-extend. (Decimal constants without a suffix never >> have an unsigned type and the hex constant here lets me write this number >> and automatically give it an unsigned type. Normally this type is best.) >> >> Explicit type suffixes mainly hide these problems. If FOO is 0x80000000ULL, >> then it has the correct type for ~FOO to work in expressions where everything >> has type unsigned long long, but in other expressions a cast might still >> be needed. > Yes, yet another (and most useful) reason to use ULL and ignore a FUD about it. amd64 doesn't even have such expressions. The other terms will be mostly uint64_t = plain u_long. Mixing with ULL promotes everything to unsigned long long. Everything works because the arch is LP64 and also bogusly LL64, but this is harder to understand than code using the 64-bit types throughout, that is, using ~(uint64_t)FOO. Bruce From owner-svn-src-all@freebsd.org Sat Feb 25 18:14: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 5F221CEC125; Sat, 25 Feb 2017 18:14:34 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 125C4F56; Sat, 25 Feb 2017 18:14:34 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PIEXeR071710; Sat, 25 Feb 2017 18:14:33 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PIEX1R071707; Sat, 25 Feb 2017 18:14:33 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201702251814.v1PIEX1R071707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 25 Feb 2017 18:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314275 - in head/sys/boot/i386: boot2 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: Sat, 25 Feb 2017 18:14:34 -0000 Author: oshogbo Date: Sat Feb 25 18:14:32 2017 New Revision: 314275 URL: https://svnweb.freebsd.org/changeset/base/314275 Log: Remove unused macro from common/drv.c. When we was compering it to code from boot2 it also looks like this code is buggy and boot2 was never updated to use this code. USE_XREAD flag is unused in boot2, and common/drv.c was never build with that flag. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D9780 Modified: head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/common/drv.c Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Sat Feb 25 17:03:48 2017 (r314274) +++ head/sys/boot/i386/boot2/Makefile Sat Feb 25 18:14:32 2017 (r314275) @@ -25,7 +25,6 @@ BOOT2_UFS?= UFS1_AND_UFS2 CFLAGS= -fomit-frame-pointer \ -mrtd \ -mregparm=3 \ - -DUSE_XREAD \ -D${BOOT2_UFS} \ -DFLAGS=${BOOT_BOOT1_FLAGS} \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ Modified: head/sys/boot/i386/common/drv.c ============================================================================== --- head/sys/boot/i386/common/drv.c Sat Feb 25 17:03:48 2017 (r314274) +++ head/sys/boot/i386/common/drv.c Sat Feb 25 18:14:32 2017 (r314275) @@ -25,9 +25,6 @@ __FBSDID("$FreeBSD$"); #include "util.h" #include "drv.h" #include "edd.h" -#ifdef USE_XREAD -#include "xreadorg.h" -#endif static struct edd_params params; @@ -50,9 +47,7 @@ drvsize(struct dsk *dskp) return (params.sectors); } -#ifndef USE_XREAD static struct edd_packet packet; -#endif int drvread(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk) @@ -61,7 +56,6 @@ drvread(struct dsk *dskp, void *buf, dad if (!OPT_CHECK(RBX_QUIET)) printf("%c\b", c = c << 8 | c >> 24); -#ifndef USE_XREAD packet.len = sizeof(struct edd_packet); packet.count = nblk; packet.off = VTOPOFF(buf); @@ -73,15 +67,6 @@ drvread(struct dsk *dskp, void *buf, dad v86.edx = dskp->drive; v86.ds = VTOPSEG(&packet); v86.esi = VTOPOFF(&packet); -#else /* USE_XREAD */ - v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; - v86.addr = XREADORG; /* call to xread in boot1 */ - v86.es = VTOPSEG(buf); - v86.eax = lba; - v86.ebx = VTOPOFF(buf); - v86.ecx = lba >> 32; - v86.edx = nblk << 8 | dskp->drive; -#endif /* USE_XREAD */ v86int(); if (V86_CY(v86.efl)) { printf("%s: error %u lba %u\n", From owner-svn-src-all@freebsd.org Sat Feb 25 19:16: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 5D8C7CED27D; Sat, 25 Feb 2017 19:16:21 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3831EA41; Sat, 25 Feb 2017 19:16:21 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PJGKJm095449; Sat, 25 Feb 2017 19:16:20 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PJGK9p095448; Sat, 25 Feb 2017 19:16:20 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201702251916.v1PJGK9p095448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sat, 25 Feb 2017 19:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314276 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 19:16:21 -0000 Author: jpaetzel Date: Sat Feb 25 19:16:20 2017 New Revision: 314276 URL: https://svnweb.freebsd.org/changeset/base/314276 Log: 7570 tunable to allow zvol SCSI unmap to return on commit of txn to ZIL illumos/illumos-gate@1c9272b861cd640a8342f4407da026ed98615517 https://github.com/illumos/illumos-gate/commit/1c9272b861cd640a8342f4407da026ed98615517 https://www.illumos.org/issues/7570 Based on the discovery that every unmap waits for the commit of the txn to the ZIL, introducing a very high latency to unmap commands, this behavior was made into a tunable zvol_unmap_sync_enabled and set to false. The net impact of this change is that by default SCSI unmap commands will result in space being freed within the zvol (today they are ignored and returned with good status). However, unlike the code today, instead of 18+ms per unmap, they take about 30us. With the testing done on NTFS against a Win2k12 target, the new behavior should work seamlessly. Files on the zvol that have already been set with the zfree application will continue to write 0's when deleted, and any new files created since zvol creation will send unmap commands when deleted. This behavior exists today, but with this change the unmap commands will be processed and result in reclaim of space. Author: Stephen Blinick Reviewed by: Dan Kimmel Reviewed by: Matt Ahrens Reviewed by: Steve Gonczi Reviewed by: Pavel Zakharov Reviewed by: Saso Kiselkov Reviewed by: Yuri Pankov Approved by: Robert Mustacchi Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Sat Feb 25 18:14:32 2017 (r314275) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Sat Feb 25 19:16:20 2017 (r314276) @@ -24,7 +24,7 @@ * Portions Copyright 2010 Robert Milkowski * * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -148,6 +148,12 @@ int zvol_maxphys = DMU_MAX_ACCESS/2; */ boolean_t zvol_unmap_enabled = B_TRUE; +/* + * If true, unmaps requested as synchronous are executed synchronously, + * otherwise all unmaps are asynchronous. + */ +boolean_t zvol_unmap_sync_enabled = B_FALSE; + extern int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); static int zvol_remove_zv(zvol_state_t *); @@ -1811,26 +1817,21 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t zfs_range_unlock(rl); - if (error == 0) { - /* - * If the write-cache is disabled or 'sync' property - * is set to 'always' then treat this as a synchronous - * operation (i.e. commit to zil). - */ - if (!(zv->zv_flags & ZVOL_WCE) || - (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)) - zil_commit(zv->zv_zilog, ZVOL_OBJ); - - /* - * If the caller really wants synchronous writes, and - * can't wait for them, don't return until the write - * is done. - */ - if (df.df_flags & DF_WAIT_SYNC) { - txg_wait_synced( - dmu_objset_pool(zv->zv_objset), 0); - } + /* + * If the write-cache is disabled, 'sync' property + * is set to 'always', or if the caller is asking for + * a synchronous free, commit this operation to the zil. + * This will sync any previous uncommitted writes to the + * zvol object. + * Can be overridden by the zvol_unmap_sync_enabled tunable. + */ + if ((error == 0) && zvol_unmap_sync_enabled && + (!(zv->zv_flags & ZVOL_WCE) || + (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS) || + (df.df_flags & DF_WAIT_SYNC))) { + zil_commit(zv->zv_zilog, ZVOL_OBJ); } + return (error); } From owner-svn-src-all@freebsd.org Sat Feb 25 19:28: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 8D9FBCED6FB; Sat, 25 Feb 2017 19:28: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 61F0CFA5; Sat, 25 Feb 2017 19:28:50 +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 v1PJSnJJ099422; Sat, 25 Feb 2017 19:28:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PJSnoI099419; Sat, 25 Feb 2017 19:28:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702251928.v1PJSnoI099419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 25 Feb 2017 19:28: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: r314277 - in stable/10/usr.sbin/pw: . 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, 25 Feb 2017 19:28:50 -0000 Author: bapt Date: Sat Feb 25 19:28:49 2017 New Revision: 314277 URL: https://svnweb.freebsd.org/changeset/base/314277 Log: MFC r312644, r312650 r312644: Readd a feature lost in pw(8) refactoring pw usermod foo -m It used to be able to (re)create the home directory if it didn't exists r312650: Really restore the old behaviour for pw usermod -m It again reinstall missing skel files without overwriting changed one Add a regression test about it PR: 216224 Reported by: ae Modified: stable/10/usr.sbin/pw/psdate.c stable/10/usr.sbin/pw/pw_user.c stable/10/usr.sbin/pw/tests/pw_usermod.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/psdate.c ============================================================================== --- stable/10/usr.sbin/pw/psdate.c Sat Feb 25 19:16:20 2017 (r314276) +++ stable/10/usr.sbin/pw/psdate.c Sat Feb 25 19:28:49 2017 (r314277) @@ -41,12 +41,8 @@ static const char rcsid[] = static int numerics(char const * str) { - int rc = isdigit((unsigned char)*str); - if (rc) - while (isdigit((unsigned char)*str) || *str == 'x') - ++str; - return rc && !*str; + return (str[strspn(str, "0123456789x")] == '\0'); } static int Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Sat Feb 25 19:16:20 2017 (r314276) +++ stable/10/usr.sbin/pw/pw_user.c Sat Feb 25 19:28:49 2017 (r314277) @@ -1495,7 +1495,7 @@ pw_user_mod(int argc, char **argv, char intmax_t id = -1; int ch, fd = -1; size_t i, j; - bool quiet, createhome, pretty, dryrun, nis, edited, docreatehome; + bool quiet, createhome, pretty, dryrun, nis, edited; bool precrypted; mode_t homemode = 0; time_t expire_days, password_days, now; @@ -1505,7 +1505,7 @@ pw_user_mod(int argc, char **argv, char passwd = NULL; class = nispasswd = NULL; quiet = createhome = pretty = dryrun = nis = precrypted = false; - edited = docreatehome = false; + edited = false; if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') @@ -1706,8 +1706,6 @@ pw_user_mod(int argc, char **argv, char if (!createhome) warnx("WARNING: home `%s' does not exist", pwd->pw_dir); - else - docreatehome = true; } else if (!S_ISDIR(st.st_mode)) { warnx("WARNING: home `%s' is not a directory", pwd->pw_dir); @@ -1799,7 +1797,7 @@ pw_user_mod(int argc, char **argv, char * that this also `works' for editing users if -m is used, but * existing files will *not* be overwritten. */ - if (PWALTDIR() != PWF_ALT && docreatehome && pwd->pw_dir && + if (PWALTDIR() != PWF_ALT && createhome && pwd->pw_dir && *pwd->pw_dir == '/' && pwd->pw_dir[1]) { if (!skel) skel = cnf->dotdir; Modified: stable/10/usr.sbin/pw/tests/pw_usermod.sh ============================================================================== --- stable/10/usr.sbin/pw/tests/pw_usermod.sh Sat Feb 25 19:16:20 2017 (r314276) +++ stable/10/usr.sbin/pw/tests/pw_usermod.sh Sat Feb 25 19:28:49 2017 (r314277) @@ -253,6 +253,26 @@ user_mod_w_yes_body() { $(atf_get_srcdir)/crypt $passhash "foo" } +atf_test_case user_mod_m +user_mod_m_body() { + populate_root_etc_skel + + mkdir -p ${HOME}/home + mkdir -p ${HOME}/skel + echo "entry" > ${HOME}/skel/.file + atf_check -s exit:0 ${RPW} useradd foo + ! test -d ${HOME}/home/foo || atf_fail "Directory should not have been created" + atf_check -s exit:0 ${RPW} usermod foo -m -k /skel + test -d ${HOME}/home/foo || atf_fail "Directory should have been created" + test -f ${HOME}/home/foo/.file || atf_fail "Skell files not added" + echo "entry" > ${HOME}/skel/.file2 + atf_check -s exit:0 ${RPW} usermod foo -m -k /skel + test -f ${HOME}/home/foo/.file2 || atf_fail "Skell files not added" + echo > ${HOME}/home/foo/.file2 + atf_check -s exit:0 ${RPW} usermod foo -m -k /skel + atf_check -s exit:0 -o inline:"\n" cat ${HOME}/home/foo/.file2 +} + atf_init_test_cases() { atf_add_test_case user_mod @@ -275,4 +295,5 @@ atf_init_test_cases() { atf_add_test_case user_mod_w_none atf_add_test_case user_mod_w_random atf_add_test_case user_mod_w_yes + atf_add_test_case user_mod_m } From owner-svn-src-all@freebsd.org Sat Feb 25 19:31: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 BDD9BCED81B; Sat, 25 Feb 2017 19:31:16 +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 8B27F243; Sat, 25 Feb 2017 19:31:16 +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 v1PJVFYC099612; Sat, 25 Feb 2017 19:31:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PJVEYl099603; Sat, 25 Feb 2017 19:31:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702251931.v1PJVEYl099603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 25 Feb 2017 19:31: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: r314278 - in stable/11/contrib/libucl: . include lua src 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, 25 Feb 2017 19:31:16 -0000 Author: bapt Date: Sat Feb 25 19:31:14 2017 New Revision: 314278 URL: https://svnweb.freebsd.org/changeset/base/314278 Log: MFC r313953: Import libucl 20170219 Modified: stable/11/contrib/libucl/ChangeLog.md stable/11/contrib/libucl/README.md stable/11/contrib/libucl/configure.ac stable/11/contrib/libucl/include/ucl.h stable/11/contrib/libucl/lua/lua_ucl.c stable/11/contrib/libucl/src/ucl_emitter_utils.c stable/11/contrib/libucl/src/ucl_internal.h stable/11/contrib/libucl/src/ucl_parser.c stable/11/contrib/libucl/src/ucl_util.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libucl/ChangeLog.md ============================================================================== --- stable/11/contrib/libucl/ChangeLog.md Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/ChangeLog.md Sat Feb 25 19:31:14 2017 (r314278) @@ -35,7 +35,7 @@ ### Libucl 0.7.3 -- Fixed a bug with macroes that come after an empty object +- Fixed a bug with macros that come after an empty object - Fixed a bug in include processing when an incorrect variable has been destroyed (use-after-free) ### Libucl 0.8.0 Modified: stable/11/contrib/libucl/README.md ============================================================================== --- stable/11/contrib/libucl/README.md Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/README.md Sat Feb 25 19:31:14 2017 (r314278) @@ -1,6 +1,8 @@ # LIBUCL -[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138)[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl) +[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) +[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* @@ -217,8 +219,8 @@ Multiline comments may be nested: UCL supports external macros both multiline and single line ones: ```nginx -.macro "sometext"; -.macro { +.macro_name "sometext"; +.macro_name { Some long text .... }; @@ -229,12 +231,12 @@ arguments themselves are the UCL object options: ```nginx -.macro(param=value) "something"; -.macro(param={key=value}) "something"; -.macro(.include "params.conf") "something"; -.macro(#this is multiline macro +.macro_name(param=value) "something"; +.macro_name(param={key=value}) "something"; +.macro_name(.include "params.conf") "something"; +.macro_name(#this is multiline macro param = [value1, value2]) "something"; -.macro(key="()") "something"; +.macro_name(key="()") "something"; ``` UCL also provide a convenient `include` macro to load content from another files Modified: stable/11/contrib/libucl/configure.ac ============================================================================== --- stable/11/contrib/libucl/configure.ac Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/configure.ac Sat Feb 25 19:31:14 2017 (r314278) @@ -39,6 +39,7 @@ AC_CHECK_HEADERS_ONCE([stdarg.h]) AC_CHECK_HEADERS_ONCE([stdbool.h]) AC_CHECK_HEADERS_ONCE([stdint.h]) AC_CHECK_HEADERS_ONCE([string.h]) +AC_CHECK_HEADERS_ONCE([strings.h]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS_ONCE([ctype.h]) AC_CHECK_HEADERS_ONCE([errno.h]) Modified: stable/11/contrib/libucl/include/ucl.h ============================================================================== --- stable/11/contrib/libucl/include/ucl.h Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/include/ucl.h Sat Feb 25 19:31:14 2017 (r314278) @@ -154,7 +154,8 @@ typedef enum ucl_parser_flags { UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */ UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */ UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */ - UCL_PARSER_DISABLE_MACRO = (1 << 5) /** Treat macros as comments */ + UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */ + UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */ } ucl_parser_flags_t; /** @@ -205,7 +206,8 @@ enum ucl_duplicate_strategy { enum ucl_parse_type { UCL_PARSE_UCL = 0, /**< Default ucl format */ UCL_PARSE_MSGPACK, /**< Message pack input format */ - UCL_PARSE_CSEXP /**< Canonical S-expressions */ + UCL_PARSE_CSEXP, /**< Canonical S-expressions */ + UCL_PARSE_AUTO /**< Try to detect parse type */ }; /** @@ -227,7 +229,7 @@ typedef struct ucl_object_s { const char *key; /**< Key of an object */ struct ucl_object_s *next; /**< Array handle */ struct ucl_object_s *prev; /**< Array handle */ - uint32_t keylen; /**< Lenght of a key */ + uint32_t keylen; /**< Length of a key */ uint32_t len; /**< Size of an object */ uint32_t ref; /**< Reference count */ uint16_t flags; /**< Object flags */ @@ -831,10 +833,29 @@ UCL_EXTERN ucl_object_iter_t ucl_object_ * Get the next object from the `obj`. This fucntion iterates over arrays, objects * and implicit arrays * @param iter safe iterator + * @param expand_values expand explicit arrays and objects * @return the next object in sequence */ UCL_EXTERN const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t iter, bool expand_values); +/** + * Iteration type enumerator + */ +enum ucl_iterate_type { + UCL_ITERATE_EXPLICIT = 1 << 0, /**< Iterate just explicit arrays and objects */ + UCL_ITERATE_IMPLICIT = 1 << 1, /**< Iterate just implicit arrays */ + UCL_ITERATE_BOTH = (1 << 0) | (1 << 1), /**< Iterate both explicit and implicit arrays*/ +}; + +/** + * Get the next object from the `obj`. This fucntion iterates over arrays, objects + * and implicit arrays if needed + * @param iter safe iterator + * @param + * @return the next object in sequence + */ +UCL_EXTERN const ucl_object_t* ucl_object_iterate_full (ucl_object_iter_t iter, + enum ucl_iterate_type type); /** * Free memory associated with the safe iterator @@ -1016,6 +1037,7 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1025,6 +1047,7 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1069,6 +1092,21 @@ UCL_EXTERN bool ucl_parser_add_fd_priori int fd, unsigned priority); /** + * Load and add data from a file descriptor + * @param parser parser structure + * @param filename the name of file + * @param err if *err is NULL it is set to parser error + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Provide a UCL_ARRAY of paths to search for include files. The object is * copied so caller must unref the object. * @param parser parser structure Modified: stable/11/contrib/libucl/lua/lua_ucl.c ============================================================================== --- stable/11/contrib/libucl/lua/lua_ucl.c Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/lua/lua_ucl.c Sat Feb 25 19:31:14 2017 (r314278) @@ -29,7 +29,6 @@ #include "ucl_internal.h" #include "lua_ucl.h" #include -#include /*** * @module ucl @@ -187,6 +186,8 @@ ucl_object_lua_push_array (lua_State *L, lua_rawseti (L, -2, i); i ++; } + + ucl_object_iterate_free (it); } else { /* Optimize allocation by preallocation of table */ @@ -482,7 +483,7 @@ static int lua_ucl_parser_init (lua_State *L) { struct ucl_parser *parser, **pparser; - int flags = 0; + int flags = UCL_PARSER_NO_FILEVARS; if (lua_gettop (L) >= 1) { flags = lua_tonumber (L, 1); @@ -524,6 +525,27 @@ lua_ucl_push_opaque (lua_State *L, ucl_o lua_setmetatable (L, -2); } +static inline enum ucl_parse_type +lua_ucl_str_to_parse_type (const char *str) +{ + enum ucl_parse_type type = UCL_PARSE_UCL; + + if (str != NULL) { + if (strcasecmp (str, "msgpack") == 0) { + type = UCL_PARSE_MSGPACK; + } + else if (strcasecmp (str, "sexp") == 0 || + strcasecmp (str, "csexp") == 0) { + type = UCL_PARSE_CSEXP; + } + else if (strcasecmp (str, "auto") == 0) { + type = UCL_PARSE_AUTO; + } + } + + return type; +} + /*** * @method parser:parse_file(name) * Parse UCL object from file. @@ -579,13 +601,19 @@ lua_ucl_parser_parse_string (lua_State * struct ucl_parser *parser; const char *string; size_t llen; + enum ucl_parse_type type = UCL_PARSE_UCL; int ret = 2; parser = lua_ucl_parser_get (L, 1); string = luaL_checklstring (L, 2, &llen); + if (lua_type (L, 3) == LUA_TSTRING) { + type = lua_ucl_str_to_parse_type (lua_tostring (L, 3)); + } + if (parser != NULL && string != NULL) { - if (ucl_parser_add_chunk (parser, (const unsigned char *)string, llen)) { + if (ucl_parser_add_chunk_full (parser, (const unsigned char *)string, + llen, 0, UCL_DUPLICATE_APPEND, type)) { lua_pushboolean (L, true); ret = 1; } @@ -761,6 +789,28 @@ lua_ucl_object_unwrap (lua_State *L) return 1; } +static inline enum ucl_emitter +lua_ucl_str_to_emit_type (const char *strtype) +{ + enum ucl_emitter format = UCL_EMIT_JSON_COMPACT; + + if (strcasecmp (strtype, "json") == 0) { + format = UCL_EMIT_JSON; + } + else if (strcasecmp (strtype, "json-compact") == 0) { + format = UCL_EMIT_JSON_COMPACT; + } + else if (strcasecmp (strtype, "yaml") == 0) { + format = UCL_EMIT_YAML; + } + else if (strcasecmp (strtype, "config") == 0 || + strcasecmp (strtype, "ucl") == 0) { + format = UCL_EMIT_CONFIG; + } + + return format; +} + /*** * @method object:tostring(type) * Unwraps opaque ucl object to string (json by default). Optionally you can @@ -787,19 +837,7 @@ lua_ucl_object_tostring (lua_State *L) if (lua_type (L, 2) == LUA_TSTRING) { const char *strtype = lua_tostring (L, 2); - if (strcasecmp (strtype, "json") == 0) { - format = UCL_EMIT_JSON; - } - else if (strcasecmp (strtype, "json-compact") == 0) { - format = UCL_EMIT_JSON_COMPACT; - } - else if (strcasecmp (strtype, "yaml") == 0) { - format = UCL_EMIT_YAML; - } - else if (strcasecmp (strtype, "config") == 0 || - strcasecmp (strtype, "ucl") == 0) { - format = UCL_EMIT_CONFIG; - } + format = lua_ucl_str_to_emit_type (strtype); } } @@ -1088,6 +1126,9 @@ lua_ucl_to_format (lua_State *L) strcasecmp (strtype, "ucl") == 0) { format = UCL_EMIT_CONFIG; } + else if (strcasecmp (strtype, "msgpack") == 0) { + format = UCL_EMIT_MSGPACK; + } } } Modified: stable/11/contrib/libucl/src/ucl_emitter_utils.c ============================================================================== --- stable/11/contrib/libucl/src/ucl_emitter_utils.c Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/src/ucl_emitter_utils.c Sat Feb 25 19:31:14 2017 (r314278) @@ -102,7 +102,7 @@ ucl_elt_string_write_json (const char *s func->ucl_emitter_append_character ('"', 1, func->ud); while (size) { - if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE)) { + if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE|UCL_CHARACTER_DENIED)) { if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } @@ -128,6 +128,10 @@ ucl_elt_string_write_json (const char *s case '"': func->ucl_emitter_append_len ("\\\"", 2, func->ud); break; + default: + /* Emit unicode unknown character */ + func->ucl_emitter_append_len ("\\uFFFD", 5, func->ud); + break; } len = 0; c = ++p; @@ -138,9 +142,11 @@ ucl_elt_string_write_json (const char *s } size --; } + if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } + func->ucl_emitter_append_character ('"', 1, func->ud); } Modified: stable/11/contrib/libucl/src/ucl_internal.h ============================================================================== --- stable/11/contrib/libucl/src/ucl_internal.h Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/src/ucl_internal.h Sat Feb 25 19:31:14 2017 (r314278) @@ -87,6 +87,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "utlist.h" #include "utstring.h" @@ -127,19 +130,19 @@ enum ucl_parser_state { }; enum ucl_character_type { - UCL_CHARACTER_DENIED = 0, - UCL_CHARACTER_KEY = 1, - UCL_CHARACTER_KEY_START = 1 << 1, - UCL_CHARACTER_WHITESPACE = 1 << 2, - UCL_CHARACTER_WHITESPACE_UNSAFE = 1 << 3, - UCL_CHARACTER_VALUE_END = 1 << 4, - UCL_CHARACTER_VALUE_STR = 1 << 5, - UCL_CHARACTER_VALUE_DIGIT = 1 << 6, - UCL_CHARACTER_VALUE_DIGIT_START = 1 << 7, - UCL_CHARACTER_ESCAPE = 1 << 8, - UCL_CHARACTER_KEY_SEP = 1 << 9, - UCL_CHARACTER_JSON_UNSAFE = 1 << 10, - UCL_CHARACTER_UCL_UNSAFE = 1 << 11 + UCL_CHARACTER_DENIED = (1 << 0), + UCL_CHARACTER_KEY = (1 << 1), + UCL_CHARACTER_KEY_START = (1 << 2), + UCL_CHARACTER_WHITESPACE = (1 << 3), + UCL_CHARACTER_WHITESPACE_UNSAFE = (1 << 4), + UCL_CHARACTER_VALUE_END = (1 << 5), + UCL_CHARACTER_VALUE_STR = (1 << 6), + UCL_CHARACTER_VALUE_DIGIT = (1 << 7), + UCL_CHARACTER_VALUE_DIGIT_START = (1 << 8), + UCL_CHARACTER_ESCAPE = (1 << 9), + UCL_CHARACTER_KEY_SEP = (1 << 10), + UCL_CHARACTER_JSON_UNSAFE = (1 << 11), + UCL_CHARACTER_UCL_UNSAFE = (1 << 12) }; struct ucl_macro { @@ -568,4 +571,6 @@ bool ucl_parser_process_object_element ( */ bool ucl_parse_msgpack (struct ucl_parser *parser); +bool ucl_parse_csexp (struct ucl_parser *parser); + #endif /* UCL_INTERNAL_H_ */ Modified: stable/11/contrib/libucl/src/ucl_parser.c ============================================================================== --- stable/11/contrib/libucl/src/ucl_parser.c Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/src/ucl_parser.c Sat Feb 25 19:31:14 2017 (r314278) @@ -2469,8 +2469,10 @@ ucl_parser_new (int flags) parser->comments = ucl_object_typed_new (UCL_OBJECT); } - /* Initial assumption about filevars */ - ucl_parser_set_filevars (parser, NULL, false); + if (!(flags & UCL_PARSER_NO_FILEVARS)) { + /* Initial assumption about filevars */ + ucl_parser_set_filevars (parser, NULL, false); + } return parser; } @@ -2617,6 +2619,19 @@ ucl_parser_add_chunk_full (struct ucl_pa return false; } + if (parse_type == UCL_PARSE_AUTO && len > 0) { + /* We need to detect parse type by the first symbol */ + if ((*data & 0x80) == 0x80 && (*data >= 0xdc && *data <= 0xdf)) { + parse_type = UCL_PARSE_MSGPACK; + } + else if (*data == '(') { + parse_type = UCL_PARSE_CSEXP; + } + else { + parse_type = UCL_PARSE_UCL; + } + } + chunk->begin = data; chunk->remain = len; chunk->pos = chunk->begin; @@ -2643,6 +2658,8 @@ ucl_parser_add_chunk_full (struct ucl_pa return ucl_state_machine (parser); case UCL_PARSE_MSGPACK: return ucl_parse_msgpack (parser); + case UCL_PARSE_CSEXP: + return ucl_parse_csexp (parser); } } else { Modified: stable/11/contrib/libucl/src/ucl_util.c ============================================================================== --- stable/11/contrib/libucl/src/ucl_util.c Sat Feb 25 19:28:49 2017 (r314277) +++ stable/11/contrib/libucl/src/ucl_util.c Sat Feb 25 19:31:14 2017 (r314278) @@ -26,11 +26,17 @@ #include "ucl_internal.h" #include "ucl_chartable.h" #include "kvec.h" +#include #include #include /* for snprintf */ #ifndef _WIN32 #include +#include +#else +#ifndef NBBY +#define NBBY 8 +#endif #endif #ifdef HAVE_LIBGEN_H @@ -81,11 +87,6 @@ typedef kvec_t(ucl_object_t *) ucl_array #define MAP_FAILED ((void *) -1) #endif -#ifdef _WIN32 -#include -#define NBBY CHAR_BIT -#endif - static void *ucl_mmap(char *addr, size_t length, int prot, int access, int fd, off_t offset) { void *map = NULL; @@ -1854,9 +1855,11 @@ ucl_parser_add_file (struct ucl_parser * UCL_PARSE_UCL); } + bool -ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, - unsigned priority) +ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type) { unsigned char *buf; size_t len; @@ -1882,7 +1885,8 @@ ucl_parser_add_fd_priority (struct ucl_p } parser->cur_file = NULL; len = st.st_size; - ret = ucl_parser_add_chunk_priority (parser, buf, len, priority); + ret = ucl_parser_add_chunk_full (parser, buf, len, priority, strat, + parse_type); if (len > 0) { ucl_munmap (buf, len); @@ -1892,6 +1896,18 @@ ucl_parser_add_fd_priority (struct ucl_p } bool +ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, + unsigned priority) +{ + if (parser == NULL) { + return false; + } + + return ucl_parser_add_fd_full(parser, fd, parser->default_priority, + UCL_DUPLICATE_APPEND, UCL_PARSE_UCL); +} + +bool ucl_parser_add_fd (struct ucl_parser *parser, int fd) { if (parser == NULL) { @@ -2488,6 +2504,10 @@ ucl_object_iterate_reset (ucl_object_ite UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + rit->impl_it = obj; rit->expl_it = NULL; @@ -2497,6 +2517,13 @@ ucl_object_iterate_reset (ucl_object_ite const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t it, bool expand_values) { + return ucl_object_iterate_full (it, expand_values ? UCL_ITERATE_BOTH : + UCL_ITERATE_IMPLICIT); +} + +const ucl_object_t* +ucl_object_iterate_full (ucl_object_iter_t it, enum ucl_iterate_type type) +{ struct ucl_object_safe_iter *rit = UCL_SAFE_ITER (it); const ucl_object_t *ret = NULL; @@ -2509,21 +2536,23 @@ ucl_object_iterate_safe (ucl_object_iter if (rit->impl_it->type == UCL_OBJECT || rit->impl_it->type == UCL_ARRAY) { ret = ucl_object_iterate (rit->impl_it, &rit->expl_it, true); - if (ret == NULL) { + if (ret == NULL && (type & UCL_ITERATE_IMPLICIT)) { /* Need to switch to another implicit object in chain */ rit->impl_it = rit->impl_it->next; rit->expl_it = NULL; - return ucl_object_iterate_safe (it, expand_values); + + return ucl_object_iterate_safe (it, type); } } else { /* Just iterate over the implicit array */ ret = rit->impl_it; rit->impl_it = rit->impl_it->next; - if (expand_values) { + + if (type & UCL_ITERATE_EXPLICIT) { /* We flatten objects if need to expand values */ if (ret->type == UCL_OBJECT || ret->type == UCL_ARRAY) { - return ucl_object_iterate_safe (it, expand_values); + return ucl_object_iterate_safe (it, type); } } } @@ -2538,6 +2567,10 @@ ucl_object_iterate_free (ucl_object_iter UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + UCL_FREE (sizeof (*rit), it); } From owner-svn-src-all@freebsd.org Sat Feb 25 19:40: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 14AC4CEDCC8; Sat, 25 Feb 2017 19:40:00 +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 CD55EBA2; Sat, 25 Feb 2017 19:39:59 +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 v1PJdwAw003565; Sat, 25 Feb 2017 19:39:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PJdw5b003564; Sat, 25 Feb 2017 19:39:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201702251939.v1PJdw5b003564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 25 Feb 2017 19:39:58 +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: r314279 - 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: Sat, 25 Feb 2017 19:40:00 -0000 Author: bapt Date: Sat Feb 25 19:39:58 2017 New Revision: 314279 URL: https://svnweb.freebsd.org/changeset/base/314279 Log: MFC r313961: Update pci_vendors to 2017.02.15 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Sat Feb 25 19:31:14 2017 (r314278) +++ stable/11/share/misc/pci_vendors Sat Feb 25 19:39:58 2017 (r314279) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.01.08 -# Date: 2017-01-08 03:15:02 +# Version: 2017.02.15 +# Date: 2017-02-15 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -2254,6 +2254,7 @@ 1043 2016 Trinidad PRO [Radeon R9 370 OEM] 1458 2016 Trinidad PRO [Radeon R9 370 OEM] 1462 2016 Trinidad PRO [Radeon R9 370 OEM] + 1462 3050 R9 270 Gaming OC 148c 2016 Trinidad PRO [Radeon R9 370 OEM] 1682 2015 Trinidad PRO [Radeon R7 370] 174b 2016 Trinidad PRO [Radeon R9 370 OEM] @@ -5520,6 +5521,10 @@ 8056 Rockwell HCF 56K modem 808a Memory Stick Controller 81ce SxS Pro memory card +# 2nd ID + 905c SxS Pro memory card +# 2nd ID + 907f SxS Pro+ memory card 908f Aeolia ACPI 909e Aeolia Ethernet Controller (Marvell Yukon 2 Family) 909f Aeolia SATA AHCI Controller @@ -5528,6 +5533,7 @@ 90a2 Aeolia DMA Controller 90a3 Aeolia Memory (DDR3/SPM) 90a4 Aeolia USB 3.0 xHCI Host Controller + 90bc SxS Pro+ memory card 104e Oak Technology, Inc 0017 OTI-64017 0107 OTI-107 [Spitfire] @@ -6093,6 +6099,20 @@ 1077 0246 8300 Series Dual Port 10GbE Converged Network Adapter (TCP/IP Networking) 8031 8300 Series 10GbE Converged Network Adapter (FCoE) 8032 8300 Series 10GbE Converged Network Adapter (iSCSI) + 8070 FastLinQ QL41000 Series 10/25/40/50GbE Controller + 1077 0011 FastLinQ QL41212H 25GbE Adapter + 1077 0012 FastLinQ QL41112H 10GbE Adapter + 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) + 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter + 1077 000e FastLinQ QL41162H 10GbE FCoE Adapter + 8084 FastLinQ QL41000 Series 10/25/40/50GbE Controller (iSCSI) + 1077 000d FastLinQ QL41262H 25GbE iSCSI Adapter + 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter + 8090 FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF) + 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter (SR-IOV VF) + 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) + 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) + 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) @@ -10584,6 +10604,7 @@ 1347 GM108M [GeForce 940M] 1348 GM108M [GeForce 945M / 945A] 1349 GM108M [GeForce 930M] + 134b GM108M [GeForce 940MX] 134d GM108M [GeForce 940MX] 134e GM108M [GeForce 930MX] 134f GM108M [GeForce 920MX] @@ -10616,6 +10637,8 @@ 13b1 GM107GLM [Quadro M1000M] 13b2 GM107GLM [Quadro M600M] 13b3 GM107GLM [Quadro K2200M] + 13b4 GM107GLM [Quadro M620 Mobile] + 13b6 GM107GLM [Quadro M1200 Mobile] 13b9 GM107GL [NVS 810] 13ba GM107GL [Quadro K2200] 13bb GM107GL [Quadro K620] @@ -10648,6 +10671,7 @@ 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] 1431 GM206GL [Tesla M4] + 1436 GM206GLM [Quadro M2200 Mobile] 15f0 GP100GL 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] @@ -10677,28 +10701,31 @@ 1b82 GP104 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] - 1ba0 GP104M [GeForce GTX 1080] - 1ba1 GP104M [GeForce GTX 1070] + 1ba0 GP104M [GeForce GTX 1080 Mobile] + 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL - 1be0 GP104M [GeForce GTX 1080] - 1be1 GP104M [GeForce GTX 1070] + 1bb6 GP104GLM [Quadro P5000 Mobile] + 1bb7 GP104GLM [Quadro P4000 Mobile] + 1bb8 GP104GLM [Quadro P3000 Mobile] + 1be0 GP104M [GeForce GTX 1080 Mobile] + 1be1 GP104M [GeForce GTX 1070 Mobile] 1c00 GP106 1c01 GP106 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] - 1c20 GP106M [GeForce GTX 1060] + 1c20 GP106M [GeForce GTX 1060 Mobile] 1c30 GP106GL 1c35 GP106 - 1c60 GP106M [GeForce GTX 1060] + 1c60 GP106M [GeForce GTX 1060 Mobile] 1c70 GP106GL 1c80 GP107 1c81 GP107 [GeForce GTX 1050] 1c82 GP107 [GeForce GTX 1050 Ti] - 1c8c GP107M [GeForce GTX 1050 Ti] - 1c8d GP107M [GeForce GTX 1050] + 1c8c GP107M [GeForce GTX 1050 Ti Mobile] + 1c8d GP107M [GeForce GTX 1050 Mobile] 1c8e GP107M 1ca7 GP107GL 1ca8 GP107GL @@ -13224,6 +13251,7 @@ 0001 FireStream 155 0003 FireStream 50 119f Bull HN Information Systems + 1081 BXI Host Channel Adapter 11a0 Convex Computer Corporation 11a1 Hamamatsu Photonics K.K. 11a2 Sierra Research and Technology @@ -16021,6 +16049,9 @@ 509b T540-509B Unified Wire Ethernet Controller 509c T520-509C Unified Wire Ethernet Controller 509d T540-509D Unified Wire Ethernet Controller + 509e T520-509E Unified Wire Ethernet Controller + 509f T540-509F Unified Wire Ethernet Controller + 50a0 T540-50A0 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16049,7 +16080,7 @@ 5481 T540-5081 Unified Wire Ethernet Controller 5482 T504-5082 Unified Wire Ethernet Controller 5483 T540-5083 Unified Wire Ethernet Controller - 5484 T580-5084 Unified Wire Ethernet Controller + 5484 T540-5084 Unified Wire Ethernet Controller 5485 T580-5085 Unified Wire Ethernet Controller 5486 T580-5086 Unified Wire Ethernet Controller 5487 T580-5087 Unified Wire Ethernet Controller @@ -16069,6 +16100,9 @@ 549b T540-509B Unified Wire Ethernet Controller 549c T520-509C Unified Wire Ethernet Controller 549d T540-509D Unified Wire Ethernet Controller + 549e T520-509E Unified Wire Ethernet Controller + 549f T540-509F Unified Wire Ethernet Controller + 54a0 T540-50A0 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16097,7 +16131,7 @@ 5581 T540-5081 Unified Wire Storage Controller 5582 T504-5082 Unified Wire Storage Controller 5583 T540-5083 Unified Wire Storage Controller - 5584 T580-5084 Unified Wire Storage Controller + 5584 T540-5084 Unified Wire Storage Controller 5585 T580-5085 Unified Wire Storage Controller 5586 T580-5086 Unified Wire Storage Controller 5587 T580-5087 Unified Wire Storage Controller @@ -16117,6 +16151,9 @@ 559b T540-509B Unified Wire Storage Controller 559c T520-509C Unified Wire Storage Controller 559d T540-509D Unified Wire Storage Controller + 559e T520-509E Unified Wire Storage Controller + 559f T540-509F Unified Wire Storage Controller + 55a0 T540-50A0 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16145,7 +16182,7 @@ 5681 T540-5081 Unified Wire Storage Controller 5682 T504-5082 Unified Wire Storage Controller 5683 T540-5083 Unified Wire Storage Controller - 5684 T580-5084 Unified Wire Storage Controller + 5684 T540-5084 Unified Wire Storage Controller 5685 T580-5085 Unified Wire Storage Controller 5686 T580-5086 Unified Wire Storage Controller 5687 T580-5087 Unified Wire Storage Controller @@ -16165,6 +16202,9 @@ 569b T540-509B Unified Wire Storage Controller 569c T520-509C Unified Wire Storage Controller 569d T540-509D Unified Wire Storage Controller + 569e T520-509E Unified Wire Storage Controller + 569f T540-509F Unified Wire Storage Controller + 56a0 T540-50A0 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16232,7 +16272,7 @@ 5881 T540-5081 Unified Wire Ethernet Controller [VF] 5882 T504-5082 Unified Wire Ethernet Controller [VF] 5883 T540-5083 Unified Wire Ethernet Controller [VF] - 5884 T580-5084 Unified Wire Ethernet Controller [VF] + 5884 T540-5084 Unified Wire Ethernet Controller [VF] 5885 T580-5085 Unified Wire Ethernet Controller [VF] 5886 T580-5086 Unified Wire Ethernet Controller [VF] 5887 T580-5087 Unified Wire Ethernet Controller [VF] @@ -16252,6 +16292,9 @@ 589b T540-509B Unified Wire Ethernet Controller [VF] 589c T520-509C Unified Wire Ethernet Controller [VF] 589d T540-509D Unified Wire Ethernet Controller [VF] + 589e T520-509E Unified Wire Ethernet Controller [VF] + 589f T540-509F Unified Wire Ethernet Controller [VF] + 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16265,6 +16308,8 @@ 6011 T6225-LL-CR Unified Wire Ethernet Controller 6014 T61100-OCP-SO Unified Wire Ethernet Controller 6015 T6201-BT Unified Wire Ethernet Controller + 6080 T6225-6080 Unified Wire Ethernet Controller + 6081 T62100-6081 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16278,6 +16323,8 @@ 6411 T6225-LL-CR Unified Wire Ethernet Controller 6414 T61100-OCP-SO Unified Wire Ethernet Controller 6415 T6201-BT Unified Wire Ethernet Controller + 6480 T6225-6080 Unified Wire Ethernet Controller + 6481 T62100-6081 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16291,6 +16338,8 @@ 6511 T6225-LL-CR Unified Wire Storage Controller 6514 T61100-OCP-SO Unified Wire Storage Controller 6515 T6201-BT Unified Wire Storage Controller + 6580 T6225-6080 Unified Wire Storage Controller + 6581 T62100-6081 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16304,6 +16353,8 @@ 6611 T6225-LL-CR Unified Wire Storage Controller 6614 T61100-OCP-SO Unified Wire Storage Controller 6615 T6201-BT Unified Wire Storage Controller + 6680 T6225-6080 Unified Wire Storage Controller + 6681 T62100-6081 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16317,6 +16368,8 @@ 6811 T6225-LL-CR Unified Wire Ethernet Controller [VF] 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF] 6815 T6201-BT Unified Wire Ethernet Controller [VF] + 6880 T6225-6080 Unified Wire Ethernet Controller [VF] + 6881 T62100-6081 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -16516,6 +16569,7 @@ 14a2 Millennium Engineering Inc 14a3 Maverick Networks 14a4 Lite-On Technology Corporation + 22f1 M8Pe Series NVMe SSD # Wrong vendor ID used 4318 Broadcom BCM4318 [AirForce One 54g] 802.11g WLAN Controller 14a5 XIONICS Document Technologies Inc @@ -17957,6 +18011,7 @@ 1599 Delta Electronics Inc 159a General Instrument 159b Faraday Technology Corp + 4321 StorLink SL3516 (Gemini) Host Bridge 159c Stratus Computer Systems 159d Ningbo Harrison Electronics Co Ltd 159e A-Max Technology Co Ltd @@ -18013,6 +18068,7 @@ 024f MT53100 [Spectrum-2, Flash recovery mode] 0262 MT27710 [ConnectX-4 Lx Programmable] EN 0263 MT27710 [ConnectX-4 Lx Programmable Virtual Function] EN + 0281 NPS-600 Flash Recovery 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 103c 1777 InfiniBand FDR/EN 10/40Gb Dual Port 544FLR-QSFP Adapter (Rev Cx) @@ -18872,10 +18928,18 @@ 9700 Octeon III CN73XX Network Processor 9702 CN23XX [LiquidIO II] Intelligent Adapter 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE Intelligent adapter - 177d 0004 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter +# This was changed during the production phase to 10GbE adapter. + 177d 0004 CN2350 [LiquidIO II] 2-port 10GbE Intelligent adapter + 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE Intelligent adapter + 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE Intelligent adapter + 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter 9703 CN23XX [LiquidIO II] NVMe Controller 9712 CN23XX [LiquidIO II] SRIOV Virtual Function 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0004 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE SRIOV Virtual Function + 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE SRIOV Virtual Function 9713 CN23XX [LiquidIO II] NVMe SRIOV Virtual Function 9800 Octeon Fusion CNF75XX Processor a001 ThunderX MRML(Master RML Bridge to RSL devices) @@ -19445,8 +19509,8 @@ 0155 NT100E3-1-PTP Network Adapter 1x100Gb 0165 NT80E3-2-PTP Network Adapter 2x40Gb 0175 NT20E3-2-PTP Network Adapter 2x10Gb - 0185 NT40A01-4x1 Network Adapter 4x1Gb - 01a5 NT200A01 Network Adapter 2x100Gb + 0185 NT40A01 Network Adapter + 01a5 NT200A01 Network Adapter 18f6 NextIO 1000 [Nexsis] Switch Virtual P2P PCIe Bridge 1001 [Texsis] Switch Virtual P2P PCIe Bridge @@ -19602,14 +19666,15 @@ 1924 800e SFN7x42Q-R2 Flareon Ultra 7000 Series 10/40G Adapter 1924 800f SFN7xx4F-R1 Flareon Ultra 7000 Series 10G Adapter 0a03 SFC9220 10/40G Ethernet Controller - 1924 8011 SFN 8022-R1 Solarflare Flareon 8000 Series 10G Adapter + 1924 8011 SFN8022-R1 Flareon 8000 Series 10G Adapter 1924 8012 SFN8522-R1 Flareon Ultra 8000 Series 10G Adapter - 1924 8013 SFN8042-R1 Solarflare Flareon 8000 Series 10/40G Adapter + 1924 8013 SFN8042-R1 Flareon 8000 Series 10/40G Adapter 1924 8014 SFN8542-R1 Flareon Ultra 8000 Series 10/40G Adapter 1924 8016 SFN8022-R2 Flareon 8000 Series 10G Adapter 1924 8017 SFN8522-R2 Flareon Ultra 8000 Series 10G Adapter 1924 8018 SFN8042-R2 Flareon 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 Flareon Ultra 8000 Series 10/40G Adapter + 1924 801a SFN8722-R1 Flareon Ultra 8000 Series OCP 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -19902,6 +19967,7 @@ 5808 DDRdrive X8 dd52 DDRdrive X1-30 19e5 Huawei Technologies Co., Ltd. + 1711 Hi1710 [iBMC Intelligent Management system chip w/VGA support] 19e7 NET (Network Equipment Technologies) 1001 STIX DSP Card 1002 STIX - 1 Port T1/E1 Card @@ -20101,7 +20167,7 @@ 1b03 Magnum Semiconductor, Inc, 6100 DXT/DXTPro Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder 7000 D7 Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder -1b08 MSC Vertriebs GmbH +1b08 MSC Technologies GmbH 1b0a Pegatron 1b13 Jaton Corp 1b1a K&F Computing Research Co. @@ -20318,6 +20384,8 @@ 0003 Ultrastar SN100 Series NVMe SSD 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter +1c5f Beijing Memblaze Technology Co. Ltd. + 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) 1c63 Science and Research Centre of Computer Technology (JSC "NICEVT") # http://www.radiotec.ru/catalog.php?cat=jr8&art=14109 @@ -20437,16 +20505,18 @@ 4022 TN9310 10GbE SFP+ Ethernet Adapter 1043 8709 XG-C100F 10GbE SFP+ Ethernet Adapter 1186 4d00 DXE-810S 10GbE SFP+ Ethernet Adapter - 1432 8103 EN-8102PF 10GbE SPF+ Ethernet Adapter + 1432 8103 10 Gigabit Ethernet SFP+ PCI Express Adapter 1fc9 3015 Ethernet Adapter 4024 TN9210 10GBase-T Ethernet Adapter 4025 TN9510 10GBase-T/NBASE-T Ethernet Adapter 105a 7203 SANLink3 NBase-T1 1186 2900 DXE-810T 10GBase-T Ethernet Adapter - 1432 8102 EN-8102P 10GbE Ethernet Adapter + 1432 8102 10 Gigabit Ethernet PCI Express Adapter 1fc9 3015 Ethernet Adapter 4026 TN9610 10GbE SFP+ Ethernet Adapter 4027 TN9710P 10GBase-T/NBASE-T Ethernet Adapter + 1432 8104 10 Gigabit Ethernet PCI Express Adapter + 1fc9 3015 Ethernet Adapter 4527 TN9710Q 5GBase-T/NBASE-T Ethernet Adapter 1fcc StreamLabs f416 MS416 @@ -21748,6 +21818,7 @@ 0a26 Haswell-ULT Integrated Graphics Controller 0a2a Haswell-ULT Integrated Graphics Controller 0a2e Haswell-ULT Integrated Graphics Controller + 0a53 DC P3520 SSD 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -22105,7 +22176,7 @@ 8086 1019 PRO/1000 CT Desktop Connection 8086 301f D865PERL mainboard 8086 3025 D875PBZ motherboard - 8086 302c Intel 82865G Mainboard (D865GBF) + 8086 302c D865GBF Mainboard 8086 3427 S875WP1-E mainboard 101a 82547EI Gigabit Ethernet Controller (Mobile) 8086 101a PRO/1000 CT Mobile Connection @@ -22303,7 +22374,7 @@ 1096 80003ES2LAN Gigabit Ethernet Controller (Copper) 15d9 1096 Motherboard 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 1097 631xESB/632xESB DPT LAN Controller (Fiber) 1098 80003ES2LAN Gigabit Ethernet Controller (Serdes) 1099 82546GB Gigabit Ethernet Controller (Copper) @@ -22457,6 +22528,7 @@ 103c 17d2 Ethernet 10Gb 2-port 560M Adapter 103c 18d0 Ethernet 10Gb 2-port 560FLB Adapter 1059 0111 T4007 10GbE interface + 1059 0130 T4009 10GbE interface 8086 000c Ethernet X520 10GbE Dual Port KX4-KR Mezz 10f9 82599 10 Gigabit Dual Port Network Connection 10fb 82599ES 10-Gigabit SFI/SFP+ Network Connection @@ -22862,6 +22934,7 @@ 1059 0110 T4005 1GbE interface 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface + 1059 0130 T4009 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23187,7 +23260,7 @@ 1a31 82845 845 [Brookdale] Chipset AGP Bridge 1a38 5000 Series Chipset DMA Engine 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 1a48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE SR Server Adapter 8086 a11f PRO/10GbE SR Server Adapter @@ -24772,13 +24845,13 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2680 631xESB/632xESB/3100 Chipset SATA IDE Controller 2681 631xESB/632xESB SATA AHCI Controller 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2682 631xESB/632xESB SATA RAID Controller 103c 31fe Adaptec Serial ATA HostRAID 2683 631xESB/632xESB SATA RAID Controller @@ -24788,31 +24861,31 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2689 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 1028 01bb PowerEdge 1955 onboard USB 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268a 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268b 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 1028 01f0 PowerEdge R900 onboard USB 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268c 631xESB/632xESB/3100 Chipset EHCI USB2 Controller 1028 01bb PowerEdge 1955 onboard USB 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2690 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 103c 31fe ProLiant DL140 G3 15d9 9680 X7DBN Motherboard @@ -24827,7 +24900,7 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 269e 631xESB/632xESB IDE Controller 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard @@ -24844,7 +24917,7 @@ 103c 2a3b Pavilion A1512X 1462 7418 Wind PC MS-7418 8086 544e DeskTop Board D945GTP - 8086 d605 Intel Desktop Board D945GCCR + 8086 d605 Desktop Board D945GCCR 2774 82955X Memory Controller Hub 2775 82955X PCI Express Root Port 2776 82945G/GZ Integrated Graphics Controller @@ -26205,8 +26278,7 @@ 8086 4010 Dual Band Wireless AC 3165 # Stone Peak 1x1 8086 4210 Dual Band Wireless AC 3165 -# Stone Peak 1x1 - 3166 Intel Dual Band Wireless-AC 3165 Plus Bluetooth + 3166 Dual Band Wireless-AC 3165 Plus Bluetooth 3200 GD31244 PCI-X SATA HBA 1775 c200 C2K onboard SATA host bus adapter 3310 IOP348 I/O Processor From owner-svn-src-all@freebsd.org Sat Feb 25 20: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 9E997CED3A2; Sat, 25 Feb 2017 20:01:18 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 769CB9A5; Sat, 25 Feb 2017 20:01:18 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PK1He3012092; Sat, 25 Feb 2017 20:01:17 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PK1HMG012091; Sat, 25 Feb 2017 20:01:17 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201702252001.v1PK1HMG012091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sat, 25 Feb 2017 20:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314280 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 20:01:18 -0000 Author: jpaetzel Date: Sat Feb 25 20:01:17 2017 New Revision: 314280 URL: https://svnweb.freebsd.org/changeset/base/314280 Log: MFV 314276 7570 tunable to allow zvol SCSI unmap to return on commit of txn to ZIL illumos/illumos-gate@1c9272b861cd640a8342f4407da026ed98615517 https://github.com/illumos/illumos-gate/commit/1c9272b861cd640a8342f4407da026ed98615517 https://www.illumos.org/issues/7570 Based on the discovery that every unmap waits for the commit of the txn to the ZIL, introducing a very high latency to unmap commands, this behavior was made into a tunable zvol_unmap_sync_enabled and set to false. The net impact of this change is that by default SCSI unmap commands will result in space being freed within the zvol (today they are ignored and returned with good status). However, unlike the code today, instead of 18+ms per unmap, they take about 30us. With the testing done on NTFS against a Win2k12 target, the new behavior should work seamlessly. Files on the zvol that have already been set with the zfree application will continue to write 0's when deleted, and any new files created since zvol creation will send unmap commands when deleted. This behavior exists today, but with this change the unmap commands will be processed and result in reclaim of space. Author: Stephen Blinick Reviewed by: Dan Kimmel Reviewed by: Matt Ahrens Reviewed by: Steve Gonczi Reviewed by: Pavel Zakharov Reviewed by: Saso Kiselkov Reviewed by: Yuri Pankov Approved by: Robert Mustacchi Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Feb 25 19:39:58 2017 (r314279) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Feb 25 20:01:17 2017 (r314280) @@ -27,7 +27,7 @@ * Portions Copyright 2010 Robert Milkowski * * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -202,11 +202,22 @@ int zvol_maxphys = DMU_MAX_ACCESS/2; * Toggle unmap functionality. */ boolean_t zvol_unmap_enabled = B_TRUE; + +/* + * If true, unmaps requested as synchronous are executed synchronously, + * otherwise all unmaps are asynchronous. + */ +boolean_t zvol_unmap_sync_enabled = B_FALSE; + #ifndef illumos SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, unmap_enabled, CTLFLAG_RWTUN, &zvol_unmap_enabled, 0, "Enable UNMAP functionality"); +SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, unmap_sync_enabled, CTLFLAG_RWTUN, + &zvol_unmap_sync_enabled, 0, + "UNMAPs requested as sync are executed synchronously"); + static d_open_t zvol_d_open; static d_close_t zvol_d_close; static d_read_t zvol_read; @@ -2268,26 +2279,21 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t zfs_range_unlock(rl); - if (error == 0) { - /* - * If the write-cache is disabled or 'sync' property - * is set to 'always' then treat this as a synchronous - * operation (i.e. commit to zil). - */ - if (!(zv->zv_flags & ZVOL_WCE) || - (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)) - zil_commit(zv->zv_zilog, ZVOL_OBJ); - - /* - * If the caller really wants synchronous writes, and - * can't wait for them, don't return until the write - * is done. - */ - if (df.df_flags & DF_WAIT_SYNC) { - txg_wait_synced( - dmu_objset_pool(zv->zv_objset), 0); - } + /* + * If the write-cache is disabled, 'sync' property + * is set to 'always', or if the caller is asking for + * a synchronous free, commit this operation to the zil. + * This will sync any previous uncommitted writes to the + * zvol object. + * Can be overridden by the zvol_unmap_sync_enabled tunable. + */ + if ((error == 0) && zvol_unmap_sync_enabled && + (!(zv->zv_flags & ZVOL_WCE) || + (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS) || + (df.df_flags & DF_WAIT_SYNC))) { + zil_commit(zv->zv_zilog, ZVOL_OBJ); } + return (error); } From owner-svn-src-all@freebsd.org Sat Feb 25 20:21: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 B33C9CEDA90; Sat, 25 Feb 2017 20:21:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66C18860; Sat, 25 Feb 2017 20:21:40 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PKLd8b019797; Sat, 25 Feb 2017 20:21:39 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PKLd7K019796; Sat, 25 Feb 2017 20:21:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201702252021.v1PKLd7K019796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 25 Feb 2017 20:21: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: r314281 - stable/11/sys/dev/e1000 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, 25 Feb 2017 20:21:40 -0000 Author: loos Date: Sat Feb 25 20:21:39 2017 New Revision: 314281 URL: https://svnweb.freebsd.org/changeset/base/314281 Log: Disable the driver managed queue for igb(4) when the legacy transmit interface is used. The legacy API (IGB_LEGACY_TX) is enabled when ALTQ is built into kernel. As noted in altq(9), it is responsibility of the caller to protect this queue against concurrent access and, in the igb case, the interface send queue is protected by tx queue mutex. This obviously cannot protect the driver managed queue against concurrent access from different tx queues and leads to numerous and quite strange panic traces (usually shown as packets disappearing into thin air). Improving the locking to cope with this means serialize all access to this (single) queue and produces no gain, it actually affects the performance quite noticeabily. The driver managed queue is already disabled when an ALTQ queue discipline is set on interface (in altq_enable()), because the driver managed queue can interfere with ALTQ timing (whence the reports that setting an ALTQ queue discipline on interface also fixes the issue). Disabling this additional queue keeps the ability to use if_start() to send packets to individual NIC queues while it simply eliminate the race. This is a direct commit to stable/11 as -head driver does not support ALTQ anymore. PR: 213257 PR: 212413 Discussed with: sbruno Tested by: Konstantin Kormashev Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/e1000/if_igb.c Modified: stable/11/sys/dev/e1000/if_igb.c ============================================================================== --- stable/11/sys/dev/e1000/if_igb.c Sat Feb 25 20:01:17 2017 (r314280) +++ stable/11/sys/dev/e1000/if_igb.c Sat Feb 25 20:21:39 2017 (r314281) @@ -3182,7 +3182,7 @@ igb_setup_interface(device_t dev, struct #else ifp->if_start = igb_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1); - ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1; + ifp->if_snd.ifq_drv_maxlen = 0; IFQ_SET_READY(&ifp->if_snd); #endif From owner-svn-src-all@freebsd.org Sat Feb 25 20:32: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 E2CF7CEDFC0; Sat, 25 Feb 2017 20:32:38 +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 A4C49F06; Sat, 25 Feb 2017 20:32:38 +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 v1PKWbD0026496; Sat, 25 Feb 2017 20:32:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PKWbXK026493; Sat, 25 Feb 2017 20:32:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702252032.v1PKWbXK026493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 25 Feb 2017 20:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314282 - in head/sys: 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: Sat, 25 Feb 2017 20:32:39 -0000 Author: trasz Date: Sat Feb 25 20:32:37 2017 New Revision: 314282 URL: https://svnweb.freebsd.org/changeset/base/314282 Log: Fix linux_fstatfs() to return proper value for f_frsize. Without it, linux df(1) binary from Xenial shows garbage. Reviewed by: dchagin MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9692 Modified: head/sys/amd64/linux32/linux.h head/sys/compat/linux/linux_stats.c head/sys/i386/linux/linux.h Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sat Feb 25 20:21:39 2017 (r314281) +++ head/sys/amd64/linux32/linux.h Sat Feb 25 20:32:37 2017 (r314282) @@ -250,7 +250,9 @@ struct l_statfs64 { uint64_t f_ffree; l_fsid_t f_fsid; l_int f_namelen; - l_int f_spare[6]; + l_int f_frsize; + l_int f_flags; + l_int f_spare[4]; } __packed; /* sigaction flags */ Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Sat Feb 25 20:21:39 2017 (r314281) +++ head/sys/compat/linux/linux_stats.c Sat Feb 25 20:32:37 2017 (r314282) @@ -303,7 +303,9 @@ struct l_statfs { l_long f_ffree; l_fsid_t f_fsid; l_long f_namelen; - l_long f_spare[6]; + l_long f_frsize; + l_long f_flags; + l_long f_spare[4]; }; #define LINUX_CODA_SUPER_MAGIC 0x73757245L @@ -371,6 +373,9 @@ bsd_to_linux_statfs(struct statfs *bsd_s linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0]; linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1]; linux_statfs->f_namelen = MAXNAMLEN; + linux_statfs->f_frsize = bsd_statfs->f_bsize; + linux_statfs->f_flags = 0; + memset(linux_statfs->f_spare, 0, sizeof(linux_statfs->f_spare)); return (0); } @@ -415,6 +420,9 @@ bsd_to_linux_statfs64(struct statfs *bsd linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0]; linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1]; linux_statfs->f_namelen = MAXNAMLEN; + linux_statfs->f_frsize = bsd_statfs->f_bsize; + linux_statfs->f_flags = 0; + memset(linux_statfs->f_spare, 0, sizeof(linux_statfs->f_spare)); } int Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sat Feb 25 20:21:39 2017 (r314281) +++ head/sys/i386/linux/linux.h Sat Feb 25 20:32:37 2017 (r314282) @@ -225,7 +225,9 @@ struct l_statfs64 { uint64_t f_ffree; l_fsid_t f_fsid; l_int f_namelen; - l_int f_spare[6]; + l_int f_frsize; + l_int f_flags; + l_int f_spare[4]; }; #define LINUX_NSIG_WORDS 2 From owner-svn-src-all@freebsd.org Sat Feb 25 22: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 58FAFCEDA66; Sat, 25 Feb 2017 22:11:12 +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 19D1FC9C; Sat, 25 Feb 2017 22:11:12 +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 v1PMBB4N061692; Sat, 25 Feb 2017 22:11:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PMBAQL061688; Sat, 25 Feb 2017 22:11:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702252211.v1PMBAQL061688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 22:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314283 - in head/sys: cam conf modules/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages 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, 25 Feb 2017 22:11:12 -0000 Author: imp Date: Sat Feb 25 22:11:10 2017 New Revision: 314283 URL: https://svnweb.freebsd.org/changeset/base/314283 Log: Move inclusion of opt_printf.h around so that we can compile all the SCSI modules outside of a sub-build from the kernel. Differential Revision: https://reviews.freebsd.org/D9653 Sponsored by: Netflix Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/conf/config.mk head/sys/modules/cam/Makefile Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/cam/cam_xpt.c Sat Feb 25 22:11:10 2017 (r314283) @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "opt_printf.h" + #include __FBSDID("$FreeBSD$"); @@ -72,6 +74,15 @@ __FBSDID("$FreeBSD$"); #include "opt_cam.h" +/* Wild guess based on not wanting to grow the stack too much */ +#define XPT_PRINT_MAXLEN 512 +#ifdef PRINTF_BUFR_SIZE +#define XPT_PRINT_LEN PRINTF_BUFR_SIZE +#else +#define XPT_PRINT_LEN 128 +#endif +_Static_assert(XPT_PRINT_LEN <= XPT_PRINT_MAXLEN, "XPT_PRINT_LEN is too large"); + /* * This is the maximum number of high powered commands (e.g. start unit) * that can be outstanding at a particular time. Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/cam/cam_xpt.h Sat Feb 25 22:11:10 2017 (r314283) @@ -34,7 +34,6 @@ #ifdef _KERNEL #include -#include "opt_printf.h" #endif /* Forward Declarations */ @@ -55,15 +54,6 @@ struct cam_path; #ifdef _KERNEL -/* Wild guess based on not wanting to grow the stack too much */ -#define XPT_PRINT_MAXLEN 512 -#ifdef PRINTF_BUFR_SIZE -#define XPT_PRINT_LEN PRINTF_BUFR_SIZE -#else -#define XPT_PRINT_LEN 128 -#endif -_Static_assert(XPT_PRINT_LEN <= XPT_PRINT_MAXLEN, "XPT_PRINT_LEN is too large"); - /* * Definition of an async handler callback block. These are used to add * SIMs and peripherals to the async callback lists. Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/conf/config.mk Sat Feb 25 22:11:10 2017 (r314283) @@ -27,6 +27,8 @@ opt_mrouting.h: echo "#define MROUTING 1" > ${.TARGET} opt_natm.h: echo "#define NATM 1" > ${.TARGET} +opt_printf.h: + echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET} opt_scsi.h: echo "#define SCSI_DELAY 15000" > ${.TARGET} opt_wlan.h: Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/modules/cam/Makefile Sat Feb 25 22:11:10 2017 (r314283) @@ -15,6 +15,7 @@ SRCS+= opt_pt.h SRCS+= opt_sa.h SRCS+= opt_ses.h SRCS+= opt_ddb.h +SRCS+= opt_printf.h SRCS+= device_if.h bus_if.h vnode_if.h SRCS+= cam.c SRCS+= cam_compat.c