From owner-svn-src-all@freebsd.org Sun Sep 17 01:08:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09056E157C2; Sun, 17 Sep 2017 01:08:44 +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 CC0B56A5B6; Sun, 17 Sep 2017 01:08:43 +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 v8H18hk3059875; Sun, 17 Sep 2017 01:08:43 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H18hU4059874; Sun, 17 Sep 2017 01:08:43 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709170108.v8H18hU4059874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 17 Sep 2017 01:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r323658 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: marius X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 323658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 01:08:44 -0000 Author: marius Date: Sun Sep 17 01:08:42 2017 New Revision: 323658 URL: https://svnweb.freebsd.org/changeset/base/323658 Log: Change the stable/10 branch no longer require explicit re@ approval for commits. Committers are asked to please exercise caution when merging changes to stable/10 for the duration of the 10.4-RELEASE cycle. Approved by: re (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sat Sep 16 21:26:06 2017 (r323657) +++ svnadmin/conf/approvers Sun Sep 17 01:08:42 2017 (r323658) @@ -18,7 +18,7 @@ # #^head/ re #^stable/11/ re -^stable/10/ re +#^stable/10/ re ^release/ re ^releng/11.[0-1]/ (security-officer|so) ^releng/10.4/ re From owner-svn-src-all@freebsd.org Sun Sep 17 01:32: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 E4A9DE174D5; Sun, 17 Sep 2017 01:32:39 +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 ACADF6B894; Sun, 17 Sep 2017 01:32:39 +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 v8H1Wc90071848; Sun, 17 Sep 2017 01:32:38 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H1WcN1071847; Sun, 17 Sep 2017 01:32:38 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709170132.v8H1WcN1071847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 17 Sep 2017 01:32: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: r323659 - stable/11/lib/libfetch X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/lib/libfetch X-SVN-Commit-Revision: 323659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 01:32:40 -0000 Author: marius Date: Sun Sep 17 01:32:38 2017 New Revision: 323659 URL: https://svnweb.freebsd.org/changeset/base/323659 Log: MFC: r322669 In fetch_resolve() if the port number or service name is included in the host argument (e. g. "www.freebsd.org:443"), correctly set the service pointer accordingly. Previously, the service pointer was set to the separator instead, causing getaddrinfo(3) to fail. Modified: stable/11/lib/libfetch/common.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libfetch/common.c ============================================================================== --- stable/11/lib/libfetch/common.c Sun Sep 17 01:08:42 2017 (r323658) +++ stable/11/lib/libfetch/common.c Sun Sep 17 01:32:38 2017 (r323659) @@ -291,7 +291,7 @@ fetch_resolve(const char *addr, int port, int af) goto syserr; service = sbuf; } else if (*sep != '\0') { - service = sep; + service = sep + 1; } else { service = NULL; } From owner-svn-src-all@freebsd.org Sun Sep 17 01:32: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 423F2E17512; Sun, 17 Sep 2017 01:32:47 +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 07F506B8ED; Sun, 17 Sep 2017 01:32:46 +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 v8H1WkTK071898; Sun, 17 Sep 2017 01:32:46 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H1WkSj071897; Sun, 17 Sep 2017 01:32:46 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709170132.v8H1WkSj071897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 17 Sep 2017 01:32: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: r323660 - stable/10/lib/libfetch X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/lib/libfetch X-SVN-Commit-Revision: 323660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 01:32:47 -0000 Author: marius Date: Sun Sep 17 01:32:45 2017 New Revision: 323660 URL: https://svnweb.freebsd.org/changeset/base/323660 Log: MFC: r322669 In fetch_resolve() if the port number or service name is included in the host argument (e. g. "www.freebsd.org:443"), correctly set the service pointer accordingly. Previously, the service pointer was set to the separator instead, causing getaddrinfo(3) to fail. Modified: stable/10/lib/libfetch/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Sun Sep 17 01:32:38 2017 (r323659) +++ stable/10/lib/libfetch/common.c Sun Sep 17 01:32:45 2017 (r323660) @@ -291,7 +291,7 @@ fetch_resolve(const char *addr, int port, int af) goto syserr; service = sbuf; } else if (*sep != '\0') { - service = sep; + service = sep + 1; } else { service = NULL; } From owner-svn-src-all@freebsd.org Sun Sep 17 03:17:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FBC6E1E9AB; Sun, 17 Sep 2017 03:17:25 +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 59F886F569; Sun, 17 Sep 2017 03:17:25 +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 v8H3HOkg014077; Sun, 17 Sep 2017 03:17:24 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H3HOwB014072; Sun, 17 Sep 2017 03:17:24 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170317.v8H3HOwB014072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 03:17: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: r323662 - in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Commit-Revision: 323662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:17:25 -0000 Author: alc Date: Sun Sep 17 03:17:23 2017 New Revision: 323662 URL: https://svnweb.freebsd.org/changeset/base/323662 Log: MFC r322296 Introduce vm_page_grab_pages(), which is intended to replace loops calling vm_page_grab() on consecutive page indices. Besides simplifying the code in the caller, vm_page_grab_pages() allows for batching optimizations. For example, the current implementation replaces calls to vm_page_lookup() on consecutive page indices by cheaper calls to vm_page_next(). Modified: stable/11/sys/kern/vfs_bio.c stable/11/sys/sparc64/sparc64/pmap.c stable/11/sys/vm/vm_glue.c stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/kern/vfs_bio.c Sun Sep 17 03:17:23 2017 (r323662) @@ -2745,7 +2745,7 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int */ obj = bp->b_bufobj->bo_object; VM_OBJECT_WLOCK(obj); - while (bp->b_npages < desiredpages) { + if (bp->b_npages < desiredpages) { /* * We must allocate system pages since blocking * here could interfere with paging I/O, no @@ -2756,14 +2756,12 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int * deadlocks once allocbuf() is called after * pages are vfs_busy_pages(). */ - m = vm_page_grab(obj, OFF_TO_IDX(bp->b_offset) + bp->b_npages, - VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | - VM_ALLOC_WIRED | VM_ALLOC_IGN_SBUSY | - VM_ALLOC_COUNT(desiredpages - bp->b_npages)); - if (m->valid == 0) - bp->b_flags &= ~B_CACHE; - bp->b_pages[bp->b_npages] = m; - ++bp->b_npages; + vm_page_grab_pages(obj, + OFF_TO_IDX(bp->b_offset) + bp->b_npages, + VM_ALLOC_SYSTEM | VM_ALLOC_IGN_SBUSY | + VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, + &bp->b_pages[bp->b_npages], desiredpages - bp->b_npages); + bp->b_npages = desiredpages; } /* Modified: stable/11/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 03:17:23 2017 (r323662) @@ -1230,7 +1230,6 @@ int pmap_pinit(pmap_t pm) { vm_page_t ma[TSB_PAGES]; - vm_page_t m; int i; /* @@ -1253,14 +1252,11 @@ pmap_pinit(pmap_t pm) CPU_ZERO(&pm->pm_active); VM_OBJECT_WLOCK(pm->pm_tsb_obj); - for (i = 0; i < TSB_PAGES; i++) { - m = vm_page_grab(pm->pm_tsb_obj, i, VM_ALLOC_NOBUSY | - VM_ALLOC_WIRED | VM_ALLOC_ZERO); - m->valid = VM_PAGE_BITS_ALL; - m->md.pmap = pm; - ma[i] = m; - } + vm_page_grab_pages(pm->pm_tsb_obj, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO, ma, TSB_PAGES); VM_OBJECT_WUNLOCK(pm->pm_tsb_obj); + for (i = 0; i < TSB_PAGES; i++) + ma[i]->md.pmap = pm; pmap_qenter((vm_offset_t)pm->pm_tsb, ma, TSB_PAGES); bzero(&pm->pm_stats, sizeof(pm->pm_stats)); Modified: stable/11/sys/vm/vm_glue.c ============================================================================== --- stable/11/sys/vm/vm_glue.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/vm/vm_glue.c Sun Sep 17 03:17:23 2017 (r323662) @@ -322,7 +322,7 @@ vm_thread_new(struct thread *td, int pages) { vm_object_t ksobj; vm_offset_t ks; - vm_page_t m, ma[KSTACK_MAX_PAGES]; + vm_page_t ma[KSTACK_MAX_PAGES]; struct kstack_cache_entry *ks_ce; int i; @@ -391,15 +391,10 @@ vm_thread_new(struct thread *td, int pages) * page of stack. */ VM_OBJECT_WLOCK(ksobj); - for (i = 0; i < pages; i++) { - /* - * Get a kernel stack page. - */ - m = vm_page_grab(ksobj, i, VM_ALLOC_NOBUSY | - VM_ALLOC_NORMAL | VM_ALLOC_WIRED); - ma[i] = m; - m->valid = VM_PAGE_BITS_ALL; - } + vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_WIRED, ma, pages); + for (i = 0; i < pages; i++) + ma[i]->valid = VM_PAGE_BITS_ALL; VM_OBJECT_WUNLOCK(ksobj); pmap_qenter(ks, ma, pages); return (1); @@ -573,9 +568,8 @@ vm_thread_swapin(struct thread *td) pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; VM_OBJECT_WLOCK(ksobj); - for (int i = 0; i < pages; i++) - ma[i] = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | - VM_ALLOC_WIRED); + vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, + pages); for (int i = 0; i < pages;) { int j, a, count, rv; Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/vm/vm_page.c Sun Sep 17 03:17:23 2017 (r323662) @@ -3130,6 +3130,100 @@ retrylookup: } /* + * Return the specified range of pages from the given object. For each + * page offset within the range, if a page already exists within the object + * at that offset and it is busy, then wait for it to change state. If, + * instead, the page doesn't exist, then allocate it. + * + * The caller must always specify an allocation class. + * + * allocation classes: + * VM_ALLOC_NORMAL normal process request + * VM_ALLOC_SYSTEM system *really* needs the pages + * + * The caller must always specify that the pages are to be busied and/or + * wired. + * + * optional allocation flags: + * VM_ALLOC_IGN_SBUSY do not sleep on soft busy pages + * VM_ALLOC_NOBUSY do not exclusive busy the page + * VM_ALLOC_SBUSY set page to sbusy state + * VM_ALLOC_WIRED wire the pages + * VM_ALLOC_ZERO zero and validate any invalid pages + * + * This routine may sleep. + */ +void +vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, + vm_page_t *ma, int count) +{ + vm_page_t m; + int i; + bool sleep; + + VM_OBJECT_ASSERT_WLOCKED(object); + KASSERT(((u_int)allocflags >> VM_ALLOC_COUNT_SHIFT) == 0, + ("vm_page_grap_pages: VM_ALLOC_COUNT() is not allowed")); + KASSERT((allocflags & VM_ALLOC_NOBUSY) == 0 || + (allocflags & VM_ALLOC_WIRED) != 0, + ("vm_page_grab_pages: the pages must be busied or wired")); + KASSERT((allocflags & VM_ALLOC_SBUSY) == 0 || + (allocflags & VM_ALLOC_IGN_SBUSY) != 0, + ("vm_page_grab_pages: VM_ALLOC_SBUSY/IGN_SBUSY mismatch")); + if (count == 0) + return; + i = 0; +retrylookup: + m = vm_page_lookup(object, pindex + i); + for (; i < count; i++) { + if (m != NULL) { + sleep = (allocflags & VM_ALLOC_IGN_SBUSY) != 0 ? + vm_page_xbusied(m) : vm_page_busied(m); + if (sleep) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_aflag_set(m, PGA_REFERENCED); + vm_page_lock(m); + VM_OBJECT_WUNLOCK(object); + vm_page_busy_sleep(m, "grbmaw", (allocflags & + VM_ALLOC_IGN_SBUSY) != 0); + VM_OBJECT_WLOCK(object); + goto retrylookup; + } + if ((allocflags & VM_ALLOC_WIRED) != 0) { + vm_page_lock(m); + vm_page_wire(m); + vm_page_unlock(m); + } + if ((allocflags & (VM_ALLOC_NOBUSY | + VM_ALLOC_SBUSY)) == 0) + vm_page_xbusy(m); + if ((allocflags & VM_ALLOC_SBUSY) != 0) + vm_page_sbusy(m); + } else { + m = vm_page_alloc(object, pindex + i, (allocflags & + ~VM_ALLOC_IGN_SBUSY) | VM_ALLOC_COUNT(count - i)); + if (m == NULL) { + VM_OBJECT_WUNLOCK(object); + VM_WAIT; + VM_OBJECT_WLOCK(object); + goto retrylookup; + } + } + if (m->valid == 0 && (allocflags & VM_ALLOC_ZERO) != 0) { + if ((m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + ma[i] = m; + m = vm_page_next(m); + } +} + +/* * Mapping function for valid or dirty bits in a page. * * Inputs are required to range within a page. Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Sun Sep 17 03:08:00 2017 (r323661) +++ stable/11/sys/vm/vm_page.h Sun Sep 17 03:17:23 2017 (r323662) @@ -387,6 +387,9 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); * vm_page_alloc_freelist(). Some functions support only a subset * of the flags, and ignore others, see the flags legend. * + * The meaning of VM_ALLOC_ZERO differs slightly between the vm_page_alloc*() + * and the vm_page_grab*() functions. See these functions for details. + * * Bits 0 - 1 define class. * Bits 2 - 15 dedicated for flags. * Legend: @@ -394,6 +397,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); * (c) - vm_page_alloc_contig() supports the flag. * (f) - vm_page_alloc_freelist() supports the flag. * (g) - vm_page_grab() supports the flag. + * (p) - vm_page_grab_pages() supports the flag. * Bits above 15 define the count of additional pages that the caller * intends to allocate. */ @@ -401,15 +405,15 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_INTERRUPT 1 #define VM_ALLOC_SYSTEM 2 #define VM_ALLOC_CLASS_MASK 3 -#define VM_ALLOC_WIRED 0x0020 /* (acfg) Allocate non pageable page */ -#define VM_ALLOC_ZERO 0x0040 /* (acfg) Try to obtain a zeroed page */ +#define VM_ALLOC_WIRED 0x0020 /* (acfgp) Allocate a wired page */ +#define VM_ALLOC_ZERO 0x0040 /* (acfgp) Allocate a prezeroed page */ #define VM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ -#define VM_ALLOC_NOBUSY 0x0200 /* (acg) Do not busy the page */ +#define VM_ALLOC_NOBUSY 0x0200 /* (acgp) Do not excl busy the page */ #define VM_ALLOC_IFCACHED 0x0400 #define VM_ALLOC_IFNOTCACHED 0x0800 -#define VM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ +#define VM_ALLOC_IGN_SBUSY 0x1000 /* (gp) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ -#define VM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ +#define VM_ALLOC_SBUSY 0x4000 /* (acgp) Shared busy the page */ #define VM_ALLOC_NOWAIT 0x8000 /* (g) Do not sleep, return NULL */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) @@ -450,6 +454,8 @@ vm_page_t vm_page_alloc_contig(vm_object_t object, vm_ vm_page_t vm_page_alloc_freelist(int, int); void vm_page_change_lock(vm_page_t m, struct mtx **mtx); vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); +void vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, + vm_page_t *ma, int count); int vm_page_try_to_free (vm_page_t); void vm_page_deactivate (vm_page_t); void vm_page_deactivate_noreuse(vm_page_t); From owner-svn-src-all@freebsd.org Sun Sep 17 03:34: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 59696E1F67E; Sun, 17 Sep 2017 03:34:37 +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 26E7E6FD4B; Sun, 17 Sep 2017 03:34:37 +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 v8H3YaUn021966; Sun, 17 Sep 2017 03:34:36 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H3Yam0021965; Sun, 17 Sep 2017 03:34:36 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170334.v8H3Yam0021965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 03:34: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: r323663 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 323663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:34:37 -0000 Author: alc Date: Sun Sep 17 03:34:36 2017 New Revision: 323663 URL: https://svnweb.freebsd.org/changeset/base/323663 Log: MFC r322404 An invalid page can't be dirty. Modified: stable/11/sys/kern/kern_sendfile.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sendfile.c ============================================================================== --- stable/11/sys/kern/kern_sendfile.c Sun Sep 17 03:17:23 2017 (r323662) +++ stable/11/sys/kern/kern_sendfile.c Sun Sep 17 03:34:36 2017 (r323663) @@ -366,7 +366,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o NULL, &a) && i < j) { pmap_zero_page(pa[i]); pa[i]->valid = VM_PAGE_BITS_ALL; - pa[i]->dirty = 0; + MPASS(pa[i]->dirty == 0); vm_page_xunbusy(pa[i]); i++; } From owner-svn-src-all@freebsd.org Sun Sep 17 03:44: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 DCA0CE1FE80; Sun, 17 Sep 2017 03:44:16 +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 7FC2170218; Sun, 17 Sep 2017 03:44:16 +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 v8H3iF5c026169; Sun, 17 Sep 2017 03:44:15 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H3iFoY026168; Sun, 17 Sep 2017 03:44:15 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170344.v8H3iFoY026168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 03:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323664 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 323664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 03:44:17 -0000 Author: alc Date: Sun Sep 17 03:44:15 2017 New Revision: 323664 URL: https://svnweb.freebsd.org/changeset/base/323664 Log: MFC r321102 Tidy up before making another round of functional changes: Remove end- of-line whitespace, remove excessive whitespace and blank lines, remove dead code, follow our standard style for function definitions, and correct grammatical and factual errors in some of the comments. Modified: stable/11/sys/kern/subr_blist.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_blist.c ============================================================================== --- stable/11/sys/kern/subr_blist.c Sun Sep 17 03:34:36 2017 (r323663) +++ stable/11/sys/kern/subr_blist.c Sun Sep 17 03:44:15 2017 (r323664) @@ -28,18 +28,18 @@ * BLIST.C - Bitmap allocator/deallocator, using a radix tree with hinting * * This module implements a general bitmap allocator/deallocator. The - * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other than to return + * allocator eats around 2 bits per 'block'. The module does not + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are * involved: One for the bitmaps contained in the leaf nodes (typically - * 32), and one for the meta nodes (typically 16). Both meta and leaf + * 64), and one for the meta nodes (typically 16). Both meta and leaf * nodes have a hint field. This field gives us a hint as to the largest * free contiguous range of blocks under the node. It may contain a - * value that is too high, but will never contain a value that is too + * value that is too high, but will never contain a value that is too * low. When the radix tree is searched, allocation failures in subtrees - * update the hint. + * update the hint. * * The radix tree also implements two collapsed states for meta nodes: * the ALL-ALLOCATED state and the ALL-FREE state. If a meta node is @@ -49,7 +49,7 @@ * * The hinting greatly increases code efficiency for allocations while * the general radix structure optimizes both allocations and frees. The - * radix tree should be able to operate well no matter how much + * radix tree should be able to operate well no matter how much * fragmentation there is and no matter how large a bitmap is used. * * The blist code wires all necessary memory at creation time. Neither @@ -61,18 +61,18 @@ * linear array. Each meta node is immediately followed (laid out * sequentially in memory) by BLIST_META_RADIX lower level nodes. This * is a recursive structure but one that can be easily scanned through - * a very simple 'skip' calculation. In order to support large radixes, - * portions of the tree may reside outside our memory allocation. We - * handle this with an early-termination optimization (when bighint is - * set to -1) on the scan. The memory allocation is only large enough + * a very simple 'skip' calculation. In order to support large radixes, + * portions of the tree may reside outside our memory allocation. We + * handle this with an early-termination optimization (when bighint is + * set to -1) on the scan. The memory allocation is only large enough * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more than - * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too - * large' if you try. This is an area that could use improvement. The - * radix is large enough that this restriction does not effect the swap - * system, though. Currently only the allocation code is effected by + * NOTE: the allocator cannot currently allocate more than + * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too + * large' if you try. This is an area that could use improvement. The + * radix is large enough that this restriction does not effect the swap + * system, though. Currently only the allocation code is affected by * this algorithmic unfeature. The freeing code can handle arbitrary * ranges. * @@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #else @@ -120,16 +120,15 @@ void panic(const char *ctl, ...); /* * static support functions */ - static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor); static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); -static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, +static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t blk); -static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, blist_t dest, daddr_t count); +static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, + daddr_t skip, blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t blk); @@ -151,11 +150,10 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); * blocks - must be greater than 0 * flags - malloc flags * - * The smallest blist consists of a single leaf node capable of + * The smallest blist consists of a single leaf node capable of * managing BLIST_BMAP_RADIX blocks. */ - -blist_t +blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; @@ -202,7 +200,7 @@ blist_create(daddr_t blocks, int flags) return (bl); } -void +void blist_destroy(blist_t bl) { free(bl->bl_root, M_SWAP); @@ -214,8 +212,7 @@ blist_destroy(blist_t bl) * of a contiguous region or SWAPBLK_NONE if space could * not be allocated. */ - -daddr_t +daddr_t blist_alloc(blist_t bl, daddr_t count) { daddr_t blk; @@ -245,7 +242,6 @@ blist_alloc(blist_t bl, daddr_t count) /* * blist_avail() - return the number of free blocks. */ - daddr_t blist_avail(blist_t bl) { @@ -261,8 +257,7 @@ blist_avail(blist_t bl) * of a contiguous region. Panic if an inconsistancy is * found. */ - -void +void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { if (bl) { @@ -280,7 +275,6 @@ blist_free(blist_t bl, daddr_t blkno, daddr_t count) * existing allocations. Return the number of blocks * actually filled that were free before the call. */ - daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { @@ -304,7 +298,6 @@ blist_fill(blist_t bl, daddr_t blkno, daddr_t count) * one. When extending the tree you can specify whether * the new blocks are to left allocated or freed. */ - void blist_resize(blist_t *pbl, daddr_t count, int freenew, int flags) { @@ -330,7 +323,6 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, /* * blist_print() - dump radix tree */ - void blist_print(blist_t bl) { @@ -345,7 +337,7 @@ blist_print(blist_t bl) * ALLOCATION SUPPORT FUNCTIONS * ************************************************************************ * - * These support functions do all the actual work. They may seem + * These support functions do all the actual work. They may seem * rather longish, but that's because I've commented them up. The * actual code is straight forward. * @@ -358,7 +350,6 @@ blist_print(blist_t bl) * BLIST_BMAP_RADIX block allocation case. Otherwise, execution * time is proportional to log2(count) + log2(BLIST_BMAP_RADIX). */ - static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor) { @@ -450,7 +441,6 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count * calls that hit this node. We have to check for our collapse cases * and we have a few optimizations strewn in as well. */ - static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t cursor) @@ -541,13 +531,9 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c * BLST_LEAF_FREE() - free allocated block from leaf bitmap * */ - static void -blst_leaf_free( - blmeta_t *scan, - daddr_t blk, - int count -) { +blst_leaf_free(blmeta_t *scan, daddr_t blk, int count) +{ /* * free some data in this bitmap * @@ -568,7 +554,7 @@ blst_leaf_free( /* * We could probably do a better job here. We are required to make - * bighint at least as large as the biggest contiguous block of + * bighint at least as large as the biggest contiguous block of * data. If we just shoehorn it, a little extra overhead will * be incured on the next allocation (but only that one typically). */ @@ -585,20 +571,13 @@ blst_leaf_free( * range whereas the allocation code cannot allocate an arbitrary * range). */ - -static void +static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t blk) { daddr_t i, next_skip, v; int child; -#if 0 - printf("free (%llx,%lld) FROM (%llx,%lld)\n", - (long long)freeBlk, (long long)count, - (long long)blk, (long long)radix - ); -#endif next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -675,15 +654,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ * Locates free space in the source tree and frees it in the destination * tree. The space may not already be free in the destination. */ - -static void blst_copy( - blmeta_t *scan, - daddr_t blk, - daddr_t radix, - daddr_t skip, - blist_t dest, - daddr_t count -) { +static void +blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, + blist_t dest, daddr_t count) +{ daddr_t i, next_skip; /* @@ -715,7 +689,7 @@ static void blst_copy( * Source all allocated, leave dest allocated */ return; - } + } if (scan->u.bmu_avail == radix) { /* * Source all free, free entire dest @@ -736,25 +710,13 @@ static void blst_copy( break; if (count >= radix) { - blst_copy( - &scan[i], - blk, - radix, - next_skip - 1, - dest, - radix - ); + blst_copy(&scan[i], blk, radix, next_skip - 1, dest, + radix); count -= radix; } else { if (count) { - blst_copy( - &scan[i], - blk, - radix, - next_skip - 1, - dest, - count - ); + blst_copy(&scan[i], blk, radix, next_skip - 1, + dest, count); } count = 0; } @@ -769,7 +731,6 @@ static void blst_copy( * regardless of any existing allocations in that range. Returns * the number of blocks allocated by the call. */ - static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) { @@ -879,8 +840,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * be considerably less than the calculated radix due to the large * RADIX values we use. */ - -static daddr_t +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) { daddr_t i, memindex, next_skip; @@ -896,7 +856,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t scan->bm_bighint = 0; scan->u.bmu_bitmap = 0; } - return(memindex); + return (memindex); } /* @@ -918,23 +878,17 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t /* * Allocate the entire object */ - memindex = i + blst_radix_init( - ((scan) ? &scan[i] : NULL), - radix, - next_skip - 1, - radix - ); + memindex = i + + blst_radix_init(((scan) ? &scan[i] : NULL), radix, + next_skip - 1, radix); count -= radix; } else if (count > 0) { /* * Allocate a partial object */ - memindex = i + blst_radix_init( - ((scan) ? &scan[i] : NULL), - radix, - next_skip - 1, - count - ); + memindex = i + + blst_radix_init(((scan) ? &scan[i] : NULL), radix, + next_skip - 1, count); count = 0; } else { /* @@ -947,12 +901,12 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t } if (memindex < i) memindex = i; - return(memindex); + return (memindex); } #ifdef BLIST_DEBUG -static void +static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, int tab) { @@ -960,7 +914,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t if (radix == BLIST_BMAP_RADIX) { printf( - "%*.*s(%08llx,%lld): bitmap %016llx big=%lld\n", + "%*.*s(%08llx,%lld): bitmap %016llx big=%lld\n", tab, tab, "", (long long)blk, (long long)radix, (long long)scan->u.bmu_bitmap, @@ -1010,13 +964,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); break; } - blst_radix_print( - &scan[i], - blk, - radix, - next_skip - 1, - tab - ); + blst_radix_print(&scan[i], blk, radix, next_skip - 1, tab); blk += radix; } tab -= 4; @@ -1126,4 +1074,3 @@ panic(const char *ctl, ...) } #endif - From owner-svn-src-all@freebsd.org Sun Sep 17 04:15:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C82FE21A68; Sun, 17 Sep 2017 04:15:13 +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 26C357105E; Sun, 17 Sep 2017 04:15:13 +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 v8H4FChZ038347; Sun, 17 Sep 2017 04:15:12 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H4FCvw038346; Sun, 17 Sep 2017 04:15:12 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709170415.v8H4FCvw038346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 04:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323665 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 323665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 04:15:13 -0000 Author: alc Date: Sun Sep 17 04:15:12 2017 New Revision: 323665 URL: https://svnweb.freebsd.org/changeset/base/323665 Log: MFC r321423 Change the interactions of the interface functions with the "meta" and "leaf" functions for alloc, free, and fill. After the change, the interface functions call "meta" unconditionally, and the "meta" functions recur unconditionally in looping over their descendants. The "meta" functions start with a validity test, and then a test for the "leaf" case, before falling into the general recursive case. This simplifies and shrinks the code, and, for "free" and "fill" moves panic tests that check the same meta node repeatedly in a loop to a place that will have each node tested once. Remove irrelevant null checks from blist_free and blist_fill. Make the code that initializes a meta node the same in blist_meta_alloc and blist_meta_fill. Parenthesize return expressions in blst_meta_fill. Modified: stable/11/sys/kern/subr_blist.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_blist.c ============================================================================== --- stable/11/sys/kern/subr_blist.c Sun Sep 17 03:44:15 2017 (r323664) +++ stable/11/sys/kern/subr_blist.c Sun Sep 17 04:15:12 2017 (r323665) @@ -224,12 +224,8 @@ blist_alloc(blist_t bl, daddr_t count) * reduce the hint, stopping further iterations. */ while (count <= bl->bl_root->bm_bighint) { - if (bl->bl_radix == BLIST_BMAP_RADIX) - blk = blst_leaf_alloc(bl->bl_root, 0, count, - bl->bl_cursor); - else - blk = blst_meta_alloc(bl->bl_root, 0, count, - bl->bl_radix, bl->bl_skip, bl->bl_cursor); + blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, + bl->bl_skip, bl->bl_cursor); if (blk != SWAPBLK_NONE) { bl->bl_cursor = blk + count; return (blk); @@ -260,13 +256,8 @@ blist_avail(blist_t bl) void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { - if (bl) { - if (bl->bl_radix == BLIST_BMAP_RADIX) - blst_leaf_free(bl->bl_root, blkno, count); - else - blst_meta_free(bl->bl_root, blkno, count, - bl->bl_radix, bl->bl_skip, 0); - } + + blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); } /* @@ -278,17 +269,9 @@ blist_free(blist_t bl, daddr_t blkno, daddr_t count) daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { - daddr_t filled; - if (bl) { - if (bl->bl_radix == BLIST_BMAP_RADIX) - filled = blst_leaf_fill(bl->bl_root, blkno, count); - else - filled = blst_meta_fill(bl->bl_root, blkno, count, - bl->bl_radix, bl->bl_skip, 0); - return (filled); - } - return (0); + return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, + bl->bl_skip, 0)); } /* @@ -449,6 +432,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c int child; bool scan_from_start; + if (radix == BLIST_BMAP_RADIX) + return (blst_leaf_alloc(scan, blk, count, cursor)); if (scan->u.bmu_avail < count) { /* * The meta node's hint must be too large if the allocation @@ -497,14 +482,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c /* * The allocation might fit in the i'th subtree. */ - if (next_skip == 1) { - r = blst_leaf_alloc(&scan[i], blk, count, - cursor > blk ? cursor : blk); - } else { - r = blst_meta_alloc(&scan[i], blk, count, - radix, next_skip - 1, cursor > blk ? - cursor : blk); - } + r = blst_meta_alloc(&scan[i], blk, count, radix, + next_skip - 1, cursor > blk ? cursor : blk); if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; return (r); @@ -578,6 +557,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ daddr_t i, next_skip, v; int child; + if (scan->bm_bighint == (daddr_t)-1) + panic("freeing invalid range"); + if (radix == BLIST_BMAP_RADIX) + return (blst_leaf_free(scan, freeBlk, count)); next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -630,17 +613,9 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ v = blk + radix - freeBlk; if (v > count) v = count; - - if (scan->bm_bighint == (daddr_t)-1) - panic("blst_meta_free: freeing unexpected range"); - - if (next_skip == 1) { - blst_leaf_free(&scan[i], freeBlk, v); - } else { - blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); - } + blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); if (scan->bm_bighint < scan[i].bm_bighint) - scan->bm_bighint = scan[i].bm_bighint; + scan->bm_bighint = scan[i].bm_bighint; count -= v; freeBlk += v; blk += radix; @@ -763,13 +738,17 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr daddr_t i, nblks, next_skip, v; int child; + if (scan->bm_bighint == (daddr_t)-1) + panic("filling invalid range"); if (count > radix) { /* * The allocation exceeds the number of blocks that are - * managed by this meta node. + * managed by this node. */ - panic("allocation too large"); + panic("fill too large"); } + if (radix == BLIST_BMAP_RADIX) + return (blst_leaf_fill(scan, allocBlk, count)); if (count == radix || scan->u.bmu_avail == 0) { /* * ALL-ALLOCATED special case @@ -777,7 +756,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr nblks = scan->u.bmu_avail; scan->u.bmu_avail = 0; scan->bm_bighint = 0; - return nblks; + return (nblks); } next_skip = skip / BLIST_META_RADIX; @@ -793,13 +772,11 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * meta node cannot have a terminator in any subtree. */ for (i = 1; i <= skip; i += next_skip) { - if (next_skip == 1) { + if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; - scan[i].bm_bighint = BLIST_BMAP_RADIX; - } else { - scan[i].bm_bighint = radix; + else scan[i].u.bmu_avail = radix; - } + scan[i].bm_bighint = radix; } } else { radix /= BLIST_META_RADIX; @@ -813,23 +790,15 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr v = blk + radix - allocBlk; if (v > count) v = count; - - if (scan->bm_bighint == (daddr_t)-1) - panic("blst_meta_fill: filling unexpected range"); - - if (next_skip == 1) { - nblks += blst_leaf_fill(&scan[i], allocBlk, v); - } else { - nblks += blst_meta_fill(&scan[i], allocBlk, v, - radix, next_skip - 1, blk); - } + nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, + next_skip - 1, blk); count -= v; allocBlk += v; blk += radix; i += next_skip; } scan->u.bmu_avail -= nblks; - return nblks; + return (nblks); } /* From owner-svn-src-all@freebsd.org Sun Sep 17 06:32: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 9E531E26AB5; Sun, 17 Sep 2017 06:32:06 +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 6D7DA744AD; Sun, 17 Sep 2017 06:32: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 v8H6W514094738; Sun, 17 Sep 2017 06:32:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6W50x094737; Sun, 17 Sep 2017 06:32:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170632.v8H6W50x094737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:32:05 +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: r323666 - stable/11/usr.bin/netstat X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/usr.bin/netstat X-SVN-Commit-Revision: 323666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:32:06 -0000 Author: bapt Date: Sun Sep 17 06:32:05 2017 New Revision: 323666 URL: https://svnweb.freebsd.org/changeset/base/323666 Log: MFC r323016: Don't call kresolv_list() if using netstat on live kernel kresolve_list() is calling many kldsym(2). Removing that call on when collecting stats for the running kernel improves the startup time and CPU usage. Submitted by: Nikita Kozlov (nikita.kozlov@blade-group.com) Reviewed by: cem Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12151 Modified: stable/11/usr.bin/netstat/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/netstat/main.c ============================================================================== --- stable/11/usr.bin/netstat/main.c Sun Sep 17 04:15:12 2017 (r323665) +++ stable/11/usr.bin/netstat/main.c Sun Sep 17 06:32:05 2017 (r323666) @@ -422,13 +422,12 @@ main(int argc, char *argv[]) if (!live) { if (setgid(getgid()) != 0) xo_err(-1, "setgid"); + /* Load all necessary kvm symbols */ + kresolve_list(nl); } if (xflag && Tflag) xo_errx(1, "-x and -T are incompatible, pick one."); - - /* Load all necessary kvm symbols */ - kresolve_list(nl); if (Bflag) { if (!live) From owner-svn-src-all@freebsd.org Sun Sep 17 06:33: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 8FC6BE26CFC; Sun, 17 Sep 2017 06:33:43 +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 66A14746D5; Sun, 17 Sep 2017 06:33:43 +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 v8H6XgrO094854; Sun, 17 Sep 2017 06:33:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6Xg3i094853; Sun, 17 Sep 2017 06:33:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170633.v8H6Xg3i094853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323667 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:33:43 -0000 Author: bapt Date: Sun Sep 17 06:33:42 2017 New Revision: 323667 URL: https://svnweb.freebsd.org/changeset/base/323667 Log: MFC r323051: Add sysctls for arc shrinking and growing values The default value for arc_no_grow_shift may not be optimal when using several GiB ARC. Expose it via sysctl allows users to tune it easily. Also expose arc_grow_retry via sysctl for the same reason. The default value of 60s might, in case of intensive load, be too long. Submitted by: Nikita Kozlov Reviewed by: mav, manu, bapt Sponsored by: blade Differential Revision: https://reviews.freebsd.org/D12144 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 Sun Sep 17 06:32:05 2017 (r323666) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Sep 17 06:33:42 2017 (r323667) @@ -358,6 +358,7 @@ uint64_t zfs_arc_meta_limit = 0; uint64_t zfs_arc_meta_min = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; +int zfs_arc_no_grow_shift = 0; int zfs_arc_p_min_shift = 0; uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ u_int zfs_arc_free_target = 0; @@ -371,6 +372,7 @@ static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDL static int sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS); static int sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS); static int sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_ARGS); +static int sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS); #if defined(__FreeBSD__) && defined(_KERNEL) static void @@ -385,17 +387,25 @@ SYSINIT(arc_free_target_init, SI_SUB_KTHREAD_PAGE, SI_ TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); TUNABLE_QUAD("vfs.zfs.arc_meta_min", &zfs_arc_meta_min); TUNABLE_INT("vfs.zfs.arc_shrink_shift", &zfs_arc_shrink_shift); +TUNABLE_INT("vfs.zfs.arc_grow_retry", &zfs_arc_grow_retry); +TUNABLE_INT("vfs.zfs.arc_no_grow_shift", &zfs_arc_no_grow_shift); SYSCTL_DECL(_vfs_zfs); SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max, CTLTYPE_U64 | CTLFLAG_RWTUN, 0, sizeof(uint64_t), sysctl_vfs_zfs_arc_max, "QU", "Maximum ARC size"); SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min, CTLTYPE_U64 | CTLFLAG_RWTUN, 0, sizeof(uint64_t), sysctl_vfs_zfs_arc_min, "QU", "Minimum ARC size"); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift, CTLTYPE_U32 | CTLFLAG_RWTUN, + 0, sizeof(uint32_t), sysctl_vfs_zfs_arc_no_grow_shift, "U", + "log2(fraction of ARC which must be free to allow growing)"); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, &zfs_arc_average_blocksize, 0, "ARC average blocksize"); SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_shrink_shift, CTLFLAG_RW, &arc_shrink_shift, 0, "log2(fraction of arc to reclaim)"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_grow_retry, CTLFLAG_RW, + &arc_grow_retry, 0, + "Wait in seconds before considering growing ARC"); SYSCTL_INT(_vfs_zfs, OID_AUTO, compressed_arc_enabled, CTLFLAG_RDTUN, &zfs_compressed_arc_enabled, 0, "Enable compressed ARC"); @@ -1065,6 +1075,24 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS) } static int +sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS) +{ + uint32_t val; + int err; + + val = arc_no_grow_shift; + err = sysctl_handle_32(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val >= arc_shrink_shift) + return (EINVAL); + + arc_no_grow_shift = val; + return (0); +} + +static int sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS) { uint64_t val; @@ -6505,6 +6533,8 @@ arc_init(void) if (zfs_arc_shrink_shift > 0) arc_shrink_shift = zfs_arc_shrink_shift; + if (zfs_arc_no_grow_shift > 0) + arc_no_grow_shift = zfs_arc_no_grow_shift; /* * Ensure that arc_no_grow_shift is less than arc_shrink_shift. */ From owner-svn-src-all@freebsd.org Sun Sep 17 06:34: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 469A6E26D93; Sun, 17 Sep 2017 06:34: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 10A7D74809; Sun, 17 Sep 2017 06:34: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 v8H6Yp80094932; Sun, 17 Sep 2017 06:34:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6Yphs094931; Sun, 17 Sep 2017 06:34:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170634.v8H6Yphs094931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:34: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: r323668 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 323668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:34:52 -0000 Author: bapt Date: Sun Sep 17 06:34:51 2017 New Revision: 323668 URL: https://svnweb.freebsd.org/changeset/base/323668 Log: MFC r323160: Update pci_vendors to 2017-09-01 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 Sun Sep 17 06:33:42 2017 (r323667) +++ stable/11/share/misc/pci_vendors Sun Sep 17 06:34:51 2017 (r323668) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.07.27 -# Date: 2017-07-27 03:15:02 +# Version: 2017.09.01 +# Date: 2017-09-01 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -41,7 +41,8 @@ 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -0100 Ncipher Corp Ltd +# nee nCipher +0100 Thales e-Security 0123 General Dynamics # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne @@ -327,6 +328,7 @@ 1033 8336 SAS1068 0056 SAS1064ET PCI-Express Fusion-MPT SAS 1014 03bb ServeRAID BR10il SAS/SATA Controller v2 + 8086 34dc AXX4SASMOD RAID Controller 0057 M1064E MegaRAID SAS 8086 346c Embedded Software RAID Technology II (ESTRII) 0058 SAS1068E PCI-Express Fusion-MPT SAS @@ -369,7 +371,16 @@ 1028 1f38 PERC H710 Mini (for monolithics) 15d9 0690 LSI MegaRAID ROMB 8086 3510 RMS25PB080 RAID Controller + 8086 3511 RMS25PB040 RAID Controller + 8086 3512 RMT3PB080 RAID Controller 8086 3513 RMS25CB080 RAID Controller + 8086 3514 RMS25CB040 RAID Controller + 8086 351c RMS25PB080N RAID Controller + 8086 351d RMS25CB080N RAID Controller + 8086 9265 RS25DB080 RAID Controller + 8086 9268 RS25AB080 RAID Controller + 8086 9285 RS25NB008 RAID Controller + 8086 9288 RS25SB008 RAID Controller 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 1000 9361 MegaRAID SAS 9361-8i @@ -389,6 +400,12 @@ 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter + 8086 351e RMS3CC080 RAID Controller + 8086 351f RMS3CC040 RAID Controller + 8086 9360 RS3DC080 RAID Controller + 8086 9362 RS3DC040 RAID Controller + 8086 9380 RS3SC008 RAID Controller + 8086 9381 RS3MC044 RAID Controller 005e SAS1066 PCI-X Fusion-MPT SAS 005f MegaRAID SAS-3 3008 [Fury] 1028 1f44 PERC H330 Adapter @@ -444,6 +461,7 @@ 1028 1f20 PERC H200 Embedded 1028 1f22 Internal Tape Adapter 8086 350f RMS2LL040 RAID Controller + 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] 1000 9240 MegaRAID SAS 9240-8i 1000 9241 MegaRAID SAS 9240-4i @@ -499,12 +517,18 @@ 1043 8480 PIKE-2108 16PD 1734 1176 RAID Ctrl SAS 6G 5/6 512MB (D2616) 1734 1177 RAID Ctrl SAS 6G 0/1 (D2607) - 8086 9256 MegaRAID SAS 9260DE-8i + 8086 350b RMS2MH080 RAID Controller + 8086 9256 MegaRAID SAS 9260DE-8i RS2BL080DE 8086 9260 RAID Controller RS2BL040 8086 9261 RAID Controller RS2BL080 - 8086 9264 Warm Beach (Caster Lite) + 8086 9264 RAID Controller RT3WB080 Warm Beach (Caster Lite) 8086 9267 RAID Controller RS2VB040 8086 9268 RAID Controller RS2VB080 + 8086 9275 RAID Controller RS2PI008DE + 8086 9276 RAID Controller RS2WG160 + 8086 9280 RAID Controller RS2PI008 + 8086 9282 RAID Controller RS2MB044 + 8086 9290 RAID Controller RS2SG244 007c MegaRAID SAS 1078DE 1014 0395 ServeRAID-AR10is SAS/SATA Controller 007e SSS6200 PCI-Express Flash SSD @@ -535,6 +559,14 @@ 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i 1590 0044 H220i + 8086 3000 RS25GB008 RAID Controller + 8086 3060 RS25FB044 RAID Controller + 8086 3516 RMS25JB080 RAID Controller + 8086 3517 RMS25JB040 RAID Controller + 8086 3518 RMS25KB080 RAID Controller + 8086 3519 RMS25KB040 RAID Controller + 8086 351a RMS25LB040 RAID Controller + 8086 351b RMS25LB080 RAID Controller 008f 53c875J 1092 8000 FirePort 40 SCSI Controller 1092 8760 FirePort 40 Dual SCSI Host Adapter @@ -2267,6 +2299,7 @@ 1462 3050 R9 270 Gaming OC 148c 2016 Trinidad PRO [Radeon R9 370 OEM] 1682 2015 Trinidad PRO [Radeon R7 370] + 174b 2015 NITRO Radeon R7 370 174b 2016 Trinidad PRO [Radeon R9 370 OEM] 1787 2016 Trinidad PRO [Radeon R9 370 OEM] 6816 Pitcairn @@ -2437,7 +2470,7 @@ 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] - 687f Vega [Radeon RX Vega] + 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P @@ -3427,6 +3460,7 @@ aad8 Tonga HDMI Audio [Radeon R9 285/380] 174b aad8 Radeon R9 285/380 HDMI Audio aae8 Fiji HDMI/DP Audio [Radeon R9 Nano / FURY/FURY X] + aaf0 Ellesmere [Radeon RX 580] ac00 Theater 600 Pro ac02 TV Wonder HD 600 PCIe ac12 Theater HD T507 (DVB-T) TV tuner/capture device @@ -5964,7 +5998,10 @@ 0074 U4 HT Bridge # should be 14e4:1645 1645 Broadcom NetXtreme BCM5701 Gigabit Ethernet - 2001 PCI Express SSD + 2001 S1X NVMe Controller + 2002 S3ELab NVMe Controller + 2003 S3X NVMe Controller + 2005 ANS2 NVMe Controller 106c Hynix Semiconductor 8139 8139c 100BaseTX Ethernet Controller 8801 Dual Pentium ISA/PCI Motherboard @@ -6034,10 +6071,10 @@ 1077 02a7 QL45212-DE 25GbE Adapter 1077 e4f6 FastLinQ QL45211H 25GbE Adapter 1077 e4f7 FastLinQ QL45212H 25GbE Adapter - 165c FastLinQ QL45000 Series 40GbE Controller (FCoE) + 165c FastLinQ QL45000 Series 10/25/40/50GbE Controller (FCoE) 1077 e4f1 FastLinQ QL45462H 40GbE FCoE Adapter 1077 e4f2 FastLinQ QL45461H 40GbE FCoE Adapter - 165e FastLinQ QL45000 Series 40GbE Controller (iSCSI) + 165e FastLinQ QL45000 Series 10/25/40/50GbE Controller (iSCSI) 1077 e4f1 FastLinQ QL45462H 40GbE iSCSI Adapter 1077 e4f2 FastLinQ QL45461H 40GbE iSCSI Adapter 1664 FastLinQ QL45000 Series Gigabit Ethernet Controller (SR-IOV VF) @@ -7612,6 +7649,7 @@ 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter + 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial @@ -10753,6 +10791,7 @@ 1b82 GP104 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] + 1b87 GP104 [P104-100] 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] @@ -10768,6 +10807,8 @@ 1c01 GP106 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] + 1c07 GP106 [P106-100] + 1c09 GP106 [P106-090] 1c20 GP106M [GeForce GTX 1060 Mobile] 1c30 GP106GL [Quadro P2000] 1c35 GP106 @@ -10788,7 +10829,7 @@ 1cb2 GP107GL [Quadro P600] 1cb3 GP107GL [Quadro P400] 1d01 GP108 [GeForce GT 1030] - 1d10 GP108 [GeForce MX150] + 1d10 GP108M [GeForce MX150] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10962,6 +11003,7 @@ 1025 0813 Aspire R7-571 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3832 Yoga 520 522a RTS522A PCI Express Card Reader 5249 RTS5249 PCI Express Card Reader 103c 1909 ZBook 15 @@ -13048,6 +13090,7 @@ 1179 Toshiba America Info Systems 0102 Extended IDE Controller 0103 EX-IDE Type-B + 010f NVMe Controller 0404 DVD Decoder card 0406 Tecra Video Capture device 0407 DVD Decoder card (Version 2) @@ -16574,6 +16617,7 @@ a822 NVMe SSD Controller 172Xa 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 + 1014 0629 PCIe3 6.4TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16988,6 +17032,7 @@ 1655 NetXtreme BCM5717 Gigabit Ethernet PCIe 1656 NetXtreme BCM5718 Gigabit Ethernet PCIe 1657 NetXtreme BCM5719 Gigabit Ethernet PCIe + 1014 0420 FC 5260/5899 4-port 1 GbE Adapter for Power 103c 169d Ethernet 1Gb 4-port 331FLR Adapter 103c 22be Ethernet 1Gb 4-port 331i Adapter 103c 3383 Ethernet 1Gb 4-port 331T Adapter @@ -18253,6 +18298,7 @@ 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0008 ConnectX-4 Stand-up dual-port 100GbE MCX416A-CCAT 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter @@ -18349,6 +18395,7 @@ 0014 RamSan Flash SSD 0015 ZBox 15b7 Sandisk Corp + 2001 Skyhawk Series NVME SSD 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -19099,6 +19146,10 @@ 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 + 177d 0008 CN2350 [LiquidIO II] 2-port 10GbE SFP+ Intelligent adapter + 177d 0009 CN2360 [LiquidIO II] 2-port 10GbE SFP+ Intelligent adapter + 177d 000a CN2350 [LiquidIO II] 2-port 10GBASE-T Intelligent adapter + 177d 000b CN2360 [LiquidIO II] 2-port 10GBASE-T 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 @@ -19360,6 +19411,7 @@ 1a07 KintexUS PCIe Darklite Design [DNPCIe_40G_KU_LL] 1a08 KintexUS PCIe Darklite Design [DNPCIe_40G_KU_LL_QSFP] 1a09 Arria10 PCIe Darklite Design [DNPCIe_80G_A10_LL] + 1a0a VirtexUS PCIe Darklite Design [DNVUF2_HPC_PCIe] 17e4 Sectra AB 0001 KK671 Cardbus encryption board 0002 KK672 Cardbus encryption board @@ -19370,8 +19422,8 @@ 0021 EN2210 [c.Link] MoCA Network Controller (Coax) 0025 EN2510 [c.Link] MoCA Network Controller (Coax, PCIe interface) 0027 EN2710 [c.Link] MoCA 2.0 Network Controller (Coax, PCIe interface) - 3706 MoCA 2.0 Network Controller (Coax, PCIe interface) - 3711 MoCA 2.5 Network Controller (Coax, PCIe interface) + 3700 MoCA 2.0 Network Controller (Coax, PCIe interface) + 3710 MoCA 2.5 Network Controller (Coax, PCIe interface) 17ee Connect Components Ltd 17f2 Albatron Corp. 17f3 RDC Semiconductor, Inc. @@ -20570,6 +20622,7 @@ 0003 Ultrastar SN100 Series NVMe SSD 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter + 0023 Ultrastar SN200 Series NVMe SSD 1c5f Beijing Memblaze Technology Co. Ltd. 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) @@ -20608,6 +20661,65 @@ 0007 ExaNIC X40 1cf7 Subspace Dynamics 1d00 Pure Storage +1d0f Amazon.com, Inc. + cd01 NVMe SSD Controller + ec20 Elastic Network Adapter (ENA) +1d17 Zhaoxin + 070f ZX-100 PCI Express Root Port + 0710 ZX-100/ZX-200 PCI Express Root Port + 0711 ZX-100/ZX-200 PCI Express Root Port + 0712 ZX-100/ZX-200 PCI Express Root Port + 0713 ZX-100/ZX-200 PCI Express Root Port + 0714 ZX-100/ZX-200 PCI Express Root Port + 0715 ZX-100/ZX-200 PCI Express Root Port + 0716 ZX-D PCI Express Root Port + 0717 ZX-D PCI Express Root Port + 0718 ZX-D PCI Express Root Port + 0719 ZX-D PCI Express Root Port + 071a ZX-D PCI Express Root Port + 071b ZX-D PCI Express Root Port + 071c ZX-D PCI Express Root Port + 071d ZX-D PCI Express Root Port + 071e ZX-D PCI Express Root Port + 071f ZX-200 Upstream Port of PCI Express Switch + 0720 ZX-200 PCIE RC6 controller + 0721 ZX-200 Downstream Port of PCI Express Switch + 0722 ZX-200 PCIE P2C bridge + 1000 ZX-D Standard Host Bridge + 1001 ZX-D Miscellaneous Bus + 3001 ZX-100 Standard Host Bridge + 300a ZX-100 Miscellaneous Bus + 3038 ZX-100/ZX-200 Standard Universal PCI to USB Host Controller + 3104 ZX-100/ZX-200 Standard Enhanced PCI to USB Host Controller + 31b0 ZX-100/ZX-D Standard Host Bridge + 31b1 ZX-100/ZX-D Standard Host Bridge + 31b2 ZX-100/ZX-D DRAM Controller + 31b3 ZX-100/ZX-D Power Management Controller + 31b4 ZX-100/ZX-D I/O APIC + 31b5 ZX-100/ZX-D Scratch Device + 31b7 ZX-100/ZX-D Standard Host Bridge + 31b8 ZX-100/ZX-D PCI to PCI Bridge + 3288 ZX-100/ZX-D High Definition Audio Controller + 345b ZX-100/ZX-D Miscellaneous Bus + 3a02 ZX-100 C-320 GPU + 3a03 ZX-D C-860 GPU + 9002 ZX-100/ZX-200 EIDE Controller + 9003 ZX-100 EIDE Controller + 9045 ZX-100/ZX-D RAID Accelerator + 9046 ZX-D RAID Accelerator + 9083 ZX-100/ZX-200 StorX AHCI Controller + 9084 ZX-100 StorX AHCI Controller + 9100 ZX-200 Cross bus + 9101 ZX-200 Traffic Controller + 9141 ZX-100 High Definition Audio Controller + 9142 ZX-D High Definition Audio Controller + 9180 ZX-200 Networking Gigabit Ethernet Adapter + 9202 ZX-100 USB eXtensible Host Controller + 9203 ZX-200 USB eXtensible Host Controller + 9286 ZX-D eMMC Host Controller + 9300 ZX-D eSPI Host Controller + 95d0 ZX-100 Universal SD Host Controller + f410 ZX-100/ZX-D PCI Com Port 1d18 RME 0001 Fireface UFX+ 1d1d CNEX Labs @@ -20630,6 +20742,8 @@ 1d62 Nebbiolo Technologies 1d65 Imagine Communications Corp. 04de Taurus/McKinley +1d6a Aquantia Corp. + d107 AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 1d6c Atomic Rules LLC 1001 A5PL-E1 1002 A5PL-E7 @@ -21305,6 +21419,8 @@ 6178 DVB-S2 4 Tuner PCIe Card 544d 6904 TBS6904 DVB-S2 Quad Tuner PCIe Card 544d 6905 TBS6905 DVB-S2 Quad Tuner PCIe Card + 6205 0001 TBS6205 DVB-T2/T/C Quad TV Tuner PCIe Card + 6209 0001 TBS6209 DVB-T2/C2/T/C/ISDB-T OctaTV Tuner 5452 SCANLAB AG 3443 RTC4 5455 Technische University Berlin @@ -21336,6 +21452,8 @@ c147 Virtualized Graphics Device 5854 GoTView 5ace Beholder International Ltd. +6205 TBS Technologies (wrong ID) +6209 TBS Technologies (wrong ID) 631c SmartInfra Ltd 1652 PXI-1652 Signal Generator 2504 PXI-2504 Signal Interrogator @@ -23211,6 +23329,7 @@ 17aa 0000 ThinkServer X710 AnyFabric for 10GbE SFP+ 17aa 4001 ThinkServer X710-4 AnyFabric for 10GbE SFP+ 17aa 4002 ThinkServer X710-2 AnyFabric for 10GbE SFP+ + 19e5 d11c Ethernet 2-port X710 10Gb SFP+ Adapter SP330 8086 0000 Ethernet Converged Network Adapter X710 8086 0001 Ethernet Converged Network Adapter X710-4 8086 0002 Ethernet Converged Network Adapter X710-4 @@ -24639,8 +24758,11 @@ 1590 00e8 100Gb 1-port OP101 QSFP28 x16 PCIe Gen3 with Intel Omni-Path Adapter 1590 021c Apollo 100Gb 1-port Intel Omni-Path Architecture 860z Mezzanine FIO Adapter 15d9 0934 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, SIOM Module + 15d9 099b Omni-path HFI Mezz AOC, 1 Port, PCIe x16. 1cb8 0001 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC4600 QSFP28 1cb8 0002 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC6600 Fixed Port + 1cb8 0003 Omni-Path HFI Adapter 100 Series, 2 Port, 2 PCIe x16, Earth Simulation QSFP28 + 1cb8 0004 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC4600E QSFP28 8086 2628 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16 8086 2629 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x8 8086 262a Omni-Path HFI Adapter 100 Series, 2 Ports, Split PCIe x16 @@ -27363,6 +27485,8 @@ 5912 HD Graphics 630 5916 HD Graphics 620 17aa 224f ThinkPad X1 Carbon 5th Gen + 591d HD Graphics P630 + 591f Intel Kaby Lake Host Bridge 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster @@ -28049,6 +28173,7 @@ 9d17 Sunrise Point-LP PCI Express Root Port #8 9d18 Sunrise Point-LP PCI Express Root Port #9 17aa 382a B51-80 Laptop + 9d19 Sunrise Point-LP PCI Express Root Port #10 9d21 Sunrise Point-LP PMC 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen @@ -28069,6 +28194,7 @@ 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop + 9d35 Sunrise Point-LP Integrated Sensor Hub 9d3a Sunrise Point-LP CSME HECI #1 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen @@ -28077,6 +28203,7 @@ 17aa 382a B51-80 Laptop 9d48 Sunrise Point-LP LPC Controller 1028 06f3 Latitude 3570 + 9d56 Sunrise Point-LP LPC Controller 9d58 Sunrise Point-LP LPC Controller 17aa 224f ThinkPad X1 Carbon 5th Gen 9d60 Sunrise Point-LP Serial IO I2C Controller #0 @@ -28091,6 +28218,7 @@ 9d70 Sunrise Point-LP HD Audio 1028 06f3 Latitude 3570 17aa 382a B51-80 Laptop + 9d71 Sunrise Point-LP HD Audio a000 Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge 1458 5000 GA-D525TUD 8086 4f4d DeskTop Board D510MO @@ -28190,6 +28318,7 @@ a169 Sunrise Point-H PCI Root Port #19 a16a Sunrise Point-H PCI Root Port #20 a170 Sunrise Point-H HD Audio + a171 CM238 HD Audio Controller a182 Lewisburg SATA Controller [AHCI mode] a186 Lewisburg SATA Controller [RAID mode] a190 Lewisburg PCI Express Root Port #1 From owner-svn-src-all@freebsd.org Sun Sep 17 06:35: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 AE612E26E40; Sun, 17 Sep 2017 06:35:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 796347494C; Sun, 17 Sep 2017 06:35:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8H6ZXAC095010; Sun, 17 Sep 2017 06:35:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H6ZXW8095009; Sun, 17 Sep 2017 06:35:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201709170635.v8H6ZXW8095009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 17 Sep 2017 06:35: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: r323669 - stable/10/share/misc X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/share/misc X-SVN-Commit-Revision: 323669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 06:35:34 -0000 Author: bapt Date: Sun Sep 17 06:35:33 2017 New Revision: 323669 URL: https://svnweb.freebsd.org/changeset/base/323669 Log: MFC r323160: Update pci_vendors to 2017-09-01 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Sun Sep 17 06:34:51 2017 (r323668) +++ stable/10/share/misc/pci_vendors Sun Sep 17 06:35:33 2017 (r323669) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.07.27 -# Date: 2017-07-27 03:15:02 +# Version: 2017.09.01 +# Date: 2017-09-01 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -41,7 +41,8 @@ 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter 00a7 Teles AG (Wrong ID) -0100 Ncipher Corp Ltd +# nee nCipher +0100 Thales e-Security 0123 General Dynamics # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne @@ -327,6 +328,7 @@ 1033 8336 SAS1068 0056 SAS1064ET PCI-Express Fusion-MPT SAS 1014 03bb ServeRAID BR10il SAS/SATA Controller v2 + 8086 34dc AXX4SASMOD RAID Controller 0057 M1064E MegaRAID SAS 8086 346c Embedded Software RAID Technology II (ESTRII) 0058 SAS1068E PCI-Express Fusion-MPT SAS @@ -369,7 +371,16 @@ 1028 1f38 PERC H710 Mini (for monolithics) 15d9 0690 LSI MegaRAID ROMB 8086 3510 RMS25PB080 RAID Controller + 8086 3511 RMS25PB040 RAID Controller + 8086 3512 RMT3PB080 RAID Controller 8086 3513 RMS25CB080 RAID Controller + 8086 3514 RMS25CB040 RAID Controller + 8086 351c RMS25PB080N RAID Controller + 8086 351d RMS25CB080N RAID Controller + 8086 9265 RS25DB080 RAID Controller + 8086 9268 RS25AB080 RAID Controller + 8086 9285 RS25NB008 RAID Controller + 8086 9288 RS25SB008 RAID Controller 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 1000 9361 MegaRAID SAS 9361-8i @@ -389,6 +400,12 @@ 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter + 8086 351e RMS3CC080 RAID Controller + 8086 351f RMS3CC040 RAID Controller + 8086 9360 RS3DC080 RAID Controller + 8086 9362 RS3DC040 RAID Controller + 8086 9380 RS3SC008 RAID Controller + 8086 9381 RS3MC044 RAID Controller 005e SAS1066 PCI-X Fusion-MPT SAS 005f MegaRAID SAS-3 3008 [Fury] 1028 1f44 PERC H330 Adapter @@ -444,6 +461,7 @@ 1028 1f20 PERC H200 Embedded 1028 1f22 Internal Tape Adapter 8086 350f RMS2LL040 RAID Controller + 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] 1000 9240 MegaRAID SAS 9240-8i 1000 9241 MegaRAID SAS 9240-4i @@ -499,12 +517,18 @@ 1043 8480 PIKE-2108 16PD 1734 1176 RAID Ctrl SAS 6G 5/6 512MB (D2616) 1734 1177 RAID Ctrl SAS 6G 0/1 (D2607) - 8086 9256 MegaRAID SAS 9260DE-8i + 8086 350b RMS2MH080 RAID Controller + 8086 9256 MegaRAID SAS 9260DE-8i RS2BL080DE 8086 9260 RAID Controller RS2BL040 8086 9261 RAID Controller RS2BL080 - 8086 9264 Warm Beach (Caster Lite) + 8086 9264 RAID Controller RT3WB080 Warm Beach (Caster Lite) 8086 9267 RAID Controller RS2VB040 8086 9268 RAID Controller RS2VB080 + 8086 9275 RAID Controller RS2PI008DE + 8086 9276 RAID Controller RS2WG160 + 8086 9280 RAID Controller RS2PI008 + 8086 9282 RAID Controller RS2MB044 + 8086 9290 RAID Controller RS2SG244 007c MegaRAID SAS 1078DE 1014 0395 ServeRAID-AR10is SAS/SATA Controller 007e SSS6200 PCI-Express Flash SSD @@ -535,6 +559,14 @@ 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i 1590 0044 H220i + 8086 3000 RS25GB008 RAID Controller + 8086 3060 RS25FB044 RAID Controller + 8086 3516 RMS25JB080 RAID Controller + 8086 3517 RMS25JB040 RAID Controller + 8086 3518 RMS25KB080 RAID Controller + 8086 3519 RMS25KB040 RAID Controller + 8086 351a RMS25LB040 RAID Controller + 8086 351b RMS25LB080 RAID Controller 008f 53c875J 1092 8000 FirePort 40 SCSI Controller 1092 8760 FirePort 40 Dual SCSI Host Adapter @@ -2267,6 +2299,7 @@ 1462 3050 R9 270 Gaming OC 148c 2016 Trinidad PRO [Radeon R9 370 OEM] 1682 2015 Trinidad PRO [Radeon R7 370] + 174b 2015 NITRO Radeon R7 370 174b 2016 Trinidad PRO [Radeon R9 370 OEM] 1787 2016 Trinidad PRO [Radeon R9 370 OEM] 6816 Pitcairn @@ -2437,7 +2470,7 @@ 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] - 687f Vega [Radeon RX Vega] + 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P @@ -3427,6 +3460,7 @@ aad8 Tonga HDMI Audio [Radeon R9 285/380] 174b aad8 Radeon R9 285/380 HDMI Audio aae8 Fiji HDMI/DP Audio [Radeon R9 Nano / FURY/FURY X] + aaf0 Ellesmere [Radeon RX 580] ac00 Theater 600 Pro ac02 TV Wonder HD 600 PCIe ac12 Theater HD T507 (DVB-T) TV tuner/capture device @@ -5964,7 +5998,10 @@ 0074 U4 HT Bridge # should be 14e4:1645 1645 Broadcom NetXtreme BCM5701 Gigabit Ethernet - 2001 PCI Express SSD + 2001 S1X NVMe Controller + 2002 S3ELab NVMe Controller + 2003 S3X NVMe Controller + 2005 ANS2 NVMe Controller 106c Hynix Semiconductor 8139 8139c 100BaseTX Ethernet Controller 8801 Dual Pentium ISA/PCI Motherboard @@ -6034,10 +6071,10 @@ 1077 02a7 QL45212-DE 25GbE Adapter 1077 e4f6 FastLinQ QL45211H 25GbE Adapter 1077 e4f7 FastLinQ QL45212H 25GbE Adapter - 165c FastLinQ QL45000 Series 40GbE Controller (FCoE) + 165c FastLinQ QL45000 Series 10/25/40/50GbE Controller (FCoE) 1077 e4f1 FastLinQ QL45462H 40GbE FCoE Adapter 1077 e4f2 FastLinQ QL45461H 40GbE FCoE Adapter - 165e FastLinQ QL45000 Series 40GbE Controller (iSCSI) + 165e FastLinQ QL45000 Series 10/25/40/50GbE Controller (iSCSI) 1077 e4f1 FastLinQ QL45462H 40GbE iSCSI Adapter 1077 e4f2 FastLinQ QL45461H 40GbE iSCSI Adapter 1664 FastLinQ QL45000 Series Gigabit Ethernet Controller (SR-IOV VF) @@ -7612,6 +7649,7 @@ 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter + 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial @@ -10753,6 +10791,7 @@ 1b82 GP104 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] + 1b87 GP104 [P104-100] 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] @@ -10768,6 +10807,8 @@ 1c01 GP106 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] + 1c07 GP106 [P106-100] + 1c09 GP106 [P106-090] 1c20 GP106M [GeForce GTX 1060 Mobile] 1c30 GP106GL [Quadro P2000] 1c35 GP106 @@ -10788,7 +10829,7 @@ 1cb2 GP107GL [Quadro P600] 1cb3 GP107GL [Quadro P400] 1d01 GP108 [GeForce GT 1030] - 1d10 GP108 [GeForce MX150] + 1d10 GP108M [GeForce MX150] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10962,6 +11003,7 @@ 1025 0813 Aspire R7-571 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3832 Yoga 520 522a RTS522A PCI Express Card Reader 5249 RTS5249 PCI Express Card Reader 103c 1909 ZBook 15 @@ -13048,6 +13090,7 @@ 1179 Toshiba America Info Systems 0102 Extended IDE Controller 0103 EX-IDE Type-B + 010f NVMe Controller 0404 DVD Decoder card 0406 Tecra Video Capture device 0407 DVD Decoder card (Version 2) @@ -16574,6 +16617,7 @@ a822 NVMe SSD Controller 172Xa 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 + 1014 0629 PCIe3 6.4TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16988,6 +17032,7 @@ 1655 NetXtreme BCM5717 Gigabit Ethernet PCIe 1656 NetXtreme BCM5718 Gigabit Ethernet PCIe 1657 NetXtreme BCM5719 Gigabit Ethernet PCIe + 1014 0420 FC 5260/5899 4-port 1 GbE Adapter for Power 103c 169d Ethernet 1Gb 4-port 331FLR Adapter 103c 22be Ethernet 1Gb 4-port 331i Adapter 103c 3383 Ethernet 1Gb 4-port 331T Adapter @@ -18253,6 +18298,7 @@ 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0008 ConnectX-4 Stand-up dual-port 100GbE MCX416A-CCAT 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter @@ -18349,6 +18395,7 @@ 0014 RamSan Flash SSD 0015 ZBox 15b7 Sandisk Corp + 2001 Skyhawk Series NVME SSD 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -19099,6 +19146,10 @@ 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 + 177d 0008 CN2350 [LiquidIO II] 2-port 10GbE SFP+ Intelligent adapter + 177d 0009 CN2360 [LiquidIO II] 2-port 10GbE SFP+ Intelligent adapter + 177d 000a CN2350 [LiquidIO II] 2-port 10GBASE-T Intelligent adapter + 177d 000b CN2360 [LiquidIO II] 2-port 10GBASE-T 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 @@ -19360,6 +19411,7 @@ 1a07 KintexUS PCIe Darklite Design [DNPCIe_40G_KU_LL] 1a08 KintexUS PCIe Darklite Design [DNPCIe_40G_KU_LL_QSFP] 1a09 Arria10 PCIe Darklite Design [DNPCIe_80G_A10_LL] + 1a0a VirtexUS PCIe Darklite Design [DNVUF2_HPC_PCIe] 17e4 Sectra AB 0001 KK671 Cardbus encryption board 0002 KK672 Cardbus encryption board @@ -19370,8 +19422,8 @@ 0021 EN2210 [c.Link] MoCA Network Controller (Coax) 0025 EN2510 [c.Link] MoCA Network Controller (Coax, PCIe interface) 0027 EN2710 [c.Link] MoCA 2.0 Network Controller (Coax, PCIe interface) - 3706 MoCA 2.0 Network Controller (Coax, PCIe interface) - 3711 MoCA 2.5 Network Controller (Coax, PCIe interface) + 3700 MoCA 2.0 Network Controller (Coax, PCIe interface) + 3710 MoCA 2.5 Network Controller (Coax, PCIe interface) 17ee Connect Components Ltd 17f2 Albatron Corp. 17f3 RDC Semiconductor, Inc. @@ -20570,6 +20622,7 @@ 0003 Ultrastar SN100 Series NVMe SSD 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter + 0023 Ultrastar SN200 Series NVMe SSD 1c5f Beijing Memblaze Technology Co. Ltd. 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) @@ -20608,6 +20661,65 @@ 0007 ExaNIC X40 1cf7 Subspace Dynamics 1d00 Pure Storage +1d0f Amazon.com, Inc. + cd01 NVMe SSD Controller + ec20 Elastic Network Adapter (ENA) +1d17 Zhaoxin + 070f ZX-100 PCI Express Root Port + 0710 ZX-100/ZX-200 PCI Express Root Port + 0711 ZX-100/ZX-200 PCI Express Root Port + 0712 ZX-100/ZX-200 PCI Express Root Port + 0713 ZX-100/ZX-200 PCI Express Root Port + 0714 ZX-100/ZX-200 PCI Express Root Port + 0715 ZX-100/ZX-200 PCI Express Root Port + 0716 ZX-D PCI Express Root Port + 0717 ZX-D PCI Express Root Port + 0718 ZX-D PCI Express Root Port + 0719 ZX-D PCI Express Root Port + 071a ZX-D PCI Express Root Port + 071b ZX-D PCI Express Root Port + 071c ZX-D PCI Express Root Port + 071d ZX-D PCI Express Root Port + 071e ZX-D PCI Express Root Port + 071f ZX-200 Upstream Port of PCI Express Switch + 0720 ZX-200 PCIE RC6 controller + 0721 ZX-200 Downstream Port of PCI Express Switch + 0722 ZX-200 PCIE P2C bridge + 1000 ZX-D Standard Host Bridge + 1001 ZX-D Miscellaneous Bus + 3001 ZX-100 Standard Host Bridge + 300a ZX-100 Miscellaneous Bus + 3038 ZX-100/ZX-200 Standard Universal PCI to USB Host Controller + 3104 ZX-100/ZX-200 Standard Enhanced PCI to USB Host Controller + 31b0 ZX-100/ZX-D Standard Host Bridge + 31b1 ZX-100/ZX-D Standard Host Bridge + 31b2 ZX-100/ZX-D DRAM Controller + 31b3 ZX-100/ZX-D Power Management Controller + 31b4 ZX-100/ZX-D I/O APIC + 31b5 ZX-100/ZX-D Scratch Device + 31b7 ZX-100/ZX-D Standard Host Bridge + 31b8 ZX-100/ZX-D PCI to PCI Bridge + 3288 ZX-100/ZX-D High Definition Audio Controller + 345b ZX-100/ZX-D Miscellaneous Bus + 3a02 ZX-100 C-320 GPU + 3a03 ZX-D C-860 GPU + 9002 ZX-100/ZX-200 EIDE Controller + 9003 ZX-100 EIDE Controller + 9045 ZX-100/ZX-D RAID Accelerator + 9046 ZX-D RAID Accelerator + 9083 ZX-100/ZX-200 StorX AHCI Controller + 9084 ZX-100 StorX AHCI Controller + 9100 ZX-200 Cross bus + 9101 ZX-200 Traffic Controller + 9141 ZX-100 High Definition Audio Controller + 9142 ZX-D High Definition Audio Controller + 9180 ZX-200 Networking Gigabit Ethernet Adapter + 9202 ZX-100 USB eXtensible Host Controller + 9203 ZX-200 USB eXtensible Host Controller + 9286 ZX-D eMMC Host Controller + 9300 ZX-D eSPI Host Controller + 95d0 ZX-100 Universal SD Host Controller + f410 ZX-100/ZX-D PCI Com Port 1d18 RME 0001 Fireface UFX+ 1d1d CNEX Labs @@ -20630,6 +20742,8 @@ 1d62 Nebbiolo Technologies 1d65 Imagine Communications Corp. 04de Taurus/McKinley +1d6a Aquantia Corp. + d107 AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 1d6c Atomic Rules LLC 1001 A5PL-E1 1002 A5PL-E7 @@ -21305,6 +21419,8 @@ 6178 DVB-S2 4 Tuner PCIe Card 544d 6904 TBS6904 DVB-S2 Quad Tuner PCIe Card 544d 6905 TBS6905 DVB-S2 Quad Tuner PCIe Card + 6205 0001 TBS6205 DVB-T2/T/C Quad TV Tuner PCIe Card + 6209 0001 TBS6209 DVB-T2/C2/T/C/ISDB-T OctaTV Tuner 5452 SCANLAB AG 3443 RTC4 5455 Technische University Berlin @@ -21336,6 +21452,8 @@ c147 Virtualized Graphics Device 5854 GoTView 5ace Beholder International Ltd. +6205 TBS Technologies (wrong ID) +6209 TBS Technologies (wrong ID) 631c SmartInfra Ltd 1652 PXI-1652 Signal Generator 2504 PXI-2504 Signal Interrogator @@ -23211,6 +23329,7 @@ 17aa 0000 ThinkServer X710 AnyFabric for 10GbE SFP+ 17aa 4001 ThinkServer X710-4 AnyFabric for 10GbE SFP+ 17aa 4002 ThinkServer X710-2 AnyFabric for 10GbE SFP+ + 19e5 d11c Ethernet 2-port X710 10Gb SFP+ Adapter SP330 8086 0000 Ethernet Converged Network Adapter X710 8086 0001 Ethernet Converged Network Adapter X710-4 8086 0002 Ethernet Converged Network Adapter X710-4 @@ -24639,8 +24758,11 @@ 1590 00e8 100Gb 1-port OP101 QSFP28 x16 PCIe Gen3 with Intel Omni-Path Adapter 1590 021c Apollo 100Gb 1-port Intel Omni-Path Architecture 860z Mezzanine FIO Adapter 15d9 0934 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, SIOM Module + 15d9 099b Omni-path HFI Mezz AOC, 1 Port, PCIe x16. 1cb8 0001 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC4600 QSFP28 1cb8 0002 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC6600 Fixed Port + 1cb8 0003 Omni-Path HFI Adapter 100 Series, 2 Port, 2 PCIe x16, Earth Simulation QSFP28 + 1cb8 0004 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16, TC4600E QSFP28 8086 2628 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16 8086 2629 Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x8 8086 262a Omni-Path HFI Adapter 100 Series, 2 Ports, Split PCIe x16 @@ -27363,6 +27485,8 @@ 5912 HD Graphics 630 5916 HD Graphics 620 17aa 224f ThinkPad X1 Carbon 5th Gen + 591d HD Graphics P630 + 591f Intel Kaby Lake Host Bridge 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster @@ -28049,6 +28173,7 @@ 9d17 Sunrise Point-LP PCI Express Root Port #8 9d18 Sunrise Point-LP PCI Express Root Port #9 17aa 382a B51-80 Laptop + 9d19 Sunrise Point-LP PCI Express Root Port #10 9d21 Sunrise Point-LP PMC 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen @@ -28069,6 +28194,7 @@ 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop + 9d35 Sunrise Point-LP Integrated Sensor Hub 9d3a Sunrise Point-LP CSME HECI #1 1028 06f3 Latitude 3570 17aa 224f ThinkPad X1 Carbon 5th Gen @@ -28077,6 +28203,7 @@ 17aa 382a B51-80 Laptop 9d48 Sunrise Point-LP LPC Controller 1028 06f3 Latitude 3570 + 9d56 Sunrise Point-LP LPC Controller 9d58 Sunrise Point-LP LPC Controller 17aa 224f ThinkPad X1 Carbon 5th Gen 9d60 Sunrise Point-LP Serial IO I2C Controller #0 @@ -28091,6 +28218,7 @@ 9d70 Sunrise Point-LP HD Audio 1028 06f3 Latitude 3570 17aa 382a B51-80 Laptop + 9d71 Sunrise Point-LP HD Audio a000 Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge 1458 5000 GA-D525TUD 8086 4f4d DeskTop Board D510MO @@ -28190,6 +28318,7 @@ a169 Sunrise Point-H PCI Root Port #19 a16a Sunrise Point-H PCI Root Port #20 a170 Sunrise Point-H HD Audio + a171 CM238 HD Audio Controller a182 Lewisburg SATA Controller [AHCI mode] a186 Lewisburg SATA Controller [RAID mode] a190 Lewisburg PCI Express Root Port #1 From owner-svn-src-all@freebsd.org Sun Sep 17 09:27: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 15CC0E05D97; Sun, 17 Sep 2017 09:27:29 +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 D67B57CA2E; Sun, 17 Sep 2017 09:27:28 +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 v8H9RS6f064204; Sun, 17 Sep 2017 09:27:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H9RSI7064203; Sun, 17 Sep 2017 09:27:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709170927.v8H9RSI7064203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 17 Sep 2017 09:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323670 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 09:27:29 -0000 Author: tuexen Date: Sun Sep 17 09:27:27 2017 New Revision: 323670 URL: https://svnweb.freebsd.org/changeset/base/323670 Log: Fix an accounting bug and use sctp_timer_start to start a timer. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun Sep 17 06:35:33 2017 (r323669) +++ head/sys/netinet/sctp_indata.c Sun Sep 17 09:27:27 2017 (r323670) @@ -1594,9 +1594,17 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc next_fsn, control->fsn_included); TAILQ_REMOVE(&control->reasm, at, sctp_next); lenadded = sctp_add_chk_to_control(control, strm, stcb, asoc, at, SCTP_READ_LOCK_NOT_HELD); - asoc->size_on_all_streams += lenadded; if (control->on_read_q) { do_wakeup = 1; + } else { + /* + * We only add to the + * size-on-all-streams if its not on + * the read q. The read q flag will + * cause a sballoc so its accounted + * for there. + */ + asoc->size_on_all_streams += lenadded; } next_fsn++; if (control->end_added && control->pdapi_started) { @@ -4229,8 +4237,7 @@ again: } if (net->flight_size) { j++; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); + sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); if (net->window_probe) { net->window_probe = 0; } @@ -4242,8 +4249,7 @@ again: */ net->window_probe = 0; if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { - SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); + sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, From owner-svn-src-all@freebsd.org Sun Sep 17 10:28: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 57976E0873B; Sun, 17 Sep 2017 10:28:47 +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 215397DF73; Sun, 17 Sep 2017 10:28:47 +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 v8HASk4p088176; Sun, 17 Sep 2017 10:28:46 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HASkGa088174; Sun, 17 Sep 2017 10:28:46 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709171028.v8HASkGa088174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 17 Sep 2017 10:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323671 - in head: . sbin/geom/class/eli X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: . sbin/geom/class/eli X-SVN-Commit-Revision: 323671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:28:47 -0000 Author: oshogbo Date: Sun Sep 17 10:28:45 2017 New Revision: 323671 URL: https://svnweb.freebsd.org/changeset/base/323671 Log: Fix language used in the r322923. Pointed out by: wblock@ MFC after: 1 week X-MFC-with: r322923 Modified: head/UPDATING head/sbin/geom/class/eli/geli.8 Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Sep 17 09:27:27 2017 (r323670) +++ head/UPDATING Sun Sep 17 10:28:45 2017 (r323671) @@ -66,8 +66,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: soft-float everything else should be affected. 20170826: - During boot the geli passphrase will be hidden. To restore previous - behavior see geli(8) configuration options. + The geli password typed at boot is now hidden. To restore the previous + behavior, see geli(8) for configuration options. 20170825: Move PMTUD blackhole counters to TCPSTATS and remove them from bare Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Sun Sep 17 09:27:27 2017 (r323670) +++ head/sbin/geom/class/eli/geli.8 Sun Sep 17 10:28:45 2017 (r323671) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 26, 2017 +.Dd September 17, 2017 .Dt GELI 8 .Os .Sh NAME @@ -280,8 +280,10 @@ To inhibit backups, you can use as the .Ar backupfile . .It Fl d -While booting from this encrypted root filesystem enable visibility of -passphrase length. +When entering the passphrase to boot from this encrypted root filesystem, echo +.Ql * +characters. +This makes the length of the passphrase visible. .It Fl e Ar ealgo Encryption algorithm to use. Currently supported algorithms are: @@ -494,11 +496,14 @@ subcommand. .It Fl B Remove the BOOT flag from the given providers. .It Fl d -While booting from this encrypted root filesystem enable visibility of -passphrase length. +When entering the passphrase to boot from this encrypted root filesystem, echo +.Ql * +characters. +This makes the length of the passphrase visible. .It Fl D -While booting from this encrypted root filesystem disable visibility of -passphrase length. +Disable echoing of any characters when a passphrase is entered to boot from this +encrypted root filesystem. +This hides the passphrase length. .It Fl g Enable booting from this encrypted root filesystem. The boot loader prompts for the passphrase and loads From owner-svn-src-all@freebsd.org Sun Sep 17 10:43: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 0584BE09273; Sun, 17 Sep 2017 10:43: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 C6B2C7E79F; Sun, 17 Sep 2017 10:43:28 +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 v8HAhRPs096128; Sun, 17 Sep 2017 10:43:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HAhRn0096126; Sun, 17 Sep 2017 10:43:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709171043.v8HAhRn0096126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Sep 2017 10:43: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: r323672 - stable/11/sys/dev/ichwd X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ichwd X-SVN-Commit-Revision: 323672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:43:29 -0000 Author: kib Date: Sun Sep 17 10:43:27 2017 New Revision: 323672 URL: https://svnweb.freebsd.org/changeset/base/323672 Log: MFC r314477 (by imp): Fix TCO v3 tick convert. Modified: stable/11/sys/dev/ichwd/ichwd.c stable/11/sys/dev/ichwd/ichwd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.c Sun Sep 17 10:28:45 2017 (r323671) +++ stable/11/sys/dev/ichwd/ichwd.c Sun Sep 17 10:43:27 2017 (r323672) @@ -512,7 +512,13 @@ ichwd_event(void *arg, unsigned int cmd, int *error) /* convert from power-of-two-ns to WDT ticks */ cmd &= WD_INTERVAL; - timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; + + if (sc->tco_version == 3) { + timeout = ((uint64_t)1 << cmd) / ICHWD_TCO_V3_TICK; + } else { + timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; + } + if (cmd) { if (!sc->active) ichwd_tmr_enable(sc); Modified: stable/11/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:28:45 2017 (r323671) +++ stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:43:27 2017 (r323672) @@ -345,7 +345,9 @@ struct ichwd_softc { #define TCO_RLD1_TMR_MAX 0x003f #define TCO_RLD2_TMR_MAX 0x03ff -/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) */ +/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ #define ICHWD_TICK 600000000 +/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ +#define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-all@freebsd.org Sun Sep 17 10:45: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 65847E09459; Sun, 17 Sep 2017 10:45:09 +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 141F37E92A; Sun, 17 Sep 2017 10:45:09 +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 v8HAj8Ah096259; Sun, 17 Sep 2017 10:45:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HAj8Y5096258; Sun, 17 Sep 2017 10:45:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709171045.v8HAj8Y5096258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Sep 2017 10:45:08 +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: r323673 - stable/11/sys/dev/ichwd X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ichwd X-SVN-Commit-Revision: 323673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:45:09 -0000 Author: kib Date: Sun Sep 17 10:45:08 2017 New Revision: 323673 URL: https://svnweb.freebsd.org/changeset/base/323673 Log: MFC r323386: Style: tab after #define. Modified: stable/11/sys/dev/ichwd/ichwd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:43:27 2017 (r323672) +++ stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:45:08 2017 (r323673) @@ -29,7 +29,7 @@ */ #ifndef _ICHWD_H_ -#define _ICHWD_H_ +#define _ICHWD_H_ struct ichwd_device { uint16_t device; @@ -60,279 +60,279 @@ struct ichwd_softc { eventhandler_tag ev_tag; }; -#define VENDORID_INTEL 0x8086 -#define DEVICEID_BAYTRAIL 0x0f1c -#define DEVICEID_CPT0 0x1c40 -#define DEVICEID_CPT1 0x1c41 -#define DEVICEID_CPT2 0x1c42 -#define DEVICEID_CPT3 0x1c43 -#define DEVICEID_CPT4 0x1c44 -#define DEVICEID_CPT5 0x1c45 -#define DEVICEID_CPT6 0x1c46 -#define DEVICEID_CPT7 0x1c47 -#define DEVICEID_CPT8 0x1c48 -#define DEVICEID_CPT9 0x1c49 -#define DEVICEID_CPT10 0x1c4a -#define DEVICEID_CPT11 0x1c4b -#define DEVICEID_CPT12 0x1c4c -#define DEVICEID_CPT13 0x1c4d -#define DEVICEID_CPT14 0x1c4e -#define DEVICEID_CPT15 0x1c4f -#define DEVICEID_CPT16 0x1c50 -#define DEVICEID_CPT17 0x1c51 -#define DEVICEID_CPT18 0x1c52 -#define DEVICEID_CPT19 0x1c53 -#define DEVICEID_CPT20 0x1c54 -#define DEVICEID_CPT21 0x1c55 -#define DEVICEID_CPT22 0x1c56 -#define DEVICEID_CPT23 0x1c57 -#define DEVICEID_CPT24 0x1c58 -#define DEVICEID_CPT25 0x1c59 -#define DEVICEID_CPT26 0x1c5a -#define DEVICEID_CPT27 0x1c5b -#define DEVICEID_CPT28 0x1c5c -#define DEVICEID_CPT29 0x1c5d -#define DEVICEID_CPT30 0x1c5e -#define DEVICEID_CPT31 0x1c5f -#define DEVICEID_PATSBURG_LPC1 0x1d40 -#define DEVICEID_PATSBURG_LPC2 0x1d41 -#define DEVICEID_PPT0 0x1e40 -#define DEVICEID_PPT1 0x1e41 -#define DEVICEID_PPT2 0x1e42 -#define DEVICEID_PPT3 0x1e43 -#define DEVICEID_PPT4 0x1e44 -#define DEVICEID_PPT5 0x1e45 -#define DEVICEID_PPT6 0x1e46 -#define DEVICEID_PPT7 0x1e47 -#define DEVICEID_PPT8 0x1e48 -#define DEVICEID_PPT9 0x1e49 -#define DEVICEID_PPT10 0x1e4a -#define DEVICEID_PPT11 0x1e4b -#define DEVICEID_PPT12 0x1e4c -#define DEVICEID_PPT13 0x1e4d -#define DEVICEID_PPT14 0x1e4e -#define DEVICEID_PPT15 0x1e4f -#define DEVICEID_PPT16 0x1e50 -#define DEVICEID_PPT17 0x1e51 -#define DEVICEID_PPT18 0x1e52 -#define DEVICEID_PPT19 0x1e53 -#define DEVICEID_PPT20 0x1e54 -#define DEVICEID_PPT21 0x1e55 -#define DEVICEID_PPT22 0x1e56 -#define DEVICEID_PPT23 0x1e57 -#define DEVICEID_PPT24 0x1e58 -#define DEVICEID_PPT25 0x1e59 -#define DEVICEID_PPT26 0x1e5a -#define DEVICEID_PPT27 0x1e5b -#define DEVICEID_PPT28 0x1e5c -#define DEVICEID_PPT29 0x1e5d -#define DEVICEID_PPT30 0x1e5e -#define DEVICEID_PPT31 0x1e5f -#define DEVICEID_AVN0 0x1f38 -#define DEVICEID_AVN1 0x1f39 -#define DEVICEID_AVN2 0x1f3a -#define DEVICEID_AVN3 0x1f3b -#define DEVICEID_BRASWELL 0x229c -#define DEVICEID_DH89XXCC_LPC 0x2310 -#define DEVICEID_COLETOCRK_LPC 0x2390 -#define DEVICEID_82801AA 0x2410 -#define DEVICEID_82801AB 0x2420 -#define DEVICEID_82801BA 0x2440 -#define DEVICEID_82801BAM 0x244c -#define DEVICEID_82801CA 0x2480 -#define DEVICEID_82801CAM 0x248c -#define DEVICEID_82801DB 0x24c0 -#define DEVICEID_82801DBM 0x24cc -#define DEVICEID_82801E 0x2450 -#define DEVICEID_82801EB 0x24dc -#define DEVICEID_82801EBR 0x24d0 -#define DEVICEID_6300ESB 0x25a1 -#define DEVICEID_82801FBR 0x2640 -#define DEVICEID_ICH6M 0x2641 -#define DEVICEID_ICH6W 0x2642 -#define DEVICEID_63XXESB 0x2670 -#define DEVICEID_ICH7 0x27b8 -#define DEVICEID_ICH7DH 0x27b0 -#define DEVICEID_ICH7M 0x27b9 -#define DEVICEID_NM10 0x27bc -#define DEVICEID_ICH7MDH 0x27bd -#define DEVICEID_ICH8 0x2810 -#define DEVICEID_ICH8DH 0x2812 -#define DEVICEID_ICH8DO 0x2814 -#define DEVICEID_ICH8M 0x2815 -#define DEVICEID_ICH8ME 0x2811 -#define DEVICEID_ICH9 0x2918 -#define DEVICEID_ICH9DH 0x2912 -#define DEVICEID_ICH9DO 0x2914 -#define DEVICEID_ICH9M 0x2919 -#define DEVICEID_ICH9ME 0x2917 -#define DEVICEID_ICH9R 0x2916 -#define DEVICEID_ICH10 0x3a18 -#define DEVICEID_ICH10D 0x3a1a -#define DEVICEID_ICH10DO 0x3a14 -#define DEVICEID_ICH10R 0x3a16 -#define DEVICEID_PCH 0x3b00 -#define DEVICEID_PCHM 0x3b01 -#define DEVICEID_P55 0x3b02 -#define DEVICEID_PM55 0x3b03 -#define DEVICEID_H55 0x3b06 -#define DEVICEID_QM57 0x3b07 -#define DEVICEID_H57 0x3b08 -#define DEVICEID_HM55 0x3b09 -#define DEVICEID_Q57 0x3b0a -#define DEVICEID_HM57 0x3b0b -#define DEVICEID_PCHMSFF 0x3b0d -#define DEVICEID_QS57 0x3b0f -#define DEVICEID_3400 0x3b12 -#define DEVICEID_3420 0x3b14 -#define DEVICEID_3450 0x3b16 -#define DEVICEID_LPT0 0x8c40 -#define DEVICEID_LPT1 0x8c41 -#define DEVICEID_LPT2 0x8c42 -#define DEVICEID_LPT3 0x8c43 -#define DEVICEID_LPT4 0x8c44 -#define DEVICEID_LPT5 0x8c45 -#define DEVICEID_LPT6 0x8c46 -#define DEVICEID_LPT7 0x8c47 -#define DEVICEID_LPT8 0x8c48 -#define DEVICEID_LPT9 0x8c49 -#define DEVICEID_LPT10 0x8c4a -#define DEVICEID_LPT11 0x8c4b -#define DEVICEID_LPT12 0x8c4c -#define DEVICEID_LPT13 0x8c4d -#define DEVICEID_LPT14 0x8c4e -#define DEVICEID_LPT15 0x8c4f -#define DEVICEID_LPT16 0x8c50 -#define DEVICEID_LPT17 0x8c51 -#define DEVICEID_LPT18 0x8c52 -#define DEVICEID_LPT19 0x8c53 -#define DEVICEID_LPT20 0x8c54 -#define DEVICEID_LPT21 0x8c55 -#define DEVICEID_LPT22 0x8c56 -#define DEVICEID_LPT23 0x8c57 -#define DEVICEID_LPT24 0x8c58 -#define DEVICEID_LPT25 0x8c59 -#define DEVICEID_LPT26 0x8c5a -#define DEVICEID_LPT27 0x8c5b -#define DEVICEID_LPT28 0x8c5c -#define DEVICEID_LPT29 0x8c5d -#define DEVICEID_LPT30 0x8c5e -#define DEVICEID_LPT31 0x8c5f -#define DEVICEID_WCPT1 0x8cc1 -#define DEVICEID_WCPT2 0x8cc2 -#define DEVICEID_WCPT3 0x8cc3 -#define DEVICEID_WCPT4 0x8cc4 -#define DEVICEID_WCPT6 0x8cc6 -#define DEVICEID_WBG0 0x8d40 -#define DEVICEID_WBG1 0x8d41 -#define DEVICEID_WBG2 0x8d42 -#define DEVICEID_WBG3 0x8d43 -#define DEVICEID_WBG4 0x8d44 -#define DEVICEID_WBG5 0x8d45 -#define DEVICEID_WBG6 0x8d46 -#define DEVICEID_WBG7 0x8d47 -#define DEVICEID_WBG8 0x8d48 -#define DEVICEID_WBG9 0x8d49 -#define DEVICEID_WBG10 0x8d4a -#define DEVICEID_WBG11 0x8d4b -#define DEVICEID_WBG12 0x8d4c -#define DEVICEID_WBG13 0x8d4d -#define DEVICEID_WBG14 0x8d4e -#define DEVICEID_WBG15 0x8d4f -#define DEVICEID_WBG16 0x8d50 -#define DEVICEID_WBG17 0x8d51 -#define DEVICEID_WBG18 0x8d52 -#define DEVICEID_WBG19 0x8d53 -#define DEVICEID_WBG20 0x8d54 -#define DEVICEID_WBG21 0x8d55 -#define DEVICEID_WBG22 0x8d56 -#define DEVICEID_WBG23 0x8d57 -#define DEVICEID_WBG24 0x8d58 -#define DEVICEID_WBG25 0x8d59 -#define DEVICEID_WBG26 0x8d5a -#define DEVICEID_WBG27 0x8d5b -#define DEVICEID_WBG28 0x8d5c -#define DEVICEID_WBG29 0x8d5d -#define DEVICEID_WBG30 0x8d5e -#define DEVICEID_WBG31 0x8d5f -#define DEVICEID_LPT_LP0 0x9c40 -#define DEVICEID_LPT_LP1 0x9c41 -#define DEVICEID_LPT_LP2 0x9c42 -#define DEVICEID_LPT_LP3 0x9c43 -#define DEVICEID_LPT_LP4 0x9c44 -#define DEVICEID_LPT_LP5 0x9c45 -#define DEVICEID_LPT_LP6 0x9c46 -#define DEVICEID_LPT_LP7 0x9c47 -#define DEVICEID_WCPT_LP1 0x9cc1 -#define DEVICEID_WCPT_LP2 0x9cc2 -#define DEVICEID_WCPT_LP3 0x9cc3 -#define DEVICEID_WCPT_LP5 0x9cc5 -#define DEVICEID_WCPT_LP6 0x9cc6 -#define DEVICEID_WCPT_LP7 0x9cc7 -#define DEVICEID_WCPT_LP9 0x9cc9 +#define VENDORID_INTEL 0x8086 +#define DEVICEID_BAYTRAIL 0x0f1c +#define DEVICEID_CPT0 0x1c40 +#define DEVICEID_CPT1 0x1c41 +#define DEVICEID_CPT2 0x1c42 +#define DEVICEID_CPT3 0x1c43 +#define DEVICEID_CPT4 0x1c44 +#define DEVICEID_CPT5 0x1c45 +#define DEVICEID_CPT6 0x1c46 +#define DEVICEID_CPT7 0x1c47 +#define DEVICEID_CPT8 0x1c48 +#define DEVICEID_CPT9 0x1c49 +#define DEVICEID_CPT10 0x1c4a +#define DEVICEID_CPT11 0x1c4b +#define DEVICEID_CPT12 0x1c4c +#define DEVICEID_CPT13 0x1c4d +#define DEVICEID_CPT14 0x1c4e +#define DEVICEID_CPT15 0x1c4f +#define DEVICEID_CPT16 0x1c50 +#define DEVICEID_CPT17 0x1c51 +#define DEVICEID_CPT18 0x1c52 +#define DEVICEID_CPT19 0x1c53 +#define DEVICEID_CPT20 0x1c54 +#define DEVICEID_CPT21 0x1c55 +#define DEVICEID_CPT22 0x1c56 +#define DEVICEID_CPT23 0x1c57 +#define DEVICEID_CPT24 0x1c58 +#define DEVICEID_CPT25 0x1c59 +#define DEVICEID_CPT26 0x1c5a +#define DEVICEID_CPT27 0x1c5b +#define DEVICEID_CPT28 0x1c5c +#define DEVICEID_CPT29 0x1c5d +#define DEVICEID_CPT30 0x1c5e +#define DEVICEID_CPT31 0x1c5f +#define DEVICEID_PATSBURG_LPC1 0x1d40 +#define DEVICEID_PATSBURG_LPC2 0x1d41 +#define DEVICEID_PPT0 0x1e40 +#define DEVICEID_PPT1 0x1e41 +#define DEVICEID_PPT2 0x1e42 +#define DEVICEID_PPT3 0x1e43 +#define DEVICEID_PPT4 0x1e44 +#define DEVICEID_PPT5 0x1e45 +#define DEVICEID_PPT6 0x1e46 +#define DEVICEID_PPT7 0x1e47 +#define DEVICEID_PPT8 0x1e48 +#define DEVICEID_PPT9 0x1e49 +#define DEVICEID_PPT10 0x1e4a +#define DEVICEID_PPT11 0x1e4b +#define DEVICEID_PPT12 0x1e4c +#define DEVICEID_PPT13 0x1e4d +#define DEVICEID_PPT14 0x1e4e +#define DEVICEID_PPT15 0x1e4f +#define DEVICEID_PPT16 0x1e50 +#define DEVICEID_PPT17 0x1e51 +#define DEVICEID_PPT18 0x1e52 +#define DEVICEID_PPT19 0x1e53 +#define DEVICEID_PPT20 0x1e54 +#define DEVICEID_PPT21 0x1e55 +#define DEVICEID_PPT22 0x1e56 +#define DEVICEID_PPT23 0x1e57 +#define DEVICEID_PPT24 0x1e58 +#define DEVICEID_PPT25 0x1e59 +#define DEVICEID_PPT26 0x1e5a +#define DEVICEID_PPT27 0x1e5b +#define DEVICEID_PPT28 0x1e5c +#define DEVICEID_PPT29 0x1e5d +#define DEVICEID_PPT30 0x1e5e +#define DEVICEID_PPT31 0x1e5f +#define DEVICEID_AVN0 0x1f38 +#define DEVICEID_AVN1 0x1f39 +#define DEVICEID_AVN2 0x1f3a +#define DEVICEID_AVN3 0x1f3b +#define DEVICEID_BRASWELL 0x229c +#define DEVICEID_DH89XXCC_LPC 0x2310 +#define DEVICEID_COLETOCRK_LPC 0x2390 +#define DEVICEID_82801AA 0x2410 +#define DEVICEID_82801AB 0x2420 +#define DEVICEID_82801BA 0x2440 +#define DEVICEID_82801BAM 0x244c +#define DEVICEID_82801CA 0x2480 +#define DEVICEID_82801CAM 0x248c +#define DEVICEID_82801DB 0x24c0 +#define DEVICEID_82801DBM 0x24cc +#define DEVICEID_82801E 0x2450 +#define DEVICEID_82801EB 0x24dc +#define DEVICEID_82801EBR 0x24d0 +#define DEVICEID_6300ESB 0x25a1 +#define DEVICEID_82801FBR 0x2640 +#define DEVICEID_ICH6M 0x2641 +#define DEVICEID_ICH6W 0x2642 +#define DEVICEID_63XXESB 0x2670 +#define DEVICEID_ICH7 0x27b8 +#define DEVICEID_ICH7DH 0x27b0 +#define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_NM10 0x27bc +#define DEVICEID_ICH7MDH 0x27bd +#define DEVICEID_ICH8 0x2810 +#define DEVICEID_ICH8DH 0x2812 +#define DEVICEID_ICH8DO 0x2814 +#define DEVICEID_ICH8M 0x2815 +#define DEVICEID_ICH8ME 0x2811 +#define DEVICEID_ICH9 0x2918 +#define DEVICEID_ICH9DH 0x2912 +#define DEVICEID_ICH9DO 0x2914 +#define DEVICEID_ICH9M 0x2919 +#define DEVICEID_ICH9ME 0x2917 +#define DEVICEID_ICH9R 0x2916 +#define DEVICEID_ICH10 0x3a18 +#define DEVICEID_ICH10D 0x3a1a +#define DEVICEID_ICH10DO 0x3a14 +#define DEVICEID_ICH10R 0x3a16 +#define DEVICEID_PCH 0x3b00 +#define DEVICEID_PCHM 0x3b01 +#define DEVICEID_P55 0x3b02 +#define DEVICEID_PM55 0x3b03 +#define DEVICEID_H55 0x3b06 +#define DEVICEID_QM57 0x3b07 +#define DEVICEID_H57 0x3b08 +#define DEVICEID_HM55 0x3b09 +#define DEVICEID_Q57 0x3b0a +#define DEVICEID_HM57 0x3b0b +#define DEVICEID_PCHMSFF 0x3b0d +#define DEVICEID_QS57 0x3b0f +#define DEVICEID_3400 0x3b12 +#define DEVICEID_3420 0x3b14 +#define DEVICEID_3450 0x3b16 +#define DEVICEID_LPT0 0x8c40 +#define DEVICEID_LPT1 0x8c41 +#define DEVICEID_LPT2 0x8c42 +#define DEVICEID_LPT3 0x8c43 +#define DEVICEID_LPT4 0x8c44 +#define DEVICEID_LPT5 0x8c45 +#define DEVICEID_LPT6 0x8c46 +#define DEVICEID_LPT7 0x8c47 +#define DEVICEID_LPT8 0x8c48 +#define DEVICEID_LPT9 0x8c49 +#define DEVICEID_LPT10 0x8c4a +#define DEVICEID_LPT11 0x8c4b +#define DEVICEID_LPT12 0x8c4c +#define DEVICEID_LPT13 0x8c4d +#define DEVICEID_LPT14 0x8c4e +#define DEVICEID_LPT15 0x8c4f +#define DEVICEID_LPT16 0x8c50 +#define DEVICEID_LPT17 0x8c51 +#define DEVICEID_LPT18 0x8c52 +#define DEVICEID_LPT19 0x8c53 +#define DEVICEID_LPT20 0x8c54 +#define DEVICEID_LPT21 0x8c55 +#define DEVICEID_LPT22 0x8c56 +#define DEVICEID_LPT23 0x8c57 +#define DEVICEID_LPT24 0x8c58 +#define DEVICEID_LPT25 0x8c59 +#define DEVICEID_LPT26 0x8c5a +#define DEVICEID_LPT27 0x8c5b +#define DEVICEID_LPT28 0x8c5c +#define DEVICEID_LPT29 0x8c5d +#define DEVICEID_LPT30 0x8c5e +#define DEVICEID_LPT31 0x8c5f +#define DEVICEID_WCPT1 0x8cc1 +#define DEVICEID_WCPT2 0x8cc2 +#define DEVICEID_WCPT3 0x8cc3 +#define DEVICEID_WCPT4 0x8cc4 +#define DEVICEID_WCPT6 0x8cc6 +#define DEVICEID_WBG0 0x8d40 +#define DEVICEID_WBG1 0x8d41 +#define DEVICEID_WBG2 0x8d42 +#define DEVICEID_WBG3 0x8d43 +#define DEVICEID_WBG4 0x8d44 +#define DEVICEID_WBG5 0x8d45 +#define DEVICEID_WBG6 0x8d46 +#define DEVICEID_WBG7 0x8d47 +#define DEVICEID_WBG8 0x8d48 +#define DEVICEID_WBG9 0x8d49 +#define DEVICEID_WBG10 0x8d4a +#define DEVICEID_WBG11 0x8d4b +#define DEVICEID_WBG12 0x8d4c +#define DEVICEID_WBG13 0x8d4d +#define DEVICEID_WBG14 0x8d4e +#define DEVICEID_WBG15 0x8d4f +#define DEVICEID_WBG16 0x8d50 +#define DEVICEID_WBG17 0x8d51 +#define DEVICEID_WBG18 0x8d52 +#define DEVICEID_WBG19 0x8d53 +#define DEVICEID_WBG20 0x8d54 +#define DEVICEID_WBG21 0x8d55 +#define DEVICEID_WBG22 0x8d56 +#define DEVICEID_WBG23 0x8d57 +#define DEVICEID_WBG24 0x8d58 +#define DEVICEID_WBG25 0x8d59 +#define DEVICEID_WBG26 0x8d5a +#define DEVICEID_WBG27 0x8d5b +#define DEVICEID_WBG28 0x8d5c +#define DEVICEID_WBG29 0x8d5d +#define DEVICEID_WBG30 0x8d5e +#define DEVICEID_WBG31 0x8d5f +#define DEVICEID_LPT_LP0 0x9c40 +#define DEVICEID_LPT_LP1 0x9c41 +#define DEVICEID_LPT_LP2 0x9c42 +#define DEVICEID_LPT_LP3 0x9c43 +#define DEVICEID_LPT_LP4 0x9c44 +#define DEVICEID_LPT_LP5 0x9c45 +#define DEVICEID_LPT_LP6 0x9c46 +#define DEVICEID_LPT_LP7 0x9c47 +#define DEVICEID_WCPT_LP1 0x9cc1 +#define DEVICEID_WCPT_LP2 0x9cc2 +#define DEVICEID_WCPT_LP3 0x9cc3 +#define DEVICEID_WCPT_LP5 0x9cc5 +#define DEVICEID_WCPT_LP6 0x9cc6 +#define DEVICEID_WCPT_LP7 0x9cc7 +#define DEVICEID_WCPT_LP9 0x9cc9 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ -#define ICH_GEN_STA 0xd4 -#define ICH_GEN_STA_NO_REBOOT 0x02 -#define ICH_PMBASE 0x40 /* ACPI base address register */ -#define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ +#define ICH_GEN_STA 0xd4 +#define ICH_GEN_STA_NO_REBOOT 0x02 +#define ICH_PMBASE 0x40 /* ACPI base address register */ +#define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ /* ICH Chipset Configuration Registers (ICH6 and newer) */ -#define ICH_RCBA 0xf0 -#define ICH_GCS_OFFSET 0x3410 -#define ICH_GCS_SIZE 0x4 -#define ICH_GCS_NO_REBOOT 0x20 +#define ICH_RCBA 0xf0 +#define ICH_GCS_OFFSET 0x3410 +#define ICH_GCS_SIZE 0x4 +#define ICH_GCS_NO_REBOOT 0x20 /* SoC Power Management Configuration Registers */ -#define ICH_PBASE 0x44 -#define ICH_PMC_OFFSET 0x08 -#define ICH_PMC_SIZE 0x4 -#define ICH_PMC_NO_REBOOT 0x10 +#define ICH_PBASE 0x44 +#define ICH_PMC_OFFSET 0x08 +#define ICH_PMC_SIZE 0x4 +#define ICH_PMC_NO_REBOOT 0x10 /* register names and locations (relative to PMBASE) */ -#define SMI_BASE 0x30 /* base address for SMI registers */ -#define SMI_LEN 0x08 -#define SMI_EN 0x00 /* SMI Control and Enable Register */ -#define SMI_STS 0x04 /* SMI Status Register */ -#define TCO_BASE 0x60 /* base address for TCO registers */ -#define TCO_LEN 0x20 -#define TCO_RLD 0x00 /* TCO Reload and Current Value */ -#define TCO_TMR1 0x01 /* TCO Timer Initial Value +#define SMI_BASE 0x30 /* base address for SMI registers */ +#define SMI_LEN 0x08 +#define SMI_EN 0x00 /* SMI Control and Enable Register */ +#define SMI_STS 0x04 /* SMI Status Register */ +#define TCO_BASE 0x60 /* base address for TCO registers */ +#define TCO_LEN 0x20 +#define TCO_RLD 0x00 /* TCO Reload and Current Value */ +#define TCO_TMR1 0x01 /* TCO Timer Initial Value (ICH5 and older, 8 bits) */ -#define TCO_TMR2 0x12 /* TCO Timer Initial Value +#define TCO_TMR2 0x12 /* TCO Timer Initial Value (ICH6 and newer, 16 bits) */ -#define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ -#define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ -#define TCO1_STS 0x04 /* TCO Status 1 */ -#define TCO2_STS 0x06 /* TCO Status 2 */ -#define TCO1_CNT 0x08 /* TCO Control 1 */ -#define TCO2_CNT 0x08 /* TCO Control 2 */ -#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ -#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ +#define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ +#define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ +#define TCO1_STS 0x04 /* TCO Status 1 */ +#define TCO2_STS 0x06 /* TCO Status 2 */ +#define TCO1_CNT 0x08 /* TCO Control 1 */ +#define TCO2_CNT 0x08 /* TCO Control 2 */ +#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ +#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ /* bit definitions for SMI_EN and SMI_STS */ -#define SMI_TCO_EN 0x2000 -#define SMI_TCO_STS 0x2000 -#define SMI_GBL_EN 0x0001 +#define SMI_TCO_EN 0x2000 +#define SMI_TCO_STS 0x2000 +#define SMI_GBL_EN 0x0001 /* timer value mask for TCO_RLD and TCO_TMR */ -#define TCO_TIMER_MASK 0x1f +#define TCO_TIMER_MASK 0x1f /* status bits for TCO1_STS */ -#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ -#define TCO_TIMEOUT 0x08 /* timed out */ -#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ -#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ +#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ +#define TCO_TIMEOUT 0x08 /* timed out */ +#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ +#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ /* status bits for TCO2_STS */ -#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ -#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ +#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ +#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ /* control bits for TCO1_CNT */ -#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ -#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ -#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ -#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ +#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ +#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ +#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ +#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ /* * Masks for the TCO timer value field in TCO_RLD. @@ -341,13 +341,13 @@ struct ichwd_softc { * I suspect this is a bug in the ICH5 datasheet and that the minimum is * uniformly 2, but I'd rather err on the side of caution. */ -#define TCO_RLD_TMR_MIN 0x0004 -#define TCO_RLD1_TMR_MAX 0x003f -#define TCO_RLD2_TMR_MAX 0x03ff +#define TCO_RLD_TMR_MIN 0x0004 +#define TCO_RLD1_TMR_MAX 0x003f +#define TCO_RLD2_TMR_MAX 0x03ff /* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ -#define ICHWD_TICK 600000000 +#define ICHWD_TICK 600000000 /* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ -#define ICHWD_TCO_V3_TICK 1000000000 +#define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-all@freebsd.org Sun Sep 17 10:47: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 BB632E0960B; Sun, 17 Sep 2017 10:47:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 949BC7EA91; Sun, 17 Sep 2017 10:47:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HAlLia096382; Sun, 17 Sep 2017 10:47:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HAlLni096381; Sun, 17 Sep 2017 10:47:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709171047.v8HAlLni096381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Sep 2017 10:47: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: r323674 - stable/11/sys/dev/ichwd X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ichwd X-SVN-Commit-Revision: 323674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 10:47:22 -0000 Author: kib Date: Sun Sep 17 10:47:21 2017 New Revision: 323674 URL: https://svnweb.freebsd.org/changeset/base/323674 Log: MFC r323387, r323388: Add definitions of (new) bits for TCO registers from the Lewisburg/Sunrise Point documentation. Modified: stable/11/sys/dev/ichwd/ichwd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:45:08 2017 (r323673) +++ stable/11/sys/dev/ichwd/ichwd.h Sun Sep 17 10:47:21 2017 (r323674) @@ -309,6 +309,8 @@ struct ichwd_softc { #define TCO2_CNT 0x08 /* TCO Control 2 */ #define TCO_MESSAGE1 0x0c /* TCO Message 1 */ #define TCO_MESSAGE2 0x0d /* TCO Message 2 */ +#define TCO_WDSTATUS 0x0e /* TCO Watchdog status */ +#define TCO_TMR 0x12 /* TCP Reload value */ /* bit definitions for SMI_EN and SMI_STS */ #define SMI_TCO_EN 0x2000 @@ -317,23 +319,45 @@ struct ichwd_softc { /* timer value mask for TCO_RLD and TCO_TMR */ #define TCO_TIMER_MASK 0x1f +#define TCO_TIMER_MASK2 0x2f /* status bits for TCO1_STS */ -#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ -#define TCO_TIMEOUT 0x08 /* timed out */ -#define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ -#define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ +#define TCO_SLVSEL 0x2000 /* TCO Slave Select Soft Strap */ +#define TCO_CPUSERR_STS 0x1000 +#define TCO_CPUSMI_STS 0x0400 +#define TCO_CPUSCI_STS 0x0200 +#define TCO_BIOSWR_STS 0x0100 +#define TCO_NEWCENTURY 0x0080 /* set for RTC year roll over + (99 to 00) */ +#define TCO_TIMEOUT 0x0008 /* timed out */ +#define TCO_INT_STS 0x0004 /* data out (DO NOT USE) */ +#define TCO_SMI_STS 0x0002 /* data in (DO NOT USE) */ +#define TCO_NMI2SMI_STS 0x0001 /* status bits for TCO2_STS */ -#define TCO_BOOT_STS 0x04 /* failed to come out of reset */ -#define TCO_SECOND_TO_STS 0x02 /* ran down twice */ +#define TCO_SMLINK_SLAVE_SMI 0x0010 +#define TCO_BOOT_STS 0x0004 /* failed to come out of reset */ +#define TCO_SECOND_TO_STS 0x0002 /* ran down twice */ +#define TCO_INTRD_DET 0x0001 /* control bits for TCO1_CNT */ +#define TCO_LOCK 0x1000 /* SMI_BASE.TCO_EN locked */ #define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ #define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ #define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ #define TCO_NMI_NOW 0x0100 /* trigger an NMI */ +/* control bits for TCO2_CNT */ +#define TCO_OS_POLICY 0x0030 /* mask */ +#define TCO_OS_POLICY_BOOT 0x0000 +#define TCO_OS_POLICY_SHUTD 0x0010 +#define TCO_OS_POLICY_NOLOAD 0x0020 +#define TCO_SMB_ALERT_DISABLE 0x0008 +#define TCO_INTRD_SEL 0x0003 /* mask */ +#define TCO_INTRD_SEL_SILENT 0x0000 +#define TCO_INTRD_SEL_INTR 0x0001 +#define TCO_INTRD_SEL_SMI 0x0002 + /* * Masks for the TCO timer value field in TCO_RLD. * If the datasheets are to be believed, the minimum value actually varies @@ -345,9 +369,15 @@ struct ichwd_softc { #define TCO_RLD1_TMR_MAX 0x003f #define TCO_RLD2_TMR_MAX 0x03ff -/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */ +/* + * Approximate length in nanoseconds of one WDT tick (about 0.6 sec) + * for TCO v1/v2/v4 + */ #define ICHWD_TICK 600000000 -/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */ +/* + * Approximate length in nanoseconds of one WDT tick (about 1.0 sec) + * for TCO v3 + */ #define ICHWD_TCO_V3_TICK 1000000000 #endif From owner-svn-src-all@freebsd.org Sun Sep 17 12:56: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 81277E10181; Sun, 17 Sep 2017 12:56:48 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [157.161.13.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45D13829EB; Sun, 17 Sep 2017 12:56:47 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-10-49.flashcable.ch [91.190.10.49]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 9B37AC3D0A; Sun, 17 Sep 2017 14:56:44 +0200 (CEST) Subject: Re: svn commit: r323290 - head/sys/vm To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709072143.v87Lhdsg060310@repo.freebsd.org> <20170914203232.GA72190@bish> <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> <20170916222846.GA88851@bish> From: Andreas Tobler Message-ID: Date: Sun, 17 Sep 2017 14:56:44 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170916222846.GA88851@bish> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 12:56:48 -0000 On 17.09.17 00:28, Mark Johnston wrote: > On Sat, Sep 16, 2017 at 09:01:56PM +0200, Andreas Tobler wrote: >> On 14.09.17 22:32, Mark Johnston wrote: >>> On Thu, Sep 14, 2017 at 09:51:17PM +0200, Andreas Tobler wrote: >>>> Hi Mark, >>>> >>>> On 07.09.17 23:43, Mark Johnston wrote: >>>>> Author: markj >>>>> Date: Thu Sep 7 21:43:39 2017 >>>>> New Revision: 323290 >>>>> URL: https://svnweb.freebsd.org/changeset/base/323290 >>>>> >>>>> Log: >>>>> Speed up vm_page_array initialization. >>>>> >>>>> We currently initialize the vm_page array in three passes: one to zero >>>>> the array, one to initialize the "order" field of each page (necessary >>>>> when inserting them into the vm_phys buddy allocator one-by-one), and >>>>> one to initialize the remaining non-zero fields and individually insert >>>>> each page into the allocator. >>>>> >>>>> Merge the three passes into one following a suggestion from alc: >>>>> initialize vm_page fields in a single pass, and use vm_phys_free_contig() >>>>> to efficiently insert physical memory segments into the buddy allocator. >>>>> This reduces the initialization time to a third or a quarter of what it >>>>> was before on most systems that I tested. >>>>> >>>>> Reviewed by: alc, kib >>>>> MFC after: 3 weeks >>>>> Differential Revision: https://reviews.freebsd.org/D12248 >>>>> >>>>> Modified: >>>>> head/sys/vm/vm_page.c >>>>> head/sys/vm/vm_phys.c >>>>> head/sys/vm/vm_phys.h >>>> >>>> I just found out that this commit breaks booting my powerpc64 Quad G5. >>>> It hangs, pressing ctrl-t shows: cmd: sh [*vm active pagequeue]. >>>> >>>> Sometimes it hangs earlier when the kbd is not there yet (usb), then I >>>> can't get the process/task where it hangs. >>>> >>>> Note, this kernel is compiled with the default gcc (4.2.1-FreeBSD) >>>> >>>> Any ideas how to find out what's wrong? >>> >>> Are you able to break into DDB when the hang occurs? If so, the output >>> of "show page" would be helpful. >> >> Unfortunately not from the beginning. The keyboard is usb and it gets >> installed late. Once it survives the loading of the kbd and co, I can >> enter into ddb. But it is a trial and error. So far I didn't succeed to >> come that far. >> >>> Are you running with INVARIANTS configured? If not, please try that. >> >> The above was w/o INVARIANTS. With invariants the kernel panics >> immediately after boot, see pic. > > Thanks. Could you please try applying the patch at the end of this email > and see if that fixes the issue? I have not yet tried to compile it, > sorry. Excellent! I can confirm the two platforms, 32- and 64-bit powerpc, are back to life. Both are running since a few hours and perfom ports rebuild now. Thank you very much for your prompt response and help. Andreas From owner-svn-src-all@freebsd.org Sun Sep 17 14:03:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C9B2E13CC5; Sun, 17 Sep 2017 14:03:56 +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 4A9B684BD5; Sun, 17 Sep 2017 14:03:56 +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 v8HE3tNg080424; Sun, 17 Sep 2017 14:03:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HE3tFf080423; Sun, 17 Sep 2017 14:03:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709171403.v8HE3tFf080423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 17 Sep 2017 14:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323675 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 323675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 14:03:56 -0000 Author: emaste Date: Sun Sep 17 14:03:54 2017 New Revision: 323675 URL: https://svnweb.freebsd.org/changeset/base/323675 Log: libsysdecode: report invalid cap_rights_t Previously we'd have an assertion failure in cap_rights_is_set if sysdecode_cap_rights is called with an invalid cap_rights_t, so test for validity first. PR: 222258 Reviewed by: cem MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12391 Modified: head/lib/libsysdecode/flags.c Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Sun Sep 17 10:47:21 2017 (r323674) +++ head/lib/libsysdecode/flags.c Sun Sep 17 14:03:54 2017 (r323675) @@ -1028,8 +1028,15 @@ void sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp) { struct name_table *t; + int i; bool comma; + for (i = 0; i < CAPARSIZE(rightsp); i++) { + if (CAPIDXBIT(rightsp->cr_rights[i]) != 1 << i) { + fprintf(fp, "invalid cap_rights_t"); + return; + } + } comma = false; for (t = caprights; t->str != NULL; t++) { if (cap_rights_is_set(rightsp, t->val)) { From owner-svn-src-all@freebsd.org Sun Sep 17 15:40: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 5FE74E199A9; Sun, 17 Sep 2017 15:40:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A2F43634; Sun, 17 Sep 2017 15:40: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 v8HFeCAH017785; Sun, 17 Sep 2017 15:40:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HFeCJd017783; Sun, 17 Sep 2017 15:40:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709171540.v8HFeCJd017783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 Sep 2017 15:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323676 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 323676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 15:40:13 -0000 Author: markj Date: Sun Sep 17 15:40:12 2017 New Revision: 323676 URL: https://svnweb.freebsd.org/changeset/base/323676 Log: Implement mmu_page_init for AIM platforms. As of r323290 we cannot rely on the vm_page array being zero-initialized. Reported and tested by: andreast MFC after: 1 week Modified: head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Sun Sep 17 14:03:54 2017 (r323675) +++ head/sys/powerpc/aim/mmu_oea.c Sun Sep 17 15:40:12 2017 (r323676) @@ -287,6 +287,7 @@ boolean_t moea_is_referenced(mmu_t, vm_page_t); int moea_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); boolean_t moea_page_exists_quick(mmu_t, pmap_t, vm_page_t); +void moea_page_init(mmu_t, vm_page_t); int moea_page_wired_mappings(mmu_t, vm_page_t); void moea_pinit(mmu_t, pmap_t); void moea_pinit0(mmu_t, pmap_t); @@ -334,6 +335,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_ts_referenced, moea_ts_referenced), MMUMETHOD(mmu_map, moea_map), MMUMETHOD(mmu_page_exists_quick,moea_page_exists_quick), + MMUMETHOD(mmu_page_init, moea_page_init), MMUMETHOD(mmu_page_wired_mappings,moea_page_wired_mappings), MMUMETHOD(mmu_pinit, moea_pinit), MMUMETHOD(mmu_pinit0, moea_pinit0), @@ -1592,6 +1594,15 @@ moea_page_exists_quick(mmu_t mmu, pmap_t pmap, vm_page } rw_wunlock(&pvh_global_lock); return (rv); +} + +void +moea_page_init(mmu_t mmu __unused, vm_page_t m) +{ + + m->md.mdpg_attrs = 0; + m->md.mdpg_cache_attrs = VM_MEMATTR_DEFAULT; + LIST_INIT(&m->md.mdpg_pvoh); } /* Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sun Sep 17 14:03:54 2017 (r323675) +++ head/sys/powerpc/aim/mmu_oea64.c Sun Sep 17 15:40:12 2017 (r323676) @@ -251,6 +251,7 @@ boolean_t moea64_is_referenced(mmu_t, vm_page_t); int moea64_ts_referenced(mmu_t, vm_page_t); vm_offset_t moea64_map(mmu_t, vm_offset_t *, vm_paddr_t, vm_paddr_t, int); boolean_t moea64_page_exists_quick(mmu_t, pmap_t, vm_page_t); +void moea64_page_init(mmu_t, vm_page_t); int moea64_page_wired_mappings(mmu_t, vm_page_t); void moea64_pinit(mmu_t, pmap_t); void moea64_pinit0(mmu_t, pmap_t); @@ -298,6 +299,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_ts_referenced, moea64_ts_referenced), MMUMETHOD(mmu_map, moea64_map), MMUMETHOD(mmu_page_exists_quick,moea64_page_exists_quick), + MMUMETHOD(mmu_page_init, moea64_page_init), MMUMETHOD(mmu_page_wired_mappings,moea64_page_wired_mappings), MMUMETHOD(mmu_pinit, moea64_pinit), MMUMETHOD(mmu_pinit0, moea64_pinit0), @@ -1896,6 +1898,15 @@ moea64_page_exists_quick(mmu_t mmu, pmap_t pmap, vm_pa } PV_PAGE_UNLOCK(m); return (rv); +} + +void +moea64_page_init(mmu_t mmu __unused, vm_page_t m) +{ + + m->md.mdpg_attrs = 0; + m->md.mdpg_cache_attrs = VM_MEMATTR_DEFAULT; + LIST_INIT(&m->md.mdpg_pvoh); } /* From owner-svn-src-all@freebsd.org Sun Sep 17 15:41: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 3552BE19C4A; Sun, 17 Sep 2017 15:41:14 +0000 (UTC) (envelope-from markjdb@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 DF562391F; Sun, 17 Sep 2017 15:41:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x22c.google.com with SMTP id s18so5641053qta.3; Sun, 17 Sep 2017 08:41:13 -0700 (PDT) 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=hzsv9fPFMBU6/dPbVbnhlA2S2isvyWogW+OP0PYonOY=; b=tosEs3EiSqe66tF2CMPOVXPwwNeb45YiYHSs36WOKtYzIxSfeGP4TRh4bsBcj9RJCT QXhdHRWqVp4GJGevDh6+4fxAPXD8LmUCVKyybCG7tU6PtvF17hdIxKJ0eDhK0k0yXM8Y T8czUtYeE5a88kQwJEUYaBrAG7ZwIe1jUPAWXYFQTnjCmRmzD4emq65qlbwKHIvV8Z6e G4Xqk6nGLgN/wu38Cj/pW4QhzuB4mMoX4sSrZ7MGuJPuX4p5Sk89OKvuXfVjflD6+FrV 5voJKRWIJv+/aVCLtOvlTfhHhXmLQYy90usVRz+kldRj3UxcMQsPFKzZ7/w1q5dm/ZYh mDmQ== 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=hzsv9fPFMBU6/dPbVbnhlA2S2isvyWogW+OP0PYonOY=; b=qpglBDkMkg06Kn0b/4Nw4hHD6SNZ26zexoLrjJ2QUd0Ug4CdiqMPldvjicn9XlV9GW dopnbH8hKldarY/Tl2q8ycT3V3UhlUbpGLoFgf8Cn62iqXc+3k1RG+FW0OZU3gVslqKS z+t0mVS5j4JviHKilF1em8ocpdMoZwAFs3WoG2KnXXV7tKvVRGdjoc+N8iHXf/n7XMy7 dPQR/gwSxGZr8kNfVROLgnNklL8kQMm9n+bFbu0Mf1+J/mUsrn8g80yqiNCY1nbl+ekF kmyl3YLuSRR6EvLGyHOAAyQ3PWVVBIB7jFBildyPoIY5oLaXCF2s30Px5ukVV0icPuga 933g== X-Gm-Message-State: AHPjjUh3/bRZeXyylnebM85tzpi/11bmusjEQCpLvdpqYQmidlT4t1al ZB8m+py3osnvGla7 X-Google-Smtp-Source: AOwi7QAE6nXFhoJcO5IFTFsqCNt+NLd1/Yg9+GHQnRG2oLhEu4OfjNRcrBCgWDxbJaDFvSQbqBxFQw== X-Received: by 10.200.26.211 with SMTP id h19mr46958462qtk.341.1505662872496; Sun, 17 Sep 2017 08:41:12 -0700 (PDT) Received: from bish (toroon0560w-lp140-01-69-159-37-127.dsl.bell.ca. [69.159.37.127]) by smtp.gmail.com with ESMTPSA id t65sm3663765qke.12.2017.09.17.08.41.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Sep 2017 08:41:11 -0700 (PDT) Sender: Mark Johnston Date: Sun, 17 Sep 2017 11:41:06 -0400 From: Mark Johnston To: Andreas Tobler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323290 - head/sys/vm Message-ID: <20170917154106.GA22322@bish> References: <201709072143.v87Lhdsg060310@repo.freebsd.org> <20170914203232.GA72190@bish> <67bb96f2-da01-8bce-65ba-bf811f51e56d@FreeBSD.org> <20170916222846.GA88851@bish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 15:41:14 -0000 On Sun, Sep 17, 2017 at 02:56:44PM +0200, Andreas Tobler wrote: > On 17.09.17 00:28, Mark Johnston wrote: > > Thanks. Could you please try applying the patch at the end of this email > > and see if that fixes the issue? I have not yet tried to compile it, > > sorry. > > Excellent! I can confirm the two platforms, 32- and 64-bit powerpc, are > back to life. Both are running since a few hours and perfom ports > rebuild now. > > Thank you very much for your prompt response and help. Thanks Andreas, committed as r323676. From owner-svn-src-all@freebsd.org Sun Sep 17 15:45: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 C9A83E1A037; Sun, 17 Sep 2017 15:45:40 +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 A5A9B3C70; Sun, 17 Sep 2017 15:45:40 +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 v8HFjdxj021566; Sun, 17 Sep 2017 15:45:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HFjdI9021560; Sun, 17 Sep 2017 15:45:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709171545.v8HFjdI9021560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 17 Sep 2017 15:45: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: r323677 - in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: kern sparc64/sparc64 vm X-SVN-Commit-Revision: 323677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 15:45:40 -0000 Author: markj Date: Sun Sep 17 15:45:39 2017 New Revision: 323677 URL: https://svnweb.freebsd.org/changeset/base/323677 Log: MFC r322405, r322406: Modify vm_page_grab_pages() to handle VM_ALLOC_NOWAIT, use it in sendfile_swapin(). Modified: stable/11/sys/kern/kern_sendfile.c stable/11/sys/kern/vfs_bio.c stable/11/sys/sparc64/sparc64/pmap.c stable/11/sys/vm/vm_glue.c stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sendfile.c ============================================================================== --- stable/11/sys/kern/kern_sendfile.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/kern/kern_sendfile.c Sun Sep 17 15:45:39 2017 (r323677) @@ -308,7 +308,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o int npages, int rhpages, int flags) { vm_page_t *pa = sfio->pa; - int nios; + int grabbed, nios; nios = 0; flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; @@ -318,14 +318,14 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o * only required pages. Readahead pages are dealt with later. */ VM_OBJECT_WLOCK(obj); - for (int i = 0; i < npages; i++) { - pa[i] = vm_page_grab(obj, OFF_TO_IDX(vmoff(i, off)), - VM_ALLOC_WIRED | VM_ALLOC_NORMAL | flags); - if (pa[i] == NULL) { - npages = i; - rhpages = 0; - break; - } + + grabbed = vm_page_grab_pages(obj, OFF_TO_IDX(off), + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); + if (grabbed < npages) { + for (int i = grabbed; i < npages; i++) + pa[i] = NULL; + npages = grabbed; + rhpages = 0; } for (int i = 0; i < npages;) { Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/kern/vfs_bio.c Sun Sep 17 15:45:39 2017 (r323677) @@ -2756,7 +2756,7 @@ vfs_vmio_extend(struct buf *bp, int desiredpages, int * deadlocks once allocbuf() is called after * pages are vfs_busy_pages(). */ - vm_page_grab_pages(obj, + (void)vm_page_grab_pages(obj, OFF_TO_IDX(bp->b_offset) + bp->b_npages, VM_ALLOC_SYSTEM | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, Modified: stable/11/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/sparc64/sparc64/pmap.c Sun Sep 17 15:45:39 2017 (r323677) @@ -1252,7 +1252,7 @@ pmap_pinit(pmap_t pm) CPU_ZERO(&pm->pm_active); VM_OBJECT_WLOCK(pm->pm_tsb_obj); - vm_page_grab_pages(pm->pm_tsb_obj, 0, VM_ALLOC_NORMAL | + (void)vm_page_grab_pages(pm->pm_tsb_obj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO, ma, TSB_PAGES); VM_OBJECT_WUNLOCK(pm->pm_tsb_obj); for (i = 0; i < TSB_PAGES; i++) Modified: stable/11/sys/vm/vm_glue.c ============================================================================== --- stable/11/sys/vm/vm_glue.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/vm/vm_glue.c Sun Sep 17 15:45:39 2017 (r323677) @@ -391,7 +391,7 @@ vm_thread_new(struct thread *td, int pages) * page of stack. */ VM_OBJECT_WLOCK(ksobj); - vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED, ma, pages); for (i = 0; i < pages; i++) ma[i]->valid = VM_PAGE_BITS_ALL; @@ -568,7 +568,7 @@ vm_thread_swapin(struct thread *td) pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; VM_OBJECT_WLOCK(ksobj); - vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, + (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, pages); for (int i = 0; i < pages;) { int j, a, count, rv; Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/vm/vm_page.c Sun Sep 17 15:45:39 2017 (r323677) @@ -3147,13 +3147,15 @@ retrylookup: * optional allocation flags: * VM_ALLOC_IGN_SBUSY do not sleep on soft busy pages * VM_ALLOC_NOBUSY do not exclusive busy the page + * VM_ALLOC_NOWAIT do not sleep * VM_ALLOC_SBUSY set page to sbusy state * VM_ALLOC_WIRED wire the pages * VM_ALLOC_ZERO zero and validate any invalid pages * - * This routine may sleep. + * If VM_ALLOC_NOWAIT is not specified, this routine may sleep. Otherwise, it + * may return a partial prefix of the requested range. */ -void +int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count) { @@ -3171,7 +3173,7 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pin (allocflags & VM_ALLOC_IGN_SBUSY) != 0, ("vm_page_grab_pages: VM_ALLOC_SBUSY/IGN_SBUSY mismatch")); if (count == 0) - return; + return (0); i = 0; retrylookup: m = vm_page_lookup(object, pindex + i); @@ -3180,6 +3182,8 @@ retrylookup: sleep = (allocflags & VM_ALLOC_IGN_SBUSY) != 0 ? vm_page_xbusied(m) : vm_page_busied(m); if (sleep) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + break; /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -3207,6 +3211,8 @@ retrylookup: m = vm_page_alloc(object, pindex + i, (allocflags & ~VM_ALLOC_IGN_SBUSY) | VM_ALLOC_COUNT(count - i)); if (m == NULL) { + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + break; VM_OBJECT_WUNLOCK(object); VM_WAIT; VM_OBJECT_WLOCK(object); @@ -3221,6 +3227,7 @@ retrylookup: ma[i] = m; m = vm_page_next(m); } + return (i); } /* Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Sun Sep 17 15:40:12 2017 (r323676) +++ stable/11/sys/vm/vm_page.h Sun Sep 17 15:45:39 2017 (r323677) @@ -414,7 +414,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_IGN_SBUSY 0x1000 /* (gp) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ #define VM_ALLOC_SBUSY 0x4000 /* (acgp) Shared busy the page */ -#define VM_ALLOC_NOWAIT 0x8000 /* (g) Do not sleep, return NULL */ +#define VM_ALLOC_NOWAIT 0x8000 /* (gp) Do not sleep */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) @@ -454,7 +454,7 @@ vm_page_t vm_page_alloc_contig(vm_object_t object, vm_ vm_page_t vm_page_alloc_freelist(int, int); void vm_page_change_lock(vm_page_t m, struct mtx **mtx); vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); -void vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, +int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count); int vm_page_try_to_free (vm_page_t); void vm_page_deactivate (vm_page_t); From owner-svn-src-all@freebsd.org Sun Sep 17 15:57: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 C1367E1AB2F; Sun, 17 Sep 2017 15:57:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 781566354A; Sun, 17 Sep 2017 15:57:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HFv7hg025812; Sun, 17 Sep 2017 15:57:07 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HFv6eC025799; Sun, 17 Sep 2017 15:57:06 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709171557.v8HFv6eC025799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sun, 17 Sep 2017 15:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323678 - in vendor/file/dist: . doc magic magic/Magdir python src tests X-SVN-Group: vendor X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in vendor/file/dist: . doc magic magic/Magdir python src tests X-SVN-Commit-Revision: 323678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 15:57:08 -0000 Author: gordon Date: Sun Sep 17 15:57:06 2017 New Revision: 323678 URL: https://svnweb.freebsd.org/changeset/base/323678 Log: Vendor import of file 5.32. Added: vendor/file/dist/magic/Magdir/apache (contents, props changed) vendor/file/dist/magic/Magdir/bhl vendor/file/dist/magic/Magdir/gconv vendor/file/dist/magic/Magdir/gpu vendor/file/dist/magic/Magdir/webassembly vendor/file/dist/magic/Magdir/yara vendor/file/dist/tests/hddrawcopytool.result vendor/file/dist/tests/hddrawcopytool.testfile (contents, props changed) Modified: vendor/file/dist/ChangeLog vendor/file/dist/aclocal.m4 vendor/file/dist/config.guess vendor/file/dist/config.sub vendor/file/dist/configure vendor/file/dist/configure.ac vendor/file/dist/doc/file.man vendor/file/dist/doc/libmagic.man vendor/file/dist/doc/magic.man vendor/file/dist/magic/Localstuff vendor/file/dist/magic/Magdir/adventure vendor/file/dist/magic/Magdir/amanda vendor/file/dist/magic/Magdir/amigaos vendor/file/dist/magic/Magdir/android vendor/file/dist/magic/Magdir/animation vendor/file/dist/magic/Magdir/apple vendor/file/dist/magic/Magdir/archive vendor/file/dist/magic/Magdir/att3b vendor/file/dist/magic/Magdir/audio vendor/file/dist/magic/Magdir/blackberry vendor/file/dist/magic/Magdir/blender vendor/file/dist/magic/Magdir/c-lang vendor/file/dist/magic/Magdir/cad vendor/file/dist/magic/Magdir/cafebabe vendor/file/dist/magic/Magdir/clipper vendor/file/dist/magic/Magdir/coff vendor/file/dist/magic/Magdir/commands vendor/file/dist/magic/Magdir/compress vendor/file/dist/magic/Magdir/console vendor/file/dist/magic/Magdir/cups vendor/file/dist/magic/Magdir/database vendor/file/dist/magic/Magdir/der vendor/file/dist/magic/Magdir/diff vendor/file/dist/magic/Magdir/dolby vendor/file/dist/magic/Magdir/dump vendor/file/dist/magic/Magdir/dyadic vendor/file/dist/magic/Magdir/editors vendor/file/dist/magic/Magdir/filesystems vendor/file/dist/magic/Magdir/flash vendor/file/dist/magic/Magdir/fonts vendor/file/dist/magic/Magdir/fsav vendor/file/dist/magic/Magdir/games vendor/file/dist/magic/Magdir/geo vendor/file/dist/magic/Magdir/gnu vendor/file/dist/magic/Magdir/gpt vendor/file/dist/magic/Magdir/gringotts vendor/file/dist/magic/Magdir/hitachi-sh vendor/file/dist/magic/Magdir/ibm370 vendor/file/dist/magic/Magdir/ibm6000 vendor/file/dist/magic/Magdir/icc vendor/file/dist/magic/Magdir/images vendor/file/dist/magic/Magdir/intel vendor/file/dist/magic/Magdir/isz vendor/file/dist/magic/Magdir/jpeg vendor/file/dist/magic/Magdir/kerberos vendor/file/dist/magic/Magdir/kml vendor/file/dist/magic/Magdir/linux vendor/file/dist/magic/Magdir/lisp vendor/file/dist/magic/Magdir/m4 vendor/file/dist/magic/Magdir/macintosh vendor/file/dist/magic/Magdir/make vendor/file/dist/magic/Magdir/maple vendor/file/dist/magic/Magdir/marc21 vendor/file/dist/magic/Magdir/mathematica vendor/file/dist/magic/Magdir/metastore vendor/file/dist/magic/Magdir/meteorological vendor/file/dist/magic/Magdir/microfocus vendor/file/dist/magic/Magdir/mime vendor/file/dist/magic/Magdir/misctools vendor/file/dist/magic/Magdir/modem vendor/file/dist/magic/Magdir/mozilla vendor/file/dist/magic/Magdir/msdos vendor/file/dist/magic/Magdir/msvc vendor/file/dist/magic/Magdir/msx vendor/file/dist/magic/Magdir/mup vendor/file/dist/magic/Magdir/nasa vendor/file/dist/magic/Magdir/netbsd vendor/file/dist/magic/Magdir/netscape vendor/file/dist/magic/Magdir/nitpicker vendor/file/dist/magic/Magdir/os2 vendor/file/dist/magic/Magdir/os9 vendor/file/dist/magic/Magdir/pbf vendor/file/dist/magic/Magdir/pc88 vendor/file/dist/magic/Magdir/pc98 vendor/file/dist/magic/Magdir/pdf vendor/file/dist/magic/Magdir/pdp vendor/file/dist/magic/Magdir/perl vendor/file/dist/magic/Magdir/pgf vendor/file/dist/magic/Magdir/pgp vendor/file/dist/magic/Magdir/printer vendor/file/dist/magic/Magdir/project vendor/file/dist/magic/Magdir/psdbms vendor/file/dist/magic/Magdir/python vendor/file/dist/magic/Magdir/riff vendor/file/dist/magic/Magdir/ruby vendor/file/dist/magic/Magdir/sccs vendor/file/dist/magic/Magdir/scientific vendor/file/dist/magic/Magdir/sendmail vendor/file/dist/magic/Magdir/sequent vendor/file/dist/magic/Magdir/sgml vendor/file/dist/magic/Magdir/sharc vendor/file/dist/magic/Magdir/sketch vendor/file/dist/magic/Magdir/sql vendor/file/dist/magic/Magdir/ssl vendor/file/dist/magic/Magdir/sysex vendor/file/dist/magic/Magdir/terminfo vendor/file/dist/magic/Magdir/vms vendor/file/dist/magic/Magdir/vmware vendor/file/dist/magic/Magdir/vorbis vendor/file/dist/magic/Magdir/windows vendor/file/dist/magic/Magdir/xenix vendor/file/dist/magic/Magdir/xilinx vendor/file/dist/magic/Magdir/xwindows vendor/file/dist/magic/Makefile.am vendor/file/dist/magic/Makefile.in vendor/file/dist/python/magic.py vendor/file/dist/src/apprentice.c vendor/file/dist/src/cdf.c vendor/file/dist/src/cdf.h vendor/file/dist/src/cdf_time.c vendor/file/dist/src/compress.c vendor/file/dist/src/der.c vendor/file/dist/src/file.h vendor/file/dist/src/fsmagic.c vendor/file/dist/src/funcs.c vendor/file/dist/src/is_tar.c vendor/file/dist/src/magic.c vendor/file/dist/src/magic.h.in vendor/file/dist/src/print.c vendor/file/dist/src/readcdf.c vendor/file/dist/src/readelf.c vendor/file/dist/src/readelf.h vendor/file/dist/src/softmagic.c vendor/file/dist/src/vasprintf.c vendor/file/dist/tests/Makefile.am vendor/file/dist/tests/Makefile.in vendor/file/dist/tests/test.c Modified: vendor/file/dist/ChangeLog ============================================================================== --- vendor/file/dist/ChangeLog Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/ChangeLog Sun Sep 17 15:57:06 2017 (r323678) @@ -1,6 +1,60 @@ +2017-09-02 11:53 Christos Zoulas + + * release 5.32 + +2017-08-28 16:37 Christos Zoulas + + * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) + +2017-08-27 03:55 Christos Zoulas + + * Fix always true condition (Thomas Jarosch) + +2017-05-24 17:30 Christos Zoulas + + * pickier parsing of numeric values in magic files. + +2017-05-23 17:55 Christos Zoulas + + * PR/615 add magic_getflags() + +2017-05-23 13:55 Christos Zoulas + + * release 5.31 + +2017-03-17 20:32 Christos Zoulas + + * remove trailing spaces from magic files + * refactor is_tar + * better bounds checks for cdf + +2017-02-10 12:24 Christos Zoulas + + * release 5.30 + +2017-02-07 23:27 Christos Zoulas + + * If we exceeded the offset in a search return no match + (Christoph Biedl) + * Be more lenient on corrupt CDF files (Christoph Biedl) + +2017-02-04 16:46 Christos Zoulas + + * pacify ubsan sign extension (oss-fuzz/524) + +2017-02-01 12:42 Christos Zoulas + + * off by one in cdf parsing (PR/593) + * report debugging sections in elf (PR/591) + +2016-11-06 10:52 Christos Zoulas + + * Allow @@@ in extensions + * Add missing overflow check in der magic (Jonas Wagner) + 2016-10-25 10:40 Christos Zoulas - * release 5.28 + * release 5.29 2016-10-24 11:20 Christos Zoulas @@ -387,7 +441,7 @@ ` 2013-11-06 14:40 Christos Zoulas - * fix erroneous non-zero exit code from non-existant file and message + * fix erroneous non-zero exit code from non-existent file and message 2013-10-29 14:25 Christos Zoulas Modified: vendor/file/dist/aclocal.m4 ============================================================================== --- vendor/file/dist/aclocal.m4 Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/aclocal.m4 Sun Sep 17 15:57:06 2017 (r323678) @@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the b To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. Modified: vendor/file/dist/config.guess ============================================================================== --- vendor/file/dist/config.guess Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/config.guess Sun Sep 17 15:57:06 2017 (r323678) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2015-03-04' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ timestamp='2015-03-04' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in - arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -221,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: @@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -249,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -265,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -373,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -407,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -632,13 +642,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -677,11 +687,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -694,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -804,14 +814,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -893,7 +903,7 @@ EOF exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -916,7 +926,7 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -962,6 +972,9 @@ EOF ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -987,6 +1000,9 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; @@ -1019,6 +1035,9 @@ EOF ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; @@ -1038,7 +1057,7 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1117,7 +1136,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1266,6 +1285,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1279,9 +1301,9 @@ EOF UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1303,7 +1325,7 @@ EOF exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1334,7 +1356,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1376,7 +1398,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1387,23 +1409,25 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp Modified: vendor/file/dist/config.sub ============================================================================== --- vendor/file/dist/config.sub Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/config.sub Sun Sep 17 15:57:06 2017 (r323678) @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2015-03-08' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2015-03-08' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ timestamp='2015-03-08' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -118,7 +117,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -255,6 +254,7 @@ case $basic_machine in | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ @@ -301,11 +301,12 @@ case $basic_machine in | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,6 +377,7 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ @@ -427,13 +429,15 @@ case $basic_machine in | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,7 +522,7 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; - asmjs) + asmjs) basic_machine=asmjs-unknown ;; aux) @@ -641,6 +645,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -1020,7 +1032,7 @@ case $basic_machine in ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1030,7 +1042,7 @@ case $basic_machine in ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1376,18 +1388,18 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1396,7 +1408,8 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1528,6 +1541,8 @@ case $os in ;; -nacl*) ;; + -ios) + ;; -none) ;; *) @@ -1622,6 +1637,9 @@ case $basic_machine in ;; sparc-* | *-sun) os=-sunos4.1.1 + ;; + pru-*) + os=-elf ;; *-be) os=-beos Modified: vendor/file/dist/configure ============================================================================== --- vendor/file/dist/configure Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/configure Sun Sep 17 15:57:06 2017 (r323678) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.29. +# Generated by GNU Autoconf 2.69 for file 5.32. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.29' -PACKAGE_STRING='file 5.29' +PACKAGE_VERSION='5.32' +PACKAGE_STRING='file 5.32' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.29 to adapt to many kinds of systems. +\`configure' configures file 5.32 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.29:";; + short | recursive ) echo "Configuration of file 5.32:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.29 +file configure 5.32 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2165,7 +2165,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.29, which was +It was created by file $as_me 5.32, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3031,7 +3031,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.29' + VERSION='5.32' cat >>confdefs.h <<_ACEOF @@ -15075,7 +15075,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.29, which was +This file was extended by file $as_me 5.32, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15141,7 +15141,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.29 +file config.status 5.32 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/file/dist/configure.ac ============================================================================== --- vendor/file/dist/configure.ac Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/configure.ac Sun Sep 17 15:57:06 2017 (r323678) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.29],[christos@astron.com]) +AC_INIT([file],[5.32],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) Modified: vendor/file/dist/doc/file.man ============================================================================== --- vendor/file/dist/doc/file.man Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/doc/file.man Sun Sep 17 15:57:06 2017 (r323678) @@ -1,4 +1,4 @@ -.\" $File: file.man,v 1.124 2016/10/19 20:52:45 christos Exp $ +.\" $File: file.man,v 1.125 2017/01/03 11:24:46 christos Exp $ .Dd October 19, 2016 .Dt FILE __CSECTION__ .Os @@ -238,8 +238,8 @@ or at least one filename argument must be present; to test the standard input, use .Sq - as a filename argument. -Please note that -.Ar namefile +Please note that +.Ar namefile is unwrapped and the enclosed filenames are processed when this option is encountered and before any further options processing is done. This allows one to process multiple lists of files with different command line @@ -411,10 +411,10 @@ and .Fl h options. .Sh SEE ALSO -.Xr magic __FSECTION__ , .Xr hexdump 1 , .Xr od 1 , .Xr strings 1 , +.Xr magic __FSECTION__ .Sh STANDARDS CONFORMANCE This program is believed to exceed the System V Interface Definition of FILE(CMD), as near as one can determine from the vague language @@ -530,16 +530,15 @@ John Gilmore revised the code extensively, making it b the first version. Geoff Collyer found several inadequacies and provided some magic file entries. -Contributions by the +Contributions of the .Sq \*[Am] operator by Rob McMahon, .Aq cudcv@warwick.ac.uk , 1989. .Pp -Guy Harris, +Guy Harris, .Aq guy@netapp.com , made many changes from 1993 to the present. -1989. .Pp Primary development and maintenance from 1990 to the present by Christos Zoulas @@ -587,7 +586,6 @@ program, and are not covered by the above license. .Nm returns 0 on success, and non-zero on error. .Sh BUGS -.Pp Please report bugs and send patches to the bug tracker at .Pa http://bugs.gw.com/ or the mailing list at @@ -596,7 +594,6 @@ or the mailing list at .Pa http://mx.gw.com/mailman/listinfo/file first to subscribe). .Sh TODO -.Pp Fix output so that tests for MIME and APPLE flags are not needed all over the place, and actual output is only done in one place. This needs a design. @@ -645,16 +642,16 @@ Fix .Dq name and .Dq use -to check for consistency at compile time (duplicate +to check for consistency at compile time (duplicate .Dq name , .Dq use pointing to undefined .Dq name ). -Make +Make .Dq name / -.Dq use +.Dq use more efficient by keeping a sorted list of names. Special-case ^ to flip endianness in the parser so that it does not have to be escaped, and document it. Modified: vendor/file/dist/doc/libmagic.man ============================================================================== --- vendor/file/dist/doc/libmagic.man Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/doc/libmagic.man Sun Sep 17 15:57:06 2017 (r323678) @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.40 2016/03/31 17:51:12 christos Exp $ +.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 11, 2015 +.Dd May 23, 2017 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm magic_errno , .Nm magic_descriptor , .Nm magic_buffer , +.Nm magic_getflags , .Nm magic_setflags , .Nm magic_check , .Nm magic_compile , @@ -64,6 +65,8 @@ .Ft const char * .Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length" .Ft int +.Fn magic_getflags "magic_t cookie" +.Ft int .Fn magic_setflags "magic_t cookie" "int flags" .Ft int .Fn magic_check "magic_t cookie" "const char *filename" @@ -204,6 +207,12 @@ function returns a textual description of the contents argument with .Ar length bytes size. +.Pp +The +.Fn magic_getflags +functions returns a value representing current +.Ar flags +set. .Pp The .Fn magic_setflags Modified: vendor/file/dist/doc/magic.man ============================================================================== --- vendor/file/dist/doc/magic.man Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/doc/magic.man Sun Sep 17 15:57:06 2017 (r323678) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.88 2016/07/27 09:42:49 rrt Exp $ -.Dd July 20, 2016 +.\" $File: magic.man,v 1.91 2017/02/12 15:30:08 christos Exp $ +.Dd February 12, 2017 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -7,7 +7,7 @@ .Nm magic .Nd file command's magic pattern file .Sh DESCRIPTION -This manual page documents the format of the magic file as +This manual page documents the format of magic files as used by the .Xr file __CSECTION__ command, version __VERSION__. @@ -17,13 +17,19 @@ command identifies the type of a file using, among other tests, a test for whether the file contains certain .Dq "magic patterns" . -The file -.Pa __MAGIC__ -specifies what patterns are to be tested for, what message or +The database of these +.Dq "magic patterns" +is usually located in a binary file in +.Pa __MAGIC__.mgc +or a directory of source text magic pattern fragment files in +.Pa __MAGIC__ . +The database specifies what patterns are to be tested for, what message or MIME type to print if a particular pattern is found, and additional information to extract from the file. .Pp -Each line of the file specifies a test to be performed. +The format of the source fragment files that are used to build this database +is as follows: +Each line of a fragment file specifies a test to be performed. A test compares the data starting at a particular offset in the file with a byte value, a string or a numeric value. If the test succeeds, a message is printed. @@ -98,13 +104,13 @@ The following modifiers are supported: .It B A byte length (default). .It H -A 2 byte big endian length. +A 4 byte big endian length. .It h -A 2 byte big little length. +A 2 byte big endian length. .It L -A 4 byte big endian length. +A 4 byte little endian length. .It l -A 4 byte big little length. +A 2 byte little endian length. .It J The length includes itself in its count. .El @@ -651,7 +657,7 @@ start of the main indirect offset. \*[Gt]\*[Gt]\*[Gt]\*[Gt](\*[Am]0xe.l+(-4)) string PK\e3\e4 \eb, ZIP self-extracting archive .Ed .Pp -If you have a list of known avalues at a particular continuation level, +If you have a list of known values at a particular continuation level, and you want to provide a switch-like default case: .Bd -literal -offset indent # clear that continuation level match Modified: vendor/file/dist/magic/Localstuff ============================================================================== --- vendor/file/dist/magic/Localstuff Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/magic/Localstuff Sun Sep 17 15:57:06 2017 (r323678) @@ -2,6 +2,6 @@ #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # -# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $ +# $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $ # Add any locally observed files here. Remember: # text if readable, executable if runnable binary, data if unreadable. Modified: vendor/file/dist/magic/Magdir/adventure ============================================================================== --- vendor/file/dist/magic/Magdir/adventure Sun Sep 17 15:45:39 2017 (r323677) +++ vendor/file/dist/magic/Magdir/adventure Sun Sep 17 15:57:06 2017 (r323678) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: adventure,v 1.15 2015/09/07 10:03:21 christos Exp $ +# $File: adventure,v 1.17 2017/07/03 16:03:40 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -36,11 +36,12 @@ >0 ubyte <9 >>16 belong&0xfe00f0f0 0x3030 >>>0 ubyte < 10 ->>>>2 ubeshort < 10 +>>>>2 ubeshort x >>>>>18 regex [0-9][0-9][0-9][0-9][0-9][0-9] ->>>>>>0 ubyte < 10 Infocom (Z-machine %d, ->>>>>>>2 ubeshort < 10 Release %d / ->>>>>>>>18 string >\0 Serial %.6s) +>>>>>>0 ubyte < 10 Infocom (Z-machine %d +>>>>>>>2 ubeshort x \b, Release %d +>>>>>>>>18 string >\0 \b, Serial %.6s +>>>>>>>>18 string x \b) !:strength + 40 !:mime application/x-zmachine @@ -78,7 +79,7 @@ !:mime application/x-tads # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian # 2-byte length N, the N-char name of the game file *without* a NUL (darn!), -# "TADS2 save\n\r\032\0" and the interpreter version. +# "TADS2 save\n\r\032\0" and the interpreter version. 0 string TADS2\ save/g TADS >12 belong !0x0A0D1A00 saved game data, CORRUPTED >12 belong 0x0A0D1A00 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 17 15:58:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A40DE1AC84; Sun, 17 Sep 2017 15:58:18 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2D2263697; Sun, 17 Sep 2017 15:58:17 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HFwGHS025889; Sun, 17 Sep 2017 15:58:16 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HFwGlV025888; Sun, 17 Sep 2017 15:58:16 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709171558.v8HFwGlV025888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sun, 17 Sep 2017 15:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323679 - vendor/file/5.32 X-SVN-Group: vendor X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: vendor/file/5.32 X-SVN-Commit-Revision: 323679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 15:58:18 -0000 Author: gordon Date: Sun Sep 17 15:58:16 2017 New Revision: 323679 URL: https://svnweb.freebsd.org/changeset/base/323679 Log: Tag file 5.32. Added: vendor/file/5.32/ - copied from r323678, vendor/file/dist/ From owner-svn-src-all@freebsd.org Sun Sep 17 16:45: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 4177EE1D4A3; Sun, 17 Sep 2017 16:45:13 +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 10DA564A05; Sun, 17 Sep 2017 16:45:12 +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 v8HGjCwI046686; Sun, 17 Sep 2017 16:45:12 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HGjCuk046685; Sun, 17 Sep 2017 16:45:12 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709171645.v8HGjCuk046685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 17 Sep 2017 16:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323680 - releng/10.4/lib/libfetch X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/lib/libfetch X-SVN-Commit-Revision: 323680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 16:45:13 -0000 Author: marius Date: Sun Sep 17 16:45:12 2017 New Revision: 323680 URL: https://svnweb.freebsd.org/changeset/base/323680 Log: MF10: r323660, MFC: r322669 In fetch_resolve() if the port number or service name is included in the host argument (e. g. "www.freebsd.org:443"), correctly set the service pointer accordingly. Previously, the service pointer was set to the separator instead, causing getaddrinfo(3) to fail. Approved by: re (kib) Modified: releng/10.4/lib/libfetch/common.c Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/lib/libfetch/common.c ============================================================================== --- releng/10.4/lib/libfetch/common.c Sun Sep 17 15:58:16 2017 (r323679) +++ releng/10.4/lib/libfetch/common.c Sun Sep 17 16:45:12 2017 (r323680) @@ -291,7 +291,7 @@ fetch_resolve(const char *addr, int port, int af) goto syserr; service = sbuf; } else if (*sep != '\0') { - service = sep; + service = sep + 1; } else { service = NULL; } From owner-svn-src-all@freebsd.org Sun Sep 17 16:45: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 893E6E1D60B; Sun, 17 Sep 2017 16:45:51 +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 57FFD64BA5; Sun, 17 Sep 2017 16:45:51 +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 v8HGjopt046767; Sun, 17 Sep 2017 16:45:50 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HGjoKV046764; Sun, 17 Sep 2017 16:45:50 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709171645.v8HGjoKV046764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 17 Sep 2017 16:45: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: r323681 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 323681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 16:45:51 -0000 Author: alc Date: Sun Sep 17 16:45:50 2017 New Revision: 323681 URL: https://svnweb.freebsd.org/changeset/base/323681 Log: MFC r321840,322041 The blist_meta_* routines that process a subtree take arguments 'radix' and 'skip', which denote, respectively, the largest number of blocks that can be managed by a subtree of that height, and one less than the number of nodes in a subtree of that height. This change removes the 'skip' argument from those functions because 'skip' can be trivially computed from 'radius'. This change also redefines 'skip' so that it denotes the number of nodes in the subtree, and so changes loop upper bound tests from '<= skip' to '< skip' to account for the change. The 'skip' field is also removed from the blist struct. The self-test program is changed so that the print command includes the cursor value in the output. In case readers are misled by expressions that combine multiplication and division, add parentheses to make the precedence explicit. Modified: stable/11/sys/kern/subr_blist.c stable/11/sys/sys/blist.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_blist.c ============================================================================== --- stable/11/sys/kern/subr_blist.c Sun Sep 17 16:45:12 2017 (r323680) +++ stable/11/sys/kern/subr_blist.c Sun Sep 17 16:45:50 2017 (r323681) @@ -110,6 +110,7 @@ __FBSDID("$FreeBSD$"); #define bitcount64(x) __bitcount64((uint64_t)(x)) #define malloc(a,b,c) calloc(a, 1) #define free(a,b) free(a) +#define CTASSERT(expr) #include @@ -123,27 +124,52 @@ void panic(const char *ctl, ...); static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor); static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t cursor); + daddr_t radix, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t blk); + daddr_t radix, daddr_t blk); static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, blist_t dest, daddr_t count); + blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t blk); -static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, - daddr_t count); + daddr_t radix, daddr_t blk); +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count); #ifndef _KERNEL static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, int tab); + int tab); #endif #ifdef _KERNEL static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); #endif +CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); + /* + * For a subtree that can represent the state of up to 'radix' blocks, the + * number of leaf nodes of the subtree is L=radix/BLIST_BMAP_RADIX. If 'm' + * is short for BLIST_META_RADIX, then for a tree of height h with L=m**h + * leaf nodes, the total number of tree nodes is 1 + m + m**2 + ... + m**h, + * or, equivalently, (m**(h+1)-1)/(m-1). This quantity is called 'skip' + * in the 'meta' functions that process subtrees. Since integer division + * discards remainders, we can express this computation as + * skip = (m * m**h) / (m - 1) + * skip = (m * (radix / BLIST_BMAP_RADIX)) / (m - 1) + * and since m divides BLIST_BMAP_RADIX, we can simplify further to + * skip = (radix / (BLIST_BMAP_RADIX / m)) / (m - 1) + * skip = radix / ((BLIST_BMAP_RADIX / m) * (m - 1)) + * so that simple integer division by a constant can safely be used for the + * calculation. + */ +static inline daddr_t +radix_to_skip(daddr_t radix) +{ + + return (radix / + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - 1))); +} + +/* * blist_create() - create a blist capable of handling up to the specified * number of blocks * @@ -157,18 +183,16 @@ blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; - daddr_t nodes, radix, skip; + daddr_t nodes, radix; /* - * Calculate radix and skip field used for scanning. + * Calculate the radix field used for scanning. */ radix = BLIST_BMAP_RADIX; - skip = 0; while (radix < blocks) { radix *= BLIST_META_RADIX; - skip = (skip + 1) * BLIST_META_RADIX; } - nodes = 1 + blst_radix_init(NULL, radix, skip, blocks); + nodes = 1 + blst_radix_init(NULL, radix, blocks); bl = malloc(sizeof(struct blist), M_SWAP, flags); if (bl == NULL) @@ -176,14 +200,13 @@ blist_create(daddr_t blocks, int flags) bl->bl_blocks = blocks; bl->bl_radix = radix; - bl->bl_skip = skip; bl->bl_cursor = 0; bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); if (bl->bl_root == NULL) { free(bl, M_SWAP); return (NULL); } - blst_radix_init(bl->bl_root, radix, skip, blocks); + blst_radix_init(bl->bl_root, radix, blocks); #if defined(BLIST_DEBUG) printf( @@ -225,7 +248,7 @@ blist_alloc(blist_t bl, daddr_t count) */ while (count <= bl->bl_root->bm_bighint) { blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, - bl->bl_skip, bl->bl_cursor); + bl->bl_cursor); if (blk != SWAPBLK_NONE) { bl->bl_cursor = blk + count; return (blk); @@ -257,7 +280,7 @@ void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { - blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); + blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, 0); } /* @@ -270,8 +293,7 @@ daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { - return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, - bl->bl_skip, 0)); + return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, 0)); } /* @@ -290,7 +312,7 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, *pbl = newbl; if (count > save->bl_blocks) count = save->bl_blocks; - blst_copy(save->bl_root, 0, save->bl_radix, save->bl_skip, newbl, count); + blst_copy(save->bl_root, 0, save->bl_radix, newbl, count); /* * If resizing upwards, should we free the new space or not? @@ -309,8 +331,8 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, void blist_print(blist_t bl) { - printf("BLIST {\n"); - blst_radix_print(bl->bl_root, 0, bl->bl_radix, bl->bl_skip, 4); + printf("BLIST cursor = %08jx {\n", (uintmax_t)bl->bl_cursor); + blst_radix_print(bl->bl_root, 0, bl->bl_radix, 4); printf("}\n"); } @@ -426,9 +448,9 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count */ static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t cursor) + daddr_t cursor) { - daddr_t i, next_skip, r; + daddr_t i, next_skip, r, skip; int child; bool scan_from_start; @@ -443,6 +465,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c scan->bm_bighint = scan->u.bmu_avail; return (SWAPBLK_NONE); } + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; /* @@ -456,7 +479,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c * Reinitialize each of the meta node's children. An ALL-FREE * meta node cannot have a terminator in any subtree. */ - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; else @@ -477,13 +500,13 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c scan_from_start = cursor == blk; child = (cursor - blk) / radix; blk += child * radix; - for (i = 1 + child * next_skip; i <= skip; i += next_skip) { + for (i = 1 + child * next_skip; i < skip; i += next_skip) { if (count <= scan[i].bm_bighint) { /* * The allocation might fit in the i'th subtree. */ r = blst_meta_alloc(&scan[i], blk, count, radix, - next_skip - 1, cursor > blk ? cursor : blk); + cursor > blk ? cursor : blk); if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; return (r); @@ -552,15 +575,16 @@ blst_leaf_free(blmeta_t *scan, daddr_t blk, int count) */ static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t blk) + daddr_t blk) { - daddr_t i, next_skip, v; + daddr_t i, next_skip, skip, v; int child; if (scan->bm_bighint == (daddr_t)-1) panic("freeing invalid range"); if (radix == BLIST_BMAP_RADIX) return (blst_leaf_free(scan, freeBlk, count)); + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -572,7 +596,7 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ scan->bm_bighint = count; if (count != radix) { - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) break; scan[i].bm_bighint = 0; @@ -609,11 +633,11 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ child = (freeBlk - blk) / radix; blk += child * radix; i = 1 + child * next_skip; - while (i <= skip && blk < freeBlk + count) { + while (i < skip && blk < freeBlk + count) { v = blk + radix - freeBlk; if (v > count) v = count; - blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); + blst_meta_free(&scan[i], freeBlk, v, radix, blk); if (scan->bm_bighint < scan[i].bm_bighint) scan->bm_bighint = scan[i].bm_bighint; count -= v; @@ -630,10 +654,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ * tree. The space may not already be free in the destination. */ static void -blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, - blist_t dest, daddr_t count) +blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, blist_t dest, + daddr_t count) { - daddr_t i, next_skip; + daddr_t i, next_skip, skip; /* * Leaf node @@ -677,21 +701,20 @@ blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, } - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; - for (i = 1; count && i <= skip; i += next_skip) { + for (i = 1; count && i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) break; if (count >= radix) { - blst_copy(&scan[i], blk, radix, next_skip - 1, dest, - radix); + blst_copy(&scan[i], blk, radix, dest, radix); count -= radix; } else { if (count) { - blst_copy(&scan[i], blk, radix, next_skip - 1, - dest, count); + blst_copy(&scan[i], blk, radix, dest, count); } count = 0; } @@ -733,9 +756,9 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) */ static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t blk) + daddr_t blk) { - daddr_t i, nblks, next_skip, v; + daddr_t i, nblks, next_skip, skip, v; int child; if (scan->bm_bighint == (daddr_t)-1) @@ -758,6 +781,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr scan->bm_bighint = 0; return (nblks); } + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; /* @@ -771,7 +795,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * Reinitialize each of the meta node's children. An ALL-FREE * meta node cannot have a terminator in any subtree. */ - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; else @@ -786,12 +810,11 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr child = (allocBlk - blk) / radix; blk += child * radix; i = 1 + child * next_skip; - while (i <= skip && blk < allocBlk + count) { + while (i < skip && blk < allocBlk + count) { v = blk + radix - allocBlk; if (v > count) v = count; - nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, - next_skip - 1, blk); + nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, blk); count -= v; allocBlk += v; blk += radix; @@ -810,9 +833,9 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * RADIX values we use. */ static daddr_t -blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) +blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count) { - daddr_t i, memindex, next_skip; + daddr_t i, memindex, next_skip, skip; memindex = 0; @@ -839,17 +862,18 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t scan->u.bmu_avail = 0; } - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (count >= radix) { /* * Allocate the entire object */ memindex = i + blst_radix_init(((scan) ? &scan[i] : NULL), radix, - next_skip - 1, radix); + radix); count -= radix; } else if (count > 0) { /* @@ -857,7 +881,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t */ memindex = i + blst_radix_init(((scan) ? &scan[i] : NULL), radix, - next_skip - 1, count); + count); count = 0; } else { /* @@ -876,10 +900,9 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t #ifdef BLIST_DEBUG static void -blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, - int tab) +blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int tab) { - daddr_t i, next_skip; + daddr_t i, next_skip, skip; if (radix == BLIST_BMAP_RADIX) { printf( @@ -920,11 +943,12 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t (long long)scan->bm_bighint ); - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; tab += 4; - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) { printf( "%*.*s(%08llx,%lld): Terminator\n", @@ -933,7 +957,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); break; } - blst_radix_print(&scan[i], blk, radix, next_skip - 1, tab); + blst_radix_print(&scan[i], blk, radix, tab); blk += radix; } tab -= 4; Modified: stable/11/sys/sys/blist.h ============================================================================== --- stable/11/sys/sys/blist.h Sun Sep 17 16:45:12 2017 (r323680) +++ stable/11/sys/sys/blist.h Sun Sep 17 16:45:50 2017 (r323681) @@ -81,7 +81,6 @@ typedef struct blmeta { typedef struct blist { daddr_t bl_blocks; /* area of coverage */ daddr_t bl_radix; /* coverage radix */ - daddr_t bl_skip; /* starting skip */ daddr_t bl_cursor; /* next-fit search starts at */ blmeta_t *bl_root; /* root of radix tree */ } *blist_t; From owner-svn-src-all@freebsd.org Sun Sep 17 19:14: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 97A29E2588F; Sun, 17 Sep 2017 19:14:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C98A6A1D4; Sun, 17 Sep 2017 19:14:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HJEdaA009205; Sun, 17 Sep 2017 19:14:39 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HJEcVg009193; Sun, 17 Sep 2017 19:14:38 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709171914.v8HJEcVg009193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sun, 17 Sep 2017 19:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323683 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Commit-Revision: 323683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 19:14:40 -0000 Author: gordon Date: Sun Sep 17 19:14:38 2017 New Revision: 323683 URL: https://svnweb.freebsd.org/changeset/base/323683 Log: MFV r323678: file 5.32 Approved by: emaste (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12400 Added: head/contrib/file/magic/Magdir/apache - copied unchanged from r323678, vendor/file/dist/magic/Magdir/apache head/contrib/file/magic/Magdir/bhl - copied unchanged from r323678, vendor/file/dist/magic/Magdir/bhl head/contrib/file/magic/Magdir/gconv - copied unchanged from r323678, vendor/file/dist/magic/Magdir/gconv head/contrib/file/magic/Magdir/gpu - copied unchanged from r323678, vendor/file/dist/magic/Magdir/gpu head/contrib/file/magic/Magdir/webassembly - copied unchanged from r323678, vendor/file/dist/magic/Magdir/webassembly head/contrib/file/magic/Magdir/yara - copied unchanged from r323678, vendor/file/dist/magic/Magdir/yara head/contrib/file/tests/hddrawcopytool.result - copied unchanged from r323678, vendor/file/dist/tests/hddrawcopytool.result head/contrib/file/tests/hddrawcopytool.testfile - copied unchanged from r323678, vendor/file/dist/tests/hddrawcopytool.testfile Modified: head/contrib/file/ChangeLog head/contrib/file/aclocal.m4 head/contrib/file/config.guess head/contrib/file/config.sub head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/doc/file.man head/contrib/file/doc/libmagic.man head/contrib/file/doc/magic.man head/contrib/file/magic/Localstuff head/contrib/file/magic/Magdir/adventure head/contrib/file/magic/Magdir/amanda head/contrib/file/magic/Magdir/amigaos head/contrib/file/magic/Magdir/android head/contrib/file/magic/Magdir/animation head/contrib/file/magic/Magdir/apple head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/att3b head/contrib/file/magic/Magdir/audio head/contrib/file/magic/Magdir/blackberry head/contrib/file/magic/Magdir/blender head/contrib/file/magic/Magdir/c-lang head/contrib/file/magic/Magdir/cad head/contrib/file/magic/Magdir/cafebabe head/contrib/file/magic/Magdir/clipper head/contrib/file/magic/Magdir/coff head/contrib/file/magic/Magdir/commands head/contrib/file/magic/Magdir/compress head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/cups head/contrib/file/magic/Magdir/database head/contrib/file/magic/Magdir/der head/contrib/file/magic/Magdir/diff head/contrib/file/magic/Magdir/dolby head/contrib/file/magic/Magdir/dump head/contrib/file/magic/Magdir/dyadic head/contrib/file/magic/Magdir/editors head/contrib/file/magic/Magdir/filesystems head/contrib/file/magic/Magdir/flash head/contrib/file/magic/Magdir/fonts head/contrib/file/magic/Magdir/fsav head/contrib/file/magic/Magdir/games head/contrib/file/magic/Magdir/geo head/contrib/file/magic/Magdir/gnu head/contrib/file/magic/Magdir/gpt head/contrib/file/magic/Magdir/gringotts head/contrib/file/magic/Magdir/hitachi-sh head/contrib/file/magic/Magdir/ibm370 head/contrib/file/magic/Magdir/ibm6000 head/contrib/file/magic/Magdir/icc head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/intel head/contrib/file/magic/Magdir/isz head/contrib/file/magic/Magdir/jpeg head/contrib/file/magic/Magdir/kerberos head/contrib/file/magic/Magdir/kml head/contrib/file/magic/Magdir/linux head/contrib/file/magic/Magdir/lisp head/contrib/file/magic/Magdir/m4 head/contrib/file/magic/Magdir/macintosh head/contrib/file/magic/Magdir/make head/contrib/file/magic/Magdir/maple head/contrib/file/magic/Magdir/marc21 head/contrib/file/magic/Magdir/mathematica head/contrib/file/magic/Magdir/metastore head/contrib/file/magic/Magdir/meteorological head/contrib/file/magic/Magdir/microfocus head/contrib/file/magic/Magdir/mime head/contrib/file/magic/Magdir/misctools head/contrib/file/magic/Magdir/modem head/contrib/file/magic/Magdir/mozilla head/contrib/file/magic/Magdir/msdos head/contrib/file/magic/Magdir/msvc head/contrib/file/magic/Magdir/msx head/contrib/file/magic/Magdir/mup head/contrib/file/magic/Magdir/nasa head/contrib/file/magic/Magdir/netbsd head/contrib/file/magic/Magdir/netscape head/contrib/file/magic/Magdir/nitpicker head/contrib/file/magic/Magdir/os2 head/contrib/file/magic/Magdir/os9 head/contrib/file/magic/Magdir/pbf head/contrib/file/magic/Magdir/pc88 head/contrib/file/magic/Magdir/pc98 head/contrib/file/magic/Magdir/pdf head/contrib/file/magic/Magdir/pdp head/contrib/file/magic/Magdir/perl head/contrib/file/magic/Magdir/pgf head/contrib/file/magic/Magdir/pgp head/contrib/file/magic/Magdir/printer head/contrib/file/magic/Magdir/project head/contrib/file/magic/Magdir/psdbms head/contrib/file/magic/Magdir/python head/contrib/file/magic/Magdir/riff head/contrib/file/magic/Magdir/ruby head/contrib/file/magic/Magdir/sccs head/contrib/file/magic/Magdir/scientific head/contrib/file/magic/Magdir/sendmail head/contrib/file/magic/Magdir/sequent head/contrib/file/magic/Magdir/sgml head/contrib/file/magic/Magdir/sharc head/contrib/file/magic/Magdir/sketch head/contrib/file/magic/Magdir/sql head/contrib/file/magic/Magdir/ssl head/contrib/file/magic/Magdir/sysex head/contrib/file/magic/Magdir/terminfo head/contrib/file/magic/Magdir/vms head/contrib/file/magic/Magdir/vmware head/contrib/file/magic/Magdir/vorbis head/contrib/file/magic/Magdir/windows head/contrib/file/magic/Magdir/xenix head/contrib/file/magic/Magdir/xilinx head/contrib/file/magic/Magdir/xwindows head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/python/magic.py head/contrib/file/src/apprentice.c head/contrib/file/src/cdf.c head/contrib/file/src/cdf.h head/contrib/file/src/cdf_time.c head/contrib/file/src/compress.c head/contrib/file/src/der.c head/contrib/file/src/file.h head/contrib/file/src/fsmagic.c head/contrib/file/src/funcs.c head/contrib/file/src/is_tar.c head/contrib/file/src/magic.c head/contrib/file/src/magic.h.in head/contrib/file/src/print.c head/contrib/file/src/readcdf.c head/contrib/file/src/readelf.c head/contrib/file/src/readelf.h head/contrib/file/src/softmagic.c head/contrib/file/src/vasprintf.c head/contrib/file/tests/Makefile.am head/contrib/file/tests/Makefile.in head/contrib/file/tests/test.c head/lib/libmagic/config.h Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/ChangeLog Sun Sep 17 19:14:38 2017 (r323683) @@ -1,6 +1,60 @@ +2017-09-02 11:53 Christos Zoulas + + * release 5.32 + +2017-08-28 16:37 Christos Zoulas + + * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) + +2017-08-27 03:55 Christos Zoulas + + * Fix always true condition (Thomas Jarosch) + +2017-05-24 17:30 Christos Zoulas + + * pickier parsing of numeric values in magic files. + +2017-05-23 17:55 Christos Zoulas + + * PR/615 add magic_getflags() + +2017-05-23 13:55 Christos Zoulas + + * release 5.31 + +2017-03-17 20:32 Christos Zoulas + + * remove trailing spaces from magic files + * refactor is_tar + * better bounds checks for cdf + +2017-02-10 12:24 Christos Zoulas + + * release 5.30 + +2017-02-07 23:27 Christos Zoulas + + * If we exceeded the offset in a search return no match + (Christoph Biedl) + * Be more lenient on corrupt CDF files (Christoph Biedl) + +2017-02-04 16:46 Christos Zoulas + + * pacify ubsan sign extension (oss-fuzz/524) + +2017-02-01 12:42 Christos Zoulas + + * off by one in cdf parsing (PR/593) + * report debugging sections in elf (PR/591) + +2016-11-06 10:52 Christos Zoulas + + * Allow @@@ in extensions + * Add missing overflow check in der magic (Jonas Wagner) + 2016-10-25 10:40 Christos Zoulas - * release 5.28 + * release 5.29 2016-10-24 11:20 Christos Zoulas @@ -387,7 +441,7 @@ ` 2013-11-06 14:40 Christos Zoulas - * fix erroneous non-zero exit code from non-existant file and message + * fix erroneous non-zero exit code from non-existent file and message 2013-10-29 14:25 Christos Zoulas Modified: head/contrib/file/aclocal.m4 ============================================================================== --- head/contrib/file/aclocal.m4 Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/aclocal.m4 Sun Sep 17 19:14:38 2017 (r323683) @@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the b To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. Modified: head/contrib/file/config.guess ============================================================================== --- head/contrib/file/config.guess Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/config.guess Sun Sep 17 19:14:38 2017 (r323683) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2015-03-04' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ timestamp='2015-03-04' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in - arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -221,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: @@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -249,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -265,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -373,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -407,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -632,13 +642,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -677,11 +687,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -694,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -804,14 +814,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -893,7 +903,7 @@ EOF exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -916,7 +926,7 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -962,6 +972,9 @@ EOF ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -987,6 +1000,9 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; @@ -1019,6 +1035,9 @@ EOF ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; @@ -1038,7 +1057,7 @@ EOF echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1117,7 +1136,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1266,6 +1285,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1279,9 +1301,9 @@ EOF UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1303,7 +1325,7 @@ EOF exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1334,7 +1356,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1376,7 +1398,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1387,23 +1409,25 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp Modified: head/contrib/file/config.sub ============================================================================== --- head/contrib/file/config.sub Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/config.sub Sun Sep 17 19:14:38 2017 (r323683) @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2015-03-08' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2015-03-08' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ timestamp='2015-03-08' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -118,7 +117,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -255,6 +254,7 @@ case $basic_machine in | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ @@ -301,11 +301,12 @@ case $basic_machine in | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,6 +377,7 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ @@ -427,13 +429,15 @@ case $basic_machine in | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,7 +522,7 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; - asmjs) + asmjs) basic_machine=asmjs-unknown ;; aux) @@ -641,6 +645,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -1020,7 +1032,7 @@ case $basic_machine in ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1030,7 +1042,7 @@ case $basic_machine in ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1376,18 +1388,18 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1396,7 +1408,8 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1528,6 +1541,8 @@ case $os in ;; -nacl*) ;; + -ios) + ;; -none) ;; *) @@ -1622,6 +1637,9 @@ case $basic_machine in ;; sparc-* | *-sun) os=-sunos4.1.1 + ;; + pru-*) + os=-elf ;; *-be) os=-beos Modified: head/contrib/file/configure ============================================================================== --- head/contrib/file/configure Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/configure Sun Sep 17 19:14:38 2017 (r323683) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.29. +# Generated by GNU Autoconf 2.69 for file 5.32. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.29' -PACKAGE_STRING='file 5.29' +PACKAGE_VERSION='5.32' +PACKAGE_STRING='file 5.32' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.29 to adapt to many kinds of systems. +\`configure' configures file 5.32 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.29:";; + short | recursive ) echo "Configuration of file 5.32:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.29 +file configure 5.32 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2165,7 +2165,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.29, which was +It was created by file $as_me 5.32, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3031,7 +3031,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.29' + VERSION='5.32' cat >>confdefs.h <<_ACEOF @@ -15075,7 +15075,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.29, which was +This file was extended by file $as_me 5.32, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15141,7 +15141,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.29 +file config.status 5.32 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/file/configure.ac ============================================================================== --- head/contrib/file/configure.ac Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/configure.ac Sun Sep 17 19:14:38 2017 (r323683) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.29],[christos@astron.com]) +AC_INIT([file],[5.32],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) Modified: head/contrib/file/doc/file.man ============================================================================== --- head/contrib/file/doc/file.man Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/doc/file.man Sun Sep 17 19:14:38 2017 (r323683) @@ -1,4 +1,4 @@ -.\" $File: file.man,v 1.124 2016/10/19 20:52:45 christos Exp $ +.\" $File: file.man,v 1.125 2017/01/03 11:24:46 christos Exp $ .Dd October 19, 2016 .Dt FILE __CSECTION__ .Os @@ -238,8 +238,8 @@ or at least one filename argument must be present; to test the standard input, use .Sq - as a filename argument. -Please note that -.Ar namefile +Please note that +.Ar namefile is unwrapped and the enclosed filenames are processed when this option is encountered and before any further options processing is done. This allows one to process multiple lists of files with different command line @@ -411,10 +411,10 @@ and .Fl h options. .Sh SEE ALSO -.Xr magic __FSECTION__ , .Xr hexdump 1 , .Xr od 1 , .Xr strings 1 , +.Xr magic __FSECTION__ , .Xr fstyp 8 .Sh STANDARDS CONFORMANCE This program is believed to exceed the System V Interface Definition @@ -531,16 +531,15 @@ John Gilmore revised the code extensively, making it b the first version. Geoff Collyer found several inadequacies and provided some magic file entries. -Contributions by the +Contributions of the .Sq \*[Am] operator by Rob McMahon, .Aq cudcv@warwick.ac.uk , 1989. .Pp -Guy Harris, +Guy Harris, .Aq guy@netapp.com , made many changes from 1993 to the present. -1989. .Pp Primary development and maintenance from 1990 to the present by Christos Zoulas @@ -588,7 +587,6 @@ program, and are not covered by the above license. .Nm returns 0 on success, and non-zero on error. .Sh BUGS -.Pp Please report bugs and send patches to the bug tracker at .Pa http://bugs.gw.com/ or the mailing list at @@ -597,7 +595,6 @@ or the mailing list at .Pa http://mx.gw.com/mailman/listinfo/file first to subscribe). .Sh TODO -.Pp Fix output so that tests for MIME and APPLE flags are not needed all over the place, and actual output is only done in one place. This needs a design. @@ -646,16 +643,16 @@ Fix .Dq name and .Dq use -to check for consistency at compile time (duplicate +to check for consistency at compile time (duplicate .Dq name , .Dq use pointing to undefined .Dq name ). -Make +Make .Dq name / -.Dq use +.Dq use more efficient by keeping a sorted list of names. Special-case ^ to flip endianness in the parser so that it does not have to be escaped, and document it. Modified: head/contrib/file/doc/libmagic.man ============================================================================== --- head/contrib/file/doc/libmagic.man Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/doc/libmagic.man Sun Sep 17 19:14:38 2017 (r323683) @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.40 2016/03/31 17:51:12 christos Exp $ +.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 11, 2015 +.Dd May 23, 2017 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm magic_errno , .Nm magic_descriptor , .Nm magic_buffer , +.Nm magic_getflags , .Nm magic_setflags , .Nm magic_check , .Nm magic_compile , @@ -64,6 +65,8 @@ .Ft const char * .Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length" .Ft int +.Fn magic_getflags "magic_t cookie" +.Ft int .Fn magic_setflags "magic_t cookie" "int flags" .Ft int .Fn magic_check "magic_t cookie" "const char *filename" @@ -204,6 +207,12 @@ function returns a textual description of the contents argument with .Ar length bytes size. +.Pp +The +.Fn magic_getflags +functions returns a value representing current +.Ar flags +set. .Pp The .Fn magic_setflags Modified: head/contrib/file/doc/magic.man ============================================================================== --- head/contrib/file/doc/magic.man Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/doc/magic.man Sun Sep 17 19:14:38 2017 (r323683) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.88 2016/07/27 09:42:49 rrt Exp $ -.Dd July 20, 2016 +.\" $File: magic.man,v 1.91 2017/02/12 15:30:08 christos Exp $ +.Dd February 12, 2017 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -7,7 +7,7 @@ .Nm magic .Nd file command's magic pattern file .Sh DESCRIPTION -This manual page documents the format of the magic file as +This manual page documents the format of magic files as used by the .Xr file __CSECTION__ command, version __VERSION__. @@ -17,13 +17,19 @@ command identifies the type of a file using, among other tests, a test for whether the file contains certain .Dq "magic patterns" . -The file -.Pa __MAGIC__ -specifies what patterns are to be tested for, what message or +The database of these +.Dq "magic patterns" +is usually located in a binary file in +.Pa __MAGIC__.mgc +or a directory of source text magic pattern fragment files in +.Pa __MAGIC__ . +The database specifies what patterns are to be tested for, what message or MIME type to print if a particular pattern is found, and additional information to extract from the file. .Pp -Each line of the file specifies a test to be performed. +The format of the source fragment files that are used to build this database +is as follows: +Each line of a fragment file specifies a test to be performed. A test compares the data starting at a particular offset in the file with a byte value, a string or a numeric value. If the test succeeds, a message is printed. @@ -98,13 +104,13 @@ The following modifiers are supported: .It B A byte length (default). .It H -A 2 byte big endian length. +A 4 byte big endian length. .It h -A 2 byte big little length. +A 2 byte big endian length. .It L -A 4 byte big endian length. +A 4 byte little endian length. .It l -A 4 byte big little length. +A 2 byte little endian length. .It J The length includes itself in its count. .El @@ -651,7 +657,7 @@ start of the main indirect offset. \*[Gt]\*[Gt]\*[Gt]\*[Gt](\*[Am]0xe.l+(-4)) string PK\e3\e4 \eb, ZIP self-extracting archive .Ed .Pp -If you have a list of known avalues at a particular continuation level, +If you have a list of known values at a particular continuation level, and you want to provide a switch-like default case: .Bd -literal -offset indent # clear that continuation level match Modified: head/contrib/file/magic/Localstuff ============================================================================== --- head/contrib/file/magic/Localstuff Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/magic/Localstuff Sun Sep 17 19:14:38 2017 (r323683) @@ -2,6 +2,6 @@ #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # -# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $ +# $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $ # Add any locally observed files here. Remember: # text if readable, executable if runnable binary, data if unreadable. Modified: head/contrib/file/magic/Magdir/adventure ============================================================================== --- head/contrib/file/magic/Magdir/adventure Sun Sep 17 19:04:06 2017 (r323682) +++ head/contrib/file/magic/Magdir/adventure Sun Sep 17 19:14:38 2017 (r323683) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: adventure,v 1.15 2015/09/07 10:03:21 christos Exp $ +# $File: adventure,v 1.17 2017/07/03 16:03:40 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -36,11 +36,12 @@ >0 ubyte <9 >>16 belong&0xfe00f0f0 0x3030 >>>0 ubyte < 10 ->>>>2 ubeshort < 10 +>>>>2 ubeshort x >>>>>18 regex [0-9][0-9][0-9][0-9][0-9][0-9] ->>>>>>0 ubyte < 10 Infocom (Z-machine %d, ->>>>>>>2 ubeshort < 10 Release %d / ->>>>>>>>18 string >\0 Serial %.6s) +>>>>>>0 ubyte < 10 Infocom (Z-machine %d +>>>>>>>2 ubeshort x \b, Release %d +>>>>>>>>18 string >\0 \b, Serial %.6s +>>>>>>>>18 string x \b) !:strength + 40 !:mime application/x-zmachine @@ -78,7 +79,7 @@ !:mime application/x-tads # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian # 2-byte length N, the N-char name of the game file *without* a NUL (darn!), -# "TADS2 save\n\r\032\0" and the interpreter version. +# "TADS2 save\n\r\032\0" and the interpreter version. 0 string TADS2\ save/g TADS >12 belong !0x0A0D1A00 saved game data, CORRUPTED >12 belong 0x0A0D1A00 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 17 19:40: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 7939FE26E40; Sun, 17 Sep 2017 19:40:18 +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 4795E6AEDB; Sun, 17 Sep 2017 19:40:18 +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 v8HJeHSh018021; Sun, 17 Sep 2017 19:40:17 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HJeHmQ018020; Sun, 17 Sep 2017 19:40:17 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201709171940.v8HJeHmQ018020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 17 Sep 2017 19:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323684 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 323684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 19:40:18 -0000 Author: jhibbits Date: Sun Sep 17 19:40:17 2017 New Revision: 323684 URL: https://svnweb.freebsd.org/changeset/base/323684 Log: Print the correct bitmask for the running Book-E CPU All the Book-E world is no longer e500v{1,2}. e500mc the 64-bit derivatives do not use the DOZE/NAP bits with MSR[WE], instead using the `wait' instruction to wait for interrupts, and SoC plane controls (via CCSR) for power management. MFC after: 1 week Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sun Sep 17 19:14:38 2017 (r323683) +++ head/sys/powerpc/powerpc/cpu.c Sun Sep 17 19:40:17 2017 (r323684) @@ -530,16 +530,32 @@ cpu_booke_setup(int cpuid, uint16_t vers) { #ifdef BOOKE_E500 register_t hid0; + const char *bitmask; hid0 = mfspr(SPR_HID0); - /* Programe power-management mode. */ - hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP); - hid0 |= HID0_DOZE; + switch (vers) { + case FSL_E500mc: + bitmask = HID0_E500MC_BITMASK; + break; + case FSL_E5500: + case FSL_E6500: + bitmask = HID0_E5500_BITMASK; + break; + case FSL_E500v1: + case FSL_E500v2: + /* Only e500v1/v2 support HID0 power management setup. */ - mtspr(SPR_HID0, hid0); + /* Programe power-management mode. */ + hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP); + hid0 |= HID0_DOZE; - printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK); + mtspr(SPR_HID0, hid0); + default: + bitmask = HID0_E500_BITMASK; + break; + } + printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, bitmask); #endif if (cpu_idle_hook == NULL) From owner-svn-src-all@freebsd.org Sun Sep 17 20:07: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 EA294E01A55; Sun, 17 Sep 2017 20:07:21 +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 B7B046C0D4; Sun, 17 Sep 2017 20:07:21 +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 v8HK7KLB030299; Sun, 17 Sep 2017 20:07:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HK7K4m030298; Sun, 17 Sep 2017 20:07:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201709172007.v8HK7K4m030298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 17 Sep 2017 20:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323687 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 323687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 20:07:22 -0000 Author: jhibbits Date: Sun Sep 17 20:07:20 2017 New Revision: 323687 URL: https://svnweb.freebsd.org/changeset/base/323687 Log: Don't use a non-zero argument for __builtin_frame_address __builtin_frame_address with a non-zero argument is unsafe and rejected by newer gcc. Since it doesn't seem to impact the stacktrace, don't bother with gymnastics to unwind to a different frame for starting. PR: kern/220118 MFC after: 2 weeks Modified: head/sys/powerpc/powerpc/stack_machdep.c Modified: head/sys/powerpc/powerpc/stack_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/stack_machdep.c Sun Sep 17 19:54:27 2017 (r323686) +++ head/sys/powerpc/powerpc/stack_machdep.c Sun Sep 17 20:07:20 2017 (r323687) @@ -110,6 +110,6 @@ stack_save(struct stack *st) { register_t frame; - frame = (register_t)__builtin_frame_address(1); + frame = (register_t)__builtin_frame_address(0); stack_capture(st, frame); } From owner-svn-src-all@freebsd.org Sun Sep 17 22:18: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 51589E09398; Sun, 17 Sep 2017 22:18:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2038370571; Sun, 17 Sep 2017 22:18:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HMI1IM084650; Sun, 17 Sep 2017 22:18:01 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HMI1qh084649; Sun, 17 Sep 2017 22:18:01 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709172218.v8HMI1qh084649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 17 Sep 2017 22:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323689 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 323689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 22:18:02 -0000 Author: rmacklem Date: Sun Sep 17 22:18:01 2017 New Revision: 323689 URL: https://svnweb.freebsd.org/changeset/base/323689 Log: Fix bogus FREAD with NFSV4OPEN_ACCESSREAD. No functional change. The code in nfscl_doflayoutio() bogusly used FREAD instead of NFSV4OPEN_ACCESSREAD. Since both happen to be defined as "1", this worked and the patch doesn't result in a functional change. Found by inspection during development of Flex File Layout support. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Sep 17 21:41:51 2017 (r323688) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Sep 17 22:18:01 2017 (r323689) @@ -5674,7 +5674,7 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *i np->n_flag &= ~NDSCOMMIT; mtx_unlock(&np->n_mtx); } - } else if (rwflag == FREAD) + } else if (rwflag == NFSV4OPEN_ACCESSREAD) error = nfsrpc_readds(vp, uiop, stateidp, eofp, *dspp, io_off, xfer, fhp, cred, p); else { From owner-svn-src-all@freebsd.org Sun Sep 17 22:58: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 B1C23E0B9DF; Sun, 17 Sep 2017 22:58:14 +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 7EDC2718C4; Sun, 17 Sep 2017 22:58:14 +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 v8HMwDBh000816; Sun, 17 Sep 2017 22:58:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HMwDgn000805; Sun, 17 Sep 2017 22:58:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709172258.v8HMwDgn000805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Sep 2017 22:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323691 - in head/sys: dev/iicbus modules/i2c modules/i2c/icee X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: dev/iicbus modules/i2c modules/i2c/icee X-SVN-Commit-Revision: 323691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 22:58:14 -0000 Author: ian Date: Sun Sep 17 22:58:13 2017 New Revision: 323691 URL: https://svnweb.freebsd.org/changeset/base/323691 Log: Give icee(4) a detach() method so it can be used as a module. Add a module makefile for it. Added: head/sys/modules/i2c/icee/ head/sys/modules/i2c/icee/Makefile (contents, props changed) Modified: head/sys/dev/iicbus/icee.c head/sys/modules/i2c/Makefile Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Sun Sep 17 22:58:13 2017 (r323690) +++ head/sys/dev/iicbus/icee.c Sun Sep 17 22:58:13 2017 (r323691) @@ -206,17 +206,34 @@ icee_attach(device_t dev) return (0); } +static int +icee_detach(device_t dev) +{ + struct icee_softc *sc = device_get_softc(dev); + + destroy_dev(sc->cdev); + return (0); +} + static int icee_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { + struct icee_softc *sc; + sc = CDEV2SOFTC(dev); + if (device_get_state(sc->dev) < DS_BUSY) + device_busy(sc->dev); + return (0); } static int icee_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { + struct icee_softc *sc; + sc = CDEV2SOFTC(dev); + device_unbusy(sc->dev); return (0); } @@ -345,6 +362,7 @@ icee_write(struct cdev *dev, struct uio *uio, int iofl static device_method_t icee_methods[] = { DEVMETHOD(device_probe, icee_probe), DEVMETHOD(device_attach, icee_attach), + DEVMETHOD(device_detach, icee_detach), DEVMETHOD_END }; Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Sun Sep 17 22:58:13 2017 (r323690) +++ head/sys/modules/i2c/Makefile Sun Sep 17 22:58:13 2017 (r323691) @@ -6,6 +6,7 @@ SUBDIR = \ ds1307 \ ds13rtc \ ds3231 \ + icee \ if_ic \ iic \ iicbb \ Added: head/sys/modules/i2c/icee/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/icee/Makefile Sun Sep 17 22:58:13 2017 (r323691) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD= icee +SRCS= icee.c + +SRCS+= \ + bus_if.h \ + device_if.h \ + iicbus_if.h \ + ofw_bus_if.h \ + opt_platform.h \ + +.include From owner-svn-src-all@freebsd.org Sun Sep 17 22:58: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 8F21DE0B9DA; Sun, 17 Sep 2017 22:58:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69058718C3; Sun, 17 Sep 2017 22:58:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HMwDLR000804; Sun, 17 Sep 2017 22:58:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HMwD99000799; Sun, 17 Sep 2017 22:58:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709172258.v8HMwD99000799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 17 Sep 2017 22:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323690 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 323690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 22:58:14 -0000 Author: cem Date: Sun Sep 17 22:58:13 2017 New Revision: 323690 URL: https://svnweb.freebsd.org/changeset/base/323690 Log: MCA: Expand AMD Thresholding support to cover all banks When it was added in r314636, AMD Thresholding was hardcoded to only bank 4 (Northbridge) for some reason. However, even on family 10h the MCAx_MISC register Valid/Present bits determine whether thresholding is supported on that bank. Expand thresholding support to monitor all monitorable banks. This simplifies some of the logic and makes it more consistent with our Intel CMCI support. Reviewed by: markj (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12321 Modified: head/sys/x86/x86/local_apic.c head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Sun Sep 17 22:18:01 2017 (r323689) +++ head/sys/x86/x86/local_apic.c Sun Sep 17 22:58:13 2017 (r323690) @@ -1426,8 +1426,9 @@ native_lapic_enable_mca_elvt(void) value = lapic_read32(LAPIC_EXT_LVT0 + APIC_ELVT_MCA); if ((value & APIC_LVT_M) == 0) { - printf("AMD MCE Thresholding Extended LVT is already active\n"); - return (-1); + if (bootverbose) + printf("AMD MCE Thresholding Extended LVT is already active\n"); + return (APIC_ELVT_MCA); } lapics[apic_id].la_elvts[APIC_ELVT_MCA].lvt_masked = 0; lapics[apic_id].la_elvts[APIC_ELVT_MCA].lvt_active = 1; Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Sun Sep 17 22:18:01 2017 (r323689) +++ head/sys/x86/x86/mca.c Sun Sep 17 22:58:13 2017 (r323690) @@ -124,7 +124,7 @@ static struct mtx mca_lock; #ifdef DEV_APIC static struct cmc_state **cmc_state; /* Indexed by cpuid, bank. */ -static struct amd_et_state *amd_et_state; /* Indexed by cpuid. */ +static struct amd_et_state **amd_et_state; /* Indexed by cpuid, bank. */ static int cmc_throttle = 60; /* Time in seconds to throttle CMCI. */ static int amd_elvt = -1; @@ -645,9 +645,7 @@ amd_thresholding_update(enum scan_mode mode, int bank, int new_threshold; int count; - KASSERT(bank == MC_AMDNB_BANK, - ("%s: unexpected bank %d", __func__, bank)); - cc = &amd_et_state[PCPU_GET(cpuid)]; + cc = &amd_et_state[PCPU_GET(cpuid)][bank]; misc = rdmsr(MSR_MC_MISC(bank)); count = (misc & MC_MISC_AMD_CNT_MASK) >> MC_MISC_AMD_CNT_SHIFT; count = count - (MC_MISC_AMD_CNT_MAX - cc->cur_threshold); @@ -841,9 +839,13 @@ cmci_setup(void) static void amd_thresholding_setup(void) { + int i; - amd_et_state = malloc((mp_maxid + 1) * sizeof(struct amd_et_state), - M_MCA, M_WAITOK | M_ZERO); + amd_et_state = malloc((mp_maxid + 1) * sizeof(struct amd_et_state *), + M_MCA, M_WAITOK); + for (i = 0; i <= mp_maxid; i++) + amd_et_state[i] = malloc(sizeof(struct amd_et_state) * + mca_banks, M_MCA, M_WAITOK | M_ZERO); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "cmc_throttle", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &cmc_throttle, 0, sysctl_positive_int, "I", @@ -964,44 +966,59 @@ cmci_resume(int i) wrmsr(MSR_MC_CTL2(i), ctl); } +/* + * Apply an AMD ET configuration to the corresponding MSR. + */ static void -amd_thresholding_start(struct amd_et_state *cc) +amd_thresholding_start(struct amd_et_state *cc, int bank) { uint64_t misc; KASSERT(amd_elvt >= 0, ("ELVT offset is not set")); - misc = rdmsr(MSR_MC_MISC(MC_AMDNB_BANK)); + + misc = rdmsr(MSR_MC_MISC(bank)); + misc &= ~MC_MISC_AMD_INT_MASK; misc |= MC_MISC_AMD_INT_LVT; + misc &= ~MC_MISC_AMD_LVT_MASK; misc |= (uint64_t)amd_elvt << MC_MISC_AMD_LVT_SHIFT; + misc &= ~MC_MISC_AMD_CNT_MASK; misc |= (uint64_t)(MC_MISC_AMD_CNT_MAX - cc->cur_threshold) << MC_MISC_AMD_CNT_SHIFT; + misc &= ~MC_MISC_AMD_OVERFLOW; misc |= MC_MISC_AMD_CNTEN; - wrmsr(MSR_MC_MISC(MC_AMDNB_BANK), misc); + wrmsr(MSR_MC_MISC(bank), misc); } static void -amd_thresholding_init(void) +amd_thresholding_monitor(int i) { struct amd_et_state *cc; uint64_t misc; + /* + * Kludge: On 10h, banks after 4 are not thresholding but also may have + * bogus Valid bits. Skip them. This is definitely fixed in 15h, but + * I have not investigated whether it is fixed in earlier models. + */ + if (CPUID_TO_FAMILY(cpu_id) < 0x15 && i >= 5) + return; + /* The counter must be valid and present. */ - misc = rdmsr(MSR_MC_MISC(MC_AMDNB_BANK)); + misc = rdmsr(MSR_MC_MISC(i)); if ((misc & (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) != - (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) { - printf("%s: 0x%jx: !valid | !present\n", __func__, - (uintmax_t)misc); + (MC_MISC_AMD_VAL | MC_MISC_AMD_CNTP)) return; - } /* The register should not be locked. */ if ((misc & MC_MISC_AMD_LOCK) != 0) { - printf("%s: 0x%jx: locked\n", __func__, (uintmax_t)misc); + if (bootverbose) + printf("%s: 0x%jx: Bank %d: locked\n", __func__, + (uintmax_t)misc, i); return; } @@ -1010,8 +1027,9 @@ amd_thresholding_init(void) * has already claimed it. */ if ((misc & MC_MISC_AMD_CNTEN) != 0) { - printf("%s: 0x%jx: count already enabled\n", __func__, - (uintmax_t)misc); + if (bootverbose) + printf("%s: 0x%jx: Bank %d: already enabled\n", + __func__, (uintmax_t)misc, i); return; } @@ -1022,35 +1040,39 @@ amd_thresholding_init(void) */ amd_elvt = lapic_enable_mca_elvt(); if (amd_elvt < 0) { - printf("%s: lapic enable mca elvt failed: %d\n", __func__, amd_elvt); + printf("%s: Bank %d: lapic enable mca elvt failed: %d\n", + __func__, i, amd_elvt); return; } /* Re-use Intel CMC support infrastructure. */ if (bootverbose) - printf("%s: Starting AMD thresholding\n", __func__); + printf("%s: Starting AMD thresholding on bank %d\n", __func__, + i); - cc = &amd_et_state[PCPU_GET(cpuid)]; + cc = &amd_et_state[PCPU_GET(cpuid)][i]; cc->cur_threshold = 1; - amd_thresholding_start(cc); + amd_thresholding_start(cc, i); - /* Mark the NB bank as monitored. */ - PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << MC_AMDNB_BANK); + /* Mark this bank as monitored. */ + PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); } static void -amd_thresholding_resume(void) +amd_thresholding_resume(int i) { struct amd_et_state *cc; - /* Nothing to do if this CPU doesn't monitor the NB bank. */ - if ((PCPU_GET(cmci_mask) & 1 << MC_AMDNB_BANK) == 0) + KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + + /* Ignore banks not monitored by this CPU. */ + if (!(PCPU_GET(cmci_mask) & 1 << i)) return; - cc = &amd_et_state[PCPU_GET(cpuid)]; + cc = &amd_et_state[PCPU_GET(cpuid)][i]; cc->last_intr = 0; cc->cur_threshold = 1; - amd_thresholding_start(cc); + amd_thresholding_start(cc, i); } #endif @@ -1063,8 +1085,10 @@ _mca_init(int boot) { uint64_t mcg_cap; uint64_t ctl, mask; - int i, skip; + int i, skip, family; + family = CPUID_TO_FAMILY(cpu_id); + /* MCE is required. */ if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; @@ -1087,8 +1111,8 @@ _mca_init(int boot) * is no performance penalty to this workaround. However, * L1TP errors will go unreported. */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) { + if (cpu_vendor_id == CPU_VENDOR_AMD && family == 0x10 && + !amd10h_L1TP) { mask = rdmsr(MSR_MC0_CTL_MASK); if ((mask & (1UL << 5)) == 0) wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); @@ -1103,12 +1127,12 @@ _mca_init(int boot) * For P6 models before Nehalem MC0_CTL is * always enabled and reserved. */ - if (i == 0 && CPUID_TO_FAMILY(cpu_id) == 0x6 + if (i == 0 && family == 0x6 && CPUID_TO_MODEL(cpu_id) < 0x1a) skip = 1; } else if (cpu_vendor_id == CPU_VENDOR_AMD) { /* BKDG for Family 10h: unset GartTblWkEn. */ - if (i == 4 && CPUID_TO_FAMILY(cpu_id) >= 0xf) + if (i == MC_AMDNB_BANK && family >= 0xf) ctl &= ~(1UL << 10); } @@ -1121,6 +1145,11 @@ _mca_init(int boot) cmci_monitor(i); else cmci_resume(i); + } else if (amd_thresholding_supported()) { + if (boot) + amd_thresholding_monitor(i); + else + amd_thresholding_resume(i); } #endif @@ -1129,26 +1158,9 @@ _mca_init(int boot) } #ifdef DEV_APIC - /* - * AMD Processors from families 10h - 16h provide support - * for Machine Check Error Thresholding. - * The processors support counters of MC errors and they - * can be configured to generate an interrupt when a counter - * overflows. - * The counters are all associated with Bank 4 and each - * of them covers a group of errors reported via that bank. - * At the moment only the DRAM Error Threshold Group is - * supported. - */ - if (amd_thresholding_supported() && - (mcg_cap & MCG_CAP_COUNT) >= 4) { - if (boot) - amd_thresholding_init(); - else - amd_thresholding_resume(); - } else if (PCPU_GET(cmci_mask) != 0 && boot) { + if (!amd_thresholding_supported() && + PCPU_GET(cmci_mask) != 0 && boot) lapic_enable_cmc(); - } #endif } From owner-svn-src-all@freebsd.org Sun Sep 17 23:40: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 8B0B1E0DEB8; Sun, 17 Sep 2017 23:40:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66ADE72C15; Sun, 17 Sep 2017 23:40:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8HNeGwp017000; Sun, 17 Sep 2017 23:40:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8HNeGuP016998; Sun, 17 Sep 2017 23:40:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709172340.v8HNeGuP016998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 17 Sep 2017 23:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323692 - in head/sys/compat: linsysfs linux X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/compat: linsysfs linux X-SVN-Commit-Revision: 323692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 23:40:17 -0000 Author: cem Date: Sun Sep 17 23:40:16 2017 New Revision: 323692 URL: https://svnweb.freebsd.org/changeset/base/323692 Log: linsysfs(5): Add support for recent libdrm Expose more information about PCI devices (and GPUs in particular) via linsysfs to libdrm. This allows unmodified modern 64-bit Linux libdrm to work, which allows modern Linux Mesa to work. The submitter reports that he tested the change with an Ubuntu 16.04 chroot + amdgpu from graphics/drm-next-kmod. PR: 222375 Submitted by: Greg V Modified: head/sys/compat/linsysfs/linsysfs.c head/sys/compat/linux/linux_util.c Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Sun Sep 17 22:58:13 2017 (r323691) +++ head/sys/compat/linsysfs/linsysfs.c Sun Sep 17 23:40:16 2017 (r323692) @@ -133,20 +133,135 @@ linsysfs_link_scsi_host(PFS_FILL_ARGS) return (0); } +static int +linsysfs_fill_data(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "%s", pn->pn_data); + return (0); +} + +static int +linsysfs_fill_vendor(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "0x%04x\n", pci_get_vendor((device_t)pn->pn_data)); + return (0); +} + +static int +linsysfs_fill_device(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "0x%04x\n", pci_get_device((device_t)pn->pn_data)); + return (0); +} + +static int +linsysfs_fill_subvendor(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "0x%04x\n", pci_get_subvendor((device_t)pn->pn_data)); + return (0); +} + +static int +linsysfs_fill_subdevice(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "0x%04x\n", pci_get_subdevice((device_t)pn->pn_data)); + return (0); +} + +static int +linsysfs_fill_revid(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "0x%x\n", pci_get_revid((device_t)pn->pn_data)); + return (0); +} + +/* + * Filler function for PCI uevent file + */ +static int +linsysfs_fill_uevent_pci(PFS_FILL_ARGS) +{ + device_t dev; + + dev = (device_t)pn->pn_data; + sbuf_printf(sb, "DRIVER=%s\nPCI_CLASS=%X\nPCI_ID=%04X:%04X\n" + "PCI_SUBSYS_ID=%04X:%04X\nPCI_SLOT_NAME=%04d:%02x:%02x.%x\n", + linux_driver_get_name_dev(dev), pci_get_class(dev), + pci_get_vendor(dev), pci_get_device(dev), pci_get_subvendor(dev), + pci_get_subdevice(dev), pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), pci_get_function(dev)); + return (0); +} + +/* + * Filler function for drm uevent file + */ +static int +linsysfs_fill_uevent_drm(PFS_FILL_ARGS) +{ + device_t dev; + int unit; + + dev = (device_t)pn->pn_data; + unit = device_get_unit(dev); + sbuf_printf(sb, + "MAJOR=226\nMINOR=%d\nDEVNAME=drm/%d\nDEVTYPE=dri_minor\n", unit, + unit); + return (0); +} + +static char * +get_full_pfs_path(struct pfs_node *cur) +{ + char *temp, *path; + + temp = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); + path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); + path[0] = '\0'; + + do { + snprintf(temp, MAXPATHLEN, "%s/%s", cur->pn_name, path); + strlcpy(path, temp, MAXPATHLEN); + cur = cur->pn_parent; + } while (cur->pn_parent != NULL); + + path[strlen(path) - 1] = '\0'; /* remove extra slash */ + free(temp, M_TEMP); + return (path); +} + +/* + * Filler function for symlink from drm char device to PCI device + */ +static int +linsysfs_fill_vgapci(PFS_FILL_ARGS) +{ + char *path; + + path = get_full_pfs_path((struct pfs_node*)pn->pn_data); + sbuf_printf(sb, "../../../%s", path); + free(path, M_TEMP); + return (0); +} + #define PCI_DEV "pci" +#define DRMN_DEV "drmn" static int -linsysfs_run_bus(device_t dev, struct pfs_node *dir, struct pfs_node *scsi, char *path, - char *prefix) +linsysfs_run_bus(device_t dev, struct pfs_node *dir, struct pfs_node *scsi, struct pfs_node *chardev, + char *path, char *prefix) { struct scsi_host_queue *scsi_host; - struct pfs_node *sub_dir; + struct pfs_node *sub_dir, *cur_file, *cur_chardev; int i, nchildren; device_t *children, parent; devclass_t devclass; const char *name = NULL; struct pci_devinfo *dinfo; - char *device, *host, *new_path = path; + char *device, *host, *new_path, *chardevname; + new_path = path; + chardevname = malloc(16, M_TEMP, M_WAITOK); + parent = device_get_parent(dev); if (parent) { devclass = device_get_devclass(parent); @@ -171,6 +286,36 @@ linsysfs_run_bus(device_t dev, struct pfs_node *dir, s strcat(new_path, device); dir = pfs_create_dir(dir, device, NULL, NULL, NULL, 0); + cur_file = pfs_create_file(dir, "vendor", + &linsysfs_fill_vendor, NULL, NULL, NULL, + PFS_RD); + cur_file->pn_data = (void*)dev; + cur_file = pfs_create_file(dir, "device", + &linsysfs_fill_device, NULL, NULL, NULL, + PFS_RD); + cur_file->pn_data = (void*)dev; + cur_file = pfs_create_file(dir, + "subsystem_vendor", + &linsysfs_fill_subvendor, NULL, NULL, NULL, + PFS_RD); + cur_file->pn_data = (void*)dev; + cur_file = pfs_create_file(dir, + "subsystem_device", + &linsysfs_fill_subdevice, NULL, NULL, NULL, + PFS_RD); + cur_file->pn_data = (void*)dev; + cur_file = pfs_create_file(dir, "revision", + &linsysfs_fill_revid, NULL, NULL, NULL, + PFS_RD); + cur_file->pn_data = (void*)dev; + cur_file = pfs_create_file(dir, "uevent", + &linsysfs_fill_uevent_pci, NULL, NULL, + NULL, PFS_RD); + cur_file->pn_data = (void*)dev; + cur_file = pfs_create_link(dir, "subsystem", + &linsysfs_fill_data, NULL, NULL, NULL, 0); + /* libdrm just checks that the link ends in "/pci" */ + cur_file->pn_data = "/sys/bus/pci"; if (dinfo->cfg.baseclass == PCIC_STORAGE) { /* DJA only make this if needed */ @@ -207,15 +352,38 @@ linsysfs_run_bus(device_t dev, struct pfs_node *dir, s free(host, M_TEMP); } } + + dinfo = device_get_ivars(parent); + if (dinfo != NULL && dinfo->cfg.baseclass == PCIC_DISPLAY) { + devclass = device_get_devclass(dev); + if (devclass != NULL) + name = devclass_get_name(devclass); + if (name != NULL && strcmp(name, DRMN_DEV) == 0 && + device_get_unit(dev) >= 0) { + sprintf(chardevname, "226:%d", + device_get_unit(dev)); + cur_chardev = pfs_create_dir(chardev, + chardevname, NULL, NULL, NULL, 0); + cur_file = pfs_create_link(cur_chardev, + "device", &linsysfs_fill_vgapci, NULL, + NULL, NULL, PFS_RD); + cur_file->pn_data = (void*)dir; + cur_file = pfs_create_file(cur_chardev, + "uevent", &linsysfs_fill_uevent_drm, NULL, + NULL, NULL, PFS_RD); + cur_file->pn_data = (void*)dev; + } + } } device_get_children(dev, &children, &nchildren); for (i = 0; i < nchildren; i++) { if (children[i]) - linsysfs_run_bus(children[i], dir, scsi, new_path, prefix); + linsysfs_run_bus(children[i], dir, scsi, chardev, new_path, prefix); } if (new_path != path) free(new_path, M_TEMP); + free(chardevname, M_TEMP); return (1); } @@ -279,6 +447,7 @@ linsysfs_init(PFS_INIT_ARGS) struct pfs_node *dir, *sys, *cpu; struct pfs_node *pci; struct pfs_node *scsi; + struct pfs_node *devdir, *chardev; devclass_t devclass; device_t dev; @@ -296,13 +465,17 @@ linsysfs_init(PFS_INIT_ARGS) /* /sys/devices/pci0000:00 */ pci = pfs_create_dir(dir, "pci0000:00", NULL, NULL, NULL, 0); + /* /sys/dev/char */ + devdir = pfs_create_dir(root, "dev", NULL, NULL, NULL, 0); + chardev = pfs_create_dir(devdir, "char", NULL, NULL, NULL, 0); + devclass = devclass_find("root"); if (devclass == NULL) { return (0); } dev = devclass_get_device(devclass, 0); - linsysfs_run_bus(dev, pci, scsi, "/pci0000:00", "0000"); + linsysfs_run_bus(dev, pci, scsi, chardev, "/pci0000:00", "0000"); /* /sys/devices/system */ sys = pfs_create_dir(dir, "system", NULL, NULL, NULL, 0); Modified: head/sys/compat/linux/linux_util.c ============================================================================== --- head/sys/compat/linux/linux_util.c Sun Sep 17 22:58:13 2017 (r323691) +++ head/sys/compat/linux/linux_util.c Sun Sep 17 23:40:16 2017 (r323692) @@ -127,14 +127,13 @@ int linux_driver_get_major_minor(const char *node, int *major, int *minor) { struct device_element *de; + unsigned long devno; if (node == NULL || major == NULL || minor == NULL) return 1; if (strlen(node) > strlen("pts/") && strncmp(node, "pts/", strlen("pts/")) == 0) { - unsigned long devno; - /* * Linux checks major and minors of the slave device * to make sure it's a pty device, so let's make him @@ -146,6 +145,15 @@ linux_driver_get_major_minor(const char *node, int *ma return (0); } + + if ((strlen(node) > strlen("drm/") && + strncmp(node, "drm/", strlen("drm/")) == 0) ) { + devno = strtoul(node + strlen("drm/"), NULL, 10); + *major = 226 + (devno / 256); + *minor = devno % 256; + return (0); + } + TAILQ_FOREACH(de, &devices, list) { if (strcmp(node, de->entry.bsd_device_name) == 0) { From owner-svn-src-all@freebsd.org Mon Sep 18 00: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 5842FE0FFCE; Mon, 18 Sep 2017 00:13:50 +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 24A9B73CBF; Mon, 18 Sep 2017 00:13:50 +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 v8I0Dnpf033114; Mon, 18 Sep 2017 00:13:49 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I0Dn4R033113; Mon, 18 Sep 2017 00:13:49 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709180013.v8I0Dn4R033113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 00:13: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: r323693 - in stable: 10/kerberos5/lib/libkafs5 11/kerberos5/lib/libkafs5 X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/kerberos5/lib/libkafs5 11/kerberos5/lib/libkafs5 X-SVN-Commit-Revision: 323693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 00:13:50 -0000 Author: cy Date: Mon Sep 18 00:13:48 2017 New Revision: 323693 URL: https://svnweb.freebsd.org/changeset/base/323693 Log: MFC r322112: krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5. As kerberos5/lib/krb5 include files are already referenced it makes no sense to generate it again here. Modified: stable/10/kerberos5/lib/libkafs5/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/kerberos5/lib/libkafs5/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/10/kerberos5/lib/libkafs5/Makefile ============================================================================== --- stable/10/kerberos5/lib/libkafs5/Makefile Sun Sep 17 23:40:16 2017 (r323692) +++ stable/10/kerberos5/lib/libkafs5/Makefile Mon Sep 18 00:13:48 2017 (r323693) @@ -23,7 +23,7 @@ MLINKS= kafs5.3 k_afs_cell_of_file.3 \ kafs5.3 krb_afslog.3 \ kafs5.3 krb_afslog_uid.3 -SRCS= afssys.c afskrb5.c common.c krb5_err.h +SRCS= afssys.c afskrb5.c common.c SRCS= afssys.c \ afskrb5.c \ common.c From owner-svn-src-all@freebsd.org Mon Sep 18 00: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 465C3E0FFCD; Mon, 18 Sep 2017 00:13:50 +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 12F0E73CBE; Mon, 18 Sep 2017 00:13:50 +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 v8I0Dm2k033108; Mon, 18 Sep 2017 00:13:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I0DmGP033107; Mon, 18 Sep 2017 00:13:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709180013.v8I0DmGP033107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 00:13: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: r323693 - in stable: 10/kerberos5/lib/libkafs5 11/kerberos5/lib/libkafs5 X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/kerberos5/lib/libkafs5 11/kerberos5/lib/libkafs5 X-SVN-Commit-Revision: 323693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 00:13:50 -0000 Author: cy Date: Mon Sep 18 00:13:48 2017 New Revision: 323693 URL: https://svnweb.freebsd.org/changeset/base/323693 Log: MFC r322112: krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5. As kerberos5/lib/krb5 include files are already referenced it makes no sense to generate it again here. Modified: stable/11/kerberos5/lib/libkafs5/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/kerberos5/lib/libkafs5/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/11/kerberos5/lib/libkafs5/Makefile ============================================================================== --- stable/11/kerberos5/lib/libkafs5/Makefile Sun Sep 17 23:40:16 2017 (r323692) +++ stable/11/kerberos5/lib/libkafs5/Makefile Mon Sep 18 00:13:48 2017 (r323693) @@ -22,7 +22,7 @@ MLINKS= kafs5.3 k_afs_cell_of_file.3 \ kafs5.3 krb_afslog.3 \ kafs5.3 krb_afslog_uid.3 -SRCS= afssys.c afskrb5.c common.c krb5_err.h +SRCS= afssys.c afskrb5.c common.c CFLAGS+= -I${KRB5DIR}/lib/kafs \ -I${KRB5DIR}/lib/krb5 \ From owner-svn-src-all@freebsd.org Mon Sep 18 00:17: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 2EF0CE10445; Mon, 18 Sep 2017 00:17:55 +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 EE79F73F8A; Mon, 18 Sep 2017 00:17:54 +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 v8I0Hs2V033290; Mon, 18 Sep 2017 00:17:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I0HsmV033289; Mon, 18 Sep 2017 00:17:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709180017.v8I0HsmV033289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 00:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323694 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 00:17:55 -0000 Author: cy Date: Mon Sep 18 00:17:53 2017 New Revision: 323694 URL: https://svnweb.freebsd.org/changeset/base/323694 Log: MFC r323478: Improve the wording of a comment describing why EAGAIN is the error code. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 00:13:48 2017 (r323693) +++ stable/11/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 00:17:53 2017 (r323694) @@ -1383,10 +1383,10 @@ ipf_state_add(softc, fin, stsave, flags) int out; /* - * If a packet that was created locally is trying to go out but we - * do not match here here because of this lock, it is likely that - * the policy will block it and return network unreachable back up - * the stack. To mitigate this error, EAGAIN is returned instead, + * If a locally created packet is trying to egress but it + * does not match because of this lock, it is likely that + * the policy will block it and return network unreachable further + * up the stack. To mitigate this error, EAGAIN is returned instead, * telling the IP stack to try sending this packet again later. */ if (softs->ipf_state_lock) { From owner-svn-src-all@freebsd.org Mon Sep 18 00:17: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 4DBDDE10446; Mon, 18 Sep 2017 00:17:55 +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 1A11773F8B; Mon, 18 Sep 2017 00:17:55 +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 v8I0Hs65033296; Mon, 18 Sep 2017 00:17:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I0HsUt033295; Mon, 18 Sep 2017 00:17:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709180017.v8I0HsUt033295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 00:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323694 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 00:17:55 -0000 Author: cy Date: Mon Sep 18 00:17:53 2017 New Revision: 323694 URL: https://svnweb.freebsd.org/changeset/base/323694 Log: MFC r323478: Improve the wording of a comment describing why EAGAIN is the error code. Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 00:13:48 2017 (r323693) +++ stable/10/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 00:17:53 2017 (r323694) @@ -1383,10 +1383,10 @@ ipf_state_add(softc, fin, stsave, flags) int out; /* - * If a packet that was created locally is trying to go out but we - * do not match here here because of this lock, it is likely that - * the policy will block it and return network unreachable back up - * the stack. To mitigate this error, EAGAIN is returned instead, + * If a locally created packet is trying to egress but it + * does not match because of this lock, it is likely that + * the policy will block it and return network unreachable further + * up the stack. To mitigate this error, EAGAIN is returned instead, * telling the IP stack to try sending this packet again later. */ if (softs->ipf_state_lock) { From owner-svn-src-all@freebsd.org Mon Sep 18 04:10: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 729CFE1CDF6; Mon, 18 Sep 2017 04:10:00 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402B97DF63; Mon, 18 Sep 2017 04:10:00 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8I49xFn027275; Mon, 18 Sep 2017 04:09:59 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I49xL0027274; Mon, 18 Sep 2017 04:09:59 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709180409.v8I49xL0027274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Mon, 18 Sep 2017 04:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r323695 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 323695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 04:10:00 -0000 Author: gordon Date: Mon Sep 18 04:09:59 2017 New Revision: 323695 URL: https://svnweb.freebsd.org/changeset/base/323695 Log: Add myself to import new tcpdump image. Approved by: emaste (mentor) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Sep 18 00:17:53 2017 (r323694) +++ svnadmin/conf/sizelimit.conf Mon Sep 18 04:09:59 2017 (r323695) @@ -19,6 +19,7 @@ bapt brooks davidcs dim +gordon imp jb jeff From owner-svn-src-all@freebsd.org Mon Sep 18 04:10: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 079F3E1D09F; Mon, 18 Sep 2017 04:10:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13717E1EE; Mon, 18 Sep 2017 04:10:57 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8I4AucO028227; Mon, 18 Sep 2017 04:10:56 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I4Aso0028205; Mon, 18 Sep 2017 04:10:54 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709180410.v8I4Aso0028205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Mon, 18 Sep 2017 04:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323696 - in vendor/tcpdump/dist: . tests X-SVN-Group: vendor X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in vendor/tcpdump/dist: . tests X-SVN-Commit-Revision: 323696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 04:10:58 -0000 Author: gordon Date: Mon Sep 18 04:10:54 2017 New Revision: 323696 URL: https://svnweb.freebsd.org/changeset/base/323696 Log: Vendor import of tcpdump 4.9.2. Approved by: emaste (mentor) Added: vendor/tcpdump/dist/funcattrs.h (contents, props changed) vendor/tcpdump/dist/tests/802_15_4-data.out vendor/tcpdump/dist/tests/802_15_4-data.pcap (contents, props changed) vendor/tcpdump/dist/tests/802_15_4-oobr-1.out vendor/tcpdump/dist/tests/802_15_4-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/802_15_4-oobr-2.out vendor/tcpdump/dist/tests/802_15_4-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/802_15_4_beacon.out vendor/tcpdump/dist/tests/802_15_4_beacon.pcap (contents, props changed) vendor/tcpdump/dist/tests/arp-oobr.out vendor/tcpdump/dist/tests/arp-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/beep-oobr.out vendor/tcpdump/dist/tests/beep-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp-aigp-oobr-nossl.out vendor/tcpdump/dist/tests/bgp-aigp-oobr-ssl.out vendor/tcpdump/dist/tests/bgp-aigp-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp-as-path-oobr-nossl.out vendor/tcpdump/dist/tests/bgp-as-path-oobr-ssl.out vendor/tcpdump/dist/tests/bgp-as-path-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp_mvpn_6_and_7.out vendor/tcpdump/dist/tests/bgp_mvpn_6_and_7.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp_pmsi_tunnel-oobr.out vendor/tcpdump/dist/tests/bgp_pmsi_tunnel-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp_vpn_rt-oobr.out vendor/tcpdump/dist/tests/bgp_vpn_rt-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/bootp_asan-2.out vendor/tcpdump/dist/tests/bootp_asan-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/bootp_asan.out vendor/tcpdump/dist/tests/bootp_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/cfm_sender_id-oobr.out vendor/tcpdump/dist/tests/cfm_sender_id-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/decnet-oobr.out vendor/tcpdump/dist/tests/decnet-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/decnet-shorthdr-oobr.out vendor/tcpdump/dist/tests/decnet-shorthdr-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/dhcp6_reconf_asan.out vendor/tcpdump/dist/tests/dhcp6_reconf_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/dns-zlip-1.out vendor/tcpdump/dist/tests/dns-zlip-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/dns-zlip-2.out vendor/tcpdump/dist/tests/dns-zlip-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/dns-zlip-3.out vendor/tcpdump/dist/tests/dns-zlip-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/dns_fwdptr.out vendor/tcpdump/dist/tests/dns_fwdptr.pcap (contents, props changed) vendor/tcpdump/dist/tests/eap_extract_read2_asan.out vendor/tcpdump/dist/tests/eap_extract_read2_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/eigrp-tlv-oobr.out vendor/tcpdump/dist/tests/eigrp-tlv-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/esis_opt_prot-oobr.out vendor/tcpdump/dist/tests/esis_opt_prot-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/esis_snpa_asan-2.out vendor/tcpdump/dist/tests/esis_snpa_asan-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/esis_snpa_asan-3.out vendor/tcpdump/dist/tests/esis_snpa_asan-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/esis_snpa_asan-4.out vendor/tcpdump/dist/tests/esis_snpa_asan-4.pcap (contents, props changed) vendor/tcpdump/dist/tests/esis_snpa_asan-5.out vendor/tcpdump/dist/tests/esis_snpa_asan-5.pcap (contents, props changed) vendor/tcpdump/dist/tests/esis_snpa_asan.out vendor/tcpdump/dist/tests/esis_snpa_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/extract_read2_asan.out vendor/tcpdump/dist/tests/extract_read2_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/getname_2_read4_asan.out vendor/tcpdump/dist/tests/getname_2_read4_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/hncp_dhcpv4data-oobr.out vendor/tcpdump/dist/tests/hncp_dhcpv4data-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/hncp_dhcpv6data-oobr.out vendor/tcpdump/dist/tests/hncp_dhcpv6data-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_aodv_extension.out vendor/tcpdump/dist/tests/hoobr_aodv_extension.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_chdlc_print.out vendor/tcpdump/dist/tests/hoobr_chdlc_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_juniper.out vendor/tcpdump/dist/tests/hoobr_juniper.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_juniper2.out vendor/tcpdump/dist/tests/hoobr_juniper2.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_juniper3.out vendor/tcpdump/dist/tests/hoobr_juniper3.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_juniper4.out vendor/tcpdump/dist/tests/hoobr_juniper4.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_lookup_nsap.out vendor/tcpdump/dist/tests/hoobr_lookup_nsap.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_nfs_printfh.out vendor/tcpdump/dist/tests/hoobr_nfs_printfh.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_nfs_xid_map_enter.out vendor/tcpdump/dist/tests/hoobr_nfs_xid_map_enter.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_parse_field.out vendor/tcpdump/dist/tests/hoobr_parse_field.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_pimv1.out vendor/tcpdump/dist/tests/hoobr_pimv1.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_ripng_print.out vendor/tcpdump/dist/tests/hoobr_ripng_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_rt6_print.out vendor/tcpdump/dist/tests/hoobr_rt6_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/hoobr_safeputs.out vendor/tcpdump/dist/tests/hoobr_safeputs.pcap (contents, props changed) vendor/tcpdump/dist/tests/icmp-cksum-oobr-1.out vendor/tcpdump/dist/tests/icmp-cksum-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/icmp-cksum-oobr-2.out vendor/tcpdump/dist/tests/icmp-cksum-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/icmp-cksum-oobr-3.out vendor/tcpdump/dist/tests/icmp-cksum-oobr-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/icmp-cksum-oobr-4.out vendor/tcpdump/dist/tests/icmp-cksum-oobr-4.pcap (contents, props changed) vendor/tcpdump/dist/tests/icmp6_mobileprefix_asan.out vendor/tcpdump/dist/tests/icmp6_mobileprefix_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/icmp6_nodeinfo_oobr.out vendor/tcpdump/dist/tests/icmp6_nodeinfo_oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/ieee802.11_rates_oobr.out vendor/tcpdump/dist/tests/ieee802.11_rates_oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/ieee802.11_tim_ie_oobr.out vendor/tcpdump/dist/tests/ieee802.11_tim_ie_oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/ikev1_id_ipv6_addr_subnet-oobr.out vendor/tcpdump/dist/tests/ikev1_id_ipv6_addr_subnet-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/ip6_frag_asan.out vendor/tcpdump/dist/tests/ip6_frag_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/ip_printroute_asan.out vendor/tcpdump/dist/tests/ip_printroute_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/ip_ts_opts_asan.out vendor/tcpdump/dist/tests/ip_ts_opts_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/ipv6-mobility-header-oobr.out vendor/tcpdump/dist/tests/ipv6-mobility-header-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/ipv6-next-header-oobr-1.out vendor/tcpdump/dist/tests/ipv6-next-header-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/ipv6-next-header-oobr-2.out vendor/tcpdump/dist/tests/ipv6-next-header-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/ipv6-rthdr-oobr.out vendor/tcpdump/dist/tests/ipv6-rthdr-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-3948-oobr-2.out vendor/tcpdump/dist/tests/isakmp-3948-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-no-none-np.out vendor/tcpdump/dist/tests/isakmp-no-none-np.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-rfc3948-oobr.out vendor/tcpdump/dist/tests/isakmp-rfc3948-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmp-various-oobr.out vendor/tcpdump/dist/tests/isakmp-various-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/isakmpv1-attr-oobr.out vendor/tcpdump/dist/tests/isakmpv1-attr-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-areaaddr-oobr-1.out vendor/tcpdump/dist/tests/isis-areaaddr-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-areaaddr-oobr-2.out vendor/tcpdump/dist/tests/isis-areaaddr-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-extd-ipreach-oobr.out vendor/tcpdump/dist/tests/isis-extd-ipreach-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-extd-isreach-oobr.out vendor/tcpdump/dist/tests/isis-extd-isreach-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_stlv_asan-2.out vendor/tcpdump/dist/tests/isis_stlv_asan-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_stlv_asan-3.out vendor/tcpdump/dist/tests/isis_stlv_asan-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_stlv_asan-4.out vendor/tcpdump/dist/tests/isis_stlv_asan-4.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_stlv_asan.out vendor/tcpdump/dist/tests/isis_stlv_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_sysid_asan.out vendor/tcpdump/dist/tests/isis_sysid_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/isoclns-oobr.out vendor/tcpdump/dist/tests/isoclns-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/juniper_atm1.out vendor/tcpdump/dist/tests/juniper_atm1.pcap (contents, props changed) vendor/tcpdump/dist/tests/juniper_es.out vendor/tcpdump/dist/tests/juniper_es.pcap (contents, props changed) vendor/tcpdump/dist/tests/l2tp-avp-overflow.out vendor/tcpdump/dist/tests/l2tp-avp-overflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/lldp-infinite-loop-1.out vendor/tcpdump/dist/tests/lldp-infinite-loop-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/lldp-infinite-loop-2.out vendor/tcpdump/dist/tests/lldp-infinite-loop-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/lldp_8023_mtu-oobr.out vendor/tcpdump/dist/tests/lldp_8023_mtu-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/lldp_asan.out vendor/tcpdump/dist/tests/lldp_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/lldp_mgmt_addr_tlv_asan.out vendor/tcpdump/dist/tests/lldp_mgmt_addr_tlv_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/lmpv1_busyloop.out vendor/tcpdump/dist/tests/lmpv1_busyloop.pcap (contents, props changed) vendor/tcpdump/dist/tests/mlppp-oobr.out vendor/tcpdump/dist/tests/mlppp-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan.out vendor/tcpdump/dist/tests/mobility_opt_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_2.out vendor/tcpdump/dist/tests/mobility_opt_asan_2.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_3.out vendor/tcpdump/dist/tests/mobility_opt_asan_3.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_4.out vendor/tcpdump/dist/tests/mobility_opt_asan_4.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_5.out vendor/tcpdump/dist/tests/mobility_opt_asan_5.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_6.out vendor/tcpdump/dist/tests/mobility_opt_asan_6.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_7.out vendor/tcpdump/dist/tests/mobility_opt_asan_7.pcap (contents, props changed) vendor/tcpdump/dist/tests/mobility_opt_asan_8.out vendor/tcpdump/dist/tests/mobility_opt_asan_8.pcap (contents, props changed) vendor/tcpdump/dist/tests/mptcp-dss-oobr.out vendor/tcpdump/dist/tests/mptcp-dss-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/nbns-valgrind.out vendor/tcpdump/dist/tests/nbns-valgrind.pcap (contents, props changed) vendor/tcpdump/dist/tests/nfs-attr-oobr.out vendor/tcpdump/dist/tests/nfs-attr-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/olsr-oobr-1.out vendor/tcpdump/dist/tests/olsr-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/olsr-oobr-2.out vendor/tcpdump/dist/tests/olsr-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/oobr_parse_elements.out vendor/tcpdump/dist/tests/oobr_parse_elements.pcap (contents, props changed) vendor/tcpdump/dist/tests/ospf6_decode_v3_asan.out vendor/tcpdump/dist/tests/ospf6_decode_v3_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/pgm_group_addr_asan.out vendor/tcpdump/dist/tests/pgm_group_addr_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/pgm_opts_asan.out vendor/tcpdump/dist/tests/pgm_opts_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/pgm_opts_asan_2.out vendor/tcpdump/dist/tests/pgm_opts_asan_2.pcap (contents, props changed) vendor/tcpdump/dist/tests/pgm_opts_asan_3.out vendor/tcpdump/dist/tests/pgm_opts_asan_3.pcap (contents, props changed) vendor/tcpdump/dist/tests/pim_header_asan-2.out vendor/tcpdump/dist/tests/pim_header_asan-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/pim_header_asan-3.out vendor/tcpdump/dist/tests/pim_header_asan-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/pim_header_asan-4.out vendor/tcpdump/dist/tests/pim_header_asan-4.pcap (contents, props changed) vendor/tcpdump/dist/tests/pim_header_asan.out vendor/tcpdump/dist/tests/pim_header_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/pimv2-oobr-1.out vendor/tcpdump/dist/tests/pimv2-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/pimv2-oobr-2.out vendor/tcpdump/dist/tests/pimv2-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/pimv2-oobr-3.out vendor/tcpdump/dist/tests/pimv2-oobr-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/pimv2-oobr-4.out vendor/tcpdump/dist/tests/pimv2-oobr-4.pcap (contents, props changed) vendor/tcpdump/dist/tests/pktap-heap-overflow.out vendor/tcpdump/dist/tests/pktap-heap-overflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/ppp_ccp_config_deflate_option_asan.out vendor/tcpdump/dist/tests/ppp_ccp_config_deflate_option_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/radius_attr_asan.out vendor/tcpdump/dist/tests/radius_attr_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/resp_4_infiniteloop.out vendor/tcpdump/dist/tests/resp_4_infiniteloop.pcap (contents, props changed) vendor/tcpdump/dist/tests/rpki-rtr-oob.out vendor/tcpdump/dist/tests/rpki-rtr-oob.pcap (contents, props changed) vendor/tcpdump/dist/tests/rsvp_fast_reroute-oobr.out vendor/tcpdump/dist/tests/rsvp_fast_reroute-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/rsvp_uni-oobr-1.out vendor/tcpdump/dist/tests/rsvp_uni-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/rsvp_uni-oobr-2.out vendor/tcpdump/dist/tests/rsvp_uni-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/rsvp_uni-oobr-3.out vendor/tcpdump/dist/tests/rsvp_uni-oobr-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/rx_ubik-oobr.out vendor/tcpdump/dist/tests/rx_ubik-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/slip-bad-direction.out vendor/tcpdump/dist/tests/slip-bad-direction.pcap (contents, props changed) vendor/tcpdump/dist/tests/stp-v4-length-sigsegv.out vendor/tcpdump/dist/tests/stp-v4-length-sigsegv.pcap (contents, props changed) vendor/tcpdump/dist/tests/telnet-iac-check-oobr.out vendor/tcpdump/dist/tests/telnet-iac-check-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/tok2str-oobr-1.out vendor/tcpdump/dist/tests/tok2str-oobr-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/tok2str-oobr-2.out vendor/tcpdump/dist/tests/tok2str-oobr-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/vqp-oobr.out vendor/tcpdump/dist/tests/vqp-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/vtp_asan-2.out vendor/tcpdump/dist/tests/vtp_asan-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/vtp_asan-3.out vendor/tcpdump/dist/tests/vtp_asan-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/vtp_asan.out vendor/tcpdump/dist/tests/vtp_asan.pcap (contents, props changed) vendor/tcpdump/dist/tests/wb-oobr.out vendor/tcpdump/dist/tests/wb-oobr.pcap (contents, props changed) vendor/tcpdump/dist/tests/zephyr-oobr.out vendor/tcpdump/dist/tests/zephyr-oobr.pcap (contents, props changed) Modified: vendor/tcpdump/dist/CHANGES vendor/tcpdump/dist/CONTRIBUTING vendor/tcpdump/dist/CREDITS vendor/tcpdump/dist/INSTALL.txt vendor/tcpdump/dist/Makefile.in vendor/tcpdump/dist/PLATFORMS vendor/tcpdump/dist/README.md vendor/tcpdump/dist/VERSION vendor/tcpdump/dist/aclocal.m4 vendor/tcpdump/dist/addrtoname.c vendor/tcpdump/dist/addrtoname.h vendor/tcpdump/dist/addrtostr.c vendor/tcpdump/dist/af.c vendor/tcpdump/dist/af.h vendor/tcpdump/dist/checksum.c vendor/tcpdump/dist/config.h.in vendor/tcpdump/dist/configure vendor/tcpdump/dist/configure.in vendor/tcpdump/dist/extract.h vendor/tcpdump/dist/gmpls.c vendor/tcpdump/dist/gmpls.h vendor/tcpdump/dist/ip6.h vendor/tcpdump/dist/ipproto.c vendor/tcpdump/dist/ipproto.h vendor/tcpdump/dist/l2vpn.c vendor/tcpdump/dist/l2vpn.h vendor/tcpdump/dist/netdissect-stdinc.h vendor/tcpdump/dist/netdissect.h vendor/tcpdump/dist/nlpid.c vendor/tcpdump/dist/nlpid.h vendor/tcpdump/dist/oui.c vendor/tcpdump/dist/oui.h vendor/tcpdump/dist/print-802_11.c vendor/tcpdump/dist/print-802_15_4.c vendor/tcpdump/dist/print-aodv.c vendor/tcpdump/dist/print-arp.c vendor/tcpdump/dist/print-atm.c vendor/tcpdump/dist/print-beep.c vendor/tcpdump/dist/print-bfd.c vendor/tcpdump/dist/print-bgp.c vendor/tcpdump/dist/print-bootp.c vendor/tcpdump/dist/print-cfm.c vendor/tcpdump/dist/print-chdlc.c vendor/tcpdump/dist/print-cnfp.c vendor/tcpdump/dist/print-decnet.c vendor/tcpdump/dist/print-dhcp6.c vendor/tcpdump/dist/print-domain.c vendor/tcpdump/dist/print-eap.c vendor/tcpdump/dist/print-eigrp.c vendor/tcpdump/dist/print-esp.c vendor/tcpdump/dist/print-ether.c vendor/tcpdump/dist/print-fr.c vendor/tcpdump/dist/print-frag6.c vendor/tcpdump/dist/print-gre.c vendor/tcpdump/dist/print-hncp.c vendor/tcpdump/dist/print-icmp.c vendor/tcpdump/dist/print-icmp6.c vendor/tcpdump/dist/print-ip.c vendor/tcpdump/dist/print-ip6.c vendor/tcpdump/dist/print-ip6opts.c vendor/tcpdump/dist/print-isakmp.c vendor/tcpdump/dist/print-isoclns.c vendor/tcpdump/dist/print-juniper.c vendor/tcpdump/dist/print-l2tp.c vendor/tcpdump/dist/print-ldp.c vendor/tcpdump/dist/print-llc.c vendor/tcpdump/dist/print-lldp.c vendor/tcpdump/dist/print-lmp.c vendor/tcpdump/dist/print-lspping.c vendor/tcpdump/dist/print-m3ua.c vendor/tcpdump/dist/print-mobility.c vendor/tcpdump/dist/print-mpcp.c vendor/tcpdump/dist/print-mpls.c vendor/tcpdump/dist/print-mptcp.c vendor/tcpdump/dist/print-nfs.c vendor/tcpdump/dist/print-null.c vendor/tcpdump/dist/print-olsr.c vendor/tcpdump/dist/print-ospf6.c vendor/tcpdump/dist/print-pgm.c vendor/tcpdump/dist/print-pim.c vendor/tcpdump/dist/print-pktap.c vendor/tcpdump/dist/print-ppp.c vendor/tcpdump/dist/print-radius.c vendor/tcpdump/dist/print-resp.c vendor/tcpdump/dist/print-ripng.c vendor/tcpdump/dist/print-rpki-rtr.c vendor/tcpdump/dist/print-rsvp.c vendor/tcpdump/dist/print-rt6.c vendor/tcpdump/dist/print-rx.c vendor/tcpdump/dist/print-sip.c vendor/tcpdump/dist/print-sl.c vendor/tcpdump/dist/print-slow.c vendor/tcpdump/dist/print-stp.c vendor/tcpdump/dist/print-syslog.c vendor/tcpdump/dist/print-telnet.c vendor/tcpdump/dist/print-tftp.c vendor/tcpdump/dist/print-vqp.c vendor/tcpdump/dist/print-vtp.c vendor/tcpdump/dist/print-wb.c vendor/tcpdump/dist/print-zephyr.c vendor/tcpdump/dist/print.c vendor/tcpdump/dist/signature.c vendor/tcpdump/dist/signature.h vendor/tcpdump/dist/smbutil.c vendor/tcpdump/dist/tcpdump.1.in vendor/tcpdump/dist/tcpdump.c vendor/tcpdump/dist/tests/TESTLIST vendor/tcpdump/dist/tests/TESTonce vendor/tcpdump/dist/tests/TESTrun.sh vendor/tcpdump/dist/tests/crypto.sh vendor/tcpdump/dist/tests/heapoverflow-in_checksum.out vendor/tcpdump/dist/tests/isis-seg-fault-1-v.out vendor/tcpdump/dist/tests/isis-seg-fault-1-v.sh vendor/tcpdump/dist/tests/isis-seg-fault-2-v.out vendor/tcpdump/dist/tests/isis-seg-fault-3-v.out vendor/tcpdump/dist/tests/isis_infloop-v.out vendor/tcpdump/dist/tests/kday2.out vendor/tcpdump/dist/tests/kday3.out vendor/tcpdump/dist/tests/kday4.out vendor/tcpdump/dist/tests/kday5.out vendor/tcpdump/dist/tests/kday6.out vendor/tcpdump/dist/tests/kday7.out vendor/tcpdump/dist/tests/kday8.out vendor/tcpdump/dist/tests/lmp-v.sh vendor/tcpdump/dist/tests/nflog-e.sh vendor/tcpdump/dist/util-print.c Modified: vendor/tcpdump/dist/CHANGES ============================================================================== --- vendor/tcpdump/dist/CHANGES Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/CHANGES Mon Sep 18 04:10:54 2017 (r323696) @@ -1,10 +1,119 @@ +Sunday September 3, 2017 denis@ovsienko.info + Summary for 4.9.2 tcpdump release + Do not use getprotobynumber() for protocol name resolution. Do not do + any protocol name resolution if -n is specified. + Improve errors detection in the test scripts. + Fix a segfault with OpenSSL 1.1 and improve OpenSSL usage. + Clean up IS-IS printing. + Fix buffer overflow vulnerabilities: + CVE-2017-11543 (SLIP) + CVE-2017-13011 (bittok2str_internal) + Fix infinite loop vulnerabilities: + CVE-2017-12989 (RESP) + CVE-2017-12990 (ISAKMP) + CVE-2017-12995 (DNS) + CVE-2017-12997 (LLDP) + Fix buffer over-read vulnerabilities: + CVE-2017-11541 (safeputs) + CVE-2017-11542 (PIMv1) + CVE-2017-12893 (SMB/CIFS) + CVE-2017-12894 (lookup_bytestring) + CVE-2017-12895 (ICMP) + CVE-2017-12896 (ISAKMP) + CVE-2017-12897 (ISO CLNS) + CVE-2017-12898 (NFS) + CVE-2017-12899 (DECnet) + CVE-2017-12900 (tok2strbuf) + CVE-2017-12901 (EIGRP) + CVE-2017-12902 (Zephyr) + CVE-2017-12985 (IPv6) + CVE-2017-12986 (IPv6 routing headers) + CVE-2017-12987 (IEEE 802.11) + CVE-2017-12988 (telnet) + CVE-2017-12991 (BGP) + CVE-2017-12992 (RIPng) + CVE-2017-12993 (Juniper) + CVE-2017-11542 (PIMv1) + CVE-2017-11541 (safeputs) + CVE-2017-12994 (BGP) + CVE-2017-12996 (PIMv2) + CVE-2017-12998 (ISO IS-IS) + CVE-2017-12999 (ISO IS-IS) + CVE-2017-13000 (IEEE 802.15.4) + CVE-2017-13001 (NFS) + CVE-2017-13002 (AODV) + CVE-2017-13003 (LMP) + CVE-2017-13004 (Juniper) + CVE-2017-13005 (NFS) + CVE-2017-13006 (L2TP) + CVE-2017-13007 (Apple PKTAP) + CVE-2017-13008 (IEEE 802.11) + CVE-2017-13009 (IPv6 mobility) + CVE-2017-13010 (BEEP) + CVE-2017-13012 (ICMP) + CVE-2017-13013 (ARP) + CVE-2017-13014 (White Board) + CVE-2017-13015 (EAP) + CVE-2017-11543 (SLIP) + CVE-2017-13016 (ISO ES-IS) + CVE-2017-13017 (DHCPv6) + CVE-2017-13018 (PGM) + CVE-2017-13019 (PGM) + CVE-2017-13020 (VTP) + CVE-2017-13021 (ICMPv6) + CVE-2017-13022 (IP) + CVE-2017-13023 (IPv6 mobility) + CVE-2017-13024 (IPv6 mobility) + CVE-2017-13025 (IPv6 mobility) + CVE-2017-13026 (ISO IS-IS) + CVE-2017-13027 (LLDP) + CVE-2017-13028 (BOOTP) + CVE-2017-13029 (PPP) + CVE-2017-13030 (PIM) + CVE-2017-13031 (IPv6 fragmentation header) + CVE-2017-13032 (RADIUS) + CVE-2017-13033 (VTP) + CVE-2017-13034 (PGM) + CVE-2017-13035 (ISO IS-IS) + CVE-2017-13036 (OSPFv3) + CVE-2017-13037 (IP) + CVE-2017-13038 (PPP) + CVE-2017-13039 (ISAKMP) + CVE-2017-13040 (MPTCP) + CVE-2017-13041 (ICMPv6) + CVE-2017-13042 (HNCP) + CVE-2017-13043 (BGP) + CVE-2017-13044 (HNCP) + CVE-2017-13045 (VQP) + CVE-2017-13046 (BGP) + CVE-2017-13047 (ISO ES-IS) + CVE-2017-13048 (RSVP) + CVE-2017-13049 (Rx) + CVE-2017-13050 (RPKI-Router) + CVE-2017-13051 (RSVP) + CVE-2017-13052 (CFM) + CVE-2017-13053 (BGP) + CVE-2017-13054 (LLDP) + CVE-2017-13055 (ISO IS-IS) + CVE-2017-13687 (Cisco HDLC) + CVE-2017-13688 (OLSR) + CVE-2017-13689 (IKEv1) + CVE-2017-13690 (IKEv2) + CVE-2017-13725 (IPv6 routing headers) + +Sunday July 23, 2017 denis@ovsienko.info + Summary for 4.9.1 tcpdump release + CVE-2017-11108/Fix bounds checking for STP. + Make assorted documentation updates and fix a few typos in tcpdump output. + Fixup -C for file size >2GB (GH #488). + Show AddressSanitizer presence in version output. + Fix a bug in test scripts (exposed in GH #613). + On FreeBSD adjust Capsicum capabilities for netmap. + On Linux fix a use-after-free when the requested interface does not exist. + Wednesday January 18, 2017 devel.fx.lebail@orange.fr Summary for 4.9.0 tcpdump release General updates: - Improve separation frontend/backend (tcpdump/libnetdissect) - Don't require IPv6 library support in order to support IPv6 addresses - Introduce data types to use for integral values in packet structures - Fix display of timestamps with -tt, -ttt and -ttttt options Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others (More information in the log with CVE-2016-* and CVE-2017-*) Change the way protocols print link-layer addresses (Fix heap overflows @@ -35,14 +144,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr Don't drop CAP_SYS_CHROOT before chrooting Fixes issue where statistics not reported when -G and -W options used - New printers supporting: - Generic Protocol Extension for VXLAN (VXLAN-GPE) - Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 - Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets - Marvell Extended Distributed Switch Architecture header (MEDSA) - Network Service Header (NSH) - REdis Serialization Protocol (RESP) - Updated printers: 802.11: Beginnings of 11ac radiotap support 802.11: Check the Protected bit for management frames @@ -61,7 +162,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr ATM: Fix an incorrect bounds check BFD: Update specification from draft to RFC 5880 BFD: Update to print optional authentication field - BGP: Add decoding of ADD-PATH capability BGP: Add support for the AIGP attribute (RFC7311) BGP: Print LARGE_COMMUNITY Path Attribute BGP: Update BGP numbers from IANA; Print minor values for FSM notification @@ -78,7 +178,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr DTP: Improve packet integrity checks EGP: Fix bounds checks ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later - ESP: Handle OpenSSL 1.1.x Ethernet: Add some bounds checking before calling isoclns_print (Fix a heap overflow) Ethernet: Print the Length/Type field as length when needed FDDI: Fix -e output for FDDI @@ -87,7 +186,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr Geneve: Fix error message with invalid option length; Update list option classes HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS() - ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string IGMP: Add a length check IP: Add a bounds check (Fix a heap overflow) IP: Check before fetching the protocol version (Fix a heap overflow) @@ -115,7 +213,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks MPLS: "length" is now the *remaining* packet length MPLS: Add bounds and length checks (Fix a heap overflow) - NFS: Add a test that makes unaligned accesses NFS: Don't assume the ONC RPC header is nicely aligned NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault) NFS: Don't run past the end of an NFSv3 file handle @@ -130,7 +227,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr PGM: Print the formatted IP address, not the raw binary address, as a string PIM: Add some bounds checking (Fix a heap overflow) PIMv2: Fix checksumming of Register messages - PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer PPP: Add some bounds checks (Fix a heap overflow) PPP: Report invalid PAP AACK/ANAK packets Q.933: Add a missing bounds check @@ -171,16 +267,46 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr UDLD: Fix an infinite loop UDP: Add a bounds check (Fix a heap overflow) UDP: Check against the packet length first - UDP: Don't do the DDP-over-UDP heuristic check up front VAT: Add some bounds checks VTP: Add a test on Mgmt Domain Name length VTP: Add bounds checks and filter out non-printable characters VXLAN: Add a bound check and a test case ZeroMQ: Fix an infinite loop -Tuesday April 14, 2015 guy@alum.mit.edu - Summary for 4.8.0 tcpdump release +Tuesday October 25, 2016 mcr@sandelman.ca + Summary for 4.8.1 tcpdump release Fix "-x" for Apple PKTAP and PPI packets + Improve separation frontend/backend (tcpdump/libnetdissect) + Fix display of timestamps with -tt, -ttt and -ttttt options + Add support for the Marvell Extended Distributed Switch Architecture header + Use PRIx64 to print a 64-bit number in hex. + Printer for HNCP (RFCs 7787 and 7788). + dagid is always an IPv6 address, not an opaque 128-bit string, and other fixes to RPL printer. + RSVP: Add bounds and length checks + OSPF: Do more bounds checking + Handle OpenSSL 1.1.x. + Initial support for the REdis Serialization Protocol known as RESP. + Add printing function for Generic Protocol Extension for VXLAN + draft-ietf-nvo3-vxlan-gpe-01 + Network Service Header: draft-ietf-sfc-nsh-01 + Don't recompile the filter if the new file has the same DLT. + Pass an adjusted struct pcap_pkthdr to the sub-printer. + Add three test cases for already fixed CVEs + CVE-2014-8767: OLSR + CVE-2014-8768: Geonet + CVE-2014-8769: AODV + Don't do the DDP-over-UDP heuristic first: GitHub issue #499. + Use the new debugging routines in libpcap. + Harmonize TCP source or destination ports tests with UDP ones + Introduce data types to use for integral values in packet structures. + RSVP: Fix an infinite loop + Support of Type 3 and Type 4 LISP packets. + Don't require IPv6 library support in order to support IPv6 addresses. + Many many changes to support libnetdissect usage. + Add a test that makes unaligned accesses: GitHub issue #478. + add a DNSSEC test case: GH #445 and GH #467. + BGP: add decoding of ADD-PATH capability + fixes to LLC header printing, and RFC948-style IP packets Friday April 10, 2015 guy@alum.mit.edu Summary for 4.7.4 tcpdump release Modified: vendor/tcpdump/dist/CONTRIBUTING ============================================================================== --- vendor/tcpdump/dist/CONTRIBUTING Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/CONTRIBUTING Mon Sep 18 04:10:54 2017 (r323696) @@ -3,6 +3,44 @@ Some Information for Contributors You want to contribute to Tcpdump, Thanks! Please, read these lines. + +How to report bugs and other problems +------------------------------------- +To report a security issue (segfault, buffer overflow, infinite loop, arbitrary +code execution etc) please send an e-mail to security@tcpdump.org, do not use +the bug tracker! + +To report a non-security problem (failure to compile, incorrect output in the +protocol printout, missing support for a particular protocol etc) please check +first that it reproduces with the latest stable release of tcpdump and the latest +stable release of libpcap. If it does, please check that the problem reproduces +with the current git master branch of tcpdump and the current git master branch of +libpcap. If it does (and it is not a security-related problem, otherwise see +above), please navigate to https://github.com/the-tcpdump-group/tcpdump/issues +and check if the problem has already been reported. If it has not, please open +a new issue and provide the following details: + +* tcpdump and libpcap version (tcpdump --version) +* operating system name and version and any other details that may be relevant + (uname -a, compiler name and version, CPU type etc.) +* configure flags if any were used +* statement of the problem +* steps to reproduce + +Please note that if you know exactly how to solve the problem and the solution +would not be too intrusive, it would be best to contribute some development time +and open a pull request instead as discussed below. + +Still not sure how to do? Feel free to [subscribe](http://www.tcpdump.org/#mailing-lists) +to the mailing list tcpdump-workers@lists.tcpdump.org and ask! + + +How to add new code and to update existing code +----------------------------------------------- + +0) Check that there isn't a pull request already opened for the changes you + intend to make. + 1) Fork the Tcpdump repository on GitHub from https://github.com/the-tcpdump-group/tcpdump (See https://help.github.com/articles/fork-a-repo/) @@ -12,8 +50,11 @@ Please, read these lines. on Linux and OSX before sending pull requests. (See http://docs.travis-ci.com/user/getting-started/) -3) Clone your repository +3) Setup your git working copy git clone https://github.com//tcpdump.git + cd tcpdump + git remote add upstream https://github.com/the-tcpdump-group/tcpdump + git fetch upstream 4) Do a 'touch .devel' in your working directory. Currently, the effect is @@ -47,19 +88,26 @@ Please, read these lines. 7) Test with 'make check' Don't send a pull request if 'make check' gives failed tests. -8) Rebase your commits against upstream/master - (To keep linearity) +8) Try to rebase your commits to keep the history simple. + git rebase upstream/master + (If the rebase fails and you cannot resolve, issue "git rebase --abort" + and ask for help in the pull request comment.) -9) Initiate and send a pull request +9) Once 100% happy, put your work into your forked repository. + git push + +10) Initiate and send a pull request (See https://help.github.com/articles/using-pull-requests/) -Some remarks ------------- + +Code style and generic remarks +------------------------------ a) A thorough reading of some other printers code is useful. b) Put the normative reference if any as comments (RFC, etc.). -c) Put the format of packets/headers/options as comments. +c) Put the format of packets/headers/options as comments if there is no + published normative reference. d) The printer may receive incomplete packet in the buffer, truncated at any random position, for example by capturing with '-s size' option. Modified: vendor/tcpdump/dist/CREDITS ============================================================================== --- vendor/tcpdump/dist/CREDITS Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/CREDITS Mon Sep 18 04:10:54 2017 (r323696) @@ -5,7 +5,7 @@ The current maintainers: Denis Ovsienko Fulvio Risso Guy Harris - Hannes Gredler + Hannes Gredler Michael Richardson Francois-Xavier Le Bail @@ -39,6 +39,7 @@ Additional people who have contributed patches: Bjoern A. Zeeb Bram Brent L. Bates + Brian Carpenter Brian Ginsbach Bruce M. Simpson Carles Kishimoto Bisbe @@ -54,6 +55,7 @@ Additional people who have contributed patches: Craig Rodrigues Crist J. Clark Daniel Hagerty + Daniel Lee Darren Reed David Binderman David Horn @@ -85,6 +87,7 @@ Additional people who have contributed patches: Greg Stark Hank Leininger Hannes Viertel + Hanno Böck Harry Raaymakers Heinz-Ado Arnolds Hendrik Scholz @@ -111,6 +114,7 @@ Additional people who have contributed patches: Juliusz Chroboczek Kaarthik Sivakumar Kaladhar Musunuru + Kamil Frankowicz Karl Norby Kazushi Sugyo Kelly Carmichael @@ -123,7 +127,6 @@ Additional people who have contributed patches: Larry Lile Lennert Buytenhek Loganaden Velvindron - Daniel Lee Loris Degioanni Love Hörnquist-Ã…strand Lucas C. Villa Real @@ -166,6 +169,7 @@ Additional people who have contributed patches: Paolo Abeni Pascal Hennequin Pasvorn Boonmark + Patrik Lundquist Paul Ferrell Paul Mundt Paul S. Traina Modified: vendor/tcpdump/dist/INSTALL.txt ============================================================================== --- vendor/tcpdump/dist/INSTALL.txt Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/INSTALL.txt Mon Sep 18 04:10:54 2017 (r323696) @@ -37,6 +37,7 @@ Please see "PLATFORMS" for notes about tested platform FILES ----- CHANGES - description of differences between releases +CONTRIBUTING - guidelines for contributing CREDITS - people that have helped tcpdump along INSTALL.txt - this file LICENSE - the license under which tcpdump is distributed Modified: vendor/tcpdump/dist/Makefile.in ============================================================================== --- vendor/tcpdump/dist/Makefile.in Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/Makefile.in Mon Sep 18 04:10:54 2017 (r323696) @@ -263,6 +263,7 @@ HDR = \ ether.h \ ethertype.h \ extract.h \ + funcattrs.h \ getopt_long.h \ gmpls.h \ gmt2local.h \ Modified: vendor/tcpdump/dist/PLATFORMS ============================================================================== --- vendor/tcpdump/dist/PLATFORMS Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/PLATFORMS Mon Sep 18 04:10:54 2017 (r323696) @@ -1,9 +1,16 @@ -== Tested platforms == -NetBSD 5.1/i386 (mcr - 2012/4/1) -Debian Linux (squeeze/i386) (mcr - 2012/4/1) +In many operating systems tcpdump is available as a native package or port, +which simplifies installation of updates and long-term maintenance. However, +the native packages are sometimes a few versions behind and to try a more +recent snapshot it will take to compile tcpdump from the source code. ---- -RedHat Linux 6.1/i386 (assar) -FreeBSD 2.2.8/i386 (itojun) +tcpdump compiles and works on at least the following platforms: - +* AIX +* FreeBSD +* HP-UX 11i +* Linux (any) with glibc (usually just works) +* Linux (any) with musl libc (sometimes fails to compile, please report any bugs) +* Mac OS X / macOS +* NetBSD +* OpenWrt +* Solaris Modified: vendor/tcpdump/dist/README.md ============================================================================== --- vendor/tcpdump/dist/README.md Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/README.md Mon Sep 18 04:10:54 2017 (r323696) @@ -3,25 +3,21 @@ [![Build Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump) -TCPDUMP 4.x.y -Now maintained by "The Tcpdump Group" -See www.tcpdump.org +To report a security issue please send an e-mail to security@tcpdump.org. -Please send inquiries/comments/reports to: +To report bugs and other problems, contribute patches, request a +feature, provide generic feedback etc please see the file +CONTRIBUTING in the tcpdump source tree root. -* tcpdump-workers@lists.tcpdump.org +TCPDUMP 4.x.y +Now maintained by "The Tcpdump Group" +See www.tcpdump.org Anonymous Git is available via: git clone git://bpf.tcpdump.org/tcpdump -Please submit patches by forking the branch on GitHub at: - -* http://github.com/the-tcpdump-group/tcpdump/tree/master - -and issuing a pull request. - -formerly from Lawrence Berkeley National Laboratory +formerly from Lawrence Berkeley National Laboratory Network Research Group ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4) @@ -70,20 +66,6 @@ Another tool that tcpdump users might find useful is t It is a program that can be used to extract portions of tcpdump binary trace files. See the above distribution for further details and documentation. - -Problems, bugs, questions, desirable enhancements, etc. should be sent -to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support -requests, and feature requests may also be submitted on the GitHub issue -tracker for tcpdump at: - -* https://github.com/the-tcpdump-group/tcpdump/issues - -Source code contributions, etc. should be sent to the email address -above or submitted by forking the branch on GitHub at: - -* http://github.com/the-tcpdump-group/tcpdump/tree/master - -and issuing a pull request. Current versions can be found at www.tcpdump.org. Modified: vendor/tcpdump/dist/VERSION ============================================================================== --- vendor/tcpdump/dist/VERSION Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/VERSION Mon Sep 18 04:10:54 2017 (r323696) @@ -1 +1 @@ -4.9.0 +4.9.2 Modified: vendor/tcpdump/dist/aclocal.m4 ============================================================================== --- vendor/tcpdump/dist/aclocal.m4 Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/aclocal.m4 Mon Sep 18 04:10:54 2017 (r323696) @@ -655,7 +655,7 @@ AC_DEFUN(AC_LBL_LIBPCAP, AC_CHECK_FUNC(pcap_loop,, [ AC_MSG_ERROR( -[Report this to tcpdump-workers@lists.tcpdump.org, and include the +[This is a bug, please follow the guidelines in CONTRIBUTING and include the config.log file in your report. If you have downloaded libpcap from tcpdump.org, and built it yourself, please also include the config.log file from the libpcap source directory, the Makefile from the libpcap Modified: vendor/tcpdump/dist/addrtoname.c ============================================================================== --- vendor/tcpdump/dist/addrtoname.c Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/addrtoname.c Mon Sep 18 04:10:54 2017 (r323696) @@ -145,14 +145,24 @@ struct enamemem { u_short e_addr2; const char *e_name; u_char *e_nsap; /* used only for nsaptable[] */ -#define e_bs e_nsap /* for bytestringtable */ struct enamemem *e_nxt; }; static struct enamemem enametable[HASHNAMESIZE]; static struct enamemem nsaptable[HASHNAMESIZE]; -static struct enamemem bytestringtable[HASHNAMESIZE]; +struct bsnamemem { + u_short bs_addr0; + u_short bs_addr1; + u_short bs_addr2; + const char *bs_name; + u_char *bs_bytes; + unsigned int bs_nbytes; + struct bsnamemem *bs_nxt; +}; + +static struct bsnamemem bytestringtable[HASHNAMESIZE]; + struct protoidmem { uint32_t p_oui; u_short p_proto; @@ -321,7 +331,7 @@ getname6(netdissect_options *ndo, const u_char *ap) return (p->name); } -static const char hex[] = "0123456789abcdef"; +static const char hex[16] = "0123456789abcdef"; /* Find the hash node that corresponds the ether address 'ep' */ @@ -359,11 +369,11 @@ lookup_emem(netdissect_options *ndo, const u_char *ep) * with length 'nlen' */ -static inline struct enamemem * +static inline struct bsnamemem * lookup_bytestring(netdissect_options *ndo, register const u_char *bs, const unsigned int nlen) { - struct enamemem *tp; + struct bsnamemem *tp; register u_int i, j, k; if (nlen >= 6) { @@ -378,26 +388,28 @@ lookup_bytestring(netdissect_options *ndo, register co i = j = k = 0; tp = &bytestringtable[(i ^ j) & (HASHNAMESIZE-1)]; - while (tp->e_nxt) - if (tp->e_addr0 == i && - tp->e_addr1 == j && - tp->e_addr2 == k && - memcmp((const char *)bs, (const char *)(tp->e_bs), nlen) == 0) + while (tp->bs_nxt) + if (nlen == tp->bs_nbytes && + tp->bs_addr0 == i && + tp->bs_addr1 == j && + tp->bs_addr2 == k && + memcmp((const char *)bs, (const char *)(tp->bs_bytes), nlen) == 0) return tp; else - tp = tp->e_nxt; + tp = tp->bs_nxt; - tp->e_addr0 = i; - tp->e_addr1 = j; - tp->e_addr2 = k; + tp->bs_addr0 = i; + tp->bs_addr1 = j; + tp->bs_addr2 = k; - tp->e_bs = (u_char *) calloc(1, nlen + 1); - if (tp->e_bs == NULL) + tp->bs_bytes = (u_char *) calloc(1, nlen); + if (tp->bs_bytes == NULL) (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); - memcpy(tp->e_bs, bs, nlen); - tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); - if (tp->e_nxt == NULL) + memcpy(tp->bs_bytes, bs, nlen); + tp->bs_nbytes = nlen; + tp->bs_nxt = (struct bsnamemem *)calloc(1, sizeof(*tp)); + if (tp->bs_nxt == NULL) (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); return tp; @@ -424,11 +436,11 @@ lookup_nsap(netdissect_options *ndo, register const u_ tp = &nsaptable[(i ^ j) & (HASHNAMESIZE-1)]; while (tp->e_nxt) - if (tp->e_addr0 == i && + if (nsap_length == tp->e_nsap[0] && + tp->e_addr0 == i && tp->e_addr1 == j && tp->e_addr2 == k && - tp->e_nsap[0] == nsap_length && - memcmp((const char *)&(nsap[1]), + memcmp((const char *)nsap, (char *)&(tp->e_nsap[1]), nsap_length) == 0) return tp; else @@ -528,12 +540,12 @@ le64addr_string(netdissect_options *ndo, const u_char const unsigned int len = 8; register u_int i; register char *cp; - register struct enamemem *tp; + register struct bsnamemem *tp; char buf[BUFSIZE]; tp = lookup_bytestring(ndo, ep, len); - if (tp->e_name) - return (tp->e_name); + if (tp->bs_name) + return (tp->bs_name); cp = buf; for (i = len; i > 0 ; --i) { @@ -545,11 +557,11 @@ le64addr_string(netdissect_options *ndo, const u_char *cp = '\0'; - tp->e_name = strdup(buf); - if (tp->e_name == NULL) + tp->bs_name = strdup(buf); + if (tp->bs_name == NULL) (*ndo->ndo_error)(ndo, "le64addr_string: strdup(buf)"); - return (tp->e_name); + return (tp->bs_name); } const char * @@ -558,7 +570,7 @@ linkaddr_string(netdissect_options *ndo, const u_char { register u_int i; register char *cp; - register struct enamemem *tp; + register struct bsnamemem *tp; if (len == 0) return (""); @@ -570,11 +582,11 @@ linkaddr_string(netdissect_options *ndo, const u_char return (q922_string(ndo, ep, len)); tp = lookup_bytestring(ndo, ep, len); - if (tp->e_name) - return (tp->e_name); + if (tp->bs_name) + return (tp->bs_name); - tp->e_name = cp = (char *)malloc(len*3); - if (tp->e_name == NULL) + tp->bs_name = cp = (char *)malloc(len*3); + if (tp->bs_name == NULL) (*ndo->ndo_error)(ndo, "linkaddr_string: malloc"); *cp++ = hex[*ep >> 4]; *cp++ = hex[*ep++ & 0xf]; @@ -584,7 +596,7 @@ linkaddr_string(netdissect_options *ndo, const u_char *cp++ = hex[*ep++ & 0xf]; } *cp = '\0'; - return (tp->e_name); + return (tp->bs_name); } const char * Modified: vendor/tcpdump/dist/addrtoname.h ============================================================================== --- vendor/tcpdump/dist/addrtoname.h Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/addrtoname.h Mon Sep 18 04:10:54 2017 (r323696) @@ -33,7 +33,8 @@ enum { LINKADDR_ETHER, LINKADDR_FRELAY, LINKADDR_IEEE1394, - LINKADDR_ATM + LINKADDR_ATM, + LINKADDR_OTHER }; #define BUFSIZE 128 Modified: vendor/tcpdump/dist/addrtostr.c ============================================================================== --- vendor/tcpdump/dist/addrtostr.c Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/addrtostr.c Mon Sep 18 04:10:54 2017 (r323696) @@ -110,25 +110,24 @@ addrtostr6 (const void *src, char *dst, size_t size) size_t space_left, added_space; int snprintfed; struct { - long base; - long len; + int base; + int len; } best, cur; - u_long words [IN6ADDRSZ / INT16SZ]; - u_int i; + uint16_t words [IN6ADDRSZ / INT16SZ]; + int i; /* Preprocess: * Copy the input (bytewise) array into a wordwise array. * Find the longest run of 0x00's in src[] for :: shorthanding. */ - memset (words, 0, sizeof(words)); - for (i = 0; i < IN6ADDRSZ; i++) - words[i/2] |= (srcaddr[i] << ((1 - (i % 2)) << 3)); + for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) + words[i] = (srcaddr[2*i] << 8) | srcaddr[2*i + 1]; best.len = 0; best.base = -1; cur.len = 0; cur.base = -1; - for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) + for (i = 0; i < (int)(IN6ADDRSZ / INT16SZ); i++) { if (words[i] == 0) { @@ -161,7 +160,7 @@ addrtostr6 (const void *src, char *dst, size_t size) *dp++ = c; \ space_left--; \ } - for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) + for (i = 0; i < (int)(IN6ADDRSZ / INT16SZ); i++) { /* Are we inside the best run of 0x00's? */ @@ -192,7 +191,7 @@ addrtostr6 (const void *src, char *dst, size_t size) space_left -= added_space; break; } - snprintfed = snprintf (dp, space_left, "%lx", words[i]); + snprintfed = snprintf (dp, space_left, "%x", words[i]); if (snprintfed < 0) return (NULL); if ((size_t) snprintfed >= space_left) Modified: vendor/tcpdump/dist/af.c ============================================================================== --- vendor/tcpdump/dist/af.c Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/af.c Mon Sep 18 04:10:54 2017 (r323696) @@ -12,7 +12,7 @@ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ #ifdef HAVE_CONFIG_H Modified: vendor/tcpdump/dist/af.h ============================================================================== --- vendor/tcpdump/dist/af.h Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/af.h Mon Sep 18 04:10:54 2017 (r323696) @@ -12,7 +12,7 @@ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ extern const struct tok af_values[]; Modified: vendor/tcpdump/dist/checksum.c ============================================================================== --- vendor/tcpdump/dist/checksum.c Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/checksum.c Mon Sep 18 04:10:54 2017 (r323696) @@ -14,7 +14,7 @@ * * miscellaneous checksumming routines * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ #ifdef HAVE_CONFIG_H Modified: vendor/tcpdump/dist/config.h.in ============================================================================== --- vendor/tcpdump/dist/config.h.in Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/config.h.in Mon Sep 18 04:10:54 2017 (r323696) @@ -34,6 +34,9 @@ /* Define to 1 if you have the `ether_ntohost' function. */ #undef HAVE_ETHER_NTOHOST +/* Define to 1 if you have the `EVP_CipherInit_ex' function. */ +#undef HAVE_EVP_CIPHERINIT_EX + /* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */ #undef HAVE_EVP_CIPHER_CTX_NEW Modified: vendor/tcpdump/dist/configure ============================================================================== --- vendor/tcpdump/dist/configure Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/configure Mon Sep 18 04:10:54 2017 (r323696) @@ -5801,7 +5801,7 @@ if test "x$ac_cv_func_pcap_loop" = xyes; then : else - as_fn_error $? "Report this to tcpdump-workers@lists.tcpdump.org, and include the + as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING and include the config.log file in your report. If you have downloaded libpcap from tcpdump.org, and built it yourself, please also include the config.log file from the libpcap source directory, the Makefile from the libpcap @@ -8116,17 +8116,32 @@ fi done # - # OK, do we have EVP_CIPHER_CTX_new? + # OK, then: + # + # 1) do we have EVP_CIPHER_CTX_new? # If so, we use it to allocate an # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be # opaque; otherwise, we allocate it ourselves. # - for ac_func in EVP_CIPHER_CTX_new + # 2) do we have EVP_CipherInit_ex()? + # If so, we use it, because we need to be + # able to make two "initialize the cipher" + # calls, one with the cipher and key, and + # one with the IV, and, as of OpenSSL 1.1, + # You Can't Do That with EVP_CipherInit(), + # because a call to EVP_CipherInit() will + # unconditionally clear the context, and + # if you don't supply a cipher, it'll + # clear the cipher, rendering the context + # unusable and causing a crash. + # + for ac_func in EVP_CIPHER_CTX_new EVP_CipherInit_ex do : - ac_fn_c_check_func "$LINENO" "EVP_CIPHER_CTX_new" "ac_cv_func_EVP_CIPHER_CTX_new" -if test "x$ac_cv_func_EVP_CIPHER_CTX_new" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_EVP_CIPHER_CTX_NEW 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi Modified: vendor/tcpdump/dist/configure.in ============================================================================== --- vendor/tcpdump/dist/configure.in Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/configure.in Mon Sep 18 04:10:54 2017 (r323696) @@ -935,12 +935,26 @@ if test "$want_libcrypto" != "no"; then if test "$ac_cv_lib_crypto_DES_cbc_encrypt" = "yes"; then AC_CHECK_HEADERS(openssl/evp.h) # - # OK, do we have EVP_CIPHER_CTX_new? + # OK, then: + # + # 1) do we have EVP_CIPHER_CTX_new? # If so, we use it to allocate an # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be # opaque; otherwise, we allocate it ourselves. # - AC_CHECK_FUNCS(EVP_CIPHER_CTX_new) + # 2) do we have EVP_CipherInit_ex()? + # If so, we use it, because we need to be + # able to make two "initialize the cipher" + # calls, one with the cipher and key, and + # one with the IV, and, as of OpenSSL 1.1, + # You Can't Do That with EVP_CipherInit(), + # because a call to EVP_CipherInit() will + # unconditionally clear the context, and + # if you don't supply a cipher, it'll + # clear the cipher, rendering the context + # unusable and causing a crash. + # + AC_CHECK_FUNCS(EVP_CIPHER_CTX_new EVP_CipherInit_ex) fi ]) fi Modified: vendor/tcpdump/dist/extract.h ============================================================================== --- vendor/tcpdump/dist/extract.h Mon Sep 18 04:09:59 2017 (r323695) +++ vendor/tcpdump/dist/extract.h Mon Sep 18 04:10:54 2017 (r323696) @@ -20,8 +20,48 @@ */ /* - * Macros to extract possibly-unaligned big-endian integral values. + * For 8-bit values; provided for the sake of completeness. Byte order + * isn't relevant, and alignment isn't an issue. */ +#define EXTRACT_8BITS(p) (*(p)) +#define EXTRACT_LE_8BITS(p) (*(p)) + +/* + * Inline functions or macros to extract possibly-unaligned big-endian + * integral values. + */ +#include "funcattrs.h" + +/* + * If we have versions of GCC or Clang that support an __attribute__ + * to say "if we're building with unsigned behavior sanitization, + * don't complain about undefined behavior in this function", we + * label these functions with that attribute - we *know* it's undefined + * in the C standard, but we *also* know it does what we want with + * the ISA we're targeting and the compiler we're using. + * + * For GCC 4.9.0 and later, we use __attribute__((no_sanitize_undefined)); + * pre-5.0 GCC doesn't have __has_attribute, and I'm not sure whether + * GCC or Clang first had __attribute__((no_sanitize(XXX)). + * + * For Clang, we check for __attribute__((no_sanitize(XXX)) with + * __has_attribute, as there are versions of Clang that support + * __attribute__((no_sanitize("undefined")) but don't support + * __attribute__((no_sanitize_undefined)). + * + * We define this here, rather than in funcattrs.h, because we + * only want it used here, we don't want it to be broadly used. + * (Any printer will get this defined, but this should at least + * make it harder for people to find.) + */ +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 409) +#define UNALIGNED_OK __attribute__((no_sanitize_undefined)) +#elif __has_attribute(no_sanitize) +#define UNALIGNED_OK __attribute__((no_sanitize("undefined"))) +#else +#define UNALIGNED_OK +#endif + #ifdef LBL_ALIGN /* * The processor doesn't natively handle unaligned loads. @@ -31,7 +71,7 @@ defined(__mips) || defined(__mips__)) /* - * This is a GCC-compatible compiler and we have __attribute__, which +* This is a GCC-compatible compiler and we have __attribute__, which * we assume that mean we have __attribute__((packed)), and this is * MIPS or Alpha, which has instructions that can help when doing * unaligned loads. @@ -88,19 +128,19 @@ typedef struct { uint32_t val; } __attribute__((packed)) unaligned_uint32_t; -static inline uint16_t +UNALIGNED_OK static inline uint16_t EXTRACT_16BITS(const void *p) { return ((uint16_t)ntohs(((const unaligned_uint16_t *)(p))->val)); } -static inline uint32_t +UNALIGNED_OK static inline uint32_t EXTRACT_32BITS(const void *p) { return ((uint32_t)ntohl(((const unaligned_uint32_t *)(p))->val)); } -static inline uint64_t +UNALIGNED_OK static inline uint64_t EXTRACT_64BITS(const void *p) { return ((uint64_t)(((uint64_t)ntohl(((const unaligned_uint32_t *)(p) + 0)->val)) << 32 | @@ -138,19 +178,19 @@ EXTRACT_64BITS(const void *p) * The processor natively handles unaligned loads, so we can just * cast the pointer and fetch through it. */ -static inline uint16_t +static inline uint16_t UNALIGNED_OK EXTRACT_16BITS(const void *p) { return ((uint16_t)ntohs(*(const uint16_t *)(p))); } -static inline uint32_t +static inline uint32_t UNALIGNED_OK EXTRACT_32BITS(const void *p) { return ((uint32_t)ntohl(*(const uint32_t *)(p))); } -static inline uint64_t +static inline uint64_t UNALIGNED_OK EXTRACT_64BITS(const void *p) { return ((uint64_t)(((uint64_t)ntohl(*((const uint32_t *)(p) + 0))) << 32 | @@ -193,7 +233,6 @@ EXTRACT_64BITS(const void *p) * Macros to extract possibly-unaligned little-endian integral values. * XXX - do loads on little-endian machines that support unaligned loads? */ -#define EXTRACT_LE_8BITS(p) (*(p)) #define EXTRACT_LE_16BITS(p) \ ((uint16_t)(((uint16_t)(*((const uint8_t *)(p) + 1)) << 8) | \ ((uint16_t)(*((const uint8_t *)(p) + 0)) << 0))) @@ -242,3 +281,6 @@ EXTRACT_64BITS(const void *p) #define ND_TTEST_64BITS(p) ND_TTEST2(*(p), 8) #define ND_TCHECK_64BITS(p) ND_TCHECK2(*(p), 8) + +#define ND_TTEST_128BITS(p) ND_TTEST2(*(p), 16) +#define ND_TCHECK_128BITS(p) ND_TCHECK2(*(p), 16) Added: vendor/tcpdump/dist/funcattrs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcpdump/dist/funcattrs.h Mon Sep 18 04:10:54 2017 (r323696) @@ -0,0 +1,122 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Sep 18 04: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 BDB48E1D25D; Mon, 18 Sep 2017 04:12:47 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71D217E442; Mon, 18 Sep 2017 04:12:47 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8I4CkrM031356; Mon, 18 Sep 2017 04:12:46 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8I4Ck04031355; Mon, 18 Sep 2017 04:12:46 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709180412.v8I4Ck04031355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Mon, 18 Sep 2017 04:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323697 - vendor/tcpdump/4.9.2 X-SVN-Group: vendor X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: vendor/tcpdump/4.9.2 X-SVN-Commit-Revision: 323697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 04:12:47 -0000 Author: gordon Date: Mon Sep 18 04:12:46 2017 New Revision: 323697 URL: https://svnweb.freebsd.org/changeset/base/323697 Log: Tag tcpdump-4.9.2. Approved by: emaste (mentor) Added: vendor/tcpdump/4.9.2/ - copied from r323696, vendor/tcpdump/dist/ From owner-svn-src-all@freebsd.org Mon Sep 18 10:40: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 60708E07026; Mon, 18 Sep 2017 10:40:48 +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 2CB833E9E; Mon, 18 Sep 2017 10:40:48 +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 DBA8026034B; Mon, 18 Sep 2017 12:40:44 +0200 (CEST) Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Mon, 18 Sep 2017 12:38:16 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201709172340.v8HNeGuP016998@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 10:40:48 -0000 On 09/18/17 01:40, Conrad Meyer wrote: > + sprintf(chardevname, "226:%d", > + device_get_unit(dev)); Hi, Try to use snprintf(). Define the chardevname size as a macro, or just allocate it on the stack if it is < 32 bytes. --HPS From owner-svn-src-all@freebsd.org Mon Sep 18 13:17:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A86FE0F82F; Mon, 18 Sep 2017 13:17:25 +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 E5D8167E9B; Mon, 18 Sep 2017 13:17:24 +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 v8IDHNNk052411; Mon, 18 Sep 2017 13:17:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IDHNiT052409; Mon, 18 Sep 2017 13:17:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709181317.v8IDHNiT052409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Sep 2017 13:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323703 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 323703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 13:17:25 -0000 Author: hselasky Date: Mon Sep 18 13:17:23 2017 New Revision: 323703 URL: https://svnweb.freebsd.org/changeset/base/323703 Log: Add support for shared memory functions to the LinuxKPI. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Mon Sep 18 08:46:07 2017 (r323702) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Mon Sep 18 13:17:23 2017 (r323703) @@ -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 @@ -287,5 +287,26 @@ noop_llseek(struct linux_file *file, loff_t offset, in return (file->_file->f_offset); } + +/* Shared memory support */ +unsigned long linux_invalidate_mapping_pages(vm_object_t, pgoff_t, pgoff_t); +struct page *linux_shmem_read_mapping_page_gfp(vm_object_t, int, gfp_t); +struct linux_file *linux_shmem_file_setup(const char *, loff_t, unsigned long); +void linux_shmem_truncate_range(vm_object_t, loff_t, loff_t); + +#define invalidate_mapping_pages(...) \ + linux_invalidate_mapping_pages(__VA_ARGS__) + +#define shmem_read_mapping_page(...) \ + linux_shmem_read_mapping_page_gfp(__VA_ARGS__, 0) + +#define shmem_read_mapping_page_gfp(...) \ + linux_shmem_read_mapping_page_gfp(__VA_ARGS__) + +#define shmem_file_setup(...) \ + linux_shmem_file_setup(__VA_ARGS__) + +#define shmem_truncate_range(...) \ + linux_shmem_truncate_range(__VA_ARGS__) #endif /* _LINUX_FS_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 18 08:46:07 2017 (r323702) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 18 13:17:23 2017 (r323703) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(__amd64__) || defined(__aarch64__) || defined(__riscv) #define LINUXKPI_HAVE_DMAP @@ -288,4 +289,108 @@ int is_vmalloc_addr(const void *addr) { return (vtoslab((vm_offset_t)addr & ~UMA_SLAB_MASK) != NULL); +} + +struct page * +linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex, gfp_t gfp) +{ + vm_page_t page; + int rv; + + if ((gfp & GFP_NOWAIT) != 0) + panic("GFP_NOWAIT is unimplemented"); + + VM_OBJECT_WLOCK(obj); + page = vm_page_grab(obj, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_WIRED); + if (page->valid != VM_PAGE_BITS_ALL) { + vm_page_xbusy(page); + if (vm_pager_has_page(obj, pindex, NULL, NULL)) { + rv = vm_pager_get_pages(obj, &page, 1, NULL, NULL); + if (rv != VM_PAGER_OK) { + vm_page_lock(page); + vm_page_unwire(page, PQ_NONE); + vm_page_free(page); + vm_page_unlock(page); + VM_OBJECT_WUNLOCK(obj); + return (ERR_PTR(-EINVAL)); + } + MPASS(page->valid == VM_PAGE_BITS_ALL); + } else { + pmap_zero_page(page); + page->valid = VM_PAGE_BITS_ALL; + page->dirty = 0; + } + vm_page_xunbusy(page); + } + vm_page_lock(page); + vm_page_hold(page); + vm_page_unlock(page); + VM_OBJECT_WUNLOCK(obj); + return (page); +} + +struct linux_file * +linux_shmem_file_setup(const char *name, loff_t size, unsigned long flags) +{ + struct fileobj { + struct linux_file file __aligned(sizeof(void *)); + struct vnode vnode __aligned(sizeof(void *)); + }; + struct fileobj *fileobj; + struct linux_file *filp; + struct vnode *vp; + int error; + + fileobj = kzalloc(sizeof(*fileobj), GFP_KERNEL); + if (fileobj == NULL) { + error = -ENOMEM; + goto err_0; + } + filp = &fileobj->file; + vp = &fileobj->vnode; + + filp->f_count = 1; + filp->f_vnode = vp; + filp->f_shmem = vm_pager_allocate(OBJT_DEFAULT, NULL, size, + VM_PROT_READ | VM_PROT_WRITE, 0, curthread->td_ucred); + if (filp->f_shmem == NULL) { + error = -ENOMEM; + goto err_1; + } + return (filp); +err_1: + kfree(filp); +err_0: + return (ERR_PTR(error)); +} + +static vm_ooffset_t +linux_invalidate_mapping_pages_sub(vm_object_t obj, vm_pindex_t start, + vm_pindex_t end, int flags) +{ + int start_count, end_count; + + VM_OBJECT_WLOCK(obj); + start_count = obj->resident_page_count; + vm_object_page_remove(obj, start, end, flags); + end_count = obj->resident_page_count; + VM_OBJECT_WUNLOCK(obj); + return (start_count - end_count); +} + +unsigned long +linux_invalidate_mapping_pages(vm_object_t obj, pgoff_t start, pgoff_t end) +{ + + return (linux_invalidate_mapping_pages_sub(obj, start, end, OBJPR_CLEANONLY)); +} + +void +linux_shmem_truncate_range(vm_object_t obj, loff_t lstart, loff_t lend) +{ + vm_pindex_t start = OFF_TO_IDX(lstart + PAGE_SIZE - 1); + vm_pindex_t end = OFF_TO_IDX(lend + 1); + + (void) linux_invalidate_mapping_pages_sub(obj, start, end, 0); } From owner-svn-src-all@freebsd.org Mon Sep 18 13:24: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 1E95FE10095; Mon, 18 Sep 2017 13:24:01 +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 DEE9A68610; Mon, 18 Sep 2017 13:24:00 +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 v8IDO0cU056221; Mon, 18 Sep 2017 13:24:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IDNxB6056215; Mon, 18 Sep 2017 13:23:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709181323.v8IDNxB6056215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Sep 2017 13:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323704 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 323704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 13:24:01 -0000 Author: hselasky Date: Mon Sep 18 13:23:59 2017 New Revision: 323704 URL: https://svnweb.freebsd.org/changeset/base/323704 Log: Only wire pages in the LinuxKPI instead of holding and wiring them. This prevents the page daemon from regularly scanning the held pages. Suggested by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Sep 18 13:17:23 2017 (r323703) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Sep 18 13:23:59 2017 (r323704) @@ -220,7 +220,6 @@ static inline void get_page(struct vm_page *page) { vm_page_lock(page); - vm_page_hold(page); vm_page_wire(page); vm_page_unlock(page); } @@ -245,7 +244,6 @@ put_page(struct vm_page *page) { vm_page_lock(page); vm_page_unwire(page, PQ_ACTIVE); - vm_page_unhold(page); vm_page_unlock(page); } Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 18 13:17:23 2017 (r323703) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 18 13:23:59 2017 (r323704) @@ -209,6 +209,7 @@ linux_get_user_pages_internal(vm_map_t map, unsigned l vm_page_lock(pg); vm_page_wire(pg); + vm_page_unhold(pg); vm_page_unlock(pg); } return (nr_pages); @@ -243,6 +244,7 @@ __get_user_pages_fast(unsigned long start, int nr_page vm_page_lock(*mp); vm_page_wire(*mp); + vm_page_unhold(*mp); vm_page_unlock(*mp); if ((prot & VM_PROT_WRITE) != 0 && @@ -323,9 +325,6 @@ linux_shmem_read_mapping_page_gfp(vm_object_t obj, int } vm_page_xunbusy(page); } - vm_page_lock(page); - vm_page_hold(page); - vm_page_unlock(page); VM_OBJECT_WUNLOCK(obj); return (page); } From owner-svn-src-all@freebsd.org Mon Sep 18 13:37: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 29FE3E10C8B; Mon, 18 Sep 2017 13:37: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 05E1369177; Mon, 18 Sep 2017 13:37: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 v8IDbFEv060250; Mon, 18 Sep 2017 13:37:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IDbEPD060245; Mon, 18 Sep 2017 13:37:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709181337.v8IDbEPD060245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Sep 2017 13:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323705 - in head/sys/compat/linuxkpi/common: include/asm include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/asm include/linux src X-SVN-Commit-Revision: 323705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 13:37:16 -0000 Author: hselasky Date: Mon Sep 18 13:37:14 2017 New Revision: 323705 URL: https://svnweb.freebsd.org/changeset/base/323705 Log: The LinuxKPI atomics do not have acquire nor release semantics unless specified. Fix code to use READ_ONCE() and WRITE_ONCE() where appropriate. Suggested by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h head/sys/compat/linuxkpi/common/include/asm/atomic.h head/sys/compat/linuxkpi/common/include/asm/atomic64.h head/sys/compat/linuxkpi/common/include/linux/bitops.h head/sys/compat/linuxkpi/common/src/linux_tasklet.c Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h Mon Sep 18 13:23:59 2017 (r323704) +++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h Mon Sep 18 13:37:14 2017 (r323705) @@ -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,7 +31,7 @@ #ifndef _ATOMIC_LONG_H_ #define _ATOMIC_LONG_H_ -#include +#include #include #include @@ -54,13 +54,13 @@ atomic_long_add_return(long i, atomic_long_t *v) static inline void atomic_long_set(atomic_long_t *v, long i) { - atomic_store_rel_long(&v->counter, i); + WRITE_ONCE(v->counter, i); } static inline long atomic_long_read(atomic_long_t *v) { - return atomic_load_acq_long(&v->counter); + return READ_ONCE(v->counter); } static inline long Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic.h Mon Sep 18 13:23:59 2017 (r323704) +++ head/sys/compat/linuxkpi/common/include/asm/atomic.h Mon Sep 18 13:37:14 2017 (r323705) @@ -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 @@ -32,9 +32,8 @@ #ifndef _ASM_ATOMIC_H_ #define _ASM_ATOMIC_H_ -#include +#include #include - #include #define ATOMIC_INIT(x) { .counter = (x) } @@ -73,7 +72,7 @@ atomic_sub_return(int i, atomic_t *v) static inline void atomic_set(atomic_t *v, int i) { - atomic_store_rel_int(&v->counter, i); + WRITE_ONCE(v->counter, i); } static inline void @@ -91,7 +90,7 @@ atomic_set_mask(unsigned int mask, atomic_t *v) static inline int atomic_read(const atomic_t *v) { - return atomic_load_acq_int(&__DECONST(atomic_t *, v)->counter); + return READ_ONCE(v->counter); } static inline int @@ -137,7 +136,7 @@ atomic_xchg(atomic_t *v, int i) #else int ret; for (;;) { - ret = atomic_load_acq_int(&v->counter); + ret = READ_ONCE(v->counter); if (atomic_cmpset_int(&v->counter, ret, i)) break; } @@ -153,7 +152,7 @@ atomic_cmpxchg(atomic_t *v, int old, int new) for (;;) { if (atomic_cmpset_int(&v->counter, old, new)) break; - ret = atomic_load_acq_int(&v->counter); + ret = READ_ONCE(v->counter); if (ret != old) break; } Modified: head/sys/compat/linuxkpi/common/include/asm/atomic64.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic64.h Mon Sep 18 13:23:59 2017 (r323704) +++ head/sys/compat/linuxkpi/common/include/asm/atomic64.h Mon Sep 18 13:37:14 2017 (r323705) @@ -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,7 +28,7 @@ #ifndef _ASM_ATOMIC64_H_ #define _ASM_ATOMIC64_H_ -#include +#include #include #include @@ -74,7 +74,7 @@ atomic64_set(atomic64_t *v, int64_t i) static inline int64_t atomic64_read(atomic64_t *v) { - return atomic_load_acq_64(&v->counter); + return READ_ONCE(v->counter); } static inline int64_t @@ -114,7 +114,7 @@ atomic64_xchg(atomic64_t *v, int64_t i) #else int64_t ret; for (;;) { - ret = atomic_load_acq_64(&v->counter); + ret = READ_ONCE(v->counter); if (atomic_cmpset_64(&v->counter, ret, i)) break; } @@ -130,7 +130,7 @@ atomic64_cmpxchg(atomic64_t *v, int64_t old, int64_t n for (;;) { if (atomic_cmpset_64(&v->counter, old, new)) break; - ret = atomic_load_acq_64(&v->counter); + ret = READ_ONCE(v->counter); if (ret != old) break; } Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Sep 18 13:23:59 2017 (r323704) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Sep 18 13:37:14 2017 (r323705) @@ -269,8 +269,7 @@ find_next_zero_bit(const unsigned long *addr, unsigned atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) #define test_bit(i, a) \ - !!(atomic_load_acq_long(&((volatile unsigned long *)(a))[BIT_WORD(i)]) & \ - BIT_MASK(i)) + !!(READ_ONCE(((volatile unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i)) static inline int test_and_clear_bit(long bit, volatile unsigned long *var) Modified: head/sys/compat/linuxkpi/common/src/linux_tasklet.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_tasklet.c Mon Sep 18 13:23:59 2017 (r323704) +++ head/sys/compat/linuxkpi/common/src/linux_tasklet.c Mon Sep 18 13:37:14 2017 (r323705) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -45,10 +46,10 @@ __FBSDID("$FreeBSD$"); 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) + WRITE_ONCE(*(volatile uintptr_t *)&(ts)->entry.tqe_prev, new) #define TASKLET_ST_GET(ts) \ - atomic_load_acq_ptr((volatile uintptr_t *)&(ts)->entry.tqe_prev) + READ_ONCE(*(volatile uintptr_t *)&(ts)->entry.tqe_prev) struct tasklet_worker { struct mtx mtx; From owner-svn-src-all@freebsd.org Mon Sep 18 13:39: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 A32CEE10F09; Mon, 18 Sep 2017 13:39:52 +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 6DB1669345; Mon, 18 Sep 2017 13:39:52 +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 v8IDdp3Z060368; Mon, 18 Sep 2017 13:39:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IDdpIl060367; Mon, 18 Sep 2017 13:39:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709181339.v8IDdpIl060367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Sep 2017 13:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323706 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 323706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 13:39:52 -0000 Author: hselasky Date: Mon Sep 18 13:39:51 2017 New Revision: 323706 URL: https://svnweb.freebsd.org/changeset/base/323706 Log: Bump the __FreeBSD_version after recent LinuxKPI changes. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Sep 18 13:37:14 2017 (r323705) +++ head/sys/sys/param.h Mon Sep 18 13:39:51 2017 (r323706) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200044 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200045 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Mon Sep 18 15: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 7EDB1E16764; Mon, 18 Sep 2017 15:08:11 +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 46BE76C9FF; Mon, 18 Sep 2017 15:08:10 +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 CD3C9260105; Mon, 18 Sep 2017 17:08:08 +0200 (CEST) Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <7527afaa-c983-a2dd-6a1c-a20bb1d03d7a@selasky.org> Date: Mon, 18 Sep 2017 17:05:40 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201709172340.v8HNeGuP016998@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:08:11 -0000 On 09/18/17 01:40, Conrad Meyer wrote: > device_get_children(dev, &children, &nchildren); > for (i = 0; i < nchildren; i++) { > if (children[i]) > - linsysfs_run_bus(children[i], dir, scsi, new_path, prefix); > + linsysfs_run_bus(children[i], dir, scsi, chardev, new_path, prefix); > } > if (new_path != path) > free(new_path, M_TEMP); > + free(chardevname, M_TEMP); > > return (1); 1) Return code from device_get_children() should be checked. 2) children pointer should be freed else there is a memory leak. --HPS From owner-svn-src-all@freebsd.org Mon Sep 18 15:09: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 71124E16906; Mon, 18 Sep 2017 15:09:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.161.194]) (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 374FC6CB8A; Mon, 18 Sep 2017 15:09:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yw0-f194.google.com with SMTP id s62so54436ywg.4; Mon, 18 Sep 2017 08:09:54 -0700 (PDT) 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=LqAImCQgFqvmauKccppPK6ZKobhhri91vkLRFySTnFQ=; b=CpJ8fmtLoC6NwxTK5p3QRXGazdIl+pH9FPXas43YwDumjL84hcpG9PrVjCdmiFCxas 4HGTxrCbO3k4rUGUYjC5K6ThkVazUcCYkR/gSDfhg3Zk/XzYha9cvgWGDwOANftBWI6D 55dIpY5Y9w81swPm7wZqoYgXGr7CpYm7btKr/5svoEFE03YXGmXz37pvYULIqA4wQgdy tM/OeMZRVCksr5CKJ8+YPAXaPEVt/aFzyqUlmJjHJRx9npIXaO+5xgCSjVB7yvTg3nYV Q0GJHItB9XEwgoy7RYopAVEOOioDKTILpoDgHg01sEW1DLqLqVyl9PtU4LG9qaM9GyMK UZXQ== X-Gm-Message-State: AHPjjUi522bTv5vn1d4sTdj/17IA3EMMhwsdxAD6EwTdu93IBtsjrUqT dcFdPaUbO5yUTojlj2Y= X-Received: by 10.37.129.69 with SMTP id j5mr771619ybm.31.1505747388340; Mon, 18 Sep 2017 08:09:48 -0700 (PDT) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id w137sm3075003ywd.9.2017.09.18.08.09.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 08:09:48 -0700 (PDT) Received: by mail-it0-f45.google.com with SMTP id r131so6494410itc.1; Mon, 18 Sep 2017 08:09:48 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDyi7a/HvdGRhGO26mVfHJoqI1ta6o7KAs7Hz3gKBd9dum/RMjc3jB1iOHk6XSojlW3yg9jokS1tcn09lKL2zU= X-Received: by 10.36.84.81 with SMTP id t78mr16261158ita.117.1505747387310; Mon, 18 Sep 2017 08:09:47 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.81.131 with HTTP; Mon, 18 Sep 2017 08:09:46 -0700 (PDT) In-Reply-To: References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Conrad Meyer Date: Mon, 18 Sep 2017 08:09:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Hans Petter Selasky Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:09:55 -0000 Seems unhelpful here, as the maximum length of "226:%d" is shorter than the buffer. On Mon, Sep 18, 2017 at 3:38 AM, Hans Petter Selasky wrote: > On 09/18/17 01:40, Conrad Meyer wrote: >> >> + sprintf(chardevname, "226:%d", >> + device_get_unit(dev)); > > > Hi, > > Try to use snprintf(). Define the chardevname size as a macro, or just > allocate it on the stack if it is < 32 bytes. > > --HPS From owner-svn-src-all@freebsd.org Mon Sep 18 15:14: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 014BAE1727D; Mon, 18 Sep 2017 15:14:31 +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 C03936D23F; Mon, 18 Sep 2017 15:14:30 +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 D63B0260105; Mon, 18 Sep 2017 17:14:28 +0200 (CEST) Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <74fa25ac-685e-c3f8-90d6-cdfac10a0f88@selasky.org> Date: Mon, 18 Sep 2017 17:12:01 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201709172340.v8HNeGuP016998@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:14:31 -0000 On 09/18/17 01:40, Conrad Meyer wrote: > + > + dinfo = device_get_ivars(parent); > + if (dinfo != NULL && dinfo->cfg.baseclass == PCIC_DISPLAY) { > + devclass = device_get_devclass(dev); > + if (devclass != NULL) > + name = devclass_get_name(devclass); > + if (name != NULL && strcmp(name, DRMN_DEV) == 0 && > + device_get_unit(dev) >= 0) { > + sprintf(chardevname, "226:%d", Order of comparison should be switched. First check devclass and name. Then try to access ivars. Else the ivars might have an undefined type! --HPS From owner-svn-src-all@freebsd.org Mon Sep 18 15:15: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 D468BE17456; Mon, 18 Sep 2017 15:15:43 +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 9DDEF6D3D5; Mon, 18 Sep 2017 15:15:43 +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 DF69D260105; Mon, 18 Sep 2017 17:15:41 +0200 (CEST) Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <3cf448fc-d984-2394-2143-c758ae3fb8f2@selasky.org> Date: Mon, 18 Sep 2017 17:13:14 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:15:44 -0000 On 09/18/17 17:09, Conrad Meyer wrote: > Seems unhelpful here, as the maximum length of "226:%d" is shorter > than the buffer. > It makes code-review easier. --HPS From owner-svn-src-all@freebsd.org Mon Sep 18 15:17: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 EC929E175E7; Mon, 18 Sep 2017 15:17:02 +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 C6F9C6D629; Mon, 18 Sep 2017 15:17:02 +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 v8IFH1gG001750; Mon, 18 Sep 2017 15:17:01 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IFH1iC001749; Mon, 18 Sep 2017 15:17:01 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709181517.v8IFH1iC001749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 18 Sep 2017 15:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323707 - head/sys/boot/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/i386/libi386 X-SVN-Commit-Revision: 323707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:17:03 -0000 Author: tsoome Date: Mon Sep 18 15:17:01 2017 New Revision: 323707 URL: https://svnweb.freebsd.org/changeset/base/323707 Log: loader: biosmem allocate heap just below 4GB The current biosmem code is walking bios smap entries and looking for smap entry just below 4GB line, if there is such entry, its base and size is set for heap base and size. Instead of entry base, we should use last HEAP_MIN (currently 64MB) bytes just below 4GB, to make maximum space for kernel and modules. The problem was revealed on ASUS B350M-A system board, an AMD Ryzen 3 1200 CPU memory map: SMAP type=01 base=0000000000000000 len=000000000009d400 attr=01 SMAP type=02 base=000000000009d400 len=0000000000002c00 attr=01 SMAP type=02 base=00000000000e0000 len=0000000000020000 attr=01 SMAP type=01 base=0000000000100000 len=0000000009c00000 attr=01 SMAP type=02 base=0000000009d00000 len=0000000000300000 attr=01 SMAP type=01 base=000000000a000000 len=00000000be69b000 attr=01 SMAP type=03 base=00000000c869b000 len=0000000000016000 attr=01 SMAP type=01 base=00000000c86b1000 len=00000000124e7000 attr=01 SMAP type=02 base=00000000dab98000 len=0000000000138000 attr=01 SMAP type=03 base=00000000dacd0000 len=0000000000008000 attr=01 SMAP type=01 base=00000000dacd8000 len=0000000000100000 attr=01 SMAP type=04 base=00000000dadd8000 len=00000000003b3000 attr=01 SMAP type=02 base=00000000db18b000 len=0000000000d42000 attr=01 SMAP type=01 base=00000000dbecd000 len=0000000002133000 attr=01 SMAP type=01 base=0000000100000000 len=000000011f380000 attr=01 SMAP type=02 base=00000000de000000 len=0000000002000000 attr=01 SMAP type=02 base=00000000f8000000 len=0000000004000000 attr=01 SMAP type=02 base=00000000fdf00000 len=0000000000100000 attr=01 SMAP type=02 base=00000000fea00000 len=0000000000010000 attr=01 SMAP type=02 base=00000000feb80000 len=0000000000082000 attr=01 SMAP type=02 base=00000000fec10000 len=0000000000001000 attr=01 SMAP type=02 base=00000000fec30000 len=0000000000001000 attr=01 SMAP type=02 base=00000000fed00000 len=0000000000001000 attr=01 SMAP type=02 base=00000000fed40000 len=0000000000005000 attr=01 SMAP type=02 base=00000000fed80000 len=0000000000010000 attr=01 SMAP type=02 base=00000000fedc2000 len=000000000000e000 attr=01 SMAP type=02 base=00000000fedd4000 len=0000000000002000 attr=01 SMAP type=02 base=00000000fee00000 len=0000000000100000 attr=01 SMAP type=02 base=00000000ff000000 len=0000000001000000 attr=01 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D12368 Modified: head/sys/boot/i386/libi386/biosmem.c Modified: head/sys/boot/i386/libi386/biosmem.c ============================================================================== --- head/sys/boot/i386/libi386/biosmem.c Mon Sep 18 13:39:51 2017 (r323706) +++ head/sys/boot/i386/libi386/biosmem.c Mon Sep 18 15:17:01 2017 (r323707) @@ -125,7 +125,7 @@ bios_getmem(void) } /* - * Look for the largest segment in 'extended' memory beyond + * Look for the highest segment in 'extended' memory beyond * 1MB but below 4GB. */ if ((smap.type == SMAP_TYPE_MEMORY) && @@ -140,9 +140,13 @@ bios_getmem(void) if (smap.base + size > 0x100000000ull) size = 0x100000000ull - smap.base; - if (size > high_heap_size) { - high_heap_size = size; - high_heap_base = smap.base; + /* + * To make maximum space for the kernel and the modules, + * set heap to use highest HEAP_MIN bytes below 4GB. + */ + if (high_heap_base < smap.base && size >= HEAP_MIN) { + high_heap_base = smap.base + size - HEAP_MIN; + high_heap_size = HEAP_MIN; } } } while (v86.ebx != 0); @@ -203,7 +207,11 @@ bios_getmem(void) } /* Set memtop to actual top of memory */ - memtop = memtop_copyin = 0x100000 + bios_extmem; + if (high_heap_size != 0) { + memtop = memtop_copyin = high_heap_base; + } else { + memtop = memtop_copyin = 0x100000 + bios_extmem; + } /* * If we have extended memory and did not find a suitable heap @@ -213,6 +221,7 @@ bios_getmem(void) if (bios_extmem >= HEAP_MIN && high_heap_size < HEAP_MIN) { high_heap_size = HEAP_MIN; high_heap_base = memtop - HEAP_MIN; + memtop = memtop_copyin = high_heap_base; } } From owner-svn-src-all@freebsd.org Mon Sep 18 15:17: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 015FDE17618; Mon, 18 Sep 2017 15:17:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBD186D659; Mon, 18 Sep 2017 15:17:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IFH7No001801; Mon, 18 Sep 2017 15:17:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IFH7Ij001797; Mon, 18 Sep 2017 15:17:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709181517.v8IFH7Ij001797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 18 Sep 2017 15:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323708 - in stable/10/release/doc: en_US.ISO8859-1/errata share/xml X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/10/release/doc: en_US.ISO8859-1/errata share/xml X-SVN-Commit-Revision: 323708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:17:09 -0000 Author: gjb Date: Mon Sep 18 15:17:07 2017 New Revision: 323708 URL: https://svnweb.freebsd.org/changeset/base/323708 Log: - Prune stale entries from 10.3-RELEASE. - Prune entries from errata.xml and security.xml. - Update versions to reflect 10.4-RELEASE. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/release.ent stable/10/release/doc/share/xml/security.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Sep 18 15:17:01 2017 (r323707) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Mon Sep 18 15:17:07 2017 (r323708) @@ -46,7 +46,8 @@ &os;. This errata document for &os; &release.prev; will be - maintained until the release of &os; &release.next;. + maintained until &os; &release.prev; reaches + end-of-life. @@ -236,28 +237,6 @@ boot - An issue was discovered where the &man.netstat.1; - -s option will cause a segmentation fault - on systems with IPSEC compiled into the - kernel. The issue was resolved in the - stable/10 branch, and an Errata Notice is - planned after &release.prev; is released. - - [2015-08-19] Resolved as FreeBSD-EN-15:12. - - - - An issue was discovered that causes &man.make.1; to - generate noisy output when doing source-based upgrades from - &os; 9.3 and earlier. The issue was reported in PR 202277, - and after investigation and determining the issue does not - cause source-based upgrades to fail, a post-release Errata - Notice is planned. - - [2015-08-19] Resolved as FreeBSD-EN-15:11. - - - An issue with &os; virtual machines with vagrant was discovered that affects the VirtualBox where the @@ -272,17 +251,6 @@ boot invocation of vagrant up will allow the virtual machine to successfully boot, allowing access via vagrant ssh. - - - - [2015-08-16] An error was discovered in the release - notes for &os; &release.prev; regarding the - drm device driver. The entry for r282199 - states the driver was updated to match the version &linux; - 3.8.13 version, however the entry should have noted the - change affects device-independent code, and does not bring - the drm driver fully in line with the - stated &linux; version. Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Mon Sep 18 15:17:01 2017 (r323707) +++ stable/10/release/doc/share/xml/errata.xml Mon Sep 18 15:17:07 2017 (r323708) @@ -19,128 +19,9 @@ - FreeBSD-EN-16:06.libc - 4 May 2016 - Performance regression in libc - &man.hash.3; - - - - FreeBSD-EN-16:07.ipi - 4 May 2016 - Excessive latency in x86 IPI - delivery - - - - FreeBSD-EN-16:08.zfs - 4 May 2016 - Memory leak in ZFS - - - - FreeBSD-EN-16:09.freebsd-update - 25 July 2016 - Fix &man.freebsd-update.8; support of - &os; 11.0-RELEASE - - - - FreeBSD-EN-16:10.dhclient - 11 August 2016 - Better handle unknown options received from - aDHCP server - - - - FreeBSD-EN-16:11.vmbus - 11 August 2016 - Avoid using spin locks for channel message - locks - - - - FreeBSD-EN-16:12.hv_storvsc - 11 August 2016 - Enable INQUIRY result check only on - Windows 10 host systems - - - - FreeBSD-EN-16:13.vmbus - 11 August 2016 - Register time counter early enough for TSC freq - calibration - - - - FreeBSD-EN-16:14.hv_storvsc - 11 August 2016 - Disable incorrect callout in - &man.hv.storvsc.4; - - - - FreeBSD-EN-16:15.vmbus - 11 August 2016 - Better handle the GPADL setup failure in - Hyper-V - - - - FreeBSD-EN-16:16.hv_storvsc - 11 August 2016 - Fix SCSI INQUIRY checks and error - handling - - - - FreeBSD-EN-16:17.vm - 25 October 2016 - Several virtual memory issues - - - - FreeBSD-EN-16:19.tzcode - 6 December 2016 - Fix warnings about invalid timezone - abbreviations - - - - FreeBSD-EN-16:20.tzdata - 6 December 2016 - Update timezone database - information - - - - FreeBSD-EN-17:05.xen - 23 February 2017 - Xen migration enhancements - - - - FreeBSD-EN-17:06.hyperv - 12 July 2017 - Boot compatibility improvements with - Azure virtual machines + No notices. +   +   Modified: stable/10/release/doc/share/xml/release.ent ============================================================================== --- stable/10/release/doc/share/xml/release.ent Mon Sep 18 15:17:01 2017 (r323707) +++ stable/10/release/doc/share/xml/release.ent Mon Sep 18 15:17:07 2017 (r323708) @@ -6,23 +6,23 @@ - + - + - + - + - + @@ -38,8 +38,8 @@ - - + + - FreeBSD-SA-16:09.ntp - 29 April 2016 - Multiple ntp - vulnerabilities. - - - - FreeBSD-SA-16:17.openssl - 29 April 2016 - Multiple OpenSSL - vulnerabilities. - - - - FreeBSD-SA-16:18.atkbd - 17 May 2016 - Keyboard driver buffer overflow - - - - FreeBSD-SA-16:19.sendmsg - 17 May 2016 - Incorrect argument handling in - &man.sendmsg.2; - - - - FreeBSD-SA-16:20.linux - 31 May 2016 - Kernel stack disclosure in Linux compatibility - layer - - - - FreeBSD-SA-16:21.43bsd - 31 May 2016 - Kernel stack disclosure in 4.3BSD compatibility - layer - - - - FreeBSD-SA-16:22.libarchive - 31 May 2016 - Absolute path traversal - vulnerability - - - - FreeBSD-SA-16:23.libarchive - 31 May 2016 - Absolute path traversal - vulnerability - - - - FreeBSD-SA-16:24.ntp - 3 June 2016 - Multiple ntp - vulnerabilties - - - - FreeBSD-SA-16:25.bspatch - 25 July 2016 - heap overflow vulnerability - - - - FreeBSD-SA-16:26.openssl - 23 September 2016 - Multiple vulnerabilities - - - - FreeBSD-SA-16:27.openssl - 26 September 2016 - Regression in OpenSSL - suite - - - - FreeBSD-SA-16:29.bspatch - 10 October 2016 - Heap overflow vulnerability - - - - FreeBSD-SA-16:30.portsnap - 10 October 2016 - Multiple vulnerabilities - - - - FreeBSD-SA-16:31.libarchive - 10 October 2016 - Multiple vulnerabilities - - - - FreeBSD-SA-16:33.openssh - 2 November 2016 - Remote Denial of Service - vulnerability - - - - FreeBSD-SA-16:35.openssl - 2 November 2016 - Remote Denial of Service - vulnerability - - - - FreeBSD-SA-16:36.telnetd - 6 December 2016 - Possible &man.login.1; argument - injection - - - - FreeBSD-SA-16:37.libc - 6 December 2016 - &man.link.ntoa.3; buffer overflow - - - - FreeBSD-SA-16:38.bhyve - 6 December 2016 - Possible escape from &man.bhyve.8; virtual - machine - - - - FreeBSD-SA-16:39.ntp - 22 December 2016 - Multiple vulnerabilities - - - - FreeBSD-SA-17:01.openssh - 10 January 2017 - Multiple vulnerabilities - - - - FreeBSD-SA-17:02.openssl - 23 February 2017 - Fix OpenSSL RC4_MD5 cipher - vulnerability - - - - FreeBSD-SA-17:03.ntp - 12 April 2017 - Multiple vulnerabilities - - - - FreeBSD-SA-17:04.ipfilter - 27 April 2017 - Fix fragment handling panic - - - - FreeBSD-SA-17:05.heimdal - 12 July 2017 - Fix KDC-REP service name validation - vulnerability + No advisories. +   +   From owner-svn-src-all@freebsd.org Mon Sep 18 16:29:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21214E1CB8A; Mon, 18 Sep 2017 16:29:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.161.172]) (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 DA92270726; Mon, 18 Sep 2017 16:29:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yw0-f172.google.com with SMTP id u11so727254ywh.7; Mon, 18 Sep 2017 09:29:35 -0700 (PDT) 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=onXPYrabmc2/opTMNq09CTP23xkm3OjokE2eHwEcuv0=; b=R1V6SS4MsPVrbavGdu1kg0nnBorFSpWmeW7DWnBkzgyQdtEIezHCQmlxRC+mQaIt21 ykgJVTPvEaVBDJZUB6Ok4DxfgRebnokmPEV45IF9u/zL6Tm2rUAEDCpYSjRq7z2SndUF +4bM+nsghOYVpBW+Br9C6/dq8AdiwKEHOBOE/yN1eAAz30RN3Ah/+kj0pA557ivnedbM wybzsbms1N+ZfBOXd9SqgylBCYwBhL3AdWv31XX64djUu+naMNjj9k52+mcgi0izX+xF 4MqjcFzACqTFgQ4ZDNAH563NALP5g8aQexnwxcSXUQfANLJ1E/kLBwbinXoiRGvBsGUh oyJQ== X-Gm-Message-State: AHPjjUgcweRlc28CVHr4dfDrAnVEvkOocOHCDFXp9Dvz+8Ofew5asR34 OXFmW/YiCeJaAMt0DRc= X-Received: by 10.37.111.135 with SMTP id k129mr13982203ybc.74.1505750853318; Mon, 18 Sep 2017 09:07:33 -0700 (PDT) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com. [209.85.223.170]) by smtp.gmail.com with ESMTPSA id z77sm3138693ywd.31.2017.09.18.09.07.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 09:07:33 -0700 (PDT) Received: by mail-io0-f170.google.com with SMTP id z187so3277508ioz.12; Mon, 18 Sep 2017 09:07:33 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCtRHFpv8So2jOm1WJkZbUgiLITXeiWsi6nMFq1+6Jvu3p5FCq6gfAytPOV7j0cZGSd8c4JboE/d2P0h7VdJ+I= X-Received: by 10.107.97.5 with SMTP id v5mr19967780iob.174.1505750852753; Mon, 18 Sep 2017 09:07:32 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.81.131 with HTTP; Mon, 18 Sep 2017 09:07:32 -0700 (PDT) In-Reply-To: <7527afaa-c983-a2dd-6a1c-a20bb1d03d7a@selasky.org> References: <201709172340.v8HNeGuP016998@repo.freebsd.org> <7527afaa-c983-a2dd-6a1c-a20bb1d03d7a@selasky.org> From: Conrad Meyer Date: Mon, 18 Sep 2017 09:07:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Hans Petter Selasky Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 16:29:36 -0000 This was not introduced in this change. On Mon, Sep 18, 2017 at 8:05 AM, Hans Petter Selasky wrote: > On 09/18/17 01:40, Conrad Meyer wrote: >> >> device_get_children(dev, &children, &nchildren); >> for (i = 0; i < nchildren; i++) { >> if (children[i]) >> - linsysfs_run_bus(children[i], dir, scsi, new_path, >> prefix); >> + linsysfs_run_bus(children[i], dir, scsi, chardev, >> new_path, prefix); >> } >> if (new_path != path) >> free(new_path, M_TEMP); >> + free(chardevname, M_TEMP); >> return (1); > > > 1) Return code from device_get_children() should be checked. > > 2) children pointer should be freed else there is a memory leak. > > --HPS From owner-svn-src-all@freebsd.org Mon Sep 18 16:42: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 10A1FE1DA1F; Mon, 18 Sep 2017 16:42:15 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3CCC70F18; Mon, 18 Sep 2017 16:42:14 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IGgEM9039219; Mon, 18 Sep 2017 16:42:14 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IGgEpF039218; Mon, 18 Sep 2017 16:42:14 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709181642.v8IGgEpF039218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Mon, 18 Sep 2017 16:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323709 - head/usr.sbin/tcpdump/tcpdump X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: head/usr.sbin/tcpdump/tcpdump X-SVN-Commit-Revision: 323709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 16:42:15 -0000 Author: gordon Date: Mon Sep 18 16:42:13 2017 New Revision: 323709 URL: https://svnweb.freebsd.org/changeset/base/323709 Log: Revert tcpdump to using the source manpage instead of having a copy here. This helps future maintainability of tcpdump so we don't forget to update the manpage (like we have previously). Stolen from: usr.bin/file/Makefile Reviewed by: jilles Approved by: delphij (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D12403 Deleted: head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Modified: head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Mon Sep 18 15:17:07 2017 (r323708) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Mon Sep 18 16:42:13 2017 (r323709) @@ -173,7 +173,7 @@ SRCS= addrtoname.c \ tcpdump.c \ util-print.c \ version.c -CLEANFILES+= version.c +CLEANFILES+= version.c ${MAN} CFLAGS+= -I${.CURDIR} -I${TCPDUMP_DISTDIR} CFLAGS+= -DHAVE_CONFIG_H @@ -210,3 +210,9 @@ version.c: ${TCPDUMP_DISTDIR}/VERSION > version.c .include + +.for mp in ${MAN} +${mp}: ${mp}.in + sed -e 's/@MAN_MISC_INFO@/7/g' -e 's/@MAN_FILE_FORMATS@/5/g' \ + ${.ALLSRC} > ${.TARGET} +.endfor From owner-svn-src-all@freebsd.org Mon Sep 18 16:54: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 78269E1E586; Mon, 18 Sep 2017 16:54:15 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (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 2F4BF71741; Mon, 18 Sep 2017 16:54:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id tzJ7dYGvCDJTWtzJ8dAth7; Mon, 18 Sep 2017 10:54:07 -0600 X-Authority-Analysis: v=2.2 cv=B4DJ6KlM c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=2JCJgTwv5E4A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=pSCgvsbptnqMfPoRQk0A:9 a=QEXdDO2ut3YA:10 a=hSUpV7hDpKOlQw-o2Q8A:9 a=vtgsAvVPlfX4ugVk:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [10.168.3.99] (S0106d4ca6d8943b0.gv.shawcable.net [24.68.134.59]) by spqr.komquats.com (Postfix) with ESMTPSA id 2A7413D5; Mon, 18 Sep 2017 09:54:05 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r323709 - head/usr.sbin/tcpdump/tcpdump Date: Mon, 18 Sep 2017 09:54:07 -0700 To: Gordon Tetlow , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20170918165405.2A7413D5@spqr.komquats.com> X-CMAE-Envelope: MS4wfFr7iRxSeY5Tu8/6qsdYDtK+DcbVwb+ms1DvDIpIS4YL89f7E5mBlh041X0l3BP//7n6bsAVZVHIyH8Kmv0JKzPi8nGXTA5nQ6W40QuuJB1/p1qbcbi7 Un0Qoo6KifYWZextYtO5iDrXG1CuYpzeVYrNzUS1u4ejdHa+L2DalaMfOmrLD/LxYwK7wGW7Q1rm7jXt+YmbPS8k74MgsoUzSVnLlsqzDaiqF+eRnobusl8q bKhnsXK7sxFiHSiOMcwGsKF/JEL0nRh2viYEURHITN+A8Nmbcdx0EfJuX7zbjXjF Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 16:54:15 -0000 Thank you. Sent using a tiny phone keyboard. Apologies for any typos. Cy Schubert or -----Original Message----- From: Gordon Tetlow Sent: 18/09/2017 09:42 To: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: svn commit: r323709 - head/usr.sbin/tcpdump/tcpdump Author: gordon Date: Mon Sep 18 16:42:13 2017 New Revision: 323709 URL: https://svnweb.freebsd.org/changeset/base/323709 Log: Revert tcpdump to using the source manpage instead of having a copy here. =20 This helps future maintainability of tcpdump so we don't forget to update the manpage (like we have previously). =20 Stolen from: usr.bin/file/Makefile Reviewed by: jilles Approved by: delphij (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D12403 Deleted: head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Modified: head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/usr.sbin/tcpdump/tcpdump/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/usr.sbin/tcpdump/tcpdump/Makefile Mon Sep 18 15:17:07 2017 (r32370= 8) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Mon Sep 18 16:42:13 2017 (r32370= 9) @@ -173,7 +173,7 @@ SRCS=3D addrtoname.c \ tcpdump.c \ util-print.c \ version.c -CLEANFILES+=3D version.c +CLEANFILES+=3D version.c ${MAN} =20 CFLAGS+=3D -I${.CURDIR} -I${TCPDUMP_DISTDIR} CFLAGS+=3D -DHAVE_CONFIG_H @@ -210,3 +210,9 @@ version.c: ${TCPDUMP_DISTDIR}/VERSION > version.c =20 .include + +.for mp in ${MAN} +${mp}: ${mp}.in + sed -e 's/@MAN_MISC_INFO@/7/g' -e 's/@MAN_FILE_FORMATS@/5/g' \ + ${.ALLSRC} > ${.TARGET} +.endfor From owner-svn-src-all@freebsd.org Mon Sep 18 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 62DFEE1FA2E; Mon, 18 Sep 2017 17:14:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30858721D8; Mon, 18 Sep 2017 17:14:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IHEDZ2051499; Mon, 18 Sep 2017 17:14:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IHEDeE051497; Mon, 18 Sep 2017 17:14:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709181714.v8IHEDeE051497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 18 Sep 2017 17:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323710 - head/sys/compat/linsysfs X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/compat/linsysfs X-SVN-Commit-Revision: 323710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 17:14:14 -0000 Author: cem Date: Mon Sep 18 17:14:13 2017 New Revision: 323710 URL: https://svnweb.freebsd.org/changeset/base/323710 Log: linsysfs(5): Fix two unrelated issues 1. Swap the order of device_get_ivars with device_get_devclass and devclass name validation. This bug was introduced in r323692. 2. Error check device_get_children and free the returned list. This bug was introduced in the original linsysfs commit. Reported by: Oleg V. Nauman , hselasky (1); hselasky (2) Reviewed by: hselasky Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12407 Modified: head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Mon Sep 18 16:42:13 2017 (r323709) +++ head/sys/compat/linsysfs/linsysfs.c Mon Sep 18 17:14:13 2017 (r323710) @@ -252,7 +252,7 @@ linsysfs_run_bus(device_t dev, struct pfs_node *dir, s { struct scsi_host_queue *scsi_host; struct pfs_node *sub_dir, *cur_file, *cur_chardev; - int i, nchildren; + int i, nchildren, error; device_t *children, parent; devclass_t devclass; const char *name = NULL; @@ -353,13 +353,15 @@ linsysfs_run_bus(device_t dev, struct pfs_node *dir, s } } - dinfo = device_get_ivars(parent); - if (dinfo != NULL && dinfo->cfg.baseclass == PCIC_DISPLAY) { - devclass = device_get_devclass(dev); - if (devclass != NULL) - name = devclass_get_name(devclass); - if (name != NULL && strcmp(name, DRMN_DEV) == 0 && - device_get_unit(dev) >= 0) { + devclass = device_get_devclass(dev); + if (devclass != NULL) + name = devclass_get_name(devclass); + else + name = NULL; + if (name != NULL && strcmp(name, DRMN_DEV) == 0 && + device_get_unit(dev) >= 0) { + dinfo = device_get_ivars(parent); + if (dinfo != NULL && dinfo->cfg.baseclass == PCIC_DISPLAY) { sprintf(chardevname, "226:%d", device_get_unit(dev)); cur_chardev = pfs_create_dir(chardev, @@ -376,10 +378,13 @@ linsysfs_run_bus(device_t dev, struct pfs_node *dir, s } } - device_get_children(dev, &children, &nchildren); - for (i = 0; i < nchildren; i++) { - if (children[i]) - linsysfs_run_bus(children[i], dir, scsi, chardev, new_path, prefix); + error = device_get_children(dev, &children, &nchildren); + if (error == 0) { + for (i = 0; i < nchildren; i++) + if (children[i]) + linsysfs_run_bus(children[i], dir, scsi, + chardev, new_path, prefix); + free(children, M_TEMP); } if (new_path != path) free(new_path, M_TEMP); From owner-svn-src-all@freebsd.org Mon Sep 18 17:26: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 CB70EE20614; Mon, 18 Sep 2017 17:26:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98B507288E; Mon, 18 Sep 2017 17:26:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IHQlX8056065; Mon, 18 Sep 2017 17:26:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IHQldH056064; Mon, 18 Sep 2017 17:26:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709181726.v8IHQldH056064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 18 Sep 2017 17:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323711 - releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 323711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 17:26:48 -0000 Author: gjb Date: Mon Sep 18 17:26:47 2017 New Revision: 323711 URL: https://svnweb.freebsd.org/changeset/base/323711 Log: Document r313433, bsdinstall(8) 4096k alignment on new partitions. Document r318430, ifconfig(8) reports persistent NIC MAC addresses. Submitted by: rpokala Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 18 17:14:13 2017 (r323710) +++ releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 18 17:26:47 2017 (r323711) @@ -198,6 +198,14 @@ added, providing command-line access to features and debugging facilities of &man.cxgbe.4; devices. + The &man.ifconfig.8; utility has been + updated to persistently store the hardware + MAC addres of an interface. This provides + a mechanism through which the original MAC + address can be retrieved if, for example, an interface is + added to a &man.lagg.4; and the MAC is + overridden in &man.rc.conf.5;. + The &man.rcp.1;, &man.rlogin.1;, &man.rsh.1;, &man.rlogind.8;, and &man.rshd.8; utilities have been marked as deprecated, and planned for removal in @@ -274,6 +282,10 @@ Installation and Configuration Tools + + The &man.bsdinstall.8; utility has been + updated to ensure newly-created partitions are properly + aligned at 4096k boundaries. The default EFI partition created by From owner-svn-src-all@freebsd.org Mon Sep 18 17:43:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE559E21776; Mon, 18 Sep 2017 17:43:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) (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 9657A733E8; Mon, 18 Sep 2017 17:43:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pf0-f176.google.com with SMTP id u12so597618pfl.4; Mon, 18 Sep 2017 10:43:09 -0700 (PDT) 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=NcAV6Z5RBmy9oX5kaMrU785w0nSFZYikIGRi4OjbwCU=; b=QzwyHoTK7ua43cmtsBvJ0oDlsfetuAB1tPeYoApghpNx8P1WNoVFEyGmHCiA+x3lpf 4qXghyqrvkDfT2SS2UfOH0RDKATeGnkkLOJ8jLcHgTft9gXHxeykCIe+cvaqpROX0KiT 4kZ5bsEQY1jQn8rBbhDFajXWhC/SlmAOZI42yRVG1LlLYKYe+2LjNKeqgbSn77T+OP3P A2AiBNAjC+4FcvPvrFKllbhIoSsXUhAufKyb1RCWMFNlg3oa1dLUzF3LOYDooSqB91Wb KsqSzmkxY8HRgWh+pnX4cfaekWFtcF1Z2ykWYtuJSEfSFUKt64hgqsZ2bzlhywns7DSi zHGg== X-Gm-Message-State: AHPjjUhtKHhj80rrlapJzE9NUptlB8A3H1fYQuiW4iEjChOweR/vOD9f vtLK0GEqfDyiV4OX/5o= X-Received: by 10.84.232.14 with SMTP id h14mr36694553plk.274.1505756583248; Mon, 18 Sep 2017 10:43:03 -0700 (PDT) Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com. [74.125.83.44]) by smtp.gmail.com with ESMTPSA id f69sm1666pff.4.2017.09.18.10.43.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 10:43:02 -0700 (PDT) Received: by mail-pg0-f44.google.com with SMTP id 188so527649pgb.2; Mon, 18 Sep 2017 10:43:02 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7Rniq3AQcjYlNCLIklDbWhKGxqAA9KsMA59ZRYHg2gkiaAHSfKXYD9OBTERNdYV0133825iHNWF1HSEO0PXSo= X-Received: by 10.84.133.11 with SMTP id 11mr36865739plf.13.1505756582198; Mon, 18 Sep 2017 10:43:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.207.193 with HTTP; Mon, 18 Sep 2017 10:43:01 -0700 (PDT) In-Reply-To: <201709172340.v8HNeGuP016998@repo.freebsd.org> References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Ryan Libby Date: Mon, 18 Sep 2017 10:43:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 17:43:09 -0000 On Sun, Sep 17, 2017 at 4:40 PM, Conrad Meyer wrote: > Author: cem > Date: Sun Sep 17 23:40:16 2017 > New Revision: 323692 > URL: https://svnweb.freebsd.org/changeset/base/323692 > > Log: > linsysfs(5): Add support for recent libdrm > > Expose more information about PCI devices (and GPUs in particular) via > linsysfs to libdrm. > > This allows unmodified modern 64-bit Linux libdrm to work, which allows > modern Linux Mesa to work. The submitter reports that he tested the change > with an Ubuntu 16.04 chroot + amdgpu from graphics/drm-next-kmod. > > PR: 222375 > Submitted by: Greg V > > Modified: > head/sys/compat/linsysfs/linsysfs.c > head/sys/compat/linux/linux_util.c > > Modified: head/sys/compat/linsysfs/linsysfs.c > ============================================================================== > --- head/sys/compat/linsysfs/linsysfs.c Sun Sep 17 22:58:13 2017 (r323691) > +++ head/sys/compat/linsysfs/linsysfs.c Sun Sep 17 23:40:16 2017 (r323692) > @@ -133,20 +133,135 @@ linsysfs_link_scsi_host(PFS_FILL_ARGS) > return (0); > } > > +static int > +linsysfs_fill_data(PFS_FILL_ARGS) > +{ > + sbuf_printf(sb, "%s", pn->pn_data); > + return (0); > +} This broke the gcc build with -Wformat [1]: /workspace/src/sys/compat/linsysfs/linsysfs.c: In function 'linsysfs_fill_data': /workspace/src/sys/compat/linsysfs/linsysfs.c:139:20: error: format '%s' expects argument of type 'char *', but argument 3 has type 'void *' [-Werror=format=] sbuf_printf(sb, "%s", pn->pn_data); It builds if a char * cast is added. Is that the right fix? [1] https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/2532/ From owner-svn-src-all@freebsd.org Mon Sep 18 18:42: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 943F9E25356; Mon, 18 Sep 2017 18:42:29 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57DEF75FD0; Mon, 18 Sep 2017 18:42:29 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IIgSaq095807; Mon, 18 Sep 2017 18:42:28 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IIgSIE095806; Mon, 18 Sep 2017 18:42:28 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709181842.v8IIgSIE095806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 18 Sep 2017 18:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323712 - head/sys/dev/ppc X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/dev/ppc X-SVN-Commit-Revision: 323712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 18:42:29 -0000 Author: scottl Date: Mon Sep 18 18:42:28 2017 New Revision: 323712 URL: https://svnweb.freebsd.org/changeset/base/323712 Log: Hide a normal probe warning message under bootverbose, similar to atkbdc Sponsored by: Netflix Modified: head/sys/dev/ppc/ppc.c Modified: head/sys/dev/ppc/ppc.c ============================================================================== --- head/sys/dev/ppc/ppc.c Mon Sep 18 17:26:47 2017 (r323711) +++ head/sys/dev/ppc/ppc.c Mon Sep 18 18:42:28 2017 (r323712) @@ -1720,7 +1720,8 @@ ppc_probe(device_t dev, int rid) if (bootverbose) device_printf(dev, "using normal I/O port range\n"); } else { - device_printf(dev, "cannot reserve I/O port range\n"); + if (bootverbose) + device_printf(dev, "cannot reserve I/O port range\n"); goto error; } } From owner-svn-src-all@freebsd.org Mon Sep 18 19:09: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 2FF79E26C50; Mon, 18 Sep 2017 19:09:41 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F25ED772CF; Mon, 18 Sep 2017 19:09:40 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IJ9eRj004835; Mon, 18 Sep 2017 19:09:40 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IJ9eYK004834; Mon, 18 Sep 2017 19:09:40 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709181909.v8IJ9eYK004834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 19:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323714 - head/sys/compat/linsysfs X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/compat/linsysfs X-SVN-Commit-Revision: 323714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 19:09:41 -0000 Author: rlibby Date: Mon Sep 18 19:09:40 2017 New Revision: 323714 URL: https://svnweb.freebsd.org/changeset/base/323714 Log: linsysfs: quiet gcc -Wformat after r323692 Reviewed by: cem Sponsored by: Dell EMC Isilon Modified: head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Mon Sep 18 18:44:45 2017 (r323713) +++ head/sys/compat/linsysfs/linsysfs.c Mon Sep 18 19:09:40 2017 (r323714) @@ -136,7 +136,7 @@ linsysfs_link_scsi_host(PFS_FILL_ARGS) static int linsysfs_fill_data(PFS_FILL_ARGS) { - sbuf_printf(sb, "%s", pn->pn_data); + sbuf_printf(sb, "%s", (char *)pn->pn_data); return (0); } From owner-svn-src-all@freebsd.org Mon Sep 18 19:16: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 E6D69E003AE; Mon, 18 Sep 2017 19:16:42 +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 B4AEF778ED; Mon, 18 Sep 2017 19:16:42 +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 v8IJGfLe008864; Mon, 18 Sep 2017 19:16:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IJGfcP008863; Mon, 18 Sep 2017 19:16:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709181916.v8IJGfcP008863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 19:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323715 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 19:16:43 -0000 Author: cy Date: Mon Sep 18 19:16:41 2017 New Revision: 323715 URL: https://svnweb.freebsd.org/changeset/base/323715 Log: Don't use an apostrophe in a possesive pronoun. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 19:09:40 2017 (r323714) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Mon Sep 18 19:16:41 2017 (r323715) @@ -1449,7 +1449,7 @@ ipf_state_add(softc, fin, stsave, flags) is->is_die = 1 + softc->ipf_ticks; /* * We want to check everything that is a property of this packet, - * but we don't (automatically) care about it's fragment status as + * but we don't (automatically) care about its fragment status as * this may change. */ is->is_pass = pass; From owner-svn-src-all@freebsd.org Mon Sep 18 19:52: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 774E5E02727 for ; Mon, 18 Sep 2017 19:52:44 +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 598587D1A3 for ; Mon, 18 Sep 2017 19:52:44 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: eac81974-9caa-11e7-a937-4f970e858fdb 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 eac81974-9caa-11e7-a937-4f970e858fdb; Mon, 18 Sep 2017 19:52:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v8IJqZuu008641; Mon, 18 Sep 2017 13:52:35 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1505764355.60200.63.camel@freebsd.org> Subject: Re: svn commit: r323715 - head/sys/contrib/ipfilter/netinet From: Ian Lepore To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 18 Sep 2017 13:52:35 -0600 In-Reply-To: <201709181916.v8IJGfcP008863@repo.freebsd.org> References: <201709181916.v8IJGfcP008863@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: Mon, 18 Sep 2017 19:52:44 -0000 On Mon, 2017-09-18 at 19:16 +0000, Cy Schubert wrote: > Author: cy > Date: Mon Sep 18 19:16:41 2017 > New Revision: 323715 > URL: https://svnweb.freebsd.org/changeset/base/323715 > > Log: >   Don't use an apostrophe in a possesive pronoun. >    And that really is the way to remember it for those who struggle: yours, theirs, his, hers, its... none of the possesive pronouns that end in s use an apostrophe. -- Ian (only mildly obsessed with apostrophe abuse) From owner-svn-src-all@freebsd.org Mon Sep 18 19:56:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D467DE02BC5; Mon, 18 Sep 2017 19:56:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0E987D501; Mon, 18 Sep 2017 19:56:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IJu56d025731; Mon, 18 Sep 2017 19:56:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IJu5Co025730; Mon, 18 Sep 2017 19:56:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709181956.v8IJu5Co025730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 18 Sep 2017 19:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323716 - releng/10.4/release/doc/en_US.ISO8859-1 X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/doc/en_US.ISO8859-1 X-SVN-Commit-Revision: 323716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 19:56:06 -0000 Author: gjb Date: Mon Sep 18 19:56:05 2017 New Revision: 323716 URL: https://svnweb.freebsd.org/changeset/base/323716 Log: Reconnect errata.html back to the build, accidentally removed as part of r323618. This directory needs to be included, as it is used by the 'reldoc' target of release/Makefile. Approved by: re (implicit, relnotes-related) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/doc/en_US.ISO8859-1/Makefile Modified: releng/10.4/release/doc/en_US.ISO8859-1/Makefile ============================================================================== --- releng/10.4/release/doc/en_US.ISO8859-1/Makefile Mon Sep 18 19:16:41 2017 (r323715) +++ releng/10.4/release/doc/en_US.ISO8859-1/Makefile Mon Sep 18 19:56:05 2017 (r323716) @@ -3,6 +3,7 @@ RELN_ROOT?= ${.CURDIR}/.. SUBDIR = relnotes +SUBDIR+= errata SUBDIR+= hardware SUBDIR+= installation SUBDIR+= readme From owner-svn-src-all@freebsd.org Mon Sep 18 20:01: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 024A3E03429; Mon, 18 Sep 2017 20:01:04 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABD547D8A3; Mon, 18 Sep 2017 20:01:03 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK12Ni027405; Mon, 18 Sep 2017 20:01:02 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK11ua027395; Mon, 18 Sep 2017 20:01:01 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709182001.v8IK11ua027395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Mon, 18 Sep 2017 20:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323717 - head/usr.bin/sdiotool X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/usr.bin/sdiotool X-SVN-Commit-Revision: 323717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:01:04 -0000 Author: kibab Date: Mon Sep 18 20:01:01 2017 New Revision: 323717 URL: https://svnweb.freebsd.org/changeset/base/323717 Log: Make basic Broadcom I/O space reading functions work It's now possible to use Broadcom functions to read the I/O registers of SDIO card. The functions were copied from the BSD-licensed Broadcom Linux driver as-is. To make it possible, a small Linux compatibility layer was introduced. Currently the card responds with the correct version number ("magic") when reading the corresponding address. Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12111 Added: head/usr.bin/sdiotool/brcmfmac_bus.h (contents, props changed) head/usr.bin/sdiotool/brcmfmac_sdio.h (contents, props changed) head/usr.bin/sdiotool/cam_sdio.c (contents, props changed) head/usr.bin/sdiotool/cam_sdio.h (contents, props changed) head/usr.bin/sdiotool/linux_compat.h (contents, props changed) head/usr.bin/sdiotool/linux_sdio_compat.c (contents, props changed) head/usr.bin/sdiotool/linux_sdio_compat.h (contents, props changed) Modified: head/usr.bin/sdiotool/Makefile head/usr.bin/sdiotool/sdiotool.c Modified: head/usr.bin/sdiotool/Makefile ============================================================================== --- head/usr.bin/sdiotool/Makefile Mon Sep 18 19:56:05 2017 (r323716) +++ head/usr.bin/sdiotool/Makefile Mon Sep 18 20:01:01 2017 (r323717) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= sdiotool -SRCS= sdiotool.c +SRCS= sdiotool.c cam_sdio.c linux_sdio_compat.c LIBADD= cam util MAN= Added: head/usr.bin/sdiotool/brcmfmac_bus.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/brcmfmac_bus.h Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010 Broadcom Corporation + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND 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. + * + * $FreeBSD$ + */ +/* The level of bus communication with the dongle */ +enum brcmf_bus_state { + BRCMF_BUS_DOWN, /* Not ready for frame transfers */ + BRCMF_BUS_UP /* Ready for frame transfers */ +}; + +struct brcmf_bus { + enum brcmf_bus_state state; +}; Added: head/usr.bin/sdiotool/brcmfmac_sdio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/brcmfmac_sdio.h Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2010 Broadcom Corporation + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND 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. + * + * $FreeBSD$ + */ +#define SDIO_FUNC_0 0 +#define SDIO_FUNC_1 1 +#define SDIO_FUNC_2 2 + +#define SDIOD_FBR_SIZE 0x100 + +/* io_en */ +#define SDIO_FUNC_ENABLE_1 0x02 +#define SDIO_FUNC_ENABLE_2 0x04 + +/* io_rdys */ +#define SDIO_FUNC_READY_1 0x02 +#define SDIO_FUNC_READY_2 0x04 + +/* intr_status */ +#define INTR_STATUS_FUNC1 0x2 +#define INTR_STATUS_FUNC2 0x4 + +/* Maximum number of I/O funcs */ +#define SDIOD_MAX_IOFUNCS 7 + +/* mask of register map */ +#define REG_F0_REG_MASK 0x7FF +#define REG_F1_MISC_MASK 0x1FFFF + +/* as of sdiod rev 0, supports 3 functions */ +#define SBSDIO_NUM_FUNCTION 3 + +/* function 0 vendor specific CCCR registers */ +#define SDIO_CCCR_BRCM_CARDCAP 0xf0 +#define SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT 0x02 +#define SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT 0x04 +#define SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC 0x08 +#define SDIO_CCCR_BRCM_CARDCTRL 0xf1 +#define SDIO_CCCR_BRCM_CARDCTRL_WLANRESET 0x02 +#define SDIO_CCCR_BRCM_SEPINT 0xf2 + +#define SDIO_SEPINT_MASK 0x01 +#define SDIO_SEPINT_OE 0x02 +#define SDIO_SEPINT_ACT_HI 0x04 + +/* function 1 miscellaneous registers */ + +/* sprom command and status */ +#define SBSDIO_SPROM_CS 0x10000 +/* sprom info register */ +#define SBSDIO_SPROM_INFO 0x10001 +/* sprom indirect access data byte 0 */ +#define SBSDIO_SPROM_DATA_LOW 0x10002 +/* sprom indirect access data byte 1 */ +#define SBSDIO_SPROM_DATA_HIGH 0x10003 +/* sprom indirect access addr byte 0 */ +#define SBSDIO_SPROM_ADDR_LOW 0x10004 +/* gpio select */ +#define SBSDIO_GPIO_SELECT 0x10005 +/* gpio output */ +#define SBSDIO_GPIO_OUT 0x10006 +/* gpio enable */ +#define SBSDIO_GPIO_EN 0x10007 +/* rev < 7, watermark for sdio device */ +#define SBSDIO_WATERMARK 0x10008 +/* control busy signal generation */ +#define SBSDIO_DEVICE_CTL 0x10009 + +/* SB Address Window Low (b15) */ +#define SBSDIO_FUNC1_SBADDRLOW 0x1000A +/* SB Address Window Mid (b23:b16) */ +#define SBSDIO_FUNC1_SBADDRMID 0x1000B +/* SB Address Window High (b31:b24) */ +#define SBSDIO_FUNC1_SBADDRHIGH 0x1000C +/* Frame Control (frame term/abort) */ +#define SBSDIO_FUNC1_FRAMECTRL 0x1000D +/* ChipClockCSR (ALP/HT ctl/status) */ +#define SBSDIO_FUNC1_CHIPCLKCSR 0x1000E +/* SdioPullUp (on cmd, d0-d2) */ +#define SBSDIO_FUNC1_SDIOPULLUP 0x1000F +/* Write Frame Byte Count Low */ +#define SBSDIO_FUNC1_WFRAMEBCLO 0x10019 +/* Write Frame Byte Count High */ +#define SBSDIO_FUNC1_WFRAMEBCHI 0x1001A +/* Read Frame Byte Count Low */ +#define SBSDIO_FUNC1_RFRAMEBCLO 0x1001B +/* Read Frame Byte Count High */ +#define SBSDIO_FUNC1_RFRAMEBCHI 0x1001C +/* MesBusyCtl (rev 11) */ +#define SBSDIO_FUNC1_MESBUSYCTRL 0x1001D +/* Sdio Core Rev 12 */ +#define SBSDIO_FUNC1_WAKEUPCTRL 0x1001E +#define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK 0x1 +#define SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT 0 +#define SBSDIO_FUNC1_WCTRL_HTWAIT_MASK 0x2 +#define SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT 1 +#define SBSDIO_FUNC1_SLEEPCSR 0x1001F +#define SBSDIO_FUNC1_SLEEPCSR_KSO_MASK 0x1 +#define SBSDIO_FUNC1_SLEEPCSR_KSO_SHIFT 0 +#define SBSDIO_FUNC1_SLEEPCSR_KSO_EN 1 +#define SBSDIO_FUNC1_SLEEPCSR_DEVON_MASK 0x2 +#define SBSDIO_FUNC1_SLEEPCSR_DEVON_SHIFT 1 + +#define SBSDIO_FUNC1_MISC_REG_START 0x10000 /* f1 misc register start */ +#define SBSDIO_FUNC1_MISC_REG_LIMIT 0x1001F /* f1 misc register end */ + +/* function 1 OCP space */ + +/* sb offset addr is <= 15 bits, 32k */ +#define SBSDIO_SB_OFT_ADDR_MASK 0x07FFF +#define SBSDIO_SB_OFT_ADDR_LIMIT 0x08000 +/* with b15, maps to 32-bit SB access */ +#define SBSDIO_SB_ACCESS_2_4B_FLAG 0x08000 + +/* valid bits in SBSDIO_FUNC1_SBADDRxxx regs */ + +#define SBSDIO_SBADDRLOW_MASK 0x80 /* Valid bits in SBADDRLOW */ +#define SBSDIO_SBADDRMID_MASK 0xff /* Valid bits in SBADDRMID */ +#define SBSDIO_SBADDRHIGH_MASK 0xffU /* Valid bits in SBADDRHIGH */ +/* Address bits from SBADDR regs */ +#define SBSDIO_SBWINDOW_MASK 0xffff8000 + +#define SDIOH_READ 0 /* Read request */ +#define SDIOH_WRITE 1 /* Write request */ + +#define SDIOH_DATA_FIX 0 /* Fixed addressing */ +#define SDIOH_DATA_INC 1 /* Incremental addressing */ + +/* internal return code */ +#define SUCCESS 0 +#define ERROR 1 + +/* Packet alignment for most efficient SDIO (can change based on platform) */ +#define BRCMF_SDALIGN (1 << 6) + +/** + * enum brcmf_sdiod_state - the state of the bus. + * + * @BRCMF_SDIOD_DOWN: Device can be accessed, no DPC. + * @BRCMF_SDIOD_DATA: Ready for data transfers, DPC enabled. + * @BRCMF_SDIOD_NOMEDIUM: No medium access to dongle possible. + */ +enum brcmf_sdiod_state { + BRCMF_SDIOD_DOWN, + BRCMF_SDIOD_DATA, + BRCMF_SDIOD_NOMEDIUM +}; Added: head/usr.bin/sdiotool/cam_sdio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/cam_sdio.c Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,440 @@ +/*- + * Copyright (c) 2017 Ilya Bakulin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "cam_sdio.h" + +/* Use CMD52 to read or write a single byte */ +int +sdio_rw_direct(struct cam_device *dev, + uint8_t func_number, + uint32_t addr, + uint8_t is_write, + uint8_t *data, uint8_t *resp) { + union ccb *ccb; + uint32_t flags; + uint32_t arg; + int retval = 0; + + ccb = cam_getccb(dev); + if (ccb == NULL) { + warnx("%s: error allocating CCB", __func__); + return (-1); + } + bzero(&(&ccb->ccb_h)[1], + sizeof(union ccb) - sizeof(struct ccb_hdr)); + + flags = MMC_RSP_R5 | MMC_CMD_AC; + arg = SD_IO_RW_FUNC(func_number) | SD_IO_RW_ADR(addr); + if (is_write) + arg |= SD_IO_RW_WR | SD_IO_RW_RAW | SD_IO_RW_DAT(*data); + + cam_fill_mmcio(&ccb->mmcio, + /*retries*/ 0, + /*cbfcnp*/ NULL, + /*flags*/ CAM_DIR_NONE, + /*mmc_opcode*/ SD_IO_RW_DIRECT, + /*mmc_arg*/ arg, + /*mmc_flags*/ flags, + /*mmc_data*/ 0, + /*timeout*/ 5000); + + if (((retval = cam_send_ccb(dev, ccb)) < 0) + || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { + const char warnstr[] = "error sending command"; + + if (retval < 0) + warn(warnstr); + else + warnx(warnstr); + return (-1); + } + + *resp = ccb->mmcio.cmd.resp[0] & 0xFF; + cam_freeccb(ccb); + return (retval); +} + +/* + * CMD53 -- IO_RW_EXTENDED + * Use to read or write memory blocks + * + * is_increment=1: FIFO mode + * blk_count > 0: block mode + */ +int +sdio_rw_extended(struct cam_device *dev, + uint8_t func_number, + uint32_t addr, + uint8_t is_write, + caddr_t data, size_t datalen, + uint8_t is_increment, + uint16_t blk_count) { + union ccb *ccb; + uint32_t flags; + uint32_t arg; + uint32_t cam_flags; + uint8_t resp; + struct mmc_data mmcd; + int retval = 0; + + if (blk_count != 0) { + warnx("%s: block mode is not supported yet", __func__); + return (-1); + } + + ccb = cam_getccb(dev); + if (ccb == NULL) { + warnx("%s: error allocating CCB", __func__); + return (-1); + } + bzero(&(&ccb->ccb_h)[1], + sizeof(union ccb) - sizeof(struct ccb_hdr)); + + flags = MMC_RSP_R5 | MMC_CMD_ADTC; + arg = SD_IO_RW_FUNC(func_number) | SD_IO_RW_ADR(addr) | + SD_IOE_RW_LEN(datalen); + + if (is_increment) + arg |= SD_IO_RW_INCR; + + mmcd.data = data; + mmcd.len = datalen; + mmcd.xfer_len = 0; /* not used by MMCCAM */ + mmcd.mrq = NULL; /* not used by MMCCAM */ + + if (is_write) { + arg |= SD_IO_RW_WR; + cam_flags = CAM_DIR_OUT; + mmcd.flags = MMC_DATA_WRITE; + } else { + cam_flags = CAM_DIR_IN; + mmcd.flags = MMC_DATA_READ; + } + cam_fill_mmcio(&ccb->mmcio, + /*retries*/ 0, + /*cbfcnp*/ NULL, + /*flags*/ cam_flags, + /*mmc_opcode*/ SD_IO_RW_EXTENDED, + /*mmc_arg*/ arg, + /*mmc_flags*/ flags, + /*mmc_data*/ &mmcd, + /*timeout*/ 5000); + + if (((retval = cam_send_ccb(dev, ccb)) < 0) + || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { + const char warnstr[] = "error sending command"; + + if (retval < 0) + warn(warnstr); + else + warnx(warnstr); + return (-1); + } + + resp = ccb->mmcio.cmd.resp[0] & 0xFF; + if (resp != 0) + warn("Response from CMD53 is not 0?!"); + cam_freeccb(ccb); + return (retval); +} + + +int +sdio_read_bool_for_func(struct cam_device *dev, uint32_t addr, uint8_t func_number, uint8_t *is_enab) { + uint8_t resp; + int ret; + + ret = sdio_rw_direct(dev, 0, addr, 0, NULL, &resp); + if (ret < 0) + return ret; + + *is_enab = (resp & (1 << func_number)) > 0 ? 1 : 0; + + return (0); +} + +int +sdio_set_bool_for_func(struct cam_device *dev, uint32_t addr, uint8_t func_number, int enable) { + uint8_t resp; + int ret; + uint8_t is_enabled; + + ret = sdio_rw_direct(dev, 0, addr, 0, NULL, &resp); + if (ret != 0) + return ret; + + is_enabled = resp & (1 << func_number); + if ((is_enabled !=0 && enable == 1) || (is_enabled == 0 && enable == 0)) + return 0; + + if (enable) + resp |= 1 << func_number; + else + resp &= ~ (1 << func_number); + + ret = sdio_rw_direct(dev, 0, addr, 1, &resp, &resp); + + return ret; +} + +/* Conventional I/O functions */ +uint8_t +sdio_read_1(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret) { + uint8_t val; + *ret = sdio_rw_direct(dev, func_number, addr, 0, NULL, &val); + return val; +} + +int +sdio_write_1(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint8_t val) { + uint8_t _val; + return sdio_rw_direct(dev, func_number, addr, 0, &val, &_val); +} + +uint16_t +sdio_read_2(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret) { + uint16_t val; + *ret = sdio_rw_extended(dev, func_number, addr, + /* is_write */ 0, + /* data */ (caddr_t) &val, + /* datalen */ sizeof(val), + /* is_increment */ 1, + /* blk_count */ 0 + ); + return val; +} + + +int +sdio_write_2(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint16_t val) { + return sdio_rw_extended(dev, func_number, addr, + /* is_write */ 1, + /* data */ (caddr_t) &val, + /* datalen */ sizeof(val), + /* is_increment */ 1, + /* blk_count */ 0 + ); +} + +uint32_t +sdio_read_4(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret) { + uint32_t val; + *ret = sdio_rw_extended(dev, func_number, addr, + /* is_write */ 0, + /* data */ (caddr_t) &val, + /* datalen */ sizeof(val), + /* is_increment */ 1, + /* blk_count */ 0 + ); + return val; +} + + +int +sdio_write_4(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint32_t val) { + return sdio_rw_extended(dev, func_number, addr, + /* is_write */ 1, + /* data */ (caddr_t) &val, + /* datalen */ sizeof(val), + /* is_increment */ 1, + /* blk_count */ 0 + ); +} + +/* Higher-level wrappers for certain management operations */ +int +sdio_is_func_ready(struct cam_device *dev, uint8_t func_number, uint8_t *is_enab) { + return sdio_read_bool_for_func(dev, SD_IO_CCCR_FN_READY, func_number, is_enab); +} + +int +sdio_is_func_enabled(struct cam_device *dev, uint8_t func_number, uint8_t *is_enab) { + return sdio_read_bool_for_func(dev, SD_IO_CCCR_FN_ENABLE, func_number, is_enab); +} + +int +sdio_func_enable(struct cam_device *dev, uint8_t func_number, int enable) { + return sdio_set_bool_for_func(dev, SD_IO_CCCR_FN_ENABLE, func_number, enable); +} + +int +sdio_is_func_intr_enabled(struct cam_device *dev, uint8_t func_number, uint8_t *is_enab) { + return sdio_read_bool_for_func(dev, SD_IO_CCCR_INT_ENABLE, func_number, is_enab); +} + +int +sdio_func_intr_enable(struct cam_device *dev, uint8_t func_number, int enable) { + return sdio_set_bool_for_func(dev, SD_IO_CCCR_INT_ENABLE, func_number, enable); +} + +int +sdio_card_set_bus_width(struct cam_device *dev, enum mmc_bus_width bw) { + int ret; + uint8_t ctl_val; + ret = sdio_rw_direct(dev, 0, SD_IO_CCCR_BUS_WIDTH, 0, NULL, &ctl_val); + if (ret < 0) { + warn("Error getting CCCR_BUS_WIDTH value"); + return ret; + } + ctl_val &= ~0x3; + switch (bw) { + case bus_width_1: + /* Already set to 1-bit */ + break; + case bus_width_4: + ctl_val |= CCCR_BUS_WIDTH_4; + break; + case bus_width_8: + warn("Cannot do 8-bit on SDIO yet"); + return -1; + break; + } + ret = sdio_rw_direct(dev, 0, SD_IO_CCCR_BUS_WIDTH, 1, &ctl_val, &ctl_val); + if (ret < 0) { + warn("Error setting CCCR_BUS_WIDTH value"); + return ret; + } + return ret; +} + +int +sdio_func_read_cis(struct cam_device *dev, uint8_t func_number, + uint32_t cis_addr, struct cis_info *info) { + uint8_t tuple_id, tuple_len, tuple_count; + uint32_t addr; + + char *cis1_info[4]; + int start, i, ch, count, ret; + char cis1_info_buf[256]; + + tuple_count = 0; /* Use to prevent infinite loop in case of parse errors */ + memset(cis1_info_buf, 0, 256); + do { + addr = cis_addr; + tuple_id = sdio_read_1(dev, 0, addr++, &ret); + if (tuple_id == SD_IO_CISTPL_END) + break; + if (tuple_id == 0) { + cis_addr++; + continue; + } + tuple_len = sdio_read_1(dev, 0, addr++, &ret); + if (tuple_len == 0 && tuple_id != 0x00) { + warn("Parse error: 0-length tuple %02X\n", tuple_id); + return -1; + } + + switch (tuple_id) { + case SD_IO_CISTPL_VERS_1: + addr += 2; + for (count = 0, start = 0, i = 0; + (count < 4) && ((i + 4) < 256); i++) { + ch = sdio_read_1(dev, 0, addr + i, &ret); + printf("count=%d, start=%d, i=%d, Got %c (0x%02x)\n", count, start, i, ch, ch); + if (ch == 0xff) + break; + cis1_info_buf[i] = ch; + if (ch == 0) { + cis1_info[count] = + cis1_info_buf + start; + start = i + 1; + count++; + } + } + printf("Card info:"); + for (i=0; i<4; i++) + if (cis1_info[i]) + printf(" %s", cis1_info[i]); + printf("\n"); + break; + case SD_IO_CISTPL_MANFID: + info->man_id = sdio_read_1(dev, 0, addr++, &ret); + info->man_id |= sdio_read_1(dev, 0, addr++, &ret) << 8; + + info->prod_id = sdio_read_1(dev, 0, addr++, &ret); + info->prod_id |= sdio_read_1(dev, 0, addr++, &ret) << 8; + break; + case SD_IO_CISTPL_FUNCID: + /* not sure if we need to parse it? */ + break; + case SD_IO_CISTPL_FUNCE: + if (tuple_len < 4) { + printf("FUNCE is too short: %d\n", tuple_len); + break; + } + if (func_number == 0) { + /* skip extended_data */ + addr++; + info->max_block_size = sdio_read_1(dev, 0, addr++, &ret); + info->max_block_size |= sdio_read_1(dev, 0, addr++, &ret) << 8; + } else { + info->max_block_size = sdio_read_1(dev, 0, addr + 0xC, &ret); + info->max_block_size |= sdio_read_1(dev, 0, addr + 0xD, &ret) << 8; + } + break; + default: + warnx("Skipping tuple ID %02X len %02X\n", tuple_id, tuple_len); + } + cis_addr += tuple_len + 2; + tuple_count++; + } while (tuple_count < 20); + + return 0; +} + +uint32_t +sdio_get_common_cis_addr(struct cam_device *dev) { + uint32_t addr; + int ret; + + addr = sdio_read_1(dev, 0, SD_IO_CCCR_CISPTR, &ret); + addr |= sdio_read_1(dev, 0, SD_IO_CCCR_CISPTR + 1, &ret) << 8; + addr |= sdio_read_1(dev, 0, SD_IO_CCCR_CISPTR + 2, &ret) << 16; + + if (addr < SD_IO_CIS_START || addr > SD_IO_CIS_START + SD_IO_CIS_SIZE) { + warn("Bad CIS address: %04X\n", addr); + addr = 0; + } + + return addr; +} + +void sdio_card_reset(struct cam_device *dev) { + int ret; + uint8_t ctl_val; + ret = sdio_rw_direct(dev, 0, SD_IO_CCCR_CTL, 0, NULL, &ctl_val); + if (ret < 0) + errx(1, "Error getting CCCR_CTL value"); + ctl_val |= CCCR_CTL_RES; + ret = sdio_rw_direct(dev, 0, SD_IO_CCCR_CTL, 1, &ctl_val, &ctl_val); + if (ret < 0) + errx(1, "Error setting CCCR_CTL value"); +} Added: head/usr.bin/sdiotool/cam_sdio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/cam_sdio.h Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,95 @@ +/*- + * Copyright (c) 2017 Ilya Bakulin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +struct cis_info { + uint16_t man_id; + uint16_t prod_id; + uint16_t max_block_size; +}; + +int sdio_rw_direct(struct cam_device *dev, + uint8_t func_number, + uint32_t addr, + uint8_t is_write, + uint8_t *data, + uint8_t *resp); +int +sdio_rw_extended(struct cam_device *dev, + uint8_t func_number, + uint32_t addr, + uint8_t is_write, + caddr_t data, size_t datalen, + uint8_t is_increment, + uint16_t blk_count); +uint8_t sdio_read_1(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret); +int sdio_write_1(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint8_t val); +uint16_t sdio_read_2(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret); +int sdio_write_2(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint16_t val); +uint32_t sdio_read_4(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret); +int sdio_write_4(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint32_t val); +int sdio_read_bool_for_func(struct cam_device *dev, uint32_t addr, uint8_t func_number, uint8_t *is_enab); +int sdio_set_bool_for_func(struct cam_device *dev, uint32_t addr, uint8_t func_number, int enable); +int sdio_is_func_ready(struct cam_device *dev, uint8_t func_number, uint8_t *is_enab); +int sdio_is_func_enabled(struct cam_device *dev, uint8_t func_number, uint8_t *is_enab); +int sdio_func_enable(struct cam_device *dev, uint8_t func_number, int enable); +int sdio_is_func_intr_enabled(struct cam_device *dev, uint8_t func_number, uint8_t *is_enab); +int sdio_func_intr_enable(struct cam_device *dev, uint8_t func_number, int enable); +void sdio_card_reset(struct cam_device *dev); +uint32_t sdio_get_common_cis_addr(struct cam_device *dev); +int sdio_func_read_cis(struct cam_device *dev, uint8_t func_number, + uint32_t cis_addr, struct cis_info *info); +int sdio_card_set_bus_width(struct cam_device *dev, enum mmc_bus_width bw); Added: head/usr.bin/sdiotool/linux_compat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/linux_compat.h Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2016-2017 Ilya Bakulin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef _LINUX_COMPAT_H_ +#define _LINUX_COMPAT_H_ + +/* Linux compatibility shims */ +#define uint unsigned int +#define u32 uint32_t +#define u8 uint8_t +#define u16 uint16_t +#define s32 int32_t +#define bool int8_t +#define true 1 +#define false 0 + +#define usleep_range(a, b) usleep(a) +#define ENOMEDIUM -1 +#define EINVAL -2 + +#define WARN_ON(cond) ({ \ + bool __ret = (cond); \ + if (__ret) { \ + printf("WARNING %s failed at %s:%d\n", \ + #cond, __FILE__, __LINE__); \ + } \ + (__ret); \ +}) + +#endif Added: head/usr.bin/sdiotool/linux_sdio_compat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/linux_sdio_compat.c Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2016-2017 Ilya Bakulin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "linux_compat.h" +#include "linux_sdio_compat.h" +#include "cam_sdio.h" + +u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret) { + return sdio_read_1(func->dev, func->num, addr, err_ret); +} + +unsigned char sdio_f0_readb(struct sdio_func *func, unsigned int addr, int *err_ret) { + return sdio_readb(func, addr, err_ret); +} + +u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret) { + return sdio_read_2(func->dev, func->num, addr, err_ret); +} + +u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret) { + return sdio_read_4(func->dev, func->num, addr, err_ret); +} + +void sdio_writeb(struct sdio_func *func, u8 b, + unsigned int addr, int *err_ret) { + *err_ret = sdio_write_1(func->dev, func->num, addr, b); +} + +/* Only writes to the vendor specific CCCR registers + * (0xF0 - 0xFF) are permiited. */ +void sdio_f0_writeb(struct sdio_func *func, unsigned char b, + unsigned int addr, int *err_ret) +{ + if (addr < 0xF0 || addr > 0xFF) { + if (err_ret) + *err_ret = -EINVAL; + return; + } + sdio_writeb(func, b, addr, err_ret); +} + +void sdio_writew(struct sdio_func *func, u16 b, + unsigned int addr, int *err_ret) { + *err_ret = sdio_write_2(func->dev, func->num, addr, b); +} + +void sdio_writel(struct sdio_func *func, u32 b, + unsigned int addr, int *err_ret) { + *err_ret = sdio_write_4(func->dev, func->num, addr, b); +} Added: head/usr.bin/sdiotool/linux_sdio_compat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sdiotool/linux_sdio_compat.h Mon Sep 18 20:01:01 2017 (r323717) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2017 Ilya Bakulin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef _LINUX_SDIO_COMPAT_H_ +#define _LINUX_SDIO_COMPAT_H_ + +#include +#include "linux_compat.h" + +/* Linux SDIO stack functions and definitions */ +#define SDIO_CCCR_ABORT SD_IO_CCCR_CTL +#define SDIO_CCCR_IENx SD_IO_CCCR_INT_ENABLE + +struct sdio_func { + struct cam_device *dev; + uint8_t num; +}; + +u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret); +unsigned char sdio_f0_readb(struct sdio_func *func, + unsigned int addr, int *err_ret); +u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret); +u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret); + +void sdio_writeb(struct sdio_func *func, u8 b, + unsigned int addr, int *err_ret); +void sdio_f0_writeb(struct sdio_func *func, unsigned char b, + unsigned int addr, int *err_ret); +void sdio_writew(struct sdio_func *func, u16 b, + unsigned int addr, int *err_ret); +void sdio_writel(struct sdio_func *func, u32 b, + unsigned int addr, int *err_ret); + + +#endif Modified: head/usr.bin/sdiotool/sdiotool.c ============================================================================== --- head/usr.bin/sdiotool/sdiotool.c Mon Sep 18 19:56:05 2017 (r323716) +++ head/usr.bin/sdiotool/sdiotool.c Mon Sep 18 20:01:01 2017 (r323717) @@ -23,6 +23,20 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Copyright (c) 2010 Broadcom Corporation + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND 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. + * * $FreeBSD$ */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Sep 18 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 3FE69E034C9; Mon, 18 Sep 2017 20:01:18 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D0B7D985; Mon, 18 Sep 2017 20:01:17 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK1HSH027457; Mon, 18 Sep 2017 20:01:17 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK1HJo027456; Mon, 18 Sep 2017 20:01:17 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709182001.v8IK1HJo027456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 20:01: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: r323718 - stable/11/usr.sbin/zic/zic X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/usr.sbin/zic/zic X-SVN-Commit-Revision: 323718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:01:18 -0000 Author: rlibby Date: Mon Sep 18 20:01:16 2017 New Revision: 323718 URL: https://svnweb.freebsd.org/changeset/base/323718 Log: MFC r323572: zic: -Wno-error=strict-overflow Modified: stable/11/usr.sbin/zic/zic/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/zic/zic/Makefile ============================================================================== --- stable/11/usr.sbin/zic/zic/Makefile Mon Sep 18 20:01:01 2017 (r323717) +++ stable/11/usr.sbin/zic/zic/Makefile Mon Sep 18 20:01:16 2017 (r323718) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${SRCTOP}/contrib/tzcode/zic PROG= zic @@ -12,5 +14,9 @@ CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 + +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50300 +CWARNFLAGS+= -Wno-error=strict-overflow +.endif .include From owner-svn-src-all@freebsd.org Mon Sep 18 20: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 228ECE03A88; Mon, 18 Sep 2017 20:07:50 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E43127DE37; Mon, 18 Sep 2017 20:07:49 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK7nSa029854; Mon, 18 Sep 2017 20:07:49 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK7ncX029853; Mon, 18 Sep 2017 20:07:49 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709182007.v8IK7ncX029853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 20:07: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: r323719 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 323719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:07:50 -0000 Author: rlibby Date: Mon Sep 18 20:07:48 2017 New Revision: 323719 URL: https://svnweb.freebsd.org/changeset/base/323719 Log: MFC r304877,r323573: r304877 (by bapt): Remove warning on struct-overflow on gcc 5.3.0 as zic(8) dies on it r323573: gcc builds: reenable -Wstrict-overflow for bsd.sys.mk This effectively reverts r304877, after having relegated the warning suppression to the zic(8) makefile in r323572. Effectively this is a record-only merge of r304877 and r323573. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Mon Sep 18 20: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 AD416E03C16; Mon, 18 Sep 2017 20:09:18 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA247DFB1; Mon, 18 Sep 2017 20:09:18 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IK9HKC029962; Mon, 18 Sep 2017 20:09:17 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IK9H7g029961; Mon, 18 Sep 2017 20:09:17 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709182009.v8IK9H7g029961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 18 Sep 2017 20:09: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: r323720 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 323720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:09:18 -0000 Author: rlibby Date: Mon Sep 18 20:09:17 2017 New Revision: 323720 URL: https://svnweb.freebsd.org/changeset/base/323720 Log: MFC r323574: gcc builds: reenable -Wstrict-overflow for kern.mk Modified: stable/11/sys/conf/kern.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Mon Sep 18 20:07:48 2017 (r323719) +++ stable/11/sys/conf/kern.mk Mon Sep 18 20:09:17 2017 (r323720) @@ -58,7 +58,6 @@ CWARNEXTRA?= -Wno-error=address \ -Wno-error=maybe-uninitialized \ -Wno-error=overflow \ -Wno-error=sequence-point \ - -Wno-error=strict-overflow \ -Wno-error=unused-but-set-variable .if ${COMPILER_VERSION} >= 60100 CWARNEXTRA+= -Wno-error=misleading-indentation \ From owner-svn-src-all@freebsd.org Mon Sep 18 20:17: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 4EB2DE04450; Mon, 18 Sep 2017 20:17:09 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CB4D7E582; Mon, 18 Sep 2017 20:17:09 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IKH8C4034061; Mon, 18 Sep 2017 20:17:08 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IKH8aB034060; Mon, 18 Sep 2017 20:17:08 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201709182017.v8IKH8aB034060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Mon, 18 Sep 2017 20:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323721 - head/sys/cam/mmc X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/sys/cam/mmc X-SVN-Commit-Revision: 323721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:17:09 -0000 Author: kibab Date: Mon Sep 18 20:17:08 2017 New Revision: 323721 URL: https://svnweb.freebsd.org/changeset/base/323721 Log: Add kern.features flag for MMCCAM kern.features.mmcam will be present and equal to 1 if the kernel has been compiled with option MMCCAM. This will help sdio-related userland tools to fail-fast if running on the kernel without MMCCAM enabled. Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12386 Modified: head/sys/cam/mmc/mmc_xpt.c Modified: head/sys/cam/mmc/mmc_xpt.c ============================================================================== --- head/sys/cam/mmc/mmc_xpt.c Mon Sep 18 20:09:17 2017 (r323720) +++ head/sys/cam/mmc/mmc_xpt.c Mon Sep 18 20:17:08 2017 (r323721) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #include /* for PRIu64 */ #include "opt_cam.h" +FEATURE(mmccam, "CAM-based MMC/SD/SDIO stack"); + static struct cam_ed * mmc_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id); static void mmc_dev_async(u_int32_t async_code, struct cam_eb *bus, From owner-svn-src-all@freebsd.org Mon Sep 18 20:22: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 903C2E04A8E; Mon, 18 Sep 2017 20:22:44 +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 593F27EA1D; Mon, 18 Sep 2017 20:22:44 +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 v8IKMhsN038057; Mon, 18 Sep 2017 20:22:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IKMgIR038048; Mon, 18 Sep 2017 20:22:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709182022.v8IKMgIR038048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 18 Sep 2017 20:22:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323722 - in head/sys: i386/i386 i386/include i386/isa kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: i386/i386 i386/include i386/isa kern X-SVN-Commit-Revision: 323722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:22:44 -0000 Author: kib Date: Mon Sep 18 20:22:42 2017 New Revision: 323722 URL: https://svnweb.freebsd.org/changeset/base/323722 Log: Fix handling of the segment registers on i386. Suppose that userspace is executing with the non-standard segment descriptors. Then, until exception or interrupt handler executed SET_KERNEL_SEGS, kernel is still executing with user %ds, %es and %fs. If an interrupt occurs in this window, the interrupt handler is executed unsafely, relying on usability of the usermode registers. If the interrupt results in the context switch on return, the contamination of the kernel state spreads to the thread we switched to. As result, kernel data accesses might fault or, if only the base is changed, completely messed up. More, if the user segment was allocated in LDT, another thread might mark the descriptor as invalid before doreti code tried to reload them. In this case kernel panics. The issue exists for all exception entry points which use trap gate, and thus do not automatically disable interrupts on entry, and for lcall_handler. Fix is two-fold: first, we need to disable interrupts for all kernel entries, changing the IDT descriptor types from trap gate to interrupt gate. Interrupts are re-enabled not earlier than the kernel segments are loaded into the segment registers. Second, we only load the segment registers from the trap frame when returning to usermode. For the later, all interrupt return paths must happen through the doreti common code. There is no way to disable interrupts on call gate, which is the supposed mode of servicing for lcall $7,$0 syscalls. Change the LDT descriptor 0 into a code segment type and point it to the userspace trampoline which redirects the syscall to int $0x80. All the measures make the segment register handling similar to that of amd64. We do not apply amd64 optimizations of not reloading segment registers on return from the syscall. Reported by: Maxime Villard Tested by: pho (the non-lcall part) Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D12402 Modified: head/sys/i386/i386/apic_vector.s head/sys/i386/i386/db_trace.c head/sys/i386/i386/exception.s head/sys/i386/i386/locore.s head/sys/i386/i386/machdep.c head/sys/i386/i386/trap.c head/sys/i386/include/md_var.h head/sys/i386/isa/npx.c head/sys/kern/imgact_aout.c Modified: head/sys/i386/i386/apic_vector.s ============================================================================== --- head/sys/i386/i386/apic_vector.s Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/i386/apic_vector.s Mon Sep 18 20:22:42 2017 (r323722) @@ -189,8 +189,7 @@ IDTVEC(xen_intr_upcall) SUPERALIGN_TEXT invltlb_ret: call as_lapic_eoi - POP_FRAME - iret + jmp doreti SUPERALIGN_TEXT IDTVEC(invltlb) @@ -274,10 +273,8 @@ IDTVEC(cpustop) call as_lapic_eoi call cpustop_handler + jmp doreti - POP_FRAME - iret - /* * Executed by a CPU when it receives an IPI_SUSPEND from another CPU. */ @@ -290,10 +287,8 @@ IDTVEC(cpususpend) call as_lapic_eoi call cpususpend_handler + jmp doreti - POP_FRAME - jmp doreti_iret - /* * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU. * @@ -314,7 +309,6 @@ IDTVEC(rendezvous) call smp_rendezvous_action call as_lapic_eoi - POP_FRAME - iret + jmp doreti #endif /* SMP */ Modified: head/sys/i386/i386/db_trace.c ============================================================================== --- head/sys/i386/i386/db_trace.c Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/i386/db_trace.c Mon Sep 18 20:22:42 2017 (r323722) @@ -326,8 +326,7 @@ db_nextframe(struct i386_frame **fp, db_addr_t *ip, st else if (strncmp(name, "Xatpic_intr", 11) == 0 || strncmp(name, "Xapic_isr", 9) == 0) frame_type = INTERRUPT; - else if (strcmp(name, "Xlcall_syscall") == 0 || - strcmp(name, "Xint0x80_syscall") == 0) + else if (strcmp(name, "Xint0x80_syscall") == 0) frame_type = SYSCALL; else if (strcmp(name, "dblfault_handler") == 0) frame_type = DOUBLE_FAULT; Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/i386/exception.s Mon Sep 18 20:22:42 2017 (r323722) @@ -98,15 +98,16 @@ MCOUNT_LABEL(user) MCOUNT_LABEL(btrap) #define TRAP(a) pushl $(a) ; jmp alltraps +#define TRAP_NOEN(a) pushl $(a) ; jmp alltraps_noen IDTVEC(div) pushl $0; TRAP(T_DIVIDE) IDTVEC(dbg) - pushl $0; TRAP(T_TRCTRAP) + pushl $0; TRAP_NOEN(T_TRCTRAP) IDTVEC(nmi) - pushl $0; TRAP(T_NMI) + pushl $0; TRAP_NOEN(T_NMI) IDTVEC(bpt) - pushl $0; TRAP(T_BPTFLT) + pushl $0; TRAP_NOEN(T_BPTFLT) IDTVEC(dtrace_ret) pushl $0; TRAP(T_DTRACE_RET) IDTVEC(ofl) @@ -130,7 +131,7 @@ IDTVEC(stk) IDTVEC(prot) TRAP(T_PROTFLT) IDTVEC(page) - TRAP(T_PAGEFLT) + TRAP_NOEN(T_PAGEFLT) IDTVEC(mchk) pushl $0; TRAP(T_MCHK) IDTVEC(rsvd) @@ -142,6 +143,21 @@ IDTVEC(align) IDTVEC(xmm) pushl $0; TRAP(T_XMMFLT) + SUPERALIGN_TEXT + .globl alltraps_noen +alltraps_noen: + pushal + pushl $0 + movw %ds,(%esp) + pushl $0 + movw %es,(%esp) + pushl $0 + movw %fs,(%esp) + SET_KERNEL_SREGS + cld + FAKE_MCOUNT(TF_EIP(%esp)) + jmp calltrap + /* * All traps except ones for syscalls jump to alltraps. If * interrupts were enabled when the trap occurred, then interrupts @@ -164,6 +180,7 @@ alltraps: movw %fs,(%esp) alltraps_with_regs_pushed: SET_KERNEL_SREGS + sti cld FAKE_MCOUNT(TF_EIP(%esp)) calltrap: @@ -225,40 +242,6 @@ norm_ill: #endif /* - * Call gate entry for syscalls (lcall 7,0). - * This is used by FreeBSD 1.x a.out executables and "old" NetBSD executables. - * - * The intersegment call has been set up to specify one dummy parameter. - * This leaves a place to put eflags so that the call frame can be - * converted to a trap frame. Note that the eflags is (semi-)bogusly - * pushed into (what will be) tf_err and then copied later into the - * final spot. It has to be done this way because esp can't be just - * temporarily altered for the pushfl - an interrupt might come in - * and clobber the saved cs/eip. - */ - SUPERALIGN_TEXT -IDTVEC(lcall_syscall) - pushfl /* save eflags */ - popl 8(%esp) /* shuffle into tf_eflags */ - pushl $7 /* sizeof "lcall 7,0" */ - pushl $0 /* tf_trapno */ - pushal - pushl $0 - movw %ds,(%esp) - pushl $0 - movw %es,(%esp) - pushl $0 - movw %fs,(%esp) - SET_KERNEL_SREGS - cld - FAKE_MCOUNT(TF_EIP(%esp)) - pushl %esp - call syscall - add $4, %esp - MEXITCOUNT - jmp doreti - -/* * Trap gate entry for syscalls (int 0x80). * This is used by FreeBSD ELF executables, "new" NetBSD executables, and all * Linux executables. @@ -279,6 +262,7 @@ IDTVEC(int0x80_syscall) pushl $0 movw %fs,(%esp) SET_KERNEL_SREGS + sti cld FAKE_MCOUNT(TF_EIP(%esp)) pushl %esp @@ -362,7 +346,7 @@ doreti_next: #ifdef HWPMC_HOOKS je doreti_nmi #else - je doreti_exit + je doreti_notvm86 #endif /* * PSL_VM must be checked first since segment registers only @@ -378,7 +362,7 @@ doreti_next: doreti_notvm86: testb $SEL_RPL_MASK,TF_CS(%esp) /* are we returning to user mode? */ - jz doreti_exit /* can't handle ASTs now if not */ + jz doreti_nosegs /* can't handle ASTs now if not */ doreti_ast: /* @@ -415,6 +399,12 @@ doreti_popl_es: .globl doreti_popl_ds doreti_popl_ds: popl %ds + jmp doreti_iret_popal + +doreti_nosegs: + MEXITCOUNT + addl $12,%esp +doreti_iret_popal: popal addl $8,%esp .globl doreti_iret @@ -457,7 +447,7 @@ doreti_nmi: * needs a user call chain capture. */ testb $SEL_RPL_MASK,TF_CS(%esp) - jz doreti_exit + jz doreti_nosegs movl PCPU(CURTHREAD),%eax /* curthread present? */ orl %eax,%eax jz doreti_exit Modified: head/sys/i386/i386/locore.s ============================================================================== --- head/sys/i386/i386/locore.s Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/i386/locore.s Mon Sep 18 20:22:42 2017 (r323722) @@ -335,6 +335,44 @@ osigcode: pushl %eax /* junk to fake return addr. */ int $0x80 /* enter kernel with args */ 0: jmp 0b + +/* + * The lcall $7,$0 handler cannot use the call gate that does an + * inter-privilege transition. The reason is that the call gate + * does not disable interrupts, and, before the kernel segment registers + * are loaded, we would have a window where the ring 0 code is + * executed with the wrong segments. + * + * Instead, set LDT descriptor 0 as code segment, which reflects + * the lcall $7,$0 back to ring 3 trampoline. The trampoline sets up + * the frame for int $0x80. + */ + ALIGN_TEXT +lcall_tramp: + cmpl $SYS_vfork,%eax + je 1f + pushl %ebp + movl %esp,%ebp + pushl 0x24(%ebp) /* arg 6 */ + pushl 0x20(%ebp) + pushl 0x1c(%ebp) + pushl 0x18(%ebp) + pushl 0x14(%ebp) + pushl 0x10(%ebp) /* arg 1 */ + subl $4,%esp /* gap */ + int $0x80 + leavel + lretl +1: + /* + * vfork handling is special and relies on the libc stub saving + * the return ip in %ecx. Also, we assume that the call was done + * with ucode32 selector in %cs. + */ + int $0x80 + movl $0x33,4(%esp) /* GUCODE32_SEL | SEL_UPL */ + movl %ecx,(%esp) + lretl #endif /* COMPAT_43 */ ALIGN_TEXT @@ -353,6 +391,9 @@ szfreebsd4_sigcode: .globl szosigcode szosigcode: .long esigcode-osigcode + .globl szlcallcode +szlcallcode: + .long esigcode-lcall_tramp #endif .text Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/i386/machdep.c Mon Sep 18 20:22:42 2017 (r323722) @@ -1513,7 +1513,7 @@ extern inthand_t #ifdef XENHVM IDTVEC(xen_intr_upcall), #endif - IDTVEC(lcall_syscall), IDTVEC(int0x80_syscall); + IDTVEC(int0x80_syscall); #ifdef DDB /* @@ -2157,7 +2157,9 @@ i386_kdb_init(void) register_t init386(int first) { - struct gate_descriptor *gdp; +#ifdef COMPAT_43 + struct segment_descriptor *gdp; +#endif int gsel_tss, metadata_missing, x, pa; struct pcpu *pc; struct xstate_hdr *xhdr; @@ -2246,9 +2248,9 @@ init386(int first) /* exceptions */ for (x = 0; x < NIDT; x++) - setidt(x, &IDTVEC(rsvd), SDT_SYS386TGT, SEL_KPL, + setidt(x, &IDTVEC(rsvd), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_DE, &IDTVEC(div), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_DE, &IDTVEC(div), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_DB, &IDTVEC(dbg), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); @@ -2256,39 +2258,39 @@ init386(int first) GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_BP, &IDTVEC(bpt), SDT_SYS386IGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_OF, &IDTVEC(ofl), SDT_SYS386TGT, SEL_UPL, + setidt(IDT_OF, &IDTVEC(ofl), SDT_SYS386IGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_BR, &IDTVEC(bnd), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_BR, &IDTVEC(bnd), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_UD, &IDTVEC(ill), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_UD, &IDTVEC(ill), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_NM, &IDTVEC(dna), SDT_SYS386TGT, SEL_KPL + setidt(IDT_NM, &IDTVEC(dna), SDT_SYS386IGT, SEL_KPL , GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_DF, 0, SDT_SYSTASKGT, SEL_KPL, GSEL(GPANIC_SEL, SEL_KPL)); - setidt(IDT_FPUGP, &IDTVEC(fpusegm), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_FPUGP, &IDTVEC(fpusegm), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_TS, &IDTVEC(tss), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_TS, &IDTVEC(tss), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_NP, &IDTVEC(missing), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_NP, &IDTVEC(missing), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_SS, &IDTVEC(stk), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_SS, &IDTVEC(stk), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); setidt(IDT_PF, &IDTVEC(page), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_MF, &IDTVEC(fpu), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_MF, &IDTVEC(fpu), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_AC, &IDTVEC(align), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_AC, &IDTVEC(align), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_MC, &IDTVEC(mchk), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_MC, &IDTVEC(mchk), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_XF, &IDTVEC(xmm), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_XF, &IDTVEC(xmm), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL, + setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYS386IGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); #ifdef KDTRACE_HOOKS - setidt(IDT_DTRACE_RET, &IDTVEC(dtrace_ret), SDT_SYS386TGT, SEL_UPL, + setidt(IDT_DTRACE_RET, &IDTVEC(dtrace_ret), SDT_SYS386IGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); #endif #ifdef XENHVM @@ -2329,9 +2331,9 @@ init386(int first) clock_init(); finishidentcpu(); /* Final stage of CPU initialization */ - setidt(IDT_UD, &IDTVEC(ill), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_UD, &IDTVEC(ill), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, + setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ initializecpucache(); @@ -2436,17 +2438,21 @@ init386(int first) gdt[GPROC0_SEL].sd.sd_type = SDT_SYS386TSS; /* clear busy bit */ ltr(gsel_tss); - /* make a call gate to reenter kernel with */ - gdp = &ldt[LSYS5CALLS_SEL].gd; - - x = (int) &IDTVEC(lcall_syscall); - gdp->gd_looffset = x; - gdp->gd_selector = GSEL(GCODE_SEL,SEL_KPL); - gdp->gd_stkcpy = 1; - gdp->gd_type = SDT_SYS386CGT; - gdp->gd_dpl = SEL_UPL; - gdp->gd_p = 1; - gdp->gd_hioffset = x >> 16; +#ifdef COMPAT_43 + /* + * Make a code descriptor to emulate lcall $7,$0 with int + * $0x80. sd_hibase and sd_lobase are set after the sigtramp + * base in the shared table is known. + */ + gdp = &ldt[LSYS5CALLS_SEL].sd; + gdp->sd_type = SDT_MEMERA; + gdp->sd_dpl = SEL_UPL; + gdp->sd_p = 1; + gdp->sd_def32 = 1; + gdp->sd_gran = 1; + gdp->sd_lolimit = 0xffff; + gdp->sd_hilimit = 0xf; +#endif /* transfer to user mode */ Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/i386/trap.c Mon Sep 18 20:22:42 2017 (r323722) @@ -114,8 +114,6 @@ static int trap_pfault(struct trapframe *, int, vm_off static void trap_fatal(struct trapframe *, vm_offset_t); void dblfault_handler(void); -extern inthand_t IDTVEC(lcall_syscall); - #define MAX_TRAP_MSG 32 static char *trap_msg[] = { "", /* 0 unused */ @@ -629,23 +627,6 @@ user_trctrap_out: case T_TRCTRAP: /* trace trap */ kernel_trctrap: - if (frame->tf_eip == (int)IDTVEC(lcall_syscall)) { - /* - * We've just entered system mode via the - * syscall lcall. Continue single stepping - * silently until the syscall handler has - * saved the flags. - */ - return; - } - if (frame->tf_eip == (int)IDTVEC(lcall_syscall) + 1) { - /* - * The syscall handler has now saved the - * flags. Stop single stepping it. - */ - frame->tf_eflags &= ~PSL_T; - return; - } /* * Ignore debug register trace traps due to * accesses in the user's address space, which Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/include/md_var.h Mon Sep 18 20:22:42 2017 (r323722) @@ -43,6 +43,7 @@ extern int szfreebsd4_sigcode; #endif #ifdef COMPAT_43 extern int szosigcode; +extern int szlcallcode; #endif extern uint32_t *vm_page_dump; Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/i386/isa/npx.c Mon Sep 18 20:22:42 2017 (r323722) @@ -237,7 +237,7 @@ npx_probe(void) } save_idt_npxtrap = idt[IDT_MF]; - setidt(IDT_MF, probetrap, SDT_SYS386TGT, SEL_KPL, + setidt(IDT_MF, probetrap, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); /* Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Mon Sep 18 20:17:08 2017 (r323721) +++ head/sys/kern/imgact_aout.c Mon Sep 18 20:22:42 2017 (r323722) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -337,3 +339,18 @@ exec_aout_imgact(struct image_params *imgp) */ static struct execsw aout_execsw = { exec_aout_imgact, "a.out" }; EXEC_SET(aout, aout_execsw); + +#if defined(__i386__) && defined(COMPAT_43) +static void +exec_init_lcall(void *arg __unused) +{ + struct segment_descriptor *gdp; + u_int lcall_addr; + + gdp = &ldt[LSYS5CALLS_SEL].sd; + lcall_addr = aout_sysvec.sv_psstrings - szlcallcode; + gdp->sd_hibase = lcall_addr >> 24; + gdp->sd_lobase = lcall_addr; +} +SYSINIT(aout, SI_SUB_EXEC + 1, SI_ORDER_ANY, exec_init_lcall, NULL); +#endif From owner-svn-src-all@freebsd.org Mon Sep 18 23:30: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 DD5DAE0F9F7; Mon, 18 Sep 2017 23:30:40 +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 B74F32D8; Mon, 18 Sep 2017 23:30:40 +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 v8INUdSq011441; Mon, 18 Sep 2017 23:30:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8INUd0S011438; Mon, 18 Sep 2017 23:30:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709182330.v8INUd0S011438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 18 Sep 2017 23:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323723 - in head/sys/ufs: ffs ufs X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/ufs: ffs ufs X-SVN-Commit-Revision: 323723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 23:30:41 -0000 Author: jhb Date: Mon Sep 18 23:30:39 2017 New Revision: 323723 URL: https://svnweb.freebsd.org/changeset/base/323723 Log: Add UFS_LINK_MAX for the UFS-specific limit on link counts. ino64 expanded nlink_t to 64 bits, but the on-disk format for UFS is still limited to 16 bits. This is a nop currently but will matter if LINK_MAX is increased in the future. Reviewed by: kib Sponsored by: Chelsio Communications Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ufs/dinode.h head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Sep 18 20:22:42 2017 (r323722) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Sep 18 23:30:39 2017 (r323723) @@ -11532,7 +11532,7 @@ handle_written_inodeblock(inodedep, bp, flags) */ if (inodedep->id_savedsize == -1 || inodedep->id_savedextsize == -1) panic("handle_written_inodeblock: bad size"); - if (inodedep->id_savednlink > LINK_MAX) + if (inodedep->id_savednlink > UFS_LINK_MAX) panic("handle_written_inodeblock: Invalid link count " "%jd for inodedep %p", (uintmax_t)inodedep->id_savednlink, inodedep); Modified: head/sys/ufs/ufs/dinode.h ============================================================================== --- head/sys/ufs/ufs/dinode.h Mon Sep 18 20:22:42 2017 (r323722) +++ head/sys/ufs/ufs/dinode.h Mon Sep 18 23:30:39 2017 (r323723) @@ -186,4 +186,6 @@ struct ufs1_dinode { u_int64_t di_modrev; /* 120: i_modrev for NFSv4 */ }; +#define UFS_LINK_MAX 32767 + #endif /* _UFS_UFS_DINODE_H_ */ Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Sep 18 20:22:42 2017 (r323722) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Sep 18 23:30:39 2017 (r323723) @@ -981,7 +981,7 @@ ufs_link(ap) goto out; } ip = VTOI(vp); - if ((nlink_t)ip->i_nlink >= LINK_MAX) { + if (ip->i_nlink >= UFS_LINK_MAX) { error = EMLINK; goto out; } @@ -1266,7 +1266,7 @@ relock: doingdirectory = 0; newparent = 0; ino = fip->i_number; - if (fip->i_nlink >= LINK_MAX) { + if (fip->i_nlink >= UFS_LINK_MAX) { error = EMLINK; goto unlockout; } @@ -1369,7 +1369,7 @@ relock: * actual link modification is completed when * .. is rewritten below. */ - if ((nlink_t)tdp->i_nlink >= LINK_MAX) { + if (tdp->i_nlink >= UFS_LINK_MAX) { error = EMLINK; goto bad; } @@ -1793,7 +1793,7 @@ ufs_mkdir(ap) panic("ufs_mkdir: no name"); #endif dp = VTOI(dvp); - if ((nlink_t)dp->i_nlink >= LINK_MAX) { + if (dp->i_nlink >= UFS_LINK_MAX) { error = EMLINK; goto out; } @@ -2442,6 +2442,9 @@ ufs_pathconf(ap) error = 0; switch (ap->a_name) { + case _PC_LINK_MAX: + *ap->a_retval = UFS_LINK_MAX; + break; case _PC_NAME_MAX: *ap->a_retval = UFS_MAXNAMLEN; break; From owner-svn-src-all@freebsd.org Mon Sep 18 23:50: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 19FA3E10D1B; Mon, 18 Sep 2017 23:50:36 +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 DD232FAA; Mon, 18 Sep 2017 23:50:35 +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 v8INoYIi019339; Mon, 18 Sep 2017 23:50:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8INoYoH019337; Mon, 18 Sep 2017 23:50:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709182350.v8INoYoH019337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 18 Sep 2017 23:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323724 - in head/sys/dev/cxgbe: . firmware X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . firmware X-SVN-Commit-Revision: 323724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 23:50:36 -0000 Author: jhb Date: Mon Sep 18 23:50:34 2017 New Revision: 323724 URL: https://svnweb.freebsd.org/changeset/base/323724 Log: Enable support for lookaside crypto operations by default. This permits ccr(4) to be used with the default firmware configuration file. Discussed with: np Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/firmware/t6fw_cfg.txt head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Mon Sep 18 23:30:39 2017 (r323723) +++ head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Mon Sep 18 23:50:34 2017 (r323724) @@ -153,6 +153,7 @@ nexactf = 456 cmask = all pmask = all + ncrypto_lookaside = 16 nclip = 320 # TCAM has 6K cells; each region must start at a multiple of 128 cell. @@ -162,7 +163,7 @@ nserver = 512 nhpfilter = 0 nhash = 16384 - protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, crypto_lookaside tp_l2t = 4096 tp_ddp = 2 tp_ddp_iscsi = 2 @@ -272,7 +273,7 @@ [fini] version = 0x1 - checksum = 0xf438bb8f + checksum = 0x7191019f # # $FreeBSD$ # Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Sep 18 23:30:39 2017 (r323723) +++ head/sys/dev/cxgbe/t4_main.c Mon Sep 18 23:50:34 2017 (r323724) @@ -452,7 +452,7 @@ TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_al static int t4_rdmacaps_allowed = -1; TUNABLE_INT("hw.cxgbe.rdmacaps_allowed", &t4_rdmacaps_allowed); -static int t4_cryptocaps_allowed = 0; +static int t4_cryptocaps_allowed = -1; TUNABLE_INT("hw.cxgbe.cryptocaps_allowed", &t4_cryptocaps_allowed); static int t4_iscsicaps_allowed = -1; From owner-svn-src-all@freebsd.org Tue Sep 19 06:29: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 8888DE25AAA; Tue, 19 Sep 2017 06:29:39 +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 51D156C50D; Tue, 19 Sep 2017 06:29:39 +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 v8J6TcGW084667; Tue, 19 Sep 2017 06:29:38 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J6Tcje084663; Tue, 19 Sep 2017 06:29:38 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201709190629.v8J6Tcje084663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 19 Sep 2017 06:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323727 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 323727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 06:29:39 -0000 Author: sephe Date: Tue Sep 19 06:29:38 2017 New Revision: 323727 URL: https://svnweb.freebsd.org/changeset/base/323727 Log: hyperv/hn: Apply VF's RSS setting Since in Azure SYN and SYN|ACK go through the synthetic parts while the rest of the same TCP flow goes through the VF, apply VF's RSS settings to synthetic parts to have a consistent hash value/type for the same TCP flow. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12333 Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c head/sys/dev/hyperv/netvsc/if_hn.c head/sys/dev/hyperv/netvsc/if_hnvar.h head/sys/dev/hyperv/netvsc/ndis.h Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_rndis.c Tue Sep 19 05:48:53 2017 (r323726) +++ head/sys/dev/hyperv/netvsc/hn_rndis.c Tue Sep 19 06:29:38 2017 (r323727) @@ -502,7 +502,7 @@ hn_rndis_query_rsscaps(struct hn_softc *sc, int *rxr_c /* Commit! */ sc->hn_rss_ind_size = indsz; - sc->hn_rss_hash = hash_func | hash_types; + sc->hn_rss_hcap = hash_func | hash_types; *rxr_cnt0 = rxr_cnt; return (0); } Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Tue Sep 19 05:48:53 2017 (r323726) +++ head/sys/dev/hyperv/netvsc/if_hn.c Tue Sep 19 06:29:38 2017 (r323727) @@ -284,6 +284,8 @@ static void hn_xpnt_vf_init_taskfunc(void *, int); static void hn_xpnt_vf_init(struct hn_softc *); static void hn_xpnt_vf_setenable(struct hn_softc *); static void hn_xpnt_vf_setdisable(struct hn_softc *, bool); +static void hn_vf_rss_fixup(struct hn_softc *, bool); +static void hn_vf_rss_restore(struct hn_softc *); static int hn_rndis_rxinfo(const void *, int, struct hn_rxinfo *); @@ -327,6 +329,8 @@ static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); #endif static int hn_rss_hash_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_rss_hcap_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_rss_mbuf_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_size_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_pkts_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_pktmax_sysctl(SYSCTL_HANDLER_ARGS); @@ -386,8 +390,11 @@ static int hn_rxfilter_config(struct hn_softc *); static int hn_rss_reconfig(struct hn_softc *); #endif static void hn_rss_ind_fixup(struct hn_softc *); +static void hn_rss_mbuf_hash(struct hn_softc *, uint32_t); static int hn_rxpkt(struct hn_rx_ring *, const void *, int, const struct hn_rxinfo *); +static uint32_t hn_rss_type_fromndis(uint32_t); +static uint32_t hn_rss_type_tondis(uint32_t); static int hn_tx_ring_create(struct hn_softc *, int); static void hn_tx_ring_destroy(struct hn_tx_ring *); @@ -1134,11 +1141,13 @@ hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, hn_rxvf_set(sc, rxvf ? ifp : NULL); if (rxvf) { + hn_vf_rss_fixup(sc, true); hn_suspend_mgmt(sc); sc->hn_link_flags &= ~(HN_LINK_FLAG_LINKUP | HN_LINK_FLAG_NETCHG); if_link_state_change(hn_ifp, LINK_STATE_DOWN); } else { + hn_vf_rss_restore(sc); hn_resume_mgmt(sc); } @@ -1335,7 +1344,249 @@ hn_mtu_change_fixup(struct hn_softc *sc) #endif } +static uint32_t +hn_rss_type_fromndis(uint32_t rss_hash) +{ + uint32_t types = 0; + + if (rss_hash & NDIS_HASH_IPV4) + types |= RSS_TYPE_IPV4; + if (rss_hash & NDIS_HASH_TCP_IPV4) + types |= RSS_TYPE_TCP_IPV4; + if (rss_hash & NDIS_HASH_IPV6) + types |= RSS_TYPE_IPV6; + if (rss_hash & NDIS_HASH_IPV6_EX) + types |= RSS_TYPE_IPV6_EX; + if (rss_hash & NDIS_HASH_TCP_IPV6) + types |= RSS_TYPE_TCP_IPV6; + if (rss_hash & NDIS_HASH_TCP_IPV6_EX) + types |= RSS_TYPE_TCP_IPV6_EX; + return (types); +} + +static uint32_t +hn_rss_type_tondis(uint32_t types) +{ + uint32_t rss_hash = 0; + + KASSERT((types & + (RSS_TYPE_UDP_IPV4 | RSS_TYPE_UDP_IPV6 | RSS_TYPE_UDP_IPV6_EX)) == 0, + ("UDP4, UDP6 and UDP6EX are not supported")); + + if (types & RSS_TYPE_IPV4) + rss_hash |= NDIS_HASH_IPV4; + if (types & RSS_TYPE_TCP_IPV4) + rss_hash |= NDIS_HASH_TCP_IPV4; + if (types & RSS_TYPE_IPV6) + rss_hash |= NDIS_HASH_IPV6; + if (types & RSS_TYPE_IPV6_EX) + rss_hash |= NDIS_HASH_IPV6_EX; + if (types & RSS_TYPE_TCP_IPV6) + rss_hash |= NDIS_HASH_TCP_IPV6; + if (types & RSS_TYPE_TCP_IPV6_EX) + rss_hash |= NDIS_HASH_TCP_IPV6_EX; + return (rss_hash); +} + static void +hn_rss_mbuf_hash(struct hn_softc *sc, uint32_t mbuf_hash) +{ + int i; + + HN_LOCK_ASSERT(sc); + + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) + sc->hn_rx_ring[i].hn_mbuf_hash = mbuf_hash; +} + +static void +hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) +{ + struct ifnet *ifp, *vf_ifp; + struct ifrsshash ifrh; + struct ifrsskey ifrk; + int error; + uint32_t my_types, diff_types, mbuf_types = 0; + + HN_LOCK_ASSERT(sc); + KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, + ("%s: synthetic parts are not attached", sc->hn_ifp->if_xname)); + + if (sc->hn_rx_ring_inuse == 1) { + /* No RSS on synthetic parts; done. */ + return; + } + if ((sc->hn_rss_hcap & NDIS_HASH_FUNCTION_TOEPLITZ) == 0) { + /* Synthetic parts do not support Toeplitz; done. */ + return; + } + + ifp = sc->hn_ifp; + vf_ifp = sc->hn_vf_ifp; + + /* + * Extract VF's RSS key. Only 40 bytes key for Toeplitz is + * supported. + */ + memset(&ifrk, 0, sizeof(ifrk)); + strlcpy(ifrk.ifrk_name, vf_ifp->if_xname, sizeof(ifrk.ifrk_name)); + error = vf_ifp->if_ioctl(vf_ifp, SIOCGIFRSSKEY, (caddr_t)&ifrk); + if (error) { + if_printf(ifp, "%s SIOCGRSSKEY failed: %d\n", + vf_ifp->if_xname, error); + goto done; + } + if (ifrk.ifrk_func != RSS_FUNC_TOEPLITZ) { + if_printf(ifp, "%s RSS function %u is not Toeplitz\n", + vf_ifp->if_xname, ifrk.ifrk_func); + goto done; + } + if (ifrk.ifrk_keylen != NDIS_HASH_KEYSIZE_TOEPLITZ) { + if_printf(ifp, "%s invalid RSS Toeplitz key length %d\n", + vf_ifp->if_xname, ifrk.ifrk_keylen); + goto done; + } + + /* + * Extract VF's RSS hash. Only Toeplitz is supported. + */ + memset(&ifrh, 0, sizeof(ifrh)); + strlcpy(ifrh.ifrh_name, vf_ifp->if_xname, sizeof(ifrh.ifrh_name)); + error = vf_ifp->if_ioctl(vf_ifp, SIOCGIFRSSHASH, (caddr_t)&ifrh); + if (error) { + if_printf(ifp, "%s SIOCGRSSHASH failed: %d\n", + vf_ifp->if_xname, error); + goto done; + } + if (ifrh.ifrh_func != RSS_FUNC_TOEPLITZ) { + if_printf(ifp, "%s RSS function %u is not Toeplitz\n", + vf_ifp->if_xname, ifrh.ifrh_func); + goto done; + } + + my_types = hn_rss_type_fromndis(sc->hn_rss_hcap); + if ((ifrh.ifrh_types & my_types) == 0) { + /* This disables RSS; ignore it then */ + if_printf(ifp, "%s intersection of RSS types failed. " + "VF %#x, mine %#x\n", vf_ifp->if_xname, + ifrh.ifrh_types, my_types); + goto done; + } + + diff_types = my_types ^ ifrh.ifrh_types; + my_types &= ifrh.ifrh_types; + mbuf_types = my_types; + + /* + * Detect RSS hash value/type confliction. + * + * NOTE: + * We don't disable the hash type, but stop delivery the hash + * value/type through mbufs on RX path. + */ + if ((my_types & RSS_TYPE_IPV4) && + (diff_types & ifrh.ifrh_types & + (RSS_TYPE_TCP_IPV4 | RSS_TYPE_UDP_IPV4))) { + /* Conflict; disable IPV4 hash type/value delivery. */ + if_printf(ifp, "disable IPV4 mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_IPV4; + } + if ((my_types & RSS_TYPE_IPV6) && + (diff_types & ifrh.ifrh_types & + (RSS_TYPE_TCP_IPV6 | RSS_TYPE_UDP_IPV6 | + RSS_TYPE_TCP_IPV6_EX | RSS_TYPE_UDP_IPV6_EX | + RSS_TYPE_IPV6_EX))) { + /* Conflict; disable IPV6 hash type/value delivery. */ + if_printf(ifp, "disable IPV6 mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_IPV6; + } + if ((my_types & RSS_TYPE_IPV6_EX) && + (diff_types & ifrh.ifrh_types & + (RSS_TYPE_TCP_IPV6 | RSS_TYPE_UDP_IPV6 | + RSS_TYPE_TCP_IPV6_EX | RSS_TYPE_UDP_IPV6_EX | + RSS_TYPE_IPV6))) { + /* Conflict; disable IPV6_EX hash type/value delivery. */ + if_printf(ifp, "disable IPV6_EX mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_IPV6_EX; + } + if ((my_types & RSS_TYPE_TCP_IPV6) && + (diff_types & ifrh.ifrh_types & RSS_TYPE_TCP_IPV6_EX)) { + /* Conflict; disable TCP_IPV6 hash type/value delivery. */ + if_printf(ifp, "disable TCP_IPV6 mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_TCP_IPV6; + } + if ((my_types & RSS_TYPE_TCP_IPV6_EX) && + (diff_types & ifrh.ifrh_types & RSS_TYPE_TCP_IPV6)) { + /* Conflict; disable TCP_IPV6_EX hash type/value delivery. */ + if_printf(ifp, "disable TCP_IPV6_EX mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_TCP_IPV6_EX; + } + if ((my_types & RSS_TYPE_UDP_IPV6) && + (diff_types & ifrh.ifrh_types & RSS_TYPE_UDP_IPV6_EX)) { + /* Conflict; disable UDP_IPV6 hash type/value delivery. */ + if_printf(ifp, "disable UDP_IPV6 mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_UDP_IPV6; + } + if ((my_types & RSS_TYPE_UDP_IPV6_EX) && + (diff_types & ifrh.ifrh_types & RSS_TYPE_UDP_IPV6)) { + /* Conflict; disable UDP_IPV6_EX hash type/value delivery. */ + if_printf(ifp, "disable UDP_IPV6_EX mbuf hash delivery\n"); + mbuf_types &= ~RSS_TYPE_UDP_IPV6_EX; + } + + /* + * Indirect table does not matter. + */ + + sc->hn_rss_hash = (sc->hn_rss_hcap & NDIS_HASH_FUNCTION_MASK) | + hn_rss_type_tondis(my_types); + memcpy(sc->hn_rss.rss_key, ifrk.ifrk_key, sizeof(sc->hn_rss.rss_key)); + sc->hn_flags |= HN_FLAG_HAS_RSSKEY; + + if (reconf) { + error = hn_rss_reconfig(sc); + if (error) { + /* XXX roll-back? */ + if_printf(ifp, "hn_rss_reconfig failed: %d\n", error); + /* XXX keep going. */ + } + } +done: + /* Hash deliverability for mbufs. */ + hn_rss_mbuf_hash(sc, hn_rss_type_tondis(mbuf_types)); +} + +static void +hn_vf_rss_restore(struct hn_softc *sc) +{ + + HN_LOCK_ASSERT(sc); + KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, + ("%s: synthetic parts are not attached", sc->hn_ifp->if_xname)); + + if (sc->hn_rx_ring_inuse == 1) + goto done; + + /* + * Restore hash types. Key does _not_ matter. + */ + if (sc->hn_rss_hash != sc->hn_rss_hcap) { + int error; + + sc->hn_rss_hash = sc->hn_rss_hcap; + error = hn_rss_reconfig(sc); + if (error) { + if_printf(sc->hn_ifp, "hn_rss_reconfig failed: %d\n", + error); + /* XXX keep going. */ + } + } +done: + /* Hash deliverability for mbufs. */ + hn_rss_mbuf_hash(sc, NDIS_HASH_ALL); +} + +static void hn_xpnt_vf_setready(struct hn_softc *sc) { struct ifnet *ifp, *vf_ifp; @@ -1501,6 +1752,13 @@ hn_xpnt_vf_init(struct hn_softc *sc) */ hn_nvs_set_datapath(sc, HN_NVS_DATAPATH_VF); + /* + * NOTE: + * Fixup RSS related bits _after_ the VF is brought up, since + * many VFs generate RSS key during it's initialization. + */ + hn_vf_rss_fixup(sc, true); + /* Mark transparent mode VF as enabled. */ hn_xpnt_vf_setenable(sc); } @@ -1659,7 +1917,8 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) ifp->if_input = sc->hn_vf_input; sc->hn_vf_input = NULL; - if (sc->hn_xvf_flags & HN_XVFFLAG_ENABLED) + if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) && + (sc->hn_xvf_flags & HN_XVFFLAG_ENABLED)) hn_nvs_set_datapath(sc, HN_NVS_DATAPATH_SYNTH); if (sc->hn_vf_rdytick == 0) { @@ -1681,11 +1940,18 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) sc->hn_ifp->if_hw_tsomaxsegsize = sc->hn_saved_tsosegsz; } - /* - * Resume link status management, which was suspended - * by hn_ifnet_attevent(). - */ - hn_resume_mgmt(sc); + if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { + /* + * Restore RSS settings. + */ + hn_vf_rss_restore(sc); + + /* + * Resume link status management, which was suspended + * by hn_ifnet_attevent(). + */ + hn_resume_mgmt(sc); + } } /* Mark transparent mode VF as disabled. */ @@ -1935,6 +2201,12 @@ hn_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_hash", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_rss_hash_sysctl, "A", "RSS hash"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_hashcap", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_rss_hcap_sysctl, "A", "RSS hash capabilities"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "mbuf_hash", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_rss_mbuf_sysctl, "A", "RSS hash for mbufs"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "rss_ind_size", CTLFLAG_RD, &sc->hn_rss_ind_size, 0, "RSS indirect entry count"); #ifndef RSS @@ -3026,14 +3298,21 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int { struct ifnet *ifp, *hn_ifp = rxr->hn_ifp; struct mbuf *m_new; - int size, do_lro = 0, do_csum = 1; - int hash_type; + int size, do_lro = 0, do_csum = 1, is_vf = 0; + int hash_type = M_HASHTYPE_NONE; - /* - * If the non-transparent mode VF is active, inject this packet - * into the VF. - */ - ifp = rxr->hn_rxvf_ifp ? rxr->hn_rxvf_ifp : hn_ifp; + ifp = hn_ifp; + if (rxr->hn_rxvf_ifp != NULL) { + /* + * Non-transparent mode VF; pretend this packet is from + * the VF. + */ + ifp = rxr->hn_rxvf_ifp; + is_vf = 1; + } else if (rxr->hn_rx_flags & HN_RX_FLAG_XPNT_VF) { + /* Transparent mode VF. */ + is_vf = 1; + } if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { /* @@ -3186,16 +3465,6 @@ skip: * If VF is activated (tranparent/non-transparent mode does not * matter here). * - * - Don't setup mbuf hash, if 'options RSS' is set. - * - * In Azure, when VF is activated, TCP SYN and SYN|ACK go - * through hn(4) while the rest of segments and ACKs belonging - * to the same TCP 4-tuple go through the VF. So don't setup - * mbuf hash, if a VF is activated and 'options RSS' is not - * enabled. hn(4) and the VF may use neither the same RSS - * hash key nor the same RSS hash function, so the hash value - * for packets belonging to the same flow could be different! - * * - Disable LRO * * hn(4) will only receive broadcast packets, multicast packets, @@ -3206,20 +3475,23 @@ skip: * all, since the LRO flush will use hn(4) as the receiving * interface; i.e. hn_ifp->if_input(hn_ifp, m). */ - if (hn_ifp != ifp || (rxr->hn_rx_flags & HN_RX_FLAG_XPNT_VF)) { - do_lro = 0; /* disable LRO. */ -#ifndef RSS - goto skip_hash; /* skip mbuf hash setup */ -#endif - } + if (is_vf) + do_lro = 0; + /* + * If VF is activated (tranparent/non-transparent mode does not + * matter here), do _not_ mess with unsupported hash types or + * functions. + */ if (info->hash_info != HN_NDIS_HASH_INFO_INVALID) { rxr->hn_rss_pkts++; m_new->m_pkthdr.flowid = info->hash_value; - hash_type = M_HASHTYPE_OPAQUE_HASH; + if (!is_vf) + hash_type = M_HASHTYPE_OPAQUE_HASH; if ((info->hash_info & NDIS_HASH_FUNCTION_MASK) == NDIS_HASH_FUNCTION_TOEPLITZ) { - uint32_t type = (info->hash_info & NDIS_HASH_TYPE_MASK); + uint32_t type = (info->hash_info & NDIS_HASH_TYPE_MASK & + rxr->hn_mbuf_hash); /* * NOTE: @@ -3256,15 +3528,12 @@ skip: break; } } - } else { + } else if (!is_vf) { m_new->m_pkthdr.flowid = rxr->hn_rx_idx; hash_type = M_HASHTYPE_OPAQUE; } M_HASHTYPE_SET(m_new, hash_type); -#ifndef RSS -skip_hash: -#endif if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); if (hn_ifp != ifp) { const struct ether_header *eh; @@ -3589,20 +3858,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifrh->ifrh_func = RSS_FUNC_TOEPLITZ; else ifrh->ifrh_func = RSS_FUNC_PRIVATE; - - ifrh->ifrh_types = 0; - if (sc->hn_rss_hash & NDIS_HASH_IPV4) - ifrh->ifrh_types |= RSS_TYPE_IPV4; - if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV4) - ifrh->ifrh_types |= RSS_TYPE_TCP_IPV4; - if (sc->hn_rss_hash & NDIS_HASH_IPV6) - ifrh->ifrh_types |= RSS_TYPE_IPV6; - if (sc->hn_rss_hash & NDIS_HASH_IPV6_EX) - ifrh->ifrh_types |= RSS_TYPE_IPV6_EX; - if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV6) - ifrh->ifrh_types |= RSS_TYPE_TCP_IPV6; - if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV6_EX) - ifrh->ifrh_types |= RSS_TYPE_TCP_IPV6_EX; + ifrh->ifrh_types = hn_rss_type_fromndis(sc->hn_rss_hash); HN_UNLOCK(sc); break; @@ -4154,6 +4410,16 @@ hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) if (error || req->newptr == NULL) goto back; + if ((sc->hn_flags & HN_FLAG_RXVF) || + (hn_xpnt_vf && sc->hn_vf_ifp != NULL)) { + /* + * RSS key is synchronized w/ VF's, don't allow users + * to change it. + */ + error = EBUSY; + goto back; + } + error = SYSCTL_IN(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); if (error) goto back; @@ -4220,6 +4486,34 @@ hn_rss_hash_sysctl(SYSCTL_HANDLER_ARGS) } static int +hn_rss_hcap_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char hash_str[128]; + uint32_t hash; + + HN_LOCK(sc); + hash = sc->hn_rss_hcap; + HN_UNLOCK(sc); + snprintf(hash_str, sizeof(hash_str), "%b", hash, NDIS_HASH_BITS); + return sysctl_handle_string(oidp, hash_str, sizeof(hash_str), req); +} + +static int +hn_rss_mbuf_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char hash_str[128]; + uint32_t hash; + + HN_LOCK(sc); + hash = sc->hn_rx_ring[0].hn_mbuf_hash; + HN_UNLOCK(sc); + snprintf(hash_str, sizeof(hash_str), "%b", hash, NDIS_HASH_BITS); + return sysctl_handle_string(oidp, hash_str, sizeof(hash_str), req); +} + +static int hn_vf_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; @@ -4519,6 +4813,7 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) rxr->hn_trust_hcsum |= HN_TRUST_HCSUM_UDP; if (hn_trust_hostip) rxr->hn_trust_hcsum |= HN_TRUST_HCSUM_IP; + rxr->hn_mbuf_hash = NDIS_HASH_ALL; rxr->hn_ifp = sc->hn_ifp; if (i < sc->hn_tx_ring_cnt) rxr->hn_txr = &sc->hn_tx_ring[i]; @@ -5980,6 +6275,7 @@ hn_synth_attach(struct hn_softc *sc, int mtu) /* Clear RSS stuffs. */ sc->hn_rss_ind_size = 0; sc->hn_rss_hash = 0; + sc->hn_rss_hcap = 0; /* * Attach the primary channel _before_ attaching NVS and RNDIS. @@ -6098,6 +6394,12 @@ hn_synth_attach(struct hn_softc *sc, int mtu) hn_rss_ind_fixup(sc); } + sc->hn_rss_hash = sc->hn_rss_hcap; + if ((sc->hn_flags & HN_FLAG_RXVF) || + (sc->hn_xvf_flags & HN_XVFFLAG_ENABLED)) { + /* NOTE: Don't reconfigure RSS; will do immediately. */ + hn_vf_rss_fixup(sc, false); + } error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); if (error) goto failed; Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Tue Sep 19 05:48:53 2017 (r323726) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Tue Sep 19 06:29:38 2017 (r323727) @@ -64,6 +64,7 @@ struct hn_rx_ring { void *hn_pktbuf; int hn_pktbuf_len; int hn_rx_flags; /* HN_RX_FLAG_ */ + uint32_t hn_mbuf_hash; /* NDIS_HASH_ */ uint8_t *hn_rxbuf; /* shadow sc->hn_rxbuf */ int hn_rx_idx; @@ -238,7 +239,8 @@ struct hn_softc { uint32_t hn_rndis_agg_align; int hn_rss_ind_size; - uint32_t hn_rss_hash; /* NDIS_HASH_ */ + uint32_t hn_rss_hash; /* setting, NDIS_HASH_ */ + uint32_t hn_rss_hcap; /* caps, NDIS_HASH_ */ struct ndis_rssprm_toeplitz hn_rss; eventhandler_tag hn_ifaddr_evthand; Modified: head/sys/dev/hyperv/netvsc/ndis.h ============================================================================== --- head/sys/dev/hyperv/netvsc/ndis.h Tue Sep 19 05:48:53 2017 (r323726) +++ head/sys/dev/hyperv/netvsc/ndis.h Tue Sep 19 06:29:38 2017 (r323727) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Microsoft Corp. + * Copyright (c) 2016-2017 Microsoft Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,6 +56,13 @@ #define NDIS_HASH_IPV6_EX 0x00000800 #define NDIS_HASH_TCP_IPV6 0x00001000 #define NDIS_HASH_TCP_IPV6_EX 0x00002000 + +#define NDIS_HASH_ALL (NDIS_HASH_IPV4 | \ + NDIS_HASH_TCP_IPV4 | \ + NDIS_HASH_IPV6 | \ + NDIS_HASH_IPV6_EX | \ + NDIS_HASH_TCP_IPV6 | \ + NDIS_HASH_TCP_IPV6_EX) /* Hash description for use with printf(9) %b identifier. */ #define NDIS_HASH_BITS \ From owner-svn-src-all@freebsd.org Tue Sep 19 06:38: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 064FEE2636D; Tue, 19 Sep 2017 06:38:59 +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 D4A8D6CB16; Tue, 19 Sep 2017 06:38:58 +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 v8J6cwXt088756; Tue, 19 Sep 2017 06:38:58 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J6cvP7088752; Tue, 19 Sep 2017 06:38:57 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201709190638.v8J6cvP7088752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 19 Sep 2017 06:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323728 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 323728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 06:38:59 -0000 Author: sephe Date: Tue Sep 19 06:38:57 2017 New Revision: 323728 URL: https://svnweb.freebsd.org/changeset/base/323728 Log: hyperv/hn: Fix MTU setting - Add size of an ethernet header to the value configured to NVS. This does not seem to have any effects if MTU is 1500, but fix hypervisor side's setting if MTU > 1500. - Override the MTU setting according to the view from the hypervisor side. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12352 Modified: head/sys/dev/hyperv/netvsc/hn_nvs.c head/sys/dev/hyperv/netvsc/hn_rndis.c head/sys/dev/hyperv/netvsc/hn_rndis.h head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_nvs.c Tue Sep 19 06:29:38 2017 (r323727) +++ head/sys/dev/hyperv/netvsc/hn_nvs.c Tue Sep 19 06:38:57 2017 (r323728) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -503,7 +504,7 @@ hn_nvs_conf_ndis(struct hn_softc *sc, int mtu) memset(&conf, 0, sizeof(conf)); conf.nvs_type = HN_NVS_TYPE_NDIS_CONF; - conf.nvs_mtu = mtu; + conf.nvs_mtu = mtu + ETHER_HDR_LEN; 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; Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_rndis.c Tue Sep 19 06:29:38 2017 (r323727) +++ head/sys/dev/hyperv/netvsc/hn_rndis.c Tue Sep 19 06:38:57 2017 (r323728) @@ -188,6 +188,24 @@ hn_rndis_get_linkstatus(struct hn_softc *sc, uint32_t return (0); } +int +hn_rndis_get_mtu(struct hn_softc *sc, uint32_t *mtu) +{ + size_t size; + int error; + + size = sizeof(*mtu); + error = hn_rndis_query(sc, OID_GEN_MAXIMUM_FRAME_SIZE, NULL, 0, + mtu, &size); + if (error) + return (error); + if (size != sizeof(uint32_t)) { + if_printf(sc->hn_ifp, "invalid mtu len %zu\n", size); + return (EINVAL); + } + return (0); +} + static const void * hn_rndis_xact_exec1(struct hn_softc *sc, struct vmbus_xact *xact, size_t reqlen, struct hn_nvs_sendctx *sndc, size_t *comp_len) Modified: head/sys/dev/hyperv/netvsc/hn_rndis.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_rndis.h Tue Sep 19 06:29:38 2017 (r323727) +++ head/sys/dev/hyperv/netvsc/hn_rndis.h Tue Sep 19 06:38:57 2017 (r323728) @@ -41,6 +41,7 @@ int hn_rndis_get_eaddr(struct hn_softc *sc, uint8_t * /* link_status: NDIS_MEDIA_STATE_ */ int hn_rndis_get_linkstatus(struct hn_softc *sc, uint32_t *link_status); +int hn_rndis_get_mtu(struct hn_softc *sc, uint32_t *mtu); /* filter: NDIS_PACKET_TYPE_. */ int hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter); void hn_rndis_rx_ctrl(struct hn_softc *sc, const void *data, Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Tue Sep 19 06:29:38 2017 (r323727) +++ head/sys/dev/hyperv/netvsc/if_hn.c Tue Sep 19 06:38:57 2017 (r323728) @@ -2003,6 +2003,7 @@ hn_attach(device_t dev) uint8_t eaddr[ETHER_ADDR_LEN]; struct ifnet *ifp = NULL; int error, ring_cnt, tx_ring_cnt; + uint32_t mtu; sc->hn_dev = dev; sc->hn_prichan = vmbus_get_channel(dev); @@ -2159,6 +2160,12 @@ hn_attach(device_t dev) if (error) goto failed; + error = hn_rndis_get_mtu(sc, &mtu); + if (error) + mtu = ETHERMTU; + else if (bootverbose) + device_printf(dev, "RNDIS mtu %u\n", mtu); + #if __FreeBSD_version >= 1100099 if (sc->hn_rx_ring_inuse > 1) { /* @@ -2343,6 +2350,10 @@ hn_attach(device_t dev) if_printf(ifp, "TSO segcnt %u segsz %u\n", ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); } + if (mtu < ETHERMTU) { + if_printf(ifp, "fixup mtu %u -> %u\n", ifp->if_mtu, mtu); + ifp->if_mtu = mtu; + } /* Inform the upper layer about the long frame support. */ ifp->if_hdrlen = sizeof(struct ether_vlan_header); @@ -3587,6 +3598,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) int mask, error = 0; struct ifrsskey *ifrk; struct ifrsshash *ifrh; + uint32_t mtu; switch (cmd) { case SIOCSIFMTU: @@ -3650,11 +3662,23 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } + error = hn_rndis_get_mtu(sc, &mtu); + if (error) + mtu = ifr->ifr_mtu; + else if (bootverbose) + if_printf(ifp, "RNDIS mtu %u\n", mtu); + /* * Commit the requested MTU, after the synthetic parts * have been successfully attached. */ - ifp->if_mtu = ifr->ifr_mtu; + if (mtu >= ifr->ifr_mtu) { + mtu = ifr->ifr_mtu; + } else { + if_printf(ifp, "fixup mtu %d -> %u\n", + ifr->ifr_mtu, mtu); + } + ifp->if_mtu = mtu; /* * Synthetic parts' reattach may change the chimney From owner-svn-src-all@freebsd.org Tue Sep 19 06: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 579F9E268B1; Tue, 19 Sep 2017 06:46: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 252746CF8D; Tue, 19 Sep 2017 06:46:01 +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 v8J6k0Yj092691; Tue, 19 Sep 2017 06:46:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J6k0Rv092690; Tue, 19 Sep 2017 06:46:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201709190646.v8J6k0Rv092690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 19 Sep 2017 06:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323729 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 323729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 06:46:01 -0000 Author: sephe Date: Tue Sep 19 06:46:00 2017 New Revision: 323729 URL: https://svnweb.freebsd.org/changeset/base/323729 Log: hyperv/hn: Incease max supported MTU MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D12365 Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Tue Sep 19 06:38:57 2017 (r323728) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Tue Sep 19 06:46:00 2017 (r323729) @@ -36,8 +36,7 @@ #define HN_RXBUF_SIZE (16 * 1024 * 1024) #define HN_RXBUF_SIZE_COMPAT (15 * 1024 * 1024) -/* Claimed to be 12232B */ -#define HN_MTU_MAX (9 * 1024) +#define HN_MTU_MAX (65535 - ETHER_ADDR_LEN) #define HN_TXBR_SIZE (128 * PAGE_SIZE) #define HN_RXBR_SIZE (128 * PAGE_SIZE) From owner-svn-src-all@freebsd.org Tue Sep 19 07:18: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 BC542E00EE7; Tue, 19 Sep 2017 07:18:23 +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 8B6186DE7C; Tue, 19 Sep 2017 07:18:23 +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 v8J7IMil005269; Tue, 19 Sep 2017 07:18:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7IM08005268; Tue, 19 Sep 2017 07:18:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190718.v8J7IM08005268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:18: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: r323732 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 323732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:18:23 -0000 Author: avg Date: Tue Sep 19 07:18:22 2017 New Revision: 323732 URL: https://svnweb.freebsd.org/changeset/base/323732 Log: MFC r319212: fix indentation Modified: stable/11/sys/x86/x86/identcpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/identcpu.c ============================================================================== --- stable/11/sys/x86/x86/identcpu.c Tue Sep 19 07:02:02 2017 (r323731) +++ stable/11/sys/x86/x86/identcpu.c Tue Sep 19 07:18:22 2017 (r323732) @@ -906,7 +906,7 @@ printcpuinfo(void) "\033DBE" /* Data Breakpoint extension */ "\034PTSC" /* Performance TSC */ "\035PL2I" /* L2I perf count */ - "\036MWAITX" /* MONITORX/MWAITX instructions */ + "\036MWAITX" /* MONITORX/MWAITX instructions */ "\037" "\040" ); From owner-svn-src-all@freebsd.org Tue Sep 19 07:19: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 A46B6E0102B; Tue, 19 Sep 2017 07:19:28 +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 73B2D6DFBD; Tue, 19 Sep 2017 07:19: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 v8J7JRlN005359; Tue, 19 Sep 2017 07:19:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7JRRN005358; Tue, 19 Sep 2017 07:19:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190719.v8J7JRRN005358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323733 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/x86/x86 X-SVN-Commit-Revision: 323733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:19:28 -0000 Author: avg Date: Tue Sep 19 07:19:27 2017 New Revision: 323733 URL: https://svnweb.freebsd.org/changeset/base/323733 Log: MFC r319212: fix indentation Modified: stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Tue Sep 19 07:18:22 2017 (r323732) +++ stable/10/sys/x86/x86/identcpu.c Tue Sep 19 07:19:27 2017 (r323733) @@ -875,7 +875,7 @@ printcpuinfo(void) "\033DBE" /* Data Breakpoint extension */ "\034PTSC" /* Performance TSC */ "\035PL2I" /* L2I perf count */ - "\036MWAITX" /* MONITORX/MWAITX instructions */ + "\036MWAITX" /* MONITORX/MWAITX instructions */ "\037" "\040" ); From owner-svn-src-all@freebsd.org Tue Sep 19 07:31: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 932BAE0185F; Tue, 19 Sep 2017 07:31: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 568976E549; Tue, 19 Sep 2017 07:31: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 v8J7VL10010235; Tue, 19 Sep 2017 07:31:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7VLlE010231; Tue, 19 Sep 2017 07:31:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190731.v8J7VLlE010231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:31: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: r323734 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/aggs usr.sbin/dtrace/tests/common/aggs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/aggs usr.sbin/dtrace/tests/common/aggs X-SVN-Commit-Revision: 323734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:31:22 -0000 Author: avg Date: Tue Sep 19 07:31:21 2017 New Revision: 323734 URL: https://svnweb.freebsd.org/changeset/base/323734 Log: MFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized incorrectly illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f https://www.illumos.org/issues/8269 It seems that currently normalization of stddev aggregation is done incorrectly. We divide both the sum of values and the sum of their squares by the normalization factor. But we should divide the sum of squares by the normalization factor squared to scale the original values properly. FreeBSD note: the actual change was committed in r316853, this commit adds the test files and record merge information. Reviewed by: Bryan Cantrill Approved by: Robert Mustacchi Author: Andriy Gapon Sponsored by: Panzura Added: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d - copied unchanged from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out - copied unchanged from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Modified: stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Directory Properties: stable/11/ (props changed) Copied: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d (from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d Tue Sep 19 07:31:21 2017 (r323734, copy of r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d) @@ -0,0 +1,46 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Panzura. All rights reserved. + */ + +/* + * ASSERTION: + * Positive test for normalization() of stddev() + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; +} + +tick-100ms +/i < 11/ +{ + @ = stddev(i * 100); + i++; +} + +tick-100ms +/i == 11/ +{ + printf("normalized data:\n"); + normalize(@, 10); + exit(0); +} Copied: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out (from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Tue Sep 19 07:31:21 2017 (r323734, copy of r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out) @@ -0,0 +1,3 @@ +normalized data: + + 31 Modified: stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Tue Sep 19 07:19:27 2017 (r323733) +++ stable/11/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Tue Sep 19 07:31:21 2017 (r323734) @@ -169,6 +169,8 @@ ${PACKAGE}FILES= \ tst.sizedkeys.d.out \ tst.stddev.d \ tst.stddev.d.out \ + tst.stddev.normalize.d \ + tst.stddev.normalize.d.out \ tst.subr.d \ tst.sum.d \ tst.sum.d.out \ From owner-svn-src-all@freebsd.org Tue Sep 19 07:31: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 E49E7E01943; Tue, 19 Sep 2017 07:31: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 A8C386E6DD; Tue, 19 Sep 2017 07:31: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 v8J7Vri7012435; Tue, 19 Sep 2017 07:31:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7VrJN012432; Tue, 19 Sep 2017 07:31:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190731.v8J7VrJN012432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323735 - in stable/10/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/aggs usr.sbin/dtrace/tests/common/aggs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/aggs usr.sbin/dtrace/tests/common/aggs X-SVN-Commit-Revision: 323735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:31:55 -0000 Author: avg Date: Tue Sep 19 07:31:53 2017 New Revision: 323735 URL: https://svnweb.freebsd.org/changeset/base/323735 Log: MFC r319746,r319747,r319769: 8269 dtrace stddev aggregation is normalized incorrectly illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f https://www.illumos.org/issues/8269 It seems that currently normalization of stddev aggregation is done incorrectly. We divide both the sum of values and the sum of their squares by the normalization factor. But we should divide the sum of squares by the normalization factor squared to scale the original values properly. FreeBSD note: the actual change was committed in r316853, this commit adds the test files and record merge information. Reviewed by: Bryan Cantrill Approved by: Robert Mustacchi Author: Andriy Gapon Sponsored by: Panzura Added: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d - copied unchanged from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out - copied unchanged from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Modified: stable/10/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Directory Properties: stable/10/ (props changed) Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d (from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d Tue Sep 19 07:31:53 2017 (r323735, copy of r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d) @@ -0,0 +1,46 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Panzura. All rights reserved. + */ + +/* + * ASSERTION: + * Positive test for normalization() of stddev() + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; +} + +tick-100ms +/i < 11/ +{ + @ = stddev(i * 100); + i++; +} + +tick-100ms +/i == 11/ +{ + printf("normalized data:\n"); + normalize(@, 10); + exit(0); +} Copied: stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out (from r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out Tue Sep 19 07:31:53 2017 (r323735, copy of r319746, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.normalize.d.out) @@ -0,0 +1,3 @@ +normalized data: + + 31 Modified: stable/10/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Tue Sep 19 07:31:21 2017 (r323734) +++ stable/10/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Tue Sep 19 07:31:53 2017 (r323735) @@ -167,6 +167,8 @@ TESTFILES= \ tst.sizedkeys.d.out \ tst.stddev.d \ tst.stddev.d.out \ + tst.stddev.normalize.d \ + tst.stddev.normalize.d.out \ tst.subr.d \ tst.sum.d \ tst.sum.d.out \ From owner-svn-src-all@freebsd.org Tue Sep 19 07:39: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 399FEE01F70; Tue, 19 Sep 2017 07:39:34 +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 088A36EAE8; Tue, 19 Sep 2017 07:39:33 +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 v8J7dW4H013737; Tue, 19 Sep 2017 07:39:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7dWqL013736; Tue, 19 Sep 2017 07:39:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190739.v8J7dWqL013736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323736 - stable/11/sys/cam/ata X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cam/ata X-SVN-Commit-Revision: 323736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:39:34 -0000 Author: avg Date: Tue Sep 19 07:39:32 2017 New Revision: 323736 URL: https://svnweb.freebsd.org/changeset/base/323736 Log: MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport The motivation for this is two-fold. 1. Some old WD SATA disks may appear as if they need to be spun up when they are already spinning. Those disks would respond with an error to the spin-up request. 2. Even if we really fail to spin up the disk, we still can try to proceed to the subsequent phases. If we fail later on, then no difference. Otherwise we get a chance to communicate with the disk which is better than completely ignoring it, because a user can try to recover the disk. Modified: stable/11/sys/cam/ata/ata_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/11/sys/cam/ata/ata_xpt.c Tue Sep 19 07:31:53 2017 (r323735) +++ stable/11/sys/cam/ata/ata_xpt.c Tue Sep 19 07:39:32 2017 (r323736) @@ -740,6 +740,16 @@ out: goto noerror; /* + * Some old WD SATA disks have broken SPINUP handling. + * If we really fail to spin up the disk, then there will be + * some media access errors later on, but at least we will + * have a device to interact with for recovery attempts. + */ + } else if (softc->action == PROBE_SPINUP && + status == CAM_ATA_STATUS_ERROR) { + goto noerror; + + /* * Some HP SATA disks report supported DMA Auto-Activation, * but return ABORT on attempt to enable it. */ From owner-svn-src-all@freebsd.org Tue Sep 19 07:39: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 62378E01FA9; Tue, 19 Sep 2017 07:39: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 2FBD96EB04; Tue, 19 Sep 2017 07:39:40 +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 v8J7ddZa013789; Tue, 19 Sep 2017 07:39:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7ddN4013788; Tue, 19 Sep 2017 07:39:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190739.v8J7ddN4013788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 07:39: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: r323737 - stable/10/sys/cam/ata X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cam/ata X-SVN-Commit-Revision: 323737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:39:40 -0000 Author: avg Date: Tue Sep 19 07:39:39 2017 New Revision: 323737 URL: https://svnweb.freebsd.org/changeset/base/323737 Log: MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport The motivation for this is two-fold. 1. Some old WD SATA disks may appear as if they need to be spun up when they are already spinning. Those disks would respond with an error to the spin-up request. 2. Even if we really fail to spin up the disk, we still can try to proceed to the subsequent phases. If we fail later on, then no difference. Otherwise we get a chance to communicate with the disk which is better than completely ignoring it, because a user can try to recover the disk. Modified: stable/10/sys/cam/ata/ata_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/10/sys/cam/ata/ata_xpt.c Tue Sep 19 07:39:32 2017 (r323736) +++ stable/10/sys/cam/ata/ata_xpt.c Tue Sep 19 07:39:39 2017 (r323737) @@ -743,6 +743,16 @@ out: goto noerror; /* + * Some old WD SATA disks have broken SPINUP handling. + * If we really fail to spin up the disk, then there will be + * some media access errors later on, but at least we will + * have a device to interact with for recovery attempts. + */ + } else if (softc->action == PROBE_SPINUP && + status == CAM_ATA_STATUS_ERROR) { + goto noerror; + + /* * Some HP SATA disks report supported DMA Auto-Activation, * but return ABORT on attempt to enable it. */ From owner-svn-src-all@freebsd.org Tue Sep 19 07:56: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 A7055E02C6D; Tue, 19 Sep 2017 07:56:25 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72FC46F4F0; Tue, 19 Sep 2017 07:56:25 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8J7uOUt022057; Tue, 19 Sep 2017 07:56:24 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J7uOg4022056; Tue, 19 Sep 2017 07:56:24 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201709190756.v8J7uOg4022056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 19 Sep 2017 07:56: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: r323738 - stable/11/tools/tools/nanobsd/embedded X-SVN-Group: stable-11 X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: stable/11/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 323738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 07:56:25 -0000 Author: n_hibma Date: Tue Sep 19 07:56:24 2017 New Revision: 323738 URL: https://svnweb.freebsd.org/changeset/base/323738 Log: MFC 323197: Bug fix: Don't treat NANO_IMAGES as a directory. This was accidentally broken in r295377 . Submitted by: Igor Serikov Modified: stable/11/tools/tools/nanobsd/embedded/common Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/nanobsd/embedded/common ============================================================================== --- stable/11/tools/tools/nanobsd/embedded/common Tue Sep 19 07:39:39 2017 (r323737) +++ stable/11/tools/tools/nanobsd/embedded/common Tue Sep 19 07:56:24 2017 (r323738) @@ -106,8 +106,6 @@ mkdir -p ${NANO_OBJ} NANO_OBJ=$(realpath ${NANO_OBJ}) mkdir -p ${NANO_LOG} NANO_LOG=$(realpath ${NANO_LOG}) -mkdir -p ${NANO_IMAGES} -NANO_IMAGES=$(realpath ${NANO_IMAGES}) mkdir -p ${NANO_WORLDDIR} NANO_WORLDDIR=$(realpath ${NANO_WORLDDIR}) mkdir -p ${NANO_DISKIMGDIR} From owner-svn-src-all@freebsd.org Tue Sep 19 08:19: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 5D96AE03ED5; Tue, 19 Sep 2017 08:19:21 +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 29CF8701B6; Tue, 19 Sep 2017 08:19:21 +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 v8J8JKGY030204; Tue, 19 Sep 2017 08:19:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8JK7G030203; Tue, 19 Sep 2017 08:19:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190819.v8J8JK7G030203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323739 - stable/10/usr.sbin/bhyveload X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/usr.sbin/bhyveload X-SVN-Commit-Revision: 323739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:19:21 -0000 Author: avg Date: Tue Sep 19 08:19:20 2017 New Revision: 323739 URL: https://svnweb.freebsd.org/changeset/base/323739 Log: MFV r320195: bhyveload: correctly query size of disks On FreeBSD fstat(2) works fine for querying sizes of plain files, but not so much for character devices. So, use DIOCGMEDIASIZE to try to get the correct size for disks and disk-like devices (e.g. zvols). PR: 220186 Modified: stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- stable/10/usr.sbin/bhyveload/bhyveload.c Tue Sep 19 07:56:24 2017 (r323738) +++ stable/10/usr.sbin/bhyveload/bhyveload.c Tue Sep 19 08:19:20 2017 (r323739) @@ -312,10 +312,12 @@ cb_diskioctl(void *arg, int unit, u_long cmd, void *da *(u_int *)data = 512; break; case DIOCGMEDIASIZE: - if (fstat(disk_fd[unit], &sb) == 0) - *(off_t *)data = sb.st_size; - else + if (fstat(disk_fd[unit], &sb) != 0) return (ENOTTY); + if (S_ISCHR(sb.st_mode) && + ioctl(disk_fd[unit], DIOCGMEDIASIZE, &sb.st_size) != 0) + return (ENOTTY); + *(off_t *)data = sb.st_size; break; default: return (ENOTTY); From owner-svn-src-all@freebsd.org Tue Sep 19 08:19: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 E617AE03F99; Tue, 19 Sep 2017 08:19: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 B4ABD702EF; Tue, 19 Sep 2017 08:19: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 v8J8JlZj030277; Tue, 19 Sep 2017 08:19:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8JlKL030276; Tue, 19 Sep 2017 08:19:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190819.v8J8JlKL030276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:19:47 +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: r323740 - stable/11/usr.sbin/bhyveload X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/usr.sbin/bhyveload X-SVN-Commit-Revision: 323740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:19:49 -0000 Author: avg Date: Tue Sep 19 08:19:47 2017 New Revision: 323740 URL: https://svnweb.freebsd.org/changeset/base/323740 Log: MFV r320195: bhyveload: correctly query size of disks On FreeBSD fstat(2) works fine for querying sizes of plain files, but not so much for character devices. So, use DIOCGMEDIASIZE to try to get the correct size for disks and disk-like devices (e.g. zvols). PR: 220186 Modified: stable/11/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- stable/11/usr.sbin/bhyveload/bhyveload.c Tue Sep 19 08:19:20 2017 (r323739) +++ stable/11/usr.sbin/bhyveload/bhyveload.c Tue Sep 19 08:19:47 2017 (r323740) @@ -311,10 +311,12 @@ cb_diskioctl(void *arg, int unit, u_long cmd, void *da *(u_int *)data = 512; break; case DIOCGMEDIASIZE: - if (fstat(disk_fd[unit], &sb) == 0) - *(off_t *)data = sb.st_size; - else + if (fstat(disk_fd[unit], &sb) != 0) return (ENOTTY); + if (S_ISCHR(sb.st_mode) && + ioctl(disk_fd[unit], DIOCGMEDIASIZE, &sb.st_size) != 0) + return (ENOTTY); + *(off_t *)data = sb.st_size; break; default: return (ENOTTY); From owner-svn-src-all@freebsd.org Tue Sep 19 08:29:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 050D5E046BF; Tue, 19 Sep 2017 08:29: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 C6609708B9; Tue, 19 Sep 2017 08:29:09 +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 v8J8T8Zg034512; Tue, 19 Sep 2017 08:29:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8T8tG034511; Tue, 19 Sep 2017 08:29:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190829.v8J8T8tG034511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:29:08 +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: r323741 - stable/11/sys/dev/jedec_ts X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/jedec_ts X-SVN-Commit-Revision: 323741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:29:10 -0000 Author: avg Date: Tue Sep 19 08:29:08 2017 New Revision: 323741 URL: https://svnweb.freebsd.org/changeset/base/323741 Log: MFC r320266: jedec_ts: add support for devices manufactured by IDT Full manufacturer name is Integrated Device Technology, Inc. Supported devices include TSE2002B3C and TS3000B3A. Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/11/sys/dev/jedec_ts/jedec_ts.c Tue Sep 19 08:19:47 2017 (r323740) +++ stable/11/sys/dev/jedec_ts/jedec_ts.c Tue Sep 19 08:29:08 2017 (r323741) @@ -131,6 +131,13 @@ ts_attach(device_t dev) * E.g. STT424E02, Doc ID 13448 Rev 8, * section 4.6, page 26. */ + } else if (vendorid == 0xb3 && (devid & 0xff00) == 0x2900) { + /* + * IDT TS3000B3A and TSE2002B3C chips and their variants. + * Revision IDs (the lower byte) can vary. + * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf + * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf + */ } else { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" From owner-svn-src-all@freebsd.org Tue Sep 19 08:29: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 B834FE04817; Tue, 19 Sep 2017 08:29: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 870B170A53; Tue, 19 Sep 2017 08:29: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 v8J8Tr1S034590; Tue, 19 Sep 2017 08:29:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8TrLl034589; Tue, 19 Sep 2017 08:29:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190829.v8J8TrLl034589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323742 - stable/10/sys/dev/jedec_ts X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/jedec_ts X-SVN-Commit-Revision: 323742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:29:54 -0000 Author: avg Date: Tue Sep 19 08:29:53 2017 New Revision: 323742 URL: https://svnweb.freebsd.org/changeset/base/323742 Log: MFC r320266: jedec_ts: add support for devices manufactured by IDT Full manufacturer name is Integrated Device Technology, Inc. Supported devices include TSE2002B3C and TS3000B3A. Modified: stable/10/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/10/sys/dev/jedec_ts/jedec_ts.c Tue Sep 19 08:29:08 2017 (r323741) +++ stable/10/sys/dev/jedec_ts/jedec_ts.c Tue Sep 19 08:29:53 2017 (r323742) @@ -131,6 +131,13 @@ ts_attach(device_t dev) * E.g. STT424E02, Doc ID 13448 Rev 8, * section 4.6, page 26. */ + } else if (vendorid == 0xb3 && (devid & 0xff00) == 0x2900) { + /* + * IDT TS3000B3A and TSE2002B3C chips and their variants. + * Revision IDs (the lower byte) can vary. + * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf + * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf + */ } else { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" From owner-svn-src-all@freebsd.org Tue Sep 19 08:34: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 D37A4E04CAD; Tue, 19 Sep 2017 08:34:04 +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 A0B8A70F62; Tue, 19 Sep 2017 08:34:04 +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 v8J8Y3c6038368; Tue, 19 Sep 2017 08:34:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8Y3gY038367; Tue, 19 Sep 2017 08:34:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190834.v8J8Y3gY038367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323743 - stable/11/contrib/tcp_wrappers X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/contrib/tcp_wrappers X-SVN-Commit-Revision: 323743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:34:04 -0000 Author: avg Date: Tue Sep 19 08:34:03 2017 New Revision: 323743 URL: https://svnweb.freebsd.org/changeset/base/323743 Log: MFC r320151: remove bogus declaration of malloc from tcp_wrappers The declaration was already inactive when INET6 was enabled and it causes a build error in the other case because of a conflict with the correct definition in stdlib.h. Modified: stable/11/contrib/tcp_wrappers/scaffold.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/tcp_wrappers/scaffold.c ============================================================================== --- stable/11/contrib/tcp_wrappers/scaffold.c Tue Sep 19 08:29:53 2017 (r323742) +++ stable/11/contrib/tcp_wrappers/scaffold.c Tue Sep 19 08:34:03 2017 (r323743) @@ -27,10 +27,6 @@ static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ #endif -#ifndef INET6 -extern char *malloc(); -#endif - /* Application-specific. */ #include "tcpd.h" From owner-svn-src-all@freebsd.org Tue Sep 19 08:34: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 67DF5E04D0A; Tue, 19 Sep 2017 08:34:14 +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 351C170FD9; Tue, 19 Sep 2017 08:34:14 +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 v8J8YDPB038424; Tue, 19 Sep 2017 08:34:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8YDNj038423; Tue, 19 Sep 2017 08:34:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190834.v8J8YDNj038423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:34: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: r323744 - stable/10/contrib/tcp_wrappers X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/contrib/tcp_wrappers X-SVN-Commit-Revision: 323744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:34:14 -0000 Author: avg Date: Tue Sep 19 08:34:13 2017 New Revision: 323744 URL: https://svnweb.freebsd.org/changeset/base/323744 Log: MFC r320151: remove bogus declaration of malloc from tcp_wrappers The declaration was already inactive when INET6 was enabled and it causes a build error in the other case because of a conflict with the correct definition in stdlib.h. Modified: stable/10/contrib/tcp_wrappers/scaffold.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tcp_wrappers/scaffold.c ============================================================================== --- stable/10/contrib/tcp_wrappers/scaffold.c Tue Sep 19 08:34:03 2017 (r323743) +++ stable/10/contrib/tcp_wrappers/scaffold.c Tue Sep 19 08:34:13 2017 (r323744) @@ -27,10 +27,6 @@ static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ #endif -#ifndef INET6 -extern char *malloc(); -#endif - /* Application-specific. */ #include "tcpd.h" From owner-svn-src-all@freebsd.org Tue Sep 19 08: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 C1653E050E2; Tue, 19 Sep 2017 08:39:55 +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 9D73471288; Tue, 19 Sep 2017 08:39:55 +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 v8J8dsrk038719; Tue, 19 Sep 2017 08:39:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8dsot038716; Tue, 19 Sep 2017 08:39:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190839.v8J8dsot038716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323745 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 323745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:39:55 -0000 Author: avg Date: Tue Sep 19 08:39:54 2017 New Revision: 323745 URL: https://svnweb.freebsd.org/changeset/base/323745 Log: MFC r320352: zfs: port vdev_file part of illumos change 3306 3306 zdb should be able to issue reads in parallel illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1 https://www.illumos.org/issues/3306 The upstream change was made before we started to import upstream commits individually. It was imported into the illumos vendor area as r242733. That commit was MFV-ed in r260138, but as the commit message says vdev_file.c was left intact. This commit actually implements the parallel I/O for vdev_file using a taskqueue with multiple thread. This implementation does not depend on the illumos or FreeBSD bio interface at all, but uses zio_t to pass around all the relevent data. So, the code looks a bit different from the upstream. This commit also incorporates ZoL commit zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed https://github.com/zfsonlinux/zfs/issues/2270 We need to use a dedicated taskqueue for exactly the same reason as ZoL as we do not implement TASKQ_DYNAMIC. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Sep 19 08:34:13 2017 (r323744) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Sep 19 08:39:54 2017 (r323745) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -2013,6 +2014,7 @@ spa_init(int mode) dmu_init(); zil_init(); vdev_cache_stat_init(); + vdev_file_init(); zfs_prop_init(); zpool_prop_init(); zpool_feature_init(); @@ -2032,6 +2034,7 @@ spa_fini(void) spa_evict_all(); + vdev_file_fini(); vdev_cache_stat_fini(); zil_fini(); dmu_fini(); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Tue Sep 19 08:34:13 2017 (r323744) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Tue Sep 19 08:39:54 2017 (r323745) @@ -39,6 +39,9 @@ typedef struct vdev_file { vnode_t *vf_vnode; } vdev_file_t; +extern void vdev_file_init(void); +extern void vdev_file_fini(void); + #ifdef __cplusplus } #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Sep 19 08:34:13 2017 (r323744) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Sep 19 08:39:54 2017 (r323745) @@ -35,6 +35,21 @@ * Virtual device vector for files. */ +static taskq_t *vdev_file_taskq; + +void +vdev_file_init(void) +{ + vdev_file_taskq = taskq_create("z_vdev_file", MAX(max_ncpus, 16), + minclsyspri, max_ncpus, INT_MAX, 0); +} + +void +vdev_file_fini(void) +{ + taskq_destroy(vdev_file_taskq); +} + static void vdev_file_hold(vdev_t *vd) { @@ -156,27 +171,58 @@ vdev_file_close(vdev_t *vd) vd->vdev_tsd = NULL; } +/* + * Implements the interrupt side for file vdev types. This routine will be + * called when the I/O completes allowing us to transfer the I/O to the + * interrupt taskqs. For consistency, the code structure mimics disk vdev + * types. + */ static void -vdev_file_io_start(zio_t *zio) +vdev_file_io_intr(zio_t *zio) { + zio_delay_interrupt(zio); +} + +static void +vdev_file_io_strategy(void *arg) +{ + zio_t *zio = arg; vdev_t *vd = zio->io_vd; vdev_file_t *vf; vnode_t *vp; ssize_t resid; - if (!vdev_readable(vd)) { - zio->io_error = SET_ERROR(ENXIO); - zio_interrupt(zio); - return; - } - vf = vd->vdev_tsd; vp = vf->vf_vnode; + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); + zio->io_error = vn_rdwr(zio->io_type == ZIO_TYPE_READ ? + UIO_READ : UIO_WRITE, vp, zio->io_data, zio->io_size, + zio->io_offset, UIO_SYSSPACE, 0, RLIM64_INFINITY, kcred, &resid); + + if (resid != 0 && zio->io_error == 0) + zio->io_error = ENOSPC; + + vdev_file_io_intr(zio); +} + +static void +vdev_file_io_start(zio_t *zio) +{ + vdev_t *vd = zio->io_vd; + vdev_file_t *vf = vd->vdev_tsd; + if (zio->io_type == ZIO_TYPE_IOCTL) { + /* XXPOLICY */ + if (!vdev_readable(vd)) { + zio->io_error = SET_ERROR(ENXIO); + zio_interrupt(zio); + return; + } + switch (zio->io_cmd) { case DKIOCFLUSHWRITECACHE: - zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC, + zio->io_error = VOP_FSYNC(vf->vf_vnode, FSYNC | FDSYNC, kcred, NULL); break; default: @@ -190,19 +236,8 @@ vdev_file_io_start(zio_t *zio) ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); zio->io_target_timestamp = zio_handle_io_delay(zio); - zio->io_error = vn_rdwr(zio->io_type == ZIO_TYPE_READ ? - UIO_READ : UIO_WRITE, vp, zio->io_data, zio->io_size, - zio->io_offset, UIO_SYSSPACE, 0, RLIM64_INFINITY, kcred, &resid); - - if (resid != 0 && zio->io_error == 0) - zio->io_error = ENOSPC; - - zio_delay_interrupt(zio); - -#ifdef illumos - VERIFY3U(taskq_dispatch(system_taskq, vdev_file_io_strategy, bp, + VERIFY3U(taskq_dispatch(vdev_file_taskq, vdev_file_io_strategy, zio, TQ_SLEEP), !=, 0); -#endif } /* ARGSUSED */ From owner-svn-src-all@freebsd.org Tue Sep 19 08:43: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 669CFE0562D; Tue, 19 Sep 2017 08:43:17 +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 34A8071765; Tue, 19 Sep 2017 08:43: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 v8J8hGxu042701; Tue, 19 Sep 2017 08:43:16 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8hG8x042700; Tue, 19 Sep 2017 08:43:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190843.v8J8hG8x042700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:43:16 +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: r323746 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:43:17 -0000 Author: avg Date: Tue Sep 19 08:43:16 2017 New Revision: 323746 URL: https://svnweb.freebsd.org/changeset/base/323746 Log: MFC r321471: spa_import_rootpool should be able to handle an imported root pool That is required to support reboot -r with a new root filesystem being on an already imported pool. PR: 210721 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:39:54 2017 (r323745) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:16 2017 (r323746) @@ -4275,6 +4275,16 @@ spa_import_rootpool(const char *name) if ((spa = spa_lookup(pname)) != NULL) { /* + * The pool could already be imported, + * e.g., after reboot -r. + */ + if (spa->spa_state == POOL_STATE_ACTIVE) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); + return (0); + } + + /* * Remove the existing root pool from the namespace so * that we can replace it with the correct config * we just read in. From owner-svn-src-all@freebsd.org Tue Sep 19 08:43: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 053B2E056CC; Tue, 19 Sep 2017 08:43: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 C64B2718A5; Tue, 19 Sep 2017 08:43:46 +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 v8J8hjth042776; Tue, 19 Sep 2017 08:43:45 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8hjl6042775; Tue, 19 Sep 2017 08:43:45 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190843.v8J8hjl6042775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:43: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: r323747 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:43:47 -0000 Author: avg Date: Tue Sep 19 08:43:45 2017 New Revision: 323747 URL: https://svnweb.freebsd.org/changeset/base/323747 Log: MFC r321471: spa_import_rootpool should be able to handle an imported root pool That is required to support reboot -r with a new root filesystem being on an already imported pool. PR: 210721 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:16 2017 (r323746) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Sep 19 08:43:45 2017 (r323747) @@ -4179,6 +4179,16 @@ spa_import_rootpool(const char *name) if ((spa = spa_lookup(pname)) != NULL) { /* + * The pool could already be imported, + * e.g., after reboot -r. + */ + if (spa->spa_state == POOL_STATE_ACTIVE) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); + return (0); + } + + /* * Remove the existing root pool from the namespace so * that we can replace it with the correct config * we just read in. From owner-svn-src-all@freebsd.org Tue Sep 19 08:53:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3664EE05F8F; Tue, 19 Sep 2017 08:53:15 +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 1045A71FAF; Tue, 19 Sep 2017 08:53:14 +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 v8J8rEIO047247; Tue, 19 Sep 2017 08:53:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8rD2Q047243; Tue, 19 Sep 2017 08:53:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190853.v8J8rD2Q047243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323748 - in stable/11: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:53:15 -0000 Author: avg Date: Tue Sep 19 08:53:13 2017 New Revision: 323748 URL: https://svnweb.freebsd.org/changeset/base/323748 Log: MFC r322226: MFV r322223: 8378 crash due to bp in-memory modification of nopwrite block illumos/illumos-gate@b7edcb940884114e61382937505433c4c38c0278 https://github.com/illumos/illumos-gate/commit/b7edcb940884114e61382937505433c4c38c0278 https://www.illumos.org/issues/8378 The problem is that zfs_get_data() supplies a stale zgd_bp to dmu_sync(), which we then nopwrite against. zfs_get_data() doesn't hold any DMU-related locks, so after it copies db_blkptr to zgd_bp, dbuf_write_ready() could change db_blkptr, and dbuf_write_done() could remove the dirty record. dmu_sync() then sees the stale BP and that the dbuf it not dirty, so it is eligible for nop-writing. The fix is for dmu_sync() to copy db_blkptr to zgd_bp after acquiring the db_mtx. We could still see a stale db_blkptr, but if it is stale then the dirty record will still exist and thus we won't attempt to nopwrite. Reviewed by: Prakash Surya Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Sep 19 08:53:13 2017 (r323748) @@ -1838,7 +1838,6 @@ ztest_get_data(void *arg, lr_write_t *lr, char *buf, z uint64_t object = lr->lr_foid; uint64_t offset = lr->lr_offset; uint64_t size = lr->lr_length; - blkptr_t *bp = &lr->lr_blkptr; uint64_t txg = lr->lr_common.lrc_txg; uint64_t crtxg; dmu_object_info_t doi; @@ -1892,11 +1891,7 @@ ztest_get_data(void *arg, lr_write_t *lr, char *buf, z DMU_READ_NO_PREFETCH); if (error == 0) { - blkptr_t *obp = dmu_buf_get_blkptr(db); - if (obp) { - ASSERT(BP_IS_HOLE(bp)); - *bp = *obp; - } + blkptr_t *bp = &lr->lr_blkptr; zgd->zgd_db = db; zgd->zgd_bp = bp; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Sep 19 08:53:13 2017 (r323748) @@ -1657,6 +1657,7 @@ dmu_sync_done(zio_t *zio, arc_buf_t *buf, void *varg) uint8_t chksum = BP_GET_CHECKSUM(bp_orig); ASSERT(BP_EQUAL(bp, bp_orig)); + VERIFY(BP_EQUAL(bp, db->db_blkptr)); ASSERT(zio->io_prop.zp_compress != ZIO_COMPRESS_OFF); ASSERT(zio_checksum_table[chksum].ci_flags & ZCHECKSUM_FLAG_NOPWRITE); @@ -1697,19 +1698,11 @@ dmu_sync_late_arrival_done(zio_t *zio) blkptr_t *bp_orig = &zio->io_bp_orig; if (zio->io_error == 0 && !BP_IS_HOLE(bp)) { - /* - * If we didn't allocate a new block (i.e. ZIO_FLAG_NOPWRITE) - * then there is nothing to do here. Otherwise, free the - * newly allocated block in this txg. - */ - if (zio->io_flags & ZIO_FLAG_NOPWRITE) { - ASSERT(BP_EQUAL(bp, bp_orig)); - } else { - ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig)); - ASSERT(zio->io_bp->blk_birth == zio->io_txg); - ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa)); - zio_free(zio->io_spa, zio->io_txg, zio->io_bp); - } + ASSERT(!(zio->io_flags & ZIO_FLAG_NOPWRITE)); + ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig)); + ASSERT(zio->io_bp->blk_birth == zio->io_txg); + ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa)); + zio_free(zio->io_spa, zio->io_txg, zio->io_bp); } dmu_tx_commit(dsa->dsa_tx); @@ -1741,6 +1734,29 @@ dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sy dsa->dsa_zgd = zgd; dsa->dsa_tx = tx; + /* + * Since we are currently syncing this txg, it's nontrivial to + * determine what BP to nopwrite against, so we disable nopwrite. + * + * When syncing, the db_blkptr is initially the BP of the previous + * txg. We can not nopwrite against it because it will be changed + * (this is similar to the non-late-arrival case where the dbuf is + * dirty in a future txg). + * + * Then dbuf_write_ready() sets bp_blkptr to the location we will write. + * We can not nopwrite against it because although the BP will not + * (typically) be changed, the data has not yet been persisted to this + * location. + * + * Finally, when dbuf_write_done() is called, it is theoretically + * possible to always nopwrite, because the data that was written in + * this txg is the same data that we are trying to write. However we + * would need to check that this dbuf is not dirty in any future + * txg's (as we do in the normal dmu_sync() path). For simplicity, we + * don't nopwrite in this case. + */ + zp->zp_nopwrite = B_FALSE; + zio_nowait(zio_write(pio, os->os_spa, dmu_tx_get_txg(tx), zgd->zgd_bp, abd_get_from_buf(zgd->zgd_db->db_data, zgd->zgd_db->db_size), zgd->zgd_db->db_size, zgd->zgd_db->db_size, zp, @@ -1778,7 +1794,6 @@ dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sy int dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd) { - blkptr_t *bp = zgd->zgd_bp; dmu_buf_impl_t *db = (dmu_buf_impl_t *)zgd->zgd_db; objset_t *os = db->db_objset; dsl_dataset_t *ds = os->os_dsl_dataset; @@ -1845,6 +1860,21 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done ASSERT(dr->dr_next == NULL || dr->dr_next->dr_txg < txg); + if (db->db_blkptr != NULL) { + /* + * We need to fill in zgd_bp with the current blkptr so that + * the nopwrite code can check if we're writing the same + * data that's already on disk. We can only nopwrite if we + * are sure that after making the copy, db_blkptr will not + * change until our i/o completes. We ensure this by + * holding the db_mtx, and only allowing nopwrite if the + * block is not already dirty (see below). This is verified + * by dmu_sync_done(), which VERIFYs that the db_blkptr has + * not changed. + */ + *zgd->zgd_bp = *db->db_blkptr; + } + /* * Assume the on-disk data is X, the current syncing data (in * txg - 1) is Y, and the current in-memory data is Z (currently @@ -1896,7 +1926,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done dsa->dsa_tx = NULL; zio_nowait(arc_write(pio, os->os_spa, txg, - bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), + zgd->zgd_bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), &zp, dmu_sync_ready, NULL, NULL, dmu_sync_done, dsa, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL, &zb)); 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 Sep 19 08:43:45 2017 (r323747) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 19 08:53:13 2017 (r323748) @@ -1296,7 +1296,6 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio uint64_t object = lr->lr_foid; uint64_t offset = lr->lr_offset; uint64_t size = lr->lr_length; - blkptr_t *bp = &lr->lr_blkptr; dmu_buf_t *db; zgd_t *zgd; int error = 0; @@ -1373,11 +1372,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio DMU_READ_NO_PREFETCH); if (error == 0) { - blkptr_t *obp = dmu_buf_get_blkptr(db); - if (obp) { - ASSERT(BP_IS_HOLE(bp)); - *bp = *obp; - } + blkptr_t *bp = &lr->lr_blkptr; zgd->zgd_db = db; zgd->zgd_bp = bp; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Sep 19 08:43:45 2017 (r323747) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Sep 19 08:53:13 2017 (r323748) @@ -27,7 +27,7 @@ * Portions Copyright 2010 Robert Milkowski * * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -1340,7 +1340,6 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zi uint64_t object = ZVOL_OBJ; uint64_t offset = lr->lr_offset; uint64_t size = lr->lr_length; /* length of user data */ - blkptr_t *bp = &lr->lr_blkptr; dmu_buf_t *db; zgd_t *zgd; int error; @@ -1368,11 +1367,7 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zi error = dmu_buf_hold(os, object, offset, zgd, &db, DMU_READ_NO_PREFETCH); if (error == 0) { - blkptr_t *obp = dmu_buf_get_blkptr(db); - if (obp) { - ASSERT(BP_IS_HOLE(bp)); - *bp = *obp; - } + blkptr_t *bp = &lr->lr_blkptr; zgd->zgd_db = db; zgd->zgd_bp = bp; From owner-svn-src-all@freebsd.org Tue Sep 19 08:54:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09DEAE060A9; Tue, 19 Sep 2017 08:54:43 +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 C9F4472106; Tue, 19 Sep 2017 08:54:42 +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 v8J8sgd9047369; Tue, 19 Sep 2017 08:54:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8sgHj047368; Tue, 19 Sep 2017 08:54:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190854.v8J8sgHj047368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323749 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:54:43 -0000 Author: avg Date: Tue Sep 19 08:54:41 2017 New Revision: 323749 URL: https://svnweb.freebsd.org/changeset/base/323749 Log: MFC r322233: MFV r322232: 8426 mark immutable buffer arguments as such in abd.h illumos/illumos-gate@9b195260e22529ac0e2580faaf89402420589c1c https://github.com/illumos/illumos-gate/commit/9b195260e22529ac0e2580faaf89402420589c1c https://www.illumos.org/issues/8426 abd_copy_from_buf and abd_cmp_buf do not modify their void *buf arguments, so qualify them with const. abd_copy_from_buf_off and abd_cmp_buf_off already had that type for the corresponding arguments. Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Tue Sep 19 08:53:13 2017 (r323748) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Tue Sep 19 08:54:41 2017 (r323749) @@ -117,7 +117,7 @@ abd_copy(abd_t *dabd, abd_t *sabd, size_t size) } inline void -abd_copy_from_buf(abd_t *abd, void *buf, size_t size) +abd_copy_from_buf(abd_t *abd, const void *buf, size_t size) { abd_copy_from_buf_off(abd, buf, 0, size); } @@ -129,7 +129,7 @@ abd_copy_to_buf(void* buf, abd_t *abd, size_t size) } inline int -abd_cmp_buf(abd_t *abd, void *buf, size_t size) +abd_cmp_buf(abd_t *abd, const void *buf, size_t size) { return (abd_cmp_buf_off(abd, buf, 0, size)); } From owner-svn-src-all@freebsd.org Tue Sep 19 08: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 9D9DEE0625A; Tue, 19 Sep 2017 08:57:20 +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 79D2B72291; Tue, 19 Sep 2017 08:57:20 +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 v8J8vJLH047541; Tue, 19 Sep 2017 08:57:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8vJrM047540; Tue, 19 Sep 2017 08:57:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190857.v8J8vJrM047540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08: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: r323750 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:57:20 -0000 Author: avg Date: Tue Sep 19 08:57:19 2017 New Revision: 323750 URL: https://svnweb.freebsd.org/changeset/base/323750 Log: MFC r322237: MFV r322236: 8126 ztest assertion failed in dbuf_dirty due to dn_nlevels changing illumos/illumos-gate@dcb6872c565819ac88acbc2ece999ef241c8b982 https://github.com/illumos/illumos-gate/commit/dcb6872c565819ac88acbc2ece999ef241c8b982 https://www.illumos.org/issues/8126 The sync thread is concurrently modifying dn_phys->dn_nlevels while dbuf_dirty() is trying to assert something about it, without holding the necessary lock. We need to move this assertion further down in the function, after we have acquired the dn_struct_rwlock. Reviewed by: Pavel Zakharov Reviewed by: Serapheim Dimitropoulos Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Sep 19 08:54:41 2017 (r323749) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Sep 19 08:57:19 2017 (r323750) @@ -1542,11 +1542,6 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx) (dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN)); ASSERT3U(dn->dn_nlevels, >, db->db_level); - ASSERT((dn->dn_phys->dn_nlevels == 0 && db->db_level == 0) || - dn->dn_phys->dn_nlevels > db->db_level || - dn->dn_next_nlevels[txgoff] > db->db_level || - dn->dn_next_nlevels[(tx->tx_txg-1) & TXG_MASK] > db->db_level || - dn->dn_next_nlevels[(tx->tx_txg-2) & TXG_MASK] > db->db_level); /* * We should only be dirtying in syncing context if it's the @@ -1662,6 +1657,16 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx) rw_enter(&dn->dn_struct_rwlock, RW_READER); drop_struct_lock = TRUE; } + + /* + * We need to hold the dn_struct_rwlock to make this assertion, + * because it protects dn_phys / dn_next_nlevels from changing. + */ + ASSERT((dn->dn_phys->dn_nlevels == 0 && db->db_level == 0) || + dn->dn_phys->dn_nlevels > db->db_level || + dn->dn_next_nlevels[txgoff] > db->db_level || + dn->dn_next_nlevels[(tx->tx_txg-1) & TXG_MASK] > db->db_level || + dn->dn_next_nlevels[(tx->tx_txg-2) & TXG_MASK] > db->db_level); /* * If we are overwriting a dedup BP, then unless it is snapshotted, From owner-svn-src-all@freebsd.org Tue Sep 19 08:59: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 BFE14E0635D; Tue, 19 Sep 2017 08:59: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 8892C723E4; Tue, 19 Sep 2017 08:59: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 v8J8xBJP047691; Tue, 19 Sep 2017 08:59:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J8xBs4047690; Tue, 19 Sep 2017 08:59:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190859.v8J8xBs4047690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 08:59: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: r323751 - stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 323751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 08:59:12 -0000 Author: avg Date: Tue Sep 19 08:59:11 2017 New Revision: 323751 URL: https://svnweb.freebsd.org/changeset/base/323751 Log: MFC r322218: MFV r322217: 8418 zfs_prop_get_table() call in zfs_validate_name() is a no-op illumos/illumos-gate@e09ba01dcda5e24964b8632718777b39166d86e4 https://github.com/illumos/illumos-gate/commit/e09ba01dcda5e24964b8632718777b39166d86e4 https://www.illumos.org/issues/8418 The following line in zfs_validate_name() is just a no-op and it should be removed: 108 (void) zfs_prop_get_table(); Reviewed by: Vitaliy Gusev Approved by: Matthew Ahrens Author: Marcel Telka Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 08:57:19 2017 (r323750) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 08:59:11 2017 (r323751) @@ -103,7 +103,6 @@ zfs_validate_name(libzfs_handle_t *hdl, const char *pa namecheck_err_t why; char what; - (void) zfs_prop_get_table(); if (entity_namecheck(path, &why, &what) != 0) { if (hdl != NULL) { switch (why) { From owner-svn-src-all@freebsd.org Tue Sep 19 09:02:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ED79E069BB; Tue, 19 Sep 2017 09:02:27 +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 19DCF72A0E; Tue, 19 Sep 2017 09:02:27 +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 v8J92Qej051723; Tue, 19 Sep 2017 09:02:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J92Qpk051722; Tue, 19 Sep 2017 09:02:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190902.v8J92Qpk051722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:02:26 +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: r323752 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:02:27 -0000 Author: avg Date: Tue Sep 19 09:02:26 2017 New Revision: 323752 URL: https://svnweb.freebsd.org/changeset/base/323752 Log: MFC r322239: MFV r322238: 7915 checks in l2arc_evict could use some cleaning up illumos/illumos-gate@267ae6c3a88d2fc39276af66caafa978b0935b82 https://github.com/illumos/illumos-gate/commit/267ae6c3a88d2fc39276af66caafa978b0935b82 https://www.illumos.org/issues/7915 l2arc_evict() is strictly serialized with respect to l2arc_write_buffers() and l2arc_write_done(). Normally, l2arc_evict() and l2arc_write_buffers() are called from the same thread, so they can not be concurrent. Also, l2arc_write_buffers() uses zio_wait() on the parent zio of all cache zio-s. That ensures that l2arc_write_done() is completed before l2arc_write_buffers() returns. Finally, if a cache device is removed, then l2arc_evict() is called under SCL_ALL in the exclusive mode. That ensures that it can not be concurrent with the normal L2ARC accesses to the device (including writing and evicting buffers). Given the above, some checks and actions in l2arc_evict() do not make sense. For instance, it must never encounter the write head header let alone remove it from the buffer list. Reviewed by: Dan Kimmel Reviewed by: Prakash Surya Approved by: Matthew Ahrens Author: Andriy Gapon 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 Sep 19 08:59:11 2017 (r323751) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Sep 19 09:02:26 2017 (r323752) @@ -7314,18 +7314,16 @@ top: goto top; } - if (HDR_L2_WRITE_HEAD(hdr)) { - /* - * We hit a write head node. Leave it for - * l2arc_write_done(). - */ - list_remove(buflist, hdr); - mutex_exit(hash_lock); - continue; - } + /* + * A header can't be on this list if it doesn't have L2 header. + */ + ASSERT(HDR_HAS_L2HDR(hdr)); - if (!all && HDR_HAS_L2HDR(hdr) && - (hdr->b_l2hdr.b_daddr >= taddr || + /* Ensure this header has finished being written. */ + ASSERT(!HDR_L2_WRITING(hdr)); + ASSERT(!HDR_L2_WRITE_HEAD(hdr)); + + if (!all && (hdr->b_l2hdr.b_daddr >= taddr || hdr->b_l2hdr.b_daddr < dev->l2ad_hand)) { /* * We've evicted to the target address, @@ -7335,7 +7333,6 @@ top: break; } - ASSERT(HDR_HAS_L2HDR(hdr)); if (!HDR_HAS_L1HDR(hdr)) { ASSERT(!HDR_L2_READING(hdr)); /* @@ -7357,9 +7354,6 @@ top: ARCSTAT_BUMP(arcstat_l2_evict_reading); arc_hdr_set_flags(hdr, ARC_FLAG_L2_EVICTED); } - - /* Ensure this header has finished being written */ - ASSERT(!HDR_L2_WRITING(hdr)); arc_hdr_l2hdr_destroy(hdr); } From owner-svn-src-all@freebsd.org Tue Sep 19 09:04: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 31F26E06B54; Tue, 19 Sep 2017 09:04:31 +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 EF77C72BAB; Tue, 19 Sep 2017 09:04: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 v8J94UNm051858; Tue, 19 Sep 2017 09:04:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J94Urh051857; Tue, 19 Sep 2017 09:04:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190904.v8J94Urh051857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:04:30 +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: r323753 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:04:31 -0000 Author: avg Date: Tue Sep 19 09:04:29 2017 New Revision: 323753 URL: https://svnweb.freebsd.org/changeset/base/323753 Log: MFC r322234: zfs: no need for __DECONST after abd constification in r322233 Note that vdev_label_write_pad2() is FreeBSD specific. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Tue Sep 19 09:02:26 2017 (r323752) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Tue Sep 19 09:04:29 2017 (r323753) @@ -899,7 +899,7 @@ vdev_label_write_pad2(vdev_t *vd, const char *buf, siz pad2 = abd_alloc_for_io(VDEV_PAD_SIZE, B_TRUE); abd_zero(pad2, VDEV_PAD_SIZE); - abd_copy_from_buf(pad2, __DECONST(void *, buf), size); + abd_copy_from_buf(pad2, buf, size); retry: zio = zio_root(spa, NULL, NULL, flags); From owner-svn-src-all@freebsd.org Tue Sep 19 09:07: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 D3F9BE06FBD; Tue, 19 Sep 2017 09:07:52 +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 AEB9772FAC; Tue, 19 Sep 2017 09:07:52 +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 v8J97pEA052025; Tue, 19 Sep 2017 09:07:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J97pxL052024; Tue, 19 Sep 2017 09:07:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190907.v8J97pxL052024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:07: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: r323754 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:07:52 -0000 Author: avg Date: Tue Sep 19 09:07:51 2017 New Revision: 323754 URL: https://svnweb.freebsd.org/changeset/base/323754 Log: MFC r322222: MFV r322221: 7910 l2arc_write_buffers() may write beyond target_sz FreeBD note: the essence of this change was committed to FreeBSD in r314274. This commit catches up with differences between what was committed to FreeBSD and what was committed to OpenZFS, mainly more logical variable names. illumos/illumos-gate@16a7e5ac116c85d965007a5f201104b564e82210 https://github.com/illumos/illumos-gate/commit/16a7e5ac116c85d965007a5f201104b564e82210 https://www.illumos.org/issues/7910 It seems that the change in issue #6950 resurrected the problem that was earlier fixed by the change in issue #5219. Please also see the following FreeBSD bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216178 Reviewed by: George Wilson Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Andriy Gapon 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 Sep 19 09:04:29 2017 (r323753) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Sep 19 09:07:51 2017 (r323754) @@ -722,8 +722,8 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_abort_lowmem; kstat_named_t arcstat_l2_cksum_bad; kstat_named_t arcstat_l2_io_error; - kstat_named_t arcstat_l2_size; - kstat_named_t arcstat_l2_asize; + kstat_named_t arcstat_l2_lsize; + kstat_named_t arcstat_l2_psize; kstat_named_t arcstat_l2_hdr_size; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; @@ -3366,19 +3366,19 @@ arc_hdr_l2hdr_destroy(arc_buf_hdr_t *hdr) { l2arc_buf_hdr_t *l2hdr = &hdr->b_l2hdr; l2arc_dev_t *dev = l2hdr->b_dev; - uint64_t asize = arc_hdr_size(hdr); + uint64_t psize = arc_hdr_size(hdr); ASSERT(MUTEX_HELD(&dev->l2ad_mtx)); ASSERT(HDR_HAS_L2HDR(hdr)); list_remove(&dev->l2ad_buflist, hdr); - ARCSTAT_INCR(arcstat_l2_asize, -asize); - ARCSTAT_INCR(arcstat_l2_size, -HDR_GET_LSIZE(hdr)); + ARCSTAT_INCR(arcstat_l2_psize, -psize); + ARCSTAT_INCR(arcstat_l2_lsize, -HDR_GET_LSIZE(hdr)); - vdev_space_update(dev->l2ad_vdev, -asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, -psize, 0, 0); - (void) refcount_remove_many(&dev->l2ad_alloc, asize, hdr); + (void) refcount_remove_many(&dev->l2ad_alloc, psize, hdr); arc_hdr_clear_flags(hdr, ARC_FLAG_HAS_L2HDR); } @@ -7081,8 +7081,8 @@ top: l2arc_trim(hdr); arc_hdr_clear_flags(hdr, ARC_FLAG_HAS_L2HDR); - ARCSTAT_INCR(arcstat_l2_asize, -arc_hdr_size(hdr)); - ARCSTAT_INCR(arcstat_l2_size, -HDR_GET_LSIZE(hdr)); + ARCSTAT_INCR(arcstat_l2_psize, -arc_hdr_size(hdr)); + ARCSTAT_INCR(arcstat_l2_lsize, -HDR_GET_LSIZE(hdr)); bytes_dropped += arc_hdr_size(hdr); (void) refcount_remove_many(&dev->l2ad_alloc, @@ -7338,7 +7338,7 @@ top: /* * This doesn't exist in the ARC. Destroy. * arc_hdr_destroy() will call list_remove() - * and decrement arcstat_l2_size. + * and decrement arcstat_l2_lsize. */ arc_change_state(arc_anon, hdr, hash_lock); arc_hdr_destroy(hdr); @@ -7377,7 +7377,7 @@ static uint64_t l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) { arc_buf_hdr_t *hdr, *hdr_prev, *head; - uint64_t write_asize, write_psize, write_sz, headroom; + uint64_t write_asize, write_psize, write_lsize, headroom; boolean_t full; l2arc_write_callback_t *cb; zio_t *pio, *wzio; @@ -7387,7 +7387,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ASSERT3P(dev->l2ad_vdev, !=, NULL); pio = NULL; - write_sz = write_asize = write_psize = 0; + write_lsize = write_asize = write_psize = 0; full = B_FALSE; head = kmem_cache_alloc(hdr_l2only_cache, KM_PUSHPAGE); arc_hdr_set_flags(head, ARC_FLAG_L2_WRITE_HEAD | ARC_FLAG_HAS_L2HDR); @@ -7464,11 +7464,11 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ASSERT3U(HDR_GET_PSIZE(hdr), >, 0); ASSERT3P(hdr->b_l1hdr.b_pabd, !=, NULL); ASSERT3U(arc_hdr_size(hdr), >, 0); - uint64_t size = arc_hdr_size(hdr); + uint64_t psize = arc_hdr_size(hdr); uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, - size); + psize); - if ((write_psize + asize) > target_sz) { + if ((write_asize + asize) > target_sz) { full = B_TRUE; mutex_exit(hash_lock); ARCSTAT_BUMP(arcstat_l2_write_full); @@ -7503,7 +7503,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint list_insert_head(&dev->l2ad_buflist, hdr); mutex_exit(&dev->l2ad_mtx); - (void) refcount_add_many(&dev->l2ad_alloc, size, hdr); + (void) refcount_add_many(&dev->l2ad_alloc, psize, hdr); /* * Normally the L2ARC can use the hdr's data, but if @@ -7520,15 +7520,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint * add it to the l2arc_free_on_write queue. */ abd_t *to_write; - if (!HDR_SHARED_DATA(hdr) && size == asize) { + if (!HDR_SHARED_DATA(hdr) && psize == asize) { to_write = hdr->b_l1hdr.b_pabd; } else { to_write = abd_alloc_for_io(asize, HDR_ISTYPE_METADATA(hdr)); - abd_copy(to_write, hdr->b_l1hdr.b_pabd, size); - if (asize != size) { - abd_zero_off(to_write, size, - asize - size); + abd_copy(to_write, hdr->b_l1hdr.b_pabd, psize); + if (asize != psize) { + abd_zero_off(to_write, psize, + asize - psize); } l2arc_free_abd_on_write(to_write, asize, arc_buf_type(hdr)); @@ -7539,12 +7539,12 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_CANFAIL, B_FALSE); - write_sz += HDR_GET_LSIZE(hdr); + write_lsize += HDR_GET_LSIZE(hdr); DTRACE_PROBE2(l2arc__write, vdev_t *, dev->l2ad_vdev, zio_t *, wzio); - write_asize += size; - write_psize += asize; + write_psize += psize; + write_asize += asize; dev->l2ad_hand += asize; mutex_exit(hash_lock); @@ -7560,7 +7560,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint /* No buffers selected for writing? */ if (pio == NULL) { - ASSERT0(write_sz); + ASSERT0(write_lsize); ASSERT(!HDR_HAS_L1HDR(head)); kmem_cache_free(hdr_l2only_cache, head); return (0); @@ -7568,10 +7568,10 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint 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); - ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + ARCSTAT_INCR(arcstat_l2_write_bytes, write_psize); + ARCSTAT_INCR(arcstat_l2_lsize, write_lsize); + ARCSTAT_INCR(arcstat_l2_psize, write_psize); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. From owner-svn-src-all@freebsd.org Tue Sep 19 09:11: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 E44B9E073AE; Tue, 19 Sep 2017 09:11:08 +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 B0FC7733A1; Tue, 19 Sep 2017 09:11:08 +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 v8J9B7Bf052984; Tue, 19 Sep 2017 09:11:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9B7Wh052983; Tue, 19 Sep 2017 09:11:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190911.v8J9B7Wh052983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:11: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: r323755 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:11:09 -0000 Author: avg Date: Tue Sep 19 09:11:07 2017 New Revision: 323755 URL: https://svnweb.freebsd.org/changeset/base/323755 Log: MFC r322228: MFV r322227: 8377 Panic in bookmark deletion illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e https://www.illumos.org/issues/8377 The problem is that when dsl_bookmark_destroy_check() is executed from open context (the pre-check), it fills in dbda_success based on the existence of the bookmark. But the bookmark (or containing filesystem as in this case) can be destroyed before we get to syncing context. When we re-run dsl_bookmark_destroy_check() in syncing context, it will not add the deleted bookmark to dbda_success, intending for dsl_bookmark_destroy_sync() to not process it. But because the bookmark is still in dbda_success from the open-context call, we do try to destroy it. The fix is that dsl_bookmark_destroy_check() should not modify dbda_success when called from open context. Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Tue Sep 19 09:07:51 2017 (r323754) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Tue Sep 19 09:11:07 2017 (r323755) @@ -354,6 +354,9 @@ dsl_bookmark_destroy_check(void *arg, dmu_tx_t *tx) dsl_pool_t *dp = dmu_tx_pool(tx); int rv = 0; + ASSERT(nvlist_empty(dbda->dbda_success)); + ASSERT(nvlist_empty(dbda->dbda_errors)); + if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_BOOKMARKS)) return (0); @@ -383,7 +386,10 @@ dsl_bookmark_destroy_check(void *arg, dmu_tx_t *tx) } } if (error == 0) { - fnvlist_add_boolean(dbda->dbda_success, fullname); + if (dmu_tx_is_syncing(tx)) { + fnvlist_add_boolean(dbda->dbda_success, + fullname); + } } else { fnvlist_add_int32(dbda->dbda_errors, fullname, error); rv = error; From owner-svn-src-all@freebsd.org Tue Sep 19 09:15: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 31419E07788; Tue, 19 Sep 2017 09:15:09 +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 F196673664; Tue, 19 Sep 2017 09:15:08 +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 v8J9F89m055959; Tue, 19 Sep 2017 09:15:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9F8W4055958; Tue, 19 Sep 2017 09:15:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190915.v8J9F8W4055958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323756 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:15:09 -0000 Author: avg Date: Tue Sep 19 09:15:07 2017 New Revision: 323756 URL: https://svnweb.freebsd.org/changeset/base/323756 Log: MFC r322228: MFV r322227: 8377 Panic in bookmark deletion illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e https://www.illumos.org/issues/8377 The problem is that when dsl_bookmark_destroy_check() is executed from open context (the pre-check), it fills in dbda_success based on the existence of the bookmark. But the bookmark (or containing filesystem as in this case) can be destroyed before we get to syncing context. When we re-run dsl_bookmark_destroy_check() in syncing context, it will not add the deleted bookmark to dbda_success, intending for dsl_bookmark_destroy_sync() to not process it. But because the bookmark is still in dbda_success from the open-context call, we do try to destroy it. The fix is that dsl_bookmark_destroy_check() should not modify dbda_success when called from open context. Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Tue Sep 19 09:11:07 2017 (r323755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Tue Sep 19 09:15:07 2017 (r323756) @@ -356,6 +356,9 @@ dsl_bookmark_destroy_check(void *arg, dmu_tx_t *tx) dsl_pool_t *dp = dmu_tx_pool(tx); int rv = 0; + ASSERT(nvlist_empty(dbda->dbda_success)); + ASSERT(nvlist_empty(dbda->dbda_errors)); + if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_BOOKMARKS)) return (0); @@ -385,7 +388,10 @@ dsl_bookmark_destroy_check(void *arg, dmu_tx_t *tx) } } if (error == 0) { - fnvlist_add_boolean(dbda->dbda_success, fullname); + if (dmu_tx_is_syncing(tx)) { + fnvlist_add_boolean(dbda->dbda_success, + fullname); + } } else { fnvlist_add_int32(dbda->dbda_errors, fullname, error); rv = error; From owner-svn-src-all@freebsd.org Tue Sep 19 09: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 E5CEEE07AA4; Tue, 19 Sep 2017 09:19:20 +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 A66C173873; Tue, 19 Sep 2017 09:19:20 +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 v8J9JJSF056160; Tue, 19 Sep 2017 09:19:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9JJY0056154; Tue, 19 Sep 2017 09:19:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190919.v8J9JJY0056154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09: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: r323757 - in stable/11: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/openso... X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/s... X-SVN-Commit-Revision: 323757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:19:21 -0000 Author: avg Date: Tue Sep 19 09:19:19 2017 New Revision: 323757 URL: https://svnweb.freebsd.org/changeset/base/323757 Log: MFC r322230: MFV r322229: 7600 zfs rollback should pass target snapshot to kernel illumos/illumos-gate@77b171372ed21642e04c873ef1e87fe2365520df https://github.com/illumos/illumos-gate/commit/77b171372ed21642e04c873ef1e87fe2365520df https://www.illumos.org/issues/7600 At present, the kernel side code seems to blindly rollback to whatever happens to be the latest snapshot at the time when the rollback task is processed. The expected target's name should be passed to the kernel driver and the sync task should validate that the target exists and that it is the latest snapshot indeed. Reviewed by: Matthew Ahrens Reviewed by: Pavel Zakharov Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Sep 19 09:19:19 2017 (r323757) @@ -3957,14 +3957,19 @@ zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, bo } /* - * We rely on zfs_iter_children() to verify that there are no - * newer snapshots for the given dataset. Therefore, we can - * simply pass the name on to the ioctl() call. There is still - * an unlikely race condition where the user has taken a - * snapshot since we verified that this was the most recent. + * Pass both the filesystem and the wanted snapshot names, + * we would get an error back if the snapshot is destroyed or + * a new snapshot is created before this request is processed. */ - err = lzc_rollback(zhp->zfs_name, NULL, 0); - if (err != 0) { + err = lzc_rollback_to(zhp->zfs_name, snap->zfs_name); + if (err == EXDEV) { + zfs_error_aux(zhp->zfs_hdl, dgettext(TEXT_DOMAIN, + "'%s' is not the latest snapshot"), snap->zfs_name); + (void) zfs_error_fmt(zhp->zfs_hdl, EZFS_BUSY, + dgettext(TEXT_DOMAIN, "cannot rollback '%s'"), + zhp->zfs_name); + return (err); + } else if (err != 0) { (void) zfs_standard_error_fmt(zhp->zfs_hdl, errno, dgettext(TEXT_DOMAIN, "cannot rollback '%s'"), zhp->zfs_name); Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Sep 19 09:19:19 2017 (r323757) @@ -765,6 +765,9 @@ lzc_receive_with_header(const char *snapname, nvlist_t * Roll back this filesystem or volume to its most recent snapshot. * If snapnamebuf is not NULL, it will be filled in with the name * of the most recent snapshot. + * Note that the latest snapshot may change if a new one is concurrently + * created or the current one is destroyed. lzc_rollback_to can be used + * to roll back to a specific latest snapshot. * * Return 0 on success or an errno on failure. */ @@ -784,6 +787,27 @@ lzc_rollback(const char *fsname, char *snapnamebuf, in } nvlist_free(result); + return (err); +} + +/* + * Roll back this filesystem or volume to the specified snapshot, + * if possible. + * + * Return 0 on success or an errno on failure. + */ +int +lzc_rollback_to(const char *fsname, const char *snapname) +{ + nvlist_t *args; + nvlist_t *result; + int err; + + args = fnvlist_alloc(); + fnvlist_add_string(args, "target", snapname); + err = lzc_ioctl(ZFS_IOC_ROLLBACK, fsname, args, &result); + nvlist_free(args); + nvlist_free(result); return (err); } Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h Tue Sep 19 09:19:19 2017 (r323757) @@ -84,6 +84,7 @@ int lzc_receive_with_header(const char *, nvlist_t *, boolean_t lzc_exists(const char *); int lzc_rollback(const char *, char *, int); +int lzc_rollback_to(const char *, const char *); #ifdef __cplusplus } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Sep 19 09:19:19 2017 (r323757) @@ -2259,6 +2259,7 @@ dsl_dataset_handoff_check(dsl_dataset_t *ds, void *own typedef struct dsl_dataset_rollback_arg { const char *ddra_fsname; + const char *ddra_tosnap; void *ddra_owner; nvlist_t *ddra_result; } dsl_dataset_rollback_arg_t; @@ -2300,6 +2301,18 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) return (SET_ERROR(EAGAIN)); } + /* + * If the expected target snapshot is specified, then check that + * the latest snapshot is it. + */ + if (ddra->ddra_tosnap != NULL) { + char namebuf[ZFS_MAX_DATASET_NAME_LEN]; + + dsl_dataset_name(ds->ds_prev, namebuf); + if (strcmp(namebuf, ddra->ddra_tosnap) != 0) + return (SET_ERROR(EXDEV)); + } + /* must not have any bookmarks after the most recent snapshot */ nvlist_t *proprequest = fnvlist_alloc(); fnvlist_add_boolean(proprequest, zfs_prop_to_name(ZFS_PROP_CREATETXG)); @@ -2401,11 +2414,13 @@ dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx) * notes above zfs_suspend_fs() for further details. */ int -dsl_dataset_rollback(const char *fsname, void *owner, nvlist_t *result) +dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner, + nvlist_t *result) { dsl_dataset_rollback_arg_t ddra; ddra.ddra_fsname = fsname; + ddra.ddra_tosnap = tosnap; ddra.ddra_owner = owner; ddra.ddra_result = result; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Sep 19 09:19:19 2017 (r323757) @@ -334,7 +334,8 @@ void dsl_dataset_set_refreservation_sync_impl(dsl_data void dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx); boolean_t dsl_dataset_is_zapified(dsl_dataset_t *ds); boolean_t dsl_dataset_has_resume_receive_state(dsl_dataset_t *ds); -int dsl_dataset_rollback(const char *fsname, void *owner, nvlist_t *result); +int dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner, + nvlist_t *result); void dsl_dataset_deactivate_feature(uint64_t dsobj, spa_feature_t f, dmu_tx_t *tx); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 19 09:15:07 2017 (r323756) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 19 09:19:19 2017 (r323757) @@ -3779,18 +3779,29 @@ zfs_ioc_destroy(zfs_cmd_t *zc) /* * fsname is name of dataset to rollback (to most recent snapshot) * - * innvl is not used. + * innvl may contain name of expected target snapshot * * outnvl: "target" -> name of most recent snapshot * } */ /* ARGSUSED */ static int -zfs_ioc_rollback(const char *fsname, nvlist_t *args, nvlist_t *outnvl) +zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) { zfsvfs_t *zfsvfs; + char *target = NULL; int error; + (void) nvlist_lookup_string(innvl, "target", &target); + if (target != NULL) { + int fslen = strlen(fsname); + + if (strncmp(fsname, target, fslen) != 0) + return (SET_ERROR(EINVAL)); + if (target[fslen] != '@') + return (SET_ERROR(EINVAL)); + } + if (getzfsvfs(fsname, &zfsvfs) == 0) { dsl_dataset_t *ds; @@ -3799,7 +3810,8 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *args, n if (error == 0) { int resume_err; - error = dsl_dataset_rollback(fsname, zfsvfs, outnvl); + error = dsl_dataset_rollback(fsname, target, zfsvfs, + outnvl); resume_err = zfs_resume_fs(zfsvfs, ds); error = error ? error : resume_err; } @@ -3809,7 +3821,7 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *args, n vfs_unbusy(zfsvfs->z_vfs); #endif } else { - error = dsl_dataset_rollback(fsname, NULL, outnvl); + error = dsl_dataset_rollback(fsname, target, NULL, outnvl); } return (error); } From owner-svn-src-all@freebsd.org Tue Sep 19 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 58FC0E07F0E; Tue, 19 Sep 2017 09:23: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 274A373D45; Tue, 19 Sep 2017 09:23:40 +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 v8J9NdjY060133; Tue, 19 Sep 2017 09:23:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9NdXM060132; Tue, 19 Sep 2017 09:23:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190923.v8J9NdXM060132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:23: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: r323758 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:23:40 -0000 Author: avg Date: Tue Sep 19 09:23:39 2017 New Revision: 323758 URL: https://svnweb.freebsd.org/changeset/base/323758 Log: MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for smoothly merging zpool checkpoint & MMP in ZFS illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://www.illumos.org/issues/8491 The zpool checkpoint feature in DxOS added a new field in the uberblock. The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279). As these two changes come from two different sources and once upstreamed and deployed will introduce an incompatibility with each other we want to upstream a change that will reserve the padding for both of them so integration goes smoothly and everyone gets both features. Reviewed by: Matthew Ahrens Reviewed by: Brian Behlendorf Reviewed by: Olaf Faaland Approved by: Gordon Ross Author: Serapheim Dimitropoulos Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Tue Sep 19 09:19:19 2017 (r323757) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Tue Sep 19 09:23:39 2017 (r323758) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017 by Delphix. All rights reserved. */ #ifndef _SYS_UBERBLOCK_IMPL_H @@ -54,6 +55,12 @@ struct uberblock { /* highest SPA_VERSION supported by software that wrote this txg */ uint64_t ub_software_version; + + /* These fields are reserved for features that are under development: */ + uint64_t ub_mmp_magic; + uint64_t ub_mmp_delay; + uint64_t ub_mmp_seq; + uint64_t ub_checkpoint_txg; }; #ifdef __cplusplus From owner-svn-src-all@freebsd.org Tue Sep 19 09:26:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C97B3E08165; Tue, 19 Sep 2017 09:26:14 +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 9608E73EF0; Tue, 19 Sep 2017 09:26:14 +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 v8J9QDJl060295; Tue, 19 Sep 2017 09:26:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9QD2F060294; Tue, 19 Sep 2017 09:26:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190926.v8J9QD2F060294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:26: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: r323759 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:26:14 -0000 Author: avg Date: Tue Sep 19 09:26:13 2017 New Revision: 323759 URL: https://svnweb.freebsd.org/changeset/base/323759 Log: MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space for smoothly merging zpool checkpoint & MMP in ZFS illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://www.illumos.org/issues/8491 The zpool checkpoint feature in DxOS added a new field in the uberblock. The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279). As these two changes come from two different sources and once upstreamed and deployed will introduce an incompatibility with each other we want to upstream a change that will reserve the padding for both of them so integration goes smoothly and everyone gets both features. Reviewed by: Matthew Ahrens Reviewed by: Brian Behlendorf Reviewed by: Olaf Faaland Approved by: Gordon Ross Author: Serapheim Dimitropoulos Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Tue Sep 19 09:23:39 2017 (r323758) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h Tue Sep 19 09:26:13 2017 (r323759) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017 by Delphix. All rights reserved. */ #ifndef _SYS_UBERBLOCK_IMPL_H @@ -54,6 +55,12 @@ struct uberblock { /* highest SPA_VERSION supported by software that wrote this txg */ uint64_t ub_software_version; + + /* These fields are reserved for features that are under development: */ + uint64_t ub_mmp_magic; + uint64_t ub_mmp_delay; + uint64_t ub_mmp_seq; + uint64_t ub_checkpoint_txg; }; #ifdef __cplusplus From owner-svn-src-all@freebsd.org Tue Sep 19 09: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 118BBE08939; Tue, 19 Sep 2017 09:35:09 +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 E03667451D; Tue, 19 Sep 2017 09:35:08 +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 v8J9Z8LG064494; Tue, 19 Sep 2017 09:35:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9Z87t064493; Tue, 19 Sep 2017 09:35:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190935.v8J9Z87t064493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:35:08 +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: r323760 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:35:09 -0000 Author: avg Date: Tue Sep 19 09:35:07 2017 New Revision: 323760 URL: https://svnweb.freebsd.org/changeset/base/323760 Log: MFC r323435: MFV r323111: 8569 problem with inline functions in abd.h illumos/illumos-gate@37e84ab74e939caf52150fc3352081786ecc0c29 https://github.com/illumos/illumos-gate/commit/37e84ab74e939caf52150fc3352081786ecc0c29 https://www.illumos.org/issues/8569 C [C99] has peculiar rules for inline functions that are different from the C++ rules. Unlike C++ where inline is "fire and forget", in C a programmer must pay attention to the function's storage class / visibility. The main problem is with the case where a compiler decides to not inline a call to the function declared as inline. Some relevant links: - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15831.html - http://www.drdobbs.com/the-new-c-inline-functions/184401540 The summary is that either the inline functions should be declared 'static inline' or one of the compilation units (.c files) must provide a callable externally visible function definition. In the former case, the compiler would automatically create a local non-inlined function instance in every compilation unit where it's needed. In the latter case the single external definition is used to satisfy any non-inlined calls in all compilation units. As things stand right now, we can get an undefined reference error under certain combinations of compilers and compiler options. For example, this is what I get on FreeBSD when compiling with clang 4.0.0 and -O1: In function `abd_free': /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:385: undefined reference to `abd_is_linear' Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Andriy Gapon Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Tue Sep 19 09:26:13 2017 (r323759) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Tue Sep 19 09:35:07 2017 (r323760) @@ -157,6 +157,13 @@ extern vmem_t *zio_alloc_arena; kmem_cache_t *abd_chunk_cache; static kstat_t *abd_ksp; +extern inline boolean_t abd_is_linear(abd_t *abd); +extern inline void abd_copy(abd_t *dabd, abd_t *sabd, size_t size); +extern inline void abd_copy_from_buf(abd_t *abd, const void *buf, size_t size); +extern inline void abd_copy_to_buf(void* buf, abd_t *abd, size_t size); +extern inline int abd_cmp_buf(abd_t *abd, const void *buf, size_t size); +extern inline void abd_zero(abd_t *abd, size_t size); + static void * abd_alloc_chunk() { From owner-svn-src-all@freebsd.org Tue Sep 19 09:39: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 CFA34E08C4E; Tue, 19 Sep 2017 09:39:49 +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 9DB4774757; Tue, 19 Sep 2017 09:39: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 v8J9dmLG064701; Tue, 19 Sep 2017 09:39:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8J9dmE9064700; Tue, 19 Sep 2017 09:39:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709190939.v8J9dmE9064700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 09:39: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: r323761 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:39:49 -0000 Author: avg Date: Tue Sep 19 09:39:48 2017 New Revision: 323761 URL: https://svnweb.freebsd.org/changeset/base/323761 Log: MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives None of the tagged functions had unused parameters. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.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 Sep 19 09:35:07 2017 (r323760) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 19 09:39:48 2017 (r323761) @@ -434,7 +434,6 @@ zfsctl_root(zfsvfs_t *zfsvfs, int flags, vnode_t **vpp /* * Common open routine. Disallow any write access. */ -/* ARGSUSED */ static int zfsctl_common_open(struct vop_open_args *ap) { @@ -459,7 +458,6 @@ zfsctl_common_close(struct vop_close_args *ap) /* * Common access routine. Disallow writes. */ -/* ARGSUSED */ static int zfsctl_common_access(ap) struct vop_access_args /* { @@ -515,7 +513,6 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_nlink = 2; } -/*ARGSUSED*/ static int zfsctl_common_fid(ap) struct vop_fid_args /* { @@ -569,7 +566,6 @@ zfsctl_common_print(ap) /* * Get root directory attributes. */ -/* ARGSUSED */ static int zfsctl_root_getattr(ap) struct vop_getattr_args /* { @@ -821,7 +817,6 @@ zfsctl_snapshot_vnode_setup(vnode_t *vp, void *arg) * snapshot if it exist, creating the pseudo filesystem vnode as necessary. * Perform a mount of the associated dataset on top of the vnode. */ -/* ARGSUSED */ int zfsctl_snapdir_lookup(ap) struct vop_lookup_args /* { @@ -1013,7 +1008,6 @@ zfsctl_snapdir_readdir(ap) /* NOTREACHED */ } -/* ARGSUSED */ static int zfsctl_snapdir_getattr(ap) struct vop_getattr_args /* { From owner-svn-src-all@freebsd.org Tue Sep 19 12:43: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 3A196E11773; Tue, 19 Sep 2017 12:43:49 +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 07FDC7E7F1; Tue, 19 Sep 2017 12:43: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 v8JChmOW043066; Tue, 19 Sep 2017 12:43:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JChmW3043065; Tue, 19 Sep 2017 12:43:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709191243.v8JChmW3043065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 19 Sep 2017 12:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323762 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 12:43:49 -0000 Author: avg Date: Tue Sep 19 12:43:47 2017 New Revision: 323762 URL: https://svnweb.freebsd.org/changeset/base/323762 Log: MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directives None of the tagged functions had unused parameters. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.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 Sep 19 09:39:48 2017 (r323761) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 19 12:43:47 2017 (r323762) @@ -434,7 +434,6 @@ zfsctl_root(zfsvfs_t *zfsvfs, int flags, vnode_t **vpp /* * Common open routine. Disallow any write access. */ -/* ARGSUSED */ static int zfsctl_common_open(struct vop_open_args *ap) { @@ -459,7 +458,6 @@ zfsctl_common_close(struct vop_close_args *ap) /* * Common access routine. Disallow writes. */ -/* ARGSUSED */ static int zfsctl_common_access(ap) struct vop_access_args /* { @@ -515,7 +513,6 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_nlink = 2; } -/*ARGSUSED*/ static int zfsctl_common_fid(ap) struct vop_fid_args /* { @@ -569,7 +566,6 @@ zfsctl_common_print(ap) /* * Get root directory attributes. */ -/* ARGSUSED */ static int zfsctl_root_getattr(ap) struct vop_getattr_args /* { @@ -821,7 +817,6 @@ zfsctl_snapshot_vnode_setup(vnode_t *vp, void *arg) * snapshot if it exist, creating the pseudo filesystem vnode as necessary. * Perform a mount of the associated dataset on top of the vnode. */ -/* ARGSUSED */ int zfsctl_snapdir_lookup(ap) struct vop_lookup_args /* { @@ -1013,7 +1008,6 @@ zfsctl_snapdir_readdir(ap) /* NOTREACHED */ } -/* ARGSUSED */ static int zfsctl_snapdir_getattr(ap) struct vop_getattr_args /* { From owner-svn-src-all@freebsd.org Tue Sep 19 15:00: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 46F1FE1763A; Tue, 19 Sep 2017 15:00:20 +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 1484A82F3A; Tue, 19 Sep 2017 15:00:20 +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 v8JF0JaJ097156; Tue, 19 Sep 2017 15:00:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JF0Juv097155; Tue, 19 Sep 2017 15:00:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709191500.v8JF0Juv097155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 19 Sep 2017 15:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323763 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 15:00:20 -0000 Author: tuexen Date: Tue Sep 19 15:00:19 2017 New Revision: 323763 URL: https://svnweb.freebsd.org/changeset/base/323763 Log: Remove a no longer used variable. Reported by: Felix Weinrank MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Tue Sep 19 12:43:47 2017 (r323762) +++ head/sys/netinet/sctp_indata.c Tue Sep 19 15:00:19 2017 (r323763) @@ -4213,8 +4213,6 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 again: j = 0; TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - int to_ticks; - if (win_probe_recovery && (net->window_probe)) { win_probe_recovered = 1; /* @@ -4229,11 +4227,6 @@ again: break; } } - } - if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); - } else { - to_ticks = MSEC_TO_TICKS(net->RTO); } if (net->flight_size) { j++; From owner-svn-src-all@freebsd.org Tue Sep 19 15:08: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 8BE59E17D0A; Tue, 19 Sep 2017 15:08:32 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5871E8353E; Tue, 19 Sep 2017 15:08:32 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JF8V2a001741; Tue, 19 Sep 2017 15:08:31 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JF8V3P001740; Tue, 19 Sep 2017 15:08:31 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201709191508.v8JF8V3P001740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Tue, 19 Sep 2017 15:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323764 - head/sbin/geom/class/part X-SVN-Group: head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: head/sbin/geom/class/part X-SVN-Commit-Revision: 323764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 15:08:32 -0000 Author: danfe (ports committer) Date: Tue Sep 19 15:08:31 2017 New Revision: 323764 URL: https://svnweb.freebsd.org/changeset/base/323764 Log: Provide an articulate example of how to properly delete partitions and partitioning scheme. Users often get confused and frustrated when trying to delete partition table and getting ``Device busy'' error because they forgot (or did not ever know that they have) to delete all its partitions first, and while the manual page mentions this briefly, it does not stress it out enough. Approved by: ae, manpages (bjk) PR (as inspiration): 196102 Differential Revision: https://reviews.freebsd.org/D12336 Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue Sep 19 15:00:19 2017 (r323763) +++ head/sbin/geom/class/part/gpart.8 Tue Sep 19 15:08:31 2017 (r323764) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2016 +.Dd September 19, 2017 .Dt GPART 8 .Os .Sh NAME @@ -1324,6 +1324,29 @@ partition to contain a UFS filesystem and aligned on 4 After creating all required partitions, embed bootstrap code into them: .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 +.Ed +.Ss Deleting partitions and partitioning scheme +If you get a +.Em "Device busy" +error when trying to destroy a partition table, remember that you must +delete all its partitions first with the +.Cm delete +action. +In this example, assume we have +.Pa da0 +with three partitions: +.Bd -literal -offset indent +/sbin/gpart delete -i 3 da0 +/sbin/gpart delete -i 2 da0 +/sbin/gpart delete -i 1 da0 +/sbin/gpart destroy da0 +.Ed +.Pp +Alternatively, you can invoke the +.Cm destroy +action with the +.Fl F +flag. .Ed .Ss Backup and Restore .Pp From owner-svn-src-all@freebsd.org Tue Sep 19 15:39:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46169E19457; Tue, 19 Sep 2017 15:39:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14B8584963; Tue, 19 Sep 2017 15:39:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JFdlX0014525; Tue, 19 Sep 2017 15:39:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JFdleo014524; Tue, 19 Sep 2017 15:39:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709191539.v8JFdleo014524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 19 Sep 2017 15:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323765 - releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 323765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 15:39:48 -0000 Author: gjb Date: Tue Sep 19 15:39:47 2017 New Revision: 323765 URL: https://svnweb.freebsd.org/changeset/base/323765 Log: Wordsmith entries for r318430 and r313433 for clarification. Submitted by: rpokala Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 19 15:08:31 2017 (r323764) +++ releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Sep 19 15:39:47 2017 (r323765) @@ -199,8 +199,8 @@ facilities of &man.cxgbe.4; devices. The &man.ifconfig.8; utility has been - updated to persistently store the hardware - MAC addres of an interface. This provides + updated to show MAC addresses + persistently stored by network drivers. This provides a mechanism through which the original MAC address can be retrieved if, for example, an interface is added to a &man.lagg.4; and the MAC is @@ -285,7 +285,7 @@ The &man.bsdinstall.8; utility has been updated to ensure newly-created partitions are properly - aligned at 4096k boundaries. + aligned at 4096 byte boundaries. The default EFI partition created by From owner-svn-src-all@freebsd.org Tue Sep 19 16:38: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 6F8A7E1C4B3; Tue, 19 Sep 2017 16:38:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC072802; Tue, 19 Sep 2017 16:38:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JGcstI040452; Tue, 19 Sep 2017 16:38:54 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JGcsGX040450; Tue, 19 Sep 2017 16:38:54 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201709191638.v8JGcsGX040450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 19 Sep 2017 16:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323767 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 323767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:38:55 -0000 Author: eugen (ports committer) Date: Tue Sep 19 16:38:54 2017 New Revision: 323767 URL: https://svnweb.freebsd.org/changeset/base/323767 Log: Add myself and mentorship status to committers files. This was not done right when I got my ports bit, so do them both in one commit: my ports mentors were az@ and vsevolod@ and my src mentors are avg@ and mav@ Approved by: avg (mentor) Modified: head/share/misc/committers-ports.dot head/share/misc/committers-src.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Sep 19 15:50:18 2017 (r323766) +++ head/share/misc/committers-ports.dot Tue Sep 19 16:38:54 2017 (r323767) @@ -99,6 +99,7 @@ edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2002 ehaupt [label="Emanuel Haupt\nehaupt@FreeBSD.org\n2005/10/03"] eik [label="Oliver Eikemeier\neik@FreeBSD.org\n2003/11/12"] erwin [label="Erwin Lansing\nerwin@FreeBSD.org\n2003/06/04"] +eugen [label="Eugene Grosbein\neugen@FreeBSD.org\n2017/03/04"] farrokhi [label="Babak Farrokhi\nfarrokhi@FreeBSD.org\n2006/11/07"] feld [label="Mark Felder\nfeld@FreeBSD.org\n2013/06/25"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] @@ -290,6 +291,8 @@ asami -> obrien avilla -> jhale avilla -> rakuco +az -> eugen + bdrewery -> dbn bdrewery -> sbruno bdrewery -> trociny @@ -655,6 +658,8 @@ thierry -> riggs tmclaugh -> itetcu tmclaugh -> xride + +vsevolod -> eugen wen -> cs wen -> culot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Sep 19 15:50:18 2017 (r323766) +++ head/share/misc/committers-src.dot Tue Sep 19 16:38:54 2017 (r323767) @@ -162,6 +162,7 @@ emaste [label="Ed Maste\nemaste@FreeBSD.org\n2005/10/0 emax [label="Maksim Yevmenkin\nemax@FreeBSD.org\n2003/10/12"] eri [label="Ermal Luci\neri@FreeBSD.org\n2008/06/11"] erj [label="Eric Joyner\nerj@FreeBSD.org\n2014/12/14"] +eugen [label="Eugene Grosbein\neugen@FreeBSD.org\n2017/09/19"] fabient [label="Fabien Thomas\nfabient@FreeBSD.org\n2009/03/16"] fanf [label="Tony Finch\nfanf@FreeBSD.org\n2002/05/05"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] @@ -386,6 +387,7 @@ andrew -> manu anholt -> jkim avg -> art +avg -> eugen avg -> pluknet avg -> smh @@ -650,6 +652,7 @@ markm -> jasone markm -> sheldonh mav -> ae +mav -> eugen mdf -> gleb From owner-svn-src-all@freebsd.org Tue Sep 19 16:46: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 98D5BE1C9DA; Tue, 19 Sep 2017 16:46:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 639AF2D80; Tue, 19 Sep 2017 16:46: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 v8JGkbNj044433; Tue, 19 Sep 2017 16:46:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JGkbIF044431; Tue, 19 Sep 2017 16:46:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709191646.v8JGkbIF044431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 19 Sep 2017 16:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323768 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 323768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:46:38 -0000 Author: kib Date: Tue Sep 19 16:46:37 2017 New Revision: 323768 URL: https://svnweb.freebsd.org/changeset/base/323768 Log: For unlinked files, do not msync(2) or sync on the vnode deactivation. One consequence of the patch is that msyncing unlinked file mappings no longer reduces the amount of the dirty memory in the system, but I do not think that there are users of msync(2) that utilize it for such side-effect. Reported and tested by: tjil PR: 222356 Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D12411 Modified: head/sys/kern/vfs_subr.c head/sys/vm/vm_object.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Sep 19 16:38:54 2017 (r323767) +++ head/sys/kern/vfs_subr.c Tue Sep 19 16:46:37 2017 (r323768) @@ -3054,8 +3054,8 @@ vinactive(struct vnode *vp, struct thread *td) * point that VOP_INACTIVE() is called, there could still be * pending I/O and dirty pages in the object. */ - obj = vp->v_object; - if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { + if ((obj = vp->v_object) != NULL && (vp->v_vflag & VV_NOSYNC) == 0 && + (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VM_OBJECT_WLOCK(obj); vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Sep 19 16:38:54 2017 (r323767) +++ head/sys/vm/vm_object.c Tue Sep 19 16:46:37 2017 (r323768) @@ -1083,8 +1083,8 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset * I/O. */ if (object->type == OBJT_VNODE && - (object->flags & OBJ_MIGHTBEDIRTY) != 0) { - vp = object->handle; + (object->flags & OBJ_MIGHTBEDIRTY) != 0 && + ((vp = object->handle)->v_vflag & VV_NOSYNC) == 0) { VM_OBJECT_WUNLOCK(object); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); From owner-svn-src-all@freebsd.org Tue Sep 19 16:49: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 F0091E1CC29; Tue, 19 Sep 2017 16:49:46 +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 BCE5D3042; Tue, 19 Sep 2017 16:49:46 +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 v8JGnjBJ044823; Tue, 19 Sep 2017 16:49:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JGnjQB044822; Tue, 19 Sep 2017 16:49:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709191649.v8JGnjQB044822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 19 Sep 2017 16:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323769 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:49:47 -0000 Author: kib Date: Tue Sep 19 16:49:45 2017 New Revision: 323769 URL: https://svnweb.freebsd.org/changeset/base/323769 Log: Do not vrele() covered vnode under the mp mutex. If vrele() changes the hold count to zero, it needs to acquire the vnode lock. Sponsored by: The FreeBSD Foundation Discussed with: avg X-MFC with: r323578 Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Tue Sep 19 16:46:37 2017 (r323768) +++ head/sys/kern/vfs_mount.c Tue Sep 19 16:49:45 2017 (r323769) @@ -507,8 +507,6 @@ vfs_mount_destroy(struct mount *mp) KASSERT(mp->mnt_ref == 0, ("%s: invalid refcount in the drain path @ %s:%d", __func__, __FILE__, __LINE__)); - if (mp->mnt_vnodecovered != NULL) - vrele(mp->mnt_vnodecovered); if (mp->mnt_writeopcount != 0) panic("vfs_mount_destroy: nonzero writeopcount"); if (mp->mnt_secondary_writes != 0) @@ -531,6 +529,8 @@ vfs_mount_destroy(struct mount *mp) if (mp->mnt_lockref != 0) panic("vfs_mount_destroy: nonzero lock refcount"); MNT_IUNLOCK(mp); + if (mp->mnt_vnodecovered != NULL) + vrele(mp->mnt_vnodecovered); #ifdef MAC mac_mount_destroy(mp); #endif From owner-svn-src-all@freebsd.org Tue Sep 19 16:51: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 43FF4E1CF09; Tue, 19 Sep 2017 16:51:53 +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 1E84E32F7; Tue, 19 Sep 2017 16:51:53 +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 v8JGpq80048495; Tue, 19 Sep 2017 16:51:52 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JGpp5v048489; Tue, 19 Sep 2017 16:51:51 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201709191651.v8JGpp5v048489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 19 Sep 2017 16:51: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: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: jpaetzel X-SVN-Commit-Paths: in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-SVN-Commit-Revision: 323770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:51:53 -0000 Author: jpaetzel Date: Tue Sep 19 16:51:51 2017 New Revision: 323770 URL: https://svnweb.freebsd.org/changeset/base/323770 Log: MFC: 323068 Allow kldload tcpmd5 PR: 220170 Modified: stable/11/sys/amd64/conf/GENERIC stable/11/sys/arm64/conf/GENERIC stable/11/sys/i386/conf/GENERIC stable/11/sys/powerpc/conf/GENERIC stable/11/sys/riscv/conf/GENERIC stable/11/sys/sparc64/conf/GENERIC Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/conf/GENERIC ============================================================================== --- stable/11/sys/amd64/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/amd64/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -29,6 +29,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/arm64/conf/GENERIC ============================================================================== --- stable/11/sys/arm64/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/arm64/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -29,6 +29,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/i386/conf/GENERIC ============================================================================== --- stable/11/sys/i386/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/i386/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -31,6 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/powerpc/conf/GENERIC ============================================================================== --- stable/11/sys/powerpc/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/powerpc/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -38,6 +38,7 @@ options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options SCTP #Stream Control Transmission Protocol options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support Modified: stable/11/sys/riscv/conf/GENERIC ============================================================================== --- stable/11/sys/riscv/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/riscv/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -32,6 +32,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: stable/11/sys/sparc64/conf/GENERIC ============================================================================== --- stable/11/sys/sparc64/conf/GENERIC Tue Sep 19 16:49:45 2017 (r323769) +++ stable/11/sys/sparc64/conf/GENERIC Tue Sep 19 16:51:51 2017 (r323770) @@ -31,6 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support From owner-svn-src-all@freebsd.org Tue Sep 19 17:57: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 B3934E21334; Tue, 19 Sep 2017 17:57: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 81763657E0; Tue, 19 Sep 2017 17:57: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 v8JHv4sk073677; Tue, 19 Sep 2017 17:57:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JHv4aD073675; Tue, 19 Sep 2017 17:57:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709191757.v8JHv4aD073675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 19 Sep 2017 17:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323772 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 323772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 17:57:05 -0000 Author: kib Date: Tue Sep 19 17:57:04 2017 New Revision: 323772 URL: https://svnweb.freebsd.org/changeset/base/323772 Log: Do not do torn writes to active LDTs. Care must be taken when updating the active LDT, since parallel threads might try to load a segment descriptor which is currently updated. Since the results are undefined, this cannot be ignored by claiming to be an application race. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D12413 Modified: head/sys/amd64/amd64/sys_machdep.c head/sys/i386/i386/sys_machdep.c Modified: head/sys/amd64/amd64/sys_machdep.c ============================================================================== --- head/sys/amd64/amd64/sys_machdep.c Tue Sep 19 17:12:18 2017 (r323771) +++ head/sys/amd64/amd64/sys_machdep.c Tue Sep 19 17:57:04 2017 (r323772) @@ -583,22 +583,22 @@ amd64_get_ldt(td, uap) } int -amd64_set_ldt(td, uap, descs) - struct thread *td; - struct i386_ldt_args *uap; - struct user_segment_descriptor *descs; +amd64_set_ldt(struct thread *td, struct i386_ldt_args *uap, + struct user_segment_descriptor *descs) { - int error = 0; - unsigned int largest_ld, i; - struct mdproc *mdp = &td->td_proc->p_md; + struct mdproc *mdp; struct proc_ldt *pldt; struct user_segment_descriptor *dp; struct proc *p; + int error; + unsigned int largest_ld, i; #ifdef DEBUG printf("amd64_set_ldt: start=%d num=%d descs=%p\n", uap->start, uap->num, (void *)uap->descs); #endif + mdp = &td->td_proc->p_md; + error = 0; set_pcb_flags(td->td_pcb, PCB_FULL_IRET); p = td->td_proc; @@ -616,10 +616,9 @@ amd64_set_ldt(td, uap, descs) largest_ld = max_ldt_segment; if (largest_ld < uap->start) return (EINVAL); - i = largest_ld - uap->start; mtx_lock(&dt_lock); - bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) - [uap->start], sizeof(struct user_segment_descriptor) * i); + for (i = uap->start; i < largest_ld; i++) + ((uint64_t *)(pldt->ldt_base))[i] = 0; mtx_unlock(&dt_lock); return (0); } @@ -741,14 +740,18 @@ int amd64_set_ldt_data(struct thread *td, int start, int num, struct user_segment_descriptor *descs) { - struct mdproc *mdp = &td->td_proc->p_md; - struct proc_ldt *pldt = mdp->md_ldt; + struct mdproc *mdp; + struct proc_ldt *pldt; + uint64_t *dst, *src; + int i; mtx_assert(&dt_lock, MA_OWNED); - /* Fill in range */ - bcopy(descs, - &((struct user_segment_descriptor *)(pldt->ldt_base))[start], - num * sizeof(struct user_segment_descriptor)); + mdp = &td->td_proc->p_md; + pldt = mdp->md_ldt; + dst = (uint64_t *)(pldt->ldt_base); + src = (uint64_t *)descs; + for (i = 0; i < num; i++) + dst[start + i] = src[i]; return (0); } Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Tue Sep 19 17:12:18 2017 (r323771) +++ head/sys/i386/i386/sys_machdep.c Tue Sep 19 17:57:04 2017 (r323772) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -546,7 +547,7 @@ i386_set_ldt(td, uap, descs) struct i386_ldt_args *uap; union descriptor *descs; { - int error = 0, i; + int error, i; int largest_ld; struct mdproc *mdp = &td->td_proc->p_md; struct proc_ldt *pldt; @@ -556,6 +557,7 @@ i386_set_ldt(td, uap, descs) printf("i386_set_ldt: start=%d num=%d descs=%p\n", uap->start, uap->num, (void *)uap->descs); #endif + error = 0; if (descs == NULL) { /* Free descriptors */ @@ -578,9 +580,9 @@ i386_set_ldt(td, uap, descs) largest_ld = uap->start + uap->num; if (largest_ld > pldt->ldt_len) largest_ld = pldt->ldt_len; - i = largest_ld - uap->start; - bzero(&((union descriptor *)(pldt->ldt_base))[uap->start], - sizeof(union descriptor) * i); + for (i = uap->start; i < largest_ld; i++) + atomic_store_rel_64(&((uint64_t *)(pldt->ldt_base))[i], + 0); mtx_unlock_spin(&dt_lock); return (0); } @@ -702,17 +704,27 @@ again: static int i386_set_ldt_data(struct thread *td, int start, int num, - union descriptor *descs) + union descriptor *descs) { - struct mdproc *mdp = &td->td_proc->p_md; - struct proc_ldt *pldt = mdp->md_ldt; + struct mdproc *mdp; + struct proc_ldt *pldt; + uint64_t *dst, *src; + int i; mtx_assert(&dt_lock, MA_OWNED); - /* Fill in range */ - bcopy(descs, - &((union descriptor *)(pldt->ldt_base))[start], - num * sizeof(union descriptor)); + mdp = &td->td_proc->p_md; + pldt = mdp->md_ldt; + dst = (uint64_t *)(pldt->ldt_base); + src = (uint64_t *)descs; + + /* + * Atomic(9) is used only to get 64bit atomic store with + * cmpxchg8b when available. There is no op without release + * semantic. + */ + for (i = 0; i < num; i++) + atomic_store_rel_64(&dst[start + i], src[i]); return (0); } From owner-svn-src-all@freebsd.org Tue Sep 19 20: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 EEF0CE016CA; Tue, 19 Sep 2017 20:09:59 +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 BE2DE6A652; Tue, 19 Sep 2017 20:09:59 +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 v8JK9wx4027640; Tue, 19 Sep 2017 20:09:58 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JK9wV2027639; Tue, 19 Sep 2017 20:09:58 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709192009.v8JK9wV2027639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 19 Sep 2017 20:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323774 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:10:00 -0000 Author: tuexen Date: Tue Sep 19 20:09:58 2017 New Revision: 323774 URL: https://svnweb.freebsd.org/changeset/base/323774 Log: Avoid an overflow when computing the staleness. This issue was found by running libfuzz on the userland stack. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Sep 19 18:18:24 2017 (r323773) +++ head/sys/netinet/sctp_input.c Tue Sep 19 20:09:58 2017 (r323774) @@ -2553,15 +2553,12 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in /* Expire time is in Ticks, so we convert to seconds */ time_expires.tv_sec = cookie->time_entered.tv_sec + TICKS_TO_SEC(cookie->cookie_life); time_expires.tv_usec = cookie->time_entered.tv_usec; - /* - * TODO sctp_constants.h needs alternative time macros when _KERNEL - * is undefined. - */ if (timevalcmp(&now, &time_expires, >)) { /* cookie is stale! */ struct mbuf *op_err; struct sctp_error_stale_cookie *cause; - uint32_t tim; + struct timeval diff; + uint32_t staleness; op_err = sctp_get_mbuf_for_msg(sizeof(struct sctp_error_stale_cookie), 0, M_NOWAIT, 1, MT_DATA); @@ -2575,12 +2572,19 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in cause->cause.code = htons(SCTP_CAUSE_STALE_COOKIE); cause->cause.length = htons((sizeof(struct sctp_paramhdr) + (sizeof(uint32_t)))); - /* seconds to usec */ - tim = (now.tv_sec - time_expires.tv_sec) * 1000000; - /* add in usec */ - if (tim == 0) - tim = now.tv_usec - cookie->time_entered.tv_usec; - cause->stale_time = htonl(tim); + diff = now; + timevalsub(&diff, &time_expires); + if (diff.tv_sec > UINT32_MAX / 1000000) { + staleness = UINT32_MAX; + } else { + staleness = diff.tv_sec * 1000000; + } + if (UINT32_MAX - staleness >= diff.tv_usec) { + staleness += diff.tv_usec; + } else { + staleness = UINT32_MAX; + } + cause->stale_time = htonl(staleness); sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err, mflowtype, mflowid, l_inp->fibnum, vrf_id, port); From owner-svn-src-all@freebsd.org Tue Sep 19 20: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 EFFA3E01EB9; Tue, 19 Sep 2017 20:18:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9EA56AC25; Tue, 19 Sep 2017 20:18:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JKIfOJ031812; Tue, 19 Sep 2017 20:18:41 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JKIfoI031809; Tue, 19 Sep 2017 20:18:41 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709192018.v8JKIfoI031809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 19 Sep 2017 20:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323775 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 323775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:18:43 -0000 Author: rmacklem Date: Tue Sep 19 20:18:41 2017 New Revision: 323775 URL: https://svnweb.freebsd.org/changeset/base/323775 Log: Simplify nfsrpc_layoutcommit() args. Simplify nfsrpc_layoutcommit() args. in preparation for the addition of Flex File layout support, since it also uses a 0 length field. Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:09:58 2017 (r323774) +++ head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:18:41 2017 (r323775) @@ -484,8 +484,8 @@ int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int int nfsrpc_getdeviceinfo(struct nfsmount *, uint8_t *, int, uint32_t *, struct nfscldevinfo **, struct ucred *, NFSPROC_T *); int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int, - uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, int, uint8_t *, - struct ucred *, NFSPROC_T *, void *); + uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, struct ucred *, + NFSPROC_T *, void *); int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t, int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct ucred *, NFSPROC_T *, void *); Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 20:09:58 2017 (r323774) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 20:18:41 2017 (r323775) @@ -5030,13 +5030,11 @@ nfsmout: int nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim, uint64_t off, uint64_t len, uint64_t lastbyte, nfsv4stateid_t *stateidp, - int layouttype, int layoutupdatecnt, uint8_t *layp, struct ucred *cred, - NFSPROC_T *p, void *stuff) + int layouttype, struct ucred *cred, NFSPROC_T *p, void *stuff) { uint32_t *tl; struct nfsrv_descript nfsd, *nd = &nfsd; - int error, outcnt, i; - uint8_t *cp; + int error; nfscl_reqstart(nd, NFSPROC_LAYOUTCOMMIT, nmp, fh, fhlen, NULL, NULL); NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED + 3 * NFSX_HYPER + @@ -5062,17 +5060,8 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, tl += 2; *tl++ = newnfs_false; *tl++ = txdr_unsigned(layouttype); - *tl = txdr_unsigned(layoutupdatecnt); - if (layoutupdatecnt > 0) { - KASSERT(layouttype != NFSLAYOUT_NFSV4_1_FILES, - ("Must be nil for Files Layout")); - outcnt = NFSM_RNDUP(layoutupdatecnt); - NFSM_BUILD(cp, uint8_t *, outcnt); - NFSBCOPY(layp, cp, layoutupdatecnt); - cp += layoutupdatecnt; - for (i = 0; i < (outcnt - layoutupdatecnt); i++) - *cp++ = 0x0; - } + /* All supported layouts are 0 length. */ + *tl = txdr_unsigned(0); nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Tue Sep 19 20:09:58 2017 (r323774) +++ head/sys/fs/nfsclient/nfs_clstate.c Tue Sep 19 20:18:41 2017 (r323775) @@ -5256,7 +5256,7 @@ nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfsc error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen, 0, flp->nfsfl_off, len, lyp->nfsly_lastbyte, &lyp->nfsly_stateid, - NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL); + NFSLAYOUT_NFSV4_1_FILES, cred, p, NULL); NFSCL_DEBUG(4, "layoutcommit err=%d\n", error); if (error == NFSERR_NOTSUPP) { /* If not supported, don't bother doing it. */ From owner-svn-src-all@freebsd.org Tue Sep 19 20:24: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 4DCC5E024FC; Tue, 19 Sep 2017 20:24:15 +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 180416B199; Tue, 19 Sep 2017 20:24:15 +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 v8JKOEuN035817; Tue, 19 Sep 2017 20:24:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JKOEZp035816; Tue, 19 Sep 2017 20:24:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709192024.v8JKOEZp035816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 19 Sep 2017 20:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323776 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:24:15 -0000 Author: tuexen Date: Tue Sep 19 20:24:13 2017 New Revision: 323776 URL: https://svnweb.freebsd.org/changeset/base/323776 Log: Fix a warning. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Sep 19 20:18:41 2017 (r323775) +++ head/sys/netinet/sctp_input.c Tue Sep 19 20:24:13 2017 (r323776) @@ -2579,7 +2579,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in } else { staleness = diff.tv_sec * 1000000; } - if (UINT32_MAX - staleness >= diff.tv_usec) { + if (UINT32_MAX - staleness >= (uint32_t)diff.tv_usec) { staleness += diff.tv_usec; } else { staleness = UINT32_MAX; From owner-svn-src-all@freebsd.org Tue Sep 19 20:33: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 DAEFEE02E77; Tue, 19 Sep 2017 20:33:23 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA3576B8FF; Tue, 19 Sep 2017 20:33:23 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JKXMgc039958; Tue, 19 Sep 2017 20:33:22 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JKXM9g039957; Tue, 19 Sep 2017 20:33:22 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201709192033.v8JKXM9g039957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 19 Sep 2017 20:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323777 - head/sys/arm/xscale/i8134x X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/arm/xscale/i8134x X-SVN-Commit-Revision: 323777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:33:24 -0000 Author: cognet Date: Tue Sep 19 20:33:22 2017 New Revision: 323777 URL: https://svnweb.freebsd.org/changeset/base/323777 Log: i81342 is little endian, not big endian. Modified: head/sys/arm/xscale/i8134x/std.i81342 Modified: head/sys/arm/xscale/i8134x/std.i81342 ============================================================================== --- head/sys/arm/xscale/i8134x/std.i81342 Tue Sep 19 20:24:13 2017 (r323776) +++ head/sys/arm/xscale/i8134x/std.i81342 Tue Sep 19 20:33:22 2017 (r323777) @@ -1,5 +1,6 @@ #XScale i81342 generic configuration #$FreeBSD$ files "../xscale/i8134x/files.i81342" -include "../xscale/std.xscale-be" +include "../xscale/std.xscale" cpu CPU_XSCALE_81342 +machine arm From owner-svn-src-all@freebsd.org Tue Sep 19 20:40: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 8AFF3E034EC; Tue, 19 Sep 2017 20:40:07 +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 657436BC0D; Tue, 19 Sep 2017 20:40:07 +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 v8JKe6Vt040247; Tue, 19 Sep 2017 20:40:06 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JKe6Gk040242; Tue, 19 Sep 2017 20:40:06 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201709192040.v8JKe6Gk040242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 19 Sep 2017 20:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323778 - in head/sys: arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-SVN-Group: head X-SVN-Commit-Author: jpaetzel X-SVN-Commit-Paths: in head/sys: arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-SVN-Commit-Revision: 323778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:40:07 -0000 Author: jpaetzel Date: Tue Sep 19 20:40:05 2017 New Revision: 323778 URL: https://svnweb.freebsd.org/changeset/base/323778 Log: Fix indentation for r323068 PR: 220170 Reported by: lidl MFC after: 3 days Pointyhat to: jpaetzel Modified: head/sys/arm64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/riscv/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) +++ head/sys/arm64/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) @@ -29,7 +29,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) +++ head/sys/i386/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) @@ -31,7 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) +++ head/sys/powerpc/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) @@ -38,7 +38,7 @@ options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols options IPSEC # IP (v4/v6) security -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options SCTP #Stream Control Transmission Protocol options FFS #Berkeley Fast Filesystem Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) +++ head/sys/riscv/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) @@ -34,7 +34,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP options IPSEC # IP (v4/v6) security -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) +++ head/sys/sparc64/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) @@ -31,7 +31,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC # IP (v4/v6) security -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem From owner-svn-src-all@freebsd.org Tue Sep 19 20:45: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 116D6E03A86; Tue, 19 Sep 2017 20:45:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFB9C6C1CD; Tue, 19 Sep 2017 20:45:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JKjQKm044376; Tue, 19 Sep 2017 20:45:26 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JKjPOc044372; Tue, 19 Sep 2017 20:45:25 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709192045.v8JKjPOc044372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 19 Sep 2017 20:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323779 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 323779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:45:27 -0000 Author: rmacklem Date: Tue Sep 19 20:45:25 2017 New Revision: 323779 URL: https://svnweb.freebsd.org/changeset/base/323779 Log: Simplify nfsrpc_layoutreturn() args. Simplify nfsrpc_layoutreturn() args. in preparation for the addition of Flex File layout support, since File layout uses a 0 length field. Flex Files does use a longer field, but that will be added in a subsequent commit. Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:40:05 2017 (r323778) +++ head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:45:25 2017 (r323779) @@ -487,8 +487,8 @@ int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, struct ucred *, NFSPROC_T *, void *); int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t, - int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct ucred *, - NFSPROC_T *, void *); + int, uint64_t, uint64_t, nfsv4stateid_t *, struct ucred *, NFSPROC_T *, + void *); int nfsrpc_reclaimcomplete(struct nfsmount *, struct ucred *, NFSPROC_T *); int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t, int, struct ucred *, NFSPROC_T *); Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 20:40:05 2017 (r323778) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 20:45:25 2017 (r323779) @@ -5078,13 +5078,12 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim, int layouttype, uint32_t iomode, int layoutreturn, uint64_t offset, - uint64_t len, nfsv4stateid_t *stateidp, int layoutcnt, uint32_t *layp, - struct ucred *cred, NFSPROC_T *p, void *stuff) + uint64_t len, nfsv4stateid_t *stateidp, struct ucred *cred, NFSPROC_T *p, + void *stuff) { uint32_t *tl; struct nfsrv_descript nfsd, *nd = &nfsd; - int error, outcnt, i; - uint8_t *cp; + int error; nfscl_reqstart(nd, NFSPROC_LAYOUTRETURN, nmp, fh, fhlen, NULL, NULL); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); @@ -5107,15 +5106,7 @@ nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, *tl++ = stateidp->other[0]; *tl++ = stateidp->other[1]; *tl++ = stateidp->other[2]; - *tl = txdr_unsigned(layoutcnt); - if (layoutcnt > 0) { - outcnt = NFSM_RNDUP(layoutcnt); - NFSM_BUILD(cp, uint8_t *, outcnt); - NFSBCOPY(layp, cp, layoutcnt); - cp += layoutcnt; - for (i = 0; i < (outcnt - layoutcnt); i++) - *cp++ = 0x0; - } + *tl = txdr_unsigned(0); } nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Tue Sep 19 20:40:05 2017 (r323778) +++ head/sys/fs/nfsclient/nfs_clstate.c Tue Sep 19 20:45:25 2017 (r323779) @@ -5235,7 +5235,7 @@ nfscl_layoutreturn(struct nfsmount *nmp, struct nfscll lyp->nfsly_fhlen, 0, NFSLAYOUT_NFSV4_1_FILES, rp->nfsrecly_iomode, rp->nfsrecly_recalltype, rp->nfsrecly_off, rp->nfsrecly_len, - &stateid, 0, NULL, cred, p, NULL); + &stateid, cred, p, NULL); } } From owner-svn-src-all@freebsd.org Tue Sep 19 21:04: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 01E94E04C76; Tue, 19 Sep 2017 21:04:57 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (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 E29416CDAD; Tue, 19 Sep 2017 21:04:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from aurora.physics.berkeley.edu (aurora.physics.berkeley.edu [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id v8JL4mGo013096 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 19 Sep 2017 14:04:49 -0700 Subject: Re: svn commit: r323778 - in head/sys: arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf To: Josh Paetzel , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709192040.v8JKe6Gk040242@repo.freebsd.org> From: Nathan Whitehorn Message-ID: Date: Tue, 19 Sep 2017 14:04:48 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201709192040.v8JKe6Gk040242@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVamnJAGddddBAX9DOChiPzpEleKBPC053CsiOg95kiNNENZR7OVD+tgRRfwTzlR1M968cFa2Mp5qb8yMD3y1kT49a24dI6pyEA= X-Sonic-ID: C;uPcFLH6d5xG+hfsKk0eh0A== M;6DJFLH6d5xG+hfsKk0eh0A== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 21:04:57 -0000 Please remember that not all "GENERIC" kernels are named "GENERIC". In particular, the powerpc64 "GENERIC" is called "GENERIC64" (and I am assuming needs the same changes). -Nathan On 09/19/17 13:40, Josh Paetzel wrote: > Author: jpaetzel > Date: Tue Sep 19 20:40:05 2017 > New Revision: 323778 > URL: https://svnweb.freebsd.org/changeset/base/323778 > > Log: > Fix indentation for r323068 > > PR: 220170 > Reported by: lidl > MFC after: 3 days > Pointyhat to: jpaetzel > > Modified: > head/sys/arm64/conf/GENERIC > head/sys/i386/conf/GENERIC > head/sys/powerpc/conf/GENERIC > head/sys/riscv/conf/GENERIC > head/sys/sparc64/conf/GENERIC > > Modified: head/sys/arm64/conf/GENERIC > ============================================================================== > --- head/sys/arm64/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) > +++ head/sys/arm64/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) > @@ -29,7 +29,7 @@ options PREEMPTION # Enable kernel thread preemption > options INET # InterNETworking > options INET6 # IPv6 communications protocols > options IPSEC # IP (v4/v6) security > -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > options TCP_HHOOK # hhook(9) framework for TCP > options TCP_OFFLOAD # TCP offload > options SCTP # Stream Control Transmission Protocol > > Modified: head/sys/i386/conf/GENERIC > ============================================================================== > --- head/sys/i386/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) > +++ head/sys/i386/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) > @@ -31,7 +31,7 @@ options PREEMPTION # Enable kernel thread preemption > options INET # InterNETworking > options INET6 # IPv6 communications protocols > options IPSEC # IP (v4/v6) security > -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > options TCP_HHOOK # hhook(9) framework for TCP > options TCP_OFFLOAD # TCP offload > options SCTP # Stream Control Transmission Protocol > > Modified: head/sys/powerpc/conf/GENERIC > ============================================================================== > --- head/sys/powerpc/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) > +++ head/sys/powerpc/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) > @@ -38,7 +38,7 @@ options PREEMPTION #Enable kernel thread preemption > options INET #InterNETworking > options INET6 #IPv6 communications protocols > options IPSEC # IP (v4/v6) security > -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > options TCP_HHOOK # hhook(9) framework for TCP > options SCTP #Stream Control Transmission Protocol > options FFS #Berkeley Fast Filesystem > > Modified: head/sys/riscv/conf/GENERIC > ============================================================================== > --- head/sys/riscv/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) > +++ head/sys/riscv/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) > @@ -34,7 +34,7 @@ options INET # InterNETworking > options INET6 # IPv6 communications protocols > options TCP_HHOOK # hhook(9) framework for TCP > options IPSEC # IP (v4/v6) security > -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > options TCP_OFFLOAD # TCP offload > options SCTP # Stream Control Transmission Protocol > options FFS # Berkeley Fast Filesystem > > Modified: head/sys/sparc64/conf/GENERIC > ============================================================================== > --- head/sys/sparc64/conf/GENERIC Tue Sep 19 20:33:22 2017 (r323777) > +++ head/sys/sparc64/conf/GENERIC Tue Sep 19 20:40:05 2017 (r323778) > @@ -31,7 +31,7 @@ options PREEMPTION # Enable kernel thread preemption > options INET # InterNETworking > options INET6 # IPv6 communications protocols > options IPSEC # IP (v4/v6) security > -options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > +options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 > options TCP_HHOOK # hhook(9) framework for TCP > options SCTP # Stream Control Transmission Protocol > options FFS # Berkeley Fast Filesystem > From owner-svn-src-all@freebsd.org Tue Sep 19 21:31: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 7AF34E06435; Tue, 19 Sep 2017 21:31:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 515936DA39; Tue, 19 Sep 2017 21:31:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JLVaj8064815; Tue, 19 Sep 2017 21:31:36 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JLVau0064813; Tue, 19 Sep 2017 21:31:36 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709192131.v8JLVau0064813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 19 Sep 2017 21:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323780 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 323780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 21:31:37 -0000 Author: rmacklem Date: Tue Sep 19 21:31:36 2017 New Revision: 323780 URL: https://svnweb.freebsd.org/changeset/base/323780 Log: Add a new function called nfsm_uiombuflist(), similar to nfsm_uiombuf(). This patch adds a new function called nfsm_uiombuflist(), which is similar to nfsm_uiombuf(), but doesn't not use the fields in struct nfsrv_descript. This new function will be used by the pNFS client for writing to mirrors using Flex Files layout. The function is not yet called anywhere. Also, get rid of #ifndef APPLE, which is ancient cruft left over from the Mac OSX port of the NFSv4 client. Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clcomsubs.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:45:25 2017 (r323779) +++ head/sys/fs/nfs/nfs_var.h Tue Sep 19 21:31:36 2017 (r323780) @@ -301,6 +301,7 @@ struct ucred *nfsrv_getgrpscred(struct ucred *); /* nfs_clcomsubs.c */ void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +struct mbuf *nfsm_uiombuflist(struct uio *, int, struct mbuf **, char **); void nfscl_reqstart(struct nfsrv_descript *, int, struct nfsmount *, u_int8_t *, int, u_int32_t **, struct nfsclsession *); nfsuint64 *nfscl_getcookie(struct nfsnode *, off_t off, int); Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Tue Sep 19 20:45:25 2017 (r323779) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Tue Sep 19 21:31:36 2017 (r323780) @@ -250,7 +250,6 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); } -#ifndef APPLE /* * copies a uio scatter/gather list to an mbuf chain. * NOTE: can ony handle iovcnt == 1 @@ -332,7 +331,89 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui nd->nd_bpos = NFSMTOD(mp, caddr_t) + mbuf_len(mp); nd->nd_mb = mp; } -#endif /* !APPLE */ + +/* + * copies a uio scatter/gather list to an mbuf chain. + * This version returns the mbuf list and does not use "nd". + * NOTE: can ony handle iovcnt == 1 + */ +struct mbuf * +nfsm_uiombuflist(struct uio *uiop, int siz, struct mbuf **mbp, char **cpp) +{ + char *uiocp; + struct mbuf *mp, *mp2, *firstmp; + int xfer, left, mlen; + int uiosiz, clflg, rem; + char *cp, *tcp; + + KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); + + if (siz > ncl_mbuf_mlen) /* or should it >= MCLBYTES ?? */ + clflg = 1; + else + clflg = 0; + rem = NFSM_RNDUP(siz) - siz; + if (clflg != 0) + NFSMCLGET(mp, M_WAITOK); + else + NFSMGET(mp); + mbuf_setlen(mp, 0); + firstmp = mp2 = mp; + while (siz > 0) { + left = uiop->uio_iov->iov_len; + uiocp = uiop->uio_iov->iov_base; + if (left > siz) + left = siz; + uiosiz = left; + while (left > 0) { + mlen = M_TRAILINGSPACE(mp); + if (mlen == 0) { + if (clflg) + NFSMCLGET(mp, M_WAITOK); + else + NFSMGET(mp); + mbuf_setlen(mp, 0); + mbuf_setnext(mp2, mp); + mp2 = mp; + mlen = M_TRAILINGSPACE(mp); + } + xfer = (left > mlen) ? mlen : left; + if (uiop->uio_segflg == UIO_SYSSPACE) + NFSBCOPY(uiocp, NFSMTOD(mp, caddr_t) + + mbuf_len(mp), xfer); + else + copyin(uiocp, NFSMTOD(mp, caddr_t) + + mbuf_len(mp), xfer); + mbuf_setlen(mp, mbuf_len(mp) + xfer); + left -= xfer; + uiocp += xfer; + uiop->uio_offset += xfer; + uiop->uio_resid -= xfer; + } + tcp = (char *)uiop->uio_iov->iov_base; + tcp += uiosiz; + uiop->uio_iov->iov_base = (void *)tcp; + uiop->uio_iov->iov_len -= uiosiz; + siz -= uiosiz; + } + if (rem > 0) { + if (rem > M_TRAILINGSPACE(mp)) { + NFSMGET(mp); + mbuf_setlen(mp, 0); + mbuf_setnext(mp2, mp); + } + cp = NFSMTOD(mp, caddr_t) + mbuf_len(mp); + for (left = 0; left < rem; left++) + *cp++ = '\0'; + mbuf_setlen(mp, mbuf_len(mp) + rem); + if (cpp != NULL) + *cpp = cp; + } else if (cpp != NULL) + *cpp = NFSMTOD(mp, caddr_t) + mbuf_len(mp); + if (mbp != NULL) + *mbp = mp; + return (firstmp); +} /* * Load vnode attributes from the xdr file attributes. From owner-svn-src-all@freebsd.org Tue Sep 19 22: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 960D5E09218; Tue, 19 Sep 2017 22:17:32 +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 718046F562; Tue, 19 Sep 2017 22:17:32 +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 v8JMHViv082689; Tue, 19 Sep 2017 22:17:31 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JMHUtM082688; Tue, 19 Sep 2017 22:17:30 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201709192217.v8JMHUtM082688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 19 Sep 2017 22:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323781 - head/sys/dev/qlxgbe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/qlxgbe X-SVN-Commit-Revision: 323781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 22:17:32 -0000 Author: davidcs Date: Tue Sep 19 22:17:30 2017 New Revision: 323781 URL: https://svnweb.freebsd.org/changeset/base/323781 Log: Update minidump template for version 5.4.66 MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_minidump.c Modified: head/sys/dev/qlxgbe/ql_minidump.c ============================================================================== --- head/sys/dev/qlxgbe/ql_minidump.c Tue Sep 19 21:31:36 2017 (r323780) +++ head/sys/dev/qlxgbe/ql_minidump.c Tue Sep 19 22:17:30 2017 (r323781) @@ -41,7 +41,7 @@ unsigned int ql83xx_minidump_version_sub = 66; unsigned char ql83xx_minidump[] = { 0x63, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xaa, 0x05, 0x00, 0x00, 0x04, 0x00, 0x02, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x1d, 0x95, 0x7b, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x87, 0x40, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x31, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -49,7 +49,7 @@ unsigned char ql83xx_minidump[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0xdc, 0xfb, 0x07, 0x00, - 0x00, 0x8a, 0x2b, 0x00, 0x80, 0x73, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x8a, 0x2b, 0x00, 0x40, 0x6f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x4a, 0x3b, 0x00, 0x00, 0x10, 0x03, 0x08, 0x00, 0x08, 0x31, 0x77, 0x04, 0x08, 0x31, 0x77, 0x08, 0x08, 0x31, 0x77, 0x0c, 0x08, 0x31, 0x77, 0x10, 0x08, 0x31, 0x77, 0x1c, 0x08, 0x31, 0x77, @@ -61,8 +61,8 @@ unsigned char ql83xx_minidump[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, - 0xe0, 0x91, 0x00, 0x00, 0x00, 0x22, 0x02, 0x00, 0x00, 0x11, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, + 0x00, 0x93, 0x00, 0x00, 0x00, 0x22, 0x02, 0x00, 0x00, 0x11, 0x01, 0x00, 0x62, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x30, 0x77, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, @@ -2935,10 +2935,26 @@ unsigned char ql83xx_minidump[] = { 0x08, 0xd6, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x18, 0x02, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x08, 0xdc, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0xe8, 0x01, 0x06, 0x00, 0x00, 0x02, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, + 0x08, 0xdc, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x11, 0x06, 0x00, 0x80, 0x02, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xe0, 0x17, 0x00, 0x00, + 0x08, 0xdc, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x14, 0x06, 0xe0, 0x17, 0x00, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, + 0x08, 0xdc, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x55, 0x06, 0xe0, 0x1f, 0x00, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x04, 0xc8, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd5, 0x00, 0x00, 0x80, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xd5, 0x00, 0x00, 0x80, 0x02, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x04, 0xca, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2946,7 +2962,7 @@ unsigned char ql83xx_minidump[] = { 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x14, 0x00, 0x04, 0xc9, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x0a, 0x14, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0a, 0x14, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0xd7, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3050,11 +3066,11 @@ unsigned char ql83xx_minidump[] = { 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xd4, 0x00, 0x50, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xd4, 0x00, 0x50, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0xd9, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x76, 0x03, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x96, 0x03, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0xff, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3151,6 +3167,14 @@ unsigned char ql83xx_minidump[] = { 0x04, 0xff, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x82, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x08, 0xcd, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xc6, 0x01, 0x00, 0x40, 0x00, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x08, 0xce, 0x00, 0x00, 0x00, 0x50, 0x1a, 0x01, 0x06, 0xc1, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x1a, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3915,30 +3939,6 @@ unsigned char ql83xx_minidump[] = { 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x22, 0x00, 0x00, 0x30, 0x00, 0x11, 0x42, 0x04, 0x01, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x15, 0x42, 0x00, 0x00, 0xff, 0xff, @@ -10959,8 +10959,8 @@ unsigned char ql83xx_minidump[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x05, 0x00, 0x40, 0x40, 0x05, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x40, 0x40, 0x05, 0x04, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x34, 0x39, 0x7c, 0xbf + 0x00, 0x00, 0x00, 0x00, 0x34, 0x39, 0x7b, 0xbf }; unsigned int ql83xx_minidump_len = 131072; From owner-svn-src-all@freebsd.org Tue Sep 19 23:26: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 12877E0D00D; Tue, 19 Sep 2017 23:26:29 +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 D3F7E71370; Tue, 19 Sep 2017 23:26: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 v8JNQSTA010890; Tue, 19 Sep 2017 23:26:28 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JNQRpm010888; Tue, 19 Sep 2017 23:26:27 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201709192326.v8JNQRpm010888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 19 Sep 2017 23:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323782 - head/sys/dev/qlxgbe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/qlxgbe X-SVN-Commit-Revision: 323782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 23:26:29 -0000 Author: davidcs Date: Tue Sep 19 23:26:27 2017 New Revision: 323782 URL: https://svnweb.freebsd.org/changeset/base/323782 Log: Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_def.h head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_def.h ============================================================================== --- head/sys/dev/qlxgbe/ql_def.h Tue Sep 19 22:17:30 2017 (r323781) +++ head/sys/dev/qlxgbe/ql_def.h Tue Sep 19 23:26:27 2017 (r323782) @@ -239,6 +239,7 @@ struct qla_host { volatile const char *qla_lock; volatile const char *qla_unlock; uint32_t dbg_level; + uint32_t enable_minidump; uint8_t fw_ver_str[32]; Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Tue Sep 19 22:17:30 2017 (r323781) +++ head/sys/dev/qlxgbe/ql_os.c Tue Sep 19 23:26:27 2017 (r323782) @@ -185,6 +185,13 @@ qla_add_sysctls(qla_host_t *ha) OID_AUTO, "debug", CTLFLAG_RW, &ha->dbg_level, ha->dbg_level, "Debug Level"); + ha->enable_minidump = 1; + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "enable_minidump", CTLFLAG_RW, + &ha->enable_minidump, ha->enable_minidump, + "Minidump retrival is enabled only when this is set"); + ha->std_replenish = QL_STD_REPLENISH_THRES; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -2025,7 +2032,8 @@ device_printf(ha->pci_dev, "%s: enter\n", __func__); ha->msg_from_peer = 0; - ql_minidump(ha); + if (ha->enable_minidump) + ql_minidump(ha); (void) ql_init_hw(ha); From owner-svn-src-all@freebsd.org Tue Sep 19 23:28: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 022D6E0D29D; Tue, 19 Sep 2017 23:28:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5255715D0; Tue, 19 Sep 2017 23:28:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JNSN9K010995; Tue, 19 Sep 2017 23:28:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JNSMwk010992; Tue, 19 Sep 2017 23:28:22 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709192328.v8JNSMwk010992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 19 Sep 2017 23:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323783 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 323783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 23:28:24 -0000 Author: rmacklem Date: Tue Sep 19 23:28:22 2017 New Revision: 323783 URL: https://svnweb.freebsd.org/changeset/base/323783 Log: Make the nfsrpc_layoutget() function a static. Make the NFSv4 pNFS client function nfsrpc_layoutget() a static, since it is only used in sys/fs/nfsclient/nfs_clrpcops.c. This prepares the code for future patches that add Flex File layout support. Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Sep 19 23:26:27 2017 (r323782) +++ head/sys/fs/nfs/nfs_var.h Tue Sep 19 23:28:22 2017 (r323783) @@ -479,9 +479,6 @@ int nfsrpc_destroysession(struct nfsmount *, struct nf struct ucred *, NFSPROC_T *); int nfsrpc_destroyclient(struct nfsmount *, struct nfsclclient *, struct ucred *, NFSPROC_T *); -int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int, int, uint64_t, uint64_t, - uint64_t, int, nfsv4stateid_t *, int *, struct nfsclflayouthead *, - struct ucred *, NFSPROC_T *, void *); int nfsrpc_getdeviceinfo(struct nfsmount *, uint8_t *, int, uint32_t *, struct nfscldevinfo **, struct ucred *, NFSPROC_T *); int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 23:26:27 2017 (r323782) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 23:28:22 2017 (r323783) @@ -146,6 +146,9 @@ static int nfsrpc_createlayout(vnode_t, char *, int, s struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, void *, int *, nfsv4stateid_t *, int, int, int *, struct nfsclflayouthead *, int *); +static int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int, int, uint64_t, + uint64_t, uint64_t, int, nfsv4stateid_t *, int *, struct nfsclflayouthead *, + struct ucred *, NFSPROC_T *, void *); static int nfsrpc_layoutgetres(struct nfsmount *, vnode_t, uint8_t *, int, nfsv4stateid_t *, int, uint32_t *, struct nfscllayout **, struct nfsclflayouthead *, int, int *, struct ucred *, NFSPROC_T *); @@ -4838,7 +4841,7 @@ nfsrpc_destroyclient(struct nfsmount *nmp, struct nfsc /* * Do the NFSv4.1 LayoutGet. */ -int +static int nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, int fhlen, int iomode, uint64_t offset, uint64_t len, uint64_t minlen, int layoutlen, nfsv4stateid_t *stateidp, int *retonclosep, struct nfsclflayouthead *flhp, From owner-svn-src-all@freebsd.org Tue Sep 19 23: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 7855FE0DEA2; Tue, 19 Sep 2017 23:41:56 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47D3271EC4; Tue, 19 Sep 2017 23:41:56 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JNftA2016027; Tue, 19 Sep 2017 23:41:55 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JNftPC016026; Tue, 19 Sep 2017 23:41:55 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201709192341.v8JNftPC016026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 19 Sep 2017 23:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323784 - head/sys/arm/include X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/arm/include X-SVN-Commit-Revision: 323784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 23:41:56 -0000 Author: cognet Date: Tue Sep 19 23:41:55 2017 New Revision: 323784 URL: https://svnweb.freebsd.org/changeset/base/323784 Log: Define CPU_XSCALE_CORE3 when relevant. It was lost when cpuconf.h was deobirted. Modified: head/sys/arm/include/pmap-v4.h Modified: head/sys/arm/include/pmap-v4.h ============================================================================== --- head/sys/arm/include/pmap-v4.h Tue Sep 19 23:28:22 2017 (r323783) +++ head/sys/arm/include/pmap-v4.h Tue Sep 19 23:41:55 2017 (r323784) @@ -356,6 +356,7 @@ extern int pmap_needs_pte_sync; #endif /* ARM_NMMUS > 1 */ #if defined(CPU_XSCALE_81342) +#define CPU_XSCALE_CORE3 #define PMAP_NEEDS_PTE_SYNC 1 #define PMAP_INCLUDE_PTE_SYNC #else From owner-svn-src-all@freebsd.org Wed Sep 20 04:19:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F3AE1F128; Wed, 20 Sep 2017 04:19:50 +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 6CFC27E204; Wed, 20 Sep 2017 04:19:50 +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 v8K4JnJA030538; Wed, 20 Sep 2017 04:19:49 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K4JnVM030537; Wed, 20 Sep 2017 04:19:49 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709200419.v8K4JnVM030537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 20 Sep 2017 04:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323785 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 323785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 04:19:50 -0000 Author: alc Date: Wed Sep 20 04:19:49 2017 New Revision: 323785 URL: https://svnweb.freebsd.org/changeset/base/323785 Log: Sync with amd64/arm/arm64/i386/mips pmap change r288256: Exploit r288122 to address a cosmetic issue. Since PV chunk pages don't belong to a vm object, they can't be paged out. Since they can't be paged out, they are never enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages are being enqueued in the inactive queue. As of r288122, we can avoid this false impression by passing PQ_NONE. MFC after: 1 week Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Tue Sep 19 23:41:55 2017 (r323784) +++ head/sys/riscv/riscv/pmap.c Wed Sep 20 04:19:49 2017 (r323785) @@ -1614,7 +1614,7 @@ free_pv_chunk(struct pv_chunk *pc) #if 0 /* TODO: For minidump */ dump_drop_page(m->phys_addr); #endif - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_NONE); vm_page_free(m); } From owner-svn-src-all@freebsd.org Wed Sep 20 04:59: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 F0C24E2174B; Wed, 20 Sep 2017 04:59:53 +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 B85FB7F618; Wed, 20 Sep 2017 04:59:53 +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 v8K4xq8K046738; Wed, 20 Sep 2017 04:59:52 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K4xqKY046737; Wed, 20 Sep 2017 04:59:52 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709200459.v8K4xqKY046737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 20 Sep 2017 04:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323786 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 04:59:54 -0000 Author: alc Date: Wed Sep 20 04:59:52 2017 New Revision: 323786 URL: https://svnweb.freebsd.org/changeset/base/323786 Log: In r288122, we changed vm_page_unwire() so that it returns a Boolean indicating whether the page's wire count transitioned to zero. Use that return value in zbuf_page_free() rather than checking the wire count. MFC after: 1 week Modified: head/sys/net/bpf_zerocopy.c Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Wed Sep 20 04:19:49 2017 (r323785) +++ head/sys/net/bpf_zerocopy.c Wed Sep 20 04:59:52 2017 (r323786) @@ -114,8 +114,7 @@ zbuf_page_free(vm_page_t pp) { vm_page_lock(pp); - vm_page_unwire(pp, PQ_INACTIVE); - if (pp->wire_count == 0 && pp->object == NULL) + if (vm_page_unwire(pp, PQ_INACTIVE) && pp->object == NULL) vm_page_free(pp); vm_page_unlock(pp); } From owner-svn-src-all@freebsd.org Wed Sep 20 06:28: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 81CB5E2593C; Wed, 20 Sep 2017 06:28:42 +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 5D81581E94; Wed, 20 Sep 2017 06:28:42 +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 v8K6SfNB083138; Wed, 20 Sep 2017 06:28:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K6SfYa083137; Wed, 20 Sep 2017 06:28:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200628.v8K6SfYa083137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 06:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323787 - stable/11/sys/dev/jedec_ts X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/jedec_ts X-SVN-Commit-Revision: 323787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 06:28:42 -0000 Author: avg Date: Wed Sep 20 06:28:41 2017 New Revision: 323787 URL: https://svnweb.freebsd.org/changeset/base/323787 Log: MFC r323540: jedec_ts: add many more devices from various vendors The new IDs are taken from the hardware to which I have access and from open datasheets. Also, the hardware probing is moved to the device probe method. Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/11/sys/dev/jedec_ts/jedec_ts.c Wed Sep 20 04:59:52 2017 (r323786) +++ stable/11/sys/dev/jedec_ts/jedec_ts.c Wed Sep 20 06:28:41 2017 (r323787) @@ -42,6 +42,116 @@ __FBSDID("$FreeBSD$"); /* + * General device identification notes. + * + * The JEDEC TSE2004av specification defines the device ID that all compliant + * devices should use, but very few do in practice. Maybe that's because + * TSE2002av was rather vague about that. + * Rare examples are IDT TSE2004GB2B0 and Atmel AT30TSE004A, not sure if + * they are TSE2004av compliant by design or by accident. + * Also, the specification mandates that PCI SIG manufacturer IDs are to be + * used, but in practice the JEDEC manufacturer IDs are often used. + */ + +const struct ts_dev { + uint16_t vendor_id; + uint8_t device_id; + const char *description; +} known_devices[] = { + /* + * Analog Devices ADT7408. + * http://www.analog.com/media/en/technical-documentation/data-sheets/ADT7408.pdf + */ + { 0x11d4, 0x08, "Analog Devices DIMM temperature sensor" }, + + /* + * Atmel AT30TSE002B, AT30TSE004A. + * http://www.atmel.com/images/doc8711.pdf + * http://www.atmel.com/images/atmel-8868-dts-at30tse004a-datasheet.pdf + * Note how one chip uses the JEDEC Manufacturer ID while the other + * uses the PCI SIG one. + */ + { 0x001f, 0x82, "Atmel DIMM temperature sensor" }, + { 0x1114, 0x22, "Atmel DIMM temperature sensor" }, + + /* + * Integrated Device Technology (IDT) TS3000B3A, TSE2002B3C, + * TSE2004GB2B0 chips and their variants. + * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf + * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf + * https://www.idt.com/document/dst/tse2004gb2b0-datasheet + */ + { 0x00b3, 0x29, "IDT DIMM temperature sensor" }, + { 0x00b3, 0x22, "IDT DIMM temperature sensor" }, + + /* + * Maxim Integrated MAX6604. + * Different document revisions specify different Device IDs. + * Document 19-3837; Rev 0; 10/05 has 0x3e00 while + * 19-3837; Rev 3; 10/11 has 0x5400. + * http://datasheets.maximintegrated.com/en/ds/MAX6604.pdf + */ + { 0x004d, 0x3e, "Maxim Integrated DIMM temperature sensor" }, + { 0x004d, 0x54, "Maxim Integrated DIMM temperature sensor" }, + + /* + * Microchip Technology MCP9805, MCP9843, MCP98242, MCP98243 + * and their variants. + * http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf + * Microchip Technology EMC1501. + * http://ww1.microchip.com/downloads/en/DeviceDoc/00001605A.pdf + */ + { 0x0054, 0x00, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x20, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x21, "Microchip DIMM temperature sensor" }, + { 0x1055, 0x08, "Microchip DIMM temperature sensor" }, + + /* + * NXP Semiconductors SE97 and SE98. + * http://www.nxp.com/docs/en/data-sheet/SE97B.pdf + */ + { 0x1131, 0xa1, "NXP DIMM temperature sensor" }, + { 0x1131, 0xa2, "NXP DIMM temperature sensor" }, + + /* + * ON Semiconductor CAT34TS02 revisions B and C, CAT6095 and compatible. + * https://www.onsemi.com/pub/Collateral/CAT34TS02-D.PDF + * http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF + */ + { 0x1b09, 0x08, "ON Semiconductor DIMM temperature sensor" }, + { 0x1b09, 0x0a, "ON Semiconductor DIMM temperature sensor" }, + + /* + * ST[Microelectronics] STTS424E02, STTS2002 and others. + * http://www.st.com/resource/en/datasheet/cd00157558.pdf + * http://www.st.com/resource/en/datasheet/stts2002.pdf + */ + { 0x104a, 0x00, "ST DIMM temperature sensor" }, + { 0x104a, 0x03, "ST DIMM temperature sensor" }, +}; + +static const char * +ts_match_device(uint16_t vid, uint16_t did) +{ + const struct ts_dev *d; + int i; + + for (i = 0; i < nitems(known_devices); i++) { + d = &known_devices[i]; + if (vid == d->vendor_id && (did >> 8) == d->device_id) + return (d->description); + } + + /* + * If no match for a specific device, then check + * for a generic TSE2004av compliant device. + */ + if ((did >> 8) == 0x22) + return ("TSE2004av compliant DIMM temperature sensor"); + return (NULL); +} + +/* * SMBus specification defines little-endian byte order, * but it seems that the JEDEC devices expect it to * be big-endian. @@ -89,15 +199,7 @@ ts_temp_sysctl(SYSCTL_HANDLER_ARGS) static int ts_probe(device_t dev) { - device_set_desc(dev, "DIMM memory sensor"); - return (BUS_PROBE_DEFAULT); -} - -static int -ts_attach(device_t dev) -{ - struct sysctl_ctx_list *ctx; - struct sysctl_oid_list *tree; + const char *match; int err; uint16_t vendorid; uint16_t devid; @@ -119,26 +221,9 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Device ID\n"); return (ENXIO); } - if ((devid & 0xff00) == 0x2200) { - /* - * Defined by JEDEC Standard No. 21-C, Release 26, - * Page 4.1.6 – 24 - */ - } else if (vendorid == 0x104a) { - /* - * STMicroelectronics datasheets say that - * device ID and revision can vary. - * E.g. STT424E02, Doc ID 13448 Rev 8, - * section 4.6, page 26. - */ - } else if (vendorid == 0xb3 && (devid & 0xff00) == 0x2900) { - /* - * IDT TS3000B3A and TSE2002B3C chips and their variants. - * Revision IDs (the lower byte) can vary. - * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf - * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf - */ - } else { + + match = ts_match_device(vendorid, devid); + if (match == NULL) { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" ", 0x%x and 0x%x\n", vendorid, devid); @@ -146,9 +231,18 @@ ts_attach(device_t dev) return (ENXIO); } + device_set_desc(dev, match); + return (BUS_PROBE_DEFAULT); +} + +static int +ts_attach(device_t dev) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *tree; + ctx = device_get_sysctl_ctx(dev); tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temp", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, ts_temp_sysctl, "IK4", "Current temperature"); From owner-svn-src-all@freebsd.org Wed Sep 20 06: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 6B513E259D3; Wed, 20 Sep 2017 06: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 428A181FE7; Wed, 20 Sep 2017 06: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 v8K6TBsw083205; Wed, 20 Sep 2017 06:29:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K6TBIJ083204; Wed, 20 Sep 2017 06:29:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200629.v8K6TBIJ083204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 06:29: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: r323788 - stable/10/sys/dev/jedec_ts X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/jedec_ts X-SVN-Commit-Revision: 323788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 06:29:12 -0000 Author: avg Date: Wed Sep 20 06:29:11 2017 New Revision: 323788 URL: https://svnweb.freebsd.org/changeset/base/323788 Log: MFC r323540: jedec_ts: add many more devices from various vendors The new IDs are taken from the hardware to which I have access and from open datasheets. Also, the hardware probing is moved to the device probe method. Modified: stable/10/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/10/sys/dev/jedec_ts/jedec_ts.c Wed Sep 20 06:28:41 2017 (r323787) +++ stable/10/sys/dev/jedec_ts/jedec_ts.c Wed Sep 20 06:29:11 2017 (r323788) @@ -42,6 +42,116 @@ __FBSDID("$FreeBSD$"); /* + * General device identification notes. + * + * The JEDEC TSE2004av specification defines the device ID that all compliant + * devices should use, but very few do in practice. Maybe that's because + * TSE2002av was rather vague about that. + * Rare examples are IDT TSE2004GB2B0 and Atmel AT30TSE004A, not sure if + * they are TSE2004av compliant by design or by accident. + * Also, the specification mandates that PCI SIG manufacturer IDs are to be + * used, but in practice the JEDEC manufacturer IDs are often used. + */ + +const struct ts_dev { + uint16_t vendor_id; + uint8_t device_id; + const char *description; +} known_devices[] = { + /* + * Analog Devices ADT7408. + * http://www.analog.com/media/en/technical-documentation/data-sheets/ADT7408.pdf + */ + { 0x11d4, 0x08, "Analog Devices DIMM temperature sensor" }, + + /* + * Atmel AT30TSE002B, AT30TSE004A. + * http://www.atmel.com/images/doc8711.pdf + * http://www.atmel.com/images/atmel-8868-dts-at30tse004a-datasheet.pdf + * Note how one chip uses the JEDEC Manufacturer ID while the other + * uses the PCI SIG one. + */ + { 0x001f, 0x82, "Atmel DIMM temperature sensor" }, + { 0x1114, 0x22, "Atmel DIMM temperature sensor" }, + + /* + * Integrated Device Technology (IDT) TS3000B3A, TSE2002B3C, + * TSE2004GB2B0 chips and their variants. + * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf + * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf + * https://www.idt.com/document/dst/tse2004gb2b0-datasheet + */ + { 0x00b3, 0x29, "IDT DIMM temperature sensor" }, + { 0x00b3, 0x22, "IDT DIMM temperature sensor" }, + + /* + * Maxim Integrated MAX6604. + * Different document revisions specify different Device IDs. + * Document 19-3837; Rev 0; 10/05 has 0x3e00 while + * 19-3837; Rev 3; 10/11 has 0x5400. + * http://datasheets.maximintegrated.com/en/ds/MAX6604.pdf + */ + { 0x004d, 0x3e, "Maxim Integrated DIMM temperature sensor" }, + { 0x004d, 0x54, "Maxim Integrated DIMM temperature sensor" }, + + /* + * Microchip Technology MCP9805, MCP9843, MCP98242, MCP98243 + * and their variants. + * http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf + * Microchip Technology EMC1501. + * http://ww1.microchip.com/downloads/en/DeviceDoc/00001605A.pdf + */ + { 0x0054, 0x00, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x20, "Microchip DIMM temperature sensor" }, + { 0x0054, 0x21, "Microchip DIMM temperature sensor" }, + { 0x1055, 0x08, "Microchip DIMM temperature sensor" }, + + /* + * NXP Semiconductors SE97 and SE98. + * http://www.nxp.com/docs/en/data-sheet/SE97B.pdf + */ + { 0x1131, 0xa1, "NXP DIMM temperature sensor" }, + { 0x1131, 0xa2, "NXP DIMM temperature sensor" }, + + /* + * ON Semiconductor CAT34TS02 revisions B and C, CAT6095 and compatible. + * https://www.onsemi.com/pub/Collateral/CAT34TS02-D.PDF + * http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF + */ + { 0x1b09, 0x08, "ON Semiconductor DIMM temperature sensor" }, + { 0x1b09, 0x0a, "ON Semiconductor DIMM temperature sensor" }, + + /* + * ST[Microelectronics] STTS424E02, STTS2002 and others. + * http://www.st.com/resource/en/datasheet/cd00157558.pdf + * http://www.st.com/resource/en/datasheet/stts2002.pdf + */ + { 0x104a, 0x00, "ST DIMM temperature sensor" }, + { 0x104a, 0x03, "ST DIMM temperature sensor" }, +}; + +static const char * +ts_match_device(uint16_t vid, uint16_t did) +{ + const struct ts_dev *d; + int i; + + for (i = 0; i < nitems(known_devices); i++) { + d = &known_devices[i]; + if (vid == d->vendor_id && (did >> 8) == d->device_id) + return (d->description); + } + + /* + * If no match for a specific device, then check + * for a generic TSE2004av compliant device. + */ + if ((did >> 8) == 0x22) + return ("TSE2004av compliant DIMM temperature sensor"); + return (NULL); +} + +/* * SMBus specification defines little-endian byte order, * but it seems that the JEDEC devices expect it to * be big-endian. @@ -89,15 +199,7 @@ ts_temp_sysctl(SYSCTL_HANDLER_ARGS) static int ts_probe(device_t dev) { - device_set_desc(dev, "DIMM memory sensor"); - return (BUS_PROBE_DEFAULT); -} - -static int -ts_attach(device_t dev) -{ - struct sysctl_ctx_list *ctx; - struct sysctl_oid_list *tree; + const char *match; int err; uint16_t vendorid; uint16_t devid; @@ -119,26 +221,9 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Device ID\n"); return (ENXIO); } - if ((devid & 0xff00) == 0x2200) { - /* - * Defined by JEDEC Standard No. 21-C, Release 26, - * Page 4.1.6 – 24 - */ - } else if (vendorid == 0x104a) { - /* - * STMicroelectronics datasheets say that - * device ID and revision can vary. - * E.g. STT424E02, Doc ID 13448 Rev 8, - * section 4.6, page 26. - */ - } else if (vendorid == 0xb3 && (devid & 0xff00) == 0x2900) { - /* - * IDT TS3000B3A and TSE2002B3C chips and their variants. - * Revision IDs (the lower byte) can vary. - * http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf - * http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf - */ - } else { + + match = ts_match_device(vendorid, devid); + if (match == NULL) { if (bootverbose) { device_printf(dev, "Unknown Manufacturer and Device IDs" ", 0x%x and 0x%x\n", vendorid, devid); @@ -146,9 +231,18 @@ ts_attach(device_t dev) return (ENXIO); } + device_set_desc(dev, match); + return (BUS_PROBE_DEFAULT); +} + +static int +ts_attach(device_t dev) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *tree; + ctx = device_get_sysctl_ctx(dev); tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temp", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, ts_temp_sysctl, "IK4", "Current temperature"); From owner-svn-src-all@freebsd.org Wed Sep 20 06:34:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B681E25E2D; Wed, 20 Sep 2017 06:34:49 +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 6789F82446; Wed, 20 Sep 2017 06:34: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 v8K6Ymgm087166; Wed, 20 Sep 2017 06:34:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K6Ym39087165; Wed, 20 Sep 2017 06:34:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200634.v8K6Ym39087165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 06:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323789 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Commit-Revision: 323789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 06:34:49 -0000 Author: avg Date: Wed Sep 20 06:34:48 2017 New Revision: 323789 URL: https://svnweb.freebsd.org/changeset/base/323789 Log: 8473 scrub does not detect errors on active spares illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a https://www.illumos.org/issues/8473 Scrubbing is supposed to detect and repair all errors in the pool. However, it wrongly ignores active spare devices. The problem can easily be reproduced in OpenZFS at git rev 0ef125d with these commands: truncate -s 64m /tmp/a /tmp/b /tmp/c sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c sudo zpool replace testpool /tmp/a /tmp/c /bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c sync sudo zpool scrub testpool zpool status testpool # Will show 0 errors, which is wrong sudo zpool offline testpool /tmp/a sudo zpool scrub testpool zpool status testpool # Will show errors on /tmp/c, which should've already been fixed FreeBSD head is partially affected: the first scrub will detect some errors, but the second scrub will detect more. Reviewed by: Andy Stormont Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Richard Lowe Author: Alan Somers Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c Wed Sep 20 06:29:11 2017 (r323788) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_mirror.c Wed Sep 20 06:34:48 2017 (r323789) @@ -29,6 +29,9 @@ #include #include +#include +#include +#include #include #include #include @@ -49,7 +52,7 @@ typedef struct mirror_child { typedef struct mirror_map { int mm_children; - int mm_replacing; + int mm_resilvering; int mm_preferred; int mm_root; mirror_child_t mm_child[1]; @@ -86,7 +89,7 @@ vdev_mirror_map_alloc(zio_t *zio) mm = kmem_zalloc(offsetof(mirror_map_t, mm_child[c]), KM_SLEEP); mm->mm_children = c; - mm->mm_replacing = B_FALSE; + mm->mm_resilvering = B_FALSE; mm->mm_preferred = spa_get_random(c); mm->mm_root = B_TRUE; @@ -109,13 +112,51 @@ vdev_mirror_map_alloc(zio_t *zio) mc->mc_offset = DVA_GET_OFFSET(&dva[c]); } } else { + int replacing; + c = vd->vdev_children; mm = kmem_zalloc(offsetof(mirror_map_t, mm_child[c]), KM_SLEEP); mm->mm_children = c; - mm->mm_replacing = (vd->vdev_ops == &vdev_replacing_ops || + /* + * If we are resilvering, then we should handle scrub reads + * differently; we shouldn't issue them to the resilvering + * device because it might not have those blocks. + * + * We are resilvering iff: + * 1) We are a replacing vdev (ie our name is "replacing-1" or + * "spare-1" or something like that), and + * 2) The pool is currently being resilvered. + * + * We cannot simply check vd->vdev_resilver_txg, because it's + * not set in this path. + * + * Nor can we just check our vdev_ops; there are cases (such as + * when a user types "zpool replace pool odev spare_dev" and + * spare_dev is in the spare list, or when a spare device is + * automatically used to replace a DEGRADED device) when + * resilvering is complete but both the original vdev and the + * spare vdev remain in the pool. That behavior is intentional. + * It helps implement the policy that a spare should be + * automatically removed from the pool after the user replaces + * the device that originally failed. + */ + replacing = (vd->vdev_ops == &vdev_replacing_ops || vd->vdev_ops == &vdev_spare_ops); - mm->mm_preferred = mm->mm_replacing ? 0 : + /* + * If a spa load is in progress, then spa_dsl_pool may be + * uninitialized. But we shouldn't be resilvering during a spa + * load anyway. + */ + if (replacing && + (spa_load_state(vd->vdev_spa) == SPA_LOAD_NONE) && + dsl_scan_resilvering(vd->vdev_spa->spa_dsl_pool)) { + mm->mm_resilvering = B_TRUE; + } else { + mm->mm_resilvering = B_FALSE; + } + + mm->mm_preferred = mm->mm_resilvering ? 0 : (zio->io_offset >> vdev_mirror_shift) % c; mm->mm_root = B_FALSE; @@ -271,7 +312,7 @@ vdev_mirror_io_start(zio_t *zio) mm = vdev_mirror_map_alloc(zio); if (zio->io_type == ZIO_TYPE_READ) { - if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing) { + if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_resilvering) { /* * For scrubbing reads we need to allocate a read * buffer for each child and issue reads to all @@ -408,7 +449,7 @@ vdev_mirror_io_done(zio_t *zio) if (good_copies && spa_writeable(zio->io_spa) && (unexpected_errors || (zio->io_flags & ZIO_FLAG_RESILVER) || - ((zio->io_flags & ZIO_FLAG_SCRUB) && mm->mm_replacing))) { + ((zio->io_flags & ZIO_FLAG_SCRUB) && mm->mm_resilvering))) { /* * Use the good data we have in hand to repair damaged children. */ From owner-svn-src-all@freebsd.org Wed Sep 20 07:18: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 8A2D2E273A2; Wed, 20 Sep 2017 07:18: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 4BE2483699; Wed, 20 Sep 2017 07:18: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 v8K7I9fK003653; Wed, 20 Sep 2017 07:18:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7I99n003651; Wed, 20 Sep 2017 07:18:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200718.v8K7I99n003651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323790 - in vendor/illumos/dist: cmd/zpool lib/libzfs/common X-SVN-Group: vendor X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in vendor/illumos/dist: cmd/zpool lib/libzfs/common X-SVN-Commit-Revision: 323790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:18:10 -0000 Author: avg Date: Wed Sep 20 07:18:09 2017 New Revision: 323790 URL: https://svnweb.freebsd.org/changeset/base/323790 Log: 8567 Inconsistent return value in zpool_read_label illumos/illumos-gate@c861bfbd77c4ae780a0341e9cb6926d8b74341cf https://github.com/illumos/illumos-gate/commit/c861bfbd77c4ae780a0341e9cb6926d8b74341cf https://www.illumos.org/issues/8567 If fstat64 fails, pread64 fails, or the label is unintelligible, zpool_read_label will return 0. But if malloc fails, it will return -1. For consistency, it should always return -1 on failure or 0 on success. Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Alan Somers Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Wed Sep 20 06:34:48 2017 (r323789) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Wed Sep 20 07:18:09 2017 (r323790) @@ -708,7 +708,7 @@ zpool_do_labelclear(int argc, char **argv) return (1); } - if (zpool_read_label(fd, &config) != 0 || config == NULL) { + if (zpool_read_label(fd, &config) != 0) { (void) fprintf(stderr, gettext("failed to read label from %s\n"), vdev); return (1); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_import.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Wed Sep 20 06:34:48 2017 (r323789) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Wed Sep 20 07:18:09 2017 (r323790) @@ -841,6 +841,7 @@ label_offset(uint64_t size, int l) /* * Given a file descriptor, read the label information and return an nvlist * describing the configuration, if there is one. + * Return 0 on success, or -1 on failure */ int zpool_read_label(int fd, nvlist_t **config) @@ -853,7 +854,7 @@ zpool_read_label(int fd, nvlist_t **config) *config = NULL; if (fstat64(fd, &statbuf) == -1) - return (0); + return (-1); size = P2ALIGN_TYPED(statbuf.st_size, sizeof (vdev_label_t), uint64_t); if ((label = malloc(sizeof (vdev_label_t))) == NULL) @@ -887,7 +888,7 @@ zpool_read_label(int fd, nvlist_t **config) free(label); *config = NULL; - return (0); + return (-1); } typedef struct rdsk_node { @@ -1052,7 +1053,7 @@ zpool_open_func(void *arg) check_slices(rn->rn_avl, fd, rn->rn_name); } - if ((zpool_read_label(fd, &config)) != 0) { + if ((zpool_read_label(fd, &config)) != 0 && errno == ENOMEM) { (void) close(fd); (void) no_memory(rn->rn_hdl); return; @@ -1517,7 +1518,7 @@ zpool_in_use(libzfs_handle_t *hdl, int fd, pool_state_ *inuse = B_FALSE; - if (zpool_read_label(fd, &config) != 0) { + if (zpool_read_label(fd, &config) != 0 && errno == ENOMEM) { (void) no_memory(hdl); return (-1); } From owner-svn-src-all@freebsd.org Wed Sep 20 07:23: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 ACEF8E27729; Wed, 20 Sep 2017 07:23:51 +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 8981483ACC; Wed, 20 Sep 2017 07:23:51 +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 v8K7Noi3007471; Wed, 20 Sep 2017 07:23:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7NoXb007469; Wed, 20 Sep 2017 07:23:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200723.v8K7NoXb007469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323791 - in head/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common X-SVN-Commit-Revision: 323791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:23:51 -0000 Author: avg Date: Wed Sep 20 07:23:50 2017 New Revision: 323791 URL: https://svnweb.freebsd.org/changeset/base/323791 Log: MFV r323790: 8567 Inconsistent return value in zpool_read_label illumos/illumos-gate@c861bfbd77c4ae780a0341e9cb6926d8b74341cf https://github.com/illumos/illumos-gate/commit/c861bfbd77c4ae780a0341e9cb6926d8b74341cf https://www.illumos.org/issues/8567 If fstat64 fails, pread64 fails, or the label is unintelligible, zpool_read_label will return 0. But if malloc fails, it will return -1. For consistency, it should always return -1 on failure or 0 on success. Reviewed by: Prakash Surya Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Alan Somers MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Sep 20 07:18:09 2017 (r323790) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Sep 20 07:23:50 2017 (r323791) @@ -705,7 +705,7 @@ zpool_do_labelclear(int argc, char **argv) return (1); } - if (zpool_read_label(fd, &config) != 0 || config == NULL) { + if (zpool_read_label(fd, &config) != 0) { (void) fprintf(stderr, gettext("failed to read label from %s\n"), vdev); return (1); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Sep 20 07:18:09 2017 (r323790) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Sep 20 07:23:50 2017 (r323791) @@ -865,6 +865,7 @@ label_offset(uint64_t size, int l) /* * Given a file descriptor, read the label information and return an nvlist * describing the configuration, if there is one. + * Return 0 on success, or -1 on failure */ int zpool_read_label(int fd, nvlist_t **config) @@ -877,7 +878,7 @@ zpool_read_label(int fd, nvlist_t **config) *config = NULL; if (fstat64(fd, &statbuf) == -1) - return (0); + return (-1); size = P2ALIGN_TYPED(statbuf.st_size, sizeof (vdev_label_t), uint64_t); if ((label = malloc(sizeof (vdev_label_t))) == NULL) @@ -911,7 +912,7 @@ zpool_read_label(int fd, nvlist_t **config) free(label); *config = NULL; - return (0); + return (-1); } /* @@ -1148,7 +1149,7 @@ zpool_open_func(void *arg) } #endif /* illumos */ - if ((zpool_read_label(fd, &config)) != 0) { + if ((zpool_read_label(fd, &config)) != 0 && errno == ENOMEM) { (void) close(fd); (void) no_memory(rn->rn_hdl); return; @@ -1649,7 +1650,7 @@ zpool_in_use(libzfs_handle_t *hdl, int fd, pool_state_ *inuse = B_FALSE; - if (zpool_read_label(fd, &config) != 0) { + if (zpool_read_label(fd, &config) != 0 && errno == ENOMEM) { (void) no_memory(hdl); return (-1); } From owner-svn-src-all@freebsd.org Wed Sep 20 07:24: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 38502E27808; Wed, 20 Sep 2017 07:24: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 0733883C5B; Wed, 20 Sep 2017 07:24: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 v8K7Ovti007557; Wed, 20 Sep 2017 07:24:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7OvuO007556; Wed, 20 Sep 2017 07:24:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200724.v8K7OvuO007556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323792 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:24:58 -0000 Author: avg Date: Wed Sep 20 07:24:57 2017 New Revision: 323792 URL: https://svnweb.freebsd.org/changeset/base/323792 Log: 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure illumos/illumos-gate@2bcb5458541cc6e8bf7dc541303da29297b82e8b https://github.com/illumos/illumos-gate/commit/2bcb5458541cc6e8bf7dc541303da29297b82e8b https://www.illumos.org/issues/8602 When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks" field to the "dsl_pool" structure. This field is used in DelphixOS, but not in illumos. It was incorrectly pulled into illumos, so this bug is to remove it from the structure. Reviewed by: Serapheim Dimitropoulos Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Prakash Surya Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h Wed Sep 20 07:23:50 2017 (r323791) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_pool.h Wed Sep 20 07:24:57 2017 (r323792) @@ -123,7 +123,6 @@ typedef struct dsl_pool { txg_list_t dp_sync_tasks; taskq_t *dp_sync_taskq; taskq_t *dp_zil_clean_taskq; - txg_list_t dp_early_sync_tasks; /* * Protects administrative changes (properties, namespace) From owner-svn-src-all@freebsd.org Wed Sep 20 07:26: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 17997E27964; Wed, 20 Sep 2017 07:26: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 D968083E31; Wed, 20 Sep 2017 07:26:53 +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 v8K7Qr53007691; Wed, 20 Sep 2017 07:26:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7Qrhn007690; Wed, 20 Sep 2017 07:26:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200726.v8K7Qrhn007690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323793 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 323793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:26:54 -0000 Author: avg Date: Wed Sep 20 07:26:52 2017 New Revision: 323793 URL: https://svnweb.freebsd.org/changeset/base/323793 Log: MFV r323792: 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure illumos/illumos-gate@2bcb5458541cc6e8bf7dc541303da29297b82e8b https://github.com/illumos/illumos-gate/commit/2bcb5458541cc6e8bf7dc541303da29297b82e8b https://www.illumos.org/issues/8602 When I landed the fix for 8558, I incorrectly added the "dp_early_sync_tasks" field to the "dsl_pool" structure. This field is used in DelphixOS, but not in illumos. It was incorrectly pulled into illumos, so this bug is to remove it from the structure. Reviewed by: Serapheim Dimitropoulos Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Prakash Surya MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed Sep 20 07:24:57 2017 (r323792) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed Sep 20 07:26:52 2017 (r323793) @@ -123,7 +123,6 @@ typedef struct dsl_pool { txg_list_t dp_sync_tasks; taskq_t *dp_sync_taskq; taskq_t *dp_zil_clean_taskq; - txg_list_t dp_early_sync_tasks; /* * Protects administrative changes (properties, namespace) From owner-svn-src-all@freebsd.org Wed Sep 20 07:27: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 A9090E27A0A; Wed, 20 Sep 2017 07:27:46 +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 74F1483F9D; Wed, 20 Sep 2017 07:27:46 +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 v8K7RjZW007773; Wed, 20 Sep 2017 07:27:45 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7Rj0Z007772; Wed, 20 Sep 2017 07:27:45 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200727.v8K7Rj0Z007772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323794 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/man/man1m X-SVN-Group: vendor X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/man/man1m X-SVN-Commit-Revision: 323794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:27:46 -0000 Author: avg Date: Wed Sep 20 07:27:45 2017 New Revision: 323794 URL: https://svnweb.freebsd.org/changeset/base/323794 Log: 8605 zfs channel programs: zfs.exists undocumented and non-working illumos/illumos-gate@5f39f884e2035d671ec02148fc4d8420c670bcb4 https://github.com/illumos/illumos-gate/commit/5f39f884e2035d671ec02148fc4d8420c670bcb4 https://www.illumos.org/issues/8605 zfs.exists() in channel programs doesn't return any result, and should have a man page entry. Reviewed by: Paul Dagnelie Reviewed by: Dan Kimmel Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Chris Williamson Modified: vendor/illumos/dist/man/man1m/zfs-program.1m Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c Modified: vendor/illumos/dist/man/man1m/zfs-program.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs-program.1m Wed Sep 20 07:26:52 2017 (r323793) +++ vendor/illumos/dist/man/man1m/zfs-program.1m Wed Sep 20 07:27:45 2017 (r323794) @@ -289,6 +289,18 @@ msg (string) .Bd -ragged -compact -offset "xxxx" Debug message to be printed. .Ed +.It Em zfs.exists(dataset) +Returns true if the given dataset exists, or false if it doesn't. +A fatal error will be thrown if the dataset is not in the target pool. +That is, in a channel program running on rpool, +zfs.exists("rpool/nonexistent_fs") returns false, but +zfs.exists("somepool/fs_that_may_exist") will error. +.Pp +dataset (string) +.Bd -ragged -compact -offset "xxxx" +Dataset to check for existence. +Must be in the target pool. +.Ed .It Em zfs.get_prop(dataset, property) Returns two values. First, a string, number or table containing the property value for the given From owner-svn-src-all@freebsd.org Wed Sep 20 07:27: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 610C1E27A07; Wed, 20 Sep 2017 07:27:46 +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 2D26283F9C; Wed, 20 Sep 2017 07:27:46 +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 v8K7Rjn5007767; Wed, 20 Sep 2017 07:27:45 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7RjL1007766; Wed, 20 Sep 2017 07:27:45 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200727.v8K7RjL1007766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323794 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/man/man1m X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/man/man1m X-SVN-Commit-Revision: 323794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:27:46 -0000 Author: avg Date: Wed Sep 20 07:27:45 2017 New Revision: 323794 URL: https://svnweb.freebsd.org/changeset/base/323794 Log: 8605 zfs channel programs: zfs.exists undocumented and non-working illumos/illumos-gate@5f39f884e2035d671ec02148fc4d8420c670bcb4 https://github.com/illumos/illumos-gate/commit/5f39f884e2035d671ec02148fc4d8420c670bcb4 https://www.illumos.org/issues/8605 zfs.exists() in channel programs doesn't return any result, and should have a man page entry. Reviewed by: Paul Dagnelie Reviewed by: Dan Kimmel Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Chris Williamson Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/man/man1m/zfs-program.1m Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c Wed Sep 20 07:26:52 2017 (r323793) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c Wed Sep 20 07:27:45 2017 (r323794) @@ -710,7 +710,7 @@ zcp_exists(lua_State *state) return (luaL_error(state, "unexpected error %d", error)); } - return (0); + return (1); } /* From owner-svn-src-all@freebsd.org Wed Sep 20 07:28:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DC77E27AAB; Wed, 20 Sep 2017 07:28:20 +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 4FDB0168; Wed, 20 Sep 2017 07:28:20 +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 v8K7SJO9007839; Wed, 20 Sep 2017 07:28:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K7SJQS007836; Wed, 20 Sep 2017 07:28:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200728.v8K7SJQS007836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 07:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323795 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 323795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:28:20 -0000 Author: avg Date: Wed Sep 20 07:28:18 2017 New Revision: 323795 URL: https://svnweb.freebsd.org/changeset/base/323795 Log: 8604 Avoid unnecessary work search in VFS when unmounting snapshots illumos/illumos-gate@ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1 https://github.com/illumos/illumos-gate/commit/ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1 https://www.illumos.org/issues/8604 Every time we want to unmount a snapshot (happens during snapshot deletion or renaming) we unnecessarily iterate through all the mountpoints in the VFS layer (see zfs_get_vfs). Ideally we would just put a hold on the snapshot and access its respective VFS resource directly. gwilson_snap_unmount.svg - Flamegraph indicating the issue discussed (138 KB) Serapheim Dimitropoulos, 2017-09-14 06:36 PM Reviewed by: Matt Ahrens Reviewed by: George Wilson Reviewed by: Andy Stormont Approved by: Robert Mustacchi Author: Serapheim Dimitropoulos Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Wed Sep 20 07:27:45 2017 (r323794) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Wed Sep 20 07:28:18 2017 (r323795) @@ -488,23 +488,29 @@ dsl_destroy_snapshots_nvl(nvlist_t *snaps, boolean_t d if (nvlist_next_nvpair(snaps, NULL) == NULL) return (0); - nvlist_t *arg = fnvlist_alloc(); - nvlist_t *snaps_normalized = fnvlist_alloc(); /* * lzc_destroy_snaps() is documented to take an nvlist whose - * values "don't matter". We need to convert that nvlist to one - * that we know can be converted to LUA. + * values "don't matter". We need to convert that nvlist to + * one that we know can be converted to LUA. We also don't + * care about any duplicate entries because the nvlist will + * be converted to a LUA table which should take care of this. */ + nvlist_t *snaps_normalized; + VERIFY0(nvlist_alloc(&snaps_normalized, 0, KM_SLEEP)); for (nvpair_t *pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { fnvlist_add_boolean_value(snaps_normalized, nvpair_name(pair), B_TRUE); } + + nvlist_t *arg; + VERIFY0(nvlist_alloc(&arg, 0, KM_SLEEP)); fnvlist_add_nvlist(arg, "snaps", snaps_normalized); fnvlist_free(snaps_normalized); fnvlist_add_boolean_value(arg, "defer", defer); - nvlist_t *wrapper = fnvlist_alloc(); + nvlist_t *wrapper; + VERIFY0(nvlist_alloc(&wrapper, 0, KM_SLEEP)); fnvlist_add_nvlist(wrapper, ZCP_ARG_ARGLIST, arg); fnvlist_free(arg); @@ -538,7 +544,7 @@ dsl_destroy_snapshots_nvl(nvlist_t *snaps, boolean_t d program, 0, zfs_lua_max_memlimit, - fnvlist_lookup_nvpair(wrapper, ZCP_ARG_ARGLIST), result); + nvlist_next_nvpair(wrapper, NULL), result); if (error != 0) { char *errorstr = NULL; (void) nvlist_lookup_string(result, ZCP_RET_ERROR, &errorstr); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Wed Sep 20 07:27:45 2017 (r323794) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Wed Sep 20 07:28:18 2017 (r323795) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright 2016 RackTop Systems. * Copyright (c) 2014 Integros [integros.com] */ @@ -428,9 +428,10 @@ extern int zfs_secpolicy_snapshot_perms(const char *, extern int zfs_secpolicy_rename_perms(const char *, const char *, cred_t *); extern int zfs_secpolicy_destroy_perms(const char *, cred_t *); extern int zfs_busy(void); -extern int zfs_unmount_snap(const char *); +extern void zfs_unmount_snap(const char *); extern void zfs_destroy_unmount_origin(const char *); extern int getzfsvfs_impl(struct objset *, struct zfsvfs **); +extern int getzfsvfs(const char *, struct zfsvfs **); /* * ZFS minor numbers can refer to either a control device instance or Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Wed Sep 20 07:27:45 2017 (r323794) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Wed Sep 20 07:28:18 2017 (r323795) @@ -1417,7 +1417,7 @@ getzfsvfs_impl(objset_t *os, zfsvfs_t **zfvp) return (error); } -static int +int getzfsvfs(const char *dsname, zfsvfs_t **zfvp) { objset_t *os; @@ -2988,31 +2988,6 @@ zfs_ioc_get_fsacl(zfs_cmd_t *zc) return (error); } -/* - * Search the vfs list for a specified resource. Returns a pointer to it - * or NULL if no suitable entry is found. The caller of this routine - * is responsible for releasing the returned vfs pointer. - */ -static vfs_t * -zfs_get_vfs(const char *resource) -{ - struct vfs *vfsp; - struct vfs *vfs_found = NULL; - - vfs_list_read_lock(); - vfsp = rootvfs; - do { - if (strcmp(refstr_value(vfsp->vfs_resource), resource) == 0) { - VFS_HOLD(vfsp); - vfs_found = vfsp; - break; - } - vfsp = vfsp->vfs_next; - } while (vfsp != rootvfs); - vfs_list_unlock(); - return (vfs_found); -} - /* ARGSUSED */ static void zfs_create_cb(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx) @@ -3439,40 +3414,41 @@ zfs_ioc_log_history(const char *unused, nvlist_t *innv * Returns 0 if the argument is not a snapshot, or it is not currently a * filesystem, or we were able to unmount it. Returns error code otherwise. */ -int +void zfs_unmount_snap(const char *snapname) { - vfs_t *vfsp; - zfsvfs_t *zfsvfs; - int err; + vfs_t *vfsp = NULL; + zfsvfs_t *zfsvfs = NULL; if (strchr(snapname, '@') == NULL) - return (0); + return; - vfsp = zfs_get_vfs(snapname); - if (vfsp == NULL) - return (0); + int err = getzfsvfs(snapname, &zfsvfs); + if (err != 0) { + ASSERT3P(zfsvfs, ==, NULL); + return; + } + vfsp = zfsvfs->z_vfs; - zfsvfs = vfsp->vfs_data; ASSERT(!dsl_pool_config_held(dmu_objset_pool(zfsvfs->z_os))); err = vn_vfswlock(vfsp->vfs_vnodecovered); VFS_RELE(vfsp); if (err != 0) - return (SET_ERROR(err)); + return; /* * Always force the unmount for snapshots. */ (void) dounmount(vfsp, MS_FORCE, kcred); - return (0); } /* ARGSUSED */ static int zfs_unmount_snap_cb(const char *snapname, void *arg) { - return (zfs_unmount_snap(snapname)); + zfs_unmount_snap(snapname); + return (0); } /* @@ -3495,7 +3471,7 @@ zfs_destroy_unmount_origin(const char *fsname) char originname[ZFS_MAX_DATASET_NAME_LEN]; dsl_dataset_name(ds->ds_prev, originname); dmu_objset_rele(os, FTAG); - (void) zfs_unmount_snap(originname); + zfs_unmount_snap(originname); } else { dmu_objset_rele(os, FTAG); } @@ -3524,7 +3500,7 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_t * for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { - (void) zfs_unmount_snap(nvpair_name(pair)); + zfs_unmount_snap(nvpair_name(pair)); } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3667,11 +3643,8 @@ zfs_ioc_destroy(zfs_cmd_t *zc) { int err; - if (zc->zc_objset_type == DMU_OST_ZFS) { - err = zfs_unmount_snap(zc->zc_name); - if (err != 0) - return (err); - } + if (zc->zc_objset_type == DMU_OST_ZFS) + zfs_unmount_snap(zc->zc_name); if (strchr(zc->zc_name, '@')) err = dsl_destroy_snapshot(zc->zc_name, zc->zc_defer_destroy); @@ -3735,7 +3708,9 @@ recursive_unmount(const char *fsname, void *arg) char fullname[ZFS_MAX_DATASET_NAME_LEN]; (void) snprintf(fullname, sizeof (fullname), "%s@%s", fsname, snapname); - return (zfs_unmount_snap(fullname)); + zfs_unmount_snap(fullname); + + return (0); } /* From owner-svn-src-all@freebsd.org Wed Sep 20 07:42: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 5E666E0070C; Wed, 20 Sep 2017 07:42:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28A8DEA8; Wed, 20 Sep 2017 07:42:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id i195so1255511pgd.9; Wed, 20 Sep 2017 00:42:52 -0700 (PDT) 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=3MFIfyNo5XmoQLxZzh1BPfuigm0k9Yl8WKAK4vdP9AI=; b=BxfH4paJZKLJG2i8g2ai36/66Gww/28Fp3EIOTapzPzsuFmmTNnKOAJWqRUQREHiuD xKoO7Nyp5otTzaRNLj/LBHq9NpuKJciI4T+qloU4gvJqppU1s8b2jBknbDhBA/8t5Bc8 MfYNMvYCkyUEhx8LdThtow/rr/R+o6Klm0FB2Xs9QlWXq5owsqC6rgtRZmEa0Gz17JKS xKQjPWlsvBU82mZmsymzn9xjBRpF4ipzBMrI8A8ekVQfm5EfLYOpUg4OEGNiG44ImM/A kn9Fo5amBIdTt2+3Uwlh6RiCsle6W+HDsO0hohJunFDggp1XEFtPVEfzhlGON02dQQ7y dm9A== 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=3MFIfyNo5XmoQLxZzh1BPfuigm0k9Yl8WKAK4vdP9AI=; b=IByH4PL32waF8iKOpJMHdSRCsharWAmhNNf/8upX0UcKEAoatOyJVEMp9xKUHHrKIr AVo/ZwkjKyMRzfEXToMbCXfVvEaKUqgASn6CVZFgKs8lA2o+/TPQlcl36JBldZRWTuaV 2YgWgv0vBNYtIJluoIP7wJhr3RXxYtZm6doaey+uhLR13SD/d3rNMUAxf7GgpJzKUGDV HQ1+yHKJkIzvYtjOrSTnSXEmaf2G3Rrp25NctSVuStYLmoi1A1e3G5T7RmDARXsEZPAP 2FF8FSljYse2HoGOCQ+K9HOi+XYP4HKWh4UBRF4kElPgAIa6zM9w+2vWtCzOwR0tE/VA jgfw== X-Gm-Message-State: AHPjjUiiUGBjjOVScx933QdcQmZXYY8o0fd0WNVStFgYRFo2ZBsKpa3V xdOC90/E9XK2zgvBt8X8o9/v8cOj X-Google-Smtp-Source: AOwi7QA5TDRTvMDbYr+Gqudt9sAaBVOPgb7hMbLyGOK9JUHX8qYrI5RfQEJgDpSknCfsrXaHQeR0sw== X-Received: by 10.84.129.226 with SMTP id b89mr1234659plb.0.1505893371095; Wed, 20 Sep 2017 00:42:51 -0700 (PDT) Received: from [192.168.3.133] (70-90-173-49-California.hfc.comcastbusiness.net. [70.90.173.49]) by smtp.gmail.com with ESMTPSA id x13sm6554814pgt.16.2017.09.20.00.42.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Sep 2017 00:42:50 -0700 (PDT) Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201709191651.v8JGpp5v048489@repo.freebsd.org> Date: Wed, 20 Sep 2017 00:41:13 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-Id: <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> To: Josh Paetzel X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 07:42:52 -0000 --Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 19, 2017, at 09:51, Josh Paetzel wrote: >=20 > Author: jpaetzel > Date: Tue Sep 19 16:51:51 2017 > New Revision: 323770 > URL: https://svnweb.freebsd.org/changeset/base/323770 >=20 > Log: > MFC: 323068 >=20 > Allow kldload tcpmd5 Wasn=E2=80=99t this reverted on ^/head ? Thanks, -Ngie --Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC 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 iQIcBAEBCgAGBQJZwhuaAAoJEPWDqSZpMIYVIfAP/j1HqqhS1qX8kRJNjjxp9DcW LiCJaa8Q6y+TH3RELC48AVtdbiXU1yRi1/tquM1+P04BUIIot4eBPfIV2asBTPjk vwf/4WoVMbWTMMYikqj74Cb9vr769m1RDP1fPti/vVSPR1OvFyytFBa++NtVuDqR LvuQw1leEGJemhAu/4pBxaPePe/LU8IfAg6B2b/+m2P7XFkEzskT5nMbWdrK7oE9 6WjmhEzPP0Gp6yG+wOEFncJRLGLSwQ5rcHKPkgVzVhjL7IruWgmjMIlzysPp7AeN +uU+zWxyjrh3AGvQKe3QF/ozssiP4LqEOf5hhaL6wUoo1yCw/91IbN6gcZn6vf0H nL39J5z/06h2WmqGoshGAM4Wo5p4I52vxJS3QDKWKgiMxypzbmKmUDcM3vi4CVJJ iquUOub/pa3oSWTkCJay+JJ9NRdiDSRk6z8J/isJtFLGVIE2zwU/O17PfYOZA0pX P/qtqfziA3hHFVvjki2gS5P1oyMixNWfNRMf6Xjqn73bfVrxpXu24JjLCoXhlWB+ Uuv0yxL1jMfbfb8MzpKMCSdykyV6QK02K2SG3gx2y3PhJZ5fEnjemwcxXyhdMzJy 6L6XcBobWIFedpliuzeThrGWHF3nzTR0sK0QXMsqpzLj8M5qDcyXzoNqww6iLKD1 uS5JqlX4NLn54kw/PGV3 =AM2d -----END PGP SIGNATURE----- --Apple-Mail=_128A22E3-D552-4B77-A721-99A1B1A216EC-- From owner-svn-src-all@freebsd.org Wed Sep 20 08:27: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 AFE99E0231E; Wed, 20 Sep 2017 08:27: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 7E118228D; Wed, 20 Sep 2017 08:27: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 v8K8RLgQ032317; Wed, 20 Sep 2017 08:27:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8RLiK032316; Wed, 20 Sep 2017 08:27:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200827.v8K8RLiK032316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 08:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323796 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:27:22 -0000 Author: avg Date: Wed Sep 20 08:27:21 2017 New Revision: 323796 URL: https://svnweb.freebsd.org/changeset/base/323796 Log: fix memory leak in g_bio zone introduced in r320452, another ABD fallout I overlooked the fact that that ZIO_IOCTL_PIPELINE does not include ZIO_STAGE_VDEV_IO_DONE stage. We do allocate a struct bio for an ioctl zio (a disk cache flush), but we never freed it. This change splits bio handling into two groups, one for normal read/write i/o that passes data around and, thus, needs the abd data tranform; the other group is for "data-less" i/o such as trim and cache flush. PR: 222288 Reported by: Dan Nelson Tested by: Borja Marcos MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Wed Sep 20 07:28:18 2017 (r323795) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Wed Sep 20 08:27:21 2017 (r323796) @@ -989,6 +989,15 @@ vdev_geom_io_intr(struct bio *bp) break; } + /* + * We have to split bio freeing into two parts, because the ABD code + * cannot be called in this context and vdev_op_io_done is not called + * for ZIO_TYPE_IOCTL zio-s. + */ + if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) { + g_destroy_bio(bp); + zio->io_bio = NULL; + } zio_delay_interrupt(zio); } @@ -1090,21 +1099,23 @@ vdev_geom_io_done(zio_t *zio) { struct bio *bp = zio->io_bio; + if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) { + ASSERT(bp == NULL); + return; + } + if (bp == NULL) { - ASSERT3S(zio->io_error, !=, 0); - IMPLY(zio->io_type == ZIO_TYPE_READ || - zio->io_type == ZIO_TYPE_WRITE, - zio->io_error == ENXIO); + ASSERT3S(zio->io_error, ==, ENXIO); return; } - if (zio->io_type == ZIO_TYPE_READ) { + if (zio->io_type == ZIO_TYPE_READ) abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size); - } else if (zio->io_type == ZIO_TYPE_WRITE) { + else abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size); - } g_destroy_bio(bp); + zio->io_bio = NULL; } static void From owner-svn-src-all@freebsd.org Wed Sep 20 08:36: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 76B71E02A50; Wed, 20 Sep 2017 08:36: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 43F0F29B5; Wed, 20 Sep 2017 08:36: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 v8K8aVfq036211; Wed, 20 Sep 2017 08:36:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8aVoT036210; Wed, 20 Sep 2017 08:36:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709200836.v8K8aVoT036210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 20 Sep 2017 08:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323797 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:36:32 -0000 Author: avg Date: Wed Sep 20 08:36:31 2017 New Revision: 323797 URL: https://svnweb.freebsd.org/changeset/base/323797 Log: add vfs_zfs.abd_chunk_size tunable It is reported that the default value of 4KB results in a substantial memory use overhead (at least, on some configurations). Using 1KB seems to reduce the overhead significantly. PR: 222377 Reported by: Sean Chittenden MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed Sep 20 08:27:21 2017 (r323796) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed Sep 20 08:36:31 2017 (r323797) @@ -150,6 +150,13 @@ boolean_t zfs_abd_scatter_enabled = B_TRUE; */ size_t zfs_abd_chunk_size = 4096; +#if defined(__FreeBSD__) && defined(_KERNEL) +SYSCTL_DECL(_vfs_zfs); + +SYSCTL_ULONG(_vfs_zfs, OID_AUTO, abd_chunk_size, CTLFLAG_RDTUN, + &zfs_abd_chunk_size, 0, "The size of the chunks ABD allocates"); +#endif + #ifdef _KERNEL extern vmem_t *zio_alloc_arena; #endif From owner-svn-src-all@freebsd.org Wed Sep 20 08:41: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 11AE9E02FB1; Wed, 20 Sep 2017 08:41:48 +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 D0DC52CF9; Wed, 20 Sep 2017 08:41: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 v8K8fkqA037862; Wed, 20 Sep 2017 08:41:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8fkJg037861; Wed, 20 Sep 2017 08:41:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200841.v8K8fkJg037861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 08:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323798 - stable/11/lib/libpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libpmc X-SVN-Commit-Revision: 323798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:41:48 -0000 Author: kib Date: Wed Sep 20 08:41:46 2017 New Revision: 323798 URL: https://svnweb.freebsd.org/changeset/base/323798 Log: MFC r323229: Minor style changes to make forthcoming code stand out less. Modified: stable/11/lib/libpmc/libpmc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/libpmc.c ============================================================================== --- stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:36:31 2017 (r323797) +++ stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:41:46 2017 (r323798) @@ -1017,20 +1017,20 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE || cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE_XEON || - cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE || - cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE_XEON ) { + cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE || + cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE_XEON ) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_sb_sbx_ib, p, &rsp); } else return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL || - cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { + cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL || - cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL_XEON) { + cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL_XEON) { /* Broadwell is defined to use same mask as haswell */ if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); @@ -3595,7 +3595,8 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype break; case PMC_CPU_INTEL_SKYLAKE: ev = skylake_event_table; - evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + evfence = skylake_event_table + + PMC_EVENT_TABLE_SIZE(skylake); break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; From owner-svn-src-all@freebsd.org Wed Sep 20 08:45: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 C6260E03247; Wed, 20 Sep 2017 08:45: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 5764430E1; Wed, 20 Sep 2017 08:45:43 +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 v8K8jgsC040380; Wed, 20 Sep 2017 08:45:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8jgBi040377; Wed, 20 Sep 2017 08:45:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200845.v8K8jgBi040377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 08:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323799 - in stable/11: lib/libpmc sys/dev/hwpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: lib/libpmc sys/dev/hwpmc X-SVN-Commit-Revision: 323799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:45:43 -0000 Author: kib Date: Wed Sep 20 08:45:42 2017 New Revision: 323799 URL: https://svnweb.freebsd.org/changeset/base/323799 Log: MFC r323230: Skylake server core PMC support for hwpmc(4). Modified: stable/11/lib/libpmc/libpmc.c stable/11/sys/dev/hwpmc/hwpmc_core.c stable/11/sys/dev/hwpmc/hwpmc_intel.c stable/11/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/libpmc.c ============================================================================== --- stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:41:46 2017 (r323798) +++ stable/11/lib/libpmc/libpmc.c Wed Sep 20 08:45:42 2017 (r323799) @@ -232,6 +232,11 @@ static const struct pmc_event_descr skylake_event_tabl __PMC_EV_ALIAS_SKYLAKE() }; +static const struct pmc_event_descr skylake_xeon_event_table[] = +{ + __PMC_EV_ALIAS_SKYLAKE_XEON() +}; + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -328,6 +333,7 @@ PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_ PMC_MDEP_TABLE(broadwell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(broadwell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(skylake, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(skylake_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -383,6 +389,7 @@ PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell_xeon, PMC_CLASS_TABLE_DESC(broadwell, IAP, broadwell, iap); PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap); PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, iap); +PMC_CLASS_TABLE_DESC(skylake_xeon, IAP, skylake_xeon, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); @@ -721,6 +728,8 @@ static struct pmc_event_alias core2_aliases_without_ia #define broadwell_xeon_aliases_without_iaf core2_aliases_without_iaf #define skylake_aliases core2_aliases #define skylake_aliases_without_iaf core2_aliases_without_iaf +#define skylake_xeon_aliases core2_aliases +#define skylake_xeon_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -1037,7 +1046,8 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, } else return (-1); - } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE) { + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE || + cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE_XEON) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_skylake, p, &rsp); } else @@ -3007,6 +3017,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = skylake_event_table; count = PMC_EVENT_TABLE_SIZE(skylake); break; + case PMC_CPU_INTEL_SKYLAKE_XEON: + ev = skylake_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(skylake_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -3386,6 +3400,9 @@ pmc_init(void) case PMC_CPU_INTEL_SKYLAKE: PMC_MDEP_INIT_INTEL_V2(skylake); break; + case PMC_CPU_INTEL_SKYLAKE_XEON: + PMC_MDEP_INIT_INTEL_V2(skylake_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3597,6 +3614,11 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype ev = skylake_event_table; evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + break; + case PMC_CPU_INTEL_SKYLAKE_XEON: + ev = skylake_xeon_event_table; + evfence = skylake_xeon_event_table + + PMC_EVENT_TABLE_SIZE(skylake_xeon); break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; Modified: stable/11/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_core.c Wed Sep 20 08:41:46 2017 (r323798) +++ stable/11/sys/dev/hwpmc/hwpmc_core.c Wed Sep 20 08:45:42 2017 (r323799) @@ -582,6 +582,7 @@ struct iap_event_descr { #define IAP_F_BW (1 << 13) /* CPU: Broadwell */ #define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ #define IAP_F_SL (1 << 15) /* CPU: Skylake */ +#define IAP_F_SLX (1 << 16) /* CPU: Skylake Xeon AKA scalable */ #define IAP_F_FM (1 << 18) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ @@ -626,12 +627,12 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -670,7 +671,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), @@ -679,22 +680,24 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX), + IAP_F_BW | IAP_F_BWX | IAP_F_SLX), IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SLX), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -717,19 +720,21 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), + IAPDESCR(0DH_01H, 0x0D, 0x80, IAP_F_FM | IAP_F_SLX), IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL), + IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL | IAP_F_SLX), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | + IAP_F_SLX), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -782,7 +787,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | @@ -824,21 +829,27 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | @@ -846,19 +857,20 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL | IAP_F_SLX), IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), - IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), - IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(24H_EFH, 0x24, 0xEF, IAP_F_FM | IAP_F_SL), - IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_SLX), IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -900,10 +912,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SBX), IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_07H, 0x28, 0x07, IAP_F_FM | IAP_F_SLX), IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_18H, 0x28, 0x18, IAP_F_SLX), + IAPDESCR(28H_20H, 0x28, 0x20, IAP_F_SLX), + IAPDESCR(28H_40H, 0x28, 0x40, IAP_F_SLX), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, @@ -917,10 +933,10 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -936,11 +952,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL | + IAP_F_SLX), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -981,24 +1000,27 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL | IAP_F_SLX), IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SLX), IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), + IAPDESCR(49H_08H, 0x49, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | @@ -1012,7 +1034,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -1028,11 +1051,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), - IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1044,6 +1068,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(54H_01H, 0x54, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_02H, 0x54, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_04H, 0x54, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_08H, 0x54, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_10H, 0x54, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_20H, 0x54, 0x20, IAP_F_FM | IAP_F_SLX), + IAPDESCR(54H_40H, 0x54, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | @@ -1067,8 +1099,15 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(5DH_01H, 0x5d, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_02H, 0x5d, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_04H, 0x5d, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_08H, 0x5d, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5DH_10H, 0x5d, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_FM | IAP_F_IBX | IAP_F_IB), @@ -1076,16 +1115,17 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM |IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM |IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_10H, 0x60, 0x10, IAP_F_FM | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(60H_10H, 0x60, 0x10, IAP_F_FM | IAP_F_SL | IAP_F_SLX), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1145,23 +1185,24 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | IAP_F_BWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | + IAP_F_BWX | IAP_F_SLX), IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -1184,7 +1225,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | - IAP_F_IBX | IAP_F_SL), /* SL may have a spec bug two with same entry no cmask */ + IAP_F_IBX | IAP_F_SL | IAP_F_SLX), /* SL may have a spec bug two with + same entry no cmask */ IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1197,23 +1239,29 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), - IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SL), - IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SL | IAP_F_SLX), + IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(83H_04H, 0x83, 0x04, IAP_F_FM | IAP_F_SLX), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX), + IAP_F_BW | IAP_F_BWX | IAP_F_SLX), IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_SLX), + IAPDESCR(85H_08H, 0x85, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), @@ -1223,7 +1271,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1305,41 +1353,42 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(A0H_00H, 0xA0, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A1H_01H, 0xA1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_02H, 0xA1, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(A1H_30H, 0xA1, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_40H, 0xA1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(A1H_80H, 0xA1, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1347,7 +1396,7 @@ static struct iap_event_descr iap_events[] = { IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -1358,30 +1407,35 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | - IAP_F_HWX | IAP_F_SL), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | - IAP_F_HWX | IAP_F_SL), - IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_SL), - IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | - IAP_F_SL), - IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL), - IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), - IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | + IAP_F_HWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), - IAPDESCR(A6H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_40H, 0xA3, 0x40, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(A6H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(A6H_40H, 0xA3, 0x40, IAP_F_FM | IAP_F_SL | IAP_F_SLX), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM ), + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | - IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1391,7 +1445,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | + IAP_F_SLX), IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_SL), IAPDESCR(ACH_08H, 0xAC, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1400,34 +1455,38 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SL | + IAP_F_SLX), IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O | IAP_F_SL), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O | + IAP_F_SL | IAP_F_SLX), IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(B1H_02H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SLX), IAPDESCR(B1H_1FH, 0xB1, 0x1F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_20H, 0xB1, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_3FH, 0xB1, 0x3F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1436,7 +1495,7 @@ static struct iap_event_descr iap_events[] = { IAP_F_WM), IAPDESCR(B2H_01H, 0xB2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_SBX), + IAP_F_SB | IAP_F_SBX | IAP_F_SLX), IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_I7O), @@ -1487,18 +1546,19 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(BDH_01H, 0xBD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), /* spec bug SL? */ + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_SLX), /* spec bug SL? */ IAPDESCR(BDH_20H, 0xBD, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), IAPDESCR(BFH_05H, 0xBF, 0x05, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_BW | IAP_F_BWX), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1514,7 +1574,7 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_3FH, 0xC1, 0x3F, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_3FH, 0xC1, 0x3F, IAP_F_FM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_FM |IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1522,10 +1582,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1535,13 +1597,15 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_FM | IAP_F_CAS), IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), IAPDESCR(C3H_20H, 0xC3, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1549,27 +1613,34 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C4H_08H, 0xC4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), IAPDESCR(C4H_10H, 0xC4, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_20H, 0xC4, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_40H, 0xC4, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_FM | IAP_F_CAS), IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_FM | IAP_F_CAS), IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_FM | IAP_F_CAS), @@ -1581,18 +1652,20 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SLX), IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_SL), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL), IAPDESCR(C5H_10H, 0xC5, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_20H, 0xC5, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_FM | IAP_F_CAS), IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_FM | IAP_F_CAS), IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_FM | IAP_F_CAS), @@ -1604,27 +1677,45 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), /* For SL C6_01 needs EV_SEL? 0x11, 0x12, 0x13, 0x14, 0x15? */ - IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), + IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL | + IAP_F_SLX), IAPDESCR(C6H_02H, 0xC6, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C7H_00H, 0xC7, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_SL | IAP_F_SLX), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C7H_20H, 0xC7, 0x20, IAP_F_FM | IAP_F_SL), + IAPDESCR(C7H_20H, 0xC7, 0x20, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(C7H_40H, 0xc7, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C7H_80H, 0xc7, 0x80, IAP_F_FM | IAP_F_SLX), IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C8H_01H, 0xC8, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_02H, 0xC8, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_04H, 0xC8, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_08H, 0xC8, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_10H, 0xC8, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SLX), + IAPDESCR(C8H_40H, 0xC8, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C8H_80H, 0xC8, 0x80, IAP_F_FM | IAP_F_SLX), IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C9H_01H, 0xC9, 0x01, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_02H, 0xC9, 0x02, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_04H, 0xC9, 0x04, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_08H, 0xC9, 0x08, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_10H, 0xC9, 0x10, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_20H, 0xC9, 0x20, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_40H, 0xC9, 0x40, IAP_F_FM | IAP_F_SLX), + IAPDESCR(C9H_80H, 0xC9, 0x80, IAP_F_FM | IAP_F_SLX), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -1640,13 +1731,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(CAH_10H, 0xCA, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(CAH_1EH, 0xCA, 0x1E, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(CAH_20H, 0xCA, 0x20, IAP_F_FM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX), IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_FM | IAP_F_CAS), IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_FM | IAP_F_CAS), IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_SL), + IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_SL | IAP_F_SLX), IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1666,12 +1758,13 @@ static struct iap_event_descr iap_events[] = { IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_20H, 0xCC, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SLX), IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CDH_01H, 0xCD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(CDH_02H, 0xCD, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -1682,50 +1775,62 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_BW | IAP_F_BWX | - IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | - IAP_F_BWX | IAP_F_SL), + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Sep 20 08:51: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 A9F8BE034EA; Wed, 20 Sep 2017 08:51: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 76392337B; Wed, 20 Sep 2017 08:51: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 v8K8p31E041482; Wed, 20 Sep 2017 08:51:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K8p3vm041480; Wed, 20 Sep 2017 08:51:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200851.v8K8p3vm041480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 08:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323800 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 08:51:04 -0000 Author: kib Date: Wed Sep 20 08:51:03 2017 New Revision: 323800 URL: https://svnweb.freebsd.org/changeset/base/323800 Log: MFC r323558: Use existing tag name for the vm_object' memq. Modified: stable/11/sys/vm/vm_object.h stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Wed Sep 20 08:45:42 2017 (r323799) +++ stable/11/sys/vm/vm_object.h Wed Sep 20 08:51:03 2017 (r323800) @@ -87,12 +87,17 @@ * */ +#ifndef VM_PAGE_HAVE_PGLIST +TAILQ_HEAD(pglist, vm_page); +#define VM_PAGE_HAVE_PGLIST +#endif + struct vm_object { struct rwlock lock; TAILQ_ENTRY(vm_object) object_list; /* list of all objects */ LIST_HEAD(, vm_object) shadow_head; /* objects that this is a shadow for */ LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ - TAILQ_HEAD(respgs, vm_page) memq; /* list of resident pages */ + struct pglist memq; /* list of resident pages */ struct vm_radix rtree; /* root of the resident page radix trie*/ vm_pindex_t size; /* Object size */ int generation; /* generation ID */ Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Wed Sep 20 08:45:42 2017 (r323799) +++ stable/11/sys/vm/vm_page.h Wed Sep 20 08:51:03 2017 (r323800) @@ -209,7 +209,10 @@ struct vm_page { #define PQ_LAUNDRY 2 #define PQ_COUNT 3 +#ifndef VM_PAGE_HAVE_PGLIST TAILQ_HEAD(pglist, vm_page); +#define VM_PAGE_HAVE_PGLIST +#endif SLIST_HEAD(spglist, vm_page); struct vm_pagequeue { From owner-svn-src-all@freebsd.org Wed Sep 20 09:11: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 E99D8E0452A; Wed, 20 Sep 2017 09:11:28 +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 C291B6348B; Wed, 20 Sep 2017 09:11:28 +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 v8K9BREH051783; Wed, 20 Sep 2017 09:11:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9BRL8051781; Wed, 20 Sep 2017 09:11:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200911.v8K9BRL8051781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:11: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: r323801 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:11:29 -0000 Author: kib Date: Wed Sep 20 09:11:27 2017 New Revision: 323801 URL: https://svnweb.freebsd.org/changeset/base/323801 Log: MFC r323559: Split vm_page_free_toq(). Modified: stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Wed Sep 20 08:51:03 2017 (r323800) +++ stable/11/sys/vm/vm_page.c Wed Sep 20 09:11:27 2017 (r323801) @@ -158,6 +158,7 @@ static uma_zone_t fakepg_zone; static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); +static void vm_page_free_phys(vm_page_t m); static void vm_page_free_wakeup(void); static void vm_page_init_fakepg(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, @@ -2367,13 +2368,7 @@ unlock: mtx_lock(&vm_page_queue_free_mtx); do { SLIST_REMOVE_HEAD(&free, plinks.s.ss); - vm_phys_freecnt_adj(m, 1); -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#else - if (true) -#endif - vm_phys_free_pages(m, 0); + vm_page_free_phys(m); } while ((m = SLIST_FIRST(&free)) != NULL); vm_page_zero_idle_wakeup(); vm_page_free_wakeup(); @@ -2736,15 +2731,18 @@ vm_page_free_wakeup(void) } /* - * vm_page_free_toq: + * vm_page_free_prep: * - * Returns the given page to the free list, - * disassociating it with any VM object. + * Prepares the given page to be put on the free list, + * disassociating it from any VM object. The caller may return + * the page to the free list only if this function returns true. * - * The object must be locked. The page must be locked if it is managed. + * The object must be locked. The page must be locked if it is + * managed. For a queued managed page, the pagequeue_locked + * argument specifies whether the page queue is already locked. */ -void -vm_page_free_toq(vm_page_t m) +bool +vm_page_free_prep(vm_page_t m, bool pagequeue_locked) { if ((m->oflags & VPO_UNMANAGED) == 0) { @@ -2765,16 +2763,20 @@ vm_page_free_toq(vm_page_t m) * callback routine until after we've put the page on the * appropriate free queue. */ - vm_page_remque(m); + if (m->queue != PQ_NONE) { + if (pagequeue_locked) + vm_page_dequeue_locked(m); + else + vm_page_dequeue(m); + } vm_page_remove(m); /* * If fictitious remove object association and * return, otherwise delay object association removal. */ - if ((m->flags & PG_FICTITIOUS) != 0) { - return; - } + if ((m->flags & PG_FICTITIOUS) != 0) + return (false); m->valid = 0; vm_page_undirty(m); @@ -2786,32 +2788,70 @@ vm_page_free_toq(vm_page_t m) KASSERT((m->flags & PG_UNHOLDFREE) == 0, ("vm_page_free: freeing PG_UNHOLDFREE page %p", m)); m->flags |= PG_UNHOLDFREE; - } else { - /* - * Restore the default memory attribute to the page. - */ - if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) - pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + return (false); + } - /* - * Insert the page into the physical memory allocator's free - * page queues. - */ - mtx_lock(&vm_page_queue_free_mtx); - vm_phys_freecnt_adj(m, 1); + /* + * Restore the default memory attribute to the page. + */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + + return (true); +} + +/* + * Insert the page into the physical memory allocator's free page + * queues. This is the last step to free a page. + */ +static void +vm_page_free_phys(vm_page_t m) +{ + + mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); + + vm_phys_freecnt_adj(m, 1); #if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#else - if (TRUE) + if (!vm_reserv_free_page(m)) #endif vm_phys_free_pages(m, 0); - if ((m->flags & PG_ZERO) != 0) - ++vm_page_zero_count; - else - vm_page_zero_idle_wakeup(); - vm_page_free_wakeup(); - mtx_unlock(&vm_page_queue_free_mtx); - } + if ((m->flags & PG_ZERO) != 0) + ++vm_page_zero_count; + else + vm_page_zero_idle_wakeup(); +} + +void +vm_page_free_phys_pglist(struct pglist *tq) +{ + vm_page_t m; + + mtx_lock(&vm_page_queue_free_mtx); + TAILQ_FOREACH(m, tq, listq) + vm_page_free_phys(m); + vm_page_free_wakeup(); + mtx_unlock(&vm_page_queue_free_mtx); +} + +/* + * vm_page_free_toq: + * + * Returns the given page to the free list, disassociating it + * from any VM object. + * + * The object must be locked. The page must be locked if it is + * managed. + */ +void +vm_page_free_toq(vm_page_t m) +{ + + if (!vm_page_free_prep(m, false)) + return; + mtx_lock(&vm_page_queue_free_mtx); + vm_page_free_phys(m); + vm_page_free_wakeup(); + mtx_unlock(&vm_page_queue_free_mtx); } /* Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Wed Sep 20 08:51:03 2017 (r323800) +++ stable/11/sys/vm/vm_page.h Wed Sep 20 09:11:27 2017 (r323801) @@ -465,6 +465,8 @@ void vm_page_deactivate_noreuse(vm_page_t); void vm_page_dequeue(vm_page_t m); void vm_page_dequeue_locked(vm_page_t m); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); +void vm_page_free_phys_pglist(struct pglist *tq); +bool vm_page_free_prep(vm_page_t m, bool pagequeue_locked); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); From owner-svn-src-all@freebsd.org Wed Sep 20 09:17: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 CFCE1E049F7; Wed, 20 Sep 2017 09:17:49 +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 9C5576375B; Wed, 20 Sep 2017 09:17:49 +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 v8K9HmLV052787; Wed, 20 Sep 2017 09:17:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9Hmve052786; Wed, 20 Sep 2017 09:17:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200917.v8K9Hmve052786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:17: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: r323802 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:17:49 -0000 Author: kib Date: Wed Sep 20 09:17:48 2017 New Revision: 323802 URL: https://svnweb.freebsd.org/changeset/base/323802 Log: MFC r321330 (by br): Style. Modified: stable/11/sys/vm/vm_object.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Wed Sep 20 09:11:27 2017 (r323801) +++ stable/11/sys/vm/vm_object.h Wed Sep 20 09:17:48 2017 (r323802) @@ -176,11 +176,11 @@ struct vm_object { #define OBJ_FICTITIOUS 0x0001 /* (c) contains fictitious pages */ #define OBJ_UNMANAGED 0x0002 /* (c) contains unmanaged pages */ #define OBJ_POPULATE 0x0004 /* pager implements populate() */ -#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ +#define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ #define OBJ_NOSPLIT 0x0010 /* dont split this object */ #define OBJ_UMTXDEAD 0x0020 /* umtx pshared was terminated */ -#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ -#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ +#define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ +#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ #define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ #define OBJ_COLORED 0x1000 /* pg_color is defined */ From owner-svn-src-all@freebsd.org Wed Sep 20 09:22: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 B8204E04DE5; Wed, 20 Sep 2017 09:22:48 +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 91DD063B5C; Wed, 20 Sep 2017 09:22:48 +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 v8K9MlfU056748; Wed, 20 Sep 2017 09:22:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9Mlv2056746; Wed, 20 Sep 2017 09:22:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200922.v8K9Mlv2056746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:22:47 +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: r323803 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:22:48 -0000 Author: kib Date: Wed Sep 20 09:22:47 2017 New Revision: 323803 URL: https://svnweb.freebsd.org/changeset/base/323803 Log: MFC r322571 (by br): Add OBJ_PG_DTOR flag to VM object. Modified: stable/11/sys/vm/vm_object.c stable/11/sys/vm/vm_object.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Wed Sep 20 09:17:48 2017 (r323802) +++ stable/11/sys/vm/vm_object.c Wed Sep 20 09:22:47 2017 (r323803) @@ -706,6 +706,54 @@ vm_object_destroy(vm_object_t object) } /* + * vm_object_terminate_pages removes any remaining pageable pages + * from the object and resets the object to an empty state. + */ +static void +vm_object_terminate_pages(vm_object_t object) +{ + vm_page_t p, p_next; + + VM_OBJECT_ASSERT_WLOCKED(object); + + /* + * Free any remaining pageable pages. This also removes them from the + * paging queues. However, don't free wired pages, just remove them + * from the object. Rather than incrementally removing each page from + * the object, the page and object are reset to any empty state. + */ + TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { + vm_page_assert_unbusied(p); + vm_page_lock(p); + /* + * Optimize the page's removal from the object by resetting + * its "object" field. Specifically, if the page is not + * wired, then the effect of this assignment is that + * vm_page_free()'s call to vm_page_remove() will return + * immediately without modifying the page or the object. + */ + p->object = NULL; + if (p->wire_count == 0) { + vm_page_free(p); + PCPU_INC(cnt.v_pfree); + } + vm_page_unlock(p); + } + /* + * If the object contained any pages, then reset it to an empty state. + * None of the object's fields, including "resident_page_count", were + * modified by the preceding loop. + */ + if (object->resident_page_count != 0) { + vm_radix_reclaim_allnodes(&object->rtree); + TAILQ_INIT(&object->memq); + object->resident_page_count = 0; + if (object->type == OBJT_VNODE) + vdrop(object->handle); + } +} + +/* * vm_object_terminate actually destroys the specified object, freeing * up all previously used resources. * @@ -715,7 +763,6 @@ vm_object_destroy(vm_object_t object) void vm_object_terminate(vm_object_t object) { - vm_page_t p, p_next; VM_OBJECT_ASSERT_WLOCKED(object); @@ -758,41 +805,8 @@ vm_object_terminate(vm_object_t object) ("vm_object_terminate: object with references, ref_count=%d", object->ref_count)); - /* - * Free any remaining pageable pages. This also removes them from the - * paging queues. However, don't free wired pages, just remove them - * from the object. Rather than incrementally removing each page from - * the object, the page and object are reset to any empty state. - */ - TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { - vm_page_assert_unbusied(p); - vm_page_lock(p); - /* - * Optimize the page's removal from the object by resetting - * its "object" field. Specifically, if the page is not - * wired, then the effect of this assignment is that - * vm_page_free()'s call to vm_page_remove() will return - * immediately without modifying the page or the object. - */ - p->object = NULL; - if (p->wire_count == 0) { - vm_page_free(p); - PCPU_INC(cnt.v_pfree); - } - vm_page_unlock(p); - } - /* - * If the object contained any pages, then reset it to an empty state. - * None of the object's fields, including "resident_page_count", were - * modified by the preceding loop. - */ - if (object->resident_page_count != 0) { - vm_radix_reclaim_allnodes(&object->rtree); - TAILQ_INIT(&object->memq); - object->resident_page_count = 0; - if (object->type == OBJT_VNODE) - vdrop(object->handle); - } + if ((object->flags & OBJ_PG_DTOR) == 0) + vm_object_terminate_pages(object); #if VM_NRESERVLEVEL > 0 if (__predict_false(!LIST_EMPTY(&object->rvq))) Modified: stable/11/sys/vm/vm_object.h ============================================================================== --- stable/11/sys/vm/vm_object.h Wed Sep 20 09:17:48 2017 (r323802) +++ stable/11/sys/vm/vm_object.h Wed Sep 20 09:22:47 2017 (r323803) @@ -180,6 +180,7 @@ struct vm_object { #define OBJ_NOSPLIT 0x0010 /* dont split this object */ #define OBJ_UMTXDEAD 0x0020 /* umtx pshared was terminated */ #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ +#define OBJ_PG_DTOR 0x0080 /* dont reset object, leave that for dtor */ #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ #define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ From owner-svn-src-all@freebsd.org Wed Sep 20 09: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 B9745E052CC; Wed, 20 Sep 2017 09:29: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 941F063FCF; Wed, 20 Sep 2017 09:29: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 v8K9T3bE057183; Wed, 20 Sep 2017 09:29:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9T30i057182; Wed, 20 Sep 2017 09:29:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200929.v8K9T30i057182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323804 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:29:04 -0000 Author: kib Date: Wed Sep 20 09:29:03 2017 New Revision: 323804 URL: https://svnweb.freebsd.org/changeset/base/323804 Log: MFC r323561: Do not relock free queue mutex for each page, free whole terminating object' page queue under the single mutex lock. Modified: stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Wed Sep 20 09:22:47 2017 (r323803) +++ stable/11/sys/vm/vm_object.c Wed Sep 20 09:29:03 2017 (r323804) @@ -713,9 +713,14 @@ static void vm_object_terminate_pages(vm_object_t object) { vm_page_t p, p_next; + struct mtx *mtx, *mtx1; + struct vm_pagequeue *pq, *pq1; VM_OBJECT_ASSERT_WLOCKED(object); + mtx = NULL; + pq = NULL; + /* * Free any remaining pageable pages. This also removes them from the * paging queues. However, don't free wired pages, just remove them @@ -724,21 +729,51 @@ vm_object_terminate_pages(vm_object_t object) */ TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { vm_page_assert_unbusied(p); - vm_page_lock(p); - /* - * Optimize the page's removal from the object by resetting - * its "object" field. Specifically, if the page is not - * wired, then the effect of this assignment is that - * vm_page_free()'s call to vm_page_remove() will return - * immediately without modifying the page or the object. - */ + if ((object->flags & OBJ_UNMANAGED) == 0) { + /* + * vm_page_free_prep() only needs the page + * lock for managed pages. + */ + mtx1 = vm_page_lockptr(p); + if (mtx1 != mtx) { + if (mtx != NULL) + mtx_unlock(mtx); + if (pq != NULL) { + vm_pagequeue_unlock(pq); + pq = NULL; + } + mtx = mtx1; + mtx_lock(mtx); + } + } p->object = NULL; - if (p->wire_count == 0) { - vm_page_free(p); - PCPU_INC(cnt.v_pfree); + if (p->wire_count != 0) + goto unlist; + PCPU_INC(cnt.v_pfree); + p->flags &= ~PG_ZERO; + if (p->queue != PQ_NONE) { + KASSERT(p->queue < PQ_COUNT, ("vm_object_terminate: " + "page %p is not queued", p)); + pq1 = vm_page_pagequeue(p); + if (pq != pq1) { + if (pq != NULL) + vm_pagequeue_unlock(pq); + pq = pq1; + vm_pagequeue_lock(pq); + } } - vm_page_unlock(p); + if (vm_page_free_prep(p, true)) + continue; +unlist: + TAILQ_REMOVE(&object->memq, p, listq); } + if (pq != NULL) + vm_pagequeue_unlock(pq); + if (mtx != NULL) + mtx_unlock(mtx); + + vm_page_free_phys_pglist(&object->memq); + /* * If the object contained any pages, then reset it to an empty state. * None of the object's fields, including "resident_page_count", were From owner-svn-src-all@freebsd.org Wed Sep 20 09:31: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 20BD1E0543B; Wed, 20 Sep 2017 09:31:18 +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 E46D2642C8; Wed, 20 Sep 2017 09:31: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 v8K9VHkx059457; Wed, 20 Sep 2017 09:31:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8K9VHg5059456; Wed, 20 Sep 2017 09:31:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709200931.v8K9VHg5059456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Sep 2017 09:31: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: r323805 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 09:31:18 -0000 Author: kib Date: Wed Sep 20 09:31:16 2017 New Revision: 323805 URL: https://svnweb.freebsd.org/changeset/base/323805 Log: MFC r323562: Remove inline specifier from vm_page_free_wakeup(), do not micro-manage compiler. Modified: stable/11/sys/vm/vm_page.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Wed Sep 20 09:29:03 2017 (r323804) +++ stable/11/sys/vm/vm_page.c Wed Sep 20 09:31:16 2017 (r323805) @@ -2705,7 +2705,7 @@ vm_page_activate(vm_page_t m) * * The page queues must be locked. */ -static inline void +static void vm_page_free_wakeup(void) { From owner-svn-src-all@freebsd.org Wed Sep 20 13:59: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 99CB3E0FAAF for ; Wed, 20 Sep 2017 13:59:01 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71ABB6C762 for ; Wed, 20 Sep 2017 13:59:01 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id BD1262095A for ; Wed, 20 Sep 2017 09:58:59 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute2.internal (MEProxy); Wed, 20 Sep 2017 09:58:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=pOw7bM Hwdr7Q0bjBDmX4kRM7I31AD40HOoWJIX51R5E=; b=B6EP/qlsw4meTZTCzglyUj ZWs+n+hxZoWzFd0zM6VPqZFnzYg1KfZKKoWq0kWOa8XMkSLSYVrZT0s+8bLoYWYQ OxEz8hBCI6uRVDf0gedZrxrZNAYDL05qnw7ylp1n1KwKxuUA0qkmphsqJha8cuRz blLnUMlZFkwJWVG6b+6Tf0sazi+kMu58TO5FTb0pI21Dpu6l1DDFZWmzSiK0XsK4 GRLDXhbEWhrOy6jfHpflP97ep0pxSZuD3X41erYOpRlEBbc7jSvNfBd4WLOBc+Zf qwHoSO12nI/uRY+nRGRgcPZ9MZ/E39WD7q2vpYa8uR3W6VQr58SSsE/HMlumSrZA == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9E42D9E95E; Wed, 20 Sep 2017 09:58:59 -0400 (EDT) Message-Id: <1505915939.3128744.1112434136.0864CA5F@webmail.messagingengine.com> From: Josh Paetzel To: svn-src-all@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-64b08692 Date: Wed, 20 Sep 2017 08:58:59 -0500 In-Reply-To: <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 13:59:01 -0000 On Wed, Sep 20, 2017, at 02:41 AM, Ngie Cooper (yaneurabeya) wrote: >=20 > > On Sep 19, 2017, at 09:51, Josh Paetzel wrote: > >=20 > > Author: jpaetzel > > Date: Tue Sep 19 16:51:51 2017 > > New Revision: 323770 > > URL: https://svnweb.freebsd.org/changeset/base/323770 > >=20 > > Log: > > MFC: 323068 > >=20 > > Allow kldload tcpmd5 >=20 > Wasn=E2=80=99t this reverted on ^/head ? > Thanks, > -Ngie > Email had 1 attachment: > + signature.asc > 1k (application/pgp-signature) Not this one. What was reverted on HEAD was the removal of options IPSEC from GENERIC. The endgoal is options IPSEC and options IPSEC_SUPPORT in GENERIC, which will allow someone running GENERIC to kldload tcpmd5 I think it's clear that removing options IPSEC from GENERIC was the wrong way to go. (There was consensus on the phabricator review, not so much once it was committed.) --=20 Thanks, Josh Paetzel From owner-svn-src-all@freebsd.org Wed Sep 20 14:42:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3731E115C4; Wed, 20 Sep 2017 14:42:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F5846DCF0; Wed, 20 Sep 2017 14:42: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 v8KEgLb0090438; Wed, 20 Sep 2017 14:42:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KEgLl0090436; Wed, 20 Sep 2017 14:42:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709201442.v8KEgLl0090436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Sep 2017 14:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323808 - in stable/11/sys/dev/usb: . quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/usb: . quirk X-SVN-Commit-Revision: 323808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:42:22 -0000 Author: hselasky Date: Wed Sep 20 14:42:21 2017 New Revision: 323808 URL: https://svnweb.freebsd.org/changeset/base/323808 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221328 PR: 221775 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 10:24:45 2017 (r323807) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 14:42:21 2017 (r323808) @@ -335,7 +335,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, - UQ_MSC_NO_SYNC_CACHE), + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), @@ -509,6 +509,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(ROLAND, SD20, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(ROLAND, PCR300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(EGO, M4U, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(LOGILINK, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(MEDELI, DD305, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI, UQ_MATCH_VENDOR_ONLY), Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Wed Sep 20 10:24:45 2017 (r323807) +++ stable/11/sys/dev/usb/usbdevs Wed Sep 20 14:42:21 2017 (r323808) @@ -3866,6 +3866,7 @@ product ROLAND UM550 0x0023 UM-550 MIDI I/F product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F +product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-all@freebsd.org Wed Sep 20 14:43: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 CDE78E116E8; Wed, 20 Sep 2017 14:43:56 +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 9A3846DEDB; Wed, 20 Sep 2017 14:43: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 v8KEhtMW090569; Wed, 20 Sep 2017 14:43:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KEhtUw090567; Wed, 20 Sep 2017 14:43:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709201443.v8KEhtUw090567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Sep 2017 14:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323809 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10/sys/dev/usb: . quirk X-SVN-Commit-Revision: 323809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:43:56 -0000 Author: hselasky Date: Wed Sep 20 14:43:55 2017 New Revision: 323809 URL: https://svnweb.freebsd.org/changeset/base/323809 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 14:42:21 2017 (r323808) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 14:43:55 2017 (r323809) @@ -333,7 +333,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, - UQ_MSC_NO_SYNC_CACHE), + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), @@ -507,6 +507,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(ROLAND, SD20, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(ROLAND, PCR300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(EGO, M4U, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(LOGILINK, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(MEDELI, DD305, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI, UQ_MATCH_VENDOR_ONLY), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed Sep 20 14:42:21 2017 (r323808) +++ stable/10/sys/dev/usb/usbdevs Wed Sep 20 14:43:55 2017 (r323809) @@ -3858,6 +3858,7 @@ product ROLAND UM550 0x0023 UM-550 MIDI I/F product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F +product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-all@freebsd.org Wed Sep 20 14:46: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 D56F1E118F8; Wed, 20 Sep 2017 14:46:25 +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 A1DCA6E0EE; Wed, 20 Sep 2017 14:46:25 +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 v8KEkOVA090753; Wed, 20 Sep 2017 14:46:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KEkORi090750; Wed, 20 Sep 2017 14:46:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709201446.v8KEkORi090750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Sep 2017 14:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r323810 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/9/sys/dev/usb: . quirk X-SVN-Commit-Revision: 323810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:46:26 -0000 Author: hselasky Date: Wed Sep 20 14:46:24 2017 New Revision: 323810 URL: https://svnweb.freebsd.org/changeset/base/323810 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 14:43:55 2017 (r323809) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Sep 20 14:46:24 2017 (r323810) @@ -332,7 +332,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, - UQ_MSC_NO_SYNC_CACHE), + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), @@ -506,6 +506,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(ROLAND, SD20, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(ROLAND, PCR300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(EGO, M4U, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(LOGILINK, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(MEDELI, DD305, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI, UQ_MATCH_VENDOR_ONLY), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Sep 20 14:43:55 2017 (r323809) +++ stable/9/sys/dev/usb/usbdevs Wed Sep 20 14:46:24 2017 (r323810) @@ -3857,6 +3857,7 @@ product ROLAND UM550 0x0023 UM-550 MIDI I/F product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F +product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-all@freebsd.org Wed Sep 20 15:00: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 B4233E123AE; Wed, 20 Sep 2017 15:00:01 +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 8E7716E826; Wed, 20 Sep 2017 15:00:01 +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 v8KF00I7094858; Wed, 20 Sep 2017 15:00:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KF00Nd094857; Wed, 20 Sep 2017 15:00:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709201500.v8KF00Nd094857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Sep 2017 15:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323811 - head/etc/devd X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/etc/devd X-SVN-Commit-Revision: 323811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 15:00:01 -0000 Author: hselasky Date: Wed Sep 20 15:00:00 2017 New Revision: 323811 URL: https://svnweb.freebsd.org/changeset/base/323811 Log: Regenerate usb.conf . MFC after: 1 week Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Wed Sep 20 14:46:24 2017 (r323810) +++ head/etc/devd/usb.conf Wed Sep 20 15:00:00 2017 (r323811) @@ -809,6 +809,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x050d"; + match "product" "0x258a"; + action "kldload -n udbp"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x050d"; match "product" "0x4050"; action "kldload -n if_zyd"; }; @@ -2769,7 +2777,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8712|0x8712)"; + match "product" "(0x8712|0x8713)"; action "kldload -n if_rsu"; }; @@ -3889,7 +3897,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14cf|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1526)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c4|0x14c9|0x14ca|0x14cf|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1526)"; action "kldload -n u3g"; }; @@ -5320,6 +5328,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x27b8"; + match "product" "0x01ed"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x3195"; match "product" "(0xf190|0xf280|0xf281)"; action "kldload -n uslcom"; @@ -5889,5 +5905,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2751 USB entries processed +# 2754 USB entries processed From owner-svn-src-all@freebsd.org Wed Sep 20 15:49: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 6F354E14271; Wed, 20 Sep 2017 15:49:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E3806FE54; Wed, 20 Sep 2017 15:49:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KFnCY5015246; Wed, 20 Sep 2017 15:49:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KFnCsI015244; Wed, 20 Sep 2017 15:49:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201549.v8KFnCsI015244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 15:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323812 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 323812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 15:49:13 -0000 Author: gjb Date: Wed Sep 20 15:49:12 2017 New Revision: 323812 URL: https://svnweb.freebsd.org/changeset/base/323812 Log: Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in an new installation. Noticed by: marius Tested with: head@r323729 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr head/release/tools/vmimage.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Wed Sep 20 15:00:00 2017 (r323811) +++ head/release/tools/arm.subr Wed Sep 20 15:49:12 2017 (r323812) @@ -99,6 +99,16 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution + + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -D ${DESTDIR} + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Wed Sep 20 15:00:00 2017 (r323811) +++ head/release/tools/vmimage.subr Wed Sep 20 15:49:12 2017 (r323812) @@ -122,6 +122,15 @@ vm_install_base() { installworld installkernel distribution || \ err "\n\nCannot install the base system to ${DESTDIR}." + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -D ${DESTDIR} + echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab echo "/dev/${ROOTLABEL}/rootfs / ufs rw 1 1" \ From owner-svn-src-all@freebsd.org Wed Sep 20 16:31: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 89403E15E9D; Wed, 20 Sep 2017 16:31:01 +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 6373171053; Wed, 20 Sep 2017 16:31:01 +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 v8KGV0j3031639; Wed, 20 Sep 2017 16:31:00 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KGV0Fh031637; Wed, 20 Sep 2017 16:31:00 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201709201631.v8KGV0Fh031637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 20 Sep 2017 16:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323813 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 16:31:01 -0000 Author: asomers Date: Wed Sep 20 16:31:00 2017 New Revision: 323813 URL: https://svnweb.freebsd.org/changeset/base/323813 Log: MFV r323789: 8473 scrub does not detect errors on active spares illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a https://www.illumos.org/issues/8473 Scrubbing is supposed to detect and repair all errors in the pool. However, it wrongly ignores active spare devices. The problem can easily be reproduced in OpenZFS at git rev 0ef125d with these commands: truncate -s 64m /tmp/a /tmp/b /tmp/c sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c sudo zpool replace testpool /tmp/a /tmp/c /bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c sync sudo zpool scrub testpool zpool status testpool # Will show 0 errors, which is wrong sudo zpool offline testpool /tmp/a sudo zpool scrub testpool zpool status testpool # Will show errors on /tmp/c, # which should've already been fixed FreeBSD head is partially affected: the first scrub will detect some errors, but the second scrub will detect more. Reviewed by: Andy Stormont Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Richard Lowe MFC after: 1 week Sponsored by: Spectra Logic Corp Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Wed Sep 20 15:49:12 2017 (r323812) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Wed Sep 20 16:31:00 2017 (r323813) @@ -29,6 +29,9 @@ #include #include +#include +#include +#include #include #include #include @@ -52,7 +55,7 @@ typedef struct mirror_map { int *mm_preferred; int mm_preferred_cnt; int mm_children; - boolean_t mm_replacing; + boolean_t mm_resilvering; boolean_t mm_root; mirror_child_t mm_child[]; } mirror_map_t; @@ -119,13 +122,13 @@ vdev_mirror_map_size(int children) } static inline mirror_map_t * -vdev_mirror_map_alloc(int children, boolean_t replacing, boolean_t root) +vdev_mirror_map_alloc(int children, boolean_t resilvering, boolean_t root) { mirror_map_t *mm; mm = kmem_zalloc(vdev_mirror_map_size(children), KM_SLEEP); mm->mm_children = children; - mm->mm_replacing = replacing; + mm->mm_resilvering = resilvering; mm->mm_root = root; mm->mm_preferred = (int *)((uintptr_t)mm + offsetof(mirror_map_t, mm_child[children])); @@ -217,9 +220,39 @@ vdev_mirror_map_init(zio_t *zio) mc->mc_offset = DVA_GET_OFFSET(&dva[c]); } } else { - mm = vdev_mirror_map_alloc(vd->vdev_children, - (vd->vdev_ops == &vdev_replacing_ops || - vd->vdev_ops == &vdev_spare_ops), B_FALSE); + /* + * If we are resilvering, then we should handle scrub reads + * differently; we shouldn't issue them to the resilvering + * device because it might not have those blocks. + * + * We are resilvering iff: + * 1) We are a replacing vdev (ie our name is "replacing-1" or + * "spare-1" or something like that), and + * 2) The pool is currently being resilvered. + * + * We cannot simply check vd->vdev_resilver_txg, because it's + * not set in this path. + * + * Nor can we just check our vdev_ops; there are cases (such as + * when a user types "zpool replace pool odev spare_dev" and + * spare_dev is in the spare list, or when a spare device is + * automatically used to replace a DEGRADED device) when + * resilvering is complete but both the original vdev and the + * spare vdev remain in the pool. That behavior is intentional. + * It helps implement the policy that a spare should be + * automatically removed from the pool after the user replaces + * the device that originally failed. + * + * If a spa load is in progress, then spa_dsl_pool may be + * uninitialized. But we shouldn't be resilvering during a spa + * load anyway. + */ + boolean_t replacing = (vd->vdev_ops == &vdev_replacing_ops || + vd->vdev_ops == &vdev_spare_ops) && + spa_load_state(vd->vdev_spa) == SPA_LOAD_NONE && + dsl_scan_resilvering(vd->vdev_spa->spa_dsl_pool); + mm = vdev_mirror_map_alloc(vd->vdev_children, replacing, + B_FALSE); for (c = 0; c < mm->mm_children; c++) { mc = &mm->mm_child[c]; mc->mc_vd = vd->vdev_child[c]; @@ -448,7 +481,7 @@ vdev_mirror_io_start(zio_t *zio) mm = vdev_mirror_map_init(zio); if (zio->io_type == ZIO_TYPE_READ) { - if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing && + if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_resilvering && mm->mm_children > 1) { /* * For scrubbing reads we need to allocate a read @@ -589,7 +622,7 @@ vdev_mirror_io_done(zio_t *zio) if (good_copies && spa_writeable(zio->io_spa) && (unexpected_errors || (zio->io_flags & ZIO_FLAG_RESILVER) || - ((zio->io_flags & ZIO_FLAG_SCRUB) && mm->mm_replacing))) { + ((zio->io_flags & ZIO_FLAG_SCRUB) && mm->mm_resilvering))) { /* * Use the good data we have in hand to repair damaged children. */ From owner-svn-src-all@freebsd.org Wed Sep 20 16:31:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF850E15EB9; Wed, 20 Sep 2017 16:31:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA1D171076; Wed, 20 Sep 2017 16:31:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KGV6m3031689; Wed, 20 Sep 2017 16:31:06 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KGV6xH031685; Wed, 20 Sep 2017 16:31:06 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201709201631.v8KGV6xH031685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 20 Sep 2017 16:31:06 +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: r323814 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/funcs lib/libdtrace X-SVN-Group: stable-11 X-SVN-Commit-Author: gnn X-SVN-Commit-Paths: in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/funcs lib/libdtrace X-SVN-Commit-Revision: 323814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 16:31:08 -0000 Author: gnn Date: Wed Sep 20 16:31:06 2017 New Revision: 323814 URL: https://svnweb.freebsd.org/changeset/base/323814 Log: MFC: 323253, 323499 Add D definitions for the named values in socket.h (gnn@) Fix DTrace test tst_inet_ntop_d: remove definitions are already in libdtrace (lwhsu@) Added: stable/11/cddl/lib/libdtrace/socket.d - copied unchanged from r323253, head/cddl/lib/libdtrace/socket.d Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d stable/11/cddl/lib/libdtrace/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Wed Sep 20 16:31:00 2017 (r323813) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d Wed Sep 20 16:31:06 2017 (r323814) @@ -28,9 +28,6 @@ #pragma D option quiet -inline int AF_INET = 2; -inline int AF_INET6 = 28; - in_addr_t *ip4a; in_addr_t *ip4b; in_addr_t *ip4c; Modified: stable/11/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/11/cddl/lib/libdtrace/Makefile Wed Sep 20 16:31:00 2017 (r323813) +++ stable/11/cddl/lib/libdtrace/Makefile Wed Sep 20 16:31:06 2017 (r323814) @@ -53,6 +53,7 @@ DSRCS= errno.d \ siftr.d \ signal.d \ tcp.d \ + socket.d \ udp.d \ unistd.d Copied: stable/11/cddl/lib/libdtrace/socket.d (from r323253, head/cddl/lib/libdtrace/socket.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/cddl/lib/libdtrace/socket.d Wed Sep 20 16:31:06 2017 (r323814, copy of r323253, head/cddl/lib/libdtrace/socket.d) @@ -0,0 +1,301 @@ +/* + * Copyright (c) 2017 George V. Neville-Neil + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 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$ + * + * Translators and flags for the socket structure. FreeBSD specific code. + */ + +#pragma D depends_on module kernel + +/* + * Option flags per-socket. + */ +#pragma D binding "1.13" SO_DEBUG +inline int SO_DEBUG = 0x0001; /* turn on debugging info recording */ +#pragma D binding "1.13" SO_ACCEPTCONN +inline int SO_ACCEPTCONN = 0x0002; /* socket has had listen() */ +#pragma D binding "1.13" SO_REUSEADDR +inline int SO_REUSEADDR = 0x0004; /* allow local address reuse */ +#pragma D binding "1.13" SO_KEEPALIVE +inline int SO_KEEPALIVE = 0x0008; /* keep connections alive */ +#pragma D binding "1.13" SO_DONTROUTE +inline int SO_DONTROUTE = 0x0010; /* just use interface addresses */ +#pragma D binding "1.13" SO_BROADCAST +inline int SO_BROADCAST = 0x0020; /* permit sending of broadcast msgs */ +#pragma D binding "1.13" SO_USELOOPBACK +inline int SO_USELOOPBACK = 0x0040; /* bypass hardware when possible */ +#pragma D binding "1.13" SO_LINGER +inline int SO_LINGER = 0x0080; /* linger on close if data present */ +#pragma D binding "1.13" SO_OOBINLINE +inline int SO_OOBINLINE = 0x0100; /* leave received OOB data in line */ +#pragma D binding "1.13" SO_REUSEPORT +inline int SO_REUSEPORT = 0x0200; /* allow local address & port reuse */ +#pragma D binding "1.13" SO_TIMESTAMP +inline int SO_TIMESTAMP = 0x0400; /* timestamp received dgram traffic */ +#pragma D binding "1.13" SO_NOSIGPIPE +inline int SO_NOSIGPIPE = 0x0800; /* no SIGPIPE from EPIPE */ +#pragma D binding "1.13" SO_ACCEPTFILTER +inline int SO_ACCEPTFILTER = 0x1000; /* there is an accept filter */ +#pragma D binding "1.13" SO_BINTIME +inline int SO_BINTIME = 0x2000; /* timestamp received dgram traffic */ +#pragma D binding "1.13" SO_NO_OFFLOAD +inline int SO_NO_OFFLOAD = 0x4000; /* socket cannot be offloaded */ +#pragma D binding "1.13" SO_NO_DDP +inline int SO_NO_DDP = 0x8000; /* disable direct data placement */ + +/* + * Additional options, not kept in so_options. + */ +#pragma D binding "1.13" SO_SNDBUF +inline int SO_SNDBUF = 0x1001; /* send buffer size */ +#pragma D binding "1.13" SO_RCVBUF +inline int SO_RCVBUF = 0x1002; /* receive buffer size */ +#pragma D binding "1.13" SO_SNDLOWAT +inline int SO_SNDLOWAT = 0x1003; /* send low-water mark */ +#pragma D binding "1.13" SO_RCVLOWAT +inline int SO_RCVLOWAT = 0x1004; /* receive low-water mark */ +#pragma D binding "1.13" SO_SNDTIMEO +inline int SO_SNDTIMEO = 0x1005; /* send timeout */ +#pragma D binding "1.13" SO_RCVTIMEO +inline int SO_RCVTIMEO = 0x1006; /* receive timeout */ +#pragma D binding "1.13" SO_ERROR +inline int SO_ERROR = 0x1007; /* get error status and clear */ +#pragma D binding "1.13" SO_TYPE +inline int SO_TYPE = 0x1008; /* get socket type */ +#pragma D binding "1.13" SO_LABEL +inline int SO_LABEL = 0x1009; /* socket's MAC label */ +#pragma D binding "1.13" SO_PEERLABEL +inline int SO_PEERLABEL = 0x1010; /* socket's peer's MAC label */ +#pragma D binding "1.13" SO_LISTENQLIMIT +inline int SO_LISTENQLIMIT = 0x1011; /* socket's backlog limit */ +#pragma D binding "1.13" SO_LISTENQLEN +inline int SO_LISTENQLEN = 0x1012; /* socket's complete queue length */ +#pragma D binding "1.13" SO_LISTENINCQLEN +inline int SO_LISTENINCQLEN = 0x1013; /* socket's incomplete queue length */ +#pragma D binding "1.13" SO_SETFIB +inline int SO_SETFIB = 0x1014; /* use this FIB to route */ +#pragma D binding "1.13" SO_USER_COOKIE +inline int SO_USER_COOKIE = 0x1015; /* user cookie (dummynet etc.) */ +#pragma D binding "1.13" SO_PROTOCOL +inline int SO_PROTOCOL = 0x1016; /* get socket protocol (Linux name) */ +#pragma D binding "1.13" SO_PROTOTYPE +inline int SO_PROTOTYPE = SO_PROTOCOL; /* alias for SO_PROTOCOL (SunOS name) */ +#pragma D binding "1.13" SO_TS_CLOCK +inline int SO_TS_CLOCK = 0x1017; /* clock type used for SO_TIMESTAMP */ +#pragma D binding "1.13" SO_MAX_PACING_RATE +inline int SO_MAX_PACING_RATE = 0x1018; /* socket's max TX pacing rate (Linux name) */ + +#pragma D binding "1.13" SO_TS_REALTIME_MICRO +inline int SO_TS_REALTIME_MICRO = 0; /* microsecond resolution, realtime */ +#pragma D binding "1.13" SO_TS_BINTIME +inline int SO_TS_BINTIME = 1; /* sub-nanosecond resolution, realtime */ +#pragma D binding "1.13" SO_TS_REALTIME +inline int SO_TS_REALTIME = 2; /* nanosecond resolution, realtime */ +#pragma D binding "1.13" SO_TS_MONOTONIC +inline int SO_TS_MONOTONIC = 3; /* nanosecond resolution, monotonic */ +#pragma D binding "1.13" SO_TS_DEFAULT +inline int SO_TS_DEFAULT = SO_TS_REALTIME_MICRO; +#pragma D binding "1.13" SO_TS_CLOCK_MAX +inline int SO_TS_CLOCK_MAX = SO_TS_MONOTONIC; + +#pragma D binding "1.13" AF_UNSPEC +inline int AF_UNSPEC = 0; /* unspecified */ +#pragma D binding "1.13" AF_UNIX +inline int AF_UNIX = 1; /* standardized name for AF_LOCAL */ +#pragma D binding "1.13" AF_LOCAL +inline int AF_LOCAL = AF_UNIX; /* local to host (pipes, portals) */ +#pragma D binding "1.13" AF_INET +inline int AF_INET = 2; /* internetwork: UDP, TCP, etc. */ +#pragma D binding "1.13" AF_IMPLINK +inline int AF_IMPLINK = 3; /* arpanet imp addresses */ +#pragma D binding "1.13" AF_PUP +inline int AF_PUP = 4; /* pup protocols: e.g. BSP */ +#pragma D binding "1.13" AF_CHAOS +inline int AF_CHAOS = 5; /* mit CHAOS protocols */ +#pragma D binding "1.13" AF_NETBIOS +inline int AF_NETBIOS = 6; /* SMB protocols */ +#pragma D binding "1.13" AF_ISO +inline int AF_ISO = 7; /* ISO protocols */ +#pragma D binding "1.13" AF_OSI +inline int AF_OSI = AF_ISO; +#pragma D binding "1.13" AF_ECMA +inline int AF_ECMA = 8; /* European computer manufacturers */ +#pragma D binding "1.13" AF_DATAKIT +inline int AF_DATAKIT = 9; /* datakit protocols */ +#pragma D binding "1.13" AF_CCITT +inline int AF_CCITT = 10; /* CCITT protocols, X.25 etc */ +#pragma D binding "1.13" AF_SNA +inline int AF_SNA = 11; /* IBM SNA */ +#pragma D binding "1.13" AF_DECnet +inline int AF_DECnet = 12; /* DECnet */ +#pragma D binding "1.13" AF_DLI +inline int AF_DLI = 13; /* DEC Direct data link interface */ +#pragma D binding "1.13" AF_LAT +inline int AF_LAT = 14; /* LAT */ +#pragma D binding "1.13" AF_HYLINK +inline int AF_HYLINK = 15; /* NSC Hyperchannel */ +#pragma D binding "1.13" AF_APPLETALK +inline int AF_APPLETALK = 16; /* Apple Talk */ +#pragma D binding "1.13" AF_ROUTE +inline int AF_ROUTE = 17; /* Internal Routing Protocol */ +#pragma D binding "1.13" AF_LINK +inline int AF_LINK = 18; /* Link layer interface */ +#pragma D binding "1.13" pseudo_AF_XTP +inline int pseudo_AF_XTP = 19; /* eXpress Transfer Protocol (no AF) */ +#pragma D binding "1.13" AF_COIP +inline int AF_COIP = 20; /* connection-oriented IP, aka ST II */ +#pragma D binding "1.13" AF_CNT +inline int AF_CNT = 21; /* Computer Network Technology */ +#pragma D binding "1.13" pseudo_AF_RTIP +inline int pseudo_AF_RTIP = 22; /* Help Identify RTIP packets */ +#pragma D binding "1.13" AF_IPX +inline int AF_IPX = 23; /* Novell Internet Protocol */ +#pragma D binding "1.13" AF_SIP +inline int AF_SIP = 24; /* Simple Internet Protocol */ +#pragma D binding "1.13" pseudo_AF_PIP +inline int pseudo_AF_PIP = 25; /* Help Identify PIP packets */ +#pragma D binding "1.13" AF_ISDN +inline int AF_ISDN = 26; /* Integrated Services Digital Network*/ +#pragma D binding "1.13" AF_E164 +inline int AF_E164 = AF_ISDN; /* CCITT E.164 recommendation */ +#pragma D binding "1.13" pseudo_AF_KEY +inline int pseudo_AF_KEY = 27; /* Internal key-management function */ +#pragma D binding "1.13" AF_INET6 +inline int AF_INET6 = 28; /* IPv6 */ +#pragma D binding "1.13" AF_NATM +inline int AF_NATM = 29; /* native ATM access */ +#pragma D binding "1.13" AF_ATM +inline int AF_ATM = 30; /* ATM */ +#pragma D binding "1.13" pseudo_AF_HDRCMPLT +inline int pseudo_AF_HDRCMPLT = 31; /* Used by BPF to not rewrite headers + * in interface output routine + */ +#pragma D binding "1.13" AF_NETGRAPH +inline int AF_NETGRAPH = 32; /* Netgraph sockets */ +#pragma D binding "1.13" AF_SLOW +inline int AF_SLOW = 33; /* 802.3ad slow protocol */ +#pragma D binding "1.13" AF_SCLUSTER +inline int AF_SCLUSTER = 34; /* Sitara cluster protocol */ +#pragma D binding "1.13" AF_ARP +inline int AF_ARP = 35; /* Address Resolution Protocol */ +#pragma D binding "1.13" AF_BLUETOOTH +inline int AF_BLUETOOTH = 36; /* Bluetooth sockets */ +#pragma D binding "1.13" AF_IEEE80211 +inline int AF_IEEE80211 = 37; /* IEEE 802.11 protocol */ +#pragma D binding "1.13" AF_INET_SDP +inline int AF_INET_SDP = 40; /* OFED Socket Direct Protocol ipv4 */ +#pragma D binding "1.13" AF_INET6_SDP +inline int AF_INET6_SDP = 42; /* OFED Socket Direct Protocol ipv6 */ +#pragma D binding "1.13" AF_MAX +inline int AF_MAX = 42; + +/* + * Protocol families, same as address families for now. + */ +#pragma D binding "1.13" PF_UNSPEC +inline int PF_UNSPEC = AF_UNSPEC; +#pragma D binding "1.13" PF_LOCAL +inline int PF_LOCAL = AF_LOCAL; +#pragma D binding "1.13" PF_UNIX +inline int PF_UNIX = PF_LOCAL; /* backward compatibility */ +#pragma D binding "1.13" PF_INET +inline int PF_INET = AF_INET; +#pragma D binding "1.13" PF_IMPLINK +inline int PF_IMPLINK = AF_IMPLINK; +#pragma D binding "1.13" PF_PUP +inline int PF_PUP = AF_PUP; +#pragma D binding "1.13" PF_CHAOS +inline int PF_CHAOS = AF_CHAOS; +#pragma D binding "1.13" PF_NETBIOS +inline int PF_NETBIOS = AF_NETBIOS; +#pragma D binding "1.13" PF_ISO +inline int PF_ISO = AF_ISO; +#pragma D binding "1.13" PF_OSI +inline int PF_OSI = AF_ISO; +#pragma D binding "1.13" PF_ECMA +inline int PF_ECMA = AF_ECMA; +#pragma D binding "1.13" PF_DATAKIT +inline int PF_DATAKIT = AF_DATAKIT; +#pragma D binding "1.13" PF_CCITT +inline int PF_CCITT = AF_CCITT; +#pragma D binding "1.13" PF_SNA +inline int PF_SNA = AF_SNA; +#pragma D binding "1.13" PF_DECnet +inline int PF_DECnet = AF_DECnet; +#pragma D binding "1.13" PF_DLI +inline int PF_DLI = AF_DLI; +#pragma D binding "1.13" PF_LAT +inline int PF_LAT = AF_LAT; +#pragma D binding "1.13" PF_HYLINK +inline int PF_HYLINK = AF_HYLINK; +#pragma D binding "1.13" PF_APPLETALK +inline int PF_APPLETALK = AF_APPLETALK; +#pragma D binding "1.13" PF_ROUTE +inline int PF_ROUTE = AF_ROUTE; +#pragma D binding "1.13" PF_LINK +inline int PF_LINK = AF_LINK; +#pragma D binding "1.13" PF_XTP +inline int PF_XTP = pseudo_AF_XTP; /* really just proto family, no AF */ +#pragma D binding "1.13" PF_COIP +inline int PF_COIP = AF_COIP; +#pragma D binding "1.13" PF_CNT +inline int PF_CNT = AF_CNT; +#pragma D binding "1.13" PF_SIP +inline int PF_SIP = AF_SIP; +#pragma D binding "1.13" PF_IPX +inline int PF_IPX = AF_IPX; +#pragma D binding "1.13" PF_RTIP +inline int PF_RTIP = pseudo_AF_RTIP; /* same format as AF_INET */ +#pragma D binding "1.13" PF_PIP +inline int PF_PIP = pseudo_AF_PIP; +#pragma D binding "1.13" PF_ISDN +inline int PF_ISDN = AF_ISDN; +#pragma D binding "1.13" PF_KEY +inline int PF_KEY = pseudo_AF_KEY; +#pragma D binding "1.13" PF_INET6 +inline int PF_INET6 = AF_INET6; +#pragma D binding "1.13" PF_NATM +inline int PF_NATM = AF_NATM; +#pragma D binding "1.13" PF_ATM +inline int PF_ATM = AF_ATM; +#pragma D binding "1.13" PF_NETGRAPH +inline int PF_NETGRAPH = AF_NETGRAPH; +#pragma D binding "1.13" PF_SLOW +inline int PF_SLOW = AF_SLOW; +#pragma D binding "1.13" PF_SCLUSTER +inline int PF_SCLUSTER = AF_SCLUSTER; +#pragma D binding "1.13" PF_ARP +inline int PF_ARP = AF_ARP; +#pragma D binding "1.13" PF_BLUETOOTH +inline int PF_BLUETOOTH = AF_BLUETOOTH; +#pragma D binding "1.13" PF_IEEE80211 +inline int PF_IEEE80211 = AF_IEEE80211; +#pragma D binding "1.13" PF_INET_SDP +inline int PF_INET_SDP= AF_INET_SDP; +#pragma D binding "1.13" PF_INET6_SDP +inline int PF_INET6_SDP= AF_INET6_SDP; +#pragma D binding "1.13" PF_MAX +inline int PF_MAX = AF_MAX; From owner-svn-src-all@freebsd.org Wed Sep 20 17:09: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 75A3CE1842D; Wed, 20 Sep 2017 17:09:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B3773725; Wed, 20 Sep 2017 17:09:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KH953f050653; Wed, 20 Sep 2017 17:09:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KH95s4050651; Wed, 20 Sep 2017 17:09:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201709.v8KH95s4050651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:09:05 +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: r323815 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 323815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:09:06 -0000 Author: gjb Date: Wed Sep 20 17:09:04 2017 New Revision: 323815 URL: https://svnweb.freebsd.org/changeset/base/323815 Log: MFC r323812: Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/arm.subr stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/arm.subr stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/arm.subr ============================================================================== --- stable/11/release/tools/arm.subr Wed Sep 20 16:31:06 2017 (r323814) +++ stable/11/release/tools/arm.subr Wed Sep 20 17:09:04 2017 (r323815) @@ -99,6 +99,16 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution + + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -D ${DESTDIR} + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Wed Sep 20 16:31:06 2017 (r323814) +++ stable/11/release/tools/vmimage.subr Wed Sep 20 17:09:04 2017 (r323815) @@ -122,6 +122,15 @@ vm_install_base() { installworld installkernel distribution || \ err "\n\nCannot install the base system to ${DESTDIR}." + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -D ${DESTDIR} + echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab echo "/dev/${ROOTLABEL}/rootfs / ufs rw 1 1" \ From owner-svn-src-all@freebsd.org Wed Sep 20 17:09: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 116C8E18421; Wed, 20 Sep 2017 17:09:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D231873724; Wed, 20 Sep 2017 17:09:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KH956n050646; Wed, 20 Sep 2017 17:09:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KH94tY050644; Wed, 20 Sep 2017 17:09:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201709.v8KH94tY050644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323815 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 323815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:09:06 -0000 Author: gjb Date: Wed Sep 20 17:09:04 2017 New Revision: 323815 URL: https://svnweb.freebsd.org/changeset/base/323815 Log: MFC r323812: Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm.subr stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/arm.subr stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/arm.subr ============================================================================== --- stable/10/release/tools/arm.subr Wed Sep 20 16:31:06 2017 (r323814) +++ stable/10/release/tools/arm.subr Wed Sep 20 17:09:04 2017 (r323815) @@ -99,6 +99,16 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution + + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -D ${DESTDIR} + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Wed Sep 20 16:31:06 2017 (r323814) +++ stable/10/release/tools/vmimage.subr Wed Sep 20 17:09:04 2017 (r323815) @@ -116,6 +116,15 @@ vm_install_base() { installworld installkernel distribution || \ err "\n\nCannot install the base system to ${DESTDIR}." + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -D ${DESTDIR} + echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab echo '/dev/gpt/rootfs / ufs rw 1 1' \ From owner-svn-src-all@freebsd.org Wed Sep 20 17:15: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 C7417E18A5C; Wed, 20 Sep 2017 17:15:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B7F673CAD; Wed, 20 Sep 2017 17:15:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KHFwmL054503; Wed, 20 Sep 2017 17:15:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHFwxw054502; Wed, 20 Sep 2017 17:15:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201715.v8KHFwxw054502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:15: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: r323816 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 323816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:15:59 -0000 Author: gjb Date: Wed Sep 20 17:15:58 2017 New Revision: 323816 URL: https://svnweb.freebsd.org/changeset/base/323816 Log: MFC r323557: Remove an unneeded sentence stop. Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man4/siba.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/siba.4 ============================================================================== --- stable/11/share/man/man4/siba.4 Wed Sep 20 17:09:04 2017 (r323815) +++ stable/11/share/man/man4/siba.4 Wed Sep 20 17:15:58 2017 (r323816) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2016 +.Dd September 13, 2017 .Dt SIBA 4 .Os .Sh NAME @@ -75,7 +75,7 @@ The device driver first appeared in .Fx 8.0 . The driver was rewritten for -.Fx 11.0 . +.Fx 11.0 to support the common Broadcom .Xr bhnd 4 bus interface. From owner-svn-src-all@freebsd.org Wed Sep 20 17:21: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 7CE10E18E2F for ; Wed, 20 Sep 2017 17:21: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 5E1F073F82; Wed, 20 Sep 2017 17:21:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id B7E661E814; Wed, 20 Sep 2017 17:21:45 +0000 (UTC) Date: Wed, 20 Sep 2017 17:21:45 +0000 From: Alexey Dokuchaev To: Josh Paetzel Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Message-ID: <20170920172145.GA80852@FreeBSD.org> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> <1505915939.3128744.1112434136.0864CA5F@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1505915939.3128744.1112434136.0864CA5F@webmail.messagingengine.com> User-Agent: Mutt/1.8.3 (2017-05-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, 20 Sep 2017 17:21:46 -0000 On Wed, Sep 20, 2017 at 08:58:59AM -0500, Josh Paetzel wrote: > On Wed, Sep 20, 2017, at 02:41 AM, Ngie Cooper (yaneurabeya) wrote: > > > On Sep 19, 2017, at 09:51, Josh Paetzel wrote: > > > New Revision: 323770 > > > URL: https://svnweb.freebsd.org/changeset/base/323770 > > > > > > Log: > > > MFC: 323068 > > > > > > Allow kldload tcpmd5 > > > > Wasn't this reverted on ^/head ? > > Not this one. What was reverted on HEAD was the removal of options > IPSEC from GENERIC. > > The endgoal is options IPSEC and options IPSEC_SUPPORT in GENERIC, which > will allow someone running GENERIC to kldload tcpmd5. I'll shamelessly steal this thread to ask somewhat related question that was bothering me since the original botched commit: what is the reason behind IPSEC_SUPPORT option? If it does not cost anything, why not just optimize it away; if it does imply something more, can you shed some light on why is it needed (and/or might not be)? Thanks, ./danfe From owner-svn-src-all@freebsd.org Wed Sep 20 17:23: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 CF2D2E19087; Wed, 20 Sep 2017 17:23:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9601A741A4; Wed, 20 Sep 2017 17:23:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KHNjXF058455; Wed, 20 Sep 2017 17:23:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHNj2w058453; Wed, 20 Sep 2017 17:23:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201723.v8KHNj2w058453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323817 - releng/10.4/release/tools X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/tools X-SVN-Commit-Revision: 323817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:23:46 -0000 Author: gjb Date: Wed Sep 20 17:23:45 2017 New Revision: 323817 URL: https://svnweb.freebsd.org/changeset/base/323817 Log: MFS10 r323815: MFC r323812: Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/tools/arm.subr releng/10.4/release/tools/vmimage.subr Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/release/tools/arm.subr ============================================================================== --- releng/10.4/release/tools/arm.subr Wed Sep 20 17:15:58 2017 (r323816) +++ releng/10.4/release/tools/arm.subr Wed Sep 20 17:23:45 2017 (r323817) @@ -99,6 +99,16 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution + + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -D ${DESTDIR} + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user Modified: releng/10.4/release/tools/vmimage.subr ============================================================================== --- releng/10.4/release/tools/vmimage.subr Wed Sep 20 17:15:58 2017 (r323816) +++ releng/10.4/release/tools/vmimage.subr Wed Sep 20 17:23:45 2017 (r323817) @@ -116,6 +116,15 @@ vm_install_base() { installworld installkernel distribution || \ err "\n\nCannot install the base system to ${DESTDIR}." + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -D ${DESTDIR} + echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab echo '/dev/gpt/rootfs / ufs rw 1 1' \ From owner-svn-src-all@freebsd.org Wed Sep 20 17:30: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 B649BE1956C; Wed, 20 Sep 2017 17:30:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 907B7744DB; Wed, 20 Sep 2017 17:30:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KHU12p058736; Wed, 20 Sep 2017 17:30:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHU1LT058735; Wed, 20 Sep 2017 17:30:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201730.v8KHU1LT058735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 17:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323818 - releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 323818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:30:02 -0000 Author: gjb Date: Wed Sep 20 17:30:01 2017 New Revision: 323818 URL: https://svnweb.freebsd.org/changeset/base/323818 Log: Prune the majority of empty sections from the 10.4-RELEASE relnotes page. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 20 17:23:45 2017 (r323817) +++ releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 20 17:30:01 2017 (r323818) @@ -293,20 +293,6 @@ 200MB. - - <filename class="directory">/etc/rc.d</filename> - Scripts - -   - - - - <filename class="directory">/etc/periodic</filename> - Scripts - -   - - Runtime Libraries and API @@ -378,12 +364,6 @@ flush_queue handling. - - Kernel Configuration - -   - - System Tuning and Controls @@ -470,12 +450,6 @@ as hardware changes and updates that do not otherwise fit in other sections of this document. - - Hardware Support - -   - - Virtualization Support @@ -490,12 +464,6 @@ devices to be marked for passthrough or host use at runtime. - - - ARM Support - -   - @@ -504,12 +472,6 @@ This section covers changes and additions to file systems and other storage subsystems, both local and networked. - - General Storage - -   - - Networked Storage @@ -526,18 +488,6 @@ commit through the DS. - - - ZFS - - - - - - &man.geom.4; - -   - @@ -545,18 +495,6 @@ This section covers the boot loader, boot menu, and other boot-related changes. - - - Boot Loader Changes - -   - - - - Boot Menu Changes - -   - @@ -603,12 +541,6 @@ This section covers changes to the &os; Ports Collection, package infrastructure, and package maintenance and installation tools. - - - Infrastructure Changes - -   - Packaging Changes From owner-svn-src-all@freebsd.org Wed Sep 20 17:49:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E9EDE1A314; Wed, 20 Sep 2017 17:49:58 +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 6951874E9F; Wed, 20 Sep 2017 17:49:58 +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 v8KHnvmx066970; Wed, 20 Sep 2017 17:49:57 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHnvZ3066965; Wed, 20 Sep 2017 17:49:57 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201709201749.v8KHnvZ3066965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 20 Sep 2017 17:49: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: r323819 - stable/11/sys/dev/mrsas X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/11/sys/dev/mrsas X-SVN-Commit-Revision: 323819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:49:58 -0000 Author: jkim Date: Wed Sep 20 17:49:57 2017 New Revision: 323819 URL: https://svnweb.freebsd.org/changeset/base/323819 Log: MFC: r309284-r309294 (kadesai) r309294 This patch upgrades driver version to 06.712.04.00-fbsd r309293 This patch will add code to refire IOCTL commands after OCR. r309292 This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers. r309291 Wait for AEN task to be completed(if in queue) before resetting the controller and return without processing event in AEN thread, if controller reset is in progress. r309290 This patch will add task management support in driver. Below is high level description: If a SCSI IO times out, then before initiating OCR, now the driver will try to send a target reset to the particular target for which the IO is timed out. If that also fails, then the driver will initiate OCR. r309289 Process outstanding reply descriptors from all the reply descriptor post queues before initiating OCR. r309288 Clean up reference to AEN command if abort AEN is succesful as the command is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful. r309287 Update controller properties(read OCR capability bit) when MR_EVT_CTRL_PROP_CHANGED recieved. r309286 Add sanity check in IO and IOCTL path not to process command further if controller is in HW_CRITICAL_ERROR. r309285 Use a variable to indicate Gen3 controllers and remove all PCI ids based checks used for gen3 controllers. r309284 High level description of new solution - Free MFI and MPT command from same context. Free both the command either from process (from where mfi-mpt pass-through was called) or from ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which will do MFI/MPT list. Modified: stable/11/sys/dev/mrsas/mrsas.c stable/11/sys/dev/mrsas/mrsas.h stable/11/sys/dev/mrsas/mrsas_cam.c stable/11/sys/dev/mrsas/mrsas_fp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mrsas/mrsas.c ============================================================================== --- stable/11/sys/dev/mrsas/mrsas.c Wed Sep 20 17:30:01 2017 (r323818) +++ stable/11/sys/dev/mrsas/mrsas.c Wed Sep 20 17:49:57 2017 (r323819) @@ -110,6 +110,7 @@ int mrsas_issue_polled(struct mrsas_softc *sc, struct int mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t reset_reason); int mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_int8_t check_reason); int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); +int mrsas_reset_targets(struct mrsas_softc *sc); int mrsas_issue_blocked_cmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); @@ -153,7 +154,6 @@ extern void mrsas_cam_detach(struct mrsas_softc *sc); extern void mrsas_cmd_done(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd); extern void mrsas_free_frame(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd); extern int mrsas_alloc_mfi_cmds(struct mrsas_softc *sc); -extern void mrsas_release_mpt_cmd(struct mrsas_mpt_cmd *cmd); extern struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_softc *sc); extern int mrsas_passthru(struct mrsas_softc *sc, void *arg, u_long ioctlCmd); extern uint8_t MR_ValidateMapInfo(struct mrsas_softc *sc); @@ -307,28 +307,11 @@ mrsas_enable_intr(struct mrsas_softc *sc) static int mrsas_clear_intr(struct mrsas_softc *sc) { - u_int32_t status, fw_status, fw_state; + u_int32_t status; /* Read received interrupt */ status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - /* - * If FW state change interrupt is received, write to it again to - * clear - */ - if (status & MRSAS_FW_STATE_CHNG_INTERRUPT) { - fw_status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, - outbound_scratch_pad)); - fw_state = fw_status & MFI_STATE_MASK; - if (fw_state == MFI_STATE_FAULT) { - device_printf(sc->mrsas_dev, "FW is in FAULT state!\n"); - if (sc->ocr_thread_active) - wakeup(&sc->ocr_chan); - } - mrsas_write_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status), status); - mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_intr_status)); - return (1); - } /* Not our interrupt, so just return */ if (!(status & MFI_FUSION_ENABLE_INTERRUPT_MASK)) return (0); @@ -449,6 +432,11 @@ mrsas_setup_sysctl(struct mrsas_softc *sc) OID_AUTO, "reset_in_progress", CTLFLAG_RD, &sc->reset_in_progress, 0, "ocr in progress status"); + SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "block_sync_cache", CTLFLAG_RW, + &sc->block_sync_cache, 0, + "Block SYNC CACHE at driver. "); + } /* @@ -468,6 +456,7 @@ mrsas_get_tunables(struct mrsas_softc *sc) sc->mrsas_fw_fault_check_delay = 1; sc->reset_count = 0; sc->reset_in_progress = 0; + sc->block_sync_cache = 0; /* * Grab the global variables. @@ -674,16 +663,15 @@ mrsas_register_aen(struct mrsas_softc *sc, u_int32_t s sc->aen_cmd); if (ret_val) { - printf("mrsas: Failed to abort " - "previous AEN command\n"); + printf("mrsas: Failed to abort previous AEN command\n"); return ret_val; - } + } else + sc->aen_cmd = NULL; } } cmd = mrsas_get_mfi_cmd(sc); - if (!cmd) - return -ENOMEM; + return ENOMEM; dcmd = &cmd->frame->dcmd; @@ -835,6 +823,15 @@ mrsas_attach(device_t dev) sc->mrsas_dev = dev; sc->device_id = pci_get_device(dev); + if ((sc->device_id == MRSAS_INVADER) || + (sc->device_id == MRSAS_FURY) || + (sc->device_id == MRSAS_INTRUDER) || + (sc->device_id == MRSAS_INTRUDER_24) || + (sc->device_id == MRSAS_CUTLASS_52) || + (sc->device_id == MRSAS_CUTLASS_53)) { + sc->mrsas_gen3_ctrl = 1; + } + mrsas_get_tunables(sc); /* @@ -875,6 +872,7 @@ mrsas_attach(device_t dev) TAILQ_INIT(&sc->mrsas_mfi_cmd_list_head); mrsas_atomic_set(&sc->fw_outstanding, 0); + mrsas_atomic_set(&sc->target_reset_outstanding, 0); sc->io_cmds_highwater = 0; @@ -953,8 +951,7 @@ mrsas_ich_startup(void *arg) /* * Intialize a counting Semaphore to take care no. of concurrent IOCTLs */ - sema_init(&sc->ioctl_count_sema, - MRSAS_MAX_MFI_CMDS - 5, + sema_init(&sc->ioctl_count_sema, MRSAS_MAX_IOCTL_CMDS, IOCTL_SEMA_DESCRIPTION); /* Create a /dev entry for mrsas controller. */ @@ -1070,7 +1067,7 @@ mrsas_detach(device_t dev) mtx_destroy(&sc->raidmap_lock); /* Wait for all the semaphores to be released */ - while (sema_value(&sc->ioctl_count_sema) != (MRSAS_MAX_MFI_CMDS - 5)) + while (sema_value(&sc->ioctl_count_sema) != MRSAS_MAX_IOCTL_CMDS) pause("mr_shutdown", hz); /* Destroy the counting semaphore created for Ioctl */ @@ -1354,9 +1351,11 @@ mrsas_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, if (!sc) return ENOENT; - if (sc->remove_in_progress) { + if (sc->remove_in_progress || + (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR)) { mrsas_dprint(sc, MRSAS_INFO, - "Driver remove or shutdown called.\n"); + "Either driver remove or shutdown called or " + "HW is in unrecoverable critical error state.\n"); return ENOENT; } mtx_lock_spin(&sc->ioctl_lock); @@ -1548,8 +1547,11 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M PLD_LOAD_BALANCE_INFO lbinfo; u_int32_t device_id; int threshold_reply_count = 0; +#if TM_DEBUG + MR_TASK_MANAGE_REQUEST *mr_tm_req; + MPI2_SCSI_TASK_MANAGE_REQUEST *mpi_tm_req; +#endif - /* If we have a hardware error, not need to continue */ if (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR) return (DONE); @@ -1575,6 +1577,16 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M extStatus = scsi_io_req->RaidContext.exStatus; switch (scsi_io_req->Function) { + case MPI2_FUNCTION_SCSI_TASK_MGMT: +#if TM_DEBUG + mr_tm_req = (MR_TASK_MANAGE_REQUEST *) cmd_mpt->io_request; + mpi_tm_req = (MPI2_SCSI_TASK_MANAGE_REQUEST *) + &mr_tm_req->TmRequest; + device_printf(sc->mrsas_dev, "TM completion type 0x%X, " + "TaskMID: 0x%X", mpi_tm_req->TaskType, mpi_tm_req->TaskMID); +#endif + wakeup_one((void *)&sc->ocr_chan); + break; case MPI2_FUNCTION_SCSI_IO_REQUEST: /* Fast Path IO. */ device_id = cmd_mpt->ccb_ptr->ccb_h.target_id; lbinfo = &sc->load_balance_info[device_id]; @@ -1592,9 +1604,16 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ cmd_mfi = sc->mfi_cmd_list[cmd_mpt->sync_cmd_idx]; - mrsas_complete_mptmfi_passthru(sc, cmd_mfi, status); - cmd_mpt->flags = 0; - mrsas_release_mpt_cmd(cmd_mpt); + /* + * Make sure NOT TO release the mfi command from the called + * function's context if it is fired with issue_polled call. + * And also make sure that the issue_polled call should only be + * used if INTERRUPT IS DISABLED. + */ + if (cmd_mfi->frame->hdr.flags & MFI_FRAME_DONT_POST_IN_REPLY_QUEUE) + mrsas_release_mfi_cmd(cmd_mfi); + else + mrsas_complete_mptmfi_passthru(sc, cmd_mfi, status); break; } @@ -1629,12 +1648,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M */ if (threshold_reply_count >= THRESHOLD_REPLY_COUNT) { if (sc->msix_enable) { - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) + if (sc->mrsas_gen3_ctrl) mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -1655,12 +1669,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M /* Clear response interrupt */ if (sc->msix_enable) { - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) { + if (sc->mrsas_gen3_ctrl) { mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -2435,12 +2444,21 @@ mrsas_ioc_init(struct mrsas_softc *sc) u_int8_t max_wait = MRSAS_IOC_INIT_WAIT_TIME; bus_addr_t phys_addr; int i, retcode = 0; + u_int32_t scratch_pad_2; /* Allocate memory for the IOC INIT command */ if (mrsas_alloc_ioc_cmd(sc)) { device_printf(sc->mrsas_dev, "Cannot allocate IOC command.\n"); return (1); } + + if (!sc->block_sync_cache) { + scratch_pad_2 = mrsas_read_reg(sc, offsetof(mrsas_reg_set, + outbound_scratch_pad_2)); + sc->fw_sync_cache_support = (scratch_pad_2 & + MR_CAN_HANDLE_SYNC_CACHE_OFFSET) ? 1 : 0; + } + IOCInitMsg = (pMpi2IOCInitRequest_t)(((char *)sc->ioc_init_mem) + 1024); IOCInitMsg->Function = MPI2_FUNCTION_IOC_INIT; IOCInitMsg->WhoInit = MPI2_WHOINIT_HOST_DRIVER; @@ -2458,12 +2476,7 @@ mrsas_ioc_init(struct mrsas_softc *sc) init_frame->flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE; /* driver support Extended MSIX */ - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) { + if (sc->mrsas_gen3_ctrl) { init_frame->driver_operations. mfi_capabilities.support_additional_msix = 1; } @@ -2585,7 +2598,7 @@ mrsas_alloc_mpt_cmds(struct mrsas_softc *sc) memset(cmd, 0, sizeof(struct mrsas_mpt_cmd)); cmd->index = i + 1; cmd->ccb_ptr = NULL; - callout_init(&cmd->cm_callout, 0); + callout_init_mtx(&cmd->cm_callout, &sc->sim_lock, 0); cmd->sync_cmd_idx = (u_int32_t)MRSAS_ULONG_MAX; cmd->sc = sc; cmd->io_request = (MRSAS_RAID_SCSI_IO_REQUEST *) (io_req_base + offset); @@ -2780,6 +2793,7 @@ mrsas_ocr_thread(void *arg) { struct mrsas_softc *sc; u_int32_t fw_status, fw_state; + u_int8_t tm_target_reset_failed = 0; sc = (struct mrsas_softc *)arg; @@ -2802,20 +2816,66 @@ mrsas_ocr_thread(void *arg) fw_status = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_scratch_pad)); fw_state = fw_status & MFI_STATE_MASK; - if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset) { - device_printf(sc->mrsas_dev, "%s started due to %s!\n", - sc->disableOnlineCtrlReset ? "Kill Adapter" : "OCR", - sc->do_timedout_reset ? "IO Timeout" : - "FW fault detected"); - mtx_lock_spin(&sc->ioctl_lock); - sc->reset_in_progress = 1; - sc->reset_count++; - mtx_unlock_spin(&sc->ioctl_lock); + if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset || + mrsas_atomic_read(&sc->target_reset_outstanding)) { + + /* First, freeze further IOs to come to the SIM */ mrsas_xpt_freeze(sc); - mrsas_reset_ctrl(sc, sc->do_timedout_reset); - mrsas_xpt_release(sc); - sc->reset_in_progress = 0; - sc->do_timedout_reset = 0; + + /* If this is an IO timeout then go for target reset */ + if (mrsas_atomic_read(&sc->target_reset_outstanding)) { + device_printf(sc->mrsas_dev, "Initiating Target RESET " + "because of SCSI IO timeout!\n"); + + /* Let the remaining IOs to complete */ + msleep(&sc->ocr_chan, &sc->sim_lock, PRIBIO, + "mrsas_reset_targets", 5 * hz); + + /* Try to reset the target device */ + if (mrsas_reset_targets(sc) == FAIL) + tm_target_reset_failed = 1; + } + + /* If this is a DCMD timeout or FW fault, + * then go for controller reset + */ + if (fw_state == MFI_STATE_FAULT || tm_target_reset_failed || + (sc->do_timedout_reset == MFI_DCMD_TIMEOUT_OCR)) { + if (tm_target_reset_failed) + device_printf(sc->mrsas_dev, "Initiaiting OCR because of " + "TM FAILURE!\n"); + else + device_printf(sc->mrsas_dev, "Initiaiting OCR " + "because of %s!\n", sc->do_timedout_reset ? + "DCMD IO Timeout" : "FW fault"); + + mtx_lock_spin(&sc->ioctl_lock); + sc->reset_in_progress = 1; + mtx_unlock_spin(&sc->ioctl_lock); + sc->reset_count++; + + /* + * Wait for the AEN task to be completed if it is running. + */ + mtx_unlock(&sc->sim_lock); + taskqueue_drain(sc->ev_tq, &sc->ev_task); + mtx_lock(&sc->sim_lock); + + taskqueue_block(sc->ev_tq); + /* Try to reset the controller */ + mrsas_reset_ctrl(sc, sc->do_timedout_reset); + + sc->do_timedout_reset = 0; + sc->reset_in_progress = 0; + tm_target_reset_failed = 0; + mrsas_atomic_set(&sc->target_reset_outstanding, 0); + memset(sc->target_reset_pool, 0, + sizeof(sc->target_reset_pool)); + taskqueue_unblock(sc->ev_tq); + } + + /* Now allow IOs to come to the SIM */ + mrsas_xpt_release(sc); } } mtx_unlock(&sc->sim_lock); @@ -2867,6 +2927,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese struct mrsas_mfi_cmd *mfi_cmd; struct mrsas_mpt_cmd *mpt_cmd; union mrsas_evt_class_locale class_locale; + MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc; if (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR) { device_printf(sc->mrsas_dev, @@ -2994,13 +3055,25 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese mpt_cmd = sc->mpt_cmd_list[j]; if (mpt_cmd->sync_cmd_idx != (u_int32_t)MRSAS_ULONG_MAX) { mfi_cmd = sc->mfi_cmd_list[mpt_cmd->sync_cmd_idx]; - mrsas_release_mfi_cmd(mfi_cmd); - mrsas_release_mpt_cmd(mpt_cmd); + /* If not an IOCTL then release the command else re-fire */ + if (!mfi_cmd->sync_cmd) { + mrsas_release_mfi_cmd(mfi_cmd); + } else { + req_desc = mrsas_get_request_desc(sc, + mfi_cmd->cmd_id.context.smid - 1); + mrsas_dprint(sc, MRSAS_OCR, + "Re-fire command DCMD opcode 0x%x index %d\n ", + mfi_cmd->frame->dcmd.opcode, j); + if (!req_desc) + device_printf(sc->mrsas_dev, + "Cannot build MPT cmd.\n"); + else + mrsas_fire_cmd(sc, req_desc->addr.u.low, + req_desc->addr.u.high); + } } } - sc->aen_cmd = NULL; - /* Reset load balance info */ memset(sc->load_balance_info, 0, sizeof(LD_LOAD_BALANCE_INFO) * MAX_LOGICAL_DRIVES_EXT); @@ -3015,17 +3088,6 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese megasas_setup_jbod_map(sc); - memset(sc->pd_list, 0, - MRSAS_MAX_PD * sizeof(struct mrsas_pd_list)); - if (mrsas_get_pd_list(sc) != SUCCESS) { - device_printf(sc->mrsas_dev, "Get PD list failed from OCR.\n" - "Will get the latest PD LIST after OCR on event.\n"); - } - memset(sc->ld_ids, 0xff, MRSAS_MAX_LD_IDS); - if (mrsas_get_ld_list(sc) != SUCCESS) { - device_printf(sc->mrsas_dev, "Get LD lsit failed from OCR.\n" - "Will get the latest LD LIST after OCR on event.\n"); - } mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); sc->adprecovery = MRSAS_HBA_OPERATIONAL; @@ -3035,6 +3097,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese class_locale.members.locale = MR_EVT_LOCALE_ALL; class_locale.members.class = MR_EVT_CLASS_DEBUG; + mtx_unlock(&sc->sim_lock); if (mrsas_register_aen(sc, sc->last_seq_num, class_locale.word)) { device_printf(sc->mrsas_dev, @@ -3044,6 +3107,8 @@ mrsas_reset_ctrl(struct mrsas_softc *sc, u_int8_t rese "or the controller does not support AEN.\n" "Please contact to the SUPPORT TEAM if the problem persists\n"); } + mtx_lock(&sc->sim_lock); + /* Adapter reset completed successfully */ device_printf(sc->mrsas_dev, "Reset successful\n"); retval = SUCCESS; @@ -3140,6 +3205,11 @@ mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_i if (fw_state == MFI_STATE_FAULT) { mrsas_dprint(sc, MRSAS_OCR, "Found FW in FAULT state, will reset adapter.\n"); + count = sc->msix_vectors > 0 ? sc->msix_vectors : 1; + mtx_unlock(&sc->sim_lock); + for (MSIxIndex = 0; MSIxIndex < count; MSIxIndex++) + mrsas_complete_cmd(sc, MSIxIndex); + mtx_lock(&sc->sim_lock); retval = 1; goto out; } @@ -3157,8 +3227,10 @@ mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_i mrsas_dprint(sc, MRSAS_OCR, "[%2d]waiting for %d " "commands to complete\n", i, outstanding); count = sc->msix_vectors > 0 ? sc->msix_vectors : 1; + mtx_unlock(&sc->sim_lock); for (MSIxIndex = 0; MSIxIndex < count; MSIxIndex++) mrsas_complete_cmd(sc, MSIxIndex); + mtx_lock(&sc->sim_lock); } DELAY(1000 * 1000); } @@ -3177,17 +3249,33 @@ out: * mrsas_release_mfi_cmd: Return a cmd to free command pool * input: Command packet for return to free cmd pool * - * This function returns the MFI command to the command list. + * This function returns the MFI & MPT command to the command list. */ void -mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd) +mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd_mfi) { - struct mrsas_softc *sc = cmd->sc; + struct mrsas_softc *sc = cmd_mfi->sc; + struct mrsas_mpt_cmd *cmd_mpt; + mtx_lock(&sc->mfi_cmd_pool_lock); - cmd->ccb_ptr = NULL; - cmd->cmd_id.frame_count = 0; - TAILQ_INSERT_TAIL(&(sc->mrsas_mfi_cmd_list_head), cmd, next); + /* + * Release the mpt command (if at all it is allocated + * associated with the mfi command + */ + if (cmd_mfi->cmd_id.context.smid) { + mtx_lock(&sc->mpt_cmd_pool_lock); + /* Get the mpt cmd from mfi cmd frame's smid value */ + cmd_mpt = sc->mpt_cmd_list[cmd_mfi->cmd_id.context.smid-1]; + cmd_mpt->flags = 0; + cmd_mpt->sync_cmd_idx = (u_int32_t)MRSAS_ULONG_MAX; + TAILQ_INSERT_HEAD(&(sc->mrsas_mpt_cmd_list_head), cmd_mpt, next); + mtx_unlock(&sc->mpt_cmd_pool_lock); + } + /* Release the mfi command */ + cmd_mfi->ccb_ptr = NULL; + cmd_mfi->cmd_id.frame_count = 0; + TAILQ_INSERT_HEAD(&(sc->mrsas_mfi_cmd_list_head), cmd_mfi, next); mtx_unlock(&sc->mfi_cmd_pool_lock); return; @@ -3236,7 +3324,11 @@ mrsas_get_ctrl_info(struct mrsas_softc *sc) dcmd->sgl.sge32[0].phys_addr = sc->ctlr_info_phys_addr; dcmd->sgl.sge32[0].length = sizeof(struct mrsas_ctrl_info); - retcode = mrsas_issue_polled(sc, cmd); + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + if (retcode == ETIMEDOUT) goto dcmd_timeout; else @@ -3247,13 +3339,16 @@ mrsas_get_ctrl_info(struct mrsas_softc *sc) sc->use_seqnum_jbod_fp = sc->ctrl_info->adapterOperations3.useSeqNumJbodFP; + sc->disableOnlineCtrlReset = + sc->ctrl_info->properties.OnOffProperties.disableOnlineCtrlReset; dcmd_timeout: mrsas_free_ctlr_info_cmd(sc); if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else + + if (!sc->mask_interrupts) mrsas_release_mfi_cmd(cmd); return (retcode); @@ -3496,12 +3591,7 @@ mrsas_build_mptmfi_passthru(struct mrsas_softc *sc, st io_req = mpt_cmd->io_request; - if ((sc->device_id == MRSAS_INVADER) || - (sc->device_id == MRSAS_FURY) || - (sc->device_id == MRSAS_INTRUDER) || - (sc->device_id == MRSAS_INTRUDER_24) || - (sc->device_id == MRSAS_CUTLASS_52) || - (sc->device_id == MRSAS_CUTLASS_53)) { + if (sc->mrsas_gen3_ctrl) { pMpi25IeeeSgeChain64_t sgl_ptr_end = (pMpi25IeeeSgeChain64_t)&io_req->SGL; sgl_ptr_end += sc->max_sge_in_main_msg - 1; @@ -3869,8 +3959,6 @@ megasas_sync_pd_seq_num(struct mrsas_softc *sc, boolea dcmd_timeout: if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else - mrsas_release_mfi_cmd(cmd); return (retcode); } @@ -3947,8 +4035,6 @@ mrsas_get_ld_map_info(struct mrsas_softc *sc) retcode = mrsas_issue_polled(sc, cmd); if (retcode == ETIMEDOUT) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else - mrsas_release_mfi_cmd(cmd); return (retcode); } @@ -3975,9 +4061,8 @@ mrsas_sync_map_info(struct mrsas_softc *sc) cmd = mrsas_get_mfi_cmd(sc); if (!cmd) { - device_printf(sc->mrsas_dev, - "Cannot alloc for sync map info cmd\n"); - return 1; + device_printf(sc->mrsas_dev, "Cannot alloc for sync map info cmd\n"); + return ENOMEM; } map = sc->ld_drv_map[sc->map_id & 1]; num_lds = map->raidMap.ldCount; @@ -4077,7 +4162,11 @@ mrsas_get_pd_list(struct mrsas_softc *sc) dcmd->sgl.sge32[0].phys_addr = pd_list_phys_addr; dcmd->sgl.sge32[0].length = MRSAS_MAX_PD * sizeof(struct MR_PD_LIST); - retcode = mrsas_issue_polled(sc, cmd); + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + if (retcode == ETIMEDOUT) goto dcmd_timeout; @@ -4108,7 +4197,8 @@ dcmd_timeout: if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else + + if (!sc->mask_interrupts) mrsas_release_mfi_cmd(cmd); return (retcode); @@ -4170,7 +4260,11 @@ mrsas_get_ld_list(struct mrsas_softc *sc) dcmd->sgl.sge32[0].length = sizeof(struct MR_LD_LIST); dcmd->pad_0 = 0; - retcode = mrsas_issue_polled(sc, cmd); + if (!sc->mask_interrupts) + retcode = mrsas_issue_blocked_cmd(sc, cmd); + else + retcode = mrsas_issue_polled(sc, cmd); + if (retcode == ETIMEDOUT) goto dcmd_timeout; @@ -4196,7 +4290,7 @@ dcmd_timeout: if (do_ocr) sc->do_timedout_reset = MFI_DCMD_TIMEOUT_OCR; - else + if (!sc->mask_interrupts) mrsas_release_mfi_cmd(cmd); return (retcode); @@ -4360,6 +4454,11 @@ mrsas_aen_handler(struct mrsas_softc *sc) printf("invalid instance!\n"); return; } + if (sc->remove_in_progress || sc->reset_in_progress) { + device_printf(sc->mrsas_dev, "Returning from %s, line no %d\n", + __func__, __LINE__); + return; + } if (sc->evt_detail_mem) { switch (sc->evt_detail_mem->code) { case MR_EVT_PD_INSERTED: @@ -4368,7 +4467,6 @@ mrsas_aen_handler(struct mrsas_softc *sc) mrsas_bus_scan_sim(sc, sc->sim_1); else goto skip_register_aen; - doscan = 0; break; case MR_EVT_PD_REMOVED: fail_aen = mrsas_get_pd_list(sc); @@ -4376,13 +4474,11 @@ mrsas_aen_handler(struct mrsas_softc *sc) mrsas_bus_scan_sim(sc, sc->sim_1); else goto skip_register_aen; - doscan = 0; break; case MR_EVT_LD_OFFLINE: case MR_EVT_CFG_CLEARED: case MR_EVT_LD_DELETED: mrsas_bus_scan_sim(sc, sc->sim_0); - doscan = 0; break; case MR_EVT_LD_CREATED: fail_aen = mrsas_get_ld_list(sc); @@ -4390,15 +4486,18 @@ mrsas_aen_handler(struct mrsas_softc *sc) mrsas_bus_scan_sim(sc, sc->sim_0); else goto skip_register_aen; - doscan = 0; break; case MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED: case MR_EVT_FOREIGN_CFG_IMPORTED: case MR_EVT_LD_STATE_CHANGE: doscan = 1; break; + case MR_EVT_CTRL_PROP_CHANGED: + fail_aen = mrsas_get_ctrl_info(sc); + if (fail_aen) + goto skip_register_aen; + break; default: - doscan = 0; break; } } else { @@ -4474,8 +4573,7 @@ mrsas_complete_aen(struct mrsas_softc *sc, struct mrsa sc->aen_cmd = NULL; mrsas_release_mfi_cmd(cmd); - if (!sc->remove_in_progress) - taskqueue_enqueue(sc->ev_tq, &sc->ev_task); + taskqueue_enqueue(sc->ev_tq, &sc->ev_task); return; } Modified: stable/11/sys/dev/mrsas/mrsas.h ============================================================================== --- stable/11/sys/dev/mrsas/mrsas.h Wed Sep 20 17:30:01 2017 (r323818) +++ stable/11/sys/dev/mrsas/mrsas.h Wed Sep 20 17:49:57 2017 (r323819) @@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.709.07.00-fbsd" +#define MRSAS_VERSION "06.712.04.00-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 /* Temporarily set */ #define DONE 0 @@ -205,7 +205,9 @@ typedef struct _RAID_CONTEXT { #define MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD (0x0100) #define MPI2_SCSIIO_EEDPFLAGS_INSERT_OP (0x0004) #define MPI2_FUNCTION_SCSI_IO_REQUEST (0x00) /* SCSI IO */ -#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x06) +#define MPI2_FUNCTION_SCSI_TASK_MGMT (0x01) +#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x03) +#define MPI2_REQ_DESCRIPT_FLAGS_FP_IO (0x06) #define MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO (0x00) #define MPI2_SGE_FLAGS_64_BIT_ADDRESSING (0x02) #define MPI2_SCSIIO_CONTROL_WRITE (0x01000000) @@ -314,6 +316,91 @@ typedef union { } MPI2_SCSI_IO_CDB_UNION, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_UNION, Mpi2ScsiIoCdb_t, MPI2_POINTER pMpi2ScsiIoCdb_t; +/**************************************************************************** + * * SCSI Task Management messages + * ****************************************************************************/ + +/*SCSI Task Management Request Message */ +typedef struct _MPI2_SCSI_TASK_MANAGE_REQUEST { + u_int16_t DevHandle; /*0x00 */ + u_int8_t ChainOffset; /*0x02 */ + u_int8_t Function; /*0x03 */ + u_int8_t Reserved1; /*0x04 */ + u_int8_t TaskType; /*0x05 */ + u_int8_t Reserved2; /*0x06 */ + u_int8_t MsgFlags; /*0x07 */ + u_int8_t VP_ID; /*0x08 */ + u_int8_t VF_ID; /*0x09 */ + u_int16_t Reserved3; /*0x0A */ + u_int8_t LUN[8]; /*0x0C */ + u_int32_t Reserved4[7]; /*0x14 */ + u_int16_t TaskMID; /*0x30 */ + u_int16_t Reserved5; /*0x32 */ +} MPI2_SCSI_TASK_MANAGE_REQUEST; + +/*SCSI Task Management Reply Message */ +typedef struct _MPI2_SCSI_TASK_MANAGE_REPLY { + u_int16_t DevHandle; /*0x00 */ + u_int8_t MsgLength; /*0x02 */ + u_int8_t Function; /*0x03 */ + u_int8_t ResponseCode; /*0x04 */ + u_int8_t TaskType; /*0x05 */ + u_int8_t Reserved1; /*0x06 */ + u_int8_t MsgFlags; /*0x07 */ + u_int8_t VP_ID; /*0x08 */ + u_int8_t VF_ID; /*0x09 */ + u_int16_t Reserved2; /*0x0A */ + u_int16_t Reserved3; /*0x0C */ + u_int16_t IOCStatus; /*0x0E */ + u_int32_t IOCLogInfo; /*0x10 */ + u_int32_t TerminationCount; /*0x14 */ + u_int32_t ResponseInfo; /*0x18 */ +} MPI2_SCSI_TASK_MANAGE_REPLY; + +typedef struct _MR_TM_REQUEST { + char request[128]; +} MR_TM_REQUEST; + +typedef struct _MR_TM_REPLY { + char reply[128]; +} MR_TM_REPLY; + +/* SCSI Task Management Request Message */ +typedef struct _MR_TASK_MANAGE_REQUEST { + /*To be type casted to struct MPI2_SCSI_TASK_MANAGE_REQUEST */ + MR_TM_REQUEST TmRequest; + union { + struct { + u_int32_t isTMForLD:1; + u_int32_t isTMForPD:1; + u_int32_t reserved1:30; + u_int32_t reserved2; + } tmReqFlags; + MR_TM_REPLY TMReply; + } uTmReqReply; +} MR_TASK_MANAGE_REQUEST; + +/* TaskType values */ +#define MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK (0x01) +#define MPI2_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET (0x02) +#define MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03) +#define MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05) +#define MPI2_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET (0x06) +#define MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07) +#define MPI2_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08) +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_TASK_SET (0x09) +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_ASYNC_EVENT (0x0A) + +/* ResponseCode values */ +#define MPI2_SCSITASKMGMT_RSP_TM_COMPLETE (0x00) +#define MPI2_SCSITASKMGMT_RSP_INVALID_FRAME (0x02) +#define MPI2_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED (0x04) +#define MPI2_SCSITASKMGMT_RSP_TM_FAILED (0x05) +#define MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED (0x08) +#define MPI2_SCSITASKMGMT_RSP_TM_INVALID_LUN (0x09) +#define MPI2_SCSITASKMGMT_RSP_TM_OVERLAPPED_TAG (0x0A) +#define MPI2_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC (0x80) + /* * RAID SCSI IO Request Message Total SGE count will be one less than * _MPI2_SCSI_IO_REQUEST @@ -584,8 +671,8 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define MAX_RAIDMAP_PHYSICAL_DEVICES (MAX_PHYSICAL_DEVICES) #define MR_DCMD_LD_MAP_GET_INFO 0x0300e101 #define MR_DCMD_SYSTEM_PD_MAP_GET_INFO 0x0200e102 +#define MR_DCMD_PD_MFI_TASK_MGMT 0x0200e100 - #define MRSAS_MAX_PD_CHANNELS 1 #define MRSAS_MAX_LD_CHANNELS 1 #define MRSAS_MAX_DEV_PER_CHANNEL 256 @@ -599,8 +686,8 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define VD_EXT_DEBUG 0 +#define TM_DEBUG 1 - /******************************************************************* * RAID map related structures ********************************************************************/ @@ -659,7 +746,8 @@ typedef struct _MR_LD_RAID { u_int32_t fpWriteAcrossStripe:1; u_int32_t fpReadAcrossStripe:1; u_int32_t fpNonRWCapable:1; - u_int32_t reserved4:7; + u_int32_t tmCapable:1; + u_int32_t reserved4:6; } capability; u_int32_t reserved6; u_int64_t size; @@ -876,7 +964,11 @@ struct IO_REQUEST_INFO { struct MR_PD_CFG_SEQ { u_int16_t seqNum; u_int16_t devHandle; - u_int8_t reserved[4]; + struct { + u_int8_t tmCapable:1; + u_int8_t reserved:7; + } capability; + u_int8_t reserved[3]; } __packed; struct MR_PD_CFG_SEQ_NUM_SYNC { @@ -1242,7 +1334,6 @@ enum MR_EVT_ARGS { MR_EVT_ARGS_GENERIC, }; - /* * Thunderbolt (and later) Defines */ @@ -1256,7 +1347,8 @@ enum MR_EVT_ARGS { #define HOST_DIAG_WRITE_ENABLE 0x80 #define HOST_DIAG_RESET_ADAPTER 0x4 #define MRSAS_TBOLT_MAX_RESET_TRIES 3 -#define MRSAS_MAX_MFI_CMDS 32 +#define MRSAS_MAX_MFI_CMDS 16 +#define MRSAS_MAX_IOCTL_CMDS 3 /* * Invader Defines @@ -1395,6 +1487,7 @@ struct mrsas_mpt_cmd { union ccb *ccb_ptr; struct callout cm_callout; struct mrsas_softc *sc; + boolean_t tmCapable; TAILQ_ENTRY(mrsas_mpt_cmd) next; }; @@ -1448,6 +1541,7 @@ enum MR_PD_QUERY_TYPE { #define MR_EVT_LD_DELETED 0x008b #define MR_EVT_FOREIGN_CFG_IMPORTED 0x00db #define MR_EVT_LD_OFFLINE 0x00fc +#define MR_EVT_CTRL_PROP_CHANGED 0x012f #define MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED 0x0152 enum MR_PD_STATE { @@ -1990,6 +2084,11 @@ struct mrsas_ctrl_info { #define MR_MAX_MSIX_REG_ARRAY 16 /* + * SYNC CACHE offset define + */ +#define MR_CAN_HANDLE_SYNC_CACHE_OFFSET 0X01000000 + +/* * FW reports the maximum of number of commands that it can accept (maximum * commands that can be outstanding) at any time. The driver must report a * lower number to the mid layer because it can issue a few internal commands @@ -2470,8 +2569,7 @@ struct mrsas_irq_context { enum MEGASAS_OCR_REASON { FW_FAULT_OCR = 0, - SCSIIO_TIMEOUT_OCR = 1, - MFI_DCMD_TIMEOUT_OCR = 2, + MFI_DCMD_TIMEOUT_OCR = 1, }; /* Controller management info added to support Linux Emulator */ @@ -2746,6 +2844,11 @@ struct mrsas_softc { u_int8_t do_timedout_reset; u_int32_t reset_in_progress; u_int32_t reset_count; + u_int32_t block_sync_cache; + u_int8_t fw_sync_cache_support; + mrsas_atomic_t target_reset_outstanding; +#define MRSAS_MAX_TM_TARGETS (MRSAS_MAX_PD + MRSAS_MAX_LD_IDS) + struct mrsas_mpt_cmd *target_reset_pool[MRSAS_MAX_TM_TARGETS]; bus_dma_tag_t jbodmap_tag[2]; bus_dmamap_t jbodmap_dmamap[2]; @@ -2794,6 +2897,7 @@ struct mrsas_softc { LD_LOAD_BALANCE_INFO load_balance_info[MAX_LOGICAL_DRIVES_EXT]; LD_SPAN_INFO log_to_span[MAX_LOGICAL_DRIVES_EXT]; + u_int8_t mrsas_gen3_ctrl; u_int8_t secure_jbod_support; u_int8_t use_seqnum_jbod_fp; u_int8_t max256vdSupport; Modified: stable/11/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- stable/11/sys/dev/mrsas/mrsas_cam.c Wed Sep 20 17:30:01 2017 (r323818) +++ stable/11/sys/dev/mrsas/mrsas_cam.c Wed Sep 20 17:49:57 2017 (r323819) @@ -95,6 +95,11 @@ static void mrsas_freeze_simq(struct mrsas_mpt_cmd *cm static void mrsas_cam_poll(struct cam_sim *sim); static void mrsas_action(struct cam_sim *sim, union ccb *ccb); static void mrsas_scsiio_timeout(void *data); +static int mrsas_track_scsiio(struct mrsas_softc *sc, target_id_t id, u_int32_t bus_id); +static void mrsas_tm_response_code(struct mrsas_softc *sc, + MPI2_SCSI_TASK_MANAGE_REPLY *mpi_reply); +static int mrsas_issue_tm(struct mrsas_softc *sc, + MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc); static void mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); @@ -105,6 +110,10 @@ struct mrsas_mpt_cmd *mrsas_get_mpt_cmd(struct mrsas_s MRSAS_REQUEST_DESCRIPTOR_UNION * mrsas_get_request_desc(struct mrsas_softc *sc, u_int16_t index); +extern void +mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_int8_t status, + u_int8_t extStatus); +extern int mrsas_reset_targets(struct mrsas_softc *sc); extern u_int16_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); extern u_int32_t MR_LdBlockSizeGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map, @@ -125,6 +134,9 @@ extern u_int8_t megasas_get_best_arm(PLD_LOAD_BALANCE_INFO lbInfo, u_int8_t arm, u_int64_t block, u_int32_t count); extern int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); +extern MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); +extern void mrsas_disable_intr(struct mrsas_softc *sc); +extern void mrsas_enable_intr(struct mrsas_softc *sc); /* @@ -260,6 +272,17 @@ mrsas_action(struct cam_sim *sim, union ccb *ccb) struct ccb_hdr *ccb_h = &(ccb->ccb_h); u_int32_t device_id; + /* + * Check if the system going down + * or the adapter is in unrecoverable critical error + */ + if (sc->remove_in_progress || + (sc->adprecovery == MRSAS_HW_CRITICAL_ERROR)) { + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; + xpt_done(ccb); + return; + } + switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: { @@ -375,7 +398,11 @@ mrsas_scsiio_timeout(void *data) { struct mrsas_mpt_cmd *cmd; struct mrsas_softc *sc; + u_int32_t target_id; + if (!data) + return; + cmd = (struct mrsas_mpt_cmd *)data; sc = cmd->sc; @@ -383,6 +410,7 @@ mrsas_scsiio_timeout(void *data) printf("command timeout with NULL ccb\n"); return; } + /* * Below callout is dummy entry so that it will be cancelled from * mrsas_cmd_done(). Now Controller will go to OCR/Kill Adapter based @@ -390,15 +418,25 @@ mrsas_scsiio_timeout(void *data) * context. */ #if (__FreeBSD_version >= 1000510) - callout_reset_sbt(&cmd->cm_callout, SBT_1S * 600, 0, + callout_reset_sbt(&cmd->cm_callout, SBT_1S * 180, 0, mrsas_scsiio_timeout, cmd, 0); #else - callout_reset(&cmd->cm_callout, (600000 * hz) / 1000, + callout_reset(&cmd->cm_callout, (180000 * hz) / 1000, mrsas_scsiio_timeout, cmd); #endif - sc->do_timedout_reset = SCSIIO_TIMEOUT_OCR; - if (sc->ocr_thread_active) - wakeup(&sc->ocr_chan); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Sep 20 17:53: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 C877EE1A6DE; Wed, 20 Sep 2017 17:53:26 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96034752EA; Wed, 20 Sep 2017 17:53:26 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KHrPBq070785; Wed, 20 Sep 2017 17:53:25 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KHrPRd070784; Wed, 20 Sep 2017 17:53:25 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709201753.v8KHrPRd070784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 20 Sep 2017 17:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323820 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 323820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 17:53:26 -0000 Author: cem Date: Wed Sep 20 17:53:25 2017 New Revision: 323820 URL: https://svnweb.freebsd.org/changeset/base/323820 Log: aesni(4): Fix trivial typo (AQUIRE -> ACQUIRE) Sponsored by: Dell EMC Isilon Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Sep 20 17:49:57 2017 (r323819) +++ head/sys/crypto/aesni/aesni.c Wed Sep 20 17:53:25 2017 (r323820) @@ -61,7 +61,7 @@ struct aesni_softc { struct rwlock lock; }; -#define AQUIRE_CTX(i, ctx) \ +#define ACQUIRE_CTX(i, ctx) \ do { \ (i) = PCPU_GET(cpuid); \ mtx_lock(&ctx_mtx[(i)]); \ @@ -490,7 +490,7 @@ aesni_cipher_setup(struct aesni_session *ses, struct c kt = is_fpu_kern_thread(0); if (!kt) { - AQUIRE_CTX(ctxidx, ctx); + ACQUIRE_CTX(ctxidx, ctx); error = fpu_kern_enter(curthread, ctx, FPU_KERN_NORMAL | FPU_KERN_KTHR); if (error != 0) @@ -547,7 +547,7 @@ aesni_cipher_process(struct aesni_session *ses, struct kt = is_fpu_kern_thread(0); if (!kt) { - AQUIRE_CTX(ctxidx, ctx); + ACQUIRE_CTX(ctxidx, ctx); error = fpu_kern_enter(curthread, ctx, FPU_KERN_NORMAL|FPU_KERN_KTHR); if (error != 0) From owner-svn-src-all@freebsd.org Wed Sep 20 18:04: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 BA815E1B139; Wed, 20 Sep 2017 18:04:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 878FB75944; Wed, 20 Sep 2017 18:04:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KI4SjK074793; Wed, 20 Sep 2017 18:04:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KI4SpE074792; Wed, 20 Sep 2017 18:04:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709201804.v8KI4SpE074792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 20 Sep 2017 18:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323821 - releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 323821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 18:04:29 -0000 Author: gjb Date: Wed Sep 20 18:04:28 2017 New Revision: 323821 URL: https://svnweb.freebsd.org/changeset/base/323821 Log: Document r323333, pw(8) allow empty secondary group list. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 20 17:53:25 2017 (r323820) +++ releng/10.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 20 18:04:28 2017 (r323821) @@ -241,6 +241,11 @@ compliant with RFC5424. For more details, see the description for the T flag in &man.newsyslog.conf.5;. + + The &man.pw.8; utility has been updated + to support empty secondary groups being passed with the + -G flag, ensuring the target user does not + have any secondary group memberships. From owner-svn-src-all@freebsd.org Wed Sep 20 18:25:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8537FE1C19E for ; Wed, 20 Sep 2017 18:25: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 6AE9076446; Wed, 20 Sep 2017 18:25:43 +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 v8KIPbdJ072775 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 20 Sep 2017 11:25:37 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v8KIPbVJ072774; Wed, 20 Sep 2017 11:25:37 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 20 Sep 2017 11:25:37 -0700 From: Gleb Smirnoff To: Alexey Dokuchaev Cc: Josh Paetzel , svn-src-all@freebsd.org Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Message-ID: <20170920182537.GN1055@FreeBSD.org> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> <1505915939.3128744.1112434136.0864CA5F@webmail.messagingengine.com> <20170920172145.GA80852@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170920172145.GA80852@FreeBSD.org> User-Agent: Mutt/1.8.3 (2017-05-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, 20 Sep 2017 18:25:44 -0000 On Wed, Sep 20, 2017 at 05:21:45PM +0000, Alexey Dokuchaev wrote: A> On Wed, Sep 20, 2017 at 08:58:59AM -0500, Josh Paetzel wrote: A> > On Wed, Sep 20, 2017, at 02:41 AM, Ngie Cooper (yaneurabeya) wrote: A> > > > On Sep 19, 2017, at 09:51, Josh Paetzel wrote: A> > > > New Revision: 323770 A> > > > URL: https://svnweb.freebsd.org/changeset/base/323770 A> > > > A> > > > Log: A> > > > MFC: 323068 A> > > > A> > > > Allow kldload tcpmd5 A> > > A> > > Wasn't this reverted on ^/head ? A> > A> > Not this one. What was reverted on HEAD was the removal of options A> > IPSEC from GENERIC. A> > A> > The endgoal is options IPSEC and options IPSEC_SUPPORT in GENERIC, which A> > will allow someone running GENERIC to kldload tcpmd5. A> A> I'll shamelessly steal this thread to ask somewhat related question that A> was bothering me since the original botched commit: what is the reason A> behind IPSEC_SUPPORT option? If it does not cost anything, why not just A> optimize it away; if it does imply something more, can you shed some A> light on why is it needed (and/or might not be)? Thanks, The reason is to make loadable ipsec.ko. I actually don't understand why do we still have IPSEC in GENERIC once it is loadable. Doesn't it still have performance impact? -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Wed Sep 20 18: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 26F52E1C42A; Wed, 20 Sep 2017 18:30:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8CB576555; Wed, 20 Sep 2017 18:30:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KIUcfo083388; Wed, 20 Sep 2017 18:30:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KIUbJ0083385; Wed, 20 Sep 2017 18:30:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709201830.v8KIUbJ0083385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 20 Sep 2017 18:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323822 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 323822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 18:30:39 -0000 Author: cem Date: Wed Sep 20 18:30:37 2017 New Revision: 323822 URL: https://svnweb.freebsd.org/changeset/base/323822 Log: x86: Decode AMD "Extended Feature Extensions ID EBX" bits In particular, this determines CPU support for the CLZERO instruction. (No, I am not making this name up.) Sponsored by: Dell EMC Isilon Modified: head/sys/x86/include/specialreg.h head/sys/x86/include/x86_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Wed Sep 20 18:04:28 2017 (r323821) +++ head/sys/x86/include/specialreg.h Wed Sep 20 18:30:37 2017 (r323822) @@ -331,6 +331,13 @@ #define AMDPM_CPB 0x00000200 /* + * AMD extended function 8000_0008h ebx info (amd_extended_feature_extensions) + */ +#define AMDFEID_CLZERO 0x00000001 +#define AMDFEID_IRPERF 0x00000002 +#define AMDFEID_XSAVEERPTR 0x00000004 + +/* * AMD extended function 8000_0008h ecx info */ #define AMDID_CMP_CORES 0x000000ff Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Wed Sep 20 18:04:28 2017 (r323821) +++ head/sys/x86/include/x86_var.h Wed Sep 20 18:30:37 2017 (r323822) @@ -46,6 +46,7 @@ extern u_int amd_feature; extern u_int amd_feature2; extern u_int amd_rascap; extern u_int amd_pminfo; +extern u_int amd_extended_feature_extensions; extern u_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Wed Sep 20 18:04:28 2017 (r323821) +++ head/sys/x86/x86/identcpu.c Wed Sep 20 18:30:37 2017 (r323822) @@ -93,6 +93,7 @@ u_int amd_feature; /* AMD feature flags */ u_int amd_feature2; /* AMD feature flags */ u_int amd_rascap; /* AMD RAS capabilities */ u_int amd_pminfo; /* AMD advanced power management info */ +u_int amd_extended_feature_extensions; u_int via_feature_rng; /* VIA RNG features */ u_int via_feature_xcrypt; /* VIA ACE features */ u_int cpu_high; /* Highest arg to CPUID */ @@ -992,6 +993,16 @@ printcpuinfo(void) } } + if (amd_extended_feature_extensions != 0) { + printf("\n " + "AMD Extended Feature Extensions ID EBX=" + "0x%b", amd_extended_feature_extensions, + "\020" + "\001CLZERO" + "\002IRPerf" + "\003XSaveErPtr"); + } + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); @@ -1468,6 +1479,7 @@ finishidentcpu(void) if (cpu_exthigh >= 0x80000008) { do_cpuid(0x80000008, regs); cpu_maxphyaddr = regs[0] & 0xff; + amd_extended_feature_extensions = regs[1]; cpu_procinfo2 = regs[2]; } else { cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32; From owner-svn-src-all@freebsd.org Wed Sep 20 18:31: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 E5BD2E1C660; Wed, 20 Sep 2017 18:31:37 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B00937685D; Wed, 20 Sep 2017 18:31:37 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KIVa2C084137; Wed, 20 Sep 2017 18:31:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KIVaeG084136; Wed, 20 Sep 2017 18:31:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709201831.v8KIVaeG084136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 20 Sep 2017 18:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323823 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 323823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 18:31:38 -0000 Author: cem Date: Wed Sep 20 18:31:36 2017 New Revision: 323823 URL: https://svnweb.freebsd.org/changeset/base/323823 Log: aesni(4): Fix another trivial typo (aensi -> aesni) Sponsored by: Dell EMC Isilon Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Wed Sep 20 18:30:37 2017 (r323822) +++ head/sys/crypto/aesni/aesni.c Wed Sep 20 18:31:36 2017 (r323823) @@ -114,7 +114,7 @@ aesni_probe(device_t dev) } static void -aensi_cleanctx(void) +aesni_cleanctx(void) { int i; @@ -198,7 +198,7 @@ aesni_detach(device_t dev) rw_destroy(&sc->lock); - aensi_cleanctx(); + aesni_cleanctx(); return (0); } From owner-svn-src-all@freebsd.org Wed Sep 20 18:41: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 54A0EE1CCB2 for ; Wed, 20 Sep 2017 18:41:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 34ED576DD3; Wed, 20 Sep 2017 18:41:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 775901FAFA; Wed, 20 Sep 2017 18:41:04 +0000 (UTC) Date: Wed, 20 Sep 2017 18:41:04 +0000 From: Alexey Dokuchaev To: Gleb Smirnoff Cc: Josh Paetzel , svn-src-all@freebsd.org Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Message-ID: <20170920184104.GA6428@FreeBSD.org> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> <1505915939.3128744.1112434136.0864CA5F@webmail.messagingengine.com> <20170920172145.GA80852@FreeBSD.org> <20170920182537.GN1055@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170920182537.GN1055@FreeBSD.org> User-Agent: Mutt/1.8.3 (2017-05-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, 20 Sep 2017 18:41:05 -0000 On Wed, Sep 20, 2017 at 11:25:37AM -0700, Gleb Smirnoff wrote: > On Wed, Sep 20, 2017 at 05:21:45PM +0000, Alexey Dokuchaev wrote: > A> On Wed, Sep 20, 2017 at 08:58:59AM -0500, Josh Paetzel wrote: > A> > On Wed, Sep 20, 2017, at 02:41 AM, Ngie Cooper (yaneurabeya) wrote: > A> > > > On Sep 19, 2017, at 09:51, Josh Paetzel wrote: > A> > > > New Revision: 323770 > A> > > > URL: https://svnweb.freebsd.org/changeset/base/323770 > A> > > > > A> > > > Log: > A> > > > MFC: 323068 > A> > > > > A> > > > Allow kldload tcpmd5 > A> > > > A> > > Wasn't this reverted on ^/head ? > A> > > A> > Not this one. What was reverted on HEAD was the removal of options > A> > IPSEC from GENERIC. > A> > > A> > The endgoal is options IPSEC and options IPSEC_SUPPORT in GENERIC, which > A> > will allow someone running GENERIC to kldload tcpmd5. > A> > A> I'll shamelessly steal this thread to ask somewhat related question that > A> was bothering me since the original botched commit: what is the reason > A> behind IPSEC_SUPPORT option? If it does not cost anything, why not just > A> optimize it away; if it does imply something more, can you shed some > A> light on why is it needed (and/or might not be)? Thanks, > > The reason is to make loadable ipsec.ko. I actually don't understand > why do we still have IPSEC in GENERIC once it is loadable. Doesn't it > still have performance impact? I understand that the idea is to make it loadable; what I don't understand is why this requires IPSEC_SUPPORT option instead of no special option what- soever. If I grep for SUPPORT in my i386/conf/GENERIC, I see things like INVARIANT_SUPPORT or IEEE80211_SUPPORT_MESH (with meaningful explanations) but IPSEC_SUPPORT which, per the comment, "allows to kldload of ipsec and tcpmd5", is totally beyond me. Lots of kernel features are/can be loaded as modules, but we don't have things like SOUND_SUPPORT or USB_SUPPORT. ./danfe From owner-svn-src-all@freebsd.org Wed Sep 20 18:42: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 6D3F8E1CF3E for ; Wed, 20 Sep 2017 18:42:40 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42C5C7704D for ; Wed, 20 Sep 2017 18:42:39 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0770A21AAF for ; Wed, 20 Sep 2017 14:42:33 -0400 (EDT) Received: from web1 ([10.202.2.211]) by compute2.internal (MEProxy); Wed, 20 Sep 2017 14:42:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hji5tq Rs+XLr++KLU8FRRG+Ta/aYgb3PHFVgqJ91fog=; b=F1UWPOVSgbznktwsVnN3tI y68ovrEbDrpiOQEDlklTDhKKR+d/CzR90tYBwNqRfat+bSBtyojsokptYYjhqbIS Yjk6C3WcYIWfU4zW/ievp7Ua/BIgByPMICyXG5YP1lLMXnw3uZ2CdQyQUxnk7iDQ LebrANyFs7DigzW7z3Q6SifYkGOGlYrJgtfGNuAWb7jt0IZyW1RUwQzY48H/CGhx nQ03QE2TtFURFbhXNbADddjgoJrhhU/dbW3M8qNmXTOtZsCKUz1+R51W/3AA+eEG UfX3kbuX1xik57NFUT6N+Aap+mikO0qD54yGWC4gxbaFyb4T68fEKMF1yMz9Egng == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id E48AC94739; Wed, 20 Sep 2017 14:42:32 -0400 (EDT) Message-Id: <1505932952.2556052.1112777680.0118296F@webmail.messagingengine.com> From: Josh Paetzel To: svn-src-all@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-64b08692 Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf In-Reply-To: <20170920182537.GN1055@FreeBSD.org> Date: Wed, 20 Sep 2017 13:42:32 -0500 References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> <1505915939.3128744.1112434136.0864CA5F@webmail.messagingengine.com> <20170920172145.GA80852@FreeBSD.org> <20170920182537.GN1055@FreeBSD.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: Wed, 20 Sep 2017 18:42:40 -0000 On Wed, Sep 20, 2017, at 01:25 PM, Gleb Smirnoff wrote: > On Wed, Sep 20, 2017 at 05:21:45PM +0000, Alexey Dokuchaev wrote: > A> On Wed, Sep 20, 2017 at 08:58:59AM -0500, Josh Paetzel wrote: > A> > On Wed, Sep 20, 2017, at 02:41 AM, Ngie Cooper (yaneurabeya) wrote: > A> > > > On Sep 19, 2017, at 09:51, Josh Paetzel > wrote: > A> > > > New Revision: 323770 > A> > > > URL: https://svnweb.freebsd.org/changeset/base/323770 > A> > > > > A> > > > Log: > A> > > > MFC: 323068 > A> > > > > A> > > > Allow kldload tcpmd5 > A> > > > A> > > Wasn't this reverted on ^/head ? > A> > > A> > Not this one. What was reverted on HEAD was the removal of options > A> > IPSEC from GENERIC. > A> > > A> > The endgoal is options IPSEC and options IPSEC_SUPPORT in GENERIC, > which > A> > will allow someone running GENERIC to kldload tcpmd5. > A> > A> I'll shamelessly steal this thread to ask somewhat related question > that > A> was bothering me since the original botched commit: what is the reason > A> behind IPSEC_SUPPORT option? If it does not cost anything, why not > just > A> optimize it away; if it does imply something more, can you shed some > A> light on why is it needed (and/or might not be)? Thanks, > > The reason is to make loadable ipsec.ko. I actually don't understand > why do we still have IPSEC in GENERIC once it is loadable. Doesn't it > still have performance impact? > > -- > Gleb Smirnoff options IPSEC no longer has a performance impact. gnn@ fixed that. Why IPSEC_SUPPORT can't just get folded in with IPSEC I can't answer. I looked briefly at the code but that didn't tell me anything useful. -- Thanks, Josh Paetzel From owner-svn-src-all@freebsd.org Wed Sep 20 20: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 32C73E20B7E; Wed, 20 Sep 2017 20:07:47 +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 0ED507D6E2; Wed, 20 Sep 2017 20:07:46 +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 v8KK7k7L024656; Wed, 20 Sep 2017 20:07:46 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KK7kkA024654; Wed, 20 Sep 2017 20:07:46 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201709202007.v8KK7kkA024654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 20 Sep 2017 20:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323824 - head/sys/dev/qlxgbe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/qlxgbe X-SVN-Commit-Revision: 323824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:07:47 -0000 Author: davidcs Date: Wed Sep 20 20:07:45 2017 New Revision: 323824 URL: https://svnweb.freebsd.org/changeset/base/323824 Log: 1. ql_hw.c: In ql_hw_send() return EINVAL when TSO framelength exceeds max supported length by HW.(davidcs) 2. ql_os.c: In qla_send() call bus_dmamap_unload before freeing mbuf or recreating dmmamap.(davidcs) In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing mbuf. Submitted by:David.Bachu@netapp.com MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Wed Sep 20 18:31:36 2017 (r323823) +++ head/sys/dev/qlxgbe/ql_hw.c Wed Sep 20 20:07:45 2017 (r323824) @@ -2324,7 +2324,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segment_t *segs, in if (total_length > QLA_MAX_TSO_FRAME_SIZE) { device_printf(dev, "%s: total length exceeds maxlen(%d)\n", __func__, total_length); - return (-1); + return (EINVAL); } eh = mtod(mp, struct ether_vlan_header *); Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Wed Sep 20 18:31:36 2017 (r323823) +++ head/sys/dev/qlxgbe/ql_os.c Wed Sep 20 20:07:45 2017 (r323824) @@ -1287,6 +1287,7 @@ qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32 ha->tx_ring[txr_idx].iscsi_pkt_count++; ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head = m_head; } else { + bus_dmamap_unload(ha->tx_tag, map); if (ret == EINVAL) { if (m_head) m_freem(m_head); @@ -1372,7 +1373,8 @@ qla_fp_taskqueue(void *context, int pending) goto qla_fp_taskqueue_exit; } - while (rx_pkts_left && !ha->stop_rcv) { + while (rx_pkts_left && !ha->stop_rcv && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { rx_pkts_left = ql_rcv_isr(ha, fp->txr_idx, 64); #ifdef QL_ENABLE_ISCSI_TLV @@ -1415,6 +1417,11 @@ qla_fp_taskqueue(void *context, int pending) drbr_advance(ifp, fp->tx_br); } + /* Send a copy of the frame to the BPF listener */ + ETHER_BPF_MTAP(ifp, mp); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; + mp = drbr_peek(ifp, fp->tx_br); } } @@ -1677,16 +1684,24 @@ qla_clear_tx_buf(qla_host_t *ha, qla_tx_buf_t *txb) { QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); - if (txb->m_head && txb->map) { + if (txb->m_head) { + bus_dmamap_sync(ha->tx_tag, txb->map, + BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(ha->tx_tag, txb->map); m_freem(txb->m_head); txb->m_head = NULL; + + bus_dmamap_destroy(ha->tx_tag, txb->map); + txb->map = NULL; } - if (txb->map) + if (txb->map) { + bus_dmamap_unload(ha->tx_tag, txb->map); bus_dmamap_destroy(ha->tx_tag, txb->map); + txb->map = NULL; + } QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); } From owner-svn-src-all@freebsd.org Wed Sep 20 20: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 9248CE22606; Wed, 20 Sep 2017 20:40:50 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51E617E734; Wed, 20 Sep 2017 20:40:50 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KKenKp036972; Wed, 20 Sep 2017 20:40:49 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KKen3M036971; Wed, 20 Sep 2017 20:40:49 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709202040.v8KKen3M036971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 20 Sep 2017 20:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323825 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:40:50 -0000 Author: shurd Date: Wed Sep 20 20:40:49 2017 New Revision: 323825 URL: https://svnweb.freebsd.org/changeset/base/323825 Log: Fix iflib netmap RX RXQ setup for netmap was broken because netmap_rxq_init was getting called before IFDI_INIT - thus we ended up with ring tail pointer being reset to zero. Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12140 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Sep 20 20:07:45 2017 (r323824) +++ head/sys/net/iflib.c Wed Sep 20 20:40:49 2017 (r323825) @@ -2173,10 +2173,6 @@ iflib_init_locked(if_ctx_t ctx) CALLOUT_UNLOCK(txq); iflib_netmap_txq_init(ctx, txq); } - for (i = 0, rxq = ctx->ifc_rxqs; i < sctx->isc_nrxqsets; i++, rxq++) { - MPASS(rxq->ifr_id == i); - iflib_netmap_rxq_init(ctx, rxq); - } #ifdef INVARIANTS i = if_getdrvflags(ifp); #endif @@ -2184,8 +2180,11 @@ iflib_init_locked(if_ctx_t ctx) MPASS(if_getdrvflags(ifp) == i); for (i = 0, rxq = ctx->ifc_rxqs; i < sctx->isc_nrxqsets; i++, rxq++) { /* XXX this should really be done on a per-queue basis */ - if (if_getcapenable(ifp) & IFCAP_NETMAP) + if (if_getcapenable(ifp) & IFCAP_NETMAP) { + MPASS(rxq->ifr_id == i); + iflib_netmap_rxq_init(ctx, rxq); continue; + } for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) { if (iflib_fl_setup(fl)) { device_printf(ctx->ifc_dev, "freelist setup failed - check cluster settings\n"); @@ -2474,14 +2473,6 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) struct mbuf *m, *mh, *mt; ifp = ctx->ifc_ifp; -#ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - u_int work = 0; - if (netmap_rx_irq(ifp, rxq->ifr_id, &work)) - return (FALSE); - } -#endif - mh = mt = NULL; MPASS(budget > 0); rx_pkts = rx_bytes = 0; @@ -3500,7 +3491,7 @@ _task_fn_tx(void *context) #endif if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) return; - if ((ifp->if_capenable & IFCAP_NETMAP)) { + if (if_getcapenable(ifp) & IFCAP_NETMAP) { if (ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false)) netmap_tx_irq(ifp, txq->ift_id); IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id); @@ -3532,7 +3523,16 @@ _task_fn_rx(void *context) DBG_COUNTER_INC(task_fn_rxs); if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; - if ((more = iflib_rxeof(rxq, 16 /* XXX */)) == false) { + more = true; +#ifdef DEV_NETMAP + if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) { + u_int work = 0; + if (netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work)) { + more = false; + } + } +#endif + if (more == false || (more = iflib_rxeof(rxq, 16 /* XXX */)) == false) { if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else { @@ -5106,7 +5106,7 @@ iflib_admin_intr_deferred(if_ctx_t ctx) struct grouptask *gtask; gtask = &ctx->ifc_admin_task; - MPASS(gtask->gt_taskqueue != NULL); + MPASS(gtask != NULL && gtask->gt_taskqueue != NULL); #endif GROUPTASK_ENQUEUE(&ctx->ifc_admin_task); From owner-svn-src-all@freebsd.org Wed Sep 20 20:48: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 88519E22B6D; Wed, 20 Sep 2017 20:48:23 +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 54AE17EE76; Wed, 20 Sep 2017 20:48:23 +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 v8KKmMlX041120; Wed, 20 Sep 2017 20:48:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KKmM94041119; Wed, 20 Sep 2017 20:48:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709202048.v8KKmM94041119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Sep 2017 20:48: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: r323826 - in stable: 10/sys/dev/mly 11/sys/dev/mly X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/dev/mly 11/sys/dev/mly X-SVN-Commit-Revision: 323826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:48:23 -0000 Author: jhb Date: Wed Sep 20 20:48:21 2017 New Revision: 323826 URL: https://svnweb.freebsd.org/changeset/base/323826 Log: MFC 322270: Fix a NULL pointer dereference in mly_user_command(). If mly_user_command fails to allocate a command slot it jumps to an 'out' label used for error handling. The error handling code checks for a data buffer in 'mc->mc_data' to free before checking if 'mc' is NULL. Fix by just returning directly if we fail to allocate a command and only using the 'out' label for subsequent errors when there is actual cleanup to perform. PR: 217747 Reported by: PVS-Studio Modified: stable/11/sys/dev/mly/mly.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/mly/mly.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/dev/mly/mly.c ============================================================================== --- stable/11/sys/dev/mly/mly.c Wed Sep 20 20:40:49 2017 (r323825) +++ stable/11/sys/dev/mly/mly.c Wed Sep 20 20:48:21 2017 (r323826) @@ -2892,8 +2892,7 @@ mly_user_command(struct mly_softc *sc, struct mly_user MLY_LOCK(sc); if (mly_alloc_command(sc, &mc)) { MLY_UNLOCK(sc); - error = ENOMEM; - goto out; /* XXX Linux version will wait for a command */ + return (ENOMEM); /* XXX Linux version will wait for a command */ } MLY_UNLOCK(sc); @@ -2952,11 +2951,9 @@ mly_user_command(struct mly_softc *sc, struct mly_user out: if (mc->mc_data != NULL) free(mc->mc_data, M_DEVBUF); - if (mc != NULL) { - MLY_LOCK(sc); - mly_release_command(mc); - MLY_UNLOCK(sc); - } + MLY_LOCK(sc); + mly_release_command(mc); + MLY_UNLOCK(sc); return(error); } From owner-svn-src-all@freebsd.org Wed Sep 20 20:48: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 2A7F7E22B66; Wed, 20 Sep 2017 20:48:23 +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 ED2177EE74; Wed, 20 Sep 2017 20:48:22 +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 v8KKmMTh041114; Wed, 20 Sep 2017 20:48:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KKmMNG041113; Wed, 20 Sep 2017 20:48:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709202048.v8KKmMNG041113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Sep 2017 20:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323826 - in stable: 10/sys/dev/mly 11/sys/dev/mly X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/dev/mly 11/sys/dev/mly X-SVN-Commit-Revision: 323826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:48:23 -0000 Author: jhb Date: Wed Sep 20 20:48:21 2017 New Revision: 323826 URL: https://svnweb.freebsd.org/changeset/base/323826 Log: MFC 322270: Fix a NULL pointer dereference in mly_user_command(). If mly_user_command fails to allocate a command slot it jumps to an 'out' label used for error handling. The error handling code checks for a data buffer in 'mc->mc_data' to free before checking if 'mc' is NULL. Fix by just returning directly if we fail to allocate a command and only using the 'out' label for subsequent errors when there is actual cleanup to perform. PR: 217747 Reported by: PVS-Studio Modified: stable/10/sys/dev/mly/mly.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/mly/mly.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/dev/mly/mly.c ============================================================================== --- stable/10/sys/dev/mly/mly.c Wed Sep 20 20:40:49 2017 (r323825) +++ stable/10/sys/dev/mly/mly.c Wed Sep 20 20:48:21 2017 (r323826) @@ -2861,8 +2861,7 @@ mly_user_command(struct mly_softc *sc, struct mly_user /* allocate a command */ if (mly_alloc_command(sc, &mc)) { - error = ENOMEM; - goto out; /* XXX Linux version will wait for a command */ + return (ENOMEM); /* XXX Linux version will wait for a command */ } /* handle data size/direction */ @@ -2918,8 +2917,7 @@ mly_user_command(struct mly_softc *sc, struct mly_user out: if (mc->mc_data != NULL) free(mc->mc_data, M_DEVBUF); - if (mc != NULL) - mly_release_command(mc); + mly_release_command(mc); return(error); } From owner-svn-src-all@freebsd.org Wed Sep 20 20:59: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 96DE0E23228; Wed, 20 Sep 2017 20:59:29 +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 652797F4FA; Wed, 20 Sep 2017 20:59:29 +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 v8KKxSIj045338; Wed, 20 Sep 2017 20:59:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KKxS88045337; Wed, 20 Sep 2017 20:59:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709202059.v8KKxS88045337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Sep 2017 20:59: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: r323827 - stable/11/contrib/compiler-rt/lib/builtins X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/contrib/compiler-rt/lib/builtins X-SVN-Commit-Revision: 323827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:59:29 -0000 Author: jhb Date: Wed Sep 20 20:59:28 2017 New Revision: 323827 URL: https://svnweb.freebsd.org/changeset/base/323827 Log: MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32. This fixes infinite recursion in /sbin/init for MIPS N32. Sponsored by: DARPA / AFRL Modified: stable/11/contrib/compiler-rt/lib/builtins/int_lib.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/compiler-rt/lib/builtins/int_lib.h ============================================================================== --- stable/11/contrib/compiler-rt/lib/builtins/int_lib.h Wed Sep 20 20:48:21 2017 (r323826) +++ stable/11/contrib/compiler-rt/lib/builtins/int_lib.h Wed Sep 20 20:59:28 2017 (r323827) @@ -95,12 +95,13 @@ * does not have dedicated bit counting instructions. */ #if defined(__FreeBSD__) && (defined(__sparc64__) || \ - defined(__mips_n64) || defined(__mips_o64) || defined(__riscv__)) + defined(__mips_n32) || defined(__mips_n64) || defined(__mips_o64) || \ + defined(__riscv__)) si_int __clzsi2(si_int); si_int __ctzsi2(si_int); #define __builtin_clz __clzsi2 #define __builtin_ctz __ctzsi2 -#endif /* FreeBSD && (sparc64 || mips_n64 || mips_o64) */ +#endif /* FreeBSD && (sparc64 || mips_n32 || mips_n64 || mips_o64 || riscv) */ COMPILER_RT_ABI si_int __paritysi2(si_int a); COMPILER_RT_ABI si_int __paritydi2(di_int a); From owner-svn-src-all@freebsd.org Wed Sep 20 21:13: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 F17D5E23C99; Wed, 20 Sep 2017 21:13:21 +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 BF8097FF27; Wed, 20 Sep 2017 21:13:21 +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 v8KLDKDL053536; Wed, 20 Sep 2017 21:13:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLDKbx053535; Wed, 20 Sep 2017 21:13:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709202113.v8KLDKbx053535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 20 Sep 2017 21:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323828 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:13:22 -0000 Author: imp Date: Wed Sep 20 21:13:20 2017 New Revision: 323828 URL: https://svnweb.freebsd.org/changeset/base/323828 Log: cam iosched: Use the write queue for BIO_ZONE commands Use the write queue for BIO_ZONE commands so they can't get executed ahead of writes that were sent after them. More generally, since they introduce strong ordering into the list, they need to go to the write queue (which is the only queue that BIO_ORDERED is honored for at the moment). In fact, fix mismatch between queueing and dequeueing code by changing this to queue all non-reads (and non-trims) to the write queue. As a side effect this prevents the kernel message: kernel: Found bio_cmd = 0x9 which cam_iosched_next_bio() emits when finding commands other than BIO_READ in the read queue. PR: 221973 Obtained from: ElectroBSD Submitted by: Fabian Keil Differential Revision: https://reviews.freebsd.org/D12353 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Wed Sep 20 20:59:28 2017 (r323827) +++ head/sys/cam/cam_iosched.c Wed Sep 20 21:13:20 2017 (r323828) @@ -1345,8 +1345,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc, #endif } #ifdef CAM_IOSCHED_DYNAMIC - else if (do_dynamic_iosched && - (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) { + else if (do_dynamic_iosched && (bp->bio_cmd != BIO_READ)) { if (cam_iosched_sort_queue(isc)) bioq_disksort(&isc->write_queue, bp); else From owner-svn-src-all@freebsd.org Wed Sep 20 21:19: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 89057E24138; Wed, 20 Sep 2017 21:19:55 +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 5913680235; Wed, 20 Sep 2017 21:19:55 +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 v8KLJsFw053794; Wed, 20 Sep 2017 21:19:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLJsBR053793; Wed, 20 Sep 2017 21:19:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709202119.v8KLJsBR053793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 20 Sep 2017 21:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323829 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:19:55 -0000 Author: imp Date: Wed Sep 20 21:19:53 2017 New Revision: 323829 URL: https://svnweb.freebsd.org/changeset/base/323829 Log: cam iosched: Add a handler for the quanta sysctl to enforce valid values Invalid values can result in devision-by-zero panics or other undefined behaviour so lets not allow them. PR: 221957 Obtained from: ElectroBSD Submitted by: Fabian Keil Differential Revision: https://reviews.freebsd.org/D12351 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Wed Sep 20 21:13:20 2017 (r323828) +++ head/sys/cam/cam_iosched.c Wed Sep 20 21:19:53 2017 (r323829) @@ -883,6 +883,27 @@ cam_iosched_sysctl_latencies(SYSCTL_HANDLER_ARGS) return (error); } +static int +cam_iosched_quanta_sysctl(SYSCTL_HANDLER_ARGS) +{ + int *quanta; + int error, value; + + quanta = (unsigned *)arg1; + value = *quanta; + + error = sysctl_handle_int(oidp, (int *)&value, 0, req); + if ((error != 0) || (req->newptr == NULL)) + return (error); + + if (value < 1 || value > hz) + return (EINVAL); + + *quanta = value; + + return (0); +} + static void cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stats *ios, char *name) { @@ -1104,9 +1125,9 @@ void cam_iosched_sysctl_init(struct cam_iosched_softc &isc->read_bias, 100, "How biased towards read should we be independent of limits"); - SYSCTL_ADD_INT(ctx, n, - OID_AUTO, "quanta", CTLFLAG_RW, - &isc->quanta, 200, + SYSCTL_ADD_PROC(ctx, n, + OID_AUTO, "quanta", CTLTYPE_UINT | CTLFLAG_RW, + &isc->quanta, 0, cam_iosched_quanta_sysctl, "I", "How many quanta per second do we slice the I/O up into"); SYSCTL_ADD_INT(ctx, n, From owner-svn-src-all@freebsd.org Wed Sep 20 21:22:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 018CCE24432; Wed, 20 Sep 2017 21:22:22 +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 CED4C806FD; Wed, 20 Sep 2017 21:22:21 +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 v8KLMK1u057720; Wed, 20 Sep 2017 21:22:20 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLMKia057717; Wed, 20 Sep 2017 21:22:20 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709202122.v8KLMKia057717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 20 Sep 2017 21:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323830 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/ixgbe X-SVN-Commit-Revision: 323830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:22:22 -0000 Author: marius Date: Wed Sep 20 21:22:20 2017 New Revision: 323830 URL: https://svnweb.freebsd.org/changeset/base/323830 Log: Unbreak netmap(4) support in ixgbe(4) after r315333: - Both ixgbe_netmap.c and ixv_netmap.c assumed a netmap(4) driver newer than what's actually in stable/10. - Additionally, at the bottom line ixv_netmap.c did exactly the same as ixgbe_netmap.c, i. e. used IXGBE_TDH() as appropriate for PFs only instead of IXGBE_VFTDH() and tried to configure CRC stripping although the corresponding registers aren't available to VFs in the first place. With these changes, the netmap(4) support in ixgbe(4) is in line again with the code in sys/dev/netmap/ixgbe_netmap.h as of r295008. Breakage reported by: Slawa Olhovchenkov Just like r315333 that never existed in head, this is a direct commit to stable/10. However, ixgbe(4) in head has a related bug in that it assumes a netmap(4) driver API older than what's in head and also does the wrong things for VFs as it uses the PF-only ixgbe_netmap.c for both PFs and VFs in the first place. Modified: stable/10/sys/dev/ixgbe/ixgbe_netmap.c stable/10/sys/dev/ixgbe/ixv_netmap.c stable/10/sys/dev/ixgbe/ixv_netmap.h Modified: stable/10/sys/dev/ixgbe/ixgbe_netmap.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe_netmap.c Wed Sep 20 21:19:53 2017 (r323829) +++ stable/10/sys/dev/ixgbe/ixgbe_netmap.c Wed Sep 20 21:22:20 2017 (r323830) @@ -316,6 +316,8 @@ ixgbe_netmap_txsync(struct netmap_kring *kring, int fl } } + nm_txsync_finalize(kring); + return 0; } @@ -343,7 +345,7 @@ ixgbe_netmap_rxsync(struct netmap_kring *kring, int fl u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = kring->rhead; + u_int const head = nm_rxsync_prologue(kring); int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -449,6 +451,9 @@ ixgbe_netmap_rxsync(struct netmap_kring *kring, int fl nic_i = nm_prev(nic_i, lim); IXGBE_WRITE_REG(&adapter->hw, rxr->tail, nic_i); } + + /* tell userspace that there might be new packets */ + nm_rxsync_finalize(kring); return 0; Modified: stable/10/sys/dev/ixgbe/ixv_netmap.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixv_netmap.c Wed Sep 20 21:19:53 2017 (r323829) +++ stable/10/sys/dev/ixgbe/ixv_netmap.c Wed Sep 20 21:22:20 2017 (r323830) @@ -60,7 +60,7 @@ /* * $FreeBSD$ * - * netmap support for: ixgbe + * netmap support for: ixv * * This file is meant to be a reference on how to implement * netmap support for a network driver. @@ -83,63 +83,17 @@ /* * device-specific sysctl variables: * - * ixv_crcstrip: 0: keep CRC in rx frames (default), 1: strip it. - * During regular operations the CRC is stripped, but on some - * hardware reception of frames not multiple of 64 is slower, - * so using crcstrip=0 helps in benchmarks. - * * ixv_rx_miss, ixv_rx_miss_bufs: * count packets that might be missed due to lost interrupts. */ SYSCTL_DECL(_dev_netmap); static int ixv_rx_miss, ixv_rx_miss_bufs; -int ixv_crcstrip; -SYSCTL_INT(_dev_netmap, OID_AUTO, ixv_crcstrip, - CTLFLAG_RW, &ixv_crcstrip, 0, "strip CRC on rx frames"); SYSCTL_INT(_dev_netmap, OID_AUTO, ixv_rx_miss, CTLFLAG_RW, &ixv_rx_miss, 0, "potentially missed rx intr"); SYSCTL_INT(_dev_netmap, OID_AUTO, ixv_rx_miss_bufs, CTLFLAG_RW, &ixv_rx_miss_bufs, 0, "potentially missed rx intr bufs"); -static void -set_crcstrip(struct ixgbe_hw *hw, int onoff) -{ - /* crc stripping is set in two places: - * IXGBE_HLREG0 (modified on init_locked and hw reset) - * IXGBE_RDRXCTL (set by the original driver in - * ixgbe_setup_hw_rsc() called in init_locked. - * We disable the setting when netmap is compiled in). - * We update the values here, but also in ixgbe.c because - * init_locked sometimes is called outside our control. - */ - uint32_t hl, rxc; - - hl = IXGBE_READ_REG(hw, IXGBE_HLREG0); - rxc = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); - if (netmap_verbose) - D("%s read HLREG 0x%x rxc 0x%x", - onoff ? "enter" : "exit", hl, rxc); - /* hw requirements ... */ - rxc &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; - rxc |= IXGBE_RDRXCTL_RSCACKC; - if (onoff && !ixv_crcstrip) { - /* keep the crc. Fast rx */ - hl &= ~IXGBE_HLREG0_RXCRCSTRP; - rxc &= ~IXGBE_RDRXCTL_CRCSTRIP; - } else { - /* reset default mode */ - hl |= IXGBE_HLREG0_RXCRCSTRP; - rxc |= IXGBE_RDRXCTL_CRCSTRIP; - } - if (netmap_verbose) - D("%s write HLREG 0x%x rxc 0x%x", - onoff ? "enter" : "exit", hl, rxc); - IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hl); - IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rxc); -} - - /* * Register/unregister. We are already under netmap lock. * Only called on the first register or the last unregister. @@ -153,7 +107,6 @@ ixv_netmap_reg(struct netmap_adapter *na, int onoff) IXGBE_CORE_LOCK(adapter); adapter->stop_locked(adapter); - set_crcstrip(&adapter->hw, onoff); /* enable or disable flags and callbacks in na and ifp */ if (onoff) { nm_set_native_flags(na); @@ -161,7 +114,6 @@ ixv_netmap_reg(struct netmap_adapter *na, int onoff) nm_clear_native_flags(na); } adapter->init_locked(adapter); /* also enables intr */ - set_crcstrip(&adapter->hw, onoff); // XXX why twice ? IXGBE_CORE_UNLOCK(adapter); return (ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1); } @@ -338,7 +290,7 @@ ixv_netmap_txsync(struct netmap_kring *kring, int flag * REPORT_STATUS in a few slots so TDH is the only * good way. */ - nic_i = IXGBE_READ_REG(&adapter->hw, IXGBE_TDH(kring->ring_id)); + nic_i = IXGBE_READ_REG(&adapter->hw, IXGBE_VFTDH(kring->ring_id)); if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("TDH wrap %d", nic_i); nic_i -= kring->nkr_num_slots; @@ -350,6 +302,8 @@ ixv_netmap_txsync(struct netmap_kring *kring, int flag } } + nm_txsync_finalize(kring); + return 0; } @@ -377,7 +331,7 @@ ixv_netmap_rxsync(struct netmap_kring *kring, int flag u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = kring->rhead; + u_int const head = nm_rxsync_prologue(kring); int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -407,7 +361,7 @@ ixv_netmap_rxsync(struct netmap_kring *kring, int flag * rxr->next_to_check is set to 0 on a ring reinit */ if (netmap_no_pendintr || force_update) { - int crclen = (ixv_crcstrip) ? 0 : 4; + int crclen = 0; uint16_t slot_flags = kring->nkr_slot_flags; nic_i = rxr->next_to_check; // or also k2n(kring->nr_hwtail) @@ -483,6 +437,9 @@ ixv_netmap_rxsync(struct netmap_kring *kring, int flag nic_i = nm_prev(nic_i, lim); IXGBE_WRITE_REG(&adapter->hw, rxr->tail, nic_i); } + + /* tell userspace that there might be new packets */ + nm_rxsync_finalize(kring); return 0; Modified: stable/10/sys/dev/ixgbe/ixv_netmap.h ============================================================================== --- stable/10/sys/dev/ixgbe/ixv_netmap.h Wed Sep 20 21:19:53 2017 (r323829) +++ stable/10/sys/dev/ixgbe/ixv_netmap.h Wed Sep 20 21:22:20 2017 (r323830) @@ -42,12 +42,10 @@ #include #include -extern int ixv_crcstrip; - /* - * ixgbe_netmap.c contains functions for netmap + * ixv_netmap.c contains functions for netmap * support that extend the standard driver. See additional - * comments in ixgbe_netmap.c. + * comments in ixv_netmap.c. */ void ixv_netmap_attach(struct adapter *adapter); From owner-svn-src-all@freebsd.org Wed Sep 20 21:25: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 CF259E2477B; Wed, 20 Sep 2017 21:25:57 +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 9D34D809A5; Wed, 20 Sep 2017 21:25:57 +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 v8KLPuhk057885; Wed, 20 Sep 2017 21:25:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLPuZG057884; Wed, 20 Sep 2017 21:25:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709202125.v8KLPuZG057884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 20 Sep 2017 21:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323831 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:25:57 -0000 Author: imp Date: Wed Sep 20 21:25:56 2017 New Revision: 323831 URL: https://svnweb.freebsd.org/changeset/base/323831 Log: cam iosched: Schedule cam_iosched_ticker() quanta times per second Previously callout_reset() was called with a "ticks" value that was off by one. As a result cam_iosched_ticker() was called a bit too frequently: On systems with hz=1000 a quanta value of 200 resulted in ~250 calls and a value of 100 in ~111 calls. For the "queue_depth" and "bandwidth" limiters the difference doesn't matter but the "iops" limiter depends on the scheduling to enforce the correct maximum. PR: 221956 Obtained from: ElectroBSD Submitted by: Fabian Keil Differential Revision: https://reviews.freebsd.org/D12350 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Wed Sep 20 21:22:20 2017 (r323830) +++ head/sys/cam/cam_iosched.c Wed Sep 20 21:25:56 2017 (r323831) @@ -533,7 +533,7 @@ cam_iosched_ticker(void *arg) sbintime_t now, delta; int pending; - callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); + callout_reset(&isc->ticker, hz / isc->quanta, cam_iosched_ticker, isc); now = sbinuptime(); delta = now - isc->last_time; @@ -798,7 +798,7 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLER_ARGS) return error; } /* Note: disk load averate requires ticker to be always running */ - callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); + callout_reset(&isc->ticker, hz / isc->quanta, cam_iosched_ticker, isc); isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; cam_periph_unlock(isc->periph); @@ -1055,7 +1055,7 @@ cam_iosched_init(struct cam_iosched_softc **iscp, stru callout_init_mtx(&(*iscp)->ticker, cam_periph_mtx(periph), 0); (*iscp)->periph = periph; cam_iosched_cl_init(&(*iscp)->cl, *iscp); - callout_reset(&(*iscp)->ticker, hz / (*iscp)->quanta - 1, cam_iosched_ticker, *iscp); + callout_reset(&(*iscp)->ticker, hz / (*iscp)->quanta, cam_iosched_ticker, *iscp); (*iscp)->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; } #endif From owner-svn-src-all@freebsd.org Wed Sep 20 21:26: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 9F687E247B5; Wed, 20 Sep 2017 21:26:02 +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 6A270809C4; Wed, 20 Sep 2017 21:26:02 +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 v8KLQ1D7057954; Wed, 20 Sep 2017 21:26:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLQ1nP057953; Wed, 20 Sep 2017 21:26:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709202126.v8KLQ1nP057953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 20 Sep 2017 21:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323832 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:26:02 -0000 Author: imp Date: Wed Sep 20 21:26:01 2017 New Revision: 323832 URL: https://svnweb.freebsd.org/changeset/base/323832 Log: cam iosched: Call cam_iosched_limiter_init() after ios->current is set to the default Previously ios->current was set to 0 until the first cam_iosched_cl_maybe_steer() call. PR: 221954 Obtained from: ElectroBSD Submitted by: Fabian Keil Differential Revision: https://reviews.freebsd.org/D12349 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Wed Sep 20 21:25:56 2017 (r323831) +++ head/sys/cam/cam_iosched.c Wed Sep 20 21:26:01 2017 (r323832) @@ -750,9 +750,8 @@ cam_iosched_iop_stats_init(struct cam_iosched_softc *i { ios->limiter = none; - cam_iosched_limiter_init(ios); ios->in = 0; - ios->max = 300000; + ios->max = ios->current = 300000; ios->min = 1; ios->out = 0; ios->pending = 0; @@ -761,6 +760,7 @@ cam_iosched_iop_stats_init(struct cam_iosched_softc *i ios->ema = 0; ios->emvar = 0; ios->softc = isc; + cam_iosched_limiter_init(ios); } static int From owner-svn-src-all@freebsd.org Wed Sep 20 21:29: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 C7E06E24AB6; Wed, 20 Sep 2017 21:29:55 +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 A378880D7B; Wed, 20 Sep 2017 21:29:55 +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 v8KLTs7h058149; Wed, 20 Sep 2017 21:29:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLTsF1058147; Wed, 20 Sep 2017 21:29:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709202129.v8KLTsF1058147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 20 Sep 2017 21:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323833 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:29:55 -0000 Author: tuexen Date: Wed Sep 20 21:29:54 2017 New Revision: 323833 URL: https://svnweb.freebsd.org/changeset/base/323833 Log: Protect the address workqueue timer by a mutex. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Sep 20 21:26:01 2017 (r323832) +++ head/sys/netinet/sctp_pcb.c Wed Sep 20 21:29:54 2017 (r323833) @@ -709,12 +709,11 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 SCTP_WQ_ADDR_LOCK(); LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr); - SCTP_WQ_ADDR_UNLOCK(); - sctp_timer_start(SCTP_TIMER_TYPE_ADDR_WQ, (struct sctp_inpcb *)NULL, (struct sctp_tcb *)NULL, (struct sctp_nets *)NULL); + SCTP_WQ_ADDR_UNLOCK(); } else { /* it's ready for use */ sctp_ifap->localifa_flags &= ~SCTP_ADDR_DEFER_USE; @@ -821,12 +820,11 @@ out_now: * the newest first :-0 */ LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr); - SCTP_WQ_ADDR_UNLOCK(); - sctp_timer_start(SCTP_TIMER_TYPE_ADDR_WQ, (struct sctp_inpcb *)NULL, (struct sctp_tcb *)NULL, (struct sctp_nets *)NULL); + SCTP_WQ_ADDR_UNLOCK(); } return; } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Sep 20 21:26:01 2017 (r323832) +++ head/sys/netinet/sctputil.c Wed Sep 20 21:29:54 2017 (r323833) @@ -1462,13 +1462,11 @@ sctp_handle_addr_wq(void) LIST_INIT(&asc->list_of_work); asc->cnt = 0; - SCTP_WQ_ADDR_LOCK(); LIST_FOREACH_SAFE(wi, &SCTP_BASE_INFO(addr_wq), sctp_nxt_addr, nwi) { LIST_REMOVE(wi, sctp_nxt_addr); LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr); asc->cnt++; } - SCTP_WQ_ADDR_UNLOCK(); if (asc->cnt == 0) { SCTP_FREE(asc, SCTP_M_ASC_IT); @@ -1492,11 +1490,9 @@ sctp_handle_addr_wq(void) if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) { sctp_asconf_iterator_end(asc, 0); } else { - SCTP_WQ_ADDR_LOCK(); LIST_FOREACH(wi, &asc->list_of_work, sctp_nxt_addr) { LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr); } - SCTP_WQ_ADDR_UNLOCK(); SCTP_FREE(asc, SCTP_M_ASC_IT); } } @@ -1565,8 +1561,7 @@ sctp_timeout_handler(void *t) (tmr->type != SCTP_TIMER_TYPE_SHUTDOWN) && (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNACK) && (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && - (tmr->type != SCTP_TIMER_TYPE_ASOCKILL)) - ) { + (tmr->type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); CURVNET_RESTORE(); return; @@ -1612,6 +1607,12 @@ sctp_timeout_handler(void *t) CURVNET_RESTORE(); return; } + } else if (inp != NULL) { + if (type != SCTP_TIMER_TYPE_INPKILL) { + SCTP_INP_WLOCK(inp); + } + } else { + SCTP_WQ_ADDR_LOCK(); } /* record in stopped what t-o occurred */ tmr->stopped_from = type; @@ -1759,7 +1760,6 @@ sctp_timeout_handler(void *t) } SCTP_STAT_INCR(sctps_timosecret); (void)SCTP_GETTIME_TIMEVAL(&tv); - SCTP_INP_WLOCK(inp); inp->sctp_ep.time_of_secret_change = tv.tv_sec; inp->sctp_ep.last_secret_number = inp->sctp_ep.current_secret_number; @@ -1773,7 +1773,6 @@ sctp_timeout_handler(void *t) inp->sctp_ep.secret_key[secret][i] = sctp_select_initial_TSN(&inp->sctp_ep); } - SCTP_INP_WUNLOCK(inp); sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, stcb, net); } did_output = 0; @@ -1921,7 +1920,12 @@ sctp_timeout_handler(void *t) get_out: if (stcb) { SCTP_TCB_UNLOCK(stcb); + } else if (inp != NULL) { + SCTP_INP_WUNLOCK(inp); + } else { + SCTP_WQ_ADDR_UNLOCK(); } + out_decr: if (inp) { SCTP_INP_DECR_REF(inp); @@ -6146,11 +6150,11 @@ sctp_dynamic_set_primary(struct sockaddr *sa, uint32_t * newest first :-0 */ LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr); - SCTP_WQ_ADDR_UNLOCK(); sctp_timer_start(SCTP_TIMER_TYPE_ADDR_WQ, (struct sctp_inpcb *)NULL, (struct sctp_tcb *)NULL, (struct sctp_nets *)NULL); + SCTP_WQ_ADDR_UNLOCK(); return (0); } From owner-svn-src-all@freebsd.org Wed Sep 20 21:42: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 67B33E253A1; Wed, 20 Sep 2017 21:42:26 +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 35F3B8160A; Wed, 20 Sep 2017 21:42: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 v8KLgPV2066014; Wed, 20 Sep 2017 21:42:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLgPba066013; Wed, 20 Sep 2017 21:42:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709202142.v8KLgPba066013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 20 Sep 2017 21:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323834 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 323834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:42:26 -0000 Author: imp Date: Wed Sep 20 21:42:25 2017 New Revision: 323834 URL: https://svnweb.freebsd.org/changeset/base/323834 Log: Fix queue depth for nda. 1/4 of the number of queues times queue entries is too limiting. It works up to about 4k IOPS / 3.0GB/s for hardware that can do 4.4k/3.2GB/s with nvd. 3/4 works better, though it highlights issues in the fairness of nda's choice of TRIM vs READ. That will be fixed separately. Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Wed Sep 20 21:29:54 2017 (r323833) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Sep 20 21:42:25 2017 (r323834) @@ -151,7 +151,7 @@ nvme_ctrlr_construct_io_qpairs(struct nvme_controller * not a hard limit and will need to be revisitted when the upper layers * of the storage system grows multi-queue support. */ - ctrlr->max_hw_pend_io = num_trackers * ctrlr->num_io_queues / 4; + ctrlr->max_hw_pend_io = num_trackers * ctrlr->num_io_queues * 3 / 4; /* * This was calculated previously when setting up interrupts, but From owner-svn-src-all@freebsd.org Wed Sep 20 21:51: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 777AFE257B4; Wed, 20 Sep 2017 21:51:11 +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 46AA181A34; Wed, 20 Sep 2017 21:51:11 +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 v8KLpA8N068507; Wed, 20 Sep 2017 21:51:10 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KLpAeJ068505; Wed, 20 Sep 2017 21:51:10 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709202151.v8KLpAeJ068505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 20 Sep 2017 21:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323835 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/ixgbe X-SVN-Commit-Revision: 323835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 21:51:11 -0000 Author: marius Date: Wed Sep 20 21:51:10 2017 New Revision: 323835 URL: https://svnweb.freebsd.org/changeset/base/323835 Log: MFC: r320916 Reset unsupported SFP tuneable back to original entry name. Modified: stable/10/sys/dev/ixgbe/if_ix.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ix.c Wed Sep 20 21:42:25 2017 (r323834) +++ stable/10/sys/dev/ixgbe/if_ix.c Wed Sep 20 21:51:10 2017 (r323835) @@ -338,7 +338,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgb */ static int allow_unsupported_sfp = FALSE; TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp); -SYSCTL_INT(_hw_ix, OID_AUTO, allow_unsupported_sfp, CTLFLAG_RDTUN, +SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN, &allow_unsupported_sfp, 0, "Allow unsupported SFP modules...use at your own risk"); From owner-svn-src-all@freebsd.org Wed Sep 20 22:00: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 57C81E25C1B; Wed, 20 Sep 2017 22:00:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3116281D4D; Wed, 20 Sep 2017 22:00:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KM07VL070511; Wed, 20 Sep 2017 22:00:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KM06ou070506; Wed, 20 Sep 2017 22:00:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201709202200.v8KM06ou070506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 20 Sep 2017 22:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323836 - in head/sys/netpfil/ipfw: . nat64 nptv6 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys/netpfil/ipfw: . nat64 nptv6 X-SVN-Commit-Revision: 323836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 22:00:08 -0000 Author: ae Date: Wed Sep 20 22:00:06 2017 New Revision: 323836 URL: https://svnweb.freebsd.org/changeset/base/323836 Log: Do not acquire IPFW_WLOCK when a named object is created and destroyed. Acquiring of IPFW_WLOCK is requried for cases when we are going to change some data that can be accessed during processing of packets flow. When we create new named object, there are not yet any rules, that references it, thus holding IPFW_UH_WLOCK is enough to safely update needed structures. When we destroy an object, we do this only when its reference counter becomes zero. And it is safe to not acquire IPFW_WLOCK, because noone references it. The another case is when we failed to finish some action and thus we are doing rollback and destroying an object, in this case it is still not referenced by rules and no need to acquire IPFW_WLOCK. This also fixes panic with INVARIANTS due to recursive IPFW_WLOCK acquiring. MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_table.c head/sys/netpfil/ipfw/nat64/nat64lsn_control.c head/sys/netpfil/ipfw/nat64/nat64stl_control.c head/sys/netpfil/ipfw/nptv6/nptv6.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Sep 20 21:51:10 2017 (r323835) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Sep 20 22:00:06 2017 (r323836) @@ -418,9 +418,7 @@ dyn_create(struct ip_fw_chain *ch, struct tid_info *ti return (ENOSPC); } ipfw_objhash_add(ni, &obj->no); - IPFW_WLOCK(ch); SRV_OBJECT(ch, obj->no.kidx) = obj; - IPFW_WUNLOCK(ch); obj->no.refcnt++; *pkidx = obj->no.kidx; IPFW_UH_WUNLOCK(ch); @@ -440,10 +438,8 @@ dyn_destroy(struct ip_fw_chain *ch, struct named_objec no->name, no->etlv, no->kidx, no->refcnt)); DYN_DEBUG("kidx %d", no->kidx); - IPFW_WLOCK(ch); obj = SRV_OBJECT(ch, no->kidx); SRV_OBJECT(ch, no->kidx) = NULL; - IPFW_WUNLOCK(ch); ipfw_objhash_del(CHAIN_TO_SRV(ch), no); ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), no->kidx); Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Wed Sep 20 21:51:10 2017 (r323835) +++ head/sys/netpfil/ipfw/ip_fw_table.c Wed Sep 20 22:00:06 2017 (r323836) @@ -1925,9 +1925,7 @@ create_table_internal(struct ip_fw_chain *ch, struct t tc->no.kidx = kidx; tc->no.etlv = IPFW_TLV_TBL_NAME; - IPFW_WLOCK(ch); link_table(ch, tc); - IPFW_WUNLOCK(ch); } if (compat != 0) @@ -3229,7 +3227,6 @@ link_table(struct ip_fw_chain *ch, struct table_config uint16_t kidx; IPFW_UH_WLOCK_ASSERT(ch); - IPFW_WLOCK_ASSERT(ch); ni = CHAIN_TO_NI(ch); kidx = tc->no.kidx; Modified: head/sys/netpfil/ipfw/nat64/nat64lsn_control.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64lsn_control.c Wed Sep 20 21:51:10 2017 (r323835) +++ head/sys/netpfil/ipfw/nat64/nat64lsn_control.c Wed Sep 20 22:00:06 2017 (r323836) @@ -208,10 +208,7 @@ nat64lsn_create(struct ip_fw_chain *ch, ip_fw3_opheade ipfw_objhash_add(CHAIN_TO_SRV(ch), &cfg->no); /* Okay, let's link data */ - IPFW_WLOCK(ch); SRV_OBJECT(ch, cfg->no.kidx) = cfg; - IPFW_WUNLOCK(ch); - nat64lsn_start_instance(cfg); IPFW_UH_WUNLOCK(ch); @@ -259,10 +256,7 @@ nat64lsn_destroy(struct ip_fw_chain *ch, ip_fw3_ophead return (EBUSY); } - IPFW_WLOCK(ch); SRV_OBJECT(ch, cfg->no.kidx) = NULL; - IPFW_WUNLOCK(ch); - nat64lsn_detach_config(ch, cfg); IPFW_UH_WUNLOCK(ch); Modified: head/sys/netpfil/ipfw/nat64/nat64stl_control.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64stl_control.c Wed Sep 20 21:51:10 2017 (r323835) +++ head/sys/netpfil/ipfw/nat64/nat64stl_control.c Wed Sep 20 22:00:06 2017 (r323836) @@ -220,10 +220,7 @@ nat64stl_create(struct ip_fw_chain *ch, ip_fw3_opheade error = nat64stl_create_internal(ch, cfg, uc); if (error == 0) { /* Okay, let's link data */ - IPFW_WLOCK(ch); SRV_OBJECT(ch, cfg->no.kidx) = cfg; - IPFW_WUNLOCK(ch); - IPFW_UH_WUNLOCK(ch); return (0); } @@ -342,10 +339,7 @@ nat64stl_destroy(struct ip_fw_chain *ch, ip_fw3_ophead return (EBUSY); } - IPFW_WLOCK(ch); SRV_OBJECT(ch, cfg->no.kidx) = NULL; - IPFW_WUNLOCK(ch); - nat64stl_detach_config(ch, cfg); IPFW_UH_WUNLOCK(ch); Modified: head/sys/netpfil/ipfw/nptv6/nptv6.c ============================================================================== --- head/sys/netpfil/ipfw/nptv6/nptv6.c Wed Sep 20 21:51:10 2017 (r323835) +++ head/sys/netpfil/ipfw/nptv6/nptv6.c Wed Sep 20 22:00:06 2017 (r323836) @@ -560,9 +560,7 @@ nptv6_create(struct ip_fw_chain *ch, ip_fw3_opheader * return (ENOSPC); } ipfw_objhash_add(ni, &cfg->no); - IPFW_WLOCK(ch); SRV_OBJECT(ch, cfg->no.kidx) = cfg; - IPFW_WUNLOCK(ch); IPFW_UH_WUNLOCK(ch); return (0); } @@ -599,10 +597,7 @@ nptv6_destroy(struct ip_fw_chain *ch, ip_fw3_opheader return (EBUSY); } - IPFW_WLOCK(ch); SRV_OBJECT(ch, cfg->no.kidx) = NULL; - IPFW_WUNLOCK(ch); - ipfw_objhash_del(CHAIN_TO_SRV(ch), &cfg->no); ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx); IPFW_UH_WUNLOCK(ch); From owner-svn-src-all@freebsd.org Wed Sep 20 22:11: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 DF05BE2620E; Wed, 20 Sep 2017 22:11:02 +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 AC028823CA; Wed, 20 Sep 2017 22:11:02 +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 v8KMB1vw077627; Wed, 20 Sep 2017 22:11:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KMB13q077626; Wed, 20 Sep 2017 22:11:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709202211.v8KMB13q077626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 20 Sep 2017 22:11: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: r323837 - stable/11/sys/modules X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/modules X-SVN-Commit-Revision: 323837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 22:11:03 -0000 Author: emaste Date: Wed Sep 20 22:11:01 2017 New Revision: 323837 URL: https://svnweb.freebsd.org/changeset/base/323837 Log: MFC r323539: qlnx: exclude if WITHOUT_SOURCELESS_UCODE set PR: 222277 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Wed Sep 20 22:00:06 2017 (r323836) +++ stable/11/sys/modules/Makefile Wed Sep 20 22:11:01 2017 (r323837) @@ -715,8 +715,8 @@ _qlxge= qlxge _qlxgb= qlxgb .if ${MK_SOURCELESS_UCODE} != "no" _qlxgbe= qlxgbe -.endif _qlnx= qlnx +.endif _sfxge= sfxge .if ${MK_BHYVE} != "no" || defined(ALL_MODULES) From owner-svn-src-all@freebsd.org Wed Sep 20 22:14: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 9525BE26535; Wed, 20 Sep 2017 22:14:52 +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 70CFC826BB; Wed, 20 Sep 2017 22:14:52 +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 v8KMEp22078503; Wed, 20 Sep 2017 22:14:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KMEpno078499; Wed, 20 Sep 2017 22:14:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709202214.v8KMEpno078499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 20 Sep 2017 22:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323838 - releng/10.4/sys/dev/ixgbe X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/sys/dev/ixgbe X-SVN-Commit-Revision: 323838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 22:14:52 -0000 Author: marius Date: Wed Sep 20 22:14:50 2017 New Revision: 323838 URL: https://svnweb.freebsd.org/changeset/base/323838 Log: MF10: r323830 Unbreak netmap(4) support in ixgbe(4) after r315333: - Both ixgbe_netmap.c and ixv_netmap.c assumed a netmap(4) driver newer than what's actually in stable/10. - Additionally, at the bottom line ixv_netmap.c did exactly the same as ixgbe_netmap.c, i. e. used IXGBE_TDH() as appropriate for PFs only instead of IXGBE_VFTDH() and tried to configure CRC stripping although the corresponding registers aren't available to VFs in the first place. With these changes, the netmap(4) support in ixgbe(4) is in line again with the code in sys/dev/netmap/ixgbe_netmap.h as of r295008. Breakage reported by: Slawa Olhovchenkov Just like r315333 that never existed in head, this is a direct commit to stable/10. However, ixgbe(4) in head has a related bug in that it assumes a netmap(4) driver API older than what's in head and also does the wrong things for VFs as it uses the PF-only ixgbe_netmap.c for both PFs and VFs in the first place. MF10: r323835, MFC: r320916 Reset unsupported SFP tuneable back to original entry name. Approved by: re (gjb) Modified: releng/10.4/sys/dev/ixgbe/if_ix.c releng/10.4/sys/dev/ixgbe/ixgbe_netmap.c releng/10.4/sys/dev/ixgbe/ixv_netmap.c releng/10.4/sys/dev/ixgbe/ixv_netmap.h Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/sys/dev/ixgbe/if_ix.c ============================================================================== --- releng/10.4/sys/dev/ixgbe/if_ix.c Wed Sep 20 22:11:01 2017 (r323837) +++ releng/10.4/sys/dev/ixgbe/if_ix.c Wed Sep 20 22:14:50 2017 (r323838) @@ -338,7 +338,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgb */ static int allow_unsupported_sfp = FALSE; TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp); -SYSCTL_INT(_hw_ix, OID_AUTO, allow_unsupported_sfp, CTLFLAG_RDTUN, +SYSCTL_INT(_hw_ix, OID_AUTO, unsupported_sfp, CTLFLAG_RDTUN, &allow_unsupported_sfp, 0, "Allow unsupported SFP modules...use at your own risk"); Modified: releng/10.4/sys/dev/ixgbe/ixgbe_netmap.c ============================================================================== --- releng/10.4/sys/dev/ixgbe/ixgbe_netmap.c Wed Sep 20 22:11:01 2017 (r323837) +++ releng/10.4/sys/dev/ixgbe/ixgbe_netmap.c Wed Sep 20 22:14:50 2017 (r323838) @@ -316,6 +316,8 @@ ixgbe_netmap_txsync(struct netmap_kring *kring, int fl } } + nm_txsync_finalize(kring); + return 0; } @@ -343,7 +345,7 @@ ixgbe_netmap_rxsync(struct netmap_kring *kring, int fl u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = kring->rhead; + u_int const head = nm_rxsync_prologue(kring); int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -449,6 +451,9 @@ ixgbe_netmap_rxsync(struct netmap_kring *kring, int fl nic_i = nm_prev(nic_i, lim); IXGBE_WRITE_REG(&adapter->hw, rxr->tail, nic_i); } + + /* tell userspace that there might be new packets */ + nm_rxsync_finalize(kring); return 0; Modified: releng/10.4/sys/dev/ixgbe/ixv_netmap.c ============================================================================== --- releng/10.4/sys/dev/ixgbe/ixv_netmap.c Wed Sep 20 22:11:01 2017 (r323837) +++ releng/10.4/sys/dev/ixgbe/ixv_netmap.c Wed Sep 20 22:14:50 2017 (r323838) @@ -60,7 +60,7 @@ /* * $FreeBSD$ * - * netmap support for: ixgbe + * netmap support for: ixv * * This file is meant to be a reference on how to implement * netmap support for a network driver. @@ -83,63 +83,17 @@ /* * device-specific sysctl variables: * - * ixv_crcstrip: 0: keep CRC in rx frames (default), 1: strip it. - * During regular operations the CRC is stripped, but on some - * hardware reception of frames not multiple of 64 is slower, - * so using crcstrip=0 helps in benchmarks. - * * ixv_rx_miss, ixv_rx_miss_bufs: * count packets that might be missed due to lost interrupts. */ SYSCTL_DECL(_dev_netmap); static int ixv_rx_miss, ixv_rx_miss_bufs; -int ixv_crcstrip; -SYSCTL_INT(_dev_netmap, OID_AUTO, ixv_crcstrip, - CTLFLAG_RW, &ixv_crcstrip, 0, "strip CRC on rx frames"); SYSCTL_INT(_dev_netmap, OID_AUTO, ixv_rx_miss, CTLFLAG_RW, &ixv_rx_miss, 0, "potentially missed rx intr"); SYSCTL_INT(_dev_netmap, OID_AUTO, ixv_rx_miss_bufs, CTLFLAG_RW, &ixv_rx_miss_bufs, 0, "potentially missed rx intr bufs"); -static void -set_crcstrip(struct ixgbe_hw *hw, int onoff) -{ - /* crc stripping is set in two places: - * IXGBE_HLREG0 (modified on init_locked and hw reset) - * IXGBE_RDRXCTL (set by the original driver in - * ixgbe_setup_hw_rsc() called in init_locked. - * We disable the setting when netmap is compiled in). - * We update the values here, but also in ixgbe.c because - * init_locked sometimes is called outside our control. - */ - uint32_t hl, rxc; - - hl = IXGBE_READ_REG(hw, IXGBE_HLREG0); - rxc = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); - if (netmap_verbose) - D("%s read HLREG 0x%x rxc 0x%x", - onoff ? "enter" : "exit", hl, rxc); - /* hw requirements ... */ - rxc &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; - rxc |= IXGBE_RDRXCTL_RSCACKC; - if (onoff && !ixv_crcstrip) { - /* keep the crc. Fast rx */ - hl &= ~IXGBE_HLREG0_RXCRCSTRP; - rxc &= ~IXGBE_RDRXCTL_CRCSTRIP; - } else { - /* reset default mode */ - hl |= IXGBE_HLREG0_RXCRCSTRP; - rxc |= IXGBE_RDRXCTL_CRCSTRIP; - } - if (netmap_verbose) - D("%s write HLREG 0x%x rxc 0x%x", - onoff ? "enter" : "exit", hl, rxc); - IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hl); - IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rxc); -} - - /* * Register/unregister. We are already under netmap lock. * Only called on the first register or the last unregister. @@ -153,7 +107,6 @@ ixv_netmap_reg(struct netmap_adapter *na, int onoff) IXGBE_CORE_LOCK(adapter); adapter->stop_locked(adapter); - set_crcstrip(&adapter->hw, onoff); /* enable or disable flags and callbacks in na and ifp */ if (onoff) { nm_set_native_flags(na); @@ -161,7 +114,6 @@ ixv_netmap_reg(struct netmap_adapter *na, int onoff) nm_clear_native_flags(na); } adapter->init_locked(adapter); /* also enables intr */ - set_crcstrip(&adapter->hw, onoff); // XXX why twice ? IXGBE_CORE_UNLOCK(adapter); return (ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1); } @@ -338,7 +290,7 @@ ixv_netmap_txsync(struct netmap_kring *kring, int flag * REPORT_STATUS in a few slots so TDH is the only * good way. */ - nic_i = IXGBE_READ_REG(&adapter->hw, IXGBE_TDH(kring->ring_id)); + nic_i = IXGBE_READ_REG(&adapter->hw, IXGBE_VFTDH(kring->ring_id)); if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("TDH wrap %d", nic_i); nic_i -= kring->nkr_num_slots; @@ -350,6 +302,8 @@ ixv_netmap_txsync(struct netmap_kring *kring, int flag } } + nm_txsync_finalize(kring); + return 0; } @@ -377,7 +331,7 @@ ixv_netmap_rxsync(struct netmap_kring *kring, int flag u_int nic_i; /* index into the NIC ring */ u_int n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = kring->rhead; + u_int const head = nm_rxsync_prologue(kring); int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; /* device-specific */ @@ -407,7 +361,7 @@ ixv_netmap_rxsync(struct netmap_kring *kring, int flag * rxr->next_to_check is set to 0 on a ring reinit */ if (netmap_no_pendintr || force_update) { - int crclen = (ixv_crcstrip) ? 0 : 4; + int crclen = 0; uint16_t slot_flags = kring->nkr_slot_flags; nic_i = rxr->next_to_check; // or also k2n(kring->nr_hwtail) @@ -483,6 +437,9 @@ ixv_netmap_rxsync(struct netmap_kring *kring, int flag nic_i = nm_prev(nic_i, lim); IXGBE_WRITE_REG(&adapter->hw, rxr->tail, nic_i); } + + /* tell userspace that there might be new packets */ + nm_rxsync_finalize(kring); return 0; Modified: releng/10.4/sys/dev/ixgbe/ixv_netmap.h ============================================================================== --- releng/10.4/sys/dev/ixgbe/ixv_netmap.h Wed Sep 20 22:11:01 2017 (r323837) +++ releng/10.4/sys/dev/ixgbe/ixv_netmap.h Wed Sep 20 22:14:50 2017 (r323838) @@ -42,12 +42,10 @@ #include #include -extern int ixv_crcstrip; - /* - * ixgbe_netmap.c contains functions for netmap + * ixv_netmap.c contains functions for netmap * support that extend the standard driver. See additional - * comments in ixgbe_netmap.c. + * comments in ixv_netmap.c. */ void ixv_netmap_attach(struct adapter *adapter); From owner-svn-src-all@freebsd.org Wed Sep 20 22:35:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FB32E26F40; Wed, 20 Sep 2017 22:35:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D6DD82F26; Wed, 20 Sep 2017 22:35:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KMZSkh086538; Wed, 20 Sep 2017 22:35:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8KMZSUG086537; Wed, 20 Sep 2017 22:35:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201709202235.v8KMZSUG086537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 20 Sep 2017 22:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323839 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 323839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 22:35:29 -0000 Author: ae Date: Wed Sep 20 22:35:28 2017 New Revision: 323839 URL: https://svnweb.freebsd.org/changeset/base/323839 Log: Use in_localip() function instead of unlocked access to addresses hash to determine that an address is our local. PR: 220078 MFC after: 1 week Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Wed Sep 20 22:14:50 2017 (r323838) +++ head/sys/netpfil/ipfw/ip_fw2.c Wed Sep 20 22:35:28 2017 (r323839) @@ -1609,10 +1609,7 @@ do { \ case O_IP_SRC_ME: if (is_ipv4) { - struct ifnet *tif; - - INADDR_TO_IFP(src_ip, tif); - match = (tif != NULL); + match = in_localip(src_ip); break; } #ifdef INET6 @@ -1648,10 +1645,7 @@ do { \ case O_IP_DST_ME: if (is_ipv4) { - struct ifnet *tif; - - INADDR_TO_IFP(dst_ip, tif); - match = (tif != NULL); + match = in_localip(dst_ip); break; } #ifdef INET6 From owner-svn-src-all@freebsd.org Thu Sep 21 00:04: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 25BB3E03AED; Thu, 21 Sep 2017 00:04:01 +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 E4E4B814; Thu, 21 Sep 2017 00:04:00 +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 v8L040B7023035; Thu, 21 Sep 2017 00:04:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L040pZ023034; Thu, 21 Sep 2017 00:04:00 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201709210004.v8L040pZ023034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 21 Sep 2017 00:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323840 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 323840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 00:04:01 -0000 Author: jkim Date: Thu Sep 21 00:03:59 2017 New Revision: 323840 URL: https://svnweb.freebsd.org/changeset/base/323840 Log: Remove an ancient comment about the existence of READ(16) and WRITE(16). MFC after: 3 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Wed Sep 20 22:35:28 2017 (r323839) +++ head/sys/cam/scsi/scsi_all.c Thu Sep 21 00:03:59 2017 (r323840) @@ -468,10 +468,6 @@ static struct op_table_entry scsi_op_codes[] = { { 0x86, ALL & ~(L | R | F), "ACCESS CONTROL IN" }, /* 87 OO OO OOOOOOO ACCESS CONTROL OUT */ { 0x87, ALL & ~(L | R | F), "ACCESS CONTROL OUT" }, - /* - * XXX READ(16)/WRITE(16) were not listed for CD/DVE in op-num.txt - * but we had it since r1.40. Do we really want them? - */ /* 88 MM O O O READ(16) */ { 0x88, D | T | W | O | B, "READ(16)" }, /* 89 O COMPARE AND WRITE*/ From owner-svn-src-all@freebsd.org Thu Sep 21 00:41: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 CD5FAE0537D; Thu, 21 Sep 2017 00:41:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 996161789; Thu, 21 Sep 2017 00:41:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L0fCiD036144; Thu, 21 Sep 2017 00:41:12 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L0fCIE036143; Thu, 21 Sep 2017 00:41:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709210041.v8L0fCIE036143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 21 Sep 2017 00:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323841 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 323841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 00:41:13 -0000 Author: rmacklem Date: Thu Sep 21 00:41:12 2017 New Revision: 323841 URL: https://svnweb.freebsd.org/changeset/base/323841 Log: Add a few definitions for Flex File Layout for pNFS. These definitions will be used by a future commit. Modified: head/sys/fs/nfs/nfs.h Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Thu Sep 21 00:03:59 2017 (r323840) +++ head/sys/fs/nfs/nfs.h Thu Sep 21 00:41:12 2017 (r323841) @@ -177,6 +177,17 @@ struct nfsd_nfsd_args { }; /* + * NFSDEV_MIRRORSTR - string of digits that number the DSs 0->999. + * (To support more than 1000 DSs on an MDS, this needs to be increased.) + * NFSDEV_MAXMIRRORS - Maximum # of mirrors for a DS. + * (Most will only have a single mirror, but this setting allows up to 3.) + * NFSDEV_MAXVERS - maximum number of NFS versions supported by Flex File. + */ +#define NFSDEV_MIRRORSTR 3 +#define NFSDEV_MAXMIRRORS 4 +#define NFSDEV_MAXVERS 4 + +/* * Arguments for use by the callback daemon. */ struct nfsd_nfscbd_args { From owner-svn-src-all@freebsd.org Thu Sep 21 03:18: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 38CF3E0E3A0; Thu, 21 Sep 2017 03:18:13 +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 06DB165F36; Thu, 21 Sep 2017 03:18:12 +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 v8L3ICVb000924; Thu, 21 Sep 2017 03:18:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L3ICx9000923; Thu, 21 Sep 2017 03:18:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709210318.v8L3ICx9000923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 21 Sep 2017 03:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323842 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 03:18:13 -0000 Author: cy Date: Thu Sep 21 03:18:11 2017 New Revision: 323842 URL: https://svnweb.freebsd.org/changeset/base/323842 Log: MFC r323715: Don't use an apostrophe in a possesive pronoun. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Sep 21 00:41:12 2017 (r323841) +++ stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Sep 21 03:18:11 2017 (r323842) @@ -1449,7 +1449,7 @@ ipf_state_add(softc, fin, stsave, flags) is->is_die = 1 + softc->ipf_ticks; /* * We want to check everything that is a property of this packet, - * but we don't (automatically) care about it's fragment status as + * but we don't (automatically) care about its fragment status as * this may change. */ is->is_pass = pass; From owner-svn-src-all@freebsd.org Thu Sep 21 03:18: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 6D218E0E3A4; Thu, 21 Sep 2017 03:18:13 +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 3B9E565F37; Thu, 21 Sep 2017 03:18:13 +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 v8L3ICBP000930; Thu, 21 Sep 2017 03:18:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L3ICQP000929; Thu, 21 Sep 2017 03:18:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709210318.v8L3ICQP000929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 21 Sep 2017 03:18: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: r323842 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 03:18:13 -0000 Author: cy Date: Thu Sep 21 03:18:11 2017 New Revision: 323842 URL: https://svnweb.freebsd.org/changeset/base/323842 Log: MFC r323715: Don't use an apostrophe in a possesive pronoun. Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_state.c Thu Sep 21 00:41:12 2017 (r323841) +++ stable/10/sys/contrib/ipfilter/netinet/ip_state.c Thu Sep 21 03:18:11 2017 (r323842) @@ -1449,7 +1449,7 @@ ipf_state_add(softc, fin, stsave, flags) is->is_die = 1 + softc->ipf_ticks; /* * We want to check everything that is a property of this packet, - * but we don't (automatically) care about it's fragment status as + * but we don't (automatically) care about its fragment status as * this may change. */ is->is_pass = pass; From owner-svn-src-all@freebsd.org Thu Sep 21 05:46: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 80FF2E15563; Thu, 21 Sep 2017 05:46:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FFA66A76D; Thu, 21 Sep 2017 05:46:29 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L5kSss061400; Thu, 21 Sep 2017 05:46:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L5kSlC061399; Thu, 21 Sep 2017 05:46:28 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709210546.v8L5kSlC061399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 21 Sep 2017 05:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323843 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 323843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 05:46:29 -0000 Author: cem Date: Thu Sep 21 05:46:28 2017 New Revision: 323843 URL: https://svnweb.freebsd.org/changeset/base/323843 Log: cryptotest.py: Add a seatbelt that we're actually testing anything Without nist-kat installed, cryptotest.py is a no-op. Showing 'success' in that case is unhelpful. Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Thu Sep 21 03:18:11 2017 (r323842) +++ head/tests/sys/opencrypto/cryptotest.py Thu Sep 21 05:46:28 2017 (r323843) @@ -40,6 +40,7 @@ from glob import iglob katdir = '/usr/local/share/nist-kat' def katg(base, glob): + assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'" return iglob(os.path.join(katdir, base, glob)) aesmodules = [ 'cryptosoft0', 'aesni0', 'ccr0' ] From owner-svn-src-all@freebsd.org Thu Sep 21 07:35: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 DF7D6E19DE7; Thu, 21 Sep 2017 07:35:23 +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 AE22A6D5F2; Thu, 21 Sep 2017 07:35:23 +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 v8L7ZMXi006328; Thu, 21 Sep 2017 07:35:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L7ZMDu006327; Thu, 21 Sep 2017 07:35:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709210735.v8L7ZMDu006327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 21 Sep 2017 07:35: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: r323844 - stable/11/sys/dev/ntb/ntb_hw X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 323844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 07:35:24 -0000 Author: mav Date: Thu Sep 21 07:35:22 2017 New Revision: 323844 URL: https://svnweb.freebsd.org/changeset/base/323844 Log: MFC r323575: Add second entry to LUT on a link side in B2B mode. Each of two entries on a virtual side should have its counterpart on a peer's link side. Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Sep 21 05:46:28 2017 (r323843) +++ stable/11/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Sep 21 07:35:22 2017 (r323844) @@ -197,8 +197,8 @@ ntb_plx_init(device_t dev) } } - /* Enable Link Interface LUT entry 0 for 0:0.0. */ - PNTX_WRITE(sc, 0xdb4, 1); + /* Enable Link Interface LUT entries 0/1 for peer 0/1. */ + PNTX_WRITE(sc, 0xdb4, 0x00090001); } /* @@ -631,13 +631,12 @@ ntb_plx_mw_set_trans_internal(device_t dev, unsigned m val64 = 0; if (size > 0) val64 = (~(size - 1) & ~0xfffff); - val64 |= 0x4; + val64 |= 0xc; PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4, val64); PNTX_WRITE(sc, 0xe8 + (mw->mw_bar - 2) * 4 + 4, val64 >> 32); /* Set Link Interface BAR address. */ val64 = 0x2000000000000000 * mw->mw_bar + off; - val64 |= 0x4; PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar), val64); PNTX_WRITE(sc, PCIR_BAR(mw->mw_bar) + 4, val64 >> 32); } From owner-svn-src-all@freebsd.org Thu Sep 21 08:16: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 23706E1BEAC; Thu, 21 Sep 2017 08:16:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E63F86E78D; Thu, 21 Sep 2017 08:16:22 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L8GM14022585; Thu, 21 Sep 2017 08:16:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L8GMcj022584; Thu, 21 Sep 2017 08:16:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201709210816.v8L8GMcj022584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 21 Sep 2017 08:16: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: r323845 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: stable/11/sys/arm64/arm64 X-SVN-Commit-Revision: 323845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 08:16:23 -0000 Author: andrew Date: Thu Sep 21 08:16:21 2017 New Revision: 323845 URL: https://svnweb.freebsd.org/changeset/base/323845 Log: MFC r322797: Fix a bug in pmap_protect where we invalidate the wrong page. With this we can now remove an unneeded call to invalidate all entries. Sponsored by: DARPA, AFRL Modified: stable/11/sys/arm64/arm64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 07:35:22 2017 (r323844) +++ stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 08:16:21 2017 (r323845) @@ -2626,13 +2626,10 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t pmap_set(l3p, nbits); PTE_SYNC(l3p); /* XXX: Use pmap_invalidate_range */ - pmap_invalidate_page(pmap, va); + pmap_invalidate_page(pmap, sva); } } PMAP_UNLOCK(pmap); - - /* TODO: Only invalidate entries we are touching */ - pmap_invalidate_all(pmap); } /* From owner-svn-src-all@freebsd.org Thu Sep 21 08:20: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 3CC11E1C2A3; Thu, 21 Sep 2017 08:20:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B5976E959; Thu, 21 Sep 2017 08:20:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L8KXAJ022797; Thu, 21 Sep 2017 08:20:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L8KXdf022796; Thu, 21 Sep 2017 08:20:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201709210820.v8L8KXdf022796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 21 Sep 2017 08:20: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: r323846 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: stable/11/sys/arm64/arm64 X-SVN-Commit-Revision: 323846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 08:20:34 -0000 Author: andrew Date: Thu Sep 21 08:20:33 2017 New Revision: 323846 URL: https://svnweb.freebsd.org/changeset/base/323846 Log: MFC r322800: Remove an unneeded call to pmap_invalidate_all. This was never called as the anyvalid variable is never set. Sponsored by: DARPA, AFRL Modified: stable/11/sys/arm64/arm64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 08:16:21 2017 (r323845) +++ stable/11/sys/arm64/arm64/pmap.c Thu Sep 21 08:20:33 2017 (r323846) @@ -2335,7 +2335,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t pd_entry_t *l0, *l1, *l2; pt_entry_t l3_paddr, *l3; struct spglist free; - int anyvalid; /* * Perform an unsynchronized read. This is, however, safe. @@ -2343,7 +2342,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t if (pmap->pm_stats.resident_count == 0) return; - anyvalid = 0; SLIST_INIT(&free); PMAP_LOCK(pmap); @@ -2430,8 +2428,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t } if (lock != NULL) rw_wunlock(lock); - if (anyvalid) - pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); pmap_free_zero_pages(&free); } From owner-svn-src-all@freebsd.org Thu Sep 21 09:18: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 7748CE1F0D0; Thu, 21 Sep 2017 09:18:06 +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 44C80706E7; Thu, 21 Sep 2017 09:18:06 +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 v8L9I57Q047982; Thu, 21 Sep 2017 09:18:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L9I5Gw047981; Thu, 21 Sep 2017 09:18:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709210918.v8L9I5Gw047981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 21 Sep 2017 09:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323847 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 09:18:06 -0000 Author: tuexen Date: Thu Sep 21 09:18:05 2017 New Revision: 323847 URL: https://svnweb.freebsd.org/changeset/base/323847 Log: No need to wakeup, since sctp_add_to_readq() does it. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Sep 21 08:20:33 2017 (r323846) +++ head/sys/netinet/sctp_indata.c Thu Sep 21 09:18:05 2017 (r323847) @@ -1617,7 +1617,6 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc control, &stcb->sctp_socket->so_rcv, control->end_added, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - do_wakeup = 1; } break; } From owner-svn-src-all@freebsd.org Thu Sep 21 09:22: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 33FADE1F4E5; Thu, 21 Sep 2017 09:22:43 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0342B70B05; Thu, 21 Sep 2017 09:22:42 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L9MgZ4051741; Thu, 21 Sep 2017 09:22:42 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L9MgER051740; Thu, 21 Sep 2017 09:22:42 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201709210922.v8L9MgER051740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Thu, 21 Sep 2017 09:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323848 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 323848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 09:22:43 -0000 Author: n_hibma Date: Thu Sep 21 09:22:41 2017 New Revision: 323848 URL: https://svnweb.freebsd.org/changeset/base/323848 Log: Speling mistakes. Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Thu Sep 21 09:18:05 2017 (r323847) +++ head/tools/tools/nanobsd/embedded/common Thu Sep 21 09:22:41 2017 (r323848) @@ -66,7 +66,7 @@ # o common tooling for creating images for odd-ball platforms # o support for boot loaders other than uboot in the image # or via special instructions -# o No pony support. Sadly, you cannot have a pony. +# o no pony support; sadly, you cannot have a pony # if [ -z $NANO_NAME ]; then @@ -281,7 +281,7 @@ create_diskimage_mbr ( ) ( out=${NANO_DISKIMGDIR}/_.disk.image.${NANO_NAME}${fmt} # below depends on https://reviews.freebsd.org/D4403 not yet in the tree # but there's problems: it marks all partitions as active, so you have to - # boot off parittion 3 or 2 by hand if you're playing around with this WIP + # boot off partition 3 or 2 by hand if you're playing around with this WIP case ${NANO_LAYOUT} in std-embedded) mkimg -a 3 ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p ${s1}:=${NANO_LOG}/_.s1 \ From owner-svn-src-all@freebsd.org Thu Sep 21 09:27: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 2E866E1F7E2; Thu, 21 Sep 2017 09:27:46 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 055E070DC3; Thu, 21 Sep 2017 09:27:45 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8L9RjCr052126; Thu, 21 Sep 2017 09:27:45 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L9RjsP052125; Thu, 21 Sep 2017 09:27:45 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201709210927.v8L9RjsP052125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Thu, 21 Sep 2017 09:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323849 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 323849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 09:27:46 -0000 Author: n_hibma Date: Thu Sep 21 09:27:44 2017 New Revision: 323849 URL: https://svnweb.freebsd.org/changeset/base/323849 Log: Fix up style for consistency. Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Thu Sep 21 09:22:41 2017 (r323848) +++ head/tools/tools/nanobsd/defaults.sh Thu Sep 21 09:27:44 2017 (r323849) @@ -256,7 +256,6 @@ rm ( ) { # are relative to NANO_WORLDDIR. # tgt_touch ( ) ( - cd "${NANO_WORLDDIR}" for i; do touch $i @@ -270,7 +269,7 @@ tgt_touch ( ) ( # directory is removed and a symlink is created. If we're doing # a nopriv build, then append this fact to the metalog # -tgt_dir2symlink () ( +tgt_dir2symlink ( ) ( dir=$1 symlink=$2 @@ -334,8 +333,6 @@ build_world ( ) ( ) build_kernel ( ) ( - local extra - pprint 2 "build kernel ($NANO_KERNEL)" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" @@ -402,7 +399,6 @@ install_world ( ) ( ) install_etc ( ) ( - pprint 2 "install /etc" pprint 3 "log: ${NANO_LOG}/_.etc" @@ -418,8 +414,6 @@ install_etc ( ) ( ) install_kernel ( ) ( - local extra - pprint 2 "install kernel ($NANO_KERNEL)" pprint 3 "log: ${NANO_LOG}/_.ik" @@ -458,8 +452,7 @@ native_xtools ( ) ( # Run the requested set of early customization scripts, run before # buildworld. # -run_early_customize() { - +run_early_customize ( ) { pprint 2 "run early customize scripts" for c in $NANO_EARLY_CUSTOMIZE do @@ -492,7 +485,6 @@ run_customize ( ) ( # setup nanobsd, prune empty dirs from /usr, etc # run_late_customize ( ) ( - pprint 2 "run late customize scripts" for c in $NANO_LATE_CUSTOMIZE do @@ -511,7 +503,6 @@ run_late_customize ( ) ( # a user's cfg file would override this. # fixup_before_diskimage ( ) ( - # Run the deduplication script that takes the matalog journal and # combines multiple entries for the same file (see source for # details). We take the extra step of removing the size keywords. This @@ -599,7 +590,6 @@ setup_nanobsd_etc ( ) ( ) prune_usr ( ) ( - # Remove all empty directories in /usr find "${NANO_WORLDDIR}"/usr -type d -depth -print | while read d @@ -754,7 +744,6 @@ cust_install_files ( ) ( # Install packages from ${NANO_PACKAGE_DIR} cust_pkgng ( ) ( - mkdir -p ${NANO_WORLDDIR}/usr/local/etc local PKG_CONF="${NANO_WORLDDIR}/usr/local/etc/pkg.conf" local PKGCMD="env ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none /usr/sbin/pkg" @@ -820,7 +809,7 @@ cust_pkgng ( ) ( # Register all args as early customize function to run just before # build commences. -early_customize_cmd () { +early_customize_cmd ( ) { NANO_EARLY_CUSTOMIZE="$NANO_EARLY_CUSTOMIZE $*" } From owner-svn-src-all@freebsd.org Thu Sep 21 09:47:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5794CE20712; Thu, 21 Sep 2017 09:47:57 +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 251517165A; Thu, 21 Sep 2017 09:47:57 +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 v8L9lucs060432; Thu, 21 Sep 2017 09:47:56 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8L9lupH060431; Thu, 21 Sep 2017 09:47:56 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709210947.v8L9lupH060431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 21 Sep 2017 09:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323850 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 09:47:57 -0000 Author: tuexen Date: Thu Sep 21 09:47:56 2017 New Revision: 323850 URL: https://svnweb.freebsd.org/changeset/base/323850 Log: Free the control structure after using is, not before. Found by Coverity while scanning the usrsctp library. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Sep 21 09:27:44 2017 (r323849) +++ head/sys/netinet/sctp_indata.c Thu Sep 21 09:47:56 2017 (r323850) @@ -1379,10 +1379,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc } if (sctp_place_control_in_stream(strm, asoc, control)) { /* Duplicate SSN? */ - sctp_clean_up_control(stcb, control); sctp_abort_in_reasm(stcb, control, chk, abort_flag, SCTP_FROM_SCTP_INDATA + SCTP_LOC_6); + sctp_clean_up_control(stcb, control); return; } if ((tsn == (asoc->cumulative_tsn + 1) && (asoc->idata_supported == 0))) { From owner-svn-src-all@freebsd.org Thu Sep 21 10:00: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 C56F4E210E0; Thu, 21 Sep 2017 10:00:17 +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 A264771C1D; Thu, 21 Sep 2017 10:00:17 +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 v8LA0GH9064499; Thu, 21 Sep 2017 10:00:16 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LA0G51064496; Thu, 21 Sep 2017 10:00:16 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211000.v8LA0G51064496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323851 - in head: lib/libnv sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: lib/libnv sys/contrib/libnv X-SVN-Commit-Revision: 323851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:00:17 -0000 Author: oshogbo Date: Thu Sep 21 10:00:16 2017 New Revision: 323851 URL: https://svnweb.freebsd.org/changeset/base/323851 Log: Remove redundant initialization. Don't use variable - just return the value. Make scan-build happy by casting to 'void *' instead of 'void **'. Submitted by: pjd@ MFC after: 1 month Found by: scan-build and cppcheck Sponsored by: Wheel Systems Modified: head/lib/libnv/msgio.c head/sys/contrib/libnv/nvlist.c head/sys/contrib/libnv/nvpair.c Modified: head/lib/libnv/msgio.c ============================================================================== --- head/lib/libnv/msgio.c Thu Sep 21 09:47:56 2017 (r323850) +++ head/lib/libnv/msgio.c Thu Sep 21 10:00:16 2017 (r323851) @@ -299,7 +299,6 @@ fd_package_recv(int sock, int *fds, size_t nfds) PJDLOG_ASSERT(nfds > 0); PJDLOG_ASSERT(fds != NULL); - i = 0; bzero(&msg, sizeof(msg)); bzero(&iov, sizeof(iov)); Modified: head/sys/contrib/libnv/nvlist.c ============================================================================== --- head/sys/contrib/libnv/nvlist.c Thu Sep 21 09:47:56 2017 (r323850) +++ head/sys/contrib/libnv/nvlist.c Thu Sep 21 10:00:16 2017 (r323851) @@ -280,8 +280,7 @@ nvlist_get_pararr(const nvlist_t *nvl, void **cookiep) return (ret); } - ret = nvlist_get_parent(nvl, cookiep); - return (ret); + return (nvlist_get_parent(nvl, cookiep)); } bool @@ -709,7 +708,6 @@ static int * nvlist_xdescriptors(const nvlist_t *nvl, int *descs) { nvpair_t *nvp; - const char *name; int type; NVLIST_ASSERT(nvl); @@ -717,7 +715,7 @@ nvlist_xdescriptors(const nvlist_t *nvl, int *descs) nvp = NULL; do { - while ((name = nvlist_next(nvl, &type, (void**)&nvp)) != NULL) { + while (nvlist_next(nvl, &type, (void *)&nvp) != NULL) { switch (type) { case NV_TYPE_DESCRIPTOR: *descs = nvpair_get_descriptor(nvp); @@ -756,7 +754,7 @@ nvlist_xdescriptors(const nvlist_t *nvl, int *descs) } } } - } while ((nvl = nvlist_get_pararr(nvl, (void**)&nvp)) != NULL); + } while ((nvl = nvlist_get_pararr(nvl, (void *)&nvp)) != NULL); return (descs); } @@ -787,7 +785,6 @@ nvlist_ndescriptors(const nvlist_t *nvl) { #ifndef _KERNEL nvpair_t *nvp; - const char *name; size_t ndescs; int type; @@ -797,7 +794,7 @@ nvlist_ndescriptors(const nvlist_t *nvl) ndescs = 0; nvp = NULL; do { - while ((name = nvlist_next(nvl, &type, (void**)&nvp)) != NULL) { + while (nvlist_next(nvl, &type, (void *)&nvp) != NULL) { switch (type) { case NV_TYPE_DESCRIPTOR: ndescs++; @@ -830,7 +827,7 @@ nvlist_ndescriptors(const nvlist_t *nvl) } } } - } while ((nvl = nvlist_get_pararr(nvl, (void**)&nvp)) != NULL); + } while ((nvl = nvlist_get_pararr(nvl, (void *)&nvp)) != NULL); return (ndescs); #else @@ -1258,7 +1255,6 @@ nvlist_send(int sock, const nvlist_t *nvl) return (-1); ret = -1; - data = NULL; fdidx = 0; data = nvlist_xpack(nvl, &fdidx, &datasize); Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 09:47:56 2017 (r323850) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:00:16 2017 (r323851) @@ -1412,7 +1412,6 @@ nvpair_create_nvlist_array(const char *name, const nvl nvp = NULL; nvls = NULL; - ii = 0; if (value == NULL || nitems == 0) { ERRNO_SET(EINVAL); From owner-svn-src-all@freebsd.org Thu Sep 21 10: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 11722E2158B; Thu, 21 Sep 2017 10:03:16 +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 CFCCA72067; Thu, 21 Sep 2017 10:03:15 +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 v8LA3EYK068199; Thu, 21 Sep 2017 10:03:14 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LA3EZA068198; Thu, 21 Sep 2017 10:03:14 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211003.v8LA3EZA068198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323852 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:03:16 -0000 Author: oshogbo Date: Thu Sep 21 10:03:14 2017 New Revision: 323852 URL: https://svnweb.freebsd.org/changeset/base/323852 Log: The 'while (array != NULL) { }' suggests scan-build that array may be initially NULL, which is not possible. Change the loop to 'do {} while (array != NULL)' to satisfy scan-build and assert that array really cannot be NULL just in case. Submitted by: pjd@ Found by: scan-build MFC after: 1 month Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvlist.c Modified: head/sys/contrib/libnv/nvlist.c ============================================================================== --- head/sys/contrib/libnv/nvlist.c Thu Sep 21 10:00:16 2017 (r323851) +++ head/sys/contrib/libnv/nvlist.c Thu Sep 21 10:03:14 2017 (r323852) @@ -1200,12 +1200,13 @@ nvlist_xunpack(const void *buf, size_t size, const int &array); if (ptr == NULL) goto failed; + PJDLOG_ASSERT(array != NULL); tmpnvl = array; - while (array != NULL) { + do { nvlist_set_parent(array, nvp); array = __DECONST(nvlist_t *, nvlist_get_array_next(array)); - } + } while (array != NULL); ptr = nvlist_unpack_header(tmpnvl, ptr, nfds, &isbe, &left); break; From owner-svn-src-all@freebsd.org Thu Sep 21 10:06: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 97E6BE21791; Thu, 21 Sep 2017 10:06:01 +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 72A607222A; Thu, 21 Sep 2017 10:06:01 +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 v8LA60aj068341; Thu, 21 Sep 2017 10:06:00 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LA60B7068339; Thu, 21 Sep 2017 10:06:00 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211006.v8LA60B7068339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323853 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:06:01 -0000 Author: oshogbo Date: Thu Sep 21 10:06:00 2017 New Revision: 323853 URL: https://svnweb.freebsd.org/changeset/base/323853 Log: Make the code consistent by always using 'fail' label. Submitted by: pjd@ and oshogbo@ MFC after: 1 month Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvlist.c head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvlist.c ============================================================================== --- head/sys/contrib/libnv/nvlist.c Thu Sep 21 10:03:14 2017 (r323852) +++ head/sys/contrib/libnv/nvlist.c Thu Sep 21 10:06:00 2017 (r323853) @@ -1067,24 +1067,24 @@ nvlist_unpack_header(nvlist_t *nvl, const unsigned cha int inarrayf; if (*leftp < sizeof(nvlhdr)) - goto failed; + goto fail; memcpy(&nvlhdr, ptr, sizeof(nvlhdr)); if (!nvlist_check_header(&nvlhdr)) - goto failed; + goto fail; if (nvlhdr.nvlh_size != *leftp - sizeof(nvlhdr)) - goto failed; + goto fail; /* * nvlh_descriptors might be smaller than nfds in embedded nvlists. */ if (nvlhdr.nvlh_descriptors > nfds) - goto failed; + goto fail; if ((nvlhdr.nvlh_flags & ~NV_FLAG_ALL_MASK) != 0) - goto failed; + goto fail; inarrayf = (nvl->nvl_flags & NV_FLAG_IN_ARRAY); nvl->nvl_flags = (nvlhdr.nvlh_flags & NV_FLAG_PUBLIC_MASK) | inarrayf; @@ -1095,7 +1095,7 @@ nvlist_unpack_header(nvlist_t *nvl, const unsigned cha *leftp -= sizeof(nvlhdr); return (ptr); -failed: +fail: ERRNO_SET(EINVAL); return (NULL); } @@ -1118,20 +1118,20 @@ nvlist_xunpack(const void *buf, size_t size, const int tmpnvl = array = NULL; nvl = retnvl = nvlist_create(0); if (nvl == NULL) - goto failed; + goto fail; ptr = nvlist_unpack_header(nvl, ptr, nfds, &isbe, &left); if (ptr == NULL) - goto failed; + goto fail; if (nvl->nvl_flags != flags) { ERRNO_SET(EILSEQ); - goto failed; + goto fail; } while (left > 0) { ptr = nvpair_unpack(isbe, ptr, &left, &nvp); if (ptr == NULL) - goto failed; + goto fail; switch (nvpair_type(nvp)) { case NV_TYPE_NULL: ptr = nvpair_unpack_null(isbe, nvp, ptr, &left); @@ -1149,7 +1149,7 @@ nvlist_xunpack(const void *buf, size_t size, const int ptr = nvpair_unpack_nvlist(isbe, nvp, ptr, &left, nfds, &tmpnvl); if (tmpnvl == NULL || ptr == NULL) - goto failed; + goto fail; nvlist_set_parent(tmpnvl, nvp); break; #ifndef _KERNEL @@ -1167,14 +1167,14 @@ nvlist_xunpack(const void *buf, size_t size, const int break; case NV_TYPE_NVLIST_UP: if (nvl->nvl_parent == NULL) - goto failed; + goto fail; nvl = nvpair_nvlist(nvl->nvl_parent); nvpair_free_structure(nvp); continue; case NV_TYPE_NVLIST_ARRAY_NEXT: if (nvl->nvl_array_next == NULL) { if (nvl->nvl_parent == NULL) - goto failed; + goto fail; nvl = nvpair_nvlist(nvl->nvl_parent); } else { nvl = __DECONST(nvlist_t *, @@ -1182,7 +1182,7 @@ nvlist_xunpack(const void *buf, size_t size, const int ptr = nvlist_unpack_header(nvl, ptr, nfds, &isbe, &left); if (ptr == NULL) - goto failed; + goto fail; } nvpair_free_structure(nvp); continue; @@ -1199,7 +1199,7 @@ nvlist_xunpack(const void *buf, size_t size, const int ptr = nvpair_unpack_nvlist_array(isbe, nvp, ptr, &left, &array); if (ptr == NULL) - goto failed; + goto fail; PJDLOG_ASSERT(array != NULL); tmpnvl = array; do { @@ -1214,9 +1214,9 @@ nvlist_xunpack(const void *buf, size_t size, const int PJDLOG_ABORT("Invalid type (%d).", nvpair_type(nvp)); } if (ptr == NULL) - goto failed; + goto fail; if (!nvlist_move_nvpair(nvl, nvp)) - goto failed; + goto fail; if (tmpnvl != NULL) { nvl = tmpnvl; tmpnvl = NULL; @@ -1224,7 +1224,7 @@ nvlist_xunpack(const void *buf, size_t size, const int } return (retnvl); -failed: +fail: nvlist_destroy(retnvl); return (NULL); } Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:03:14 2017 (r323852) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:06:00 2017 (r323853) @@ -614,7 +614,7 @@ nvpair_unpack_header(bool isbe, nvpair_t *nvp, const u struct nvpair_header nvphdr; if (*leftp < sizeof(nvphdr)) - goto failed; + goto fail; memcpy(&nvphdr, ptr, sizeof(nvphdr)); ptr += sizeof(nvphdr); @@ -622,12 +622,12 @@ nvpair_unpack_header(bool isbe, nvpair_t *nvp, const u #if NV_TYPE_FIRST > 0 if (nvphdr.nvph_type < NV_TYPE_FIRST) - goto failed; + goto fail; #endif if (nvphdr.nvph_type > NV_TYPE_LAST && nvphdr.nvph_type != NV_TYPE_NVLIST_UP && nvphdr.nvph_type != NV_TYPE_NVLIST_ARRAY_NEXT) { - goto failed; + goto fail; } #if BYTE_ORDER == BIG_ENDIAN @@ -643,14 +643,14 @@ nvpair_unpack_header(bool isbe, nvpair_t *nvp, const u #endif if (nvphdr.nvph_namesize > NV_NAME_MAX) - goto failed; + goto fail; if (*leftp < nvphdr.nvph_namesize) - goto failed; + goto fail; if (nvphdr.nvph_namesize < 1) - goto failed; + goto fail; if (strnlen((const char *)ptr, nvphdr.nvph_namesize) != (size_t)(nvphdr.nvph_namesize - 1)) { - goto failed; + goto fail; } memcpy(nvp->nvp_name, ptr, nvphdr.nvph_namesize); @@ -658,7 +658,7 @@ nvpair_unpack_header(bool isbe, nvpair_t *nvp, const u *leftp -= nvphdr.nvph_namesize; if (*leftp < nvphdr.nvph_datasize) - goto failed; + goto fail; nvp->nvp_type = nvphdr.nvph_type; nvp->nvp_data = 0; @@ -666,7 +666,7 @@ nvpair_unpack_header(bool isbe, nvpair_t *nvp, const u nvp->nvp_nitems = nvphdr.nvph_nitems; return (ptr); -failed: +fail: ERRNO_SET(EINVAL); return (NULL); } @@ -1108,10 +1108,10 @@ nvpair_unpack(bool isbe, const unsigned char *ptr, siz ptr = nvpair_unpack_header(isbe, nvp, ptr, leftp); if (ptr == NULL) - goto failed; + goto fail; tmp = nv_realloc(nvp, sizeof(*nvp) + strlen(nvp->nvp_name) + 1); if (tmp == NULL) - goto failed; + goto fail; nvp = tmp; /* Update nvp_name after realloc(). */ @@ -1120,7 +1120,7 @@ nvpair_unpack(bool isbe, const unsigned char *ptr, siz nvp->nvp_magic = NVPAIR_MAGIC; *nvpp = nvp; return (ptr); -failed: +fail: nv_free(nvp); return (NULL); } From owner-svn-src-all@freebsd.org Thu Sep 21 10: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 8790BE21BB6; Thu, 21 Sep 2017 10:10:43 +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 51CCB724B9; Thu, 21 Sep 2017 10:10:43 +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 v8LAAgca068624; Thu, 21 Sep 2017 10:10:42 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAAgmw068623; Thu, 21 Sep 2017 10:10:42 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211010.v8LAAgmw068623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323854 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:10:43 -0000 Author: oshogbo Date: Thu Sep 21 10:10:42 2017 New Revision: 323854 URL: https://svnweb.freebsd.org/changeset/base/323854 Log: Because nvp wasn't initialized on every loop iteration once we jumped to 'fail' on error it was treated as success, because nvp!=NULL. Fix this by not handling success under 'fail' label and by using separate variable for parent nvpair. If we succeeded to allocate nvlist, but failed to allocated nvpair we would leak nvls[ii] on return. Destroy it when we cannot allocate nvpair, before we goto fail. Submitted by: pjd@ and oshogbo@ (minor changes) Found by: scan-build MFC after: 1 month Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:06:00 2017 (r323853) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:10:42 2017 (r323854) @@ -1407,10 +1407,9 @@ nvpair_create_nvlist_array(const char *name, const nvl { unsigned int ii; nvlist_t **nvls; - nvpair_t *nvp; + nvpair_t *parent; int flags; - nvp = NULL; nvls = NULL; if (value == NULL || nitems == 0) { @@ -1433,33 +1432,40 @@ nvpair_create_nvlist_array(const char *name, const nvl goto fail; if (ii > 0) { + nvpair_t *nvp; + nvp = nvpair_allocv(" ", NV_TYPE_NVLIST, (uint64_t)(uintptr_t)nvls[ii], 0, 0); - if (nvp == NULL) + if (nvp == NULL) { + ERRNO_SAVE(); + nvlist_destroy(nvls[ii]); + ERRNO_RESTORE(); goto fail; + } nvlist_set_array_next(nvls[ii - 1], nvp); } } flags = nvlist_flags(nvls[nitems - 1]) | NV_FLAG_IN_ARRAY; nvlist_set_flags(nvls[nitems - 1], flags); - nvp = nvpair_allocv(name, NV_TYPE_NVLIST_ARRAY, + parent = nvpair_allocv(name, NV_TYPE_NVLIST_ARRAY, (uint64_t)(uintptr_t)nvls, 0, nitems); + if (parent == NULL) + goto fail; -fail: - if (nvp == NULL) { - ERRNO_SAVE(); - for (; ii > 0; ii--) - nvlist_destroy(nvls[ii - 1]); + for (ii = 0; ii < nitems; ii++) + nvlist_set_parent(nvls[ii], parent); - nv_free(nvls); - ERRNO_RESTORE(); - } else { - for (ii = 0; ii < nitems; ii++) - nvlist_set_parent(nvls[ii], nvp); - } + return (parent); - return (nvp); +fail: + ERRNO_SAVE(); + for (; ii > 0; ii--) + nvlist_destroy(nvls[ii - 1]); + nv_free(nvls); + ERRNO_RESTORE(); + + return (NULL); } #ifndef _KERNEL From owner-svn-src-all@freebsd.org Thu Sep 21 10: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 B315EE21F8E; Thu, 21 Sep 2017 10:13:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80920728E5; Thu, 21 Sep 2017 10:13:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LADmBT072835; Thu, 21 Sep 2017 10:13:48 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LADmMj072833; Thu, 21 Sep 2017 10:13:48 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201709211013.v8LADmMj072833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Thu, 21 Sep 2017 10:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323855 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 323855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:13:49 -0000 Author: n_hibma Date: Thu Sep 21 10:13:48 2017 New Revision: 323855 URL: https://svnweb.freebsd.org/changeset/base/323855 Log: Remove an 'unused' function. This function was only set in legacy.sh and only at the very end after the disk image had been successfully created. The only difference will be that the message 'Error encountered. Please check...' will not appear if nanobsd.sh exits with an error after the disk image has been created. Modified: head/tools/tools/nanobsd/defaults.sh head/tools/tools/nanobsd/legacy.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Thu Sep 21 10:10:42 2017 (r323854) +++ head/tools/tools/nanobsd/defaults.sh Thu Sep 21 10:13:48 2017 (r323855) @@ -291,11 +291,6 @@ CR0 ( ) { chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true } -nano_cleanup ( ) ( - [ $? -eq 0 ] || echo "Error encountered. Check for errors in last log file." 1>&2 - exit $? -) - clean_build ( ) ( pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" Modified: head/tools/tools/nanobsd/legacy.sh ============================================================================== --- head/tools/tools/nanobsd/legacy.sh Thu Sep 21 10:10:42 2017 (r323854) +++ head/tools/tools/nanobsd/legacy.sh Thu Sep 21 10:13:48 2017 (r323855) @@ -198,7 +198,6 @@ create_diskimage ( ) ( mdconfig -d -u $MD trap - 1 2 15 - trap nano_cleanup EXIT ) > ${NANO_LOG}/_.di 2>&1 ) From owner-svn-src-all@freebsd.org Thu Sep 21 10:14: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 8351FE22091; Thu, 21 Sep 2017 10:14:44 +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 5073B72A45; Thu, 21 Sep 2017 10:14:44 +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 v8LAEhde072913; Thu, 21 Sep 2017 10:14:43 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAEhlK072912; Thu, 21 Sep 2017 10:14:43 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211014.v8LAEhlK072912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323856 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:14:44 -0000 Author: oshogbo Date: Thu Sep 21 10:14:43 2017 New Revision: 323856 URL: https://svnweb.freebsd.org/changeset/base/323856 Log: Free 'value' only once we are done freeing all individual Submitted by: pjd@ MFC after: 1 month Found by: scan-build Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:13:48 2017 (r323855) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:14:43 2017 (r323856) @@ -1727,8 +1727,8 @@ fail: nvlist_get_pararr(value[ii], NULL) != NULL) { nvlist_destroy(value[ii]); } - nv_free(value); } + nv_free(value); ERRNO_RESTORE(); } else { for (ii = 0; ii < nitems; ii++) From owner-svn-src-all@freebsd.org Thu Sep 21 10:16: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 13EE0E221FF; Thu, 21 Sep 2017 10:16:27 +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 D4ACF72BDB; Thu, 21 Sep 2017 10:16:26 +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 v8LAGQjc073016; Thu, 21 Sep 2017 10:16:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAGPqb073014; Thu, 21 Sep 2017 10:16:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709211016.v8LAGPqb073014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Sep 2017 10:16:25 +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: r323857 - stable/11/lib/libc/net X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/net X-SVN-Commit-Revision: 323857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:16:27 -0000 Author: kib Date: Thu Sep 21 10:16:25 2017 New Revision: 323857 URL: https://svnweb.freebsd.org/changeset/base/323857 Log: MFC r323597: Handle freeaddrinfo(NULL). Modified: stable/11/lib/libc/net/getaddrinfo.3 stable/11/lib/libc/net/getaddrinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/11/lib/libc/net/getaddrinfo.3 Thu Sep 21 10:14:43 2017 (r323856) +++ stable/11/lib/libc/net/getaddrinfo.3 Thu Sep 21 10:16:25 2017 (r323857) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2015 +.Dd September 13, 2017 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -351,6 +351,17 @@ pointer should be a .Li addrinfo structure created by a call to .Fn getaddrinfo . +.Sh IMPLEMENTATION NOTES +The behavior of +.Li freeadrinfo(NULL) +is left unspecified by both +.St -susv4 +and +.Dv "RFC 3493" . +The current implementation ignores a +.Dv NULL +argument for compatibility with programs that rely on the implementation +details of other operating systems. .Sh RETURN VALUES .Fn getaddrinfo returns zero on success or one of the error codes listed in Modified: stable/11/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/11/lib/libc/net/getaddrinfo.c Thu Sep 21 10:14:43 2017 (r323856) +++ stable/11/lib/libc/net/getaddrinfo.c Thu Sep 21 10:16:25 2017 (r323857) @@ -35,7 +35,7 @@ * in the source code. This is because RFC2553 is silent about which error * code must be returned for which situation. * - freeaddrinfo(NULL). RFC2553 is silent about it. XNET 5.2 says it is - * invalid. current code - SEGV on freeaddrinfo(NULL) + * invalid. Current code accepts NULL to be compatible with other OSes. * * Note: * - The code filters out AFs that are not supported by the kernel, @@ -359,14 +359,13 @@ freeaddrinfo(struct addrinfo *ai) { struct addrinfo *next; - do { + while (ai != NULL) { next = ai->ai_next; - if (ai->ai_canonname) - free(ai->ai_canonname); + free(ai->ai_canonname); /* no need to free(ai->ai_addr) */ free(ai); ai = next; - } while (ai); + } } static int From owner-svn-src-all@freebsd.org Thu Sep 21 10:16: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 9060FE22265; Thu, 21 Sep 2017 10:16:45 +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 5F73A72D00; Thu, 21 Sep 2017 10:16:45 +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 v8LAGi7Q073070; Thu, 21 Sep 2017 10:16:44 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAGig1073069; Thu, 21 Sep 2017 10:16:44 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211016.v8LAGig1073069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323858 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:16:45 -0000 Author: oshogbo Date: Thu Sep 21 10:16:44 2017 New Revision: 323858 URL: https://svnweb.freebsd.org/changeset/base/323858 Log: IMHO it is possible that failure will be treated as success because we don't initialize nvp on every loop iteration and the code under 'fail'(!) label detects success by checking of nvp != NULL. Submitted by: pjd@ MFC after: 1 month Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:16:25 2017 (r323857) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:16:44 2017 (r323858) @@ -1690,11 +1690,10 @@ nvpair_move_number_array(const char *name, uint64_t *v nvpair_t * nvpair_move_nvlist_array(const char *name, nvlist_t **value, size_t nitems) { + nvpair_t *parent; unsigned int ii; - nvpair_t *nvp; int flags; - nvp = NULL; if (value == NULL || nitems == 0) { ERRNO_SET(EINVAL); return (NULL); @@ -1707,6 +1706,8 @@ nvpair_move_nvlist_array(const char *name, nvlist_t ** goto fail; } if (ii > 0) { + nvpair_t *nvp; + nvp = nvpair_allocv(" ", NV_TYPE_NVLIST, (uint64_t)(uintptr_t)value[ii], 0, 0); if (nvp == NULL) @@ -1717,25 +1718,27 @@ nvpair_move_nvlist_array(const char *name, nvlist_t ** flags = nvlist_flags(value[nitems - 1]) | NV_FLAG_IN_ARRAY; nvlist_set_flags(value[nitems - 1], flags); - nvp = nvpair_allocv(name, NV_TYPE_NVLIST_ARRAY, + parent = nvpair_allocv(name, NV_TYPE_NVLIST_ARRAY, (uint64_t)(uintptr_t)value, 0, nitems); + if (parent == NULL) + goto fail; + + for (ii = 0; ii < nitems; ii++) + nvlist_set_parent(value[ii], parent); + + return (parent); fail: - if (nvp == NULL) { - ERRNO_SAVE(); - for (ii = 0; ii < nitems; ii++) { - if (value[ii] != NULL && - nvlist_get_pararr(value[ii], NULL) != NULL) { - nvlist_destroy(value[ii]); - } + ERRNO_SAVE(); + for (ii = 0; ii < nitems; ii++) { + if (value[ii] != NULL && + nvlist_get_pararr(value[ii], NULL) != NULL) { + nvlist_destroy(value[ii]); } - nv_free(value); - ERRNO_RESTORE(); - } else { - for (ii = 0; ii < nitems; ii++) - nvlist_set_parent(value[ii], nvp); } + nv_free(value); + ERRNO_RESTORE(); - return (nvp); + return (NULL); } #ifndef _KERNEL From owner-svn-src-all@freebsd.org Thu Sep 21 10:18: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 3BDEFE223AC; Thu, 21 Sep 2017 10:18:03 +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 0B30872E69; Thu, 21 Sep 2017 10:18:02 +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 v8LAI2A3073155; Thu, 21 Sep 2017 10:18:02 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LAI2Yp073154; Thu, 21 Sep 2017 10:18:02 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211018.v8LAI2Yp073154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323859 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:18:03 -0000 Author: oshogbo Date: Thu Sep 21 10:18:02 2017 New Revision: 323859 URL: https://svnweb.freebsd.org/changeset/base/323859 Log: Simplify the code by _not_ expecting success under 'fail'. Submitted by: pjd@ and oshogbo@ MFC after: 1 month Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:16:44 2017 (r323858) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:18:02 2017 (r323859) @@ -1748,7 +1748,6 @@ nvpair_move_descriptor_array(const char *name, int *va nvpair_t *nvp; size_t i; - nvp = NULL; if (value == NULL || nitems == 0) { ERRNO_SET(EINVAL); return (NULL); @@ -1763,19 +1762,20 @@ nvpair_move_descriptor_array(const char *name, int *va nvp = nvpair_allocv(name, NV_TYPE_DESCRIPTOR_ARRAY, (uint64_t)(uintptr_t)value, sizeof(value[0]) * nitems, nitems); + if (nvp == NULL) + goto fail; + return (nvp); fail: - if (nvp == NULL) { - ERRNO_SAVE(); - for (i = 0; i < nitems; i++) { - if (fd_is_valid(value[i])) - close(value[i]); - } - nv_free(value); - ERRNO_RESTORE(); + ERRNO_SAVE(); + for (i = 0; i < nitems; i++) { + if (fd_is_valid(value[i])) + close(value[i]); } + nv_free(value); + ERRNO_RESTORE(); - return (nvp); + return (NULL); } #endif From owner-svn-src-all@freebsd.org Thu Sep 21 10:28: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 5FE30E22CEB; Thu, 21 Sep 2017 10:28:24 +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 2EFAE734D9; Thu, 21 Sep 2017 10:28:24 +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 v8LASMQf077072; Thu, 21 Sep 2017 10:28:22 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LASMme077071; Thu, 21 Sep 2017 10:28:22 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211028.v8LASMme077071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 10:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323860 - head/sys/contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/contrib/libnv X-SVN-Commit-Revision: 323860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:28:24 -0000 Author: oshogbo Date: Thu Sep 21 10:28:22 2017 New Revision: 323860 URL: https://svnweb.freebsd.org/changeset/base/323860 Log: Plug memory leak in case when nvlist allocation succeeds, but nvpair allocation fails. Submitted by: pjd@ MFC after: 1 month Sponsored by: Wheel Systems Modified: head/sys/contrib/libnv/nvpair.c Modified: head/sys/contrib/libnv/nvpair.c ============================================================================== --- head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:18:02 2017 (r323859) +++ head/sys/contrib/libnv/nvpair.c Thu Sep 21 10:28:22 2017 (r323860) @@ -1087,7 +1087,7 @@ nvpair_unpack_nvlist_array(bool isbe __unused, nvpair_ return (ptr); fail: ERRNO_SAVE(); - for (j = 0; j < ii; j++) + for (j = 0; j <= ii; j++) nvlist_destroy(value[j]); nv_free(value); ERRNO_RESTORE(); From owner-svn-src-all@freebsd.org Thu Sep 21 11: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 23082E26EA3; Thu, 21 Sep 2017 11:56:33 +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 ECACA76061; Thu, 21 Sep 2017 11:56:32 +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 v8LBuW8J014191; Thu, 21 Sep 2017 11:56:32 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LBuVqS014187; Thu, 21 Sep 2017 11:56:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709211156.v8LBuVqS014187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 21 Sep 2017 11:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323861 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 11:56:33 -0000 Author: tuexen Date: Thu Sep 21 11:56:31 2017 New Revision: 323861 URL: https://svnweb.freebsd.org/changeset/base/323861 Log: Code cleanup, no functional change. MFC after: 1 week Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Thu Sep 21 10:28:22 2017 (r323860) +++ head/sys/netinet/sctp_constants.h Thu Sep 21 11:56:31 2017 (r323861) @@ -969,9 +969,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_SO_NOT_LOCKED 0 -#define SCTP_HOLDS_LOCK 1 -#define SCTP_NOT_LOCKED 0 - /*- * For address locks, do we hold the lock? */ Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Sep 21 10:28:22 2017 (r323860) +++ head/sys/netinet/sctp_input.c Thu Sep 21 11:56:31 2017 (r323861) @@ -197,8 +197,7 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offse sctp_send_initiate_ack(inp, stcb, net, m, iphlen, offset, src, dst, sh, cp, mflowtype, mflowid, - vrf_id, port, - ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED)); + vrf_id, port); } outnow: if (stcb == NULL) { Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Sep 21 10:28:22 2017 (r323860) +++ head/sys/netinet/sctp_output.c Thu Sep 21 11:56:31 2017 (r323861) @@ -5491,7 +5491,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *init_chk, uint8_t mflowtype, uint32_t mflowid, - uint32_t vrf_id, uint16_t port, int hold_inp_lock) + uint32_t vrf_id, uint16_t port) { struct sctp_association *asoc; struct mbuf *m, *m_tmp, *m_last, *m_cookie, *op_err; @@ -5839,10 +5839,6 @@ do_a_abort: } else { uint32_t vtag, itsn; - if (hold_inp_lock) { - SCTP_INP_INCR_REF(inp); - SCTP_INP_RUNLOCK(inp); - } if (asoc) { atomic_add_int(&asoc->refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -5862,12 +5858,12 @@ do_a_abort: SCTP_TCB_LOCK(stcb); atomic_add_int(&asoc->refcnt, -1); } else { + SCTP_INP_INCR_REF(inp); + SCTP_INP_RUNLOCK(inp); vtag = sctp_select_a_tag(inp, inp->sctp_lport, sh->src_port, 1); initack->init.initiate_tag = htonl(vtag); /* get a TSN to use too */ initack->init.initial_tsn = htonl(sctp_select_initial_TSN(&inp->sctp_ep)); - } - if (hold_inp_lock) { SCTP_INP_RLOCK(inp); SCTP_INP_DECR_REF(inp); } Modified: head/sys/netinet/sctp_output.h ============================================================================== --- head/sys/netinet/sctp_output.h Thu Sep 21 10:28:22 2017 (r323860) +++ head/sys/netinet/sctp_output.h Thu Sep 21 11:56:31 2017 (r323861) @@ -86,7 +86,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *, struct sct struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_init_chunk *, uint8_t, uint32_t, - uint32_t, uint16_t, int); + uint32_t, uint16_t); struct mbuf * sctp_arethere_unrecognized_parameters(struct mbuf *, int, int *, From owner-svn-src-all@freebsd.org Thu Sep 21 12:31: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 39540E0125C; Thu, 21 Sep 2017 12:31:52 +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 05F9B77B3B; Thu, 21 Sep 2017 12:31:51 +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 v8LCVp6q029978; Thu, 21 Sep 2017 12:31:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LCVpIh029977; Thu, 21 Sep 2017 12:31:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709211231.v8LCVpIh029977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Sep 2017 12:31: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: r323862 - stable/11/sys/contrib/octeon-sdk X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/contrib/octeon-sdk X-SVN-Commit-Revision: 323862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 12:31:52 -0000 Author: emaste Date: Thu Sep 21 12:31:51 2017 New Revision: 323862 URL: https://svnweb.freebsd.org/changeset/base/323862 Log: MFC r323587: octeon sdk: initialize variable to quiet Clang warning Clang complains "variable 'dummy' is uninitialized when used here". Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c ============================================================================== --- stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c Thu Sep 21 11:56:31 2017 (r323861) +++ stable/11/sys/contrib/octeon-sdk/cvmx-l2c.c Thu Sep 21 12:31:51 2017 (r323862) @@ -339,7 +339,7 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter) static void fault_in(uint64_t addr, int len) { volatile char *ptr; - volatile char dummy; + volatile char dummy = 0; /* * Adjust addr and length so we get all cache lines even for * small ranges spanning two cache lines. From owner-svn-src-all@freebsd.org Thu Sep 21 12:37: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 956AAE01635; Thu, 21 Sep 2017 12:37:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60E527C172; Thu, 21 Sep 2017 12:37: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 v8LCbCnR031207; Thu, 21 Sep 2017 12:37:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LCbCr5031206; Thu, 21 Sep 2017 12:37:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709211237.v8LCbCr5031206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 21 Sep 2017 12:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323863 - stable/11/usr.bin/ktrdump X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/usr.bin/ktrdump X-SVN-Commit-Revision: 323863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 12:37:13 -0000 Author: markj Date: Thu Sep 21 12:37:12 2017 New Revision: 323863 URL: https://svnweb.freebsd.org/changeset/base/323863 Log: MFC r323439: Provide an error message if KTR symbols in a vmcore cannot be resolved. Modified: stable/11/usr.bin/ktrdump/ktrdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ktrdump/ktrdump.c ============================================================================== --- stable/11/usr.bin/ktrdump/ktrdump.c Thu Sep 21 12:31:51 2017 (r323862) +++ stable/11/usr.bin/ktrdump/ktrdump.c Thu Sep 21 12:37:12 2017 (r323863) @@ -93,6 +93,7 @@ main(int ac, char **av) char *p; int version; int entries; + int count; int index, index2; int parm; int in; @@ -162,8 +163,12 @@ main(int ac, char **av) if ((kd = kvm_openfiles(Nflag ? execfile : NULL, Mflag ? corefile : NULL, NULL, O_RDONLY, errbuf)) == NULL) errx(1, "%s", errbuf); - if (kvm_nlist(kd, nl) != 0 || - kvm_read(kd, nl[0].n_value, &version, sizeof(version)) == -1) + count = kvm_nlist(kd, nl); + if (count == -1) + errx(1, "%s", kvm_geterr(kd)); + if (count > 0) + errx(1, "failed to resolve ktr symbols"); + if (kvm_read(kd, nl[0].n_value, &version, sizeof(version)) == -1) errx(1, "%s", kvm_geterr(kd)); if (version != KTR_VERSION) errx(1, "ktr version mismatch"); From owner-svn-src-all@freebsd.org Thu Sep 21 14: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 429DCE06C38; Thu, 21 Sep 2017 14:14:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10A627F96D; Thu, 21 Sep 2017 14:14:01 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LEE1BM072239; Thu, 21 Sep 2017 14:14:01 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LEE1QZ072238; Thu, 21 Sep 2017 14:14:01 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201709211414.v8LEE1QZ072238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 21 Sep 2017 14:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323864 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 14:14:02 -0000 Author: kp Date: Thu Sep 21 14:14:01 2017 New Revision: 323864 URL: https://svnweb.freebsd.org/changeset/base/323864 Log: bridge: Set module version This ensures that the loader will not load the module if it's also built in to the kernel. PR: 220860 Submitted by: Eugene Grosbein Reported by: Marie Helene Kvello-Aune Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Thu Sep 21 12:37:12 2017 (r323863) +++ head/sys/net/if_bridge.c Thu Sep 21 14:14:01 2017 (r323864) @@ -584,6 +584,7 @@ static moduledata_t bridge_mod = { }; DECLARE_MODULE(if_bridge, bridge_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +MODULE_VERSION(if_bridge, 1); MODULE_DEPEND(if_bridge, bridgestp, 1, 1, 1); /* From owner-svn-src-all@freebsd.org Thu Sep 21 14:14: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 6F688E06DA7; Thu, 21 Sep 2017 14:14:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF137FB8D; Thu, 21 Sep 2017 14:14:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LEEnHH072322; Thu, 21 Sep 2017 14:14:49 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LEEna8072320; Thu, 21 Sep 2017 14:14:49 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201709211414.v8LEEna8072320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 21 Sep 2017 14:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323865 - in head/bin/cat: . tests X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: in head/bin/cat: . tests X-SVN-Commit-Revision: 323865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 14:14:50 -0000 Author: sevan (doc committer) Date: Thu Sep 21 14:14:49 2017 New Revision: 323865 URL: https://svnweb.freebsd.org/changeset/base/323865 Log: Ammend bin/cat/cat.c so the output is the same aside from blank lines being numbered or unnumbered, depending on whether cat was invoked with -ne or -be. At present, when cat is invoked with -be, there is an aditional difference that the '$' on blank lines is placed on the far left of the output. Discussed in bug 210607. While here, revert the workaround from r304035 which skipped the unit test for this issue previously. PR: 210607 Submitted by: myself Reviewed by: bdrewery Obtained from: NetBSD Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12432 Modified: head/bin/cat/cat.c head/bin/cat/tests/Makefile Modified: head/bin/cat/cat.c ============================================================================== --- head/bin/cat/cat.c Thu Sep 21 14:14:01 2017 (r323864) +++ head/bin/cat/cat.c Thu Sep 21 14:14:49 2017 (r323865) @@ -226,10 +226,16 @@ cook_cat(FILE *fp) } else gobble = 0; } - if (nflag && (!bflag || ch != '\n')) { - (void)fprintf(stdout, "%6d\t", ++line); - if (ferror(stdout)) - break; + if (nflag) { + if (!bflag || ch != '\n') { + (void)fprintf(stdout, "%6d\t", ++line); + if (ferror(stdout)) + break; + } else if (eflag) { + (void)fprintf(stdout, "%6s\t", ""); + if (ferror(stdout)) + break; + } } } if (ch == '\n') { Modified: head/bin/cat/tests/Makefile ============================================================================== --- head/bin/cat/tests/Makefile Thu Sep 21 14:14:01 2017 (r323864) +++ head/bin/cat/tests/Makefile Thu Sep 21 14:14:49 2017 (r323865) @@ -17,10 +17,4 @@ ${PACKAGE}FILES+= d_vt_output.out .include -d_align.out: ${TESTSRC}/d_align.out - sed -E -e 's,^[[:space:]]{7}\$$$$,\$$,' < ${.ALLSRC} > ${.TARGET}.tmp - mv ${.TARGET}.tmp ${.TARGET} - -CLEANFILES+= d_align.out d_align.out.tmp - .include From owner-svn-src-all@freebsd.org Thu Sep 21 14:41: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 2C7A3E087B7; Thu, 21 Sep 2017 14:41:44 +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 EDC3E80C2B; Thu, 21 Sep 2017 14:41:43 +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 v8LEfhvh082247; Thu, 21 Sep 2017 14:41:43 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LEfg1w082237; Thu, 21 Sep 2017 14:41:42 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709211441.v8LEfg1w082237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 21 Sep 2017 14:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323866 - in head: contrib/tcpdump contrib/traceroute sbin/ping usr.bin/kdump usr.sbin/tcpdump/tcpdump usr.sbin/traceroute X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: contrib/tcpdump contrib/traceroute sbin/ping usr.bin/kdump usr.sbin/tcpdump/tcpdump usr.sbin/traceroute X-SVN-Commit-Revision: 323866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 14:41:44 -0000 Author: oshogbo Date: Thu Sep 21 14:41:41 2017 New Revision: 323866 URL: https://svnweb.freebsd.org/changeset/base/323866 Log: We use a few different ifdef's names to check if we are using Casper or not, let's standardize this. Now we are always use WITH_CASPER name. Discussed with: emaste@ MFC after: 1 month Modified: head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/tcpdump.c head/contrib/traceroute/traceroute.c head/sbin/ping/Makefile head/sbin/ping/ping.c head/usr.bin/kdump/Makefile head/usr.bin/kdump/kdump.c head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/config.h head/usr.sbin/traceroute/Makefile Modified: head/contrib/tcpdump/addrtoname.c ============================================================================== --- head/contrib/tcpdump/addrtoname.c Thu Sep 21 14:14:49 2017 (r323865) +++ head/contrib/tcpdump/addrtoname.c Thu Sep 21 14:41:41 2017 (r323866) @@ -26,10 +26,10 @@ #include "config.h" #endif -#ifdef HAVE_CASPER +#ifdef WITH_CASPER #include #include -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ #include @@ -202,7 +202,7 @@ intoa(uint32_t addr) static uint32_t f_netmask; static uint32_t f_localnet; -#ifdef HAVE_CASPER +#ifdef WITH_CASPER extern cap_channel_t *capdns; #endif @@ -250,7 +250,7 @@ getname(netdissect_options *ndo, const u_char *ap) */ if (!ndo->ndo_nflag && (addr & f_netmask) == f_localnet) { -#ifdef HAVE_CASPER +#ifdef WITH_CASPER if (capdns != NULL) { hp = cap_gethostbyaddr(capdns, (char *)&addr, 4, AF_INET); @@ -311,7 +311,7 @@ getname6(netdissect_options *ndo, const u_char *ap) * Do not print names if -n was given. */ if (!ndo->ndo_nflag) { -#ifdef HAVE_CASPER +#ifdef WITH_CASPER if (capdns != NULL) { hp = cap_gethostbyaddr(capdns, (char *)&addr, sizeof(addr), AF_INET6); Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Thu Sep 21 14:14:49 2017 (r323865) +++ head/contrib/tcpdump/tcpdump.c Thu Sep 21 14:41:41 2017 (r323866) @@ -82,10 +82,10 @@ The Regents of the University of California. All righ #include #include #include -#ifdef HAVE_CASPER +#ifdef WITH_CASPER #include #include -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ #endif /* HAVE_CAPSICUM */ #include #include @@ -176,7 +176,7 @@ static int infoprint; char *program_name; -#ifdef HAVE_CASPER +#ifdef WITH_CASPER cap_channel_t *capdns; #endif @@ -730,7 +730,7 @@ get_next_file(FILE *VFile, char *ptr) return ret; } -#ifdef HAVE_CASPER +#ifdef WITH_CASPER static cap_channel_t * capdns_setup(void) { @@ -757,7 +757,7 @@ capdns_setup(void) return (capdnsloc); } -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ #ifdef HAVE_PCAP_SET_TSTAMP_PRECISION static int @@ -1839,10 +1839,10 @@ main(int argc, char **argv) exit_tcpdump(0); } -#ifdef HAVE_CASPER +#ifdef WITH_CASPER if (!ndo->ndo_nflag) capdns = capdns_setup(); -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ init_print(ndo, localnet, netmask, timezone_offset); @@ -2066,11 +2066,11 @@ main(int argc, char **argv) #ifdef HAVE_CAPSICUM cansandbox = (VFileName == NULL && zflag == NULL); -#ifdef HAVE_CASPER +#ifdef WITH_CASPER cansandbox = (cansandbox && (ndo->ndo_nflag || capdns != NULL)); #else cansandbox = (cansandbox && ndo->ndo_nflag); -#endif /* HAVE_CASPER */ +#endif /* WITH_CASPER */ if (cansandbox && cap_enter() < 0 && errno != ENOSYS) error("unable to enter the capability mode"); #endif /* HAVE_CAPSICUM */ Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Thu Sep 21 14:14:49 2017 (r323865) +++ head/contrib/traceroute/traceroute.c Thu Sep 21 14:41:41 2017 (r323866) @@ -227,7 +227,7 @@ static const char rcsid[] = #include -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #include #endif @@ -369,7 +369,7 @@ extern int optind; extern int opterr; extern char *optarg; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns; #endif @@ -521,7 +521,7 @@ main(int argc, char **argv) int requestPort = -1; int sump = 0; int sockerrno; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER const char *types[] = { "NAME", "ADDR" }; int families[1]; cap_channel_t *casper; @@ -556,7 +556,7 @@ main(int argc, char **argv) exit(1); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER casper = cap_init(); if (casper == NULL) errx(1, "unable to create casper process"); @@ -568,7 +568,7 @@ main(int argc, char **argv) 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 */ +#endif /* WITH_CASPER */ #ifdef IPCTL_DEFTTL { @@ -584,7 +584,7 @@ main(int argc, char **argv) max_ttl = 30; #endif -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER cap_close(casper); #endif @@ -1006,7 +1006,7 @@ main(int argc, char **argv) exit(1); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER cansandbox = true; #else if (nflag) @@ -1851,7 +1851,7 @@ inetname(struct in_addr in) else { cp = strchr(domain, '.'); if (cp == NULL) { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname(capdns, domain); else @@ -1870,7 +1870,7 @@ inetname(struct in_addr in) } } if (!nflag && in.s_addr != INADDR_ANY) { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyaddr(capdns, (char *)&in, sizeof(in), AF_INET); @@ -1922,7 +1922,7 @@ gethostinfo(register char *hostname) return (hi); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname(capdns, hostname); else Modified: head/sbin/ping/Makefile ============================================================================== --- head/sbin/ping/Makefile Thu Sep 21 14:14:49 2017 (r323865) +++ head/sbin/ping/Makefile Thu Sep 21 14:41:41 2017 (r323866) @@ -14,7 +14,7 @@ LIBADD= m .if ${MK_CASPER} != "no" && !defined(RESCUE) LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DHAVE_LIBCASPER +CFLAGS+=-DWITH_CASPER .endif .if !defined(RELEASE_CRUNCH) Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Thu Sep 21 14:14:49 2017 (r323865) +++ head/sbin/ping/ping.c Thu Sep 21 14:41:41 2017 (r323866) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #include #endif @@ -204,13 +204,13 @@ static double tsumsq = 0.0; /* sum of all times square static volatile sig_atomic_t finish_up; static volatile sig_atomic_t siginfo_p; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns; #endif static void fill(char *, char *); static u_short in_cksum(u_short *, int); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns_setup(void); #endif static void check_status(void); @@ -563,7 +563,7 @@ main(int argc, char *const *argv) if (options & F_PINGFILLED) { fill((char *)datap, payload); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER capdns = capdns_setup(); #endif if (source) { @@ -572,7 +572,7 @@ main(int argc, char *const *argv) if (inet_aton(source, &sock_in.sin_addr) != 0) { shostname = source; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname2(capdns, source, AF_INET); @@ -606,7 +606,7 @@ main(int argc, char *const *argv) if (inet_aton(target, &to->sin_addr) != 0) { hostname = target; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname2(capdns, target, AF_INET); else @@ -624,7 +624,7 @@ main(int argc, char *const *argv) hostname = hnamebuf; } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER /* From now on we will use only reverse DNS lookups. */ if (capdns != NULL) { const char *types[1]; @@ -722,7 +722,7 @@ main(int argc, char *const *argv) if (options & F_NUMERIC) cansandbox = true; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER else if (capdns != NULL) cansandbox = true; #endif @@ -1707,7 +1707,7 @@ pr_addr(struct in_addr ina) if (options & F_NUMERIC) return inet_ntoa(ina); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyaddr(capdns, (char *)&ina, 4, AF_INET); else @@ -1791,7 +1791,7 @@ fill(char *bp, char *patp) } } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t * capdns_setup(void) { @@ -1817,7 +1817,7 @@ capdns_setup(void) return (capdnsloc); } -#endif /* HAVE_LIBCASPER */ +#endif /* WITH_CASPER */ #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) #define SECOPT " [-P policy]" Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Thu Sep 21 14:14:49 2017 (r323865) +++ head/usr.bin/kdump/Makefile Thu Sep 21 14:41:41 2017 (r323866) @@ -14,7 +14,7 @@ LIBADD= sysdecode LIBADD+= casper LIBADD+= cap_grp LIBADD+= cap_pwd -CFLAGS+=-DHAVE_LIBCASPER +CFLAGS+=-DWITH_CASPER .endif #NO_WERROR?= YES Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Thu Sep 21 14:14:49 2017 (r323865) +++ head/usr.bin/kdump/kdump.c Thu Sep 21 14:41:41 2017 (r323866) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #endif #include @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include "ktrace.h" -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include #include @@ -164,7 +164,7 @@ struct proc_info static TAILQ_HEAD(trace_procs, proc_info) trace_procs; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *cappwd, *capgrp; #endif @@ -193,7 +193,7 @@ localtime_init(void) (void)localtime(<ime); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static int cappwdgrp_setup(cap_channel_t **cappwdp, cap_channel_t **capgrpp) { @@ -235,7 +235,7 @@ cappwdgrp_setup(cap_channel_t **cappwdp, cap_channel_t *capgrpp = capgrploc; return (0); } -#endif /* HAVE_LIBCASPER */ +#endif /* WITH_CASPER */ static void print_integer_arg(const char *(*decoder)(int), int value) @@ -443,7 +443,7 @@ main(int argc, char *argv[]) strerror_init(); localtime_init(); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (resolv != 0) { if (cappwdgrp_setup(&cappwd, &capgrp) < 0) { cappwd = NULL; @@ -1874,7 +1874,7 @@ ktrstat(struct stat *statp) if (resolv == 0) { pwd = NULL; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (cappwd != NULL) pwd = cap_getpwuid(cappwd, statp->st_uid); else @@ -1888,7 +1888,7 @@ ktrstat(struct stat *statp) if (resolv == 0) { grp = NULL; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capgrp != NULL) grp = cap_getgrgid(capgrp, statp->st_gid); else Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Thu Sep 21 14:14:49 2017 (r323865) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Thu Sep 21 14:41:41 2017 (r323866) @@ -190,7 +190,7 @@ LIBADD= l pcap .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DHAVE_CASPER +CFLAGS+=-DWITH_CASPER .endif .if ${MK_OPENSSL} != "no" LIBADD+= crypto Modified: head/usr.sbin/tcpdump/tcpdump/config.h ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/config.h Thu Sep 21 14:14:49 2017 (r323865) +++ head/usr.sbin/tcpdump/tcpdump/config.h Thu Sep 21 14:41:41 2017 (r323866) @@ -18,7 +18,7 @@ /* Casper library support available */ /* See Makefile */ -/* #undef HAVE_CASPER */ +/* #undef WITH_CASPER */ /* Define to 1 if you have the `cap_enter' function. */ #define HAVE_CAP_ENTER 1 Modified: head/usr.sbin/traceroute/Makefile ============================================================================== --- head/usr.sbin/traceroute/Makefile Thu Sep 21 14:14:49 2017 (r323865) +++ head/usr.sbin/traceroute/Makefile Thu Sep 21 14:41:41 2017 (r323866) @@ -33,7 +33,7 @@ LIBADD+= ipsec .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DHAVE_LIBCASPER +CFLAGS+=-DWITH_CASPER .endif CFLAGS+= -I${TRACEROUTE_DISTDIR} From owner-svn-src-all@freebsd.org Thu Sep 21 15:30: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 19975E0B37A; Thu, 21 Sep 2017 15:30:22 +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 DCE89828B8; Thu, 21 Sep 2017 15:30:21 +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 v8LFULJX002167; Thu, 21 Sep 2017 15:30:21 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LFULoR002166; Thu, 21 Sep 2017 15:30:21 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709211530.v8LFULoR002166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 21 Sep 2017 15:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323867 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 15:30:22 -0000 Author: tsoome Date: Thu Sep 21 15:30:20 2017 New Revision: 323867 URL: https://svnweb.freebsd.org/changeset/base/323867 Log: libefi: devicename.c cleanups Remove duplicated free()+return statements, default unit to 0 and improve strtol error processing. Modified: head/sys/boot/efi/libefi/devicename.c Modified: head/sys/boot/efi/libefi/devicename.c ============================================================================== --- head/sys/boot/efi/libefi/devicename.c Thu Sep 21 14:41:41 2017 (r323866) +++ head/sys/boot/efi/libefi/devicename.c Thu Sep 21 15:30:20 2017 (r323867) @@ -87,9 +87,9 @@ efi_parsedev(struct devdesc **dev, const char *devspec { struct devdesc *idev; struct devsw *dv; + int i, unit, err; char *cp; const char *np; - int i, err; /* minimum length check */ if (strlen(devspec) < 2) @@ -105,6 +105,7 @@ efi_parsedev(struct devdesc **dev, const char *devspec return (ENOENT); np = devspec + strlen(dv->dv_name); + idev = NULL; err = 0; switch (dv->dv_type) { @@ -117,10 +118,8 @@ efi_parsedev(struct devdesc **dev, const char *devspec return (ENOMEM); err = disk_parsedev((struct disk_devdesc *)idev, np, path); - if (err != 0) { - free(idev); - return (err); - } + if (err != 0) + goto fail; break; #ifdef EFI_ZFS_BOOT @@ -130,10 +129,8 @@ efi_parsedev(struct devdesc **dev, const char *devspec return (ENOMEM); err = zfs_parsedev((struct zfs_devdesc*)idev, np, path); - if (err != 0) { - free(idev); - return (err); - } + if (err != 0) + goto fail; break; #endif default: @@ -141,20 +138,23 @@ efi_parsedev(struct devdesc **dev, const char *devspec if (idev == NULL) return (ENOMEM); - idev->d_unit = -1; + unit = 0; cp = (char *)np; + if (*np != '\0' && *np != ':') { - idev->d_unit = strtol(np, &cp, 0); - if (cp == np) { - free(idev); - return (EUNIT); + errno = 0; + unit = strtol(np, &cp, 0); + if (errno != 0 || cp == np) { + err = EUNIT; + goto fail; } } if (*cp != '\0' && *cp != ':') { - free(idev); - return (EINVAL); + err = EINVAL; + goto fail; } + idev->d_unit = unit; if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; @@ -168,6 +168,10 @@ efi_parsedev(struct devdesc **dev, const char *devspec else free(idev); return (0); + +fail: + free(idev); + return (err); } char * From owner-svn-src-all@freebsd.org Thu Sep 21 15:32: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 2161AE0B73A; Thu, 21 Sep 2017 15:32:43 +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 E3F0A82CBB; Thu, 21 Sep 2017 15:32:42 +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 v8LFWgpC006135; Thu, 21 Sep 2017 15:32:42 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LFWfwo006133; Thu, 21 Sep 2017 15:32:41 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201709211532.v8LFWfwo006133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 21 Sep 2017 15:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323868 - head/sys/dev/drm2/i915 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/dev/drm2/i915 X-SVN-Commit-Revision: 323868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 15:32:43 -0000 Author: alc Date: Thu Sep 21 15:32:41 2017 New Revision: 323868 URL: https://svnweb.freebsd.org/changeset/base/323868 Log: Modernize calls to vm_page_unwire(). As of r288122, vm_page_unwire() accepts PQ_NONE as the specified queue and returns a Boolean indicating whether the page's wire count transitioned to zero. Use these features in dev/drm2. Reviewed by: kib, markj MFC after: 1 week Modified: head/sys/dev/drm2/i915/i915_gem.c head/sys/dev/drm2/i915/i915_gem_gtt.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Thu Sep 21 15:30:20 2017 (r323867) +++ head/sys/dev/drm2/i915/i915_gem.c Thu Sep 21 15:32:41 2017 (r323868) @@ -1890,8 +1890,7 @@ i915_gem_object_put_pages_range_locked(struct drm_i915 KASSERT(page->pindex == i, ("pindex %jx %jx", (uintmax_t)page->pindex, (uintmax_t)i)); vm_page_lock(page); - vm_page_unwire(page, PQ_INACTIVE); - if (page->wire_count == 0) + if (vm_page_unwire(page, PQ_INACTIVE)) atomic_add_long(&i915_gem_wired_pages_cnt, -1); vm_page_unlock(page); } Modified: head/sys/dev/drm2/i915/i915_gem_gtt.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem_gtt.c Thu Sep 21 15:30:20 2017 (r323867) +++ head/sys/dev/drm2/i915/i915_gem_gtt.c Thu Sep 21 15:32:41 2017 (r323868) @@ -198,7 +198,7 @@ err_pt_alloc: free(ppgtt->pt_dma_addr, DRM_I915_GEM); for (i = 0; i < ppgtt->num_pd_entries; i++) { if (ppgtt->pt_pages[i]) { - vm_page_unwire(ppgtt->pt_pages[i], PQ_INACTIVE); + vm_page_unwire(ppgtt->pt_pages[i], PQ_NONE); vm_page_free(ppgtt->pt_pages[i]); } } @@ -228,7 +228,7 @@ void i915_gem_cleanup_aliasing_ppgtt(struct drm_device free(ppgtt->pt_dma_addr, DRM_I915_GEM); for (i = 0; i < ppgtt->num_pd_entries; i++) { - vm_page_unwire(ppgtt->pt_pages[i], PQ_INACTIVE); + vm_page_unwire(ppgtt->pt_pages[i], PQ_NONE); vm_page_free(ppgtt->pt_pages[i]); } free(ppgtt->pt_pages, DRM_I915_GEM); From owner-svn-src-all@freebsd.org Thu Sep 21 18:06: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 8F314E1672A; Thu, 21 Sep 2017 18:06:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CCC763F83; Thu, 21 Sep 2017 18:06:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LI6Lb7070310; Thu, 21 Sep 2017 18:06:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LI6LOe070309; Thu, 21 Sep 2017 18:06:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709211806.v8LI6LOe070309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 21 Sep 2017 18:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323869 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 323869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 18:06:22 -0000 Author: cem Date: Thu Sep 21 18:06:21 2017 New Revision: 323869 URL: https://svnweb.freebsd.org/changeset/base/323869 Log: cryptotest.py: Do not run AES-CBC or AES-GCM tests on non-AES crypto(4) drivers For some reason, we only skipped AES-XTS tests if a driver was not in the aesmodules list. Skip other AES modes as well to prevent spurious failures in non-AES drivers. Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Thu Sep 21 15:32:41 2017 (r323868) +++ head/tests/sys/opencrypto/cryptotest.py Thu Sep 21 18:06:21 2017 (r323869) @@ -62,10 +62,12 @@ def GenTestCase(cname): for i in katg('XTSTestVectors/format tweak value input - data unit seq no', '*.rsp'): self.runXTS(i, cryptodev.CRYPTO_AES_XTS) + @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % `cname`) def test_cbc(self): for i in katg('KAT_AES', 'CBC[GKV]*.rsp'): self.runCBC(i) + @unittest.skipIf(cname not in aesmodules, 'skipping AES on %s' % `cname`) def test_gcm(self): for i in katg('gcmtestvectors', 'gcmEncrypt*'): self.runGCM(i, 'ENCRYPT') From owner-svn-src-all@freebsd.org Thu Sep 21 18:38: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 6AD4FE187DD; Thu, 21 Sep 2017 18:38:54 +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 476496555F; Thu, 21 Sep 2017 18:38:54 +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 5A03410A8BB; Thu, 21 Sep 2017 14:38:52 -0400 (EDT) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" Cc: Josh Paetzel , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r323770 - in stable/11/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf Date: Thu, 21 Sep 2017 10:01:25 -0700 Message-ID: <5939056.dt9NlW2kID@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> References: <201709191651.v8JGpp5v048489@repo.freebsd.org> <2B7D21C6-56EE-4ADE-815C-70477C137A82@gmail.com> 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); Thu, 21 Sep 2017 14:38:52 -0400 (EDT) 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, 21 Sep 2017 18:38:54 -0000 On Wednesday, September 20, 2017 12:41:13 AM Ngie Cooper wrote: >=20 > > On Sep 19, 2017, at 09:51, Josh Paetzel wrot= e: > >=20 > > Author: jpaetzel > > Date: Tue Sep 19 16:51:51 2017 > > New Revision: 323770 > > URL: https://svnweb.freebsd.org/changeset/base/323770 > >=20 > > Log: > > MFC: 323068 > >=20 > > Allow kldload tcpmd5 >=20 > Wasn=E2=80=99t this reverted on ^/head ? I thought only the removal of IPSEC (r323087) was reverted in r323103? --=20 John Baldwin From owner-svn-src-all@freebsd.org Thu Sep 21 19:24: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 6E42AE1C403; Thu, 21 Sep 2017 19:24:14 +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 48A8266BE2; Thu, 21 Sep 2017 19:24:14 +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 v8LJODeX003438; Thu, 21 Sep 2017 19:24:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LJOCnA003423; Thu, 21 Sep 2017 19:24:12 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709211924.v8LJOCnA003423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 21 Sep 2017 19:24: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: r323870 - in stable/10: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in stable/10: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 323870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 19:24:14 -0000 Author: marius Date: Thu Sep 21 19:24:11 2017 New Revision: 323870 URL: https://svnweb.freebsd.org/changeset/base/323870 Log: MFC: r275751 Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9). A _NEW flag passed to _init_flags() to avoid check for double-init. Modified: stable/10/share/man/man9/mutex.9 stable/10/share/man/man9/rmlock.9 stable/10/share/man/man9/rwlock.9 stable/10/share/man/man9/sx.9 stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rmlock.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/subr_lock.c stable/10/sys/sys/lock.h stable/10/sys/sys/mutex.h stable/10/sys/sys/rmlock.h stable/10/sys/sys/rwlock.h stable/10/sys/sys/sx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/mutex.9 ============================================================================== --- stable/10/share/man/man9/mutex.9 Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/share/man/man9/mutex.9 Thu Sep 21 19:24:11 2017 (r323870) @@ -183,13 +183,17 @@ It may contain either or .Dv MTX_SPIN but not both. -See below for additional initialization options. -It is not permissible to pass the same -.Fa mutex -to +If the kernel has been compiled with +.Cd "option INVARIANTS" , .Fn mtx_init -multiple times without intervening calls to -.Fn mtx_destroy . +will assert that the +.Fa mutex +has not been initialized multiple times without intervening calls to +.Fn mtx_destroy +unless the +.Dv MTX_NEW +option is specified. +See below for additional initialization options. .Pp The .Fn mtx_lock @@ -473,6 +477,8 @@ to ignore this lock. Witness should not log messages about duplicate locks being acquired. .It Dv MTX_NOPROFILE Do not profile this lock. +.It Dv MTX_NEW +Do not check for double-init. .El .Ss Lock and Unlock Flags The flags passed to the Modified: stable/10/share/man/man9/rmlock.9 ============================================================================== --- stable/10/share/man/man9/rmlock.9 Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/share/man/man9/rmlock.9 Thu Sep 21 19:24:11 2017 (r323870) @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" Based on rwlock.9 man page -.Dd June 25, 2013 +.Dd December 13, 2014 .Dt RMLOCK 9 .Os .Sh NAME @@ -156,6 +156,15 @@ Allow threads to recursively acquire shared locks for .Fa rm . .It Dv RM_SLEEPABLE Create a sleepable read-mostly lock. +.It Dv RM_NEW +If the kernel has been compiled with +.Cd "option INVARIANTS" , +.Fn rm_init_flags +will assert that the +.Fa rm +has not been initialized multiple times without intervening calls to +.Fn rm_destroy +unless this option is specified. .El .It Fn rm_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Lock Modified: stable/10/share/man/man9/rwlock.9 ============================================================================== --- stable/10/share/man/man9/rwlock.9 Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/share/man/man9/rwlock.9 Thu Sep 21 19:24:11 2017 (r323870) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2013 +.Dd December 13, 2014 .Dt RWLOCK 9 .Os .Sh NAME @@ -154,6 +154,15 @@ Do not log any operations for this lock via .It Dv RW_RECURSE Allow threads to recursively acquire exclusive locks for .Fa rw . +.It Dv RW_NEW +If the kernel has been compiled with +.Cd "option INVARIANTS" , +.Fn rw_init_flags +will assert that the +.Fa rw +has not been initialized multiple times without intervening calls to +.Fn rw_destroy +unless this option is specified. .El .It Fn rw_rlock "struct rwlock *rw" Lock Modified: stable/10/share/man/man9/sx.9 ============================================================================== --- stable/10/share/man/man9/sx.9 Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/share/man/man9/sx.9 Thu Sep 21 19:24:11 2017 (r323870) @@ -142,6 +142,15 @@ Allow threads to recursively acquire exclusive locks f .It Dv SX_QUIET Do not log any operations for this lock via .Xr ktr 4 . +.It Dv SX_NEW +If the kernel has been compiled with +.Cd "options INVARIANTS" , +.Fn sx_init +will assert that the +.Fa sx +has not been initialized multiple times without intervening calls to +.Fn sx_destroy +unless this option is specified. .El .Pp Shared/exclusive locks are destroyed with Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/kern/kern_mutex.c Thu Sep 21 19:24:11 2017 (r323870) @@ -979,7 +979,7 @@ _mtx_init(volatile uintptr_t *c, const char *name, con m = mtxlock2mtx(c); MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | - MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE)) == 0); + MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE | MTX_NEW)) == 0); ASSERT_ATOMIC_LOAD_PTR(m->mtx_lock, ("%s: mtx_lock not aligned for %s: %p", __func__, name, &m->mtx_lock)); @@ -1005,6 +1005,8 @@ _mtx_init(volatile uintptr_t *c, const char *name, con flags |= LO_DUPOK; if (opts & MTX_NOPROFILE) flags |= LO_NOPROFILE; + if (opts & MTX_NEW) + flags |= LO_NEW; /* Initialize mutex. */ lock_init(&m->lock_object, class, name, type, flags); Modified: stable/10/sys/kern/kern_rmlock.c ============================================================================== --- stable/10/sys/kern/kern_rmlock.c Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/kern/kern_rmlock.c Thu Sep 21 19:24:11 2017 (r323870) @@ -278,22 +278,28 @@ void rm_init_flags(struct rmlock *rm, const char *name, int opts) { struct lock_class *lc; - int liflags; + int liflags, xflags; liflags = 0; if (!(opts & RM_NOWITNESS)) liflags |= LO_WITNESS; if (opts & RM_RECURSE) liflags |= LO_RECURSABLE; + if (opts & RM_NEW) + liflags |= LO_NEW; rm->rm_writecpus = all_cpus; LIST_INIT(&rm->rm_activeReaders); if (opts & RM_SLEEPABLE) { liflags |= LO_SLEEPABLE; lc = &lock_class_rm_sleepable; - sx_init_flags(&rm->rm_lock_sx, "rmlock_sx", SX_NOWITNESS); + xflags = (opts & RM_NEW ? SX_NEW : 0); + sx_init_flags(&rm->rm_lock_sx, "rmlock_sx", + xflags | SX_NOWITNESS); } else { lc = &lock_class_rm; - mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", MTX_NOWITNESS); + xflags = (opts & RM_NEW ? MTX_NEW : 0); + mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", + xflags | MTX_NOWITNESS); } lock_init(&rm->lock_object, lc, name, NULL, liflags); } Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/kern/kern_rwlock.c Thu Sep 21 19:24:11 2017 (r323870) @@ -216,7 +216,7 @@ _rw_init_flags(volatile uintptr_t *c, const char *name rw = rwlock2rw(c); MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | - RW_RECURSE)) == 0); + RW_RECURSE | RW_NEW)) == 0); ASSERT_ATOMIC_LOAD_PTR(rw->rw_lock, ("%s: rw_lock not aligned for %s: %p", __func__, name, &rw->rw_lock)); @@ -232,6 +232,8 @@ _rw_init_flags(volatile uintptr_t *c, const char *name flags |= LO_RECURSABLE; if (opts & RW_QUIET) flags |= LO_QUIET; + if (opts & RW_NEW) + flags |= LO_NEW; lock_init(&rw->lock_object, &lock_class_rw, name, NULL, flags); rw->rw_lock = RW_UNLOCKED; Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/kern/kern_sx.c Thu Sep 21 19:24:11 2017 (r323870) @@ -240,7 +240,7 @@ sx_init_flags(struct sx *sx, const char *description, int flags; MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK | - SX_NOPROFILE | SX_NOADAPTIVE)) == 0); + SX_NOPROFILE | SX_NOADAPTIVE | SX_NEW)) == 0); ASSERT_ATOMIC_LOAD_PTR(sx->sx_lock, ("%s: sx_lock not aligned for %s: %p", __func__, description, &sx->sx_lock)); @@ -256,6 +256,8 @@ sx_init_flags(struct sx *sx, const char *description, flags |= LO_RECURSABLE; if (opts & SX_QUIET) flags |= LO_QUIET; + if (opts & SX_NEW) + flags |= LO_NEW; flags |= opts & SX_NOADAPTIVE; lock_init(&sx->lock_object, &lock_class_sx, description, NULL, flags); Modified: stable/10/sys/kern/subr_lock.c ============================================================================== --- stable/10/sys/kern/subr_lock.c Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/kern/subr_lock.c Thu Sep 21 19:24:11 2017 (r323870) @@ -76,8 +76,8 @@ lock_init(struct lock_object *lock, struct lock_class int i; /* Check for double-init and zero object. */ - KASSERT(!lock_initalized(lock), ("lock \"%s\" %p already initialized", - name, lock)); + KASSERT(flags & LO_NEW || !lock_initalized(lock), + ("lock \"%s\" %p already initialized", name, lock)); /* Look up lock class to find its index. */ for (i = 0; i < LOCK_CLASS_MAX; i++) Modified: stable/10/sys/sys/lock.h ============================================================================== --- stable/10/sys/sys/lock.h Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/sys/lock.h Thu Sep 21 19:24:11 2017 (r323870) @@ -83,6 +83,7 @@ struct lock_class { #define LO_IS_VNODE 0x00800000 /* Tell WITNESS about a VNODE lock */ #define LO_CLASSMASK 0x0f000000 /* Class index bitmask. */ #define LO_NOPROFILE 0x10000000 /* Don't profile this lock */ +#define LO_NEW 0x20000000 /* Don't check for double-init */ /* * Lock classes are statically assigned an index into the gobal lock_classes Modified: stable/10/sys/sys/mutex.h ============================================================================== --- stable/10/sys/sys/mutex.h Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/sys/mutex.h Thu Sep 21 19:24:11 2017 (r323870) @@ -52,6 +52,7 @@ #define MTX_RECURSE 0x00000004 /* Option: lock allowed to recurse */ #define MTX_NOWITNESS 0x00000008 /* Don't do any witness checking. */ #define MTX_NOPROFILE 0x00000020 /* Don't profile this lock */ +#define MTX_NEW 0x00000040 /* Don't check for double-init */ /* * Option flags passed to certain lock/unlock routines, through the use Modified: stable/10/sys/sys/rmlock.h ============================================================================== --- stable/10/sys/sys/rmlock.h Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/sys/rmlock.h Thu Sep 21 19:24:11 2017 (r323870) @@ -45,6 +45,7 @@ #define RM_NOWITNESS 0x00000001 #define RM_RECURSE 0x00000002 #define RM_SLEEPABLE 0x00000004 +#define RM_NEW 0x00000008 void rm_init(struct rmlock *rm, const char *name); void rm_init_flags(struct rmlock *rm, const char *name, int opts); Modified: stable/10/sys/sys/rwlock.h ============================================================================== --- stable/10/sys/sys/rwlock.h Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/sys/rwlock.h Thu Sep 21 19:24:11 2017 (r323870) @@ -254,6 +254,7 @@ struct rw_args_flags { #define RW_NOWITNESS 0x04 #define RW_QUIET 0x08 #define RW_RECURSE 0x10 +#define RW_NEW 0x20 /* * The INVARIANTS-enabled rw_assert() functionality. Modified: stable/10/sys/sys/sx.h ============================================================================== --- stable/10/sys/sys/sx.h Thu Sep 21 18:06:21 2017 (r323869) +++ stable/10/sys/sys/sx.h Thu Sep 21 19:24:11 2017 (r323870) @@ -289,6 +289,7 @@ __sx_sunlock(struct sx *sx, const char *file, int line #define SX_QUIET 0x08 #define SX_NOADAPTIVE 0x10 #define SX_RECURSE 0x20 +#define SX_NEW 0x40 /* * Options passed to sx_*lock_hard(). From owner-svn-src-all@freebsd.org Thu Sep 21 19:30: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 C1CEDE1CAB9; Thu, 21 Sep 2017 19:30:33 +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 9903366EC5; Thu, 21 Sep 2017 19:30:33 +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 v8LJUWlj003726; Thu, 21 Sep 2017 19:30:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LJUW1B003724; Thu, 21 Sep 2017 19:30:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709211930.v8LJUW1B003724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 21 Sep 2017 19:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323871 - stable/10/sys/crypto/aesni X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/crypto/aesni X-SVN-Commit-Revision: 323871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 19:30:33 -0000 Author: marius Date: Thu Sep 21 19:30:32 2017 New Revision: 323871 URL: https://svnweb.freebsd.org/changeset/base/323871 Log: MFC: r285215 remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx... MFC: r285289 address an issue where consumers, like IPsec, can reuse the same session in multiple threads w/o locking.. There was a single fpu context shared per session, if multiple threads were using the session, and both migrated away, they could corrupt each other's fpu context... MFC: r285297 upon further examination, it turns out that _unregister_all already provides the guarantee that no threads will be in the _newsession code.. MFC: r298332 aesni(4): Initialize error before use [1] Reported by: Coverity [1] CID: 1331554 [1] Modified: stable/10/sys/crypto/aesni/aesni.c stable/10/sys/crypto/aesni/aesni.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/crypto/aesni/aesni.c ============================================================================== --- stable/10/sys/crypto/aesni/aesni.c Thu Sep 21 19:24:11 2017 (r323870) +++ stable/10/sys/crypto/aesni/aesni.c Thu Sep 21 19:30:32 2017 (r323871) @@ -39,16 +39,34 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +static struct mtx_padalign *ctx_mtx; +static struct fpu_kern_ctx **ctx_fpu; + struct aesni_softc { + int dieing; int32_t cid; uint32_t sid; TAILQ_HEAD(aesni_sessions_head, aesni_session) sessions; struct rwlock lock; }; +#define AQUIRE_CTX(i, ctx) \ + do { \ + (i) = PCPU_GET(cpuid); \ + mtx_lock(&ctx_mtx[(i)]); \ + (ctx) = ctx_fpu[(i)]; \ + } while (0) +#define RELEASE_CTX(i, ctx) \ + do { \ + mtx_unlock(&ctx_mtx[(i)]); \ + (i) = -1; \ + (ctx) = NULL; \ + } while (0) + static int aesni_newsession(device_t, uint32_t *sidp, struct cryptoini *cri); static int aesni_freesession(device_t, uint64_t tid); static void aesni_freesession_locked(struct aesni_softc *sc, @@ -88,14 +106,36 @@ aesni_probe(device_t dev) return (0); } +static void +aensi_cleanctx(void) +{ + int i; + + /* XXX - no way to return driverid */ + CPU_FOREACH(i) { + if (ctx_fpu[i] != NULL) { + mtx_destroy(&ctx_mtx[i]); + fpu_kern_free_ctx(ctx_fpu[i]); + } + ctx_fpu[i] = NULL; + } + free(ctx_mtx, M_AESNI); + ctx_mtx = NULL; + free(ctx_fpu, M_AESNI); + ctx_fpu = NULL; +} + static int aesni_attach(device_t dev) { struct aesni_softc *sc; + int i; sc = device_get_softc(dev); + sc->dieing = 0; TAILQ_INIT(&sc->sessions); sc->sid = 1; + sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SYNC); if (sc->cid < 0) { @@ -103,6 +143,16 @@ aesni_attach(device_t dev) return (ENOMEM); } + ctx_mtx = malloc(sizeof *ctx_mtx * (mp_maxid + 1), M_AESNI, + M_WAITOK|M_ZERO); + ctx_fpu = malloc(sizeof *ctx_fpu * (mp_maxid + 1), M_AESNI, + M_WAITOK|M_ZERO); + + CPU_FOREACH(i) { + ctx_fpu[i] = fpu_kern_alloc_ctx(0); + mtx_init(&ctx_mtx[i], "anifpumtx", NULL, MTX_DEF|MTX_NEW); + } + rw_init(&sc->lock, "aesni_lock"); crypto_register(sc->cid, CRYPTO_AES_CBC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_XTS, 0, 0); @@ -116,6 +166,7 @@ aesni_detach(device_t dev) struct aesni_session *ses; sc = device_get_softc(dev); + rw_wlock(&sc->lock); TAILQ_FOREACH(ses, &sc->sessions, next) { if (ses->used) { @@ -125,14 +176,18 @@ aesni_detach(device_t dev) return (EBUSY); } } + sc->dieing = 1; while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { TAILQ_REMOVE(&sc->sessions, ses, next); - fpu_kern_free_ctx(ses->fpu_ctx); free(ses, M_AESNI); } rw_wunlock(&sc->lock); - rw_destroy(&sc->lock); crypto_unregister_all(sc->cid); + + rw_destroy(&sc->lock); + + aensi_cleanctx(); + return (0); } @@ -148,6 +203,9 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct return (EINVAL); sc = device_get_softc(dev); + if (sc->dieing) + return (EINVAL); + ses = NULL; encini = NULL; for (; cri != NULL; cri = cri->cri_next) { @@ -166,6 +224,10 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct return (EINVAL); rw_wlock(&sc->lock); + if (sc->dieing) { + rw_wunlock(&sc->lock); + return (EINVAL); + } /* * Free sessions goes first, so if first session is used, we need to * allocate one. @@ -177,13 +239,6 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct rw_wunlock(&sc->lock); return (ENOMEM); } - ses->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NORMAL | - FPU_KERN_NOWAIT); - if (ses->fpu_ctx == NULL) { - free(ses, M_AESNI); - rw_wunlock(&sc->lock); - return (ENOMEM); - } ses->id = sc->sid++; } else { TAILQ_REMOVE(&sc->sessions, ses, next); @@ -208,15 +263,14 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct static void aesni_freesession_locked(struct aesni_softc *sc, struct aesni_session *ses) { - struct fpu_kern_ctx *ctx; uint32_t sid; + rw_assert(&sc->lock, RA_WLOCKED); + sid = ses->id; TAILQ_REMOVE(&sc->sessions, ses, next); - ctx = ses->fpu_ctx; bzero(ses, sizeof(*ses)); ses->id = sid; - ses->fpu_ctx = ctx; TAILQ_INSERT_HEAD(&sc->sessions, ses, next); } @@ -362,17 +416,27 @@ MODULE_DEPEND(aesni, crypto, 1, 1, 1); static int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { - struct thread *td; + struct fpu_kern_ctx *ctx; int error; + int kt, ctxidx; - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - return (error); + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(ctxidx, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL | FPU_KERN_KTHR); + if (error != 0) + goto out; + } + error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, ses->fpu_ctx); + + if (!kt) { + fpu_kern_leave(curthread, ctx); +out: + RELEASE_CTX(ctxidx, ctx); + } return (error); } @@ -380,19 +444,24 @@ static int aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd, struct cryptop *crp) { - struct thread *td; + struct fpu_kern_ctx *ctx; uint8_t *buf; int error, allocated; + int kt, ctxidx; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - goto out1; + error = 0; + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(ctxidx, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL|FPU_KERN_KTHR); + if (error != 0) + goto out2; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -438,8 +507,12 @@ aesni_cipher_process(struct aesni_session *ses, struct enccrd->crd_skip + enccrd->crd_len - AES_BLOCK_LEN, AES_BLOCK_LEN, ses->iv); out: - fpu_kern_leave(td, ses->fpu_ctx); -out1: + if (!kt) { + fpu_kern_leave(curthread, ctx); +out2: + RELEASE_CTX(ctxidx, ctx); + } + if (allocated) { bzero(buf, enccrd->crd_len); free(buf, M_AESNI); Modified: stable/10/sys/crypto/aesni/aesni.h ============================================================================== --- stable/10/sys/crypto/aesni/aesni.h Thu Sep 21 19:24:11 2017 (r323870) +++ stable/10/sys/crypto/aesni/aesni.h Thu Sep 21 19:30:32 2017 (r323871) @@ -65,7 +65,6 @@ struct aesni_session { int used; uint32_t id; TAILQ_ENTRY(aesni_session) next; - struct fpu_kern_ctx *fpu_ctx; }; /* From owner-svn-src-all@freebsd.org Thu Sep 21 20:13: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 EDD0BE1F233; Thu, 21 Sep 2017 20:13:05 +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 C951A68617; Thu, 21 Sep 2017 20:13:05 +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 v8LKD5dP024258; Thu, 21 Sep 2017 20:13:05 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKD3Of024243; Thu, 21 Sep 2017 20:13:03 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709212013.v8LKD3Of024243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 21 Sep 2017 20:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323872 - in releng/10.4: share/man/man9 sys/kern sys/sys X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in releng/10.4: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 323872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:13:06 -0000 Author: marius Date: Thu Sep 21 20:13:03 2017 New Revision: 323872 URL: https://svnweb.freebsd.org/changeset/base/323872 Log: MF10: r323870, MFC: r275751 Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9). A _NEW flag passed to _init_flags() to avoid check for double-init. Approved by: re (gjb) Modified: releng/10.4/share/man/man9/mutex.9 releng/10.4/share/man/man9/rmlock.9 releng/10.4/share/man/man9/rwlock.9 releng/10.4/share/man/man9/sx.9 releng/10.4/sys/kern/kern_mutex.c releng/10.4/sys/kern/kern_rmlock.c releng/10.4/sys/kern/kern_rwlock.c releng/10.4/sys/kern/kern_sx.c releng/10.4/sys/kern/subr_lock.c releng/10.4/sys/sys/lock.h releng/10.4/sys/sys/mutex.h releng/10.4/sys/sys/rmlock.h releng/10.4/sys/sys/rwlock.h releng/10.4/sys/sys/sx.h Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/share/man/man9/mutex.9 ============================================================================== --- releng/10.4/share/man/man9/mutex.9 Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/share/man/man9/mutex.9 Thu Sep 21 20:13:03 2017 (r323872) @@ -183,13 +183,17 @@ It may contain either or .Dv MTX_SPIN but not both. -See below for additional initialization options. -It is not permissible to pass the same -.Fa mutex -to +If the kernel has been compiled with +.Cd "option INVARIANTS" , .Fn mtx_init -multiple times without intervening calls to -.Fn mtx_destroy . +will assert that the +.Fa mutex +has not been initialized multiple times without intervening calls to +.Fn mtx_destroy +unless the +.Dv MTX_NEW +option is specified. +See below for additional initialization options. .Pp The .Fn mtx_lock @@ -473,6 +477,8 @@ to ignore this lock. Witness should not log messages about duplicate locks being acquired. .It Dv MTX_NOPROFILE Do not profile this lock. +.It Dv MTX_NEW +Do not check for double-init. .El .Ss Lock and Unlock Flags The flags passed to the Modified: releng/10.4/share/man/man9/rmlock.9 ============================================================================== --- releng/10.4/share/man/man9/rmlock.9 Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/share/man/man9/rmlock.9 Thu Sep 21 20:13:03 2017 (r323872) @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" Based on rwlock.9 man page -.Dd June 25, 2013 +.Dd December 13, 2014 .Dt RMLOCK 9 .Os .Sh NAME @@ -156,6 +156,15 @@ Allow threads to recursively acquire shared locks for .Fa rm . .It Dv RM_SLEEPABLE Create a sleepable read-mostly lock. +.It Dv RM_NEW +If the kernel has been compiled with +.Cd "option INVARIANTS" , +.Fn rm_init_flags +will assert that the +.Fa rm +has not been initialized multiple times without intervening calls to +.Fn rm_destroy +unless this option is specified. .El .It Fn rm_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Lock Modified: releng/10.4/share/man/man9/rwlock.9 ============================================================================== --- releng/10.4/share/man/man9/rwlock.9 Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/share/man/man9/rwlock.9 Thu Sep 21 20:13:03 2017 (r323872) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2013 +.Dd December 13, 2014 .Dt RWLOCK 9 .Os .Sh NAME @@ -154,6 +154,15 @@ Do not log any operations for this lock via .It Dv RW_RECURSE Allow threads to recursively acquire exclusive locks for .Fa rw . +.It Dv RW_NEW +If the kernel has been compiled with +.Cd "option INVARIANTS" , +.Fn rw_init_flags +will assert that the +.Fa rw +has not been initialized multiple times without intervening calls to +.Fn rw_destroy +unless this option is specified. .El .It Fn rw_rlock "struct rwlock *rw" Lock Modified: releng/10.4/share/man/man9/sx.9 ============================================================================== --- releng/10.4/share/man/man9/sx.9 Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/share/man/man9/sx.9 Thu Sep 21 20:13:03 2017 (r323872) @@ -142,6 +142,15 @@ Allow threads to recursively acquire exclusive locks f .It Dv SX_QUIET Do not log any operations for this lock via .Xr ktr 4 . +.It Dv SX_NEW +If the kernel has been compiled with +.Cd "options INVARIANTS" , +.Fn sx_init +will assert that the +.Fa sx +has not been initialized multiple times without intervening calls to +.Fn sx_destroy +unless this option is specified. .El .Pp Shared/exclusive locks are destroyed with Modified: releng/10.4/sys/kern/kern_mutex.c ============================================================================== --- releng/10.4/sys/kern/kern_mutex.c Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/kern/kern_mutex.c Thu Sep 21 20:13:03 2017 (r323872) @@ -979,7 +979,7 @@ _mtx_init(volatile uintptr_t *c, const char *name, con m = mtxlock2mtx(c); MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | - MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE)) == 0); + MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE | MTX_NEW)) == 0); ASSERT_ATOMIC_LOAD_PTR(m->mtx_lock, ("%s: mtx_lock not aligned for %s: %p", __func__, name, &m->mtx_lock)); @@ -1005,6 +1005,8 @@ _mtx_init(volatile uintptr_t *c, const char *name, con flags |= LO_DUPOK; if (opts & MTX_NOPROFILE) flags |= LO_NOPROFILE; + if (opts & MTX_NEW) + flags |= LO_NEW; /* Initialize mutex. */ lock_init(&m->lock_object, class, name, type, flags); Modified: releng/10.4/sys/kern/kern_rmlock.c ============================================================================== --- releng/10.4/sys/kern/kern_rmlock.c Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/kern/kern_rmlock.c Thu Sep 21 20:13:03 2017 (r323872) @@ -278,22 +278,28 @@ void rm_init_flags(struct rmlock *rm, const char *name, int opts) { struct lock_class *lc; - int liflags; + int liflags, xflags; liflags = 0; if (!(opts & RM_NOWITNESS)) liflags |= LO_WITNESS; if (opts & RM_RECURSE) liflags |= LO_RECURSABLE; + if (opts & RM_NEW) + liflags |= LO_NEW; rm->rm_writecpus = all_cpus; LIST_INIT(&rm->rm_activeReaders); if (opts & RM_SLEEPABLE) { liflags |= LO_SLEEPABLE; lc = &lock_class_rm_sleepable; - sx_init_flags(&rm->rm_lock_sx, "rmlock_sx", SX_NOWITNESS); + xflags = (opts & RM_NEW ? SX_NEW : 0); + sx_init_flags(&rm->rm_lock_sx, "rmlock_sx", + xflags | SX_NOWITNESS); } else { lc = &lock_class_rm; - mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", MTX_NOWITNESS); + xflags = (opts & RM_NEW ? MTX_NEW : 0); + mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", + xflags | MTX_NOWITNESS); } lock_init(&rm->lock_object, lc, name, NULL, liflags); } Modified: releng/10.4/sys/kern/kern_rwlock.c ============================================================================== --- releng/10.4/sys/kern/kern_rwlock.c Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/kern/kern_rwlock.c Thu Sep 21 20:13:03 2017 (r323872) @@ -216,7 +216,7 @@ _rw_init_flags(volatile uintptr_t *c, const char *name rw = rwlock2rw(c); MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | - RW_RECURSE)) == 0); + RW_RECURSE | RW_NEW)) == 0); ASSERT_ATOMIC_LOAD_PTR(rw->rw_lock, ("%s: rw_lock not aligned for %s: %p", __func__, name, &rw->rw_lock)); @@ -232,6 +232,8 @@ _rw_init_flags(volatile uintptr_t *c, const char *name flags |= LO_RECURSABLE; if (opts & RW_QUIET) flags |= LO_QUIET; + if (opts & RW_NEW) + flags |= LO_NEW; lock_init(&rw->lock_object, &lock_class_rw, name, NULL, flags); rw->rw_lock = RW_UNLOCKED; Modified: releng/10.4/sys/kern/kern_sx.c ============================================================================== --- releng/10.4/sys/kern/kern_sx.c Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/kern/kern_sx.c Thu Sep 21 20:13:03 2017 (r323872) @@ -240,7 +240,7 @@ sx_init_flags(struct sx *sx, const char *description, int flags; MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK | - SX_NOPROFILE | SX_NOADAPTIVE)) == 0); + SX_NOPROFILE | SX_NOADAPTIVE | SX_NEW)) == 0); ASSERT_ATOMIC_LOAD_PTR(sx->sx_lock, ("%s: sx_lock not aligned for %s: %p", __func__, description, &sx->sx_lock)); @@ -256,6 +256,8 @@ sx_init_flags(struct sx *sx, const char *description, flags |= LO_RECURSABLE; if (opts & SX_QUIET) flags |= LO_QUIET; + if (opts & SX_NEW) + flags |= LO_NEW; flags |= opts & SX_NOADAPTIVE; lock_init(&sx->lock_object, &lock_class_sx, description, NULL, flags); Modified: releng/10.4/sys/kern/subr_lock.c ============================================================================== --- releng/10.4/sys/kern/subr_lock.c Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/kern/subr_lock.c Thu Sep 21 20:13:03 2017 (r323872) @@ -76,8 +76,8 @@ lock_init(struct lock_object *lock, struct lock_class int i; /* Check for double-init and zero object. */ - KASSERT(!lock_initalized(lock), ("lock \"%s\" %p already initialized", - name, lock)); + KASSERT(flags & LO_NEW || !lock_initalized(lock), + ("lock \"%s\" %p already initialized", name, lock)); /* Look up lock class to find its index. */ for (i = 0; i < LOCK_CLASS_MAX; i++) Modified: releng/10.4/sys/sys/lock.h ============================================================================== --- releng/10.4/sys/sys/lock.h Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/sys/lock.h Thu Sep 21 20:13:03 2017 (r323872) @@ -83,6 +83,7 @@ struct lock_class { #define LO_IS_VNODE 0x00800000 /* Tell WITNESS about a VNODE lock */ #define LO_CLASSMASK 0x0f000000 /* Class index bitmask. */ #define LO_NOPROFILE 0x10000000 /* Don't profile this lock */ +#define LO_NEW 0x20000000 /* Don't check for double-init */ /* * Lock classes are statically assigned an index into the gobal lock_classes Modified: releng/10.4/sys/sys/mutex.h ============================================================================== --- releng/10.4/sys/sys/mutex.h Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/sys/mutex.h Thu Sep 21 20:13:03 2017 (r323872) @@ -52,6 +52,7 @@ #define MTX_RECURSE 0x00000004 /* Option: lock allowed to recurse */ #define MTX_NOWITNESS 0x00000008 /* Don't do any witness checking. */ #define MTX_NOPROFILE 0x00000020 /* Don't profile this lock */ +#define MTX_NEW 0x00000040 /* Don't check for double-init */ /* * Option flags passed to certain lock/unlock routines, through the use Modified: releng/10.4/sys/sys/rmlock.h ============================================================================== --- releng/10.4/sys/sys/rmlock.h Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/sys/rmlock.h Thu Sep 21 20:13:03 2017 (r323872) @@ -45,6 +45,7 @@ #define RM_NOWITNESS 0x00000001 #define RM_RECURSE 0x00000002 #define RM_SLEEPABLE 0x00000004 +#define RM_NEW 0x00000008 void rm_init(struct rmlock *rm, const char *name); void rm_init_flags(struct rmlock *rm, const char *name, int opts); Modified: releng/10.4/sys/sys/rwlock.h ============================================================================== --- releng/10.4/sys/sys/rwlock.h Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/sys/rwlock.h Thu Sep 21 20:13:03 2017 (r323872) @@ -254,6 +254,7 @@ struct rw_args_flags { #define RW_NOWITNESS 0x04 #define RW_QUIET 0x08 #define RW_RECURSE 0x10 +#define RW_NEW 0x20 /* * The INVARIANTS-enabled rw_assert() functionality. Modified: releng/10.4/sys/sys/sx.h ============================================================================== --- releng/10.4/sys/sys/sx.h Thu Sep 21 19:30:32 2017 (r323871) +++ releng/10.4/sys/sys/sx.h Thu Sep 21 20:13:03 2017 (r323872) @@ -289,6 +289,7 @@ __sx_sunlock(struct sx *sx, const char *file, int line #define SX_QUIET 0x08 #define SX_NOADAPTIVE 0x10 #define SX_RECURSE 0x20 +#define SX_NEW 0x40 /* * Options passed to sx_*lock_hard(). From owner-svn-src-all@freebsd.org Thu Sep 21 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 2AF0AE1F53B; Thu, 21 Sep 2017 20:16:12 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0149C687D1; Thu, 21 Sep 2017 20:16:11 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LKGBji024413; Thu, 21 Sep 2017 20:16:11 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKGBMi024412; Thu, 21 Sep 2017 20:16:11 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201709212016.v8LKGBMi024412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 21 Sep 2017 20:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323873 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 323873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:16:12 -0000 Author: eugen (ports committer) Date: Thu Sep 21 20:16:10 2017 New Revision: 323873 URL: https://svnweb.freebsd.org/changeset/base/323873 Log: Unprotected modification of ng_iface(4) private data leads to kernel panic. Fix a race with per-node read-mostly lock and refcounting for a hook. PR: 220076 Tested by: peixoto.cassiano Approved by: avg (mentor), mav (mentor) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12435 Modified: head/sys/netgraph/ng_iface.c Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Thu Sep 21 20:13:03 2017 (r323872) +++ head/sys/netgraph/ng_iface.c Thu Sep 21 20:16:10 2017 (r323873) @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -112,9 +113,15 @@ struct ng_iface_private { int unit; /* Interface unit number */ node_p node; /* Our netgraph node */ hook_p hooks[NUM_FAMILIES]; /* Hook for each address family */ + struct rmlock lock; /* Protect private data changes */ }; typedef struct ng_iface_private *priv_p; +#define PRIV_RLOCK(priv, t) rm_rlock(&priv->lock, t) +#define PRIV_RUNLOCK(priv, t) rm_runlock(&priv->lock, t) +#define PRIV_WLOCK(priv) rm_wlock(&priv->lock) +#define PRIV_WUNLOCK(priv) rm_wunlock(&priv->lock) + /* Interface methods */ static void ng_iface_start(struct ifnet *ifp); static int ng_iface_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); @@ -431,8 +438,10 @@ ng_iface_bpftap(struct ifnet *ifp, struct mbuf *m, sa_ static int ng_iface_send(struct ifnet *ifp, struct mbuf *m, sa_family_t sa) { + struct rm_priotracker priv_tracker; const priv_p priv = (priv_p) ifp->if_softc; const iffam_p iffam = get_iffam_from_af(sa); + hook_p hook; int error; int len; @@ -446,10 +455,20 @@ ng_iface_send(struct ifnet *ifp, struct mbuf *m, sa_fa /* Copy length before the mbuf gets invalidated. */ len = m->m_pkthdr.len; - /* Send packet. If hook is not connected, mbuf will get freed. */ + PRIV_RLOCK(priv, &priv_tracker); + hook = *get_hook_from_iffam(priv, iffam); + if (hook == NULL) { + NG_FREE_M(m); + PRIV_RUNLOCK(priv, &priv_tracker); + return ENETDOWN; + } + NG_HOOK_REF(hook); + PRIV_RUNLOCK(priv, &priv_tracker); + NG_OUTBOUND_THREAD_REF(); - NG_SEND_DATA_ONLY(error, *get_hook_from_iffam(priv, iffam), m); + NG_SEND_DATA_ONLY(error, hook, m); NG_OUTBOUND_THREAD_UNREF(); + NG_HOOK_UNREF(hook); /* Update stats. */ if (error == 0) { @@ -516,6 +535,8 @@ ng_iface_constructor(node_p node) return (ENOMEM); } + rm_init(&priv->lock, "ng_iface private rmlock"); + /* Link them together */ ifp->if_softc = priv; priv->ifp = ifp; @@ -562,16 +583,21 @@ static int ng_iface_newhook(node_p node, hook_p hook, const char *name) { const iffam_p iffam = get_iffam_from_name(name); + const priv_p priv = NG_NODE_PRIVATE(node); hook_p *hookptr; if (iffam == NULL) return (EPFNOSUPPORT); - hookptr = get_hook_from_iffam(NG_NODE_PRIVATE(node), iffam); - if (*hookptr != NULL) + PRIV_WLOCK(priv); + hookptr = get_hook_from_iffam(priv, iffam); + if (*hookptr != NULL) { + PRIV_WUNLOCK(priv); return (EISCONN); + } *hookptr = hook; NG_HOOK_HI_STACK(hook); NG_HOOK_SET_TO_INBOUND(hook); + PRIV_WUNLOCK(priv); return (0); } @@ -730,6 +756,7 @@ ng_iface_shutdown(node_p node) CURVNET_RESTORE(); priv->ifp = NULL; free_unr(V_ng_iface_unit, priv->unit); + rm_destroy(&priv->lock); free(priv, M_NETGRAPH_IFACE); NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(node); @@ -748,7 +775,9 @@ ng_iface_disconnect(hook_p hook) if (iffam == NULL) panic("%s", __func__); + PRIV_WLOCK(priv); *get_hook_from_iffam(priv, iffam) = NULL; + PRIV_WUNLOCK(priv); return (0); } From owner-svn-src-all@freebsd.org Thu Sep 21 20:27: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 0374BE201AB; Thu, 21 Sep 2017 20:27:45 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1D92694E1; Thu, 21 Sep 2017 20:27:44 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LKRiMG028740; Thu, 21 Sep 2017 20:27:44 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKRhVZ028736; Thu, 21 Sep 2017 20:27:43 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709212027.v8LKRhVZ028736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 21 Sep 2017 20:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323874 - head/sys/dev/bnxt X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/dev/bnxt X-SVN-Commit-Revision: 323874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:27:45 -0000 Author: shurd Date: Thu Sep 21 20:27:43 2017 New Revision: 323874 URL: https://svnweb.freebsd.org/changeset/base/323874 Log: bnxt: Fix driver when attached to a VF - Use HWRM_FUNC_VF_CFG instead of HWRM_FUNC_CFG on VFs - Fix NPAR/VF detection - Clean up flag definitions - Don't allow WoL on VFs Although the bnxt driver doesn't support SR-IOV so can create VFs yet, the PF could be running Linux or ESCi with a VF passed through to a FreeBSD guest. This fixes the driver for that use case. Submitted by: Siva Kallam Reviewed by: shurd, sbruno Approved by: sbruno (mentor) Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D12410 Modified: head/sys/dev/bnxt/bnxt.h head/sys/dev/bnxt/bnxt_hwrm.c head/sys/dev/bnxt/bnxt_hwrm.h head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/bnxt.h ============================================================================== --- head/sys/dev/bnxt/bnxt.h Thu Sep 21 20:16:10 2017 (r323873) +++ head/sys/dev/bnxt/bnxt.h Thu Sep 21 20:27:43 2017 (r323874) @@ -102,7 +102,8 @@ __FBSDID("$FreeBSD$"); #define BNXT_GET_RSS_PROFILE_ID(rss_hash_type) ((rss_hash_type >> 1) & 0x1F) #define BNXT_NO_MORE_WOL_FILTERS 0xFFFF -#define bnxt_wol_supported(softc) ((softc)->flags & BNXT_FLAG_WOL_CAP) +#define bnxt_wol_supported(softc) (!((softc)->flags & BNXT_FLAG_VF) && \ + ((softc)->flags & BNXT_FLAG_WOL_CAP )) /* Completion related defines */ #define CMP_VALID(cmp, v_bit) \ @@ -393,7 +394,6 @@ struct bnxt_vf_info { bus_addr_t hwrm_cmd_req_dma_addr; }; -#define BNXT_FLAG_VF (1<<1) #define BNXT_PF(softc) (!((softc)->flags & BNXT_FLAG_VF)) #define BNXT_VF(softc) ((softc)->flags & BNXT_FLAG_VF) @@ -536,8 +536,9 @@ struct bnxt_softc { struct bnxt_bar_info hwrm_bar; struct bnxt_bar_info doorbell_bar; struct bnxt_link_info link_info; -#define BNXT_FLAG_NPAR 0x1 -#define BNXT_FLAG_WOL_CAP 0x2 +#define BNXT_FLAG_VF 0x0001 +#define BNXT_FLAG_NPAR 0x0002 +#define BNXT_FLAG_WOL_CAP 0x0004 uint32_t flags; uint32_t total_msix; Modified: head/sys/dev/bnxt/bnxt_hwrm.c ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.c Thu Sep 21 20:16:10 2017 (r323873) +++ head/sys/dev/bnxt/bnxt_hwrm.c Thu Sep 21 20:27:43 2017 (r323874) @@ -949,18 +949,32 @@ bnxt_hwrm_rss_cfg(struct bnxt_softc *softc, struct bnx } int -bnxt_hwrm_func_cfg(struct bnxt_softc *softc) +bnxt_cfg_async_cr(struct bnxt_softc *softc) { - struct hwrm_func_cfg_input req = {0}; + int rc = 0; + + if (BNXT_PF(softc)) { + struct hwrm_func_cfg_input req = {0}; - bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG); + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG); - req.fid = 0xffff; - req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); + req.fid = 0xffff; + req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); + req.async_event_cr = softc->def_cp_ring.ring.phys_id; - req.async_event_cr = softc->def_cp_ring.ring.phys_id; + rc = hwrm_send_message(softc, &req, sizeof(req)); + } + else { + struct hwrm_func_vf_cfg_input req = {0}; - return hwrm_send_message(softc, &req, sizeof(req)); + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_VF_CFG); + + req.enables = htole32(HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); + req.async_event_cr = softc->def_cp_ring.ring.phys_id; + + rc = hwrm_send_message(softc, &req, sizeof(req)); + } + return rc; } int @@ -1719,4 +1733,3 @@ int bnxt_hwrm_func_rgtr_async_events(struct bnxt_softc return hwrm_send_message(softc, &req, sizeof(req)); } - Modified: head/sys/dev/bnxt/bnxt_hwrm.h ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.h Thu Sep 21 20:16:10 2017 (r323873) +++ head/sys/dev/bnxt/bnxt_hwrm.h Thu Sep 21 20:27:43 2017 (r323874) @@ -61,7 +61,7 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt_softc *so int bnxt_hwrm_set_filter(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic); int bnxt_hwrm_rss_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, uint32_t hash_type); -int bnxt_hwrm_func_cfg(struct bnxt_softc *softc); +int bnxt_cfg_async_cr(struct bnxt_softc *softc); int bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, uint32_t flags); int bnxt_hwrm_nvm_find_dir_entry(struct bnxt_softc *softc, uint16_t type, Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Thu Sep 21 20:16:10 2017 (r323873) +++ head/sys/dev/bnxt/if_bnxt.c Thu Sep 21 20:27:43 2017 (r323874) @@ -657,7 +657,7 @@ bnxt_attach_pre(if_ctx_t ctx) scctx = softc->scctx; /* TODO: Better way of detecting NPAR/VF is needed */ - switch (softc->sctx->isc_vendor_info->pvi_device_id) { + switch (pci_get_device(softc->dev)) { case BCM57402_NPAR: case BCM57404_NPAR: case BCM57406_NPAR: @@ -980,7 +980,7 @@ bnxt_init(if_ctx_t ctx) goto fail; /* And now set the default CP ring as the async CP ring */ - rc = bnxt_hwrm_func_cfg(softc); + rc = bnxt_cfg_async_cr(softc); if (rc) goto fail; From owner-svn-src-all@freebsd.org Thu Sep 21 20:29: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 88891E20404; Thu, 21 Sep 2017 20:29:15 +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 63B5C69747; Thu, 21 Sep 2017 20:29:15 +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 v8LKTEAn028983; Thu, 21 Sep 2017 20:29:14 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKTE8F028981; Thu, 21 Sep 2017 20:29:14 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709212029.v8LKTE8F028981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 21 Sep 2017 20:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323875 - releng/10.4/sys/crypto/aesni X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/sys/crypto/aesni X-SVN-Commit-Revision: 323875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:29:15 -0000 Author: marius Date: Thu Sep 21 20:29:14 2017 New Revision: 323875 URL: https://svnweb.freebsd.org/changeset/base/323875 Log: MF10: r323871 MFC: r285215 remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx... MFC: r285289 address an issue where consumers, like IPsec, can reuse the same session in multiple threads w/o locking.. There was a single fpu context shared per session, if multiple threads were using the session, and both migrated away, they could corrupt each other's fpu context... MFC: r285297 upon further examination, it turns out that _unregister_all already provides the guarantee that no threads will be in the _newsession code.. MFC: r298332 aesni(4): Initialize error before use [1] Reported by: Coverity [1] CID: 1331554 [1] Approved by: re (gjb, kib) Modified: releng/10.4/sys/crypto/aesni/aesni.c releng/10.4/sys/crypto/aesni/aesni.h Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/sys/crypto/aesni/aesni.c ============================================================================== --- releng/10.4/sys/crypto/aesni/aesni.c Thu Sep 21 20:27:43 2017 (r323874) +++ releng/10.4/sys/crypto/aesni/aesni.c Thu Sep 21 20:29:14 2017 (r323875) @@ -39,16 +39,34 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +static struct mtx_padalign *ctx_mtx; +static struct fpu_kern_ctx **ctx_fpu; + struct aesni_softc { + int dieing; int32_t cid; uint32_t sid; TAILQ_HEAD(aesni_sessions_head, aesni_session) sessions; struct rwlock lock; }; +#define AQUIRE_CTX(i, ctx) \ + do { \ + (i) = PCPU_GET(cpuid); \ + mtx_lock(&ctx_mtx[(i)]); \ + (ctx) = ctx_fpu[(i)]; \ + } while (0) +#define RELEASE_CTX(i, ctx) \ + do { \ + mtx_unlock(&ctx_mtx[(i)]); \ + (i) = -1; \ + (ctx) = NULL; \ + } while (0) + static int aesni_newsession(device_t, uint32_t *sidp, struct cryptoini *cri); static int aesni_freesession(device_t, uint64_t tid); static void aesni_freesession_locked(struct aesni_softc *sc, @@ -88,14 +106,36 @@ aesni_probe(device_t dev) return (0); } +static void +aensi_cleanctx(void) +{ + int i; + + /* XXX - no way to return driverid */ + CPU_FOREACH(i) { + if (ctx_fpu[i] != NULL) { + mtx_destroy(&ctx_mtx[i]); + fpu_kern_free_ctx(ctx_fpu[i]); + } + ctx_fpu[i] = NULL; + } + free(ctx_mtx, M_AESNI); + ctx_mtx = NULL; + free(ctx_fpu, M_AESNI); + ctx_fpu = NULL; +} + static int aesni_attach(device_t dev) { struct aesni_softc *sc; + int i; sc = device_get_softc(dev); + sc->dieing = 0; TAILQ_INIT(&sc->sessions); sc->sid = 1; + sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SYNC); if (sc->cid < 0) { @@ -103,6 +143,16 @@ aesni_attach(device_t dev) return (ENOMEM); } + ctx_mtx = malloc(sizeof *ctx_mtx * (mp_maxid + 1), M_AESNI, + M_WAITOK|M_ZERO); + ctx_fpu = malloc(sizeof *ctx_fpu * (mp_maxid + 1), M_AESNI, + M_WAITOK|M_ZERO); + + CPU_FOREACH(i) { + ctx_fpu[i] = fpu_kern_alloc_ctx(0); + mtx_init(&ctx_mtx[i], "anifpumtx", NULL, MTX_DEF|MTX_NEW); + } + rw_init(&sc->lock, "aesni_lock"); crypto_register(sc->cid, CRYPTO_AES_CBC, 0, 0); crypto_register(sc->cid, CRYPTO_AES_XTS, 0, 0); @@ -116,6 +166,7 @@ aesni_detach(device_t dev) struct aesni_session *ses; sc = device_get_softc(dev); + rw_wlock(&sc->lock); TAILQ_FOREACH(ses, &sc->sessions, next) { if (ses->used) { @@ -125,14 +176,18 @@ aesni_detach(device_t dev) return (EBUSY); } } + sc->dieing = 1; while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { TAILQ_REMOVE(&sc->sessions, ses, next); - fpu_kern_free_ctx(ses->fpu_ctx); free(ses, M_AESNI); } rw_wunlock(&sc->lock); - rw_destroy(&sc->lock); crypto_unregister_all(sc->cid); + + rw_destroy(&sc->lock); + + aensi_cleanctx(); + return (0); } @@ -148,6 +203,9 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct return (EINVAL); sc = device_get_softc(dev); + if (sc->dieing) + return (EINVAL); + ses = NULL; encini = NULL; for (; cri != NULL; cri = cri->cri_next) { @@ -166,6 +224,10 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct return (EINVAL); rw_wlock(&sc->lock); + if (sc->dieing) { + rw_wunlock(&sc->lock); + return (EINVAL); + } /* * Free sessions goes first, so if first session is used, we need to * allocate one. @@ -177,13 +239,6 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct rw_wunlock(&sc->lock); return (ENOMEM); } - ses->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NORMAL | - FPU_KERN_NOWAIT); - if (ses->fpu_ctx == NULL) { - free(ses, M_AESNI); - rw_wunlock(&sc->lock); - return (ENOMEM); - } ses->id = sc->sid++; } else { TAILQ_REMOVE(&sc->sessions, ses, next); @@ -208,15 +263,14 @@ aesni_newsession(device_t dev, uint32_t *sidp, struct static void aesni_freesession_locked(struct aesni_softc *sc, struct aesni_session *ses) { - struct fpu_kern_ctx *ctx; uint32_t sid; + rw_assert(&sc->lock, RA_WLOCKED); + sid = ses->id; TAILQ_REMOVE(&sc->sessions, ses, next); - ctx = ses->fpu_ctx; bzero(ses, sizeof(*ses)); ses->id = sid; - ses->fpu_ctx = ctx; TAILQ_INSERT_HEAD(&sc->sessions, ses, next); } @@ -362,17 +416,27 @@ MODULE_DEPEND(aesni, crypto, 1, 1, 1); static int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { - struct thread *td; + struct fpu_kern_ctx *ctx; int error; + int kt, ctxidx; - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - return (error); + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(ctxidx, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL | FPU_KERN_KTHR); + if (error != 0) + goto out; + } + error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, ses->fpu_ctx); + + if (!kt) { + fpu_kern_leave(curthread, ctx); +out: + RELEASE_CTX(ctxidx, ctx); + } return (error); } @@ -380,19 +444,24 @@ static int aesni_cipher_process(struct aesni_session *ses, struct cryptodesc *enccrd, struct cryptop *crp) { - struct thread *td; + struct fpu_kern_ctx *ctx; uint8_t *buf; int error, allocated; + int kt, ctxidx; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); - td = curthread; - error = fpu_kern_enter(td, ses->fpu_ctx, FPU_KERN_NORMAL | - FPU_KERN_KTHR); - if (error != 0) - goto out1; + error = 0; + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(ctxidx, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL|FPU_KERN_KTHR); + if (error != 0) + goto out2; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -438,8 +507,12 @@ aesni_cipher_process(struct aesni_session *ses, struct enccrd->crd_skip + enccrd->crd_len - AES_BLOCK_LEN, AES_BLOCK_LEN, ses->iv); out: - fpu_kern_leave(td, ses->fpu_ctx); -out1: + if (!kt) { + fpu_kern_leave(curthread, ctx); +out2: + RELEASE_CTX(ctxidx, ctx); + } + if (allocated) { bzero(buf, enccrd->crd_len); free(buf, M_AESNI); Modified: releng/10.4/sys/crypto/aesni/aesni.h ============================================================================== --- releng/10.4/sys/crypto/aesni/aesni.h Thu Sep 21 20:27:43 2017 (r323874) +++ releng/10.4/sys/crypto/aesni/aesni.h Thu Sep 21 20:29:14 2017 (r323875) @@ -65,7 +65,6 @@ struct aesni_session { int used; uint32_t id; TAILQ_ENTRY(aesni_session) next; - struct fpu_kern_ctx *fpu_ctx; }; /* From owner-svn-src-all@freebsd.org Thu Sep 21 20:34: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 098BDE20B5F; Thu, 21 Sep 2017 20:34:35 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAE6869C98; Thu, 21 Sep 2017 20:34:34 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LKYXUq032789; Thu, 21 Sep 2017 20:34:33 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKYXc6032788; Thu, 21 Sep 2017 20:34:33 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709212034.v8LKYXc6032788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 21 Sep 2017 20:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323876 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:34:35 -0000 Author: shurd Date: Thu Sep 21 20:34:33 2017 New Revision: 323876 URL: https://svnweb.freebsd.org/changeset/base/323876 Log: Fix M_GTASKQUEUE definition Previously had the same short and long description as taskqueues. This could cause problems with memguard(9) and vmstat -m which use the short description as a unique identifier. Reviewed by: sbruno Approved by: sbruno (mentor) MFC after: 3 days Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12438 Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Thu Sep 21 20:29:14 2017 (r323875) +++ head/sys/kern/subr_gtaskqueue.c Thu Sep 21 20:34:33 2017 (r323876) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues"); +static MALLOC_DEFINE(M_GTASKQUEUE, "gtaskqueue", "Group Task Queues"); static void gtaskqueue_thread_enqueue(void *); static void gtaskqueue_thread_loop(void *arg); From owner-svn-src-all@freebsd.org Thu Sep 21 20:59: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 9AC94E222CC; Thu, 21 Sep 2017 20:59:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 674406A98A; Thu, 21 Sep 2017 20:59:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LKxak2041982; Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKxaVi041981; Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212059.v8LKxaVi041981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 20:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323877 - in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf X-SVN-Commit-Revision: 323877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:59:37 -0000 Author: jhb Date: Thu Sep 21 20:59:36 2017 New Revision: 323877 URL: https://svnweb.freebsd.org/changeset/base/323877 Log: MFC 323025: Read max_stack_flags from correct object. 'obj' is not initialized here. Sponsored by: DARPA / AFRL Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Thu Sep 21 20:34:33 2017 (r323876) +++ stable/10/libexec/rtld-elf/rtld.c Thu Sep 21 20:59:36 2017 (r323877) @@ -470,7 +470,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr close(fd); if (obj_main == NULL) rtld_die(); - max_stack_flags = obj->stack_flags; + max_stack_flags = obj_main->stack_flags; } else { /* Main program already loaded. */ const Elf_Phdr *phdr; int phnum; From owner-svn-src-all@freebsd.org Thu Sep 21 20:59: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 D2ECCE222D1; Thu, 21 Sep 2017 20:59:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F3796A98B; Thu, 21 Sep 2017 20:59:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LKxaFn041988; Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKxa1P041987; Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212059.v8LKxa1P041987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 20:59: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: r323877 - in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf X-SVN-Commit-Revision: 323877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 20:59:38 -0000 Author: jhb Date: Thu Sep 21 20:59:36 2017 New Revision: 323877 URL: https://svnweb.freebsd.org/changeset/base/323877 Log: MFC 323025: Read max_stack_flags from correct object. 'obj' is not initialized here. Sponsored by: DARPA / AFRL Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Thu Sep 21 20:34:33 2017 (r323876) +++ stable/11/libexec/rtld-elf/rtld.c Thu Sep 21 20:59:36 2017 (r323877) @@ -571,7 +571,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr close(fd); if (obj_main == NULL) rtld_die(); - max_stack_flags = obj->stack_flags; + max_stack_flags = obj_main->stack_flags; } else { /* Main program already loaded. */ dbg("processing main program's program header"); assert(aux_info[AT_PHDR] != NULL); From owner-svn-src-all@freebsd.org Thu Sep 21 21: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 5F56FE22A42; Thu, 21 Sep 2017 21:07:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 369C46B026; Thu, 21 Sep 2017 21:07:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LL7LFM046002; Thu, 21 Sep 2017 21:07:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LL7Lva046001; Thu, 21 Sep 2017 21:07:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709212107.v8LL7Lva046001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 21 Sep 2017 21:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323878 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 323878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 21:07:22 -0000 Author: cem Date: Thu Sep 21 21:07:21 2017 New Revision: 323878 URL: https://svnweb.freebsd.org/changeset/base/323878 Log: cryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashes Previously, this test was entirely a no-op as no vector in the NIST-KAT file has a precisely 20-byte key. Additionally, not every vector in the file is SHA1. The length field determines the hash under test, and is now decoded correctly. Finally, due to a limitation I didn't feel like fixing in cryptodev.py, MACs are truncated to 16 bytes in this test. With this change and the uncommitted D12437 (to allow key sizes other than those used in IPSec), the SHA tests in cryptotest.py actually test something and e.g. at least cryptosoft passes the test. Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Thu Sep 21 20:59:36 2017 (r323877) +++ head/tests/sys/opencrypto/cryptotest.py Thu Sep 21 21:07:21 2017 (r323878) @@ -242,22 +242,58 @@ def GenTestCase(cname): self.runSHA1HMAC(i) def runSHA1HMAC(self, fname): - for bogusmode, lines in cryptodev.KATParser(fname, + for hashlength, lines in cryptodev.KATParser(fname, [ 'Count', 'Klen', 'Tlen', 'Key', 'Msg', 'Mac' ]): + # E.g., hashlength will be "L=20" (bytes) + hashlen = int(hashlength.split("=")[1]) + + blocksize = None + if hashlen == 20: + alg = cryptodev.CRYPTO_SHA1_HMAC + blocksize = 64 + elif hashlen == 28: + # Cryptodev doesn't support SHA-224 + # Slurp remaining input in section + for data in lines: + continue + continue + elif hashlen == 32: + alg = cryptodev.CRYPTO_SHA2_256_HMAC + blocksize = 64 + elif hashlen == 48: + alg = cryptodev.CRYPTO_SHA2_384_HMAC + blocksize = 128 + elif hashlen == 64: + alg = cryptodev.CRYPTO_SHA2_512_HMAC + blocksize = 128 + else: + # Skip unsupported hashes + # Slurp remaining input in section + for data in lines: + continue + continue + for data in lines: key = data['Key'].decode('hex') msg = data['Msg'].decode('hex') mac = data['Mac'].decode('hex') + tlen = int(data['Tlen']) - if len(key) != 20: - # XXX - implementation bug + if len(key) > blocksize: continue - c = Crypto(mac=cryptodev.CRYPTO_SHA1_HMAC, - mackey=key, crid=crid) + c = Crypto(mac=alg, mackey=key, + crid=crid) - r = c.encrypt(msg) - self.assertEqual(r, mac, `data`) + _, r = c.encrypt(msg, iv="") + + # A limitation in cryptodev.py means we + # can only store MACs up to 16 bytes. + # That's good enough to validate the + # correct behavior, more or less. + maclen = min(tlen, 16) + self.assertEqual(r[:maclen], mac[:maclen], "Actual: " + \ + repr(r[:maclen].encode("hex")) + " Expected: " + repr(data)) return GendCryptoTestCase From owner-svn-src-all@freebsd.org Thu Sep 21 21:14: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 65E4EE2304C; Thu, 21 Sep 2017 21:14:49 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE776B4CC; Thu, 21 Sep 2017 21:14:49 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LLEmrp050087; Thu, 21 Sep 2017 21:14:48 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LLEmep050086; Thu, 21 Sep 2017 21:14:48 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709212114.v8LLEmep050086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 21 Sep 2017 21:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323879 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 21:14:49 -0000 Author: shurd Date: Thu Sep 21 21:14:48 2017 New Revision: 323879 URL: https://svnweb.freebsd.org/changeset/base/323879 Log: Improved logging of gtaskqueue failues Check the return code of intr_setaffinity() and log any errors it returns. When a qid is not located, log an error before returning failure. Also, use __func__ rather than hardcoding the function name Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12436 Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Thu Sep 21 21:07:21 2017 (r323878) +++ head/sys/kern/subr_gtaskqueue.c Thu Sep 21 21:14:48 2017 (r323879) @@ -663,7 +663,7 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct gr void *uniq, int irq, char *name) { cpuset_t mask; - int qid; + int qid, error; gtask->gt_uniq = uniq; gtask->gt_name = name; @@ -679,7 +679,9 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct gr CPU_ZERO(&mask); CPU_SET(qgroup->tqg_queue[qid].tgc_cpu, &mask); mtx_unlock(&qgroup->tqg_lock); - intr_setaffinity(irq, CPU_WHICH_IRQ, &mask); + error = intr_setaffinity(irq, CPU_WHICH_IRQ, &mask); + if (error) + printf("%s: setaffinity failed: %d\n", __func__, error); } else mtx_unlock(&qgroup->tqg_lock); } @@ -688,7 +690,7 @@ static void taskqgroup_attach_deferred(struct taskqgroup *qgroup, struct grouptask *gtask) { cpuset_t mask; - int qid, cpu; + int qid, cpu, error; mtx_lock(&qgroup->tqg_lock); qid = taskqgroup_find(qgroup, gtask->gt_uniq); @@ -698,9 +700,11 @@ taskqgroup_attach_deferred(struct taskqgroup *qgroup, CPU_ZERO(&mask); CPU_SET(cpu, &mask); - intr_setaffinity(gtask->gt_irq, CPU_WHICH_IRQ, &mask); - + error = intr_setaffinity(gtask->gt_irq, CPU_WHICH_IRQ, &mask); mtx_lock(&qgroup->tqg_lock); + if (error) + printf("%s: setaffinity failed: %d\n", __func__, error); + } qgroup->tqg_queue[qid].tgc_cnt++; @@ -716,7 +720,7 @@ taskqgroup_attach_cpu(struct taskqgroup *qgroup, struc void *uniq, int cpu, int irq, char *name) { cpuset_t mask; - int i, qid; + int i, qid, error; qid = -1; gtask->gt_uniq = uniq; @@ -732,6 +736,7 @@ taskqgroup_attach_cpu(struct taskqgroup *qgroup, struc } if (qid == -1) { mtx_unlock(&qgroup->tqg_lock); + printf("%s: qid not found for %s cpu=%d\n", __func__, name, cpu); return (EINVAL); } } else @@ -744,8 +749,11 @@ taskqgroup_attach_cpu(struct taskqgroup *qgroup, struc CPU_ZERO(&mask); CPU_SET(cpu, &mask); - if (irq != -1 && tqg_smp_started) - intr_setaffinity(irq, CPU_WHICH_IRQ, &mask); + if (irq != -1 && tqg_smp_started) { + error = intr_setaffinity(irq, CPU_WHICH_IRQ, &mask); + if (error) + printf("%s: setaffinity failed: %d\n", __func__, error); + } return (0); } @@ -753,7 +761,7 @@ static int taskqgroup_attach_cpu_deferred(struct taskqgroup *qgroup, struct grouptask *gtask) { cpuset_t mask; - int i, qid, irq, cpu; + int i, qid, irq, cpu, error; qid = -1; irq = gtask->gt_irq; @@ -767,6 +775,7 @@ taskqgroup_attach_cpu_deferred(struct taskqgroup *qgro } if (qid == -1) { mtx_unlock(&qgroup->tqg_lock); + printf("%s: qid not found for %s cpu=%d\n", __func__, name, cpu); return (EINVAL); } qgroup->tqg_queue[qid].tgc_cnt++; @@ -778,8 +787,11 @@ taskqgroup_attach_cpu_deferred(struct taskqgroup *qgro CPU_ZERO(&mask); CPU_SET(cpu, &mask); - if (irq != -1) - intr_setaffinity(irq, CPU_WHICH_IRQ, &mask); + if (irq != -1) { + error = intr_setaffinity(irq, CPU_WHICH_IRQ, &mask); + if (error) + printf("%s: setaffinity failed: %d\n", __func__, error); + } return (0); } @@ -815,7 +827,7 @@ taskqgroup_binder(void *ctx) thread_unlock(curthread); if (error) - printf("taskqgroup_binder: setaffinity failed: %d\n", + printf("%s: setaffinity failed: %d\n", __func__, error); free(gtask, M_DEVBUF); } @@ -858,7 +870,7 @@ _taskqgroup_adjust(struct taskqgroup *qgroup, int cnt, return (EINVAL); } if (qgroup->tqg_adjusting) { - printf("taskqgroup_adjust failed: adjusting\n"); + printf("%s failed: adjusting\n", __func__); return (EBUSY); } qgroup->tqg_adjusting = 1; From owner-svn-src-all@freebsd.org Thu Sep 21 22:15: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 4F995E261A1; Thu, 21 Sep 2017 22:15:46 +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 1C4B86D012; Thu, 21 Sep 2017 22:15:46 +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 v8LMFjlW074548; Thu, 21 Sep 2017 22:15:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LMFjSG074547; Thu, 21 Sep 2017 22:15:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709212215.v8LMFjSG074547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 21 Sep 2017 22:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323880 - head/sys/dev/drm2/i915 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/drm2/i915 X-SVN-Commit-Revision: 323880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 22:15:46 -0000 Author: markj Date: Thu Sep 21 22:15:45 2017 New Revision: 323880 URL: https://svnweb.freebsd.org/changeset/base/323880 Log: Simplify i915_gem_wire_page() and avoid unneeded page-busying. Reviewed by: alc, kib MFC after: 1 week Modified: head/sys/dev/drm2/i915/i915_gem.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Thu Sep 21 21:14:48 2017 (r323879) +++ head/sys/dev/drm2/i915/i915_gem.c Thu Sep 21 22:15:45 2017 (r323880) @@ -4735,12 +4735,15 @@ i915_gem_wire_page(vm_object_t object, vm_pindex_t pin int rv; VM_OBJECT_ASSERT_WLOCKED(object); - page = vm_page_grab(object, pindex, VM_ALLOC_NORMAL); + page = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_WIRED); if (page->valid != VM_PAGE_BITS_ALL) { + vm_page_xbusy(page); if (vm_pager_has_page(object, pindex, NULL, NULL)) { rv = vm_pager_get_pages(object, &page, 1, NULL, NULL); if (rv != VM_PAGER_OK) { vm_page_lock(page); + vm_page_unwire(page, PQ_NONE); vm_page_free(page); vm_page_unlock(page); return (NULL); @@ -4754,13 +4757,9 @@ i915_gem_wire_page(vm_object_t object, vm_pindex_t pin if (fresh != NULL) *fresh = false; } - } else if (fresh != NULL) { + vm_page_xunbusy(page); + } else if (fresh != NULL) *fresh = false; - } - vm_page_lock(page); - vm_page_wire(page); - vm_page_unlock(page); - vm_page_xunbusy(page); atomic_add_long(&i915_gem_wired_pages_cnt, 1); return (page); } From owner-svn-src-all@freebsd.org Thu Sep 21 22:34: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 82029E270EA; Thu, 21 Sep 2017 22:34:00 +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 4EF6E6DADD; Thu, 21 Sep 2017 22:34:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LMXxwT082803; Thu, 21 Sep 2017 22:33:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LMXxOe082802; Thu, 21 Sep 2017 22:33:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212233.v8LMXxOe082802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 22:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323881 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 323881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 22:34:00 -0000 Author: jhb Date: Thu Sep 21 22:33:59 2017 New Revision: 323881 URL: https://svnweb.freebsd.org/changeset/base/323881 Log: Use UFS_LINK_MAX instead of LINK_MAX. Submitted by: bde Sponsored by: Chelsio Communications Modified: head/sbin/fsck_ffs/suj.c Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Thu Sep 21 22:15:45 2017 (r323880) +++ head/sbin/fsck_ffs/suj.c Thu Sep 21 22:33:59 2017 (r323881) @@ -1395,7 +1395,7 @@ ino_adjust(struct suj_ino *sino) } ip = ino_read(ino); mode = DIP(ip, di_mode) & IFMT; - if (nlink > LINK_MAX) + if (nlink > UFS_LINK_MAX) err_suj("ino %ju nlink manipulation error, new %ju, old %d\n", (uintmax_t)ino, (uintmax_t)nlink, DIP(ip, di_nlink)); if (debug) From owner-svn-src-all@freebsd.org Thu Sep 21 23:05: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 44FEBE289A6; Thu, 21 Sep 2017 23:05:34 +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 127FB6E9FA; Thu, 21 Sep 2017 23:05:34 +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 v8LN5XZG094927; Thu, 21 Sep 2017 23:05:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LN5XPT094925; Thu, 21 Sep 2017 23:05:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212305.v8LN5XPT094925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 23:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323882 - in head/sys: fs/devfs kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: fs/devfs kern X-SVN-Commit-Revision: 323882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:05:34 -0000 Author: jhb Date: Thu Sep 21 23:05:32 2017 New Revision: 323882 URL: https://svnweb.freebsd.org/changeset/base/323882 Log: Only handle _PC_MAX_CANON, _PC_MAX_INPUT, and _PC_VDISABLE for TTY devices. Move handling of these three pathconf() variables out of vop_stdpathconf() and into devfs_pathconf() as TTY devices can only be devfs files. In addition, only return settings for these three variables for devfs devices whose device switch has the D_TTY flag set. Discussed with: bde, kib Sponsored by: Chelsio Communications Modified: head/sys/fs/devfs/devfs_vnops.c head/sys/kern/vfs_default.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Thu Sep 21 22:33:59 2017 (r323881) +++ head/sys/fs/devfs/devfs_vnops.c Thu Sep 21 23:05:32 2017 (r323882) @@ -1178,6 +1178,24 @@ devfs_pathconf(struct vop_pathconf_args *ap) { switch (ap->a_name) { + case _PC_MAX_CANON: + if (ap->a_vp->v_vflag & VV_ISTTY) { + *ap->a_retval = MAX_CANON; + return (0); + } + return (EINVAL); + case _PC_MAX_INPUT: + if (ap->a_vp->v_vflag & VV_ISTTY) { + *ap->a_retval = MAX_INPUT; + return (0); + } + return (EINVAL); + case _PC_VDISABLE: + if (ap->a_vp->v_vflag & VV_ISTTY) { + *ap->a_retval = _POSIX_VDISABLE; + return (0); + } + return (EINVAL); case _PC_MAC_PRESENT: #ifdef MAC /* Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Thu Sep 21 22:33:59 2017 (r323881) +++ head/sys/kern/vfs_default.c Thu Sep 21 23:05:32 2017 (r323882) @@ -486,20 +486,11 @@ vop_stdpathconf(ap) case _PC_LINK_MAX: *ap->a_retval = LINK_MAX; return (0); - case _PC_MAX_CANON: - *ap->a_retval = MAX_CANON; - return (0); - case _PC_MAX_INPUT: - *ap->a_retval = MAX_INPUT; - return (0); case _PC_PIPE_BUF: *ap->a_retval = PIPE_BUF; return (0); case _PC_CHOWN_RESTRICTED: *ap->a_retval = 1; - return (0); - case _PC_VDISABLE: - *ap->a_retval = _POSIX_VDISABLE; return (0); default: return (EINVAL); From owner-svn-src-all@freebsd.org Thu Sep 21 23: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 600F5E28D4C; Thu, 21 Sep 2017 23:10:57 +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 2DDBC6EC4D; Thu, 21 Sep 2017 23:10:57 +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 v8LNAu89095197; Thu, 21 Sep 2017 23:10:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNAuvh095196; Thu, 21 Sep 2017 23:10:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709212310.v8LNAuvh095196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 Sep 2017 23:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323883 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 323883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:10:57 -0000 Author: imp Date: Thu Sep 21 23:10:56 2017 New Revision: 323883 URL: https://svnweb.freebsd.org/changeset/base/323883 Log: Always create usr/local/etc -> /etc/local symlink /usr/local/etc gets created and populated by packages. However, if no packages are installed when setup_nanobsd is run, this symlink won't get created, causing problems if packages are installed later (say on first boot). Therefore, always create the symlink and etc/local. It does no harm and may help. Inspired by crochet issue #183 (consuingly says NanoBSD, means crochet) Sponsored by: Netflix Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Thu Sep 21 23:05:32 2017 (r323882) +++ head/tools/tools/nanobsd/defaults.sh Thu Sep 21 23:10:56 2017 (r323883) @@ -527,15 +527,20 @@ setup_nanobsd ( ) ( # have hardcoded paths under ${prefix}/etc are not tweakable. if [ -d usr/local/etc ] ; then ( - mkdir -p etc/local cd usr/local/etc find . -print | cpio -dumpl ../../../etc/local cd .. rm -rf etc - ln -s ../../etc/local etc ) fi + # Always setup the usr/local/etc -> etc/local symlink. + # usr/local/etc gets created by packages, but if no packages + # are installed by this point, but are later in the process, + # the symlink not being here causes problems. It never hurts + # to have the symlink in error though. + ln -s ../../etc/local usr/local/etc + for d in var etc do # link /$d under /conf @@ -581,6 +586,9 @@ setup_nanobsd_etc ( ) ( echo "/dev/${NANO_DRIVE}${NANO_ROOT} / ufs ro 1 1" > etc/fstab echo "/dev/${NANO_DRIVE}${NANO_SLICE_CFG} /cfg ufs rw,noauto 2 2" >> etc/fstab mkdir -p cfg + + # Create directory for eventual /usr/local/etc contents + mkdir -p etc/local ) ) From owner-svn-src-all@freebsd.org Thu Sep 21 23:11:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CD9CE28D6A; Thu, 21 Sep 2017 23:11:00 +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 439476EC58; Thu, 21 Sep 2017 23:11:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LNAxfm095253; Thu, 21 Sep 2017 23:10:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNAxta095251; Thu, 21 Sep 2017 23:10:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709212310.v8LNAxta095251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Sep 2017 23:10: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: r323884 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 323884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:11:00 -0000 Author: jhb Date: Thu Sep 21 23:10:59 2017 New Revision: 323884 URL: https://svnweb.freebsd.org/changeset/base/323884 Log: MFC 323630: Avoid reusing the wrong buffer for a DDP AIO request. To optimize the case of ping-ponging between two buffers, the DDP code caches the last two buffers used keeping the pages wired and page pods stored in the NIC's RAM. If a new aio_read() request uses one of the same buffers, then the work of holding pages, etc. can be avoided. However, the starting virtual address of an aio buffer was not saved, only the page count, length, and initial page offset. Thus, an aio_read() request could match a different buffer in the address space. (Earlier during development vm_fault_hold_quick_pages() was always called and the vm_page_t values were compared, but that was eventually removed without being adequately replaced.) Fix by storing the starting virtual address and comparing that (along with other fields) to determine if a buffer can be reused. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 21 23:10:56 2017 (r323883) +++ stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 21 23:10:59 2017 (r323884) @@ -1277,7 +1277,8 @@ pscmp(struct pageset *ps, struct vmspace *vm, vm_offse int pgoff, int len) { - if (ps->npages != npages || ps->offset != pgoff || ps->len != len) + if (ps->start != start || ps->npages != npages || + ps->offset != pgoff || ps->len != len) return (1); return (ps->vm != vm || ps->vm_timestamp != vm->vm_map.timestamp); @@ -1378,6 +1379,7 @@ hold_aio(struct toepcb *toep, struct kaiocb *job, stru ps->len = job->uaiocb.aio_nbytes; atomic_add_int(&vm->vm_refcnt, 1); ps->vm = vm; + ps->start = start; CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d", __func__, toep->tid, ps, job, ps->npages); Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Thu Sep 21 23:10:56 2017 (r323883) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Thu Sep 21 23:10:59 2017 (r323884) @@ -112,6 +112,7 @@ struct pageset { int len; struct ppod_reservation prsv; struct vmspace *vm; + vm_offset_t start; u_int vm_timestamp; }; From owner-svn-src-all@freebsd.org Thu Sep 21 23:14: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 C20A7E29140; Thu, 21 Sep 2017 23:14:08 +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 8F3676F1D5; Thu, 21 Sep 2017 23:14:08 +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 v8LNE7Or099160; Thu, 21 Sep 2017 23:14:07 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNE73t099157; Thu, 21 Sep 2017 23:14:07 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709212314.v8LNE73t099157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 21 Sep 2017 23:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323885 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:14:08 -0000 Author: tsoome Date: Thu Sep 21 23:14:07 2017 New Revision: 323885 URL: https://svnweb.freebsd.org/changeset/base/323885 Log: libefi: efi_devpath_match() should return bool The current implementation of efi_devpath_match() is returning values 0 or 1, so it should be updated to return bool. Modified: head/sys/boot/efi/libefi/devpath.c head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/devpath.c ============================================================================== --- head/sys/boot/efi/libefi/devpath.c Thu Sep 21 23:10:59 2017 (r323884) +++ head/sys/boot/efi/libefi/devpath.c Thu Sep 21 23:14:07 2017 (r323885) @@ -139,30 +139,30 @@ efi_devpath_handle(EFI_DEVICE_PATH *devpath) return (h); } -int +bool efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) { int len; if (devpath1 == NULL || devpath2 == NULL) - return (0); + return (false); - while (1) { + while (true) { if (DevicePathType(devpath1) != DevicePathType(devpath2) || DevicePathSubType(devpath1) != DevicePathSubType(devpath2)) - return (0); + return (false); len = DevicePathNodeLength(devpath1); if (len != DevicePathNodeLength(devpath2)) - return (0); + return (false); if (memcmp(devpath1, devpath2, (size_t)len) != 0) - return (0); + return (false); if (IsDevicePathEnd(devpath1)) break; devpath1 = NextDevicePathNode(devpath1); devpath2 = NextDevicePathNode(devpath2); } - return (1); + return (true); } Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Thu Sep 21 23:10:59 2017 (r323884) +++ head/sys/boot/efi/libefi/efipart.c Thu Sep 21 23:14:07 2017 (r323885) @@ -264,7 +264,7 @@ efipart_cdinfo_add(EFI_HANDLE handle, EFI_HANDLE alias unit = 0; STAILQ_FOREACH(pd, &cdinfo, pd_link) { - if (efi_devpath_match(pd->pd_devpath, devpath) != 0) { + if (efi_devpath_match(pd->pd_devpath, devpath) == true) { pd->pd_handle = handle; pd->pd_alias = alias; return (0); @@ -394,7 +394,7 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE STAILQ_INIT(&pd->pd_part); STAILQ_FOREACH(hd, &hdinfo, pd_link) { - if (efi_devpath_match(hd->pd_devpath, disk_devpath) != 0) { + if (efi_devpath_match(hd->pd_devpath, disk_devpath) == true) { /* Add the partition. */ pd->pd_handle = part_handle; pd->pd_unit = node->PartitionNumber; From owner-svn-src-all@freebsd.org Thu Sep 21 23: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 AEE2EE29908; Thu, 21 Sep 2017 23:22:19 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CDE16F8A9; Thu, 21 Sep 2017 23:22:19 +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 v8LNMIBD003273; Thu, 21 Sep 2017 23:22:18 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNMIFj003272; Thu, 21 Sep 2017 23:22:18 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709212322.v8LNMIFj003272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 21 Sep 2017 23:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323886 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:22:19 -0000 Author: tsoome Date: Thu Sep 21 23:22:18 2017 New Revision: 323886 URL: https://svnweb.freebsd.org/changeset/base/323886 Log: libefi: efipart.c should use calloc() The device specific *_add functions are using malloc() + memset, should use calloc instead. Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Thu Sep 21 23:14:07 2017 (r323885) +++ head/sys/boot/efi/libefi/efipart.c Thu Sep 21 23:22:18 2017 (r323886) @@ -198,12 +198,11 @@ efipart_fdinfo_add(EFI_HANDLE handle, uint32_t uid, EF { pdinfo_t *fd; - fd = malloc(sizeof(pdinfo_t)); + fd = calloc(1, sizeof(pdinfo_t)); if (fd == NULL) { printf("Failed to register floppy %d, out of memory\n", uid); return (ENOMEM); } - memset(fd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&fd->pd_part); fd->pd_unit = uid; @@ -272,12 +271,11 @@ efipart_cdinfo_add(EFI_HANDLE handle, EFI_HANDLE alias unit++; } - cd = malloc(sizeof(pdinfo_t)); + cd = calloc(1, sizeof(pdinfo_t)); if (cd == NULL) { printf("Failed to add cd %d, out of memory\n", unit); return (ENOMEM); } - memset(cd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&cd->pd_part); cd->pd_handle = handle; @@ -385,12 +383,11 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE if (node == NULL) return (ENOENT); /* This should not happen. */ - pd = malloc(sizeof(pdinfo_t)); + pd = calloc(1, sizeof(pdinfo_t)); if (pd == NULL) { printf("Failed to add disk, out of memory\n"); return (ENOMEM); } - memset(pd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&pd->pd_part); STAILQ_FOREACH(hd, &hdinfo, pd_link) { @@ -417,12 +414,11 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE hd->pd_devpath = disk_devpath; STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link); - pd = malloc(sizeof(pdinfo_t)); + pd = calloc(1, sizeof(pdinfo_t)); if (pd == NULL) { printf("Failed to add partition, out of memory\n"); return (ENOMEM); } - memset(pd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&pd->pd_part); /* Add the partition. */ @@ -456,12 +452,11 @@ efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) if (node == NULL) return (ENOENT); /* This should not happen. */ - pd = malloc(sizeof(pdinfo_t)); + pd = calloc(1, sizeof(pdinfo_t)); if (pd == NULL) { printf("Failed to add disk, out of memory\n"); return (ENOMEM); } - memset(pd, 0, sizeof(pdinfo_t)); STAILQ_INIT(&pd->pd_part); last = STAILQ_LAST(&hdinfo, pdinfo, pd_link); if (last != NULL) From owner-svn-src-all@freebsd.org Thu Sep 21 23: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 998A6E29DFD; Thu, 21 Sep 2017 23:27:36 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6734B6FCA9; Thu, 21 Sep 2017 23:27:36 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LNRZQU003619; Thu, 21 Sep 2017 23:27:35 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNRZKn003618; Thu, 21 Sep 2017 23:27:35 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709212327.v8LNRZKn003618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 21 Sep 2017 23:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323887 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:27:36 -0000 Author: shurd Date: Thu Sep 21 23:27:35 2017 New Revision: 323887 URL: https://svnweb.freebsd.org/changeset/base/323887 Log: Fix undeclared identifier error introduced in r323879 It doesn't appear to be safe to use gtask->gt_name. Reported by: Mark Johnston, Jenkins Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12448 Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Thu Sep 21 23:22:18 2017 (r323886) +++ head/sys/kern/subr_gtaskqueue.c Thu Sep 21 23:27:35 2017 (r323887) @@ -775,7 +775,7 @@ taskqgroup_attach_cpu_deferred(struct taskqgroup *qgro } if (qid == -1) { mtx_unlock(&qgroup->tqg_lock); - printf("%s: qid not found for %s cpu=%d\n", __func__, name, cpu); + printf("%s: qid not found for cpu=%d\n", __func__, cpu); return (EINVAL); } qgroup->tqg_queue[qid].tgc_cnt++; From owner-svn-src-all@freebsd.org Thu Sep 21 23:32: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 8B6C1E003F0; Thu, 21 Sep 2017 23:32:45 +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 59005702A8; Thu, 21 Sep 2017 23:32:45 +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 v8LNWiLQ007382; Thu, 21 Sep 2017 23:32:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNWiIt007381; Thu, 21 Sep 2017 23:32:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709212332.v8LNWiIt007381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 Sep 2017 23:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r323888 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: imp X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 323888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:32:45 -0000 Author: imp Date: Thu Sep 21 23:32:44 2017 New Revision: 323888 URL: https://svnweb.freebsd.org/changeset/base/323888 Log: Add Chuck Tuffli (chuck@). He'll be working on CAM and NVMe related things. Approved by: core@ Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Thu Sep 21 23:27:35 2017 (r323887) +++ svnadmin/conf/access Thu Sep 21 23:32:44 2017 (r323888) @@ -47,6 +47,7 @@ brueffer bryanv bz cem +chuck cognet cperciva cracauer From owner-svn-src-all@freebsd.org Fri Sep 22 00:15: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 450A8E02D90; Fri, 22 Sep 2017 00:15: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 1F60671866; Fri, 22 Sep 2017 00:15: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 v8M0Fs0f024462; Fri, 22 Sep 2017 00:15:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M0FsJ9024461; Fri, 22 Sep 2017 00:15:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709220015.v8M0FsJ9024461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 Sep 2017 00:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323889 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 323889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 00:15:55 -0000 Author: jhb Date: Fri Sep 22 00:15:54 2017 New Revision: 323889 URL: https://svnweb.freebsd.org/changeset/base/323889 Log: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD. Software crypto implementations don't care how the buffer is laid out, but hardware implementations may assume that the AAD is always before the plain/cipher text and that the hash/tag is immediately after the end of the plain/cipher text. In particular, this arrangement matches the layout of both IPSec packets and TLS frames. Linux's crypto framework also assumes this layout for AEAD requests. Reviewed by: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11758 Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Thu Sep 21 23:32:44 2017 (r323888) +++ head/sys/opencrypto/cryptodev.c Fri Sep 22 00:15:54 2017 (r323889) @@ -898,7 +898,7 @@ cryptodev_aead( uio->uio_iov = &cse->iovec; uio->uio_iovcnt = 1; uio->uio_offset = 0; - uio->uio_resid = caead->len + caead->aadlen + cse->thash->hashsize; + uio->uio_resid = caead->aadlen + caead->len + cse->thash->hashsize; uio->uio_segflg = UIO_SYSSPACE; uio->uio_rw = UIO_WRITE; uio->uio_td = td; @@ -916,17 +916,17 @@ cryptodev_aead( crda = crp->crp_desc; crde = crda->crd_next; - if ((error = copyin(caead->src, cse->uio.uio_iov[0].iov_base, - caead->len))) + if ((error = copyin(caead->aad, cse->uio.uio_iov[0].iov_base, + caead->aadlen))) goto bail; - if ((error = copyin(caead->aad, (char *)cse->uio.uio_iov[0].iov_base + - caead->len, caead->aadlen))) + if ((error = copyin(caead->src, (char *)cse->uio.uio_iov[0].iov_base + + caead->aadlen, caead->len))) goto bail; - crda->crd_skip = caead->len; + crda->crd_skip = 0; crda->crd_len = caead->aadlen; - crda->crd_inject = caead->len + caead->aadlen; + crda->crd_inject = caead->aadlen + caead->len; crda->crd_alg = cse->mac; crda->crd_key = cse->mackey; @@ -936,15 +936,15 @@ cryptodev_aead( crde->crd_flags |= CRD_F_ENCRYPT; else crde->crd_flags &= ~CRD_F_ENCRYPT; - /* crde->crd_skip set below */ + crde->crd_skip = caead->aadlen; crde->crd_len = caead->len; - crde->crd_inject = 0; + crde->crd_inject = caead->aadlen; crde->crd_alg = cse->cipher; crde->crd_key = cse->key; crde->crd_klen = cse->keylen * 8; - crp->crp_ilen = caead->len + caead->aadlen; + crp->crp_ilen = caead->aadlen + caead->len; crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIMM | (caead->flags & COP_F_BATCH); crp->crp_buf = (caddr_t)&cse->uio.uio_iov; @@ -962,10 +962,9 @@ cryptodev_aead( goto bail; bcopy(cse->tmp_iv, crde->crd_iv, caead->ivlen); crde->crd_flags |= CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT; - crde->crd_skip = 0; } else { crde->crd_flags |= CRD_F_IV_PRESENT; - crde->crd_skip = cse->txform->blocksize; + crde->crd_skip += cse->txform->blocksize; crde->crd_len -= cse->txform->blocksize; } @@ -1005,12 +1004,13 @@ again: goto bail; } - if (caead->dst && (error = copyout(cse->uio.uio_iov[0].iov_base, - caead->dst, caead->len))) + if (caead->dst && (error = copyout( + (caddr_t)cse->uio.uio_iov[0].iov_base + caead->aadlen, caead->dst, + caead->len))) goto bail; if ((error = copyout((caddr_t)cse->uio.uio_iov[0].iov_base + - caead->len + caead->aadlen, caead->tag, cse->thash->hashsize))) + caead->aadlen + caead->len, caead->tag, cse->thash->hashsize))) goto bail; bail: From owner-svn-src-all@freebsd.org Fri Sep 22 00:16: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 8A088E02E98; Fri, 22 Sep 2017 00:16:47 +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 566C8719D6; Fri, 22 Sep 2017 00:16:47 +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 v8M0GkgO024552; Fri, 22 Sep 2017 00:16:46 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M0GkRh024551; Fri, 22 Sep 2017 00:16:46 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709220016.v8M0GkRh024551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 22 Sep 2017 00:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323890 - releng/10.4/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/sys/conf X-SVN-Commit-Revision: 323890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 00:16:47 -0000 Author: marius Date: Fri Sep 22 00:16:46 2017 New Revision: 323890 URL: https://svnweb.freebsd.org/changeset/base/323890 Log: Update releng/10.4 to RC2 in preparation for 10.4-RC2 builds. Approved by: re (implicit) Modified: releng/10.4/sys/conf/newvers.sh Modified: releng/10.4/sys/conf/newvers.sh ============================================================================== --- releng/10.4/sys/conf/newvers.sh Fri Sep 22 00:15:54 2017 (r323889) +++ releng/10.4/sys/conf/newvers.sh Fri Sep 22 00:16:46 2017 (r323890) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.4" -BRANCH="RC1" +BRANCH="RC2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Sep 22 00: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 F275CE03521; Fri, 22 Sep 2017 00:21:59 +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 C637971E11; Fri, 22 Sep 2017 00:21:59 +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 v8M0LwnF026929; Fri, 22 Sep 2017 00:21:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M0LwhQ026926; Fri, 22 Sep 2017 00:21:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709220021.v8M0LwhQ026926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 Sep 2017 00:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323891 - in head: share/man/man4 sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: share/man/man4 sys/opencrypto X-SVN-Commit-Revision: 323891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 00:22:00 -0000 Author: jhb Date: Fri Sep 22 00:21:58 2017 New Revision: 323891 URL: https://svnweb.freebsd.org/changeset/base/323891 Log: Add a new COP_F_CIPHER_FIRST flag for struct crypt_op. This requests that the cipher be performed before rather than after the HMAC when both are specified for a single operation. Reviewed by: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11757 Modified: head/share/man/man4/crypto.4 head/sys/opencrypto/cryptodev.c head/sys/opencrypto/cryptodev.h Modified: head/share/man/man4/crypto.4 ============================================================================== --- head/share/man/man4/crypto.4 Fri Sep 22 00:16:46 2017 (r323890) +++ head/share/man/man4/crypto.4 Fri Sep 22 00:21:58 2017 (r323891) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2015 +.Dd September 21, 2017 .Dt CRYPTO 4 .Os .Sh NAME @@ -127,7 +127,9 @@ Asymmetric operations do not use sessions. .It Submit requests, synchronously with .Dv CIOCCRYPT -(symmetric) +(symmetric), +.Dv CIOCCRYPTAEAD +(symmetric), or .Dv CIOCKEY (asymmetric). @@ -279,6 +281,16 @@ supplies the length of the input buffer; the fields .Fa cr_op-\*[Gt]iv supply the addresses of the input buffer, output buffer, one-way hash, and initialization vector, respectively. +If a session is using both a privacy algorithm and a hash algorithm, +the request will generate a hash of the input buffer before +generating the output buffer by default. +If the +.Dv COP_F_CIPHER_FIRST +flag is included in the +.Fa cr_op-\*[Gt]flags +field, +then the request will generate a hash of the output buffer after +executing the privacy algorithm. .It Dv CIOCCRYPTAEAD Fa struct crypt_aead *cr_aead .Bd -literal struct crypt_aead { Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Fri Sep 22 00:16:46 2017 (r323890) +++ head/sys/opencrypto/cryptodev.c Fri Sep 22 00:21:58 2017 (r323891) @@ -731,18 +731,22 @@ cryptodev_op( goto bail; } - if (cse->thash) { - crda = crp->crp_desc; - if (cse->txform) - crde = crda->crd_next; - } else { - if (cse->txform) + if (cse->thash && cse->txform) { + if (cop->flags & COP_F_CIPHER_FIRST) { crde = crp->crp_desc; - else { - SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); - error = EINVAL; - goto bail; + crda = crde->crd_next; + } else { + crda = crp->crp_desc; + crde = crda->crd_next; } + } else if (cse->thash) { + crda = crp->crp_desc; + } else if (cse->txform) { + crde = crp->crp_desc; + } else { + SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); + error = EINVAL; + goto bail; } if ((error = copyin(cop->src, cse->uio.uio_iov[0].iov_base, Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Fri Sep 22 00:16:46 2017 (r323890) +++ head/sys/opencrypto/cryptodev.h Fri Sep 22 00:21:58 2017 (r323891) @@ -238,7 +238,8 @@ struct crypt_op { #define COP_ENCRYPT 1 #define COP_DECRYPT 2 u_int16_t flags; -#define COP_F_BATCH 0x0008 /* Batch op if possible */ +#define COP_F_CIPHER_FIRST 0x0001 /* Cipher before MAC. */ +#define COP_F_BATCH 0x0008 /* Batch op if possible */ u_int len; c_caddr_t src; /* become iov[] inside kernel */ caddr_t dst; From owner-svn-src-all@freebsd.org Fri Sep 22 00:34: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 C0A79E04099; Fri, 22 Sep 2017 00:34:47 +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 8E436724D3; Fri, 22 Sep 2017 00:34:47 +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 v8M0YkiR032685; Fri, 22 Sep 2017 00:34:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M0Yk9H032684; Fri, 22 Sep 2017 00:34:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709220034.v8M0Yk9H032684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 Sep 2017 00:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323892 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 323892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 00:34:47 -0000 Author: jhb Date: Fri Sep 22 00:34:46 2017 New Revision: 323892 URL: https://svnweb.freebsd.org/changeset/base/323892 Log: Support AEAD requests with non-GCM algorithms. In particular, support chaining an AES cipher with an HMAC for a request including AAD. This permits submitting requests from userland to encrypt objects like IPSec packets using these algorithms. In the non-GCM case, the authentication crypto descriptor covers both the AAD and the ciphertext. The GCM case remains unchanged. This matches the requests created internally in IPSec. For the non-GCM case, the COP_F_CIPHER_FIRST is also supported since the ordering matters. Note that while this can be used to simulate IPSec requests from userland, this ioctl cannot currently be used to perform TLS requests using AES-CBC and MAC-before-encrypt. Reviewed by: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11759 Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Fri Sep 22 00:21:58 2017 (r323891) +++ head/sys/opencrypto/cryptodev.c Fri Sep 22 00:34:46 2017 (r323892) @@ -917,8 +917,13 @@ cryptodev_aead( goto bail; } - crda = crp->crp_desc; - crde = crda->crd_next; + if (caead->flags & COP_F_CIPHER_FIRST) { + crde = crp->crp_desc; + crda = crde->crd_next; + } else { + crda = crp->crp_desc; + crde = crda->crd_next; + } if ((error = copyin(caead->aad, cse->uio.uio_iov[0].iov_base, caead->aadlen))) @@ -928,8 +933,16 @@ cryptodev_aead( caead->aadlen, caead->len))) goto bail; + /* + * For GCM, crd_len covers only the AAD. For other ciphers + * chained with an HMAC, crd_len covers both the AAD and the + * cipher text. + */ crda->crd_skip = 0; - crda->crd_len = caead->aadlen; + if (cse->cipher == CRYPTO_AES_NIST_GCM_16) + crda->crd_len = caead->aadlen; + else + crda->crd_len = caead->aadlen + caead->len; crda->crd_inject = caead->aadlen + caead->len; crda->crd_alg = cse->mac; From owner-svn-src-all@freebsd.org Fri Sep 22 02:36: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 52D8FE0A965; Fri, 22 Sep 2017 02:36:33 +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 20A5475373; Fri, 22 Sep 2017 02:36:33 +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 v8M2aWGf081688; Fri, 22 Sep 2017 02:36:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M2aWUN081687; Fri, 22 Sep 2017 02:36:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709220236.v8M2aWUN081687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 22 Sep 2017 02:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323893 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 02:36:33 -0000 Author: imp Date: Fri Sep 22 02:36:32 2017 New Revision: 323893 URL: https://svnweb.freebsd.org/changeset/base/323893 Log: cam iosched: Enforce iop limits below the quanta value Previously the iops limiter would always allow at least quanta ios per second as cam_iosched_iops_tick() never set ios->l_value1 below 1. Submitted by: Fabian Keil Obtained from: ElectroBSD PR: 221974 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Fri Sep 22 00:34:46 2017 (r323892) +++ head/sys/cam/cam_iosched.c Fri Sep 22 02:36:32 2017 (r323893) @@ -415,6 +415,7 @@ cam_iosched_iops_init(struct iop_stats *ios) ios->l_value1 = ios->current / ios->softc->quanta; if (ios->l_value1 <= 0) ios->l_value1 = 1; + ios->l_value2 = 0; return 0; } @@ -423,9 +424,18 @@ static int cam_iosched_iops_tick(struct iop_stats *ios) { + if ((ios->softc->total_ticks % ios->softc->quanta) == 0) + ios->l_value2 = 0; + ios->l_value1 = (int)((ios->current * (uint64_t)ios->softc->this_frac) >> 16); - if (ios->l_value1 <= 0) + /* + * Allow at least one IO per tick until all + * the IOs for this interval have been spent. + */ + if (ios->l_value1 <= 0 && ios->l_value2 < ios->current) { ios->l_value1 = 1; + ios->l_value2++; + } return 0; } From owner-svn-src-all@freebsd.org Fri Sep 22 02:36: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 B966BE0A981; Fri, 22 Sep 2017 02:36:37 +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 81E677537F; Fri, 22 Sep 2017 02:36: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 v8M2aaXL081757; Fri, 22 Sep 2017 02:36:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M2aaFG081756; Fri, 22 Sep 2017 02:36:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709220236.v8M2aaFG081756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 22 Sep 2017 02:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323894 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 323894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 02:36:37 -0000 Author: imp Date: Fri Sep 22 02:36:36 2017 New Revision: 323894 URL: https://svnweb.freebsd.org/changeset/base/323894 Log: cam iosched: Bettar account IOPS for smoother performance Prevent cam_iosched_iops_tick() from discarding 'unspent' ios unless it's a new accounting interval. Previously ios that weren't used between ticks were lost, as a result the iops limiter could enforce a limit below the configured maximum. Obtained from: ElectroBSD Submitted by: Fabian Keil PR: 221974 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Fri Sep 22 02:36:32 2017 (r323893) +++ head/sys/cam/cam_iosched.c Fri Sep 22 02:36:36 2017 (r323894) @@ -423,19 +423,30 @@ cam_iosched_iops_init(struct iop_stats *ios) static int cam_iosched_iops_tick(struct iop_stats *ios) { + int new_ios; - if ((ios->softc->total_ticks % ios->softc->quanta) == 0) - ios->l_value2 = 0; - - ios->l_value1 = (int)((ios->current * (uint64_t)ios->softc->this_frac) >> 16); /* * Allow at least one IO per tick until all * the IOs for this interval have been spent. */ - if (ios->l_value1 <= 0 && ios->l_value2 < ios->current) { - ios->l_value1 = 1; + new_ios = (int)((ios->current * (uint64_t)ios->softc->this_frac) >> 16); + if (new_ios < 1 && ios->l_value2 < ios->current) { + new_ios = 1; ios->l_value2++; } + + /* + * If this a new accounting interval, discard any "unspent" ios + * granted in the previous interval. Otherwise add the new ios to + * the previously granted ones that haven't been spent yet. + */ + if ((ios->softc->total_ticks % ios->softc->quanta) == 0) { + ios->l_value1 = new_ios; + ios->l_value2 = 1; + } else { + ios->l_value1 += new_ios; + } + return 0; } From owner-svn-src-all@freebsd.org Fri Sep 22 02:53: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 BA45CE0CA15; Fri, 22 Sep 2017 02:53:02 +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 86B2175E15; Fri, 22 Sep 2017 02:53:02 +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 v8M2r1p2089768; Fri, 22 Sep 2017 02:53:01 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M2r1bZ089767; Fri, 22 Sep 2017 02:53:01 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220253.v8M2r1bZ089767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 02:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323895 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 02:53:02 -0000 Author: tsoome Date: Fri Sep 22 02:53:01 2017 New Revision: 323895 URL: https://svnweb.freebsd.org/changeset/base/323895 Log: libefi: efi_devpath_match local len should be unsigned DevicePathNodeLength() will always return unsigned value. Modified: head/sys/boot/efi/libefi/devpath.c Modified: head/sys/boot/efi/libefi/devpath.c ============================================================================== --- head/sys/boot/efi/libefi/devpath.c Fri Sep 22 02:36:36 2017 (r323894) +++ head/sys/boot/efi/libefi/devpath.c Fri Sep 22 02:53:01 2017 (r323895) @@ -142,7 +142,7 @@ efi_devpath_handle(EFI_DEVICE_PATH *devpath) bool efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) { - int len; + size_t len; if (devpath1 == NULL || devpath2 == NULL) return (false); @@ -156,7 +156,7 @@ efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVIC if (len != DevicePathNodeLength(devpath2)) return (false); - if (memcmp(devpath1, devpath2, (size_t)len) != 0) + if (memcmp(devpath1, devpath2, len) != 0) return (false); if (IsDevicePathEnd(devpath1)) From owner-svn-src-all@freebsd.org Fri Sep 22 02:56: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 94C5BE0CCBB; Fri, 22 Sep 2017 02:56:27 +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 6405D75FB8; Fri, 22 Sep 2017 02:56:27 +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 v8M2uQ3A089946; Fri, 22 Sep 2017 02:56:26 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M2uQAL089945; Fri, 22 Sep 2017 02:56:26 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220256.v8M2uQAL089945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 02:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323896 - head/sys/boot/efi/include X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/include X-SVN-Commit-Revision: 323896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 02:56:27 -0000 Author: tsoome Date: Fri Sep 22 02:56:26 2017 New Revision: 323896 URL: https://svnweb.freebsd.org/changeset/base/323896 Log: r323885 did miss efilib.h update The efilib.h update was left out from r323885 by mistake. Modified: head/sys/boot/efi/include/efilib.h Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Fri Sep 22 02:53:01 2017 (r323895) +++ head/sys/boot/efi/include/efilib.h Fri Sep 22 02:56:26 2017 (r323896) @@ -31,6 +31,7 @@ #define _LOADER_EFILIB_H #include +#include #include extern EFI_HANDLE IH; @@ -80,7 +81,7 @@ EFI_DEVICE_PATH *efi_lookup_devpath(EFI_HANDLE); EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *); -int efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); +bool efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); From owner-svn-src-all@freebsd.org Fri Sep 22 02:58: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 C1418E0CF85; Fri, 22 Sep 2017 02:58:48 +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 90BA976156; Fri, 22 Sep 2017 02:58:48 +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 v8M2wlpd090064; Fri, 22 Sep 2017 02:58:47 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M2wlVE090063; Fri, 22 Sep 2017 02:58:47 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220258.v8M2wlVE090063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 02:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323897 - head/sys/boot/efi/include X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/include X-SVN-Commit-Revision: 323897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 02:58:48 -0000 Author: tsoome Date: Fri Sep 22 02:58:47 2017 New Revision: 323897 URL: https://svnweb.freebsd.org/changeset/base/323897 Log: efilib.h: typo in structure member description The link should be replaced by list. Modified: head/sys/boot/efi/include/efilib.h Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Fri Sep 22 02:56:26 2017 (r323896) +++ head/sys/boot/efi/include/efilib.h Fri Sep 22 02:58:47 2017 (r323897) @@ -51,7 +51,7 @@ typedef STAILQ_HEAD(pdinfo_list, pdinfo) pdinfo_list_t typedef struct pdinfo { STAILQ_ENTRY(pdinfo) pd_link; /* link in device list */ - pdinfo_list_t pd_part; /* link of partitions */ + pdinfo_list_t pd_part; /* list of partitions */ EFI_HANDLE pd_handle; EFI_HANDLE pd_alias; EFI_DEVICE_PATH *pd_devpath; From owner-svn-src-all@freebsd.org Fri Sep 22 04:25: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 9EBEBE129FE; Fri, 22 Sep 2017 04:25:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E72B7CBC8; Fri, 22 Sep 2017 04:25:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8M4PiXK027024; Fri, 22 Sep 2017 04:25:44 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M4PiXA027023; Fri, 22 Sep 2017 04:25:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709220425.v8M4PiXA027023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 22 Sep 2017 04:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323898 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 323898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 04:25:45 -0000 Author: cem Date: Fri Sep 22 04:25:44 2017 New Revision: 323898 URL: https://svnweb.freebsd.org/changeset/base/323898 Log: cryptotest.py: Fix whitespace style errors I accidentally introduced different whitespace style in r323878. I'm not used to using tabs for indentation in Python scripts. Whitespace only; no functional change. Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Fri Sep 22 02:58:47 2017 (r323897) +++ head/tests/sys/opencrypto/cryptotest.py Fri Sep 22 04:25:44 2017 (r323898) @@ -249,29 +249,29 @@ def GenTestCase(cname): blocksize = None if hashlen == 20: - alg = cryptodev.CRYPTO_SHA1_HMAC - blocksize = 64 + alg = cryptodev.CRYPTO_SHA1_HMAC + blocksize = 64 elif hashlen == 28: - # Cryptodev doesn't support SHA-224 - # Slurp remaining input in section - for data in lines: + # Cryptodev doesn't support SHA-224 + # Slurp remaining input in section + for data in lines: + continue continue - continue elif hashlen == 32: - alg = cryptodev.CRYPTO_SHA2_256_HMAC - blocksize = 64 + alg = cryptodev.CRYPTO_SHA2_256_HMAC + blocksize = 64 elif hashlen == 48: - alg = cryptodev.CRYPTO_SHA2_384_HMAC - blocksize = 128 + alg = cryptodev.CRYPTO_SHA2_384_HMAC + blocksize = 128 elif hashlen == 64: - alg = cryptodev.CRYPTO_SHA2_512_HMAC - blocksize = 128 + alg = cryptodev.CRYPTO_SHA2_512_HMAC + blocksize = 128 else: - # Skip unsupported hashes - # Slurp remaining input in section - for data in lines: + # Skip unsupported hashes + # Slurp remaining input in section + for data in lines: + continue continue - continue for data in lines: key = data['Key'].decode('hex') From owner-svn-src-all@freebsd.org Fri Sep 22 04:41: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 228D1E146BA; Fri, 22 Sep 2017 04:41:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E42A57D310; Fri, 22 Sep 2017 04:41:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8M4fn2I034520; Fri, 22 Sep 2017 04:41:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M4fngZ034519; Fri, 22 Sep 2017 04:41:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709220441.v8M4fngZ034519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 22 Sep 2017 04:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323899 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 323899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 04:41:50 -0000 Author: cem Date: Fri Sep 22 04:41:48 2017 New Revision: 323899 URL: https://svnweb.freebsd.org/changeset/base/323899 Log: cryptotest.py: Like r323869, skip SHA HMAC tests on non-SHA drivers Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Fri Sep 22 04:25:44 2017 (r323898) +++ head/tests/sys/opencrypto/cryptotest.py Fri Sep 22 04:41:48 2017 (r323899) @@ -237,6 +237,7 @@ def GenTestCase(cname): #for i in iglob('SHA1*'): # self.runSHA(i) + @unittest.skipIf(cname not in shamodules, 'skipping SHA on %s' % `cname`) def test_sha1hmac(self): for i in katg('hmactestvectors', 'HMAC.rsp'): self.runSHA1HMAC(i) From owner-svn-src-all@freebsd.org Fri Sep 22 04:57: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 0AE12E15563; Fri, 22 Sep 2017 04:57:44 +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 C8AB27DA5D; Fri, 22 Sep 2017 04:57:43 +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 v8M4vg3p039556; Fri, 22 Sep 2017 04:57:42 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M4vg0u039555; Fri, 22 Sep 2017 04:57:42 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709220457.v8M4vg0u039555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 22 Sep 2017 04:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323900 - stable/10/release X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/release X-SVN-Commit-Revision: 323900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 04:57:44 -0000 Author: marius Date: Fri Sep 22 04:57:42 2017 New Revision: 323900 URL: https://svnweb.freebsd.org/changeset/base/323900 Log: - Akin r302691 in head, synchronize the build stripping for the disc1 image with that of the bootonly image (but similarly modulo games and groff(1)) as the amd64 disc1 image is overflowing. This also removes the defunct WITHOUT_ATF. - Remove the misspelled WITHOUT_INSTALLIB (also in place with correct spelling, i. e. WITHOUT_INSTALLLIB) from the bootonly image build stripping. This is a direct commit to stable/10 as the corresponding knobs have different names in head and counterparts to e. g. MK_DEBUG_FILES and MK_TESTS default to off in stable/10 in the first place. Modified: stable/10/release/Makefile Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Fri Sep 22 04:41:48 2017 (r323899) +++ stable/10/release/Makefile Fri Sep 22 04:57:42 2017 (r323900) @@ -192,8 +192,11 @@ disc1: packagesystem # Install system mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ - DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 \ - WITHOUT_PROFILE=1 WITHOUT_SENDMAIL=1 WITHOUT_ATF=1 WITHOUT_LIB32=1 + DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_AMD=1 WITHOUT_AT=1 \ + WITHOUT_INSTALLLIB=1 WITHOUT_LIB32=1 WITHOUT_MAIL=1 \ + WITHOUT_NCP=1 WITHOUT_TOOLCHAIN=1 WITHOUT_PROFILE=1 \ + WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ + WITHOUT_KERNEL_SYMBOLS=1 # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist @@ -217,7 +220,7 @@ bootonly: packagesystem WITHOUT_GAMES=1 WITHOUT_GROFF=1 \ WITHOUT_INSTALLLIB=1 WITHOUT_LIB32=1 WITHOUT_MAIL=1 \ WITHOUT_NCP=1 WITHOUT_TOOLCHAIN=1 WITHOUT_PROFILE=1 \ - WITHOUT_INSTALLIB=1 WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ + WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ WITHOUT_KERNEL_SYMBOLS=1 # Copy manifest only (no distfiles) to get checksums mkdir -p ${.TARGET}/usr/freebsd-dist From owner-svn-src-all@freebsd.org Fri Sep 22 05: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 6DEDEE163A9; Fri, 22 Sep 2017 05:14:12 +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 3D15E7E295; Fri, 22 Sep 2017 05:14:12 +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 v8M5EBBL047833; Fri, 22 Sep 2017 05:14:11 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M5EBWi047832; Fri, 22 Sep 2017 05:14:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709220514.v8M5EBWi047832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 22 Sep 2017 05:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323901 - releng/10.4/release X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/release X-SVN-Commit-Revision: 323901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 05:14:12 -0000 Author: marius Date: Fri Sep 22 05:14:11 2017 New Revision: 323901 URL: https://svnweb.freebsd.org/changeset/base/323901 Log: MF10: r323900 - Akin r302691 in head, synchronize the build stripping for the disc1 image with that of the bootonly image (but similarly modulo games and groff(1)) as the amd64 disc1 image is overflowing. This also removes the defunct WITHOUT_ATF. - Remove the misspelled WITHOUT_INSTALLIB (also in place with correct spelling, i. e. WITHOUT_INSTALLLIB) from the bootonly image build stripping. This is a direct commit to stable/10 as the corresponding knobs have different names in head and counterparts to e. g. MK_DEBUG_FILES and MK_TESTS default to off in stable/10 in the first place. Approved by: re (implicit) Modified: releng/10.4/release/Makefile Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/release/Makefile ============================================================================== --- releng/10.4/release/Makefile Fri Sep 22 04:57:42 2017 (r323900) +++ releng/10.4/release/Makefile Fri Sep 22 05:14:11 2017 (r323901) @@ -192,8 +192,11 @@ disc1: packagesystem # Install system mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ - DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 \ - WITHOUT_PROFILE=1 WITHOUT_SENDMAIL=1 WITHOUT_ATF=1 WITHOUT_LIB32=1 + DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_AMD=1 WITHOUT_AT=1 \ + WITHOUT_INSTALLLIB=1 WITHOUT_LIB32=1 WITHOUT_MAIL=1 \ + WITHOUT_NCP=1 WITHOUT_TOOLCHAIN=1 WITHOUT_PROFILE=1 \ + WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ + WITHOUT_KERNEL_SYMBOLS=1 # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist @@ -217,7 +220,7 @@ bootonly: packagesystem WITHOUT_GAMES=1 WITHOUT_GROFF=1 \ WITHOUT_INSTALLLIB=1 WITHOUT_LIB32=1 WITHOUT_MAIL=1 \ WITHOUT_NCP=1 WITHOUT_TOOLCHAIN=1 WITHOUT_PROFILE=1 \ - WITHOUT_INSTALLIB=1 WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ + WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ WITHOUT_KERNEL_SYMBOLS=1 # Copy manifest only (no distfiles) to get checksums mkdir -p ${.TARGET}/usr/freebsd-dist From owner-svn-src-all@freebsd.org Fri Sep 22 06:07:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5664FE1871D; Fri, 22 Sep 2017 06:07:48 +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 23CB87FA63; Fri, 22 Sep 2017 06:07:48 +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 v8M67lKA068346; Fri, 22 Sep 2017 06:07:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M67lUL068345; Fri, 22 Sep 2017 06:07:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709220607.v8M67lUL068345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Sep 2017 06:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323902 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 06:07:48 -0000 Author: tuexen Date: Fri Sep 22 06:07:47 2017 New Revision: 323902 URL: https://svnweb.freebsd.org/changeset/base/323902 Log: Add missing socket lock. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri Sep 22 05:14:11 2017 (r323901) +++ head/sys/netinet/sctp_pcb.c Fri Sep 22 06:07:47 2017 (r323902) @@ -2484,7 +2484,9 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) inp->sctp_flags = (SCTP_PCB_FLAGS_TCPTYPE | SCTP_PCB_FLAGS_UNBOUND); /* Be sure we have blocking IO by default */ + SOCK_LOCK(so); SCTP_CLEAR_SO_NBIO(so); + SOCK_UNLOCK(so); } else { /* * unsupported socket type (RAW, etc)- in case we missed it From owner-svn-src-all@freebsd.org Fri Sep 22 06:16: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 01CE5E18B96; Fri, 22 Sep 2017 06:16:23 +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 C45EA7FE9B; Fri, 22 Sep 2017 06:16:22 +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 v8M6GLE8072591; Fri, 22 Sep 2017 06:16:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M6GLHJ072590; Fri, 22 Sep 2017 06:16:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709220616.v8M6GLHJ072590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Sep 2017 06:16: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: r323903 - stable/11/usr.bin/grep/regex X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.bin/grep/regex X-SVN-Commit-Revision: 323903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 06:16:23 -0000 Author: emaste Date: Fri Sep 22 06:16:21 2017 New Revision: 323903 URL: https://svnweb.freebsd.org/changeset/base/323903 Log: MFC r323611: fastmatch.h: remove duplicate #defines Modified: stable/11/usr.bin/grep/regex/fastmatch.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/grep/regex/fastmatch.h ============================================================================== --- stable/11/usr.bin/grep/regex/fastmatch.h Fri Sep 22 06:07:47 2017 (r323902) +++ stable/11/usr.bin/grep/regex/fastmatch.h Fri Sep 22 06:16:21 2017 (r323903) @@ -92,17 +92,4 @@ tre_fastwnexec(const fastmatch_t *preg, const wchar_t #define fastexec tre_fastexec #define fastwnexec tre_fastwnexec #define fastwexec tre_fastwexec -#define fixcomp tre_fixcomp -#define fastcomp tre_fastcomp -#define fastexec tre_fastexec -#define fastfree tre_fastfree -#define fixwcomp tre_fixwcomp -#define fastwcomp tre_fastwcomp -#define fastwexec tre_fastwexec -#define fixncomp tre_fixncomp -#define fastncomp tre_fastncomp -#define fastnexec tre_fastnexec -#define fixwncomp tre_fixwncomp -#define fastwncomp tre_fastwncomp -#define fastwnexec tre_fastwnexec #endif /* FASTMATCH_H */ From owner-svn-src-all@freebsd.org Fri Sep 22 06:33:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAB44E1956A; Fri, 22 Sep 2017 06:33:02 +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 89C12807EC; Fri, 22 Sep 2017 06:33:02 +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 v8M6X1qK080531; Fri, 22 Sep 2017 06:33:01 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M6X1KC080530; Fri, 22 Sep 2017 06:33:01 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201709220633.v8M6X1KC080530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Sep 2017 06:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323904 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 323904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 06:33:02 -0000 Author: tuexen Date: Fri Sep 22 06:33:01 2017 New Revision: 323904 URL: https://svnweb.freebsd.org/changeset/base/323904 Log: Add missing locking. Found by Coverity while scanning the usrsctp library. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Sep 22 06:16:21 2017 (r323903) +++ head/sys/netinet/sctp_input.c Fri Sep 22 06:33:01 2017 (r323904) @@ -699,6 +699,14 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb) */ struct sctpasochead *head; + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED)) { + atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_UNLOCK(stcb); + SCTP_INP_INFO_WLOCK(); + SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); + } if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { /* generate a new vtag and send init */ LIST_REMOVE(stcb, sctp_asocs); @@ -710,6 +718,7 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb) */ LIST_INSERT_HEAD(head, stcb, sctp_asocs); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); + SCTP_INP_INFO_WUNLOCK(); return (1); } if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED) { @@ -731,6 +740,7 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb) */ LIST_INSERT_HEAD(head, stcb, sctp_asocs); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); + SCTP_INP_INFO_WUNLOCK(); return (1); } return (0); From owner-svn-src-all@freebsd.org Fri Sep 22 07:29: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 298BDE1BF0D; Fri, 22 Sep 2017 07:29:28 +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 E6E2281BF2; Fri, 22 Sep 2017 07:29:27 +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 v8M7TQiQ001192; Fri, 22 Sep 2017 07:29:26 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M7TQmO001190; Fri, 22 Sep 2017 07:29:26 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220729.v8M7TQmO001190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 07:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323905 - in head/sys/boot/efi: include loader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/sys/boot/efi: include loader X-SVN-Commit-Revision: 323905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 07:29:28 -0000 Author: tsoome Date: Fri Sep 22 07:29:26 2017 New Revision: 323905 URL: https://svnweb.freebsd.org/changeset/base/323905 Log: libefi: pdinfo_t pd_unit and pd_open should be unsigned The device index, partition index and reference counter are all positive numbers. However, since our internal partition number may be negative to indicate GPT table, the compare expression need to take care when comparing pdinfo_t and partition data. Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Fri Sep 22 06:33:01 2017 (r323904) +++ head/sys/boot/efi/include/efilib.h Fri Sep 22 07:29:26 2017 (r323905) @@ -56,8 +56,8 @@ typedef struct pdinfo EFI_HANDLE pd_alias; EFI_DEVICE_PATH *pd_devpath; EFI_BLOCK_IO *pd_blkio; - int pd_unit; /* unit number */ - int pd_open; /* reference counter */ + uint32_t pd_unit; /* unit number */ + uint32_t pd_open; /* reference counter */ void *pd_bcache; /* buffer cache data */ } pdinfo_t; Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Fri Sep 22 06:33:01 2017 (r323904) +++ head/sys/boot/efi/loader/main.c Fri Sep 22 07:29:26 2017 (r323905) @@ -901,7 +901,7 @@ command_chain(int argc, char *argv[]) /* * d_partition should be 255 */ - if (pd->pd_unit == d_dev->d_slice) { + if (pd->pd_unit == (uint32_t)d_dev->d_slice) { loaded_image->DeviceHandle = pd->pd_handle; break; From owner-svn-src-all@freebsd.org Fri Sep 22 07:34: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 5F710E1C23B; Fri, 22 Sep 2017 07:34:09 +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 2C6FB81FF6; Fri, 22 Sep 2017 07:34:09 +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 v8M7Y80C005179; Fri, 22 Sep 2017 07:34:08 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M7Y8xi005178; Fri, 22 Sep 2017 07:34:08 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220734.v8M7Y8xi005178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 07:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323906 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 07:34:09 -0000 Author: tsoome Date: Fri Sep 22 07:34:08 2017 New Revision: 323906 URL: https://svnweb.freebsd.org/changeset/base/323906 Log: libefi: efipart_strategy() should return ENXIO when there is no media We should return ENXIO to indicate the situation with device present, but no media. Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:29:26 2017 (r323905) +++ head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:34:08 2017 (r323906) @@ -857,7 +857,7 @@ efipart_strategy(void *devdata, int rw, daddr_t blk, s if (pd->pd_blkio->Media->RemovableMedia && !pd->pd_blkio->Media->MediaPresent) - return (EIO); + return (ENXIO); bcd.dv_strategy = efipart_realstrategy; bcd.dv_devdata = devdata; From owner-svn-src-all@freebsd.org Fri Sep 22 07:37:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E473BE1C3D7; Fri, 22 Sep 2017 07:37:43 +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 B22D382184; Fri, 22 Sep 2017 07:37:43 +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 v8M7bgq1005363; Fri, 22 Sep 2017 07:37:42 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M7bgqw005362; Fri, 22 Sep 2017 07:37:42 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220737.v8M7bgqw005362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 07:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323907 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 07:37:44 -0000 Author: tsoome Date: Fri Sep 22 07:37:42 2017 New Revision: 323907 URL: https://svnweb.freebsd.org/changeset/base/323907 Log: libefi: efipart.c cstyle fix for efipart_print_common() The else statement should have { } Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:34:08 2017 (r323906) +++ head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:37:42 2017 (r323907) @@ -632,8 +632,9 @@ efipart_print_common(struct devsw *dev, pdinfo_list_t if (blkio->Media->MediaPresent) { if (blkio->Media->RemovableMedia) printf(" (removable)"); - } else + } else { printf(" (no media)"); + } if ((ret = pager_output("\n")) != 0) break; if (!blkio->Media->MediaPresent) From owner-svn-src-all@freebsd.org Fri Sep 22 07:40: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 773F1E1C579; Fri, 22 Sep 2017 07:40:06 +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 42F3C823E6; Fri, 22 Sep 2017 07:40:06 +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 v8M7e58u005648; Fri, 22 Sep 2017 07:40:05 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M7e5EJ005647; Fri, 22 Sep 2017 07:40:05 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220740.v8M7e5EJ005647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 07:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323908 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 07:40:06 -0000 Author: tsoome Date: Fri Sep 22 07:40:05 2017 New Revision: 323908 URL: https://svnweb.freebsd.org/changeset/base/323908 Log: libefi: efipart_hdinfo_add_filepath should check strtol result Use errno for error checking. Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:37:42 2017 (r323907) +++ head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:40:05 2017 (r323908) @@ -489,7 +489,14 @@ efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) return (0); } p++; /* skip the colon */ + errno = 0; unit = (int)strtol(p, NULL, 0); + if (errno != 0) { + printf("Bad unit number for partition \"%s\"\n", pathname); + free(pathname); + free(pd); + return (EUNIT); + } /* * We should have disk registered, if not, we are receiving From owner-svn-src-all@freebsd.org Fri Sep 22 07:44: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 76149E1C9C5; Fri, 22 Sep 2017 07:44:37 +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 453F882881; Fri, 22 Sep 2017 07:44:37 +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 v8M7iajR009387; Fri, 22 Sep 2017 07:44:36 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M7iauL009386; Fri, 22 Sep 2017 07:44:36 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709220744.v8M7iauL009386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 22 Sep 2017 07:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323909 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 323909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 07:44:37 -0000 Author: tsoome Date: Fri Sep 22 07:44:36 2017 New Revision: 323909 URL: https://svnweb.freebsd.org/changeset/base/323909 Log: libefi: define EISA PNP constants Define EISA PNP constants and use them, also fix ID for 0x701 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:40:05 2017 (r323908) +++ head/sys/boot/efi/libefi/efipart.c Fri Sep 22 07:44:36 2017 (r323909) @@ -58,6 +58,11 @@ static int efipart_printfd(int); static int efipart_printcd(int); static int efipart_printhd(int); +/* EISA PNP ID's for floppy controllers */ +#define PNP0604 0x604 +#define PNP0700 0x700 +#define PNP0701 0x701 + struct devsw efipart_fddev = { .dv_name = "fd", .dv_type = DEVT_FD, @@ -181,9 +186,9 @@ efipart_floppy(EFI_DEVICE_PATH *node) if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_DP) { acpi = (ACPI_HID_DEVICE_PATH *) node; - if (acpi->HID == EISA_PNP_ID(0x604) || - acpi->HID == EISA_PNP_ID(0x700) || - acpi->HID == EISA_ID(0x41d1, 0x701)) { + if (acpi->HID == EISA_PNP_ID(PNP0604) || + acpi->HID == EISA_PNP_ID(PNP0700) || + acpi->HID == EISA_PNP_ID(PNP0701)) { return (acpi); } } From owner-svn-src-all@freebsd.org Fri Sep 22 08:12: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 69229E1DB9A; Fri, 22 Sep 2017 08:12: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 423418372C; Fri, 22 Sep 2017 08:12: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 v8M8C9tr019975; Fri, 22 Sep 2017 08:12:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8C9Vn019972; Fri, 22 Sep 2017 08:12:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709220812.v8M8C9Vn019972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 22 Sep 2017 08:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323910 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src sys X-SVN-Commit-Revision: 323910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:12:10 -0000 Author: hselasky Date: Fri Sep 22 08:12:08 2017 New Revision: 323910 URL: https://svnweb.freebsd.org/changeset/base/323910 Log: Add support for 32-bit compatibility IOCTLs in the LinuxKPI. Bump the FreeBSD version to force recompilation of external kernel modules due to structure change. PR: 222504 Submitted by: Greg V MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/sys/param.h Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Fri Sep 22 07:44:36 2017 (r323909) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Fri Sep 22 08:12:08 2017 (r323910) @@ -137,6 +137,7 @@ struct file_operations { ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *); unsigned int (*poll) (struct file *, struct poll_table_struct *); long (*unlocked_ioctl)(struct file *, unsigned int, unsigned long); + long (*compat_ioctl)(struct file *, unsigned int, unsigned long); int (*mmap)(struct file *, struct vm_area_struct *); int (*open)(struct inode *, struct file *); int (*release)(struct inode *, struct file *); @@ -157,7 +158,6 @@ struct file_operations { int (*readdir)(struct file *, void *, filldir_t); int (*ioctl)(struct inode *, struct file *, unsigned int, unsigned long); - long (*compat_ioctl)(struct file *, unsigned int, unsigned long); int (*flush)(struct file *, fl_owner_t id); int (*fsync)(struct file *, struct dentry *, int datasync); int (*aio_fsync)(struct kiocb *, int datasync); Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Sep 22 07:44:36 2017 (r323909) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Sep 22 08:12:08 2017 (r323910) @@ -906,7 +906,20 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t /* fetch user-space pointer */ data = *(void **)data; } - if (filp->f_op->unlocked_ioctl) +#if defined(__amd64__) + if (td->td_proc->p_elf_machine == EM_386) { + /* try the compat IOCTL handler first */ + if (filp->f_op->compat_ioctl != NULL) + error = -filp->f_op->compat_ioctl(filp, cmd, (u_long)data); + else + error = ENOTTY; + + /* fallback to the regular IOCTL handler, if any */ + if (error == ENOTTY && filp->f_op->unlocked_ioctl != NULL) + error = -filp->f_op->unlocked_ioctl(filp, cmd, (u_long)data); + } else +#endif + if (filp->f_op->unlocked_ioctl != NULL) error = -filp->f_op->unlocked_ioctl(filp, cmd, (u_long)data); else error = ENOTTY; Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Sep 22 07:44:36 2017 (r323909) +++ head/sys/sys/param.h Fri Sep 22 08:12:08 2017 (r323910) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200045 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200046 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Sep 22 08:13: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 288A2E1DC29; Fri, 22 Sep 2017 08:13:11 +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 E9562838CD; Fri, 22 Sep 2017 08:13: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 v8M8DA8H021680; Fri, 22 Sep 2017 08:13:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8DAOT021679; Fri, 22 Sep 2017 08:13:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220813.v8M8DAOT021679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323911 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor/illumos/dist/lib/libzfs/common X-SVN-Commit-Revision: 323911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:13:11 -0000 Author: avg Date: Fri Sep 22 08:13:09 2017 New Revision: 323911 URL: https://svnweb.freebsd.org/changeset/base/323911 Log: 8502 illumos#7955 broke delegated datasets when libshare is not present illumos/illumos-gate@1c18e8fbd8db41a9fb39bd3ef7a18ee71ece20da https://github.com/illumos/illumos-gate/commit/1c18e8fbd8db41a9fb39bd3ef7a18ee71ece20da https://www.illumos.org/issues/8502 The code in lib/libzfs/common/libzfs_mount.c already basically handles the case when libshare is not installed. We just need to not fail in zfs_init_libshare_impl. I tested this in lx and things work as expected. I also tested there trying to set sharenfs and sharesmb on the delegated dataset. Neither is allowed from within a zone. The spew of msgs from a native zone is not ZFS specific. I see the same spew simply running the share command. Reviewed by: Robert Mustacchi Reviewed by: Yuri Pankov Approved by: Richard Lowe Author: Jerry Jelinek Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c Fri Sep 22 08:12:08 2017 (r323910) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c Fri Sep 22 08:13:09 2017 (r323911) @@ -24,6 +24,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2016 by Delphix. All rights reserved. * Copyright 2016 Igor Kozhukhov + * Copyright 2017 Joyent, Inc. * Copyright 2017 RackTop Systems. */ @@ -664,8 +665,14 @@ _zfs_init_libshare(void) static int zfs_init_libshare_impl(libzfs_handle_t *zhandle, int service, void *arg) { + /* + * libshare is either not installed or we're in a branded zone. The + * rest of the wrapper functions around the libshare calls already + * handle NULL function pointers, but we don't want the callers of + * zfs_init_libshare() to fail prematurely if libshare is not available. + */ if (_sa_init == NULL) - return (SA_CONFIG_ERR); + return (SA_OK); /* * Attempt to refresh libshare. This is necessary if there was a cache From owner-svn-src-all@freebsd.org Fri Sep 22 08:15: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 ED9BCE1DD5B; Fri, 22 Sep 2017 08:15: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 BAF0E83A75; Fri, 22 Sep 2017 08:15: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 v8M8FZ6m021975; Fri, 22 Sep 2017 08:15:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8FZb7021974; Fri, 22 Sep 2017 08:15:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220815.v8M8FZb7021974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323912 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/man/man1m X-SVN-Group: vendor X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/man/man1m X-SVN-Commit-Revision: 323912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:15:37 -0000 Author: avg Date: Fri Sep 22 08:15:35 2017 New Revision: 323912 URL: https://svnweb.freebsd.org/changeset/base/323912 Log: 8592 ZFS channel programs - rollback illumos/illumos-gate@000cce6b6fad4a8b0eecef6e1251f6aca1719c55 https://github.com/illumos/illumos-gate/commit/000cce6b6fad4a8b0eecef6e1251f6aca1719c55 https://www.illumos.org/issues/8592 ZFS channel programs should be able to perform a rollback. This logic will probably look pretty similar to zfs.sync.destroy(). Reviewed by: Chris Williamson Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Brad Lewis Modified: vendor/illumos/dist/man/man1m/zfs-program.1m Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c Modified: vendor/illumos/dist/man/man1m/zfs-program.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs-program.1m Fri Sep 22 08:13:09 2017 (r323911) +++ vendor/illumos/dist/man/man1m/zfs-program.1m Fri Sep 22 08:15:35 2017 (r323912) @@ -8,7 +8,7 @@ .\" http://www.illumos.org/license/CDDL. .\" .\" -.\" Copyright (c) 2016 by Delphix. All Rights Reserved. +.\" Copyright (c) 2016, 2017 by Delphix. All rights reserved. .\" .Dd January 21, 2016 .Dt ZFS-PROGRAM 1M @@ -361,6 +361,17 @@ dataset (string) .Bd -ragged -compact -offset "xxxx" Clone to be promoted. .Ed +.It Em zfs.sync.rollback(filesystem) +Rollback to the previous snapshot for a dataset. +Returns 0 on successful rollback, or a nonzero error code otherwise. +Rollbacks can be performed on filesystems or zvols, but not on snapshots +or mounted datasets. +EBUSY is returned in the case where the filesystem is mounted. +.Pp +filesystem (string) +.Bd -ragged -compact -offset "xxxx" +Filesystem to rollback. +.Ed .El .It Sy zfs.check submodule For each function in the zfs.sync submodule, there is a corresponding zfs.check @@ -380,6 +391,7 @@ The available zfs.check functions are: .Bl -tag -width "xx" .It Em zfs.check.destroy(dataset, [defer=true|false]) .It Em zfs.check.promote(dataset) +.It Em zfs.check.rollback(filesystem) .El .It Sy zfs.list submodule The zfs.list submodule provides functions for iterating over datasets and From owner-svn-src-all@freebsd.org Fri Sep 22 08:15: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 D0B2EE1DD5A; Fri, 22 Sep 2017 08:15: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 A7DA583A74; Fri, 22 Sep 2017 08:15: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 v8M8FZJi021968; Fri, 22 Sep 2017 08:15:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8FZ3n021965; Fri, 22 Sep 2017 08:15:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220815.v8M8FZ3n021965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323912 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/man/man1m X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/man/man1m X-SVN-Commit-Revision: 323912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:15:36 -0000 Author: avg Date: Fri Sep 22 08:15:35 2017 New Revision: 323912 URL: https://svnweb.freebsd.org/changeset/base/323912 Log: 8592 ZFS channel programs - rollback illumos/illumos-gate@000cce6b6fad4a8b0eecef6e1251f6aca1719c55 https://github.com/illumos/illumos-gate/commit/000cce6b6fad4a8b0eecef6e1251f6aca1719c55 https://www.illumos.org/issues/8592 ZFS channel programs should be able to perform a rollback. This logic will probably look pretty similar to zfs.sync.destroy(). Reviewed by: Chris Williamson Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Brad Lewis Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/man/man1m/zfs-program.1m Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Sep 22 08:13:09 2017 (r323911) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Sep 22 08:15:35 2017 (r323912) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 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. @@ -2452,14 +2452,7 @@ dsl_dataset_handoff_check(dsl_dataset_t *ds, void *own return (0); } -typedef struct dsl_dataset_rollback_arg { - const char *ddra_fsname; - const char *ddra_tosnap; - void *ddra_owner; - nvlist_t *ddra_result; -} dsl_dataset_rollback_arg_t; - -static int +int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) { dsl_dataset_rollback_arg_t *ddra = arg; @@ -2567,7 +2560,7 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) return (0); } -static void +void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx) { dsl_dataset_rollback_arg_t *ddra = arg; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Fri Sep 22 08:13:09 2017 (r323911) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Fri Sep 22 08:15:35 2017 (r323912) @@ -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, 2017 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. @@ -237,6 +237,13 @@ typedef struct dsl_dataset_promote_arg { cred_t *cr; } dsl_dataset_promote_arg_t; +typedef struct dsl_dataset_rollback_arg { + const char *ddra_fsname; + const char *ddra_tosnap; + void *ddra_owner; + nvlist_t *ddra_result; +} dsl_dataset_rollback_arg_t; + /* * The max length of a temporary tag prefix is the number of hex digits * required to express UINT64_MAX plus one for the hyphen. @@ -375,6 +382,9 @@ void dsl_dataset_set_refreservation_sync_impl(dsl_data void dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx); boolean_t dsl_dataset_is_zapified(dsl_dataset_t *ds); boolean_t dsl_dataset_has_resume_receive_state(dsl_dataset_t *ds); + +int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx); +void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx); int dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner, nvlist_t *result); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c Fri Sep 22 08:13:09 2017 (r323911) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c Fri Sep 22 08:15:35 2017 (r323912) @@ -14,7 +14,7 @@ */ /* - * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2016, 2017 by Delphix. All rights reserved. */ #include "lua.h" @@ -177,6 +177,37 @@ zcp_synctask_promote(lua_State *state, boolean_t sync, return (err); } +static int zcp_synctask_rollback(lua_State *, boolean_t, nvlist_t *err_details); +static zcp_synctask_info_t zcp_synctask_rollback_info = { + .name = "rollback", + .func = zcp_synctask_rollback, + .space_check = ZFS_SPACE_CHECK_RESERVED, + .blocks_modified = 1, + .pargs = { + {.za_name = "filesystem", .za_lua_type = LUA_TSTRING}, + {NULL, NULL} + }, + .kwargs = { + {NULL, NULL} + } +}; + +static int +zcp_synctask_rollback(lua_State *state, boolean_t sync, nvlist_t *err_details) +{ + int err; + const char *dsname = lua_tostring(state, 1); + dsl_dataset_rollback_arg_t ddra = { 0 }; + + ddra.ddra_fsname = dsname; + ddra.ddra_result = err_details; + + err = zcp_sync_task(state, dsl_dataset_rollback_check, + dsl_dataset_rollback_sync, &ddra, sync, dsname); + + return (err); +} + void zcp_synctask_wrapper_cleanup(void *arg) { @@ -247,6 +278,7 @@ zcp_load_synctask_lib(lua_State *state, boolean_t sync zcp_synctask_info_t *zcp_synctask_funcs[] = { &zcp_synctask_destroy_info, &zcp_synctask_promote_info, + &zcp_synctask_rollback_info, NULL }; From owner-svn-src-all@freebsd.org Fri Sep 22 08:18: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 66D5FE1DED9; Fri, 22 Sep 2017 08:18:07 +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 2631383E85; Fri, 22 Sep 2017 08:18:07 +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 v8M8I6bP022121; Fri, 22 Sep 2017 08:18:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8I5OK022114; Fri, 22 Sep 2017 08:18:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220818.v8M8I5OK022114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323913 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzfs_core/common vendor/illumos/dist/man/man1m X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzfs_core/common vendor/illumos/dist/man/man1m X-SVN-Commit-Revision: 323913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:18:07 -0000 Author: avg Date: Fri Sep 22 08:18:05 2017 New Revision: 323913 URL: https://svnweb.freebsd.org/changeset/base/323913 Log: 8600 ZFS channel programs - snapshot illumos/illumos-gate@2840dce1a029098fb784afd951d5f98089f850d8 https://github.com/illumos/illumos-gate/commit/2840dce1a029098fb784afd951d5f98089f850d8 https://www.illumos.org/issues/8600 ZFS channel programs should be able to create snapshots. In addition to the base snapshot functionality, this will likely entail adding extra logic to handle edge cases which were formerly not possible, such as creating then destroying a snapshot in the same transaction sync. Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Reviewed by: Brad Lewis Approved by: Robert Mustacchi Author: Chris Williamson Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zcp.h vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_global.c vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c vendor/illumos/dist/man/man1m/zfs-program.1m Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Sep 22 08:18:05 2017 (r323913) @@ -1081,13 +1081,6 @@ dsl_dataset_snapshot_reserve_space(dsl_dataset_t *ds, return (0); } -typedef struct dsl_dataset_snapshot_arg { - nvlist_t *ddsa_snaps; - nvlist_t *ddsa_props; - nvlist_t *ddsa_errors; - cred_t *ddsa_cr; -} dsl_dataset_snapshot_arg_t; - int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr) @@ -1147,7 +1140,7 @@ dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, con return (0); } -static int +int dsl_dataset_snapshot_check(void *arg, dmu_tx_t *tx) { dsl_dataset_snapshot_arg_t *ddsa = arg; @@ -1422,7 +1415,7 @@ dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, cons spa_history_log_internal_ds(ds->ds_prev, "snapshot", tx, ""); } -static void +void dsl_dataset_snapshot_sync(void *arg, dmu_tx_t *tx) { dsl_dataset_snapshot_arg_t *ddsa = arg; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Fri Sep 22 08:18:05 2017 (r323913) @@ -244,6 +244,13 @@ typedef struct dsl_dataset_rollback_arg { nvlist_t *ddra_result; } dsl_dataset_rollback_arg_t; +typedef struct dsl_dataset_snapshot_arg { + nvlist_t *ddsa_snaps; + nvlist_t *ddsa_props; + nvlist_t *ddsa_errors; + cred_t *ddsa_cr; +} dsl_dataset_snapshot_arg_t; + /* * The max length of a temporary tag prefix is the number of hex digits * required to express UINT64_MAX plus one for the hyphen. @@ -276,6 +283,8 @@ uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const dsl_dataset_t *origin, uint64_t flags, cred_t *, dmu_tx_t *); uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin, uint64_t flags, dmu_tx_t *tx); +void dsl_dataset_snapshot_sync(void *arg, dmu_tx_t *tx); +int dsl_dataset_snapshot_check(void *arg, dmu_tx_t *tx); int dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t *errors); void dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx); int dsl_dataset_promote_check(void *arg, dmu_tx_t *tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zcp.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zcp.h Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zcp.h Fri Sep 22 08:18:05 2017 (r323913) @@ -14,7 +14,7 @@ */ /* - * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2016, 2017 by Delphix. All rights reserved. */ #ifndef _SYS_ZCP_H @@ -136,8 +136,6 @@ typedef struct zcp_lib_info { const zcp_arg_t pargs[4]; const zcp_arg_t kwargs[2]; } zcp_lib_info_t; - -int zcp_nvlist_to_lua(lua_State *, nvlist_t *, char *, int); #ifdef __cplusplus } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c Fri Sep 22 08:18:05 2017 (r323913) @@ -14,7 +14,7 @@ */ /* - * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2016, 2017 by Delphix. All rights reserved. */ /* @@ -102,10 +102,15 @@ #include #include +#define ZCP_NVLIST_MAX_DEPTH 20 + uint64_t zfs_lua_check_instrlimit_interval = 100; uint64_t zfs_lua_max_instrlimit = ZCP_MAX_INSTRLIMIT; uint64_t zfs_lua_max_memlimit = ZCP_MAX_MEMLIMIT; +/* + * Forward declarations for mutually recursive functions + */ static int zcp_nvpair_value_to_lua(lua_State *, nvpair_t *, char *, int); static int zcp_lua_to_nvlist_impl(lua_State *, int, nvlist_t *, const char *, int); @@ -212,8 +217,6 @@ zcp_cleanup(lua_State *state) zcp_clear_cleanup(state); } } - -#define ZCP_NVLIST_MAX_DEPTH 20 /* * Convert the lua table at the given index on the Lua stack to an nvlist Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_global.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_global.c Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_global.c Fri Sep 22 08:18:05 2017 (r323913) @@ -14,7 +14,7 @@ */ /* - * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2016, 2017 by Delphix. All rights reserved. */ #include @@ -62,7 +62,12 @@ static const zcp_errno_global_t errno_globals[] = { {"EPIPE", EPIPE}, {"EDOM", EDOM}, {"ERANGE", ERANGE}, + {"EDEADLK", EDEADLK}, + {"ENOLCK", ENOLCK}, + {"ECANCELED", ECANCELED}, + {"ENOTSUP", ENOTSUP}, {"EDQUOT", EDQUOT}, + {"ENAMETOOLONG", ENAMETOOLONG}, {NULL, NULL} }; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c Fri Sep 22 08:18:05 2017 (r323913) @@ -39,10 +39,10 @@ typedef int (zcp_synctask_func_t)(lua_State *, boolean typedef struct zcp_synctask_info { const char *name; zcp_synctask_func_t *func; - zfs_space_check_t space_check; - int blocks_modified; const zcp_arg_t pargs[4]; const zcp_arg_t kwargs[2]; + zfs_space_check_t space_check; + int blocks_modified; } zcp_synctask_info_t; /* @@ -91,8 +91,6 @@ static int zcp_synctask_destroy(lua_State *, boolean_t static zcp_synctask_info_t zcp_synctask_destroy_info = { .name = "destroy", .func = zcp_synctask_destroy, - .space_check = ZFS_SPACE_CHECK_NONE, - .blocks_modified = 0, .pargs = { {.za_name = "filesystem | snapshot", .za_lua_type = LUA_TSTRING}, {NULL, NULL} @@ -100,7 +98,9 @@ static zcp_synctask_info_t zcp_synctask_destroy_info = .kwargs = { {.za_name = "defer", .za_lua_type = LUA_TBOOLEAN}, {NULL, NULL} - } + }, + .space_check = ZFS_SPACE_CHECK_NONE, + .blocks_modified = 0 }; /* ARGSUSED */ @@ -140,19 +140,19 @@ zcp_synctask_destroy(lua_State *state, boolean_t sync, return (err); } -static int zcp_synctask_promote(lua_State *, boolean_t, nvlist_t *err_details); +static int zcp_synctask_promote(lua_State *, boolean_t, nvlist_t *); static zcp_synctask_info_t zcp_synctask_promote_info = { .name = "promote", .func = zcp_synctask_promote, - .space_check = ZFS_SPACE_CHECK_RESERVED, - .blocks_modified = 3, .pargs = { {.za_name = "clone", .za_lua_type = LUA_TSTRING}, {NULL, NULL} }, .kwargs = { {NULL, NULL} - } + }, + .space_check = ZFS_SPACE_CHECK_RESERVED, + .blocks_modified = 3 }; static int @@ -208,6 +208,58 @@ zcp_synctask_rollback(lua_State *state, boolean_t sync return (err); } +static int zcp_synctask_snapshot(lua_State *, boolean_t, nvlist_t *); +static zcp_synctask_info_t zcp_synctask_snapshot_info = { + .name = "snapshot", + .func = zcp_synctask_snapshot, + .pargs = { + {.za_name = "filesystem@snapname | volume@snapname", + .za_lua_type = LUA_TSTRING}, + {NULL, NULL} + }, + .kwargs = { + {NULL, NULL} + }, + .space_check = ZFS_SPACE_CHECK_NORMAL, + .blocks_modified = 3 +}; + +/* ARGSUSED */ +static int +zcp_synctask_snapshot(lua_State *state, boolean_t sync, nvlist_t *err_details) +{ + int err; + dsl_dataset_snapshot_arg_t ddsa = { 0 }; + const char *dsname = lua_tostring(state, 1); + zcp_run_info_t *ri = zcp_run_info(state); + + /* + * We only allow for a single snapshot rather than a list, so the + * error list output is unnecessary. + */ + ddsa.ddsa_errors = NULL; + ddsa.ddsa_props = NULL; + ddsa.ddsa_cr = ri->zri_cred; + ddsa.ddsa_snaps = fnvlist_alloc(); + fnvlist_add_boolean(ddsa.ddsa_snaps, dsname); + + /* + * On old pools, the ZIL must not be active when a snapshot is created, + * but we can't suspend the ZIL because we're already in syncing + * context. + */ + if (spa_version(ri->zri_pool->dp_spa) < SPA_VERSION_FAST_SNAP) { + return (ENOTSUP); + } + + err = zcp_sync_task(state, dsl_dataset_snapshot_check, + dsl_dataset_snapshot_sync, &ddsa, sync, dsname); + + fnvlist_free(ddsa.ddsa_snaps); + + return (err); +} + void zcp_synctask_wrapper_cleanup(void *arg) { @@ -279,6 +331,7 @@ zcp_load_synctask_lib(lua_State *state, boolean_t sync &zcp_synctask_destroy_info, &zcp_synctask_promote_info, &zcp_synctask_rollback_info, + &zcp_synctask_snapshot_info, NULL }; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Fri Sep 22 08:15:35 2017 (r323912) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Fri Sep 22 08:18:05 2017 (r323913) @@ -26,7 +26,7 @@ * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -3623,7 +3623,7 @@ zfs_ioc_channel_program(const char *poolname, nvlist_t if (instrlimit == 0 || instrlimit > zfs_lua_max_instrlimit) return (EINVAL); - if (memlimit == 0 || memlimit > ZCP_MAX_MEMLIMIT) + if (memlimit == 0 || memlimit > zfs_lua_max_memlimit) return (EINVAL); return (zcp_eval(poolname, program, instrlimit, memlimit, From owner-svn-src-all@freebsd.org Fri Sep 22 08:18: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 974DBE1DEDD; Fri, 22 Sep 2017 08:18:07 +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 6E03F83E86; Fri, 22 Sep 2017 08:18:07 +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 v8M8I6RL022128; Fri, 22 Sep 2017 08:18:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8I6lc022126; Fri, 22 Sep 2017 08:18:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220818.v8M8I6lc022126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323913 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzfs_core/common vendor/illumos/dist/man/man1m X-SVN-Group: vendor X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzfs_core/common vendor/illumos/dist/man/man1m X-SVN-Commit-Revision: 323913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:18:07 -0000 Author: avg Date: Fri Sep 22 08:18:05 2017 New Revision: 323913 URL: https://svnweb.freebsd.org/changeset/base/323913 Log: 8600 ZFS channel programs - snapshot illumos/illumos-gate@2840dce1a029098fb784afd951d5f98089f850d8 https://github.com/illumos/illumos-gate/commit/2840dce1a029098fb784afd951d5f98089f850d8 https://www.illumos.org/issues/8600 ZFS channel programs should be able to create snapshots. In addition to the base snapshot functionality, this will likely entail adding extra logic to handle edge cases which were formerly not possible, such as creating then destroying a snapshot in the same transaction sync. Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Reviewed by: Brad Lewis Approved by: Robert Mustacchi Author: Chris Williamson Modified: vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c vendor/illumos/dist/man/man1m/zfs-program.1m Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zcp.h vendor-sys/illumos/dist/uts/common/fs/zfs/zcp.c vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_global.c vendor-sys/illumos/dist/uts/common/fs/zfs/zcp_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c Fri Sep 22 08:15:35 2017 (r323912) +++ vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c Fri Sep 22 08:18:05 2017 (r323913) @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 RackTop Systems. @@ -142,7 +142,12 @@ lzc_ioctl(zfs_ioc_t ioc, const char *name, if (resultp != NULL) { *resultp = NULL; - zc.zc_nvlist_dst_size = MAX(size * 2, 128 * 1024); + if (ioc == ZFS_IOC_CHANNEL_PROGRAM) { + zc.zc_nvlist_dst_size = fnvlist_lookup_uint64(source, + ZCP_ARG_MEMLIMIT); + } else { + zc.zc_nvlist_dst_size = MAX(size * 2, 128 * 1024); + } zc.zc_nvlist_dst = (uint64_t)(uintptr_t) malloc(zc.zc_nvlist_dst_size); if (zc.zc_nvlist_dst == NULL) { @@ -156,7 +161,7 @@ lzc_ioctl(zfs_ioc_t ioc, const char *name, * If ioctl exited with ENOMEM, we retry the ioctl after * increasing the size of the destination nvlist. * - * Channel programs that exit with ENOMEM probably ran over the + * Channel programs that exit with ENOMEM ran over the * lua memory sandbox; they should not be retried. */ if (errno == ENOMEM && resultp != NULL && Modified: vendor/illumos/dist/man/man1m/zfs-program.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs-program.1m Fri Sep 22 08:15:35 2017 (r323912) +++ vendor/illumos/dist/man/man1m/zfs-program.1m Fri Sep 22 08:18:05 2017 (r323913) @@ -372,6 +372,18 @@ filesystem (string) .Bd -ragged -compact -offset "xxxx" Filesystem to rollback. .Ed +.It Em zfs.sync.snapshot(dataset) +Create a snapshot of a filesystem. +Returns 0 if the snapshot was successfully created, +and a nonzero error code otherwise. +.Pp +Note: Taking a snapshot will fail on any pool older than legacy version 27. +To enable taking snapshots from ZCP scripts, the pool must be upgraded. +.Pp +dataset (string) +.Bd -ragged -compact -offset "xxxx" +Name of snapshot to create. +.Ed .El .It Sy zfs.check submodule For each function in the zfs.sync submodule, there is a corresponding zfs.check @@ -392,6 +404,7 @@ The available zfs.check functions are: .It Em zfs.check.destroy(dataset, [defer=true|false]) .It Em zfs.check.promote(dataset) .It Em zfs.check.rollback(filesystem) +.It Em zfs.check.snapshot(dataset) .El .It Sy zfs.list submodule The zfs.list submodule provides functions for iterating over datasets and From owner-svn-src-all@freebsd.org Fri Sep 22 08:18: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 60F02E1E024; Fri, 22 Sep 2017 08:18: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 2F171189; Fri, 22 Sep 2017 08:18:50 +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 v8M8InTH022200; Fri, 22 Sep 2017 08:18:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8InBl022199; Fri, 22 Sep 2017 08:18:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220818.v8M8InBl022199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323914 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Commit-Revision: 323914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:18:50 -0000 Author: avg Date: Fri Sep 22 08:18:49 2017 New Revision: 323914 URL: https://svnweb.freebsd.org/changeset/base/323914 Log: 8661 remove "zil-cw2" dtrace probe illumos/illumos-gate@bd9d3f904625846bdc61af8897a1072029c7aeb7 https://github.com/illumos/illumos-gate/commit/bd9d3f904625846bdc61af8897a1072029c7aeb7 https://www.illumos.org/issues/8661 The "zil-cw1" dtrace probe was previously removed in 8558, and the "zil-cw2" probe should have been removed in that patch as well. Unfortunately, the "zil- cw2" was not removed in 8558, so this bug is to track it's removal. Reviewed by: Serapheim Dimitropoulos Reviewed by: Matthew Ahrens Reviewed by: Igor Kozhukhov Approved by: Robert Mustacchi Author: Prakash Surya Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Fri Sep 22 08:18:05 2017 (r323913) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Fri Sep 22 08:18:49 2017 (r323914) @@ -1995,7 +1995,6 @@ zil_process_commit_list(zilog_t *zilog) list_remove(&zilog->zl_itx_commit_list, itx); zil_itx_destroy(itx); } - DTRACE_PROBE1(zil__cw2, zilog_t *, zilog); if (lwb == NULL) { /* From owner-svn-src-all@freebsd.org Fri Sep 22 08:21: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 6FAD3E1E154; Fri, 22 Sep 2017 08:21:15 +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 3D13A3B4; Fri, 22 Sep 2017 08:21:15 +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 v8M8LEc8024707; Fri, 22 Sep 2017 08:21:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8LEYa024706; Fri, 22 Sep 2017 08:21:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220821.v8M8LEYa024706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323915 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:21:15 -0000 Author: avg Date: Fri Sep 22 08:21:14 2017 New Revision: 323915 URL: https://svnweb.freebsd.org/changeset/base/323915 Log: MFV r323914: 8661 remove "zil-cw2" dtrace probe illumos/illumos-gate@bd9d3f904625846bdc61af8897a1072029c7aeb7 https://github.com/illumos/illumos-gate/commit/bd9d3f904625846bdc61af8897a1072029c7aeb7 https://www.illumos.org/issues/8661 The "zil-cw1" dtrace probe was previously removed in 8558, and the "zil-cw2" probe should have been removed in that patch as well. Unfortunately, the "zil- cw2" was not removed in 8558, so this bug is to track it's removal. Reviewed by: Serapheim Dimitropoulos Reviewed by: Matthew Ahrens Reviewed by: Igor Kozhukhov Approved by: Robert Mustacchi Author: Prakash Surya MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri Sep 22 08:18:49 2017 (r323914) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri Sep 22 08:21:14 2017 (r323915) @@ -1574,7 +1574,6 @@ zil_commit_writer(zilog_t *zilog) kmem_free(itx, offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen); } - DTRACE_PROBE1(zil__cw2, zilog_t *, zilog); /* write the last block out */ if (lwb != NULL && lwb->lwb_zio != NULL) From owner-svn-src-all@freebsd.org Fri Sep 22 08:21: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 89965E1E330; Fri, 22 Sep 2017 08:21:36 +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 58DFB79C; Fri, 22 Sep 2017 08:21:36 +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 v8M8LZhP025434; Fri, 22 Sep 2017 08:21:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8LZ4T025433; Fri, 22 Sep 2017 08:21:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709220821.v8M8LZ4T025433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 22 Sep 2017 08:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323916 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 323916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:21:36 -0000 Author: hselasky Date: Fri Sep 22 08:21:35 2017 New Revision: 323916 URL: https://svnweb.freebsd.org/changeset/base/323916 Log: Extend sysctl description for hw.usb.disable_enumeration . PR: 222505 Submitted by: Julian H. Stacey MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Fri Sep 22 08:21:14 2017 (r323915) +++ head/sys/dev/usb/usb_hub.c Fri Sep 22 08:21:35 2017 (r323916) @@ -100,7 +100,9 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_timeout, CTLFLAG_R #if USB_HAVE_DISABLE_ENUM static int usb_disable_enumeration = 0; SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, - &usb_disable_enumeration, 0, "Set to disable all USB device enumeration."); + &usb_disable_enumeration, 0, "Set to disable all USB device enumeration. " + "This can secure against USB devices turning evil, " + "for example a USB memory stick becoming a USB keyboard."); static int usb_disable_port_power = 0; SYSCTL_INT(_hw_usb, OID_AUTO, disable_port_power, CTLFLAG_RWTUN, From owner-svn-src-all@freebsd.org Fri Sep 22 08:23: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 0B9CCE1E499; Fri, 22 Sep 2017 08:23:26 +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 D9EFFBFE; Fri, 22 Sep 2017 08:23:25 +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 v8M8NP2B026427; Fri, 22 Sep 2017 08:23:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8NORB026425; Fri, 22 Sep 2017 08:23:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220823.v8M8NORB026425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r323917 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Commit-Revision: 323917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:23:26 -0000 Author: avg Date: Fri Sep 22 08:23:24 2017 New Revision: 323917 URL: https://svnweb.freebsd.org/changeset/base/323917 Log: 8648 Fix range locking in ZIL commit codepath illumos/illumos-gate@42b14111721da2ebd5159e7b45012a3eb0e3384c https://github.com/illumos/illumos-gate/commit/42b14111721da2ebd5159e7b45012a3eb0e3384c https://www.illumos.org/issues/8648 I'm opening this bug to track integration of the following ZFS on Linux commit into illumos: commit f763c3d1df569a8d6b60bcb5e95cf07aa7a189e6 Author: LOLi Date: Mon Aug 21 17:59:48 2017 +0200 Fix range locking in ZIL commit codepath Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr offset and length to the offset and length of the BIO from zvol_write()->zvol_log_write(): these offset and length are later used to take a range lock in zillog->zl_get_data function: zvol_get_data(). Now suppose we have a ZVOL with blocksize=8K and push 4K writes to offset 0: we will only be range-locking 0-4096. This means the ASSERTion we make in dbuf_unoverride() is no longer valid because now dmu_sync() is called from zilog's get_data functions holding a partial lock on the dbuf. Fix this by taking a range lock on the whole block in zvol_get_data(). Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Reviewed by: Igor Kozhukhov Reviewed by: Matt Ahrens Reviewed by: Andriy Gapon Reviewed by: Alexander Motin Approved by: Robert Mustacchi Author: LOLi Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Fri Sep 22 08:21:35 2017 (r323916) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Fri Sep 22 08:23:24 2017 (r323917) @@ -1101,7 +1101,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, str } else { /* indirect write */ /* * Have to lock the whole block to ensure when it's - * written out and it's checksum is being calculated + * written out and its checksum is being calculated * that no one can change the data. We need to re-check * blocksize after we get the lock in case it's changed! */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Fri Sep 22 08:21:35 2017 (r323916) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Fri Sep 22 08:23:24 2017 (r323917) @@ -1003,7 +1003,6 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, st zgd = kmem_zalloc(sizeof (zgd_t), KM_SLEEP); zgd->zgd_lwb = lwb; - zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_READER); /* * Write records come in two flavors: immediate and indirect. @@ -1012,12 +1011,22 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, st * sync the data and get a pointer to it (indirect) so that * we don't have to write the data twice. */ - if (buf != NULL) { /* immediate write */ + if (buf != NULL) { /* immediate write */ + zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, + RL_READER); error = dmu_read(os, object, offset, size, buf, DMU_READ_NO_PREFETCH); - } else { + } else { /* indirect write */ + /* + * Have to lock the whole block to ensure when it's written out + * and its checksum is being calculated that no one can change + * the data. Contrarily to zfs_get_data we need not re-check + * blocksize after we get the lock because it cannot be changed. + */ size = zv->zv_volblocksize; offset = P2ALIGN(offset, size); + zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, + RL_READER); error = dmu_buf_hold(os, object, offset, zgd, &db, DMU_READ_NO_PREFETCH); if (error == 0) { From owner-svn-src-all@freebsd.org Fri Sep 22 08:27: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 91609E1E6C6; Fri, 22 Sep 2017 08:27:28 +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 6E6C4ED9; Fri, 22 Sep 2017 08:27: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 v8M8RRfP026782; Fri, 22 Sep 2017 08:27:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8M8RRxn026780; Fri, 22 Sep 2017 08:27:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201709220827.v8M8RRxn026780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Sep 2017 08:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323918 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 08:27:28 -0000 Author: avg Date: Fri Sep 22 08:27:27 2017 New Revision: 323918 URL: https://svnweb.freebsd.org/changeset/base/323918 Log: MFV r323917: 8648 Fix range locking in ZIL commit codepath illumos/illumos-gate@42b14111721da2ebd5159e7b45012a3eb0e3384c https://github.com/illumos/illumos-gate/commit/42b14111721da2ebd5159e7b45012a3eb0e3384c https://www.illumos.org/issues/8648 I'm opening this bug to track integration of the following ZFS on Linux commit into illumos: commit f763c3d1df569a8d6b60bcb5e95cf07aa7a189e6 Author: LOLi Date: Mon Aug 21 17:59:48 2017 +0200 Fix range locking in ZIL commit codepath Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr offset and length to the offset and length of the BIO from zvol_write()->zvol_log_write(): these offset and length are later used to take a range lock in zillog->zl_get_data function: zvol_get_data(). Now suppose we have a ZVOL with blocksize=8K and push 4K writes to offset 0: we will only be range-locking 0-4096. This means the ASSERTion we make in dbuf_unoverride() is no longer valid because now dmu_sync() is called from zilog's get_data functions holding a partial lock on the dbuf. Fix this by taking a range lock on the whole block in zvol_get_data(). Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Reviewed by: Igor Kozhukhov Reviewed by: Matt Ahrens Reviewed by: Andriy Gapon Reviewed by: Alexander Motin Approved by: Robert Mustacchi Author: LOLi MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c 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/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 22 08:23:24 2017 (r323917) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Sep 22 08:27:27 2017 (r323918) @@ -1343,7 +1343,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio } else { /* indirect write */ /* * Have to lock the whole block to ensure when it's - * written out and it's checksum is being calculated + * written out and its checksum is being calculated * that no one can change the data. We need to re-check * blocksize after we get the lock in case it's changed! */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Sep 22 08:23:24 2017 (r323917) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Sep 22 08:27:27 2017 (r323918) @@ -1349,7 +1349,6 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zi zgd = kmem_zalloc(sizeof (zgd_t), KM_SLEEP); zgd->zgd_zilog = zv->zv_zilog; - zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_READER); /* * Write records come in two flavors: immediate and indirect. @@ -1358,12 +1357,22 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zi * sync the data and get a pointer to it (indirect) so that * we don't have to write the data twice. */ - if (buf != NULL) { /* immediate write */ + if (buf != NULL) { /* immediate write */ + zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, + RL_READER); error = dmu_read(os, object, offset, size, buf, DMU_READ_NO_PREFETCH); - } else { + } else { /* indirect write */ + /* + * Have to lock the whole block to ensure when it's written out + * and its checksum is being calculated that no one can change + * the data. Contrarily to zfs_get_data we need not re-check + * blocksize after we get the lock because it cannot be changed. + */ size = zv->zv_volblocksize; offset = P2ALIGN(offset, size); + zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, + RL_READER); error = dmu_buf_hold(os, object, offset, zgd, &db, DMU_READ_NO_PREFETCH); if (error == 0) { From owner-svn-src-all@freebsd.org Fri Sep 22 10:45:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5A5E235F0; Fri, 22 Sep 2017 10:45: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 4BCCC65804; Fri, 22 Sep 2017 10:45: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 v8MAjpER087304; Fri, 22 Sep 2017 10:45:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MAjppc087303; Fri, 22 Sep 2017 10:45:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221045.v8MAjppc087303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 10:45: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: r323919 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 10:45:52 -0000 Author: kib Date: Fri Sep 22 10:45:51 2017 New Revision: 323919 URL: https://svnweb.freebsd.org/changeset/base/323919 Log: MFC r323616: Batch freeing of the pages in vm_object_page_remove(). Modified: stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Fri Sep 22 08:27:27 2017 (r323918) +++ stable/11/sys/vm/vm_object.c Fri Sep 22 10:45:51 2017 (r323919) @@ -1960,6 +1960,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t { vm_page_t p, next; struct mtx *mtx; + struct pglist pgl; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_UNMANAGED) == 0 || @@ -1968,6 +1969,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t if (object->resident_page_count == 0) return; vm_object_pip_add(object, 1); + TAILQ_INIT(&pgl); again: p = vm_page_find_least(object, start); mtx = NULL; @@ -2019,10 +2021,13 @@ again: } if ((options & OBJPR_NOTMAPPED) == 0) pmap_remove_all(p); - vm_page_free(p); + p->flags &= ~PG_ZERO; + if (vm_page_free_prep(p, false)) + TAILQ_INSERT_TAIL(&pgl, p, listq); } if (mtx != NULL) mtx_unlock(mtx); + vm_page_free_phys_pglist(&pgl); vm_object_pip_wakeup(object); } From owner-svn-src-all@freebsd.org Fri Sep 22 10:49:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 317F3E2382B; Fri, 22 Sep 2017 10:49:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0976F65AE0; Fri, 22 Sep 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 v8MAn51Q092321; Fri, 22 Sep 2017 10:49:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MAn5j8092319; Fri, 22 Sep 2017 10:49:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221049.v8MAn5j8092319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 10:49:05 +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: r323920 - in stable/11/sys/x86: include x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/x86: include x86 X-SVN-Commit-Revision: 323920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 10:49:06 -0000 Author: kib Date: Fri Sep 22 10:49:04 2017 New Revision: 323920 URL: https://svnweb.freebsd.org/changeset/base/323920 Log: MFC r323325, r323450: If IOAPIC has PCI binding, match the PCI device against MADT enumerated IOAPIC. Modified: stable/11/sys/x86/include/apicvar.h stable/11/sys/x86/x86/io_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/include/apicvar.h ============================================================================== --- stable/11/sys/x86/include/apicvar.h Fri Sep 22 10:45:51 2017 (r323919) +++ stable/11/sys/x86/include/apicvar.h Fri Sep 22 10:49:04 2017 (r323920) @@ -474,6 +474,8 @@ void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +int ioapic_get_rid(u_int apic_id, uint16_t *ridp); + extern int x2apic_mode; extern int lapic_eoi_suppression; Modified: stable/11/sys/x86/x86/io_apic.c ============================================================================== --- stable/11/sys/x86/x86/io_apic.c Fri Sep 22 10:45:51 2017 (r323919) +++ stable/11/sys/x86/x86/io_apic.c Fri Sep 22 10:49:04 2017 (r323920) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -99,6 +100,9 @@ struct ioapic { volatile ioapic_t *io_addr; /* XXX: should use bus_space */ vm_paddr_t io_paddr; STAILQ_ENTRY(ioapic) io_next; + device_t pci_dev; /* matched pci device, if found */ + struct resource *pci_wnd; /* BAR 0, should be same or alias to + io_paddr */ struct ioapic_intsrc io_pins[0]; }; @@ -622,6 +626,8 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int in io = malloc(sizeof(struct ioapic) + numintr * sizeof(struct ioapic_intsrc), M_IOAPIC, M_WAITOK); io->io_pic = ioapic_template; + io->pci_dev = NULL; + io->pci_wnd = NULL; mtx_lock_spin(&icu_lock); io->io_id = next_id++; io->io_apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT; @@ -954,7 +960,72 @@ ioapic_pci_probe(device_t dev) static int ioapic_pci_attach(device_t dev) { + struct resource *res; + volatile ioapic_t *apic; + struct ioapic *io; + int rid; + u_int apic_id; + /* + * Try to match the enumerated ioapic. Match BAR start + * against io_paddr. Due to a fear that PCI window is not the + * same as the MADT reported io window, but an alias, read the + * APIC ID from the mapped BAR and match against it. + */ + rid = PCIR_BAR(0); + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (res == NULL) { + if (bootverbose) + device_printf(dev, "cannot activate BAR0\n"); + return (ENXIO); + } + apic = (volatile ioapic_t *)rman_get_virtual(res); + if (rman_get_size(res) < IOAPIC_WND_SIZE) { + if (bootverbose) + device_printf(dev, + "BAR0 too small (%jd) for IOAPIC window\n", + (uintmax_t)rman_get_size(res)); + goto fail; + } + mtx_lock_spin(&icu_lock); + apic_id = ioapic_read(apic, IOAPIC_ID) >> APIC_ID_SHIFT; + /* First match by io window address */ + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_paddr == (vm_paddr_t)rman_get_start(res)) + goto found; + } + /* Then by apic id */ + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_apic_id == apic_id) + goto found; + } + mtx_unlock_spin(&icu_lock); + if (bootverbose) + device_printf(dev, + "cannot match pci bar apic id %d against MADT\n", + apic_id); +fail: + bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + return (ENXIO); +found: + KASSERT(io->pci_dev == NULL, + ("ioapic %d pci_dev not NULL", io->io_id)); + KASSERT(io->pci_wnd == NULL, + ("ioapic %d pci_wnd not NULL", io->io_id)); + + io->pci_dev = dev; + io->pci_wnd = res; + if (bootverbose && (io->io_paddr != (vm_paddr_t)rman_get_start(res) || + io->io_apic_id != apic_id)) { + device_printf(dev, "pci%d:%d:%d:%d pci BAR0@%jx id %d " + "MADT id %d paddr@%jx\n", + pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), pci_get_function(dev), + (uintmax_t)rman_get_start(res), apic_id, + io->io_apic_id, (uintmax_t)io->io_paddr); + } + mtx_unlock_spin(&icu_lock); return (0); } @@ -971,6 +1042,28 @@ DEFINE_CLASS_0(ioapic, ioapic_pci_driver, ioapic_pci_m static devclass_t ioapic_devclass; DRIVER_MODULE(ioapic, pci, ioapic_pci_driver, ioapic_devclass, 0, 0); +int +ioapic_get_rid(u_int apic_id, uint16_t *ridp) +{ + struct ioapic *io; + uintptr_t rid; + int error; + + mtx_lock_spin(&icu_lock); + STAILQ_FOREACH(io, &ioapic_list, io_next) { + if (io->io_apic_id == apic_id) + break; + } + mtx_unlock_spin(&icu_lock); + if (io == NULL || io->pci_dev == NULL) + return (EINVAL); + error = pci_get_id(io->pci_dev, PCI_ID_RID, &rid); + if (error != 0) + return (error); + *ridp = rid; + return (0); +} + /* * A new-bus driver to consume the memory resources associated with * the APICs in the system. On some systems ACPI or PnPBIOS system @@ -1008,7 +1101,7 @@ apic_add_resource(device_t dev, int rid, vm_paddr_t ba if (error) panic("apic_add_resource: resource %d failed set with %d", rid, error); - bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_SHAREABLE); } static int From owner-svn-src-all@freebsd.org Fri Sep 22 10:51: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 8C0EFE23BD1; Fri, 22 Sep 2017 10:51:33 +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 5874966190; Fri, 22 Sep 2017 10:51:33 +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 v8MApWGx093262; Fri, 22 Sep 2017 10:51:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MApWf8093261; Fri, 22 Sep 2017 10:51:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221051.v8MApWf8093261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 10:51:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323921 - stable/11/sys/x86/iommu X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/x86/iommu X-SVN-Commit-Revision: 323921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 10:51:33 -0000 Author: kib Date: Fri Sep 22 10:51:32 2017 New Revision: 323921 URL: https://svnweb.freebsd.org/changeset/base/323921 Log: MFC r323326: Use IOAPIC PCI rid as the interrupt TLP source id for DMAR interrupt remapping. Modified: stable/11/sys/x86/iommu/intel_drv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/iommu/intel_drv.c ============================================================================== --- stable/11/sys/x86/iommu/intel_drv.c Fri Sep 22 10:49:04 2017 (r323920) +++ stable/11/sys/x86/iommu/intel_drv.c Fri Sep 22 10:51:32 2017 (r323921) @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_APIC #include "pcib_if.h" +#include +#include +#include #endif #define DMAR_FAULT_IRQ_RID 0 @@ -788,6 +791,9 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t ACPI_DMAR_DEVICE_SCOPE *devscope; ACPI_DMAR_PCI_PATH *path; char *ptr, *ptrend; +#ifdef DEV_APIC + int error; +#endif int i; for (i = 0; i < dmar_devcnt; i++) { @@ -809,6 +815,17 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t continue; if (devscope->EnumerationId != id) continue; +#ifdef DEV_APIC + if (entry_type == ACPI_DMAR_SCOPE_TYPE_IOAPIC) { + error = ioapic_get_rid(id, rid); + /* + * If our IOAPIC has PCI bindings then + * use the PCI device rid. + */ + if (error == 0) + return (unit); + } +#endif if (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE) == 2) { if (rid != NULL) { @@ -818,12 +835,11 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t path->Device, path->Function); } return (unit); - } else { - /* XXXKIB */ - printf( - "dmar_find_nonpci: id %d type %d path length != 2\n", - id, entry_type); } + printf( + "dmar_find_nonpci: id %d type %d path length != 2\n", + id, entry_type); + break; } } return (NULL); From owner-svn-src-all@freebsd.org Fri Sep 22 12:07: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 D7CF7E263D1; Fri, 22 Sep 2017 12:07:04 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3EA66834C; Fri, 22 Sep 2017 12:07:04 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MC73b9025593; Fri, 22 Sep 2017 12:07:03 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MC73gm025591; Fri, 22 Sep 2017 12:07:03 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709221207.v8MC73gm025591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 22 Sep 2017 12:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323922 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 323922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 12:07:05 -0000 Author: scottl Date: Fri Sep 22 12:07:03 2017 New Revision: 323922 URL: https://svnweb.freebsd.org/changeset/base/323922 Log: Clean up error messages related to device discovery Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr_sas_lsi.c head/sys/dev/mps/mps_sas_lsi.c Modified: head/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- head/sys/dev/mpr/mpr_sas_lsi.c Fri Sep 22 10:51:32 2017 (r323921) +++ head/sys/dev/mpr/mpr_sas_lsi.c Fri Sep 22 12:07:03 2017 (r323922) @@ -781,9 +781,11 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 sassc = sc->sassc; mprsas_startup_increment(sassc); - if ((mpr_config_get_sas_device_pg0(sc, &mpi_reply, &config_page, - MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { - printf("%s: error reading SAS device page0\n", __func__); + if (mpr_config_get_sas_device_pg0(sc, &mpi_reply, &config_page, + MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle) != 0) { + mpr_dprint(sc, MPR_INFO|MPR_MAPPING|MPR_FAULT, + "Error reading SAS device %#x page0, iocstatus= 0x%x\n", + handle, mpi_reply.IOCStatus); error = ENXIO; goto out; } @@ -795,12 +797,14 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 Mpi2ConfigReply_t tmp_mpi_reply; Mpi2SasDevicePage0_t parent_config_page; - if ((mpr_config_get_sas_device_pg0(sc, &tmp_mpi_reply, - &parent_config_page, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, - le16toh(config_page.ParentDevHandle)))) { + if (mpr_config_get_sas_device_pg0(sc, &tmp_mpi_reply, + &parent_config_page, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, + le16toh(config_page.ParentDevHandle)) != 0) { mpr_dprint(sc, MPR_MAPPING|MPR_FAULT, - "%s: error reading SAS device %#x page0\n", - __func__, le16toh(config_page.ParentDevHandle)); + "Error reading parent SAS device %#x page0, " + "iocstatus= 0x%x\n", + le16toh(config_page.ParentDevHandle), + tmp_mpi_reply.IOCStatus); } else { parent_sas_address = parent_config_page.SASAddress.High; parent_sas_address = (parent_sas_address << 32) | @@ -1148,8 +1152,9 @@ mprsas_get_sata_identify(struct mpr_softc *sc, u16 han * If the request returns an error then we need to do a diag * reset */ - printf("%s: request for page completed with error %d", - __func__, error); + mpr_dprint(sc, MPR_INFO|MPR_FAULT|MPR_MAPPING, + "Request for SATA PASSTHROUGH page completed with error %d", + error); error = ENXIO; goto out; } @@ -1157,8 +1162,9 @@ mprsas_get_sata_identify(struct mpr_softc *sc, u16 han bcopy(reply, mpi_reply, sizeof(Mpi2SataPassthroughReply_t)); if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) { - printf("%s: error reading SATA PASSTHRU; iocstatus = 0x%x\n", - __func__, reply->IOCStatus); + mpr_dprint(sc, MPR_INFO|MPR_MAPPING|MPR_FAULT, + "Error reading device %#x SATA PASSTHRU; iocstatus= 0x%x\n", + handle, reply->IOCStatus); error = ENXIO; goto out; } Modified: head/sys/dev/mps/mps_sas_lsi.c ============================================================================== --- head/sys/dev/mps/mps_sas_lsi.c Fri Sep 22 10:51:32 2017 (r323921) +++ head/sys/dev/mps/mps_sas_lsi.c Fri Sep 22 12:07:03 2017 (r323922) @@ -628,9 +628,11 @@ mpssas_add_device(struct mps_softc *sc, u16 handle, u8 sassc = sc->sassc; mpssas_startup_increment(sassc); - if ((mps_config_get_sas_device_pg0(sc, &mpi_reply, &config_page, - MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { - printf("%s: error reading SAS device page0\n", __func__); + if (mps_config_get_sas_device_pg0(sc, &mpi_reply, &config_page, + MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle) != 0) { + mps_dprint(sc, MPS_INFO|MPS_MAPPING|MPS_FAULT, + "Error reading SAS device %#x page0, iocstatus= 0x%x\n", + handle, mpi_reply.IOCStatus); error = ENXIO; goto out; } @@ -642,12 +644,14 @@ mpssas_add_device(struct mps_softc *sc, u16 handle, u8 Mpi2ConfigReply_t tmp_mpi_reply; Mpi2SasDevicePage0_t parent_config_page; - if ((mps_config_get_sas_device_pg0(sc, &tmp_mpi_reply, - &parent_config_page, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, - le16toh(config_page.ParentDevHandle)))) { + if (mps_config_get_sas_device_pg0(sc, &tmp_mpi_reply, + &parent_config_page, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, + le16toh(config_page.ParentDevHandle)) != 0) { mps_dprint(sc, MPS_MAPPING|MPS_FAULT, - "%s: error reading SAS device %#x page0\n", - __func__, le16toh(config_page.ParentDevHandle)); + "Error reading parent SAS device %#x page0, " + "iocstatus= 0x%x\n", + le16toh(config_page.ParentDevHandle), + tmp_mpi_reply.IOCStatus); } else { parent_sas_address = parent_config_page.SASAddress.High; parent_sas_address = (parent_sas_address << 32) | @@ -973,8 +977,9 @@ mpssas_get_sata_identify(struct mps_softc *sc, u16 han * If the request returns an error then we need to do a diag * reset */ - printf("%s: request for page completed with error %d", - __func__, error); + mps_dprint(sc, MPS_INFO|MPS_FAULT|MPS_MAPPING, + "Request for SATA PASSTHROUGH page completed with error %d", + error); error = ENXIO; goto out; } @@ -982,8 +987,9 @@ mpssas_get_sata_identify(struct mps_softc *sc, u16 han bcopy(reply, mpi_reply, sizeof(Mpi2SataPassthroughReply_t)); if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) { - printf("%s: error reading SATA PASSTHRU; iocstatus = 0x%x\n", - __func__, reply->IOCStatus); + mps_dprint(sc, MPS_INFO|MPS_MAPPING|MPS_FAULT, + "Error reading device %#x SATA PASSTHRU; iocstatus= 0x%x\n", + handle, reply->IOCStatus); error = ENXIO; goto out; } From owner-svn-src-all@freebsd.org Fri Sep 22 12:45: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 DD2C2E27905; Fri, 22 Sep 2017 12:45:17 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7E596A836; Fri, 22 Sep 2017 12:45:17 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MCjHUL043404; Fri, 22 Sep 2017 12:45:17 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MCjFPv043387; Fri, 22 Sep 2017 12:45:15 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201709221245.v8MCjFPv043387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 22 Sep 2017 12:45:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323923 - in head: lib/libufs sbin/dumpfs sbin/fsck_ffs sbin/fsdb sbin/newfs sys/kern sys/libkern sys/sys sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: lib/libufs sbin/dumpfs sbin/fsck_ffs sbin/fsdb sbin/newfs sys/kern sys/libkern sys/sys sys/ufs/ffs X-SVN-Commit-Revision: 323923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 12:45:18 -0000 Author: mckusick Date: Fri Sep 22 12:45:15 2017 New Revision: 323923 URL: https://svnweb.freebsd.org/changeset/base/323923 Log: Continuing efforts to provide hardening of FFS, this change adds a check hash to cylinder groups. If a check hash fails when a cylinder group is read, no further allocations are attempted in that cylinder group until it has been fixed by fsck. This avoids a class of filesystem panics related to corrupted cylinder group maps. The hash is done using crc32c. Check hases are added only to UFS2 and not to UFS1 as UFS1 is primarily used in embedded systems with small memories and low-powered processors which need as light-weight a filesystem as possible. Specifics of the changes: sys/sys/buf.h: Add BX_FSPRIV to reserve a set of eight b_xflags that may be used by individual filesystems for their own purpose. Their specific definitions are found in the header files for each filesystem that uses them. Also add fields to struct buf as noted below. sys/kern/vfs_bio.c: It is only necessary to compute a check hash for a cylinder group when it is actually read from disk. When calling bread, you do not know whether the buffer was found in the cache or read. So a new flag (GB_CKHASH) and a pointer to a function to perform the hash has been added to breadn_flags to say that the function should be called to calculate a hash if the data has been read. The check hash is placed in b_ckhash and the B_CKHASH flag is set to indicate that a read was done and a check hash calculated. Though a rather elaborate mechanism, it should also work for check hashing other metadata in the future. A kernel internal API change was to change breada into a static fucntion and add flags and a function pointer to a check-hash function. sys/ufs/ffs/fs.h: Add flags for types of check hashes; stored in a new word in the superblock. Define corresponding BX_ flags for the different types of check hashes. Add a check hash word in the cylinder group. sys/ufs/ffs/ffs_alloc.c: In ffs_getcg do the dance with breadn_flags to get a check hash and if one is provided, check it. sys/ufs/ffs/ffs_vfsops.c: Copy across the BX_FFSTYPES flags in background writes. Update the check hash when writing out buffers that need them. sys/ufs/ffs/ffs_snapshot.c: Recompute check hash when updating snapshot cylinder groups. sys/libkern/crc32.c: lib/libufs/Makefile: lib/libufs/libufs.h: lib/libufs/cgroup.c: Include libkern/crc32.c in libufs and use it to compute check hashes when updating cylinder groups. Four utilities are affected: sbin/newfs/mkfs.c: Add the check hashes when building the cylinder groups. sbin/fsck_ffs/fsck.h: sbin/fsck_ffs/fsutil.c: Verify and update check hashes when checking and writing cylinder groups. sbin/fsck_ffs/pass5.c: Offer to add check hashes to existing filesystems. Precompute check hashes when rebuilding cylinder group (although this will be done when it is written in fsutil.c it is necessary to do it early before comparing with the old cylinder group) sbin/dumpfs/dumpfs.c Print out the new check hash flag(s) sbin/fsdb/Makefile: Needs to add libufs now used by pass5.c imported from fsck_ffs. Reviewed by: kib Tested by: Peter Holm (pho) Modified: head/lib/libufs/Makefile head/lib/libufs/cgroup.c head/lib/libufs/libufs.h head/sbin/dumpfs/dumpfs.c head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/pass5.c head/sbin/fsdb/Makefile head/sbin/newfs/mkfs.c head/sys/kern/vfs_bio.c head/sys/libkern/crc32.c head/sys/sys/buf.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_inode.c head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ffs/fs.h Modified: head/lib/libufs/Makefile ============================================================================== --- head/lib/libufs/Makefile Fri Sep 22 12:07:03 2017 (r323922) +++ head/lib/libufs/Makefile Fri Sep 22 12:45:15 2017 (r323923) @@ -5,7 +5,7 @@ LIB= ufs SHLIBDIR?= /lib SHLIB_MAJOR= 6 -SRCS= block.c cgroup.c inode.c sblock.c type.c ffs_subr.c ffs_tables.c +SRCS= block.c cgroup.c crc32.c inode.c sblock.c type.c ffs_subr.c ffs_tables.c INCS= libufs.h MAN= bread.3 cgread.3 libufs.3 sbread.3 ufs_disk_close.3 @@ -18,7 +18,7 @@ MLINKS+= ufs_disk_close.3 ufs_disk_fillout.3 MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3 MLINKS+= ufs_disk_close.3 ufs_disk_write.3 -.PATH: ${SRCTOP}/sys/ufs/ffs +.PATH: ${SRCTOP}/sys/libkern ${SRCTOP}/sys/ufs/ffs WARNS?= 2 Modified: head/lib/libufs/cgroup.c ============================================================================== --- head/lib/libufs/cgroup.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/lib/libufs/cgroup.c Fri Sep 22 12:45:15 2017 (r323923) @@ -214,6 +214,11 @@ cgwrite1(struct uufsd *disk, int c) struct fs *fs; fs = &disk->d_fs; + if ((fs->fs_metackhash & CK_CYLGRP) != 0) { + disk->d_cg.cg_ckhash = 0; + disk->d_cg.cg_ckhash = + calculate_crc32c(~0L, (void *)&disk->d_cg, fs->fs_cgsize); + } if (bwrite(disk, fsbtodb(fs, cgtod(fs, c)), disk->d_cgunion.d_buf, fs->fs_bsize) == -1) { ERROR(disk, "unable to write cylinder group"); Modified: head/lib/libufs/libufs.h ============================================================================== --- head/lib/libufs/libufs.h Fri Sep 22 12:07:03 2017 (r323922) +++ head/lib/libufs/libufs.h Fri Sep 22 12:45:15 2017 (r323923) @@ -144,6 +144,11 @@ int ffs_isblock(struct fs *, u_char *, ufs1_daddr_t); int ffs_isfreeblock(struct fs *, u_char *, ufs1_daddr_t); void ffs_setblock(struct fs *, u_char *, ufs1_daddr_t); +/* + * crc32c.c + */ +uint32_t calculate_crc32c(uint32_t, const void *, size_t); + __END_DECLS #endif /* __LIBUFS_H__ */ Modified: head/sbin/dumpfs/dumpfs.c ============================================================================== --- head/sbin/dumpfs/dumpfs.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sbin/dumpfs/dumpfs.c Fri Sep 22 12:45:15 2017 (r323923) @@ -276,6 +276,24 @@ dumpfs(const char *name) if (fsflags != 0) printf("unknown flags (%#x)", fsflags); putchar('\n'); + printf("check hashes\t"); + fsflags = afs.fs_metackhash; + if (fsflags == 0) + printf("none"); + if (fsflags & CK_SUPERBLOCK) + printf("superblock "); + if (fsflags & CK_CYLGRP) + printf("cylinder-groups "); + if (fsflags & CK_INODE) + printf("inodes "); + if (fsflags & CK_INDIR) + printf("indirect-blocks "); + if (fsflags & CK_DIR) + printf("directories "); + fsflags &= ~(CK_SUPERBLOCK | CK_CYLGRP | CK_INODE | CK_INDIR | CK_DIR); + if (fsflags != 0) + printf("unknown flags (%#x)", fsflags); + putchar('\n'); printf("fsmnt\t%s\n", afs.fs_fsmnt); printf("volname\t%s\tswuid\t%ju\tprovidersize\t%ju\n", afs.fs_volname, (uintmax_t)afs.fs_swuid, Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sbin/fsck_ffs/fsutil.c Fri Sep 22 12:45:15 2017 (r323923) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "fsck.h" @@ -349,6 +350,20 @@ flush(int fd, struct bufarea *bp) if (!bp->b_dirty) return; + /* + * Calculate any needed check hashes. + */ + switch (bp->b_type) { + case BT_CYLGRP: + if ((sblock.fs_metackhash & CK_CYLGRP) == 0) + break; + bp->b_un.b_cg->cg_ckhash = 0; + bp->b_un.b_cg->cg_ckhash = + calculate_crc32c(~0L, bp->b_un.b_buf, bp->b_size); + break; + default: + break; + } bp->b_dirty = 0; if (fswritefd < 0) { pfatal("WRITING IN READ_ONLY MODE.\n"); Modified: head/sbin/fsck_ffs/pass5.c ============================================================================== --- head/sbin/fsck_ffs/pass5.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sbin/fsck_ffs/pass5.c Fri Sep 22 12:45:15 2017 (r323923) @@ -71,6 +71,13 @@ pass5(void) inoinfo(UFS_WINO)->ino_state = USTATE; memset(newcg, 0, (size_t)fs->fs_cgsize); newcg->cg_niblk = fs->fs_ipg; + if (preen == 0 && yflag == 0 && fs->fs_magic == FS_UFS2_MAGIC && + fswritefd != -1 && (fs->fs_metackhash & CK_CYLGRP) == 0 && + reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) { + fs->fs_metackhash |= CK_CYLGRP; + rewritecg = 1; + sbdirty(); + } if (cvtlevel >= 3) { if (fs->fs_maxcontig < 2 && fs->fs_contigsumsize > 0) { if (preen) @@ -305,6 +312,12 @@ pass5(void) sump[run]++; } } + if ((fs->fs_metackhash & CK_CYLGRP) != 0) { + newcg->cg_ckhash = 0; + newcg->cg_ckhash = + calculate_crc32c(~0L, (void *)newcg, fs->fs_cgsize); + } + if (bkgrdflag != 0) { cstotal.cs_nffree += cg->cg_cs.cs_nffree; cstotal.cs_nbfree += cg->cg_cs.cs_nbfree; Modified: head/sbin/fsdb/Makefile ============================================================================== --- head/sbin/fsdb/Makefile Fri Sep 22 12:07:03 2017 (r323922) +++ head/sbin/fsdb/Makefile Fri Sep 22 12:45:15 2017 (r323923) @@ -10,7 +10,7 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c CFLAGS+= -I${.CURDIR:H}/fsck_ffs WARNS?= 2 -LIBADD= edit +LIBADD= edit ufs .PATH: ${.CURDIR:H}/fsck_ffs ${SRCTOP}/sys/ufs/ffs .include Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sbin/newfs/mkfs.c Fri Sep 22 12:45:15 2017 (r323923) @@ -98,6 +98,7 @@ static void iput(union dinode *, ino_t); static int makedir(struct direct *, int); static void setblock(struct fs *, unsigned char *, int); static void wtfs(ufs2_daddr_t, int, char *); +static void cgckhash(struct cg *); static u_int32_t newfs_random(void); static int @@ -491,6 +492,11 @@ restart: sblock.fs_old_cstotal.cs_nifree = sblock.fs_cstotal.cs_nifree; sblock.fs_old_cstotal.cs_nffree = sblock.fs_cstotal.cs_nffree; } + /* + * Set flags for metadata that is being check-hashed. + */ + if (Oflag > 1) + sblock.fs_metackhash = CK_CYLGRP; /* * Dump out summary information about file system. @@ -791,6 +797,7 @@ initcg(int cylno, time_t utime) } } *cs = acg.cg_cs; + cgckhash(&acg); /* * Write out the duplicate super block, the cylinder group map * and two blocks worth of inodes in a single write. @@ -1006,6 +1013,7 @@ goth: setbit(cg_blksfree(&acg), d + i); } /* XXX cgwrite(&disk, 0)??? */ + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, 0)), sblock.fs_cgsize, (char *)&acg); return ((ufs2_daddr_t)d); @@ -1027,6 +1035,7 @@ iput(union dinode *ip, ino_t ino) } acg.cg_cs.cs_nifree--; setbit(cg_inosused(&acg), ino); + cgckhash(&acg); wtfs(fsbtodb(&sblock, cgtod(&sblock, 0)), sblock.fs_cgsize, (char *)&acg); sblock.fs_cstotal.cs_nifree--; @@ -1057,6 +1066,20 @@ wtfs(ufs2_daddr_t bno, int size, char *bf) return; if (bwrite(&disk, part_ofs + bno, bf, size) < 0) err(36, "wtfs: %d bytes at sector %jd", size, (intmax_t)bno); +} + +/* + * Calculate the check-hash of the cylinder group. + */ +static void +cgckhash(cgp) + struct cg *cgp; +{ + + if ((sblock.fs_metackhash & CK_CYLGRP) == 0) + return; + cgp->cg_ckhash = 0; + cgp->cg_ckhash = calculate_crc32c(~0L, (void *)cgp, sblock.fs_cgsize); } /* Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/kern/vfs_bio.c Fri Sep 22 12:45:15 2017 (r323923) @@ -119,6 +119,8 @@ static void vfs_vmio_truncate(struct buf *bp, int npag static void vfs_vmio_extend(struct buf *bp, int npages, int size); static int vfs_bio_clcheck(struct vnode *vp, int size, daddr_t lblkno, daddr_t blkno); +static void breada(struct vnode *, daddr_t *, int *, int, struct ucred *, int, + void (*)(struct buf *)); static int buf_flush(struct vnode *vp, int); static int buf_recycle(bool); static int buf_scan(bool); @@ -1783,15 +1785,14 @@ bufkva_reclaim(vmem_t *vmem, int flags) return; } - /* * Attempt to initiate asynchronous I/O on read-ahead blocks. We must * clear BIO_ERROR and B_INVAL prior to initiating I/O . If B_CACHE is set, * the buffer is valid and we do not have to do anything. */ -void -breada(struct vnode * vp, daddr_t * rablkno, int * rabsize, - int cnt, struct ucred * cred) +static void +breada(struct vnode * vp, daddr_t * rablkno, int * rabsize, int cnt, + struct ucred * cred, int flags, void (*ckhashfunc)(struct buf *)) { struct buf *rabp; int i; @@ -1800,31 +1801,34 @@ breada(struct vnode * vp, daddr_t * rablkno, int * rab if (inmem(vp, *rablkno)) continue; rabp = getblk(vp, *rablkno, *rabsize, 0, 0, 0); - - if ((rabp->b_flags & B_CACHE) == 0) { - if (!TD_IS_IDLETHREAD(curthread)) { + if ((rabp->b_flags & B_CACHE) != 0) { + brelse(rabp); + continue; + } + if (!TD_IS_IDLETHREAD(curthread)) { #ifdef RACCT - if (racct_enable) { - PROC_LOCK(curproc); - racct_add_buf(curproc, rabp, 0); - PROC_UNLOCK(curproc); - } -#endif /* RACCT */ - curthread->td_ru.ru_inblock++; + if (racct_enable) { + PROC_LOCK(curproc); + racct_add_buf(curproc, rabp, 0); + PROC_UNLOCK(curproc); } - rabp->b_flags |= B_ASYNC; - rabp->b_flags &= ~B_INVAL; - rabp->b_ioflags &= ~BIO_ERROR; - rabp->b_iocmd = BIO_READ; - if (rabp->b_rcred == NOCRED && cred != NOCRED) - rabp->b_rcred = crhold(cred); - vfs_busy_pages(rabp, 0); - BUF_KERNPROC(rabp); - rabp->b_iooffset = dbtob(rabp->b_blkno); - bstrategy(rabp); - } else { - brelse(rabp); +#endif /* RACCT */ + curthread->td_ru.ru_inblock++; } + rabp->b_flags |= B_ASYNC; + rabp->b_flags &= ~B_INVAL; + if ((flags & GB_CKHASH) != 0) { + rabp->b_flags |= B_CKHASH; + rabp->b_ckhashcalc = ckhashfunc; + } + rabp->b_ioflags &= ~BIO_ERROR; + rabp->b_iocmd = BIO_READ; + if (rabp->b_rcred == NOCRED && cred != NOCRED) + rabp->b_rcred = crhold(cred); + vfs_busy_pages(rabp, 0); + BUF_KERNPROC(rabp); + rabp->b_iooffset = dbtob(rabp->b_blkno); + bstrategy(rabp); } } @@ -1840,10 +1844,11 @@ breada(struct vnode * vp, daddr_t * rablkno, int * rab */ int breadn_flags(struct vnode *vp, daddr_t blkno, int size, daddr_t *rablkno, - int *rabsize, int cnt, struct ucred *cred, int flags, struct buf **bpp) + int *rabsize, int cnt, struct ucred *cred, int flags, + void (*ckhashfunc)(struct buf *), struct buf **bpp) { struct buf *bp; - int rv = 0, readwait = 0; + int readwait, rv; CTR3(KTR_BUF, "breadn(%p, %jd, %d)", vp, blkno, size); /* @@ -1853,7 +1858,10 @@ breadn_flags(struct vnode *vp, daddr_t blkno, int size if (bp == NULL) return (EBUSY); - /* if not found in cache, do some I/O */ + /* + * If not found in cache, do some I/O + */ + readwait = 0; if ((bp->b_flags & B_CACHE) == 0) { if (!TD_IS_IDLETHREAD(curthread)) { #ifdef RACCT @@ -1867,6 +1875,10 @@ breadn_flags(struct vnode *vp, daddr_t blkno, int size } bp->b_iocmd = BIO_READ; bp->b_flags &= ~B_INVAL; + if ((flags & GB_CKHASH) != 0) { + bp->b_flags |= B_CKHASH; + bp->b_ckhashcalc = ckhashfunc; + } bp->b_ioflags &= ~BIO_ERROR; if (bp->b_rcred == NOCRED && cred != NOCRED) bp->b_rcred = crhold(cred); @@ -1876,8 +1888,12 @@ breadn_flags(struct vnode *vp, daddr_t blkno, int size ++readwait; } - breada(vp, rablkno, rabsize, cnt, cred); + /* + * Attempt to initiate asynchronous I/O on read-ahead blocks. + */ + breada(vp, rablkno, rabsize, cnt, cred, flags, ckhashfunc); + rv = 0; if (readwait) { rv = bufwait(bp); if (rv != 0) { @@ -4048,6 +4064,10 @@ bufdone(struct buf *bp) runningbufwakeup(bp); if (bp->b_iocmd == BIO_WRITE) dropobj = bp->b_bufobj; + else if ((bp->b_flags & B_CKHASH) != 0) { + KASSERT(buf_mapped(bp), ("biodone: bp %p not mapped", bp)); + (*bp->b_ckhashcalc)(bp); + } /* call optional completion function if requested */ if (bp->b_iodone != NULL) { biodone = bp->b_iodone; Modified: head/sys/libkern/crc32.c ============================================================================== --- head/sys/libkern/crc32.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/libkern/crc32.c Fri Sep 22 12:45:15 2017 (r323923) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include + +#ifdef _KERNEL #include #include @@ -57,6 +59,7 @@ __FBSDID("$FreeBSD$"); #if defined(__aarch64__) #include #endif +#endif /* _KERNEL */ const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, @@ -759,6 +762,7 @@ calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { +#ifdef _KERNEL #if defined(__amd64__) || defined(__i386__) if ((cpu_feature2 & CPUID2_SSE42) != 0) { return (sse42_crc32c(crc32c, buffer, length)); @@ -776,6 +780,7 @@ calculate_crc32c(uint32_t crc32c, return (armv8_crc32c(crc32c, buffer, length)); } else #endif +#endif /* _KERNEL */ if (length < 4) { return (singletable_crc32c(crc32c, buffer, length)); } else { Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/sys/buf.h Fri Sep 22 12:45:15 2017 (r323923) @@ -70,7 +70,7 @@ extern struct bio_ops { struct vm_object; struct vm_page; -typedef unsigned char b_xflags_t; +typedef uint32_t b_xflags_t; /* * The buffer header describes an I/O operation in the kernel. @@ -104,6 +104,8 @@ struct buf { off_t b_iooffset; long b_resid; void (*b_iodone)(struct buf *); + void (*b_ckhashcalc)(struct buf *); + uint64_t b_ckhash; /* B_CKHASH requested check-hash */ daddr_t b_blkno; /* Underlying physical block number. */ off_t b_offset; /* Offset into file. */ TAILQ_ENTRY(buf) b_bobufs; /* (V) Buffer's associated vnode. */ @@ -209,7 +211,7 @@ struct buf { #define B_CACHE 0x00000020 /* Bread found us in the cache. */ #define B_VALIDSUSPWRT 0x00000040 /* Valid write during suspension. */ #define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */ -#define B_00000100 0x00000100 /* Available flag. */ +#define B_CKHASH 0x00000100 /* checksum hash calculated on read */ #define B_DONE 0x00000200 /* I/O completed. */ #define B_EINTR 0x00000400 /* I/O was interrupted */ #define B_NOREUSE 0x00000800 /* Contents not reused once released. */ @@ -242,12 +244,17 @@ struct buf { /* * These flags are kept in b_xflags. + * + * BX_FSPRIV reserves a set of eight flags that may be used by individual + * filesystems for their own purpose. Their specific definitions are + * found in the header files for each filesystem that uses them. */ #define BX_VNDIRTY 0x00000001 /* On vnode dirty list */ #define BX_VNCLEAN 0x00000002 /* On vnode clean list */ #define BX_BKGRDWRITE 0x00000010 /* Do writes in background */ #define BX_BKGRDMARKER 0x00000020 /* Mark buffer for splay tree */ #define BX_ALTDATA 0x00000040 /* Holds extended data */ +#define BX_FSPRIV 0x00FF0000 /* filesystem-specific flags mask */ #define PRINT_BUF_XFLAGS "\20\7altdata\6bkgrdmarker\5bkgrdwrite\2clean\1dirty" @@ -467,6 +474,7 @@ buf_track(struct buf *bp, const char *location) #define GB_NOWAIT_BD 0x0004 /* Do not wait for bufdaemon. */ #define GB_UNMAPPED 0x0008 /* Do not mmap buffer pages. */ #define GB_KVAALLOC 0x0010 /* But allocate KVA. */ +#define GB_CKHASH 0x0020 /* If reading, calc checksum hash */ #ifdef _KERNEL extern int nbuf; /* The number of buffer headers */ @@ -504,15 +512,15 @@ int buf_dirty_count_severe(void); void bremfree(struct buf *); void bremfreef(struct buf *); /* XXX Force bremfree, only for nfs. */ #define bread(vp, blkno, size, cred, bpp) \ - breadn_flags(vp, blkno, size, NULL, NULL, 0, cred, 0, bpp) + breadn_flags(vp, blkno, size, NULL, NULL, 0, cred, 0, NULL, bpp) #define bread_gb(vp, blkno, size, cred, gbflags, bpp) \ breadn_flags(vp, blkno, size, NULL, NULL, 0, cred, \ - gbflags, bpp) + gbflags, NULL, bpp) #define breadn(vp, blkno, size, rablkno, rabsize, cnt, cred, bpp) \ - breadn_flags(vp, blkno, size, rablkno, rabsize, cnt, cred, 0, bpp) + breadn_flags(vp, blkno, size, rablkno, rabsize, cnt, cred, \ + 0, NULL, bpp) int breadn_flags(struct vnode *, daddr_t, int, daddr_t *, int *, int, - struct ucred *, int, struct buf **); -void breada(struct vnode *, daddr_t *, int *, int, struct ucred *); + struct ucred *, int, void (*)(struct buf *), struct buf **); void bdwrite(struct buf *); void bawrite(struct buf *); void babarrierwrite(struct buf *); Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Sep 22 12:45:15 2017 (r323923) @@ -123,6 +123,7 @@ static ufs2_daddr_t ffs_nodealloccg(struct inode *, u_ static ufs1_daddr_t ffs_mapsearch(struct fs *, struct cg *, ufs2_daddr_t, int); static int ffs_reallocblks_ufs1(struct vop_reallocblks_args *); static int ffs_reallocblks_ufs2(struct vop_reallocblks_args *); +static void ffs_ckhash_cg(struct buf *); /* * Allocate a block in the filesystem. @@ -2596,25 +2597,53 @@ ffs_getcg(fs, devvp, cg, bpp, cgpp) { struct buf *bp; struct cg *cgp; - int error; + int flags, error; *bpp = NULL; *cgpp = NULL; - error = bread(devvp, devvp->v_type == VREG ? + flags = 0; + if ((fs->fs_metackhash & CK_CYLGRP) != 0) + flags |= GB_CKHASH; + error = breadn_flags(devvp, devvp->v_type == VREG ? fragstoblks(fs, cgtod(fs, cg)) : fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); + (int)fs->fs_cgsize, NULL, NULL, 0, NOCRED, flags, + ffs_ckhash_cg, &bp); if (error != 0) return (error); cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp) || cgp->cg_cgx != cg) { + if (((fs->fs_metackhash & CK_CYLGRP) != 0 && + (bp->b_flags & B_CKHASH) != 0 && + cgp->cg_ckhash != bp->b_ckhash) || + !cg_chkmagic(cgp) || cgp->cg_cgx != cg) { + printf("checksum failed: cg %u, cgp: 0x%x != bp: 0x%lx\n", + cg, cgp->cg_ckhash, bp->b_ckhash); + bp->b_flags &= ~B_CKHASH; + bp->b_flags |= B_INVAL | B_NOCACHE; brelse(bp); return (EIO); } + bp->b_flags &= ~B_CKHASH; bp->b_xflags |= BX_BKGRDWRITE; + if ((fs->fs_metackhash & CK_CYLGRP) != 0) + bp->b_xflags |= BX_CYLGRP; cgp->cg_old_time = cgp->cg_time = time_second; *bpp = bp; *cgpp = cgp; return (0); +} + +static void +ffs_ckhash_cg(bp) + struct buf *bp; +{ + uint32_t ckhash; + struct cg *cgp; + + cgp = (struct cg *)bp->b_data; + ckhash = cgp->cg_ckhash; + cgp->cg_ckhash = 0; + bp->b_ckhash = calculate_crc32c(~0L, bp->b_data, bp->b_bcount); + cgp->cg_ckhash = ckhash; } /* Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/ufs/ffs/ffs_inode.c Fri Sep 22 12:45:15 2017 (r323923) @@ -110,9 +110,9 @@ ffs_update(vp, waitfor) if (IS_SNAPSHOT(ip)) flags = GB_LOCK_NOWAIT; loop: - error = breadn_flags(ITODEVVP(ip), + error = bread_gb(ITODEVVP(ip), fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), - (int) fs->fs_bsize, 0, 0, 0, NOCRED, flags, &bp); + (int) fs->fs_bsize, NOCRED, flags, &bp); if (error != 0) { if (error != EBUSY) return (error); Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/ufs/ffs/ffs_snapshot.c Fri Sep 22 12:45:15 2017 (r323923) @@ -927,7 +927,7 @@ cgaccount(cg, vp, nbp, passno) error = UFS_BALLOC(vp, lblktosize(fs, (off_t)(base + loc)), fs->fs_bsize, KERNCRED, BA_METAONLY, &ibp); if (error) { - return (error); + goto out; } indiroff = (base + loc - UFS_NDADDR) % NINDIR(fs); for ( ; loc < len; loc++, indiroff++) { @@ -939,7 +939,7 @@ cgaccount(cg, vp, nbp, passno) lblktosize(fs, (off_t)(base + loc)), fs->fs_bsize, KERNCRED, BA_METAONLY, &ibp); if (error) { - return (error); + goto out; } indiroff = 0; } @@ -967,7 +967,21 @@ cgaccount(cg, vp, nbp, passno) if (passno == 2) ibp->b_flags |= B_VALIDSUSPWRT; bdwrite(ibp); - return (0); +out: + /* + * We have to calculate the crc32c here rather than just setting the + * BX_CYLGRP b_xflags because the allocation of the block for the + * the cylinder group map will always be a full size block (fs_bsize) + * even though the cylinder group may be smaller (fs_cgsize). The + * crc32c must be computed only over fs_cgsize whereas the BX_CYLGRP + * flag causes it to be computed over the size of the buffer. + */ + if ((fs->fs_metackhash & CK_CYLGRP) != 0) { + ((struct cg *)nbp->b_data)->cg_ckhash = 0; + ((struct cg *)nbp->b_data)->cg_ckhash = + calculate_crc32c(~0L, nbp->b_data, fs->fs_cgsize); + } + return (error); } /* Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Sep 22 12:45:15 2017 (r323923) @@ -838,7 +838,11 @@ ffs_mountfs(devvp, mp, td) goto out; } fs->fs_fmod = 0; - fs->fs_flags &= ~FS_INDEXDIRS; /* no support for directory indices */ + /* none of these types of check-hashes are maintained */ + fs->fs_metackhash &= ~(CK_SUPERBLOCK | CK_INODE | CK_INDIR | CK_DIR); + /* no support for directory indices or any other undefined flags */ + fs->fs_flags &= ~FS_INDEXDIRS; + fs->fs_flags &= FS_SUPPORTED; fs->fs_flags &= ~FS_UNCLEAN; if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; @@ -2150,7 +2154,8 @@ ffs_bufwrite(struct buf *bp) BO_LOCK(bp->b_bufobj); bp->b_vflags |= BV_BKGRDINPROG; BO_UNLOCK(bp->b_bufobj); - newbp->b_xflags |= BX_BKGRDMARKER; + newbp->b_xflags |= + (bp->b_xflags & BX_FSPRIV) | BX_BKGRDMARKER; newbp->b_lblkno = bp->b_lblkno; newbp->b_blkno = bp->b_blkno; newbp->b_offset = bp->b_offset; @@ -2194,9 +2199,8 @@ static void ffs_geom_strategy(struct bufobj *bo, struct buf *bp) { struct vnode *vp; - int error; struct buf *tbp; - int nocopy; + int error, nocopy; vp = bo2vnode(bo); if (bp->b_iocmd == BIO_WRITE) { @@ -2247,6 +2251,32 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) } #endif + /* + * Check for metadata that needs check-hashes and update them. + */ + switch (bp->b_xflags & BX_FSPRIV) { + case BX_CYLGRP: + ((struct cg *)bp->b_data)->cg_ckhash = 0; + ((struct cg *)bp->b_data)->cg_ckhash = + calculate_crc32c(~0L, bp->b_data, bp->b_bcount); + break; + + case BX_SUPERBLOCK: + case BX_INODE: + case BX_INDIR: + case BX_DIR: + printf("Check-hash write is unimplemented!!!\n"); + break; + + case 0: + break; + + default: + printf("multiple buffer types 0x%b\n", + (u_int)(bp->b_xflags & BX_FSPRIV), + PRINT_UFS_BUF_XFLAGS); + break; + } } g_vfs_strategy(bo, bp); } Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/ufs/ffs/ffs_vnops.c Fri Sep 22 12:45:15 2017 (r323923) @@ -587,7 +587,7 @@ ffs_read(ap) */ u_int nextsize = blksize(fs, ip, nextlbn); error = breadn_flags(vp, lbn, size, &nextlbn, - &nextsize, 1, NOCRED, GB_UNMAPPED, &bp); + &nextsize, 1, NOCRED, GB_UNMAPPED, NULL, &bp); } else { /* * Failing all of the above, just read what the Modified: head/sys/ufs/ffs/fs.h ============================================================================== --- head/sys/ufs/ffs/fs.h Fri Sep 22 12:07:03 2017 (r323922) +++ head/sys/ufs/ffs/fs.h Fri Sep 22 12:45:15 2017 (r323923) @@ -361,7 +361,8 @@ struct fs { int32_t fs_save_cgsize; /* save real cg size to use fs_bsize */ ufs_time_t fs_mtime; /* Last mount or fsck time. */ int32_t fs_sujfree; /* SUJ free list */ - int32_t fs_sparecon32[23]; /* reserved for future constants */ + int32_t fs_sparecon32[22]; /* reserved for future constants */ + u_int32_t fs_metackhash; /* metadata check-hash, see CK_ below */ int32_t fs_flags; /* see FS_ flags below */ int32_t fs_contigsumsize; /* size of cluster summary array */ int32_t fs_maxsymlinklen; /* max length of an internal symlink */ @@ -388,7 +389,6 @@ CTASSERT(sizeof(struct fs) == 1376); #define FS_UFS1_MAGIC 0x011954 /* UFS1 fast filesystem magic number */ #define FS_UFS2_MAGIC 0x19540119 /* UFS2 fast filesystem magic number */ #define FS_BAD_MAGIC 0x19960408 /* UFS incomplete newfs magic number */ -#define FS_OKAY 0x7c269d38 /* superblock checksum */ #define FS_42INODEFMT -1 /* 4.2BSD inode format */ #define FS_44INODEFMT 2 /* 4.4BSD inode format */ @@ -415,7 +415,11 @@ CTASSERT(sizeof(struct fs) == 1376); * on-disk auxiliary indexes (such as B-trees) for speeding directory * accesses. Kernels that do not support auxiliary indices clear the * flag to indicate that the indices need to be rebuilt (by fsck) before - * they can be used. + * they can be used. When a filesystem is mounted, any flags not + * included in FS_SUPPORTED are cleared. This lets newer features + * know that the filesystem has been run on an older version of the + * filesystem and thus that data structures associated with those + * features are out-of-date and need to be rebuilt. * * FS_ACLS indicates that POSIX.1e ACLs are administratively enabled * for the file system, so they should be loaded from extended attributes, @@ -437,8 +441,30 @@ CTASSERT(sizeof(struct fs) == 1376); #define FS_NFS4ACLS 0x0100 /* file system has NFSv4 ACLs enabled */ #define FS_INDEXDIRS 0x0200 /* kernel supports indexed directories */ #define FS_TRIM 0x0400 /* issue BIO_DELETE for deleted blocks */ +#define FS_SUPPORTED 0xFFFF /* supported flags, others cleared at mount */ /* + * The fs_metackhash field indicates the types of metadata check-hash + * that are maintained for a filesystem. Not all filesystems check-hash + * all metadata. + */ +#define CK_SUPERBLOCK 0x0001 /* the superblock */ +#define CK_CYLGRP 0x0002 /* the cylinder groups */ +#define CK_INODE 0x0004 /* inodes */ +#define CK_INDIR 0x0008 /* indirect blocks */ +#define CK_DIR 0x0010 /* directory contents */ +/* + * The BX_FSPRIV buffer b_xflags are used to track types of data in buffers. + */ +#define BX_SUPERBLOCK 0x00010000 /* superblock */ +#define BX_CYLGRP 0x00020000 /* cylinder groups */ +#define BX_INODE 0x00040000 /* inodes */ +#define BX_INDIR 0x00080000 /* indirect blocks */ +#define BX_DIR 0x00100000 /* directory contents */ + +#define PRINT_UFS_BUF_XFLAGS "\20\25dir\24indir\23inode\22cylgrp\21superblock" + +/* * Macros to access bits in the fs_active array. */ #define ACTIVECGNUM(fs, cg) ((fs)->fs_active[(cg) / (NBBY * sizeof(int))]) @@ -506,7 +532,8 @@ struct cg { u_int32_t cg_niblk; /* number of inode blocks this cg */ u_int32_t cg_initediblk; /* last initialized inode */ u_int32_t cg_unrefs; /* number of unreferenced inodes */ - int32_t cg_sparecon32[2]; /* reserved for future use */ + int32_t cg_sparecon32[1]; /* reserved for future use */ + u_int32_t cg_ckhash; /* check-hash of this cg */ ufs_time_t cg_time; /* time last written */ int64_t cg_sparecon64[3]; /* reserved for future use */ u_int8_t cg_space[1]; /* space for cylinder group maps */ From owner-svn-src-all@freebsd.org Fri Sep 22 13:25: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 62001E28E69; Fri, 22 Sep 2017 13:25:08 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x232.google.com (mail-qt0-x232.google.com [IPv6:2607:f8b0:400d:c0d::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 18AD16BF9A; Fri, 22 Sep 2017 13:25:08 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x232.google.com with SMTP id s18so1008370qta.3; Fri, 22 Sep 2017 06:25:08 -0700 (PDT) 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=tc3VNbaeMXlxgNmxR6ZItJrIK+UiVcVUCfMWLNna6ZU=; b=A32T4dyDprq5aHZaYW/k0Rmt9IUHS3eeuufRu18wDMYVtDMrFrgCvPz5Q23/OsRuYX ELuTJAHcjWnubaQeoZkvEd3VZIa5ltjIGEn8bEuw8rwsJGhZmguw5vCTVrdKMKutCBsO io+qvigzDY5CYUUbLtPJudltbIiH9Xwdy1HMzpRQDUsJ18crGnvSSz/5ZLcKYy8yNTx0 13VtCfsTv+dkLfL3mpq2zImJnpW3BanCqtHcOk7Gu/70LNTaUommlmD19o9ct4cwj7P0 l5ZFEez7nSDXUeAkAu4eGxzpsEsWjSq1k85vkuuOqopb8yJ4Qc3qgZ+np3291lJNeneC evqw== 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=tc3VNbaeMXlxgNmxR6ZItJrIK+UiVcVUCfMWLNna6ZU=; b=WicaDZTFaa4T2Zcl5Np+RGGFuMK2WVqo4z/QfWp0FRG4hiwiQbZxWY5htHpi6dOQkH zMowvhN7O9YtpcqOBFrsJzZn4UnDoIRMCwpacUldXoHIRO9vNJTPtO8dXwhQFvDA8ELT Xlfm684ZzIgn4XhotxpZa6lirnV43QNUQY8E6U1X1Au794Njw2Vuh/dTDTH0XJ+9nta0 92Oy6hNCuyePGOuB372KHssM01PiKTItykWSr6JX1epXB695WfFLuTVGPg2QhAVOWOkD mJDAxJYHSSDSwIWzMNiJJ/p1JMWFRk4LOJ1584sFq6QCALeazMdJjOsvNAtezDBmHLGc tbFg== X-Gm-Message-State: AHPjjUhP8mhjYm+VpCsK7mfAHGbDavGj4Sic9HSPIwEKh8pVlNj0rPfu njvcxqJt8vnlXO/OR6/K8uqQNeustZahg8yUKkc= X-Google-Smtp-Source: AOwi7QDsDpsETDhRtQA6ROE33ACc+An6hdWKuyoyHQO5D0zP1EaWgp+k4QTxVUMqFgIrAZZ1e1/3JSCL7w3YiUxhoQQ= X-Received: by 10.200.26.211 with SMTP id h19mr8278714qtk.341.1506086707093; Fri, 22 Sep 2017 06:25:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.63.54 with HTTP; Fri, 22 Sep 2017 06:25:06 -0700 (PDT) In-Reply-To: <20170913223231.GN1055@FreeBSD.org> References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.org> <20170913223231.GN1055@FreeBSD.org> From: Mateusz Guzik Date: Fri, 22 Sep 2017 15:25:06 +0200 Message-ID: Subject: Re: svn commit: r323393 - in head/sys: sys vm To: Gleb Smirnoff Cc: Bruce Evans , Mateusz Guzik , "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, 22 Sep 2017 13:25:08 -0000 On Thu, Sep 14, 2017 at 12:32 AM, Gleb Smirnoff wrote: > On Mon, Sep 11, 2017 at 09:30:10AM +0200, Mateusz Guzik wrote: > M> First, there is a bunch of counter(9) fields. I don't know the original > M> reasoning. I would expect these counters to be statically defined in a > M> per-cpu struct. > > The reasoning was to remove 'struct vmmeter' from the 'struct pcpu', which > sounds inline with your desire to remote struct vmmeter from the kernel > at all. > > Maintainance wise, it is much easier not to bloat 'struct pcpu' with > various global statistics, but keep them as counter(9)s instead. Indeed, > what's the big difference between TCP statistics and VM statistics, why > treat them differently? > > Performance wise, I haven't seen any regressions when collapsed > multiple entities of struct vmmeter sitting in struct pcpu, into > single one with counter(9)s. > My general point is that low-level primitives are weirdly heavier than they need to be. Notable example is critical_enter/exit which are both function calls. As for counter(9), it adds an avoidable read. You are not going to measure the impact as it is due to the kernel being rather pessimized in general. pmc will probably show slight increase in cache misses, but that's it. That said, if maintenance is easier (I don't see why though) that's fine, I'm definitely not interested in fighting over this one. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Sep 22 13:37: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 9A930E295F7; Fri, 22 Sep 2017 13:37:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::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 61C356C6DA; Fri, 22 Sep 2017 13:37:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x230.google.com with SMTP id z187so3061003ioz.12; Fri, 22 Sep 2017 06:37:57 -0700 (PDT) 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=N0osILSmWiaLHjuCcy07nogPj3zkvgC9CU86kgXHUUI=; b=rXeupq21tQqABB9vfnnbk365S00q8b7OzQBTbZlZEGMSmrMPYfeOM80WB+a1W5Zscu ebqHGZfVl3ZT34IEPPSiw5WYc6kRsd+o8TDCV5Vbd9JK8JSVzPwNi4YP2iFBXrlxrWpF yunEdJEf/AdUAeObpYlepwKFNPyixRTaVC9p9JzXfGJ4xrbLnomY990uTFCIkEg9yj7H 48kh/BjboLGMQuGiK4AFTQzL8EUTr1EoW9kkB3PQxf+PzpGSW9dyB1CxiAlrZ5qVgC1x G2ngwqDyYN9d1xhNtNQkuil4wdWHP3YkULY2/kRanOLoNC3uigpI5Y72yQp/VHKs6wjO Q9eg== 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=N0osILSmWiaLHjuCcy07nogPj3zkvgC9CU86kgXHUUI=; b=Ykz+kD6kwNgOHAMXHL4Sza22tWWkQy2AK4xeTtMHLxYAfLR4tOrL2DuKELTY/+gnmi 9yFE+OJuldfI9bwciJCd6gp6snEaXuNnuQHAQwd7CoZtvo0oVleZ5pacZ+DR1Hq6fEIk fGPxKE+Acabu6pqCEPJYzqylsOtngTKF6VpzepEAfdopdJeSEIU5HD8F3Lrpjd0PeVWa sAUyWFLPkFizH0KI9SR07ixa1F17L3OwYKCpM7lAGSnV0TpDWfB7PjEIRiPOmyMYbhvw k2cnfAy6nF48liM62whTcx28yA7vrzf/u3cfkK2IW8ep6UsPrBruxwGYnhu6C0Q1rk6B MljQ== X-Gm-Message-State: AHPjjUhwMXK0qbdjXOm95kWwNJBmmH4X/1PuGJSAfGsKyKCQ0C5xQm9H 82EJDl8yX75Zb8Qc1wyerZqT7H4Tb0Cedb/XGy6nyUSG X-Google-Smtp-Source: AOwi7QCYxwNEbDtWhSGWej7uKBXaiKW5BSkEF3aFz24g8ZcM+I2zRGR2XqNwNRWXQwzcdkj3aTqQFCP9RNaqHmeSWfU= X-Received: by 10.107.7.159 with SMTP id g31mr6843055ioi.250.1506087476308; Fri, 22 Sep 2017 06:37:56 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.197.130 with HTTP; Fri, 22 Sep 2017 06:37:35 -0700 (PDT) In-Reply-To: <201709221245.v8MCjFPv043387@repo.freebsd.org> References: <201709221245.v8MCjFPv043387@repo.freebsd.org> From: Ed Maste Date: Fri, 22 Sep 2017 15:37:35 +0200 X-Google-Sender-Auth: DOkxdTTOSCdKx6GW3j2VraNQ_p0 Message-ID: Subject: Re: svn commit: r323923 - in head: lib/libufs sbin/dumpfs sbin/fsck_ffs sbin/fsdb sbin/newfs sys/kern sys/libkern sys/sys sys/ufs/ffs To: Kirk McKusick 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, 22 Sep 2017 13:37:57 -0000 )On 22 September 2017 at 14:45, Kirk McKusick wrote: > Author: mckusick > Date: Fri Sep 22 12:45:15 2017 > New Revision: 323923 > URL: https://svnweb.freebsd.org/changeset/base/323923 > > Log: > Continuing efforts to provide hardening of FFS, this change adds a i386 and others are broken after this change (from https://ci.freebsd.org/job/FreeBSD-head-i386-build/4050/console): 13:25:09 /usr/src/sys/ufs/ffs/ffs_alloc.c:2619:27: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] 13:25:09 cg, cgp->cg_ckhash, bp->b_ckhash); 13:25:09 ^~~~~~~~~~~~ From owner-svn-src-all@freebsd.org Fri Sep 22 14:34: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 59685E2AE07; Fri, 22 Sep 2017 14:34:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2429F6E59A; Fri, 22 Sep 2017 14:34:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MEYSdd089237; Fri, 22 Sep 2017 14:34:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MEYS6Q089236; Fri, 22 Sep 2017 14:34:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709221434.v8MEYS6Q089236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Sep 2017 14:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323924 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 323924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 14:34:29 -0000 Author: gjb Date: Fri Sep 22 14:34:27 2017 New Revision: 323924 URL: https://svnweb.freebsd.org/changeset/base/323924 Log: Revert r323812 from release/tools/arm.subr, which has broken the build on arm/armv6 images. Pointyhat: gjb (myself) MFC after: immediate MFC note: releng/10.4 has broken because of this Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Fri Sep 22 12:45:15 2017 (r323923) +++ head/release/tools/arm.subr Fri Sep 22 14:34:27 2017 (r323924) @@ -99,16 +99,6 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution - - # Bootstrap etcupdate(8) and mergemaster(8) databases. - mkdir -p ${DESTDIR}/var/db/etcupdate - etcupdate extract -B \ - -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate - sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ - -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -D ${DESTDIR} - chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user From owner-svn-src-all@freebsd.org Fri Sep 22 14:40: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 E82C9E0001E; Fri, 22 Sep 2017 14:40:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3ED86E7D4; Fri, 22 Sep 2017 14:40:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MEe46H089531; Fri, 22 Sep 2017 14:40:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MEe4Nr089530; Fri, 22 Sep 2017 14:40:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709221440.v8MEe4Nr089530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Sep 2017 14:40: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: r323925 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 323925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 14:40:06 -0000 Author: gjb Date: Fri Sep 22 14:40:04 2017 New Revision: 323925 URL: https://svnweb.freebsd.org/changeset/base/323925 Log: MFC r323924: Revert r323812 from release/tools/arm.subr, which has broken the build on arm/armv6 images. Pointyhat: gjb (myself) MFC note: releng/10.4 has broken because of this Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/arm.subr Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/arm.subr ============================================================================== --- stable/11/release/tools/arm.subr Fri Sep 22 14:34:27 2017 (r323924) +++ stable/11/release/tools/arm.subr Fri Sep 22 14:40:04 2017 (r323925) @@ -99,16 +99,6 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution - - # Bootstrap etcupdate(8) and mergemaster(8) databases. - mkdir -p ${DESTDIR}/var/db/etcupdate - etcupdate extract -B \ - -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate - sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ - -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -D ${DESTDIR} - chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user From owner-svn-src-all@freebsd.org Fri Sep 22 14:40: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 C88FFE0001C; Fri, 22 Sep 2017 14:40:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951956E7D2; Fri, 22 Sep 2017 14:40:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MEe4CA089525; Fri, 22 Sep 2017 14:40:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MEe4dm089524; Fri, 22 Sep 2017 14:40:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709221440.v8MEe4dm089524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Sep 2017 14:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323925 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/tools 11/release/tools X-SVN-Commit-Revision: 323925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 14:40:05 -0000 Author: gjb Date: Fri Sep 22 14:40:04 2017 New Revision: 323925 URL: https://svnweb.freebsd.org/changeset/base/323925 Log: MFC r323924: Revert r323812 from release/tools/arm.subr, which has broken the build on arm/armv6 images. Pointyhat: gjb (myself) MFC note: releng/10.4 has broken because of this Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/arm.subr Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/arm.subr ============================================================================== --- stable/10/release/tools/arm.subr Fri Sep 22 14:34:27 2017 (r323924) +++ stable/10/release/tools/arm.subr Fri Sep 22 14:40:04 2017 (r323925) @@ -99,16 +99,6 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution - - # Bootstrap etcupdate(8) and mergemaster(8) databases. - mkdir -p ${DESTDIR}/var/db/etcupdate - etcupdate extract -B \ - -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate - sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ - -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -D ${DESTDIR} - chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user From owner-svn-src-all@freebsd.org Fri Sep 22 14:42: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 69482E00488; Fri, 22 Sep 2017 14:42:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yw0-f182.google.com (mail-yw0-f182.google.com [209.85.161.182]) (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 2E20C6ED15; Fri, 22 Sep 2017 14:42:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yw0-f182.google.com with SMTP id v72so886624ywa.3; Fri, 22 Sep 2017 07:42:19 -0700 (PDT) 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=DtgvmPKGkj+iwcVa0M3bvihXuZzAY/p6VPm4ou5+8N4=; b=kfb+S3pcsngw9FGA/ZN3TNrUyQJnb1arg5gKrIpoyylcMUOMYhUtdfCWFFmnyPmvD6 22l/rC2w8yc4gnYg9iLiQut9O8vmtrcLjTWavg+A/sW5JGq7At4ePkLXgWlCCGRn1KGJ 14XefmnoFZKwJqFBvtM1GgPSUYTBs6e1ed9WrJjxkr45kQeQsDCyKwoKkIAI9NgoH0Vd UrCimjfbSmpWkgeaCZYKQOp8l81jP9IyPf4MtuD3eucFq5R6IAAF+FZum94ObkVMCiTN jkaFFC1jlx17HcfOvbg1ItX1x5RrsRUrfzuPrEr9fW5+rR2MBJSJsTMT72cZbyXGd8US jVTQ== X-Gm-Message-State: AHPjjUinl53sD1EKl/Byr2IDLd+hyKS4pSS1I/zB74T1PLiFzYhXNZK+ c1WtBjRCajyoVnGMQc/Mm4WX0Ftu X-Received: by 10.13.235.197 with SMTP id u188mr3787530ywe.349.1506090859608; Fri, 22 Sep 2017 07:34:19 -0700 (PDT) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com. [209.85.223.181]) by smtp.gmail.com with ESMTPSA id p125sm1509759ywb.29.2017.09.22.07.34.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 07:34:19 -0700 (PDT) Received: by mail-io0-f181.google.com with SMTP id g32so3489747ioj.2; Fri, 22 Sep 2017 07:34:19 -0700 (PDT) X-Google-Smtp-Source: AOwi7QClKTzWbVUPznc9ts098PKAW5Ljwh83VnuwzCWPaImyetB9S8bDX+QfsSwQkfFfE/LsAegzD329b7pkRVjJ5IE= X-Received: by 10.107.97.5 with SMTP id v5mr8803452iob.68.1506090858862; Fri, 22 Sep 2017 07:34:18 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.137.79 with HTTP; Fri, 22 Sep 2017 07:34:18 -0700 (PDT) In-Reply-To: <201709221245.v8MCjFPv043387@repo.freebsd.org> References: <201709221245.v8MCjFPv043387@repo.freebsd.org> From: Conrad Meyer Date: Fri, 22 Sep 2017 07:34:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323923 - in head: lib/libufs sbin/dumpfs sbin/fsck_ffs sbin/fsdb sbin/newfs sys/kern sys/libkern sys/sys sys/ufs/ffs To: Kirk McKusick 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: Fri, 22 Sep 2017 14:42:20 -0000 On Fri, Sep 22, 2017 at 5:45 AM, Kirk McKusick wrote: > Author: mckusick > Date: Fri Sep 22 12:45:15 2017 > New Revision: 323923 > URL: https://svnweb.freebsd.org/changeset/base/323923 > > Log: > Continuing efforts to provide hardening of FFS, this change adds a > check hash to cylinder groups. If a check hash fails when a cylinder > group is read, no further allocations are attempted in that cylinder > group until it has been fixed by fsck. This avoids a class of > filesystem panics related to corrupted cylinder group maps. The > hash is done using crc32c. > > ... > > Modified: head/sys/libkern/crc32.c > ============================================================================== > --- head/sys/libkern/crc32.c Fri Sep 22 12:07:03 2017 (r323922) > +++ head/sys/libkern/crc32.c Fri Sep 22 12:45:15 2017 (r323923) > @@ -759,6 +762,7 @@ calculate_crc32c(uint32_t crc32c, > const unsigned char *buffer, > unsigned int length) > { > +#ifdef _KERNEL > #if defined(__amd64__) || defined(__i386__) > if ((cpu_feature2 & CPUID2_SSE42) != 0) { > return (sse42_crc32c(crc32c, buffer, length)); > @@ -776,6 +780,7 @@ calculate_crc32c(uint32_t crc32c, > return (armv8_crc32c(crc32c, buffer, length)); > } else > #endif > +#endif /* _KERNEL */ > if (length < 4) { > return (singletable_crc32c(crc32c, buffer, length)); > } else { Userspace x86 ought to be able to use the SSE-enhanced implementation, too. It will just need a cpuid check, and can skip the FPU context manipulation. Best, Conrad From owner-svn-src-all@freebsd.org Fri Sep 22 14:56: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 B9AD7E00AF1; Fri, 22 Sep 2017 14:56:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88EC76F2EF; Fri, 22 Sep 2017 14:56:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MEuhrO097852; Fri, 22 Sep 2017 14:56:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MEuhJT097851; Fri, 22 Sep 2017 14:56:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201709221456.v8MEuhJT097851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Sep 2017 14:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323926 - releng/10.4/release/tools X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/10.4/release/tools X-SVN-Commit-Revision: 323926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 14:56:44 -0000 Author: gjb Date: Fri Sep 22 14:56:43 2017 New Revision: 323926 URL: https://svnweb.freebsd.org/changeset/base/323926 Log: MFS10 r323925: MFC r323924: Revert r323812 from release/tools/arm.subr, which has broken the build on arm/armv6 images. Pointyhat: gjb (myself) Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/tools/arm.subr Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/release/tools/arm.subr ============================================================================== --- releng/10.4/release/tools/arm.subr Fri Sep 22 14:40:04 2017 (r323925) +++ releng/10.4/release/tools/arm.subr Fri Sep 22 14:56:43 2017 (r323926) @@ -99,16 +99,6 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution - - # Bootstrap etcupdate(8) and mergemaster(8) databases. - mkdir -p ${DESTDIR}/var/db/etcupdate - etcupdate extract -B \ - -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate - sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ - -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ - -D ${DESTDIR} - chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user From owner-svn-src-all@freebsd.org Fri Sep 22 15:27: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 AA767E01C8D; Fri, 22 Sep 2017 15:27:03 +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 7730E70586; Fri, 22 Sep 2017 15:27:03 +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 v8MFR25S010861; Fri, 22 Sep 2017 15:27:02 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFR2fW010860; Fri, 22 Sep 2017 15:27:02 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709221527.v8MFR2fW010860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 22 Sep 2017 15:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323927 - releng/10.4/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/sys/conf X-SVN-Commit-Revision: 323927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:27:03 -0000 Author: marius Date: Fri Sep 22 15:27:02 2017 New Revision: 323927 URL: https://svnweb.freebsd.org/changeset/base/323927 Log: Revert releng/10.4 to RC1 again. Approved by: re (implicit) Modified: releng/10.4/sys/conf/newvers.sh Modified: releng/10.4/sys/conf/newvers.sh ============================================================================== --- releng/10.4/sys/conf/newvers.sh Fri Sep 22 14:56:43 2017 (r323926) +++ releng/10.4/sys/conf/newvers.sh Fri Sep 22 15:27:02 2017 (r323927) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.4" -BRANCH="RC2" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Sep 22 15:27: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 C4F66E01D41; Fri, 22 Sep 2017 15:27:51 +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 91D60706C8; Fri, 22 Sep 2017 15:27:51 +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 v8MFRooB010926; Fri, 22 Sep 2017 15:27:50 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFRo5I010925; Fri, 22 Sep 2017 15:27:50 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709221527.v8MFRo5I010925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 22 Sep 2017 15:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323928 - releng/10.4/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: marius X-SVN-Commit-Paths: releng/10.4/sys/conf X-SVN-Commit-Revision: 323928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:27:51 -0000 Author: marius Date: Fri Sep 22 15:27:50 2017 New Revision: 323928 URL: https://svnweb.freebsd.org/changeset/base/323928 Log: Update releng/10.4 to RC2 again so the revision of sys/conf/newvers.sh will reflect the (hopefully) final 10.4-RC2 builds. Approved by: re (implicit) Modified: releng/10.4/sys/conf/newvers.sh Modified: releng/10.4/sys/conf/newvers.sh ============================================================================== --- releng/10.4/sys/conf/newvers.sh Fri Sep 22 15:27:02 2017 (r323927) +++ releng/10.4/sys/conf/newvers.sh Fri Sep 22 15:27:50 2017 (r323928) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.4" -BRANCH="RC1" +BRANCH="RC2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Sep 22 15:40: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 17ABBE02396; Fri, 22 Sep 2017 15:40:58 +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 E568C70DD9; Fri, 22 Sep 2017 15:40:57 +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 v8MFeuwx016218; Fri, 22 Sep 2017 15:40:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFeuxS016212; Fri, 22 Sep 2017 15:40:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709221540.v8MFeuxS016212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 22 Sep 2017 15:40: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: r323929 - in stable/11/sys/modules/i2c: ds1307 ds13rtc ds3231 isl12xx nxprtc s35390a X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys/modules/i2c: ds1307 ds13rtc ds3231 isl12xx nxprtc s35390a X-SVN-Commit-Revision: 323929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:40:58 -0000 Author: ian Date: Fri Sep 22 15:40:56 2017 New Revision: 323929 URL: https://svnweb.freebsd.org/changeset/base/323929 Log: MFC r323642: Add a missing header file to SRCS to fix out-of-kernel builds. PR: 222354 Submitted by: eugen@ Pointy hat: ian@ Modified: stable/11/sys/modules/i2c/ds1307/Makefile stable/11/sys/modules/i2c/ds13rtc/Makefile stable/11/sys/modules/i2c/ds3231/Makefile stable/11/sys/modules/i2c/isl12xx/Makefile stable/11/sys/modules/i2c/nxprtc/Makefile stable/11/sys/modules/i2c/s35390a/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/i2c/ds1307/Makefile ============================================================================== --- stable/11/sys/modules/i2c/ds1307/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/ds1307/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds1307 -SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/ds13rtc/Makefile ============================================================================== --- stable/11/sys/modules/i2c/ds13rtc/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/ds13rtc/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds13rtc -SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/ds3231/Makefile ============================================================================== --- stable/11/sys/modules/i2c/ds3231/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/ds3231/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds3231 -SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/isl12xx/Makefile ============================================================================== --- stable/11/sys/modules/i2c/isl12xx/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/isl12xx/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = isl12xx -SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/nxprtc/Makefile ============================================================================== --- stable/11/sys/modules/i2c/nxprtc/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/nxprtc/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = nxprtc -SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include Modified: stable/11/sys/modules/i2c/s35390a/Makefile ============================================================================== --- stable/11/sys/modules/i2c/s35390a/Makefile Fri Sep 22 15:27:50 2017 (r323928) +++ stable/11/sys/modules/i2c/s35390a/Makefile Fri Sep 22 15:40:56 2017 (r323929) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = s35390a -SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h +SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h .include From owner-svn-src-all@freebsd.org Fri Sep 22 15:47: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 4E83DE026D4; Fri, 22 Sep 2017 15:47:37 +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 2AC0671276; Fri, 22 Sep 2017 15:47:37 +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 v8MFlaMM019385; Fri, 22 Sep 2017 15:47:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFlauh019384; Fri, 22 Sep 2017 15:47:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709221547.v8MFlauh019384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 22 Sep 2017 15:47: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: r323930 - stable/11/usr.sbin/i2c X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/usr.sbin/i2c X-SVN-Commit-Revision: 323930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:47:37 -0000 Author: ian Date: Fri Sep 22 15:47:35 2017 New Revision: 323930 URL: https://svnweb.freebsd.org/changeset/base/323930 Log: MFC r323465: Make i2c -s (device scan) work on hardware that supports only full xfers. The existing scan code is based on sending an i2c START condition and if there is no error it assumes there is a device at that i2c address. Some i2c controllers don't support sending individual start/stop signals on the bus, they can only perform complete data transfers with start/stop handled in the silicon. This adds a fallback mechanism that attempts to read a single byte from each i2c address. It's less reliable than looking for an an ACK repsonse to a start, because some devices will NAK an attempt to read that isn't preceeded by a write of a register address. Writing to devices to probe them is too dangerous to even consider. The user is told that a less-reliable scan is being done, so even if the read-scan comes up empty too, it's still a vast improvement over the old situation where it would just claim there were no devices on the bus even though the devices were there and working fine. If the i2c controller responds with a proper ENODEV (device doesn't support operation) or an almost-proper EOPNOTSUPP, the START/STOP scan is switched to a read-scan right away. Most controllers respond with ENXIO or EIO if they don't support START/STOP, so no quick-out is available. For those, if a scan of all 127 addresses and come up empty, the scan is re-done using the read method. Reported by: Maxim Filimonov Modified: stable/11/usr.sbin/i2c/i2c.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/i2c/i2c.c ============================================================================== --- stable/11/usr.sbin/i2c/i2c.c Fri Sep 22 15:40:56 2017 (r323929) +++ stable/11/usr.sbin/i2c/i2c.c Fri Sep 22 15:47:35 2017 (r323930) @@ -121,9 +121,12 @@ skip_get_tokens(char *skip_addr, int *sk_addr, int max static int scan_bus(struct iiccmd cmd, char *dev, int skip, char *skip_addr) { + struct iic_msg rdmsg; + struct iic_rdwr_data rdwrdata; struct skip_range addr_range = { 0, 0 }; int *tokens, fd, error, i, index, j; - int len = 0, do_skip = 0, no_range = 1; + int len = 0, do_skip = 0, no_range = 1, num_found = 0, use_read_xfer = 0; + uint8_t rdbyte; fd = open(dev, O_RDWR); if (fd == -1) { @@ -157,6 +160,14 @@ scan_bus(struct iiccmd cmd, char *dev, int skip, char } printf("Scanning I2C devices on %s: ", dev); + +start_over: + if (use_read_xfer) { + fprintf(stderr, + "Hardware may not support START/STOP scanning; " + "trying less-reliable read method.\n"); + } + for (i = 1; i < 127; i++) { if (skip && ( addr_range.start < addr_range.end)) { @@ -180,17 +191,46 @@ scan_bus(struct iiccmd cmd, char *dev, int skip, char cmd.last = 1; cmd.count = 0; error = ioctl(fd, I2CRSTCARD, &cmd); - if (error) + if (error) { + fprintf(stderr, "Controller reset failed\n"); goto out; - - cmd.slave = i << 1; - cmd.last = 1; - error = ioctl(fd, I2CSTART, &cmd); - if (!error) - printf("%x ", i); - cmd.slave = i << 1; - cmd.last = 1; - error = ioctl(fd, I2CSTOP, &cmd); + } + if (use_read_xfer) { + rdmsg.buf = &rdbyte; + rdmsg.len = 1; + rdmsg.flags = IIC_M_RD; + rdmsg.slave = i << 1; + rdwrdata.msgs = &rdmsg; + rdwrdata.nmsgs = 1; + error = ioctl(fd, I2CRDWR, &rdwrdata); + } else { + cmd.slave = i << 1; + cmd.last = 1; + error = ioctl(fd, I2CSTART, &cmd); + if (errno == ENODEV || errno == EOPNOTSUPP) { + /* If START not supported try reading. */ + use_read_xfer = 1; + goto start_over; + } + cmd.slave = i << 1; + cmd.last = 1; + ioctl(fd, I2CSTOP, &cmd); + } + if (error == 0) { + ++num_found; + printf("%02x ", i); + } + } + /* + * If we found nothing, maybe START is not supported and returns a + * generic error code such as EIO or ENXIO, so try again using reads. + */ + if (num_found == 0) { + if (!use_read_xfer) { + use_read_xfer = 1; + goto start_over; + } + printf(""); } printf("\n"); From owner-svn-src-all@freebsd.org Fri Sep 22 15:53: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 2855FE02F59; Fri, 22 Sep 2017 15:53:24 +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 042B871DC0; Fri, 22 Sep 2017 15:53:23 +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 v8MFrNkV024285; Fri, 22 Sep 2017 15:53:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MFrM6J024277; Fri, 22 Sep 2017 15:53:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201709221553.v8MFrM6J024277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 22 Sep 2017 15:53: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: r323931 - in stable/11/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/glxiic dev/iicbus modules/i2c modules/i2c/icee X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys: arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/glxiic dev/iicbus modules/i2c modules/i2c/icee X-SVN-Commit-Revision: 323931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 15:53:24 -0000 Author: ian Date: Fri Sep 22 15:53:22 2017 New Revision: 323931 URL: https://svnweb.freebsd.org/changeset/base/323931 Log: MFC r323474, r323553, r323691 r323474: Add a default implementation that returns ENODEV for start, repeat_start, stop, read, and write methods. Some controllers don't implement these individual operations and have only a transfer method. In that case, we should return an indication that the device is present but doesn't support the method, as opposed to the kobj default error ENXIO which makes it look like the whole device is missing. Userland tools such as i2c(8) can use the differing return values to switch between the two different i2c IO mechanisms. r323553: Defer attaching and probing iicbus and its children until interrupts are available, in i2c controller drivers that require interrupts for transfers. This is the result of auditing all 22 existing drivers that attach iicbus. These drivers were the only ones remaining that require interrupts and were not using config_intrhook to defer attachment. That has led, over the years, to various i2c slave device drivers needing to use config_intrhook themselves rather than performing bus transactions in their probe() and attach() methods, just in case they were attached too early. r323691: Give icee(4) a detach() method so it can be used as a module. Add a module makefile for it. Added: stable/11/sys/modules/i2c/icee/ - copied from r323691, head/sys/modules/i2c/icee/ Modified: stable/11/sys/arm/at91/at91_twi.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/11/sys/arm/freescale/imx/imx_i2c.c stable/11/sys/arm/ti/ti_i2c.c stable/11/sys/dev/glxiic/glxiic.c stable/11/sys/dev/iicbus/icee.c stable/11/sys/dev/iicbus/iicbus_if.m stable/11/sys/modules/i2c/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/at91/at91_twi.c ============================================================================== --- stable/11/sys/arm/at91/at91_twi.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/at91/at91_twi.c Fri Sep 22 15:53:22 2017 (r323931) @@ -161,8 +161,8 @@ at91_twi_attach(device_t dev) if ((sc->iicbus = device_add_child(dev, "iicbus", -1)) == NULL) device_printf(dev, "could not allocate iicbus instance\n"); - /* probe and attach the iicbus */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); out: if (err) at91_twi_deactivate(dev); Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Fri Sep 22 15:53:22 2017 (r323931) @@ -308,7 +308,10 @@ bcm_bsc_attach(device_t dev) return (ENXIO); } - return (bus_generic_attach(dev)); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + + return (0); } static int Modified: stable/11/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- stable/11/sys/arm/freescale/imx/imx_i2c.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/freescale/imx/imx_i2c.c Fri Sep 22 15:53:22 2017 (r323931) @@ -444,7 +444,8 @@ no_recovery: /* We don't do a hardware reset here because iicbus_attach() does it. */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); return (0); } Modified: stable/11/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/11/sys/arm/ti/ti_i2c.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/arm/ti/ti_i2c.c Fri Sep 22 15:53:22 2017 (r323931) @@ -37,11 +37,6 @@ * incorporate that sometime in the future. The idea being that for transaction * larger than a certain size the DMA engine is used, for anything less the * normal interrupt/fifo driven option is used. - * - * - * WARNING: This driver uses mtx_sleep and interrupts to perform transactions, - * which means you can't do a transaction during startup before the interrupts - * have been enabled. Hint - the freebsd function config_intrhook_establish(). */ #include @@ -909,8 +904,8 @@ ti_i2c_attach(device_t dev) goto out; } - /* Probe and attach the iicbus */ - bus_generic_attach(dev); + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); out: if (err) { Modified: stable/11/sys/dev/glxiic/glxiic.c ============================================================================== --- stable/11/sys/dev/glxiic/glxiic.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/dev/glxiic/glxiic.c Fri Sep 22 15:53:22 2017 (r323931) @@ -408,11 +408,10 @@ glxiic_attach(device_t dev) glxiic_gpio_enable(sc); glxiic_smb_enable(sc, IIC_FASTEST, 0); - error = bus_generic_attach(dev); - if (error != 0) { - device_printf(dev, "Could not probe and attach children\n"); - error = ENXIO; - } + /* Probe and attach the iicbus when interrupts are available. */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + error = 0; + out: if (error != 0) { callout_drain(&sc->callout); Modified: stable/11/sys/dev/iicbus/icee.c ============================================================================== --- stable/11/sys/dev/iicbus/icee.c Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/dev/iicbus/icee.c Fri Sep 22 15:53:22 2017 (r323931) @@ -206,17 +206,34 @@ icee_attach(device_t dev) return (0); } +static int +icee_detach(device_t dev) +{ + struct icee_softc *sc = device_get_softc(dev); + + destroy_dev(sc->cdev); + return (0); +} + static int icee_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { + struct icee_softc *sc; + sc = CDEV2SOFTC(dev); + if (device_get_state(sc->dev) < DS_BUSY) + device_busy(sc->dev); + return (0); } static int icee_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { + struct icee_softc *sc; + sc = CDEV2SOFTC(dev); + device_unbusy(sc->dev); return (0); } @@ -345,6 +362,7 @@ icee_write(struct cdev *dev, struct uio *uio, int iofl static device_method_t icee_methods[] = { DEVMETHOD(device_probe, icee_probe), DEVMETHOD(device_attach, icee_attach), + DEVMETHOD(device_detach, icee_detach), DEVMETHOD_END }; Modified: stable/11/sys/dev/iicbus/iicbus_if.m ============================================================================== --- stable/11/sys/dev/iicbus/iicbus_if.m Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/dev/iicbus/iicbus_if.m Fri Sep 22 15:53:22 2017 (r323931) @@ -32,6 +32,12 @@ INTERFACE iicbus; CODE { + static int iicbus_nosupport(void) + { + + return (ENODEV); + } + static u_int iicbus_default_frequency(device_t bus, u_char speed) { @@ -69,7 +75,7 @@ METHOD int repeated_start { device_t dev; u_char slave; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Send START condition @@ -78,14 +84,14 @@ METHOD int start { device_t dev; u_char slave; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Send STOP condition # METHOD int stop { device_t dev; -}; +} DEFAULT iicbus_nosupport; # # Read from I2C bus @@ -97,7 +103,7 @@ METHOD int read { int *bytes; int last; int delay; -}; +} DEFAULT iicbus_nosupport; # # Write to the I2C bus @@ -108,7 +114,7 @@ METHOD int write { int len; int *bytes; int timeout; -}; +} DEFAULT iicbus_nosupport; # # Reset I2C bus Modified: stable/11/sys/modules/i2c/Makefile ============================================================================== --- stable/11/sys/modules/i2c/Makefile Fri Sep 22 15:47:35 2017 (r323930) +++ stable/11/sys/modules/i2c/Makefile Fri Sep 22 15:53:22 2017 (r323931) @@ -6,6 +6,7 @@ SUBDIR = \ ds1307 \ ds13rtc \ ds3231 \ + icee \ if_ic \ iic \ iicbb \ From owner-svn-src-all@freebsd.org Fri Sep 22 16:42:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06D30E04A94; Fri, 22 Sep 2017 16:42: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 C22B1735C4; Fri, 22 Sep 2017 16:42: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 v8MGgf55044748; Fri, 22 Sep 2017 16:42:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MGgf0f044747; Fri, 22 Sep 2017 16:42:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709221642.v8MGgf0f044747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Sep 2017 16:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323932 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 323932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 16:42:43 -0000 Author: kib Date: Fri Sep 22 16:42:41 2017 New Revision: 323932 URL: https://svnweb.freebsd.org/changeset/base/323932 Log: Fix 32bit build. Reported by: emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Sep 22 15:53:22 2017 (r323931) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Sep 22 16:42:41 2017 (r323932) @@ -2615,8 +2615,8 @@ ffs_getcg(fs, devvp, cg, bpp, cgpp) (bp->b_flags & B_CKHASH) != 0 && cgp->cg_ckhash != bp->b_ckhash) || !cg_chkmagic(cgp) || cgp->cg_cgx != cg) { - printf("checksum failed: cg %u, cgp: 0x%x != bp: 0x%lx\n", - cg, cgp->cg_ckhash, bp->b_ckhash); + printf("checksum failed: cg %u, cgp: 0x%x != bp: 0x%jx\n", + cg, cgp->cg_ckhash, (uintmax_t)bp->b_ckhash); bp->b_flags &= ~B_CKHASH; bp->b_flags |= B_INVAL | B_NOCACHE; brelse(bp); From owner-svn-src-all@freebsd.org Fri Sep 22 17:57:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBB95E06D31; Fri, 22 Sep 2017 17:57:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF0B751BC; Fri, 22 Sep 2017 17:57:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MHvcua073676; Fri, 22 Sep 2017 17:57:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MHvcxS073675; Fri, 22 Sep 2017 17:57:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709221757.v8MHvcxS073675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 Sep 2017 17:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323933 - head/sys/arm/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/arm/include X-SVN-Commit-Revision: 323933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 17:57:39 -0000 Author: jhb Date: Fri Sep 22 17:57:38 2017 New Revision: 323933 URL: https://svnweb.freebsd.org/changeset/base/323933 Log: Correct HWCAP_VFP3* values to match Linux. Reviewed by: andrew, ian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12388 Modified: head/sys/arm/include/elf.h Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Fri Sep 22 16:42:41 2017 (r323932) +++ head/sys/arm/include/elf.h Fri Sep 22 17:57:38 2017 (r323933) @@ -117,8 +117,8 @@ __ElfType(Auxinfo); /* Flags passed in AT_HWCAP. */ #define HWCAP_VFP 0x00000040 -#define HWCAP_VFPv3 0x00000200 -#define HWCAP_VFPv3D16 0x00000400 +#define HWCAP_VFPv3 0x00002000 +#define HWCAP_VFPv3D16 0x00004000 #define HWCAP_VFPD32 0x00080000 #endif /* !_MACHINE_ELF_H_ */ From owner-svn-src-all@freebsd.org Fri Sep 22 17:58: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 95241E06E56; Fri, 22 Sep 2017 17:58:58 +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 62F7575343; Fri, 22 Sep 2017 17:58:58 +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 v8MHwv9p073762; Fri, 22 Sep 2017 17:58:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MHwvpa073759; Fri, 22 Sep 2017 17:58:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709221758.v8MHwvpa073759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 Sep 2017 17:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323934 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 323934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 17:58:58 -0000 Author: jhb Date: Fri Sep 22 17:58:57 2017 New Revision: 323934 URL: https://svnweb.freebsd.org/changeset/base/323934 Log: Detect NEON and set HWCAP_NEON if present. Reviewed by: andrew, ian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12389 Modified: head/sys/arm/arm/vfp.c head/sys/arm/include/elf.h Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Fri Sep 22 17:57:38 2017 (r323933) +++ head/sys/arm/arm/vfp.c Fri Sep 22 17:58:57 2017 (r323934) @@ -144,6 +144,11 @@ vfp_init(void) initial_fpscr; } } + + if ((tmp & VMVFR1_LS_MASK) >> VMVFR1_LS_OFF == 1 && + (tmp & VMVFR1_I_MASK) >> VMVFR1_I_OFF == 1 && + (tmp & VMVFR1_SP_MASK) >> VMVFR1_SP_OFF == 1) + elf_hwcap |= HWCAP_NEON; } /* initialize the coprocess 10 and 11 calls Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Fri Sep 22 17:57:38 2017 (r323933) +++ head/sys/arm/include/elf.h Fri Sep 22 17:58:57 2017 (r323934) @@ -117,6 +117,7 @@ __ElfType(Auxinfo); /* Flags passed in AT_HWCAP. */ #define HWCAP_VFP 0x00000040 +#define HWCAP_NEON 0x00001000 #define HWCAP_VFPv3 0x00002000 #define HWCAP_VFPv3D16 0x00004000 #define HWCAP_VFPD32 0x00080000 From owner-svn-src-all@freebsd.org Fri Sep 22 20:01: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 D0FEEE0C182; Fri, 22 Sep 2017 20:01:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB9397C8E5; Fri, 22 Sep 2017 20:01:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MK1CkJ023642; Fri, 22 Sep 2017 20:01:12 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MK1CdR023641; Fri, 22 Sep 2017 20:01:12 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709222001.v8MK1CdR023641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 22 Sep 2017 20:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323935 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 20:01:13 -0000 Author: cem Date: Fri Sep 22 20:01:12 2017 New Revision: 323935 URL: https://svnweb.freebsd.org/changeset/base/323935 Log: ddb(4): Add 'show badstacks' command to show witness badstacks Add a DDB command that mirrors sysctl debug.witness.badstacks. Reported by: rstone Reviewed by: rstone Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12468 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Fri Sep 22 17:58:57 2017 (r323934) +++ head/sys/kern/subr_witness.c Fri Sep 22 20:01:12 2017 (r323935) @@ -2539,31 +2539,18 @@ DB_SHOW_COMMAND(witness, db_witness_display) } #endif -static int -sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS) +static void +sbuf_print_witness_badstacks(struct sbuf *sb) { struct witness_lock_order_data *data1, *data2, *tmp_data1, *tmp_data2; struct witness *tmp_w1, *tmp_w2, *w1, *w2; - struct sbuf *sb; u_int w_rmatrix1, w_rmatrix2; - int error, generation, i, j; + int generation, i, j; tmp_data1 = NULL; tmp_data2 = NULL; tmp_w1 = NULL; tmp_w2 = NULL; - if (witness_watch < 1) { - error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); - return (error); - } - if (witness_cold) { - error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); - return (error); - } - error = 0; - sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND); - if (sb == NULL) - return (ENOMEM); /* Allocate and init temporary storage space. */ tmp_w1 = malloc(sizeof(struct witness), M_TEMP, M_WAITOK | M_ZERO); @@ -2683,13 +2670,55 @@ restart: free(tmp_data2, M_TEMP); free(tmp_w1, M_TEMP); free(tmp_w2, M_TEMP); +} +static int +sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS) +{ + struct sbuf *sb; + int error; + + if (witness_watch < 1) { + error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); + return (error); + } + if (witness_cold) { + error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); + return (error); + } + error = 0; + sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND); + if (sb == NULL) + return (ENOMEM); + + sbuf_print_witness_badstacks(sb); + sbuf_finish(sb); error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (error); } + +#ifdef DDB +static int +sbuf_db_printf_drain(void *arg __unused, const char *data, int len) +{ + + return (db_printf("%.*s", len, data)); +} + +DB_SHOW_COMMAND(badstacks, db_witness_badstacks) +{ + struct sbuf sb; + char buffer[128]; + + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + sbuf_set_drain(&sb, sbuf_db_printf_drain, NULL); + sbuf_print_witness_badstacks(&sb); + sbuf_finish(&sb); +} +#endif static int sysctl_debug_witness_channel(SYSCTL_HANDLER_ARGS) From owner-svn-src-all@freebsd.org Sat Sep 23 01: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 68536E1BF10; Sat, 23 Sep 2017 01:33:22 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 448A815D6; Sat, 23 Sep 2017 01:33:22 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8N1XLto063112; Sat, 23 Sep 2017 01:33:21 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8N1XK8E063109; Sat, 23 Sep 2017 01:33:20 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709230133.v8N1XK8E063109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 23 Sep 2017 01:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323941 - in head/sys: dev/e1000 net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/sys: dev/e1000 net X-SVN-Commit-Revision: 323941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 01:33:22 -0000 Author: shurd Date: Sat Sep 23 01:33:20 2017 New Revision: 323941 URL: https://svnweb.freebsd.org/changeset/base/323941 Log: Some small packet performance improvements If the packet is smaller than MTU, disable the TSO flags. Move TCP header parsing inside the IS_TSO?() test. Add a new IFLIB_NEED_ZERO_CSUM flag to indicate the checksums need to be zeroed before TX. Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12442 Modified: head/sys/dev/e1000/if_em.c head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Sep 22 22:19:56 2017 (r323940) +++ head/sys/dev/e1000/if_em.c Sat Sep 23 01:33:20 2017 (r323941) @@ -483,7 +483,7 @@ static struct if_shared_ctx em_sctx_init = { .isc_vendor_info = em_vendor_info_array, .isc_driver_version = em_driver_version, .isc_driver = &em_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP, + .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, @@ -511,7 +511,7 @@ static struct if_shared_ctx igb_sctx_init = { .isc_vendor_info = igb_vendor_info_array, .isc_driver_version = em_driver_version, .isc_driver = &em_if_driver, - .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP, + .isc_flags = IFLIB_NEED_SCRATCH | IFLIB_TSO_INIT_IP | IFLIB_NEED_ZERO_CSUM, .isc_nrxd_min = {EM_MIN_RXD}, .isc_ntxd_min = {EM_MIN_TXD}, Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Sep 22 22:19:56 2017 (r323940) +++ head/sys/net/iflib.c Sat Sep 23 01:33:20 2017 (r323941) @@ -2696,6 +2696,10 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, pi->ipi_ehdrlen = ETHER_HDR_LEN; } + if (if_getmtu(txq->ift_ctx->ifc_ifp) >= pi->ipi_len) { + pi->ipi_csum_flags &= ~(CSUM_IP_TSO|CSUM_IP6_TSO); + } + switch (pi->ipi_etype) { #ifdef INET case ETHERTYPE_IP: @@ -2740,21 +2744,21 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, pi->ipi_ipproto = ip->ip_p; pi->ipi_flags |= IPI_TX_IPV4; - if (pi->ipi_csum_flags & CSUM_IP) + if ((sctx->isc_flags & IFLIB_NEED_ZERO_CSUM) && (pi->ipi_csum_flags & CSUM_IP)) ip->ip_sum = 0; - if (pi->ipi_ipproto == IPPROTO_TCP) { - if (__predict_false(th == NULL)) { - txq->ift_pullups++; - if (__predict_false((m = m_pullup(m, (ip->ip_hl << 2) + sizeof(*th))) == NULL)) - return (ENOMEM); - th = (struct tcphdr *)((caddr_t)ip + pi->ipi_ip_hlen); - } - pi->ipi_tcp_hflags = th->th_flags; - pi->ipi_tcp_hlen = th->th_off << 2; - pi->ipi_tcp_seq = th->th_seq; - } if (IS_TSO4(pi)) { + if (pi->ipi_ipproto == IPPROTO_TCP) { + if (__predict_false(th == NULL)) { + txq->ift_pullups++; + if (__predict_false((m = m_pullup(m, (ip->ip_hl << 2) + sizeof(*th))) == NULL)) + return (ENOMEM); + th = (struct tcphdr *)((caddr_t)ip + pi->ipi_ip_hlen); + } + pi->ipi_tcp_hflags = th->th_flags; + pi->ipi_tcp_hlen = th->th_off << 2; + pi->ipi_tcp_seq = th->th_seq; + } if (__predict_false(ip->ip_p != IPPROTO_TCP)) return (ENXIO); th->th_sum = in_pseudo(ip->ip_src.s_addr, @@ -2785,15 +2789,15 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, pi->ipi_ipproto = ip6->ip6_nxt; pi->ipi_flags |= IPI_TX_IPV6; - if (pi->ipi_ipproto == IPPROTO_TCP) { - if (__predict_false(m->m_len < pi->ipi_ehdrlen + sizeof(struct ip6_hdr) + sizeof(struct tcphdr))) { - if (__predict_false((m = m_pullup(m, pi->ipi_ehdrlen + sizeof(struct ip6_hdr) + sizeof(struct tcphdr))) == NULL)) - return (ENOMEM); - } - pi->ipi_tcp_hflags = th->th_flags; - pi->ipi_tcp_hlen = th->th_off << 2; - } if (IS_TSO6(pi)) { + if (pi->ipi_ipproto == IPPROTO_TCP) { + if (__predict_false(m->m_len < pi->ipi_ehdrlen + sizeof(struct ip6_hdr) + sizeof(struct tcphdr))) { + if (__predict_false((m = m_pullup(m, pi->ipi_ehdrlen + sizeof(struct ip6_hdr) + sizeof(struct tcphdr))) == NULL)) + return (ENOMEM); + } + pi->ipi_tcp_hflags = th->th_flags; + pi->ipi_tcp_hlen = th->th_off << 2; + } if (__predict_false(ip6->ip6_nxt != IPPROTO_TCP)) return (ENXIO); Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Fri Sep 22 22:19:56 2017 (r323940) +++ head/sys/net/iflib.h Sat Sep 23 01:33:20 2017 (r323941) @@ -305,6 +305,10 @@ typedef enum { * Interface doesn't align IP header */ #define IFLIB_DO_RX_FIXUP 0x40 +/* + * Driver needs csum zeroed for offloading + */ +#define IFLIB_NEED_ZERO_CSUM 0x80 From owner-svn-src-all@freebsd.org Sat Sep 23 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 97E16E1C1FA; Sat, 23 Sep 2017 01:35:15 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65AF21816; Sat, 23 Sep 2017 01:35:15 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8N1ZExI063265; Sat, 23 Sep 2017 01:35:14 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8N1ZE6S063264; Sat, 23 Sep 2017 01:35:14 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709230135.v8N1ZE6S063264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 23 Sep 2017 01:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323942 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 01:35:15 -0000 Author: shurd Date: Sat Sep 23 01:35:14 2017 New Revision: 323942 URL: https://svnweb.freebsd.org/changeset/base/323942 Log: Chain mbufs before passing to if_input() Build a list of mbufs to pass to if_input() after LRO. Results in 12% small packet forwarding rate improvement. Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12444 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat Sep 23 01:33:20 2017 (r323941) +++ head/sys/net/iflib.c Sat Sep 23 01:35:14 2017 (r323942) @@ -2470,7 +2470,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) * XXX early demux data packets so that if_input processing only handles * acks in interrupt context */ - struct mbuf *m, *mh, *mt; + struct mbuf *m, *mh, *mt, *mf; ifp = ctx->ifc_ifp; mh = mt = NULL; @@ -2541,8 +2541,11 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) __iflib_fl_refill_lt(ctx, fl, budget + 8); lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); + mt = mf = NULL; while (mh != NULL) { m = mh; + if (mf == NULL) + mf = m; mh = mh->m_nextpkt; m->m_nextpkt = NULL; #ifndef __NO_STRICT_ALIGNMENT @@ -2552,11 +2555,19 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) rx_bytes += m->m_pkthdr.len; rx_pkts++; #if defined(INET6) || defined(INET) - if (lro_enabled && tcp_lro_rx(&rxq->ifr_lc, m, 0) == 0) + if (lro_enabled && tcp_lro_rx(&rxq->ifr_lc, m, 0) == 0) { + if (mf == m) + mf = NULL; continue; + } #endif + if (mt != NULL) + mt->m_nextpkt = m; + mt = m; + } + if (mf != NULL) { + ifp->if_input(ifp, mf); DBG_COUNTER_INC(rx_if_input); - ifp->if_input(ifp, m); } if_inc_counter(ifp, IFCOUNTER_IBYTES, rx_bytes); From owner-svn-src-all@freebsd.org Sat Sep 23 01:37: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 3E046E1C49A; Sat, 23 Sep 2017 01:37:02 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB841A3A; Sat, 23 Sep 2017 01:37:01 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8N1b16b063396; Sat, 23 Sep 2017 01:37:01 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8N1b1IK063395; Sat, 23 Sep 2017 01:37:01 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709230137.v8N1b1IK063395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 23 Sep 2017 01:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323943 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 01:37:02 -0000 Author: shurd Date: Sat Sep 23 01:37:01 2017 New Revision: 323943 URL: https://svnweb.freebsd.org/changeset/base/323943 Log: Make the rx budget a tunable This allows tuning the rx budget for special load profiles as well as more easily testing to determine sane defaults. Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12445 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat Sep 23 01:35:14 2017 (r323942) +++ head/sys/net/iflib.c Sat Sep 23 01:37:01 2017 (r323943) @@ -185,6 +185,7 @@ struct iflib_ctx { uint16_t ifc_sysctl_ntxqs; uint16_t ifc_sysctl_nrxqs; uint16_t ifc_sysctl_qs_eq_override; + uint16_t ifc_sysctl_rx_budget; qidx_t ifc_sysctl_ntxds[8]; qidx_t ifc_sysctl_nrxds[8]; @@ -3531,6 +3532,7 @@ _task_fn_rx(void *context) if_ctx_t ctx = rxq->ifr_ctx; bool more; int rc; + uint16_t budget; #ifdef IFLIB_DIAGNOSTICS rxq->ifr_cpu_exec_count[curcpu]++; @@ -3547,7 +3549,10 @@ _task_fn_rx(void *context) } } #endif - if (more == false || (more = iflib_rxeof(rxq, 16 /* XXX */)) == false) { + budget = ctx->ifc_sysctl_rx_budget; + if (budget == 0) + budget = 16; /* XXX */ + if (more == false || (more = iflib_rxeof(rxq, budget)) == false) { if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else { @@ -5486,9 +5491,12 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_qs_enable", CTLFLAG_RWTUN, &ctx->ifc_sysctl_qs_eq_override, 0, "permit #txq != #rxq"); - SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "disable_msix", + SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "disable_msix", CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, "disable MSIX (default 0)"); + SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "rx_budget", + CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, + "set the rx budget"); /* XXX change for per-queue sizes */ SYSCTL_ADD_PROC(ctx_list, oid_list, OID_AUTO, "override_ntxds", From owner-svn-src-all@freebsd.org Sat Sep 23 01:39: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 456DBE1C830; Sat, 23 Sep 2017 01:39:18 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C6B31CB8; Sat, 23 Sep 2017 01:39:18 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8N1dHOp063546; Sat, 23 Sep 2017 01:39:17 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8N1dGCi063544; Sat, 23 Sep 2017 01:39:16 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709230139.v8N1dGCi063544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 23 Sep 2017 01:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323944 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 323944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 01:39:18 -0000 Author: shurd Date: Sat Sep 23 01:39:16 2017 New Revision: 323944 URL: https://svnweb.freebsd.org/changeset/base/323944 Log: Make struct grouptask gt_name member a char array Previously, it was just a pointer which was copied, but some callers pass in a stack variable which will go out of scope. Add GROUPTASK_NAMELEN macro (32) and snprintf() the name into it, using "grouptask" if name is NULL. We can now safely include gtask->gt_name in console messages. Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12449 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/sys/_task.h Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Sat Sep 23 01:37:01 2017 (r323943) +++ head/sys/kern/subr_gtaskqueue.c Sat Sep 23 01:39:16 2017 (r323944) @@ -666,7 +666,7 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct gr int qid, error; gtask->gt_uniq = uniq; - gtask->gt_name = name; + snprintf(gtask->gt_name, GROUPTASK_NAMELEN, "%s", name ? name : "grouptask"); gtask->gt_irq = irq; gtask->gt_cpu = -1; mtx_lock(&qgroup->tqg_lock); @@ -703,7 +703,7 @@ taskqgroup_attach_deferred(struct taskqgroup *qgroup, error = intr_setaffinity(gtask->gt_irq, CPU_WHICH_IRQ, &mask); mtx_lock(&qgroup->tqg_lock); if (error) - printf("%s: setaffinity failed: %d\n", __func__, error); + printf("%s: %s setaffinity failed: %d\n", __func__, gtask->gt_name, error); } qgroup->tqg_queue[qid].tgc_cnt++; @@ -724,7 +724,7 @@ taskqgroup_attach_cpu(struct taskqgroup *qgroup, struc qid = -1; gtask->gt_uniq = uniq; - gtask->gt_name = name; + snprintf(gtask->gt_name, GROUPTASK_NAMELEN, "%s", name ? name : "grouptask"); gtask->gt_irq = irq; gtask->gt_cpu = cpu; mtx_lock(&qgroup->tqg_lock); @@ -736,7 +736,7 @@ taskqgroup_attach_cpu(struct taskqgroup *qgroup, struc } if (qid == -1) { mtx_unlock(&qgroup->tqg_lock); - printf("%s: qid not found for %s cpu=%d\n", __func__, name, cpu); + printf("%s: qid not found for %s cpu=%d\n", __func__, gtask->gt_name, cpu); return (EINVAL); } } else @@ -775,7 +775,7 @@ taskqgroup_attach_cpu_deferred(struct taskqgroup *qgro } if (qid == -1) { mtx_unlock(&qgroup->tqg_lock); - printf("%s: qid not found for cpu=%d\n", __func__, cpu); + printf("%s: qid not found for %s cpu=%d\n", __func__, gtask->gt_name, cpu); return (EINVAL); } qgroup->tqg_queue[qid].tgc_cnt++; @@ -805,7 +805,7 @@ taskqgroup_detach(struct taskqgroup *qgroup, struct gr if (qgroup->tqg_queue[i].tgc_taskq == gtask->gt_taskqueue) break; if (i == qgroup->tqg_cnt) - panic("taskqgroup_detach: task not in group\n"); + panic("taskqgroup_detach: task %s not in group\n", gtask->gt_name); qgroup->tqg_queue[i].tgc_cnt--; LIST_REMOVE(gtask, gt_list); mtx_unlock(&qgroup->tqg_lock); Modified: head/sys/sys/_task.h ============================================================================== --- head/sys/sys/_task.h Sat Sep 23 01:37:01 2017 (r323943) +++ head/sys/sys/_task.h Sat Sep 23 01:39:16 2017 (r323944) @@ -65,7 +65,8 @@ struct grouptask { void *gt_taskqueue; LIST_ENTRY(grouptask) gt_list; void *gt_uniq; - char *gt_name; +#define GROUPTASK_NAMELEN 32 + char gt_name[GROUPTASK_NAMELEN]; int16_t gt_irq; int16_t gt_cpu; }; From owner-svn-src-all@freebsd.org Sat Sep 23 05:16: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 AB807E25D20; Sat, 23 Sep 2017 05:16:18 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B55067317; Sat, 23 Sep 2017 05:16:17 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A912825D3860; Sat, 23 Sep 2017 05:16:13 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id B13B2D1F927; Sat, 23 Sep 2017 05:16:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id YMzB5NPd4IFz; Sat, 23 Sep 2017 05:16:11 +0000 (UTC) Received: from [192.168.124.1] (unknown [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 11745D1F7F6; Sat, 23 Sep 2017 05:16:10 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Stephen Hurd" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323942 - head/sys/net Date: Sat, 23 Sep 2017 05:16:08 +0000 Message-ID: In-Reply-To: <201709230135.v8N1ZE6S063264@repo.freebsd.org> References: <201709230135.v8N1ZE6S063264@repo.freebsd.org> MIME-Version: 1.0 X-Mailer: MailMate (2.0BETAr6091) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 05:16:18 -0000 On 23 Sep 2017, at 1:35, Stephen Hurd wrote: > Author: shurd > Date: Sat Sep 23 01:35:14 2017 > New Revision: 323942 > URL: https://svnweb.freebsd.org/changeset/base/323942 > > Log: > Chain mbufs before passing to if_input() > > Build a list of mbufs to pass to if_input() after LRO. Results in > 12% small packet forwarding rate improvement. forwarding seems a confusing word here.. > Reviewed by: sbruno > Approved by: sbruno (mentor) > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D12444 > > Modified: > head/sys/net/iflib.c From owner-svn-src-all@freebsd.org Sat Sep 23 06:00: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 653C5E26F47; Sat, 23 Sep 2017 06:00:18 +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 2FA7368322; Sat, 23 Sep 2017 06:00:18 +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 v8N60HIi070502; Sat, 23 Sep 2017 06:00:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8N60HFw070501; Sat, 23 Sep 2017 06:00:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709230600.v8N60HFw070501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 23 Sep 2017 06:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323945 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 06:00:18 -0000 Author: cy Date: Sat Sep 23 06:00:17 2017 New Revision: 323945 URL: https://svnweb.freebsd.org/changeset/base/323945 Log: Correct two misspellings. Also align */. Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Sep 23 01:39:16 2017 (r323944) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Sep 23 06:00:17 2017 (r323945) @@ -6093,8 +6093,8 @@ ipf_nat_icmpquerytype(icmptype) { case ICMP_ECHOREPLY: case ICMP_ECHO: - /* route aedvertisement/solliciation is currently unsupported: */ - /* it would require rewriting the ICMP data section */ + /* route advertisement/soliciation is currently unsupported: */ + /* it would require rewriting the ICMP data section */ case ICMP_TSTAMP: case ICMP_TSTAMPREPLY: case ICMP_IREQ: From owner-svn-src-all@freebsd.org Sat Sep 23 06:25:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57F6EE279D1; Sat, 23 Sep 2017 06:25:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com [IPv6:2607:f8b0:400e:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C25369288; Sat, 23 Sep 2017 06:25:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x236.google.com with SMTP id v23so1622156pgc.5; Fri, 22 Sep 2017 23:25:22 -0700 (PDT) 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=BXirKVOkgLelNbaxWdj265gltX3K0KKfwEculIQTQhI=; b=YaoyOHLKWCkDpSrSe3EY0wicxYo0S5p5ozqypgDaVMB6Z0Phl4ir7HYLH3zOamIjQ4 kyBXUdFmQGmdT4a0FayYR1/8Ah5U88+fRhVVLsI5wKT4lCzfb6sseLekrEy1TmqB70hp at922yu+nXG7lH9dmfNpIy29TDB23nTzxigFGBOaQZljmCcLklhvrn/fel874BC4Xlny L6jhg3VKtobeilNJCZ8M84MdjkQobGK2bxVPvbsgmCdceojmNzF0qum121qcHzSprSN0 n3hHUlITu8Qnf4Fn6tMBSjUdfumj+mgAmaLKiBQUFYSZnHfIrilTxaIeKXYzjFXG4CaX NHjQ== 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=BXirKVOkgLelNbaxWdj265gltX3K0KKfwEculIQTQhI=; b=m/lkwdM+aIj3ZmFOvlvz0fstZYVvOm1VF6MIiGBYZ/+5L1sXgYXltHgpO55Lq+/VVP sJFtNtj6STUdL687FnAeQVOVbb1ruznhZ6W6RLagWrCpOuOddiq4LyaXrTGLpupnDAHF gFp9uAox2fsLs6SrLcs4IAKl7YaXbOHmV6w5UtPqPTFVUhD1lrZVSdHzrH4g/TQceYbZ Js9jwsDVvspPisxUDR+N433cxX7G5iK4j0pfAaroTfFkb6a4orIIXT0L8m6lv6zK+J2U td6t8XGd2KBsuTHbF31zc1ZNHY3uZSpIpgulvyhvG3AoC+b0pxRsbPyDmMNN/5tDy6xU MjxQ== X-Gm-Message-State: AHPjjUgEyfmHzsIob4fpH9EZsEPPKfG4jI74XSYYcRS4cM6iShtZ7p/N KsJO/x0YoyZA09NvRa5nmoUPUF+e X-Google-Smtp-Source: AOwi7QBVGZTYT4Is9Y3mSxc9RA/gAtLvOcPGKeqrhlzD93mp6etKO80W5SETNVi3jEbLJdhE6P8Z1g== X-Received: by 10.84.176.65 with SMTP id u59mr1337898plb.278.1506147921401; Fri, 22 Sep 2017 23:25:21 -0700 (PDT) Received: from [192.168.3.133] (70-90-173-49-California.hfc.comcastbusiness.net. [70.90.173.49]) by smtp.gmail.com with ESMTPSA id q13sm2607955pfd.100.2017.09.22.23.25.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 23:25:20 -0700 (PDT) Subject: Re: svn commit: r323899 - head/tests/sys/opencrypto Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DA06DE63-4F47-4865-B02B-0D5455B5CFE2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201709220441.v8M4fngZ034519@repo.freebsd.org> Date: Fri, 22 Sep 2017 23:25:22 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201709220441.v8M4fngZ034519@repo.freebsd.org> To: Conrad Meyer 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, 23 Sep 2017 06:25:22 -0000 --Apple-Mail=_DA06DE63-4F47-4865-B02B-0D5455B5CFE2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 21, 2017, at 21:41, Conrad Meyer wrote: >=20 > Author: cem > Date: Fri Sep 22 04:41:48 2017 > New Revision: 323899 > URL: https://svnweb.freebsd.org/changeset/base/323899 >=20 > Log: > cryptotest.py: Like r323869, skip SHA HMAC tests on non-SHA drivers >=20 > Sponsored by: Dell EMC Isilon >=20 > Modified: > head/tests/sys/opencrypto/cryptotest.py >=20 > Modified: head/tests/sys/opencrypto/cryptotest.py > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/tests/sys/opencrypto/cryptotest.py Fri Sep 22 04:25:44 2017 = (r323898) > +++ head/tests/sys/opencrypto/cryptotest.py Fri Sep 22 04:41:48 2017 = (r323899) > @@ -237,6 +237,7 @@ def GenTestCase(cname): > #for i in iglob('SHA1*'): > # self.runSHA(i) >=20 > + @unittest.skipIf(cname not in shamodules, 'skipping SHA = on %s' % `name`) Backticks for stringily=E2=80=99ing things isn=E2=80=99t py3k = compatible, FYI. -Ngie --Apple-Mail=_DA06DE63-4F47-4865-B02B-0D5455B5CFE2 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 iQIcBAEBCgAGBQJZxf5TAAoJEPWDqSZpMIYVlW4P/icAivaHrMaYST8F6KhOh+aV PhVng80eWuyGb8LVIqWhPwZNeyfjrBuaELmq+4/l2gmDr4r5czyAnyGXphmmYd1w LKLKfvBxmuoMltE6YMO+uzWquqL//sYFJDsOxrCuYhao17vavniBTOY48wmz7NRh ONChn/kYlNiCgQNwqgHRnzlNxPRXasHjwedS1FMgeqvMqwJBzWMAl9ZHqPAp/5CR jL+5aziPu4R6fJGUGv7suxyv2pxoPHst8VLIR4kw2rBd75qVT3TcY1HTydYCLXpJ K7+gQUmQlH1b2c9f5NKHFMdM4rP4+Pgp3ghG6OCdHPf1zHcPGrvxZ+hi7R/7MWcG R8b3UDtRmWHfHrp30M2wSO3VRuINXwJS/2/cB+Y1fwiPT0cFYJPZTc6X8yXaRNle vI9R8PinLS3UZJsYbvt5PAWx/awEaY+bxkBfNDf3IGaqpnAyoQEGI3JKVDZ3nloW ANZiGCzJYBSwRDwCQjkTlTlN8wWzwDBBjQq4CoLO9RDd74tbidwPOWX+bgtOEKpn wEF1Zf4VpIv/3mOthc6LRkDkO14W3umFIzciFYaS1oZMhCOD6+yAaQaQ5Vw6DHt6 sCq0gfO0tQpL12TycXhfegPA7vgS7p8w/+2C/0+vzhAM6crwWxJWs8W7j66fbpfJ y5vJu/0VJ3oInfHMvDoH =ki1U -----END PGP SIGNATURE----- --Apple-Mail=_DA06DE63-4F47-4865-B02B-0D5455B5CFE2-- From owner-svn-src-all@freebsd.org Sat Sep 23 06:40: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 6C830E2804E; Sat, 23 Sep 2017 06:40:06 +0000 (UTC) (envelope-from shurd@sasktel.net) Received: from mail125c7.megamailservers.com (mail525c7.megamailservers.com [209.235.141.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7A626985A; Sat, 23 Sep 2017 06:40:04 +0000 (UTC) (envelope-from shurd@sasktel.net) X-Authenticated-User: hurds.sasktel.net X-VIP: 69.49.109.87 Received: from [192.168.0.33] (ip72-194-73-141.oc.oc.cox.net [72.194.73.141]) (authenticated bits=0) by mail125c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id v8N6WfEP012383; Sat, 23 Sep 2017 02:32:43 -0400 Subject: Re: svn commit: r323942 - head/sys/net To: "Bjoern A. Zeeb" , Stephen Hurd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709230135.v8N1ZE6S063264@repo.freebsd.org> From: Stephen Hurd Message-ID: <283397c7-a01e-3776-7ed3-b64d68003d0b@sasktel.net> Date: Fri, 22 Sep 2017 23:32:40 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CTCH-RefID: str=0001.0A020204.59C6000D.000B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.2 cv=fL1J5dSe c=1 sm=1 tr=0 a=l4Y+EJuLrT/8f1z5FvEQ1g==:117 a=l4Y+EJuLrT/8f1z5FvEQ1g==:17 a=IkcTkHD0fZMA:10 a=6I5d2MoRAAAA:8 a=MrGgqHLmt7_Q1xOHqZAA:9 a=QEXdDO2ut3YA: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, 23 Sep 2017 06:40:06 -0000 Bjoern A. Zeeb wrote: > On 23 Sep 2017, at 1:35, Stephen Hurd wrote: > >> Author: shurd >> Date: Sat Sep 23 01:35:14 2017 >> New Revision: 323942 >> URL: https://svnweb.freebsd.org/changeset/base/323942 >> >> Log: >> Chain mbufs before passing to if_input() >> >> Build a list of mbufs to pass to if_input() after LRO. Results in >> 12% small packet forwarding rate improvement. > forwarding seems a confusing word here.. The test was small (64 byte frames) received on one interface, then sent out on a different one using the net.inet.ip.forwarding sysctl (controlled via the gateway_enable setting in rc.conf). From owner-svn-src-all@freebsd.org Sat Sep 23 06: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 EB398E280E9; Sat, 23 Sep 2017 06:41:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com [IPv6:2607:f8b0:400e:c00::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 B475869A00; Sat, 23 Sep 2017 06:41:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22b.google.com with SMTP id g65so1520556pfe.13; Fri, 22 Sep 2017 23:41:03 -0700 (PDT) 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=Ioph1ohPHoZdv5bo6qLCRrHh5rD8+vT9D5iOMO4HgPQ=; b=QW7BP0JO4EeNCirDS1wCzVW9ca+yEgh8PSqnBT6zAz0shX2M/xtvjF3Wt4NkcF9nkD rjMnLXXnrWRzRiGzgIOhACPvidibTnwuKnntqMcs0hCcEqysFOK6aAyurvBjSkgjLFff LFSWQ+pMMKF8VBdsOKa7++kfdVzsi3EK7eSkRpErgFIBmzOme1uMS4h6JVoMgnvWuMuA O/YP/uOnhvj4nufEkJPNMyZPwLejyqbglfNeoNAZaX8bpYc8jEGnHgobQqX7EjLh1YiI yLcWC7JnsKAMBqy3/tduEABQJPhrPT0NvCC0xKw36nfLX0YO8p1L7LjnwpWAtRoznSpd ZBBg== 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=Ioph1ohPHoZdv5bo6qLCRrHh5rD8+vT9D5iOMO4HgPQ=; b=j7ThP40J1r+AKjJ9orWZs8gmIpANDDQ+dpNLesT4czwAkK5ZeW83BsLbnaxA7mD/ih kARTKBTfDZ1DyvNDTmQrZKTwAG/MgME2dQSUY3gmPLu8WEevIQ736bWFWYCs/KAe2gE4 odS5eMfgwnJITrQW1R+L7jeQLxOZNFaQRlZHrIjjWnLAmAdQ7bzYi/8Ad46zD3YSWlOw sMYMu0+/i5uVQZHjgGH88vnrsKrEdFs5mka1uE7Dbjvs10pu9a4OhSTot8aXpFujFdRW Dmu7ul53Bi5U68VoGd3kI1mAWVKiTPUStXPNH4yQkcMVEjGagbDA8+H+hXMohuqac/GS SrZg== X-Gm-Message-State: AHPjjUhzjYEfHPBBY4h98/85VcxApyXvUIEeJQpjfrFKWumEKG4NpPn5 WT4rzprvaybgy2n46cg1PX3hoKEV X-Google-Smtp-Source: AOwi7QDNBvAGqWhwxinJ9fx7tRd3QZAbGXTWgEJB1p+Cy7t691JnQ6cCBXwFphez28By1WesWSLGRw== X-Received: by 10.99.42.11 with SMTP id q11mr1344363pgq.7.1506148862969; Fri, 22 Sep 2017 23:41:02 -0700 (PDT) Received: from [192.168.3.133] (70-90-173-49-California.hfc.comcastbusiness.net. [70.90.173.49]) by smtp.gmail.com with ESMTPSA id b65sm2144661pfg.30.2017.09.22.23.41.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 23:41:02 -0700 (PDT) Subject: Re: svn commit: r323935 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DFEBFE8C-4907-490A-A181-5A44C0390825"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201709222001.v8MK1CdR023641@repo.freebsd.org> Date: Fri, 22 Sep 2017 23:41:04 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8D46CBA5-7213-48E0-81DE-74D5F9517A77@gmail.com> References: <201709222001.v8MK1CdR023641@repo.freebsd.org> To: Conrad Meyer 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, 23 Sep 2017 06:41:04 -0000 --Apple-Mail=_DFEBFE8C-4907-490A-A181-5A44C0390825 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Sep 22, 2017, at 13:01, Conrad Meyer wrote: >=20 > Author: cem > Date: Fri Sep 22 20:01:12 2017 > New Revision: 323935 > URL: https://svnweb.freebsd.org/changeset/base/323935 >=20 > Log: > ddb(4): Add 'show badstacks' command to show witness badstacks >=20 > Add a DDB command that mirrors sysctl debug.witness.badstacks. >=20 > Reported by: rstone > Reviewed by: rstone > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D12468 This broke GENERIC: --- subr_witness.o --- /usr/src/sys/kern/subr_witness.c:2577:4: error: use of undeclared = identifier 'req' req->oldidx =3D 0; ^ /usr/src/sys/kern/subr_witness.c:2603:5: error: use of undeclared = identifier 'req' req->oldidx =3D 0; ^ /usr/src/sys/kern/subr_witness.c:2662:3: error: use of undeclared = identifier 'req' req->oldidx =3D 0; ^ --Apple-Mail=_DFEBFE8C-4907-490A-A181-5A44C0390825 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 iQIcBAEBCgAGBQJZxgIBAAoJEPWDqSZpMIYVticP/2fwhu2KRx2p06b8lq+9A5Qv YEt6HrT39wP6nKmfFwlOkEC6vwIQ9S4MwHgd6DfDzczsoAvxK7A/DPj766tpG2Cb yhKNSiABTGEwatW33qOcbHkHEtOFAQIzcDamY7TNqHJmXPlAJ/5/3ajzoHDTHKit 2opGf8ET8pc8HUYJiyYZ82weUgkiArObNfgb82yBxp06XUMo3fzJ3I69ox98VUnq MqvO1topzlJqHoo7lZ1YF9dv6/xtiYQmj7onU8/wXIBe5t17jO5cZZpxbbK0naXP Cydl64qi6vTRDkRjen+aGPTgz2y6BVWOq/dvSOhKJyXfnNUcYDnXZRVI6r0Pru6o +QXHiqIGLNORvKhpb8bJAbNh96rb6sKhhzJApXzHOMXpSvCypuO3QMe7RWRfxNcS +terQtsmznzV7LQ8xbc73nvbAh416vc/zKBlxY1676QKGj8rtpNTdiJI9j3Niq+6 DqTI/K9eV8y0hAi/cGg3pP+hhgpyD8kI/AOcMkfm2kctWk+6xCyYJEmONTbMOQkf TMQwYhwhexIfg2XpWnpBWj1mi85SJmTdczgF5erLsXFDH70SAJq4nhyud0ssE7HT ee8LKgVbS53KMga8M8et2PzWIPaeQQ+zdXoJdGE9jPeIyQ4+b68Y0hgdpcMSyRhd eb7xipa5LHmFWtJjmuHR =bk7a -----END PGP SIGNATURE----- --Apple-Mail=_DFEBFE8C-4907-490A-A181-5A44C0390825-- From owner-svn-src-all@freebsd.org Sat Sep 23 08:26: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 39085E2AAFA; Sat, 23 Sep 2017 08:26:44 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1BCD6C002; Sat, 23 Sep 2017 08:26:43 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8N8QhY2030873; Sat, 23 Sep 2017 08:26:43 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8N8QgBd030871; Sat, 23 Sep 2017 08:26:42 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201709230826.v8N8QgBd030871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sat, 23 Sep 2017 08:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323946 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 323946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 08:26:44 -0000 Author: scottl Date: Sat Sep 23 08:26:42 2017 New Revision: 323946 URL: https://svnweb.freebsd.org/changeset/base/323946 Log: Garbage collect usued fields Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr_sas.h head/sys/dev/mps/mps_sas.h Modified: head/sys/dev/mpr/mpr_sas.h ============================================================================== --- head/sys/dev/mpr/mpr_sas.h Sat Sep 23 06:00:17 2017 (r323945) +++ head/sys/dev/mpr/mpr_sas.h Sat Sep 23 08:26:42 2017 (r323946) @@ -70,9 +70,6 @@ struct mprsas_target { uint16_t parent_handle; uint64_t parent_sasaddr; uint32_t parent_devinfo; - struct sysctl_ctx_list sysctl_ctx; - struct sysctl_oid *sysctl_tree; - TAILQ_ENTRY(mprsas_target) sysctl_link; uint64_t issued; uint64_t completed; unsigned int outstanding; Modified: head/sys/dev/mps/mps_sas.h ============================================================================== --- head/sys/dev/mps/mps_sas.h Sat Sep 23 06:00:17 2017 (r323945) +++ head/sys/dev/mps/mps_sas.h Sat Sep 23 08:26:42 2017 (r323946) @@ -67,9 +67,6 @@ struct mpssas_target { uint16_t parent_handle; uint64_t parent_sasaddr; uint32_t parent_devinfo; - struct sysctl_ctx_list sysctl_ctx; - struct sysctl_oid *sysctl_tree; - TAILQ_ENTRY(mpssas_target) sysctl_link; uint64_t issued; uint64_t completed; unsigned int outstanding; From owner-svn-src-all@freebsd.org Sat Sep 23 08:37:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0019E2AD17; Sat, 23 Sep 2017 08:37:50 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 812DE6C410; Sat, 23 Sep 2017 08:37:49 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 450B425D3891; Sat, 23 Sep 2017 08:37:44 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 53701D1F928; Sat, 23 Sep 2017 08:37:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id F1m1wvRgmdGk; Sat, 23 Sep 2017 08:37:39 +0000 (UTC) Received: from [192.168.124.1] (fresh-ayiya.sbone.de [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 5A4F5D1F894; Sat, 23 Sep 2017 08:37:38 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Stephen Hurd" Cc: "Stephen Hurd" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323942 - head/sys/net Date: Sat, 23 Sep 2017 08:37:30 +0000 Message-ID: <6F5DC92C-2CF6-4A33-9663-BFECB7DB65F2@lists.zabbadoz.net> In-Reply-To: <283397c7-a01e-3776-7ed3-b64d68003d0b@sasktel.net> References: <201709230135.v8N1ZE6S063264@repo.freebsd.org> <283397c7-a01e-3776-7ed3-b64d68003d0b@sasktel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6091) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 08:37:50 -0000 On 23 Sep 2017, at 6:32, Stephen Hurd wrote: > Bjoern A. Zeeb wrote: >> On 23 Sep 2017, at 1:35, Stephen Hurd wrote: >> >>> Author: shurd >>> Date: Sat Sep 23 01:35:14 2017 >>> New Revision: 323942 >>> URL: https://svnweb.freebsd.org/changeset/base/323942 >>> >>> Log: >>> Chain mbufs before passing to if_input() >>> >>> Build a list of mbufs to pass to if_input() after LRO. Results in >>> 12% small packet forwarding rate improvement. >> forwarding seems a confusing word here.. > > The test was small (64 byte frames) received on one interface, then > sent out on a different one using the net.inet.ip.forwarding sysctl > (controlled via the gateway_enable setting in rc.conf). Then this makes no sense as we don’t do LRO if forwarding is enabled on the machine; https://svnweb.freebsd.org/base/head/sys/netinet/tcp_lro.c?annotate=317390#l645 From owner-svn-src-all@freebsd.org Sat Sep 23 08:56: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 3E033E003A4; Sat, 23 Sep 2017 08:56:32 +0000 (UTC) (envelope-from gljennjohn@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 CE0FF6CCAB; Sat, 23 Sep 2017 08:56:31 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id x17so3057216wmd.5; Sat, 23 Sep 2017 01:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=KC9ka/o/qNA5PFmIC2rGcCZ4Xp1XK65qAyFW+6NWxXk=; b=CGJr2lsWk6q3Qjx9djK4ubIZ76uk6/OQ2RYkpFNSgczhR9qIWre+MZYwdvAMk+FI6F Fnja8N7Ran07TKZoBulIphLZvXYd1XIrYf5vdG6BBsamZE1PZ61LqScDB9efdt865Mm+ mybzbWnBulUU0BpBBobhAsaZ60WCadlR+JC87KGnLmWTxo2Hn+sCmsU5SFjU6I52Q9mg aDS23pnb57ajwlcHF244g19uv/oAqLqOHABzVOu1oUq8BoQxhgwFCAjzvr9FucnNUmB6 lYj7And5u6RdmLKdCLtV2B0v1oGmdogYDdDH+WzHmVYgVfabWCskFFgo0JFveLPUujT8 Bytw== 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:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=KC9ka/o/qNA5PFmIC2rGcCZ4Xp1XK65qAyFW+6NWxXk=; b=K4w9DKTlv+n7plhZh4fgMYF8rrAUJzR0+xyCUMBlNEYk5bBL0fdBIiFrLWVbxR9bp4 OaQlvnReIqpCXA17mMItXsQ0S9Bv8yU2GNm++6t0I7WwFWBPnkdYQoJZHhASH3NBY+xv NEzyOf3RmjD4H7JYCyKdQSYXBT467esK0Qee8zwmD/tXDSUHJRn+xnfy6NErpEZZsUYj laNhGNrk1foozYr4iXxBZbwSHqxeLt8jHla1F06GmkQ0g96PVZ4vamUUEdGLiW7xh5WG UivYFL6olrJqDVmL6hjQA7AizNTXgGYxLgkBSveia8nDG5gvuZXq+nFIpCUSplZ5XcD7 y0yw== X-Gm-Message-State: AHPjjUj7/yoacM9knGKwelnfIjAK+N2yjx/SGMyPdrZEuJpV88Bazn00 La08/EllULRLf5zXv7rei7W81g== X-Google-Smtp-Source: AOwi7QA9uyMoV8oQ6WLlRkHDWjgQ1TEvuCFsG2WJjb04dHYVbUhxQP9TpAuxHDuxBYdaO1TmCFqORw== X-Received: by 10.28.94.85 with SMTP id s82mr5222440wmb.13.1506156990246; Sat, 23 Sep 2017 01:56:30 -0700 (PDT) Received: from ernst.home (p4FCA62DB.dip0.t-ipconnect.de. [79.202.98.219]) by smtp.gmail.com with ESMTPSA id h128sm1367046wmf.9.2017.09.23.01.56.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 01:56:29 -0700 (PDT) Date: Sat, 23 Sep 2017 10:56:28 +0200 From: Gary Jennejohn To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323945 - head/sys/contrib/ipfilter/netinet Message-ID: <20170923105628.739240b5@ernst.home> In-Reply-To: <201709230600.v8N60HFw070501@repo.freebsd.org> References: <201709230600.v8N60HFw070501@repo.freebsd.org> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 08:56:32 -0000 On Sat, 23 Sep 2017 06:00:17 +0000 (UTC) Cy Schubert wrote: > Author: cy > Date: Sat Sep 23 06:00:17 2017 > New Revision: 323945 > URL: https://svnweb.freebsd.org/changeset/base/323945 > > Log: > Correct two misspellings. Also align */. > > Modified: > head/sys/contrib/ipfilter/netinet/ip_nat.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c > ============================================================================== > --- head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Sep 23 01:39:16 2017 (r323944) > +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Sep 23 06:00:17 2017 (r323945) > @@ -6093,8 +6093,8 @@ ipf_nat_icmpquerytype(icmptype) > { > case ICMP_ECHOREPLY: > case ICMP_ECHO: > - /* route aedvertisement/solliciation is currently unsupported: */ > - /* it would require rewriting the ICMP data section */ > + /* route advertisement/soliciation is currently unsupported: */ ^^^^^^^^^ still wrong - should be solicitation. > + /* it would require rewriting the ICMP data section */ > case ICMP_TSTAMP: > case ICMP_TSTAMPREPLY: > case ICMP_IREQ: > -- Gary Jennejohn From owner-svn-src-all@freebsd.org Sat Sep 23 12: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 5E84EE045FD; Sat, 23 Sep 2017 12:28:57 +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 2AC8F71BED; Sat, 23 Sep 2017 12:28:57 +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 v8NCSunL028911; Sat, 23 Sep 2017 12:28:56 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NCSuJ6028910; Sat, 23 Sep 2017 12:28:56 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709231228.v8NCSuJ6028910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 23 Sep 2017 12:28: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: r323949 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 323949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 12:28:57 -0000 Author: oshogbo Date: Sat Sep 23 12:28:56 2017 New Revision: 323949 URL: https://svnweb.freebsd.org/changeset/base/323949 Log: MFC r323654: Fix names of the array functions in the nv man page. Submitted by: def@ Modified: stable/11/share/man/man9/nv.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/nv.9 ============================================================================== --- stable/11/share/man/man9/nv.9 Sat Sep 23 11:09:25 2017 (r323948) +++ stable/11/share/man/man9/nv.9 Sat Sep 23 12:28:56 2017 (r323949) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2015 +.Dd September 16, 2017 .Dt NV 9 .Os .Sh NAME @@ -201,11 +201,11 @@ .Ft "const bool *" .Fn nvlist_get_bool_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const uint64_t *" -.Fn nvlist_get_number "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_number_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const char * const *" -.Fn nvlist_get_string "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_string_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const nvlist_t * const *" -.Fn nvlist_get_nvlist "const nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_get_nvlist_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const int *" .Fn nvlist_get_descriptor_array "const nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "const nvlist_t *" @@ -230,13 +230,13 @@ .Ft "bool *" .Fn nvlist_take_bool_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "uint64_t **" -.Fn nvlist_take_number "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_number_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "char **" -.Fn nvlist_take_string "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_string_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "nvlist_t **" -.Fn nvlist_take_nvlist "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_nvlist_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .Ft "int *" -.Fn nvlist_take_descriptor "nvlist_t *nvl" "const char *name" "size_t *nitems" +.Fn nvlist_take_descriptor_array "nvlist_t *nvl" "const char *name" "size_t *nitems" .\" .Ft void .Fn nvlist_free "nvlist_t *nvl" "const char *name" From owner-svn-src-all@freebsd.org Sat Sep 23 12:32: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 B348DE047F0; Sat, 23 Sep 2017 12:32:12 +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 8914871F1E; Sat, 23 Sep 2017 12:32:12 +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 v8NCWB8L033022; Sat, 23 Sep 2017 12:32:11 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NCWBeg033021; Sat, 23 Sep 2017 12:32:11 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709231232.v8NCWBeg033021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 23 Sep 2017 12:32: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: r323950 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 323950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 12:32:12 -0000 Author: oshogbo Date: Sat Sep 23 12:32:11 2017 New Revision: 323950 URL: https://svnweb.freebsd.org/changeset/base/323950 Log: MFC r323655: Add missing links to the nv man page. Modified: stable/11/share/man/man9/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Sat Sep 23 12:28:56 2017 (r323949) +++ stable/11/share/man/man9/Makefile Sat Sep 23 12:32:11 2017 (r323950) @@ -1207,13 +1207,18 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist.9 \ nv.9 nvlist_add_binary.9 \ nv.9 nvlist_add_bool.9 \ + nv.9 nvlist_add_bool_array.9 \ nv.9 nvlist_add_descriptor.9 \ + nv.9 nvlist_add_descriptor_array.9 \ nv.9 nvlist_add_null.9 \ nv.9 nvlist_add_number.9 \ + nv.9 nvlist_add_number_array.9 \ nv.9 nvlist_add_nvlist.9 \ + nv.9 nvlist_add_nvlist_array.9 \ nv.9 nvlist_add_string.9 \ nv.9 nvlist_add_stringf.9 \ nv.9 nvlist_add_stringv.9 \ + nv.9 nvlist_add_string_array.9 \ nv.9 nvlist_clone.9 \ nv.9 nvlist_create.9 \ nv.9 nvlist_destroy.9 \ @@ -1223,10 +1228,14 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_exists.9 \ nv.9 nvlist_exists_binary.9 \ nv.9 nvlist_exists_bool.9 \ + nv.9 nvlist_exists_bool_array.9 \ nv.9 nvlist_exists_descriptor.9 \ + nv.9 nvlist_exists_descriptor_array.9 \ nv.9 nvlist_exists_null.9 \ nv.9 nvlist_exists_number.9 \ + nv.9 nvlist_exists_number_array.9 \ nv.9 nvlist_exists_nvlist.9 \ + nv.9 nvlist_exists_nvlist_array.9 \ nv.9 nvlist_exists_string.9 \ nv.9 nvlist_exists_type.9 \ nv.9 nvlist_fdump.9 \ @@ -1234,23 +1243,36 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_free.9 \ nv.9 nvlist_free_binary.9 \ nv.9 nvlist_free_bool.9 \ + nv.9 nvlist_free_bool_array.9 \ nv.9 nvlist_free_descriptor.9 \ + nv.9 nvlist_free_descriptor_array.9 \ nv.9 nvlist_free_null.9 \ nv.9 nvlist_free_number.9 \ + nv.9 nvlist_free_number_array.9 \ nv.9 nvlist_free_nvlist.9 \ + nv.9 nvlist_free_nvlist_array.9 \ nv.9 nvlist_free_string.9 \ + nv.9 nvlist_free_string_array.9 \ nv.9 nvlist_free_type.9 \ nv.9 nvlist_get_binary.9 \ nv.9 nvlist_get_bool.9 \ + nv.9 nvlist_get_bool_array.9 \ nv.9 nvlist_get_descriptor.9 \ + nv.9 nvlist_get_descriptor_array.9 \ nv.9 nvlist_get_number.9 \ + nv.9 nvlist_get_number_array.9 \ nv.9 nvlist_get_nvlist.9 \ + nv.9 nvlist_get_nvlist_array.9 \ nv.9 nvlist_get_parent.9 \ nv.9 nvlist_get_string.9 \ + nv.9 nvlist_get_string_array.9 \ nv.9 nvlist_move_binary.9 \ nv.9 nvlist_move_descriptor.9 \ + nv.9 nvlist_move_descriptor_array.9 \ nv.9 nvlist_move_nvlist.9 \ + nv.9 nvlist_move_nvlist_array.9 \ nv.9 nvlist_move_string.9 \ + nv.9 nvlist_move_string_array.9 \ nv.9 nvlist_next.9 \ nv.9 nvlist_pack.9 \ nv.9 nvlist_recv.9 \ @@ -1259,10 +1281,15 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_size.9 \ nv.9 nvlist_take_binary.9 \ nv.9 nvlist_take_bool.9 \ + nv.9 nvlist_take_bool_array.9 \ nv.9 nvlist_take_descriptor.9 \ + nv.9 nvlist_take_descriptor_array.9 \ nv.9 nvlist_take_number.9 \ + nv.9 nvlist_take_number_array.9 \ nv.9 nvlist_take_nvlist.9 \ + nv.9 nvlist_take_nvlist_array.9 \ nv.9 nvlist_take_string.9 \ + nv.9 nvlist_take_string_array.9 \ nv.9 nvlist_unpack.9 \ nv.9 nvlist_xfer.9 MLINKS+=osd.9 osd_call.9 \ From owner-svn-src-all@freebsd.org Sat Sep 23 12:35: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 E88C7E048F6; Sat, 23 Sep 2017 12:35:47 +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 C43E272121; Sat, 23 Sep 2017 12:35:47 +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 v8NCZkof033208; Sat, 23 Sep 2017 12:35:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NCZkKA033207; Sat, 23 Sep 2017 12:35:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709231235.v8NCZkKA033207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 23 Sep 2017 12:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323951 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 12:35:48 -0000 Author: emaste Date: Sat Sep 23 12:35:46 2017 New Revision: 323951 URL: https://svnweb.freebsd.org/changeset/base/323951 Log: Revert r323935 as it broke the build subr_witness.c:2577:4: error: use of undeclared identifier 'req' req->oldidx = 0; ^ Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sat Sep 23 12:32:11 2017 (r323950) +++ head/sys/kern/subr_witness.c Sat Sep 23 12:35:46 2017 (r323951) @@ -2539,18 +2539,31 @@ DB_SHOW_COMMAND(witness, db_witness_display) } #endif -static void -sbuf_print_witness_badstacks(struct sbuf *sb) +static int +sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS) { struct witness_lock_order_data *data1, *data2, *tmp_data1, *tmp_data2; struct witness *tmp_w1, *tmp_w2, *w1, *w2; + struct sbuf *sb; u_int w_rmatrix1, w_rmatrix2; - int generation, i, j; + int error, generation, i, j; tmp_data1 = NULL; tmp_data2 = NULL; tmp_w1 = NULL; tmp_w2 = NULL; + if (witness_watch < 1) { + error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); + return (error); + } + if (witness_cold) { + error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); + return (error); + } + error = 0; + sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND); + if (sb == NULL) + return (ENOMEM); /* Allocate and init temporary storage space. */ tmp_w1 = malloc(sizeof(struct witness), M_TEMP, M_WAITOK | M_ZERO); @@ -2670,55 +2683,13 @@ restart: free(tmp_data2, M_TEMP); free(tmp_w1, M_TEMP); free(tmp_w2, M_TEMP); -} -static int -sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS) -{ - struct sbuf *sb; - int error; - - if (witness_watch < 1) { - error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); - return (error); - } - if (witness_cold) { - error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); - return (error); - } - error = 0; - sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND); - if (sb == NULL) - return (ENOMEM); - - sbuf_print_witness_badstacks(sb); - sbuf_finish(sb); error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (error); } - -#ifdef DDB -static int -sbuf_db_printf_drain(void *arg __unused, const char *data, int len) -{ - - return (db_printf("%.*s", len, data)); -} - -DB_SHOW_COMMAND(badstacks, db_witness_badstacks) -{ - struct sbuf sb; - char buffer[128]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - sbuf_set_drain(&sb, sbuf_db_printf_drain, NULL); - sbuf_print_witness_badstacks(&sb); - sbuf_finish(&sb); -} -#endif static int sysctl_debug_witness_channel(SYSCTL_HANDLER_ARGS) From owner-svn-src-all@freebsd.org Sat Sep 23 12:44: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 6CE16E04B8E; Sat, 23 Sep 2017 12:44:43 +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 394F1725DA; Sat, 23 Sep 2017 12:44:43 +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 v8NCig33037356; Sat, 23 Sep 2017 12:44:42 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NCig1O037355; Sat, 23 Sep 2017 12:44:42 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201709231244.v8NCig1O037355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 23 Sep 2017 12:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323952 - head/sys/boot/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/boot/i386/libi386 X-SVN-Commit-Revision: 323952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 12:44:43 -0000 Author: oshogbo Date: Sat Sep 23 12:44:42 2017 New Revision: 323952 URL: https://svnweb.freebsd.org/changeset/base/323952 Log: After the r317886 support for TFTP and NFS can be enable simultaneously. The cleanup of this distinction was done in the r318988, but this Makefile was omitted. Submitted by: kczekirda@ Modified: head/sys/boot/i386/libi386/Makefile Modified: head/sys/boot/i386/libi386/Makefile ============================================================================== --- head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:35:46 2017 (r323951) +++ head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:44:42 2017 (r323952) @@ -12,10 +12,10 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp .PATH: ${.CURDIR}/../../zfs SRCS+= devicename_stubs.c -# Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT) CFLAGS+= -DLOADER_TFTP_SUPPORT -.else +.endif +.if defined(LOADER_NFS_SUPPORT) CFLAGS+= -DLOADER_NFS_SUPPORT .endif From owner-svn-src-all@freebsd.org Sat Sep 23 15: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 DF195E08147; Sat, 23 Sep 2017 15:53:55 +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 B225477434; Sat, 23 Sep 2017 15:53:55 +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 EF16110A82D; Sat, 23 Sep 2017 11:53:53 -0400 (EDT) From: John Baldwin To: Mariusz Zaborski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323952 - head/sys/boot/i386/libi386 Date: Sat, 23 Sep 2017 08:50:48 -0700 Message-ID: <32112779.upWhmOh2nn@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201709231244.v8NCig1O037355@repo.freebsd.org> References: <201709231244.v8NCig1O037355@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); Sat, 23 Sep 2017 11:53:54 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 15:53:56 -0000 On Saturday, September 23, 2017 12:44:42 PM Mariusz Zaborski wrote: > Author: oshogbo > Date: Sat Sep 23 12:44:42 2017 > New Revision: 323952 > URL: https://svnweb.freebsd.org/changeset/base/323952 > > Log: > After the r317886 support for TFTP and NFS can be enable simultaneously. > > The cleanup of this distinction was done in the r318988, but this Makefile > was omitted. > > Submitted by: kczekirda@ > > Modified: > head/sys/boot/i386/libi386/Makefile > > Modified: head/sys/boot/i386/libi386/Makefile > ============================================================================== > --- head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:35:46 2017 (r323951) > +++ head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:44:42 2017 (r323952) > @@ -12,10 +12,10 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp > .PATH: ${.CURDIR}/../../zfs > SRCS+= devicename_stubs.c > > -# Enable PXE TFTP or NFS support, not both. > .if defined(LOADER_TFTP_SUPPORT) > CFLAGS+= -DLOADER_TFTP_SUPPORT > -.else > +.endif > +.if defined(LOADER_NFS_SUPPORT) > CFLAGS+= -DLOADER_NFS_SUPPORT > .endif Is LOADER_NFS_SUPPORT defined by default? If not, I think you just turned off NFS in the default loader. One option would be to add a new 'LOADER_NO_NFS_SUPPORT' and include NFS unless that is defined. We could also just always include NFS support. Finally, if we want to retain the ability to choose loader bits, these should probably change to real src options: WITH/WITHOUT_LOADER_TFTP_SUPPORT and WITH/WITHOUT_LOADER_NFS_SUPPORT and have this Makefile check MK_LOADER_TFTP/NFS_SUPPORT. Then we could choose defaults in src.opts.mk. -- John Baldwin From owner-svn-src-all@freebsd.org Sat Sep 23 16:46: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 40706E09126; Sat, 23 Sep 2017 16:46:32 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A41A7C9D6; Sat, 23 Sep 2017 16:46:32 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8NGkVHv040627; Sat, 23 Sep 2017 16:46:31 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NGkVk5040625; Sat, 23 Sep 2017 16:46:31 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709231646.v8NGkVk5040625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 23 Sep 2017 16:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323954 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 323954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 16:46:32 -0000 Author: shurd Date: Sat Sep 23 16:46:30 2017 New Revision: 323954 URL: https://svnweb.freebsd.org/changeset/base/323954 Log: Have ifmp_ring_enqueue() abdicate instead of switch to a consumer Move TX out of the enqueue() path. As a result, we need to have ifmp_ring_check_drainage() pick up from the abdicate state. We also need to either enqueue the TX task, or check drainage after calling ifmp_ring_enqueue() to ensure it's sent. This change results in a 30% small packet forwarding improvement. Reviewed by: olivier, sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12439 Modified: head/sys/net/iflib.c head/sys/net/mp_ring.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat Sep 23 13:37:02 2017 (r323953) +++ head/sys/net/iflib.c Sat Sep 23 16:46:30 2017 (r323954) @@ -3515,8 +3515,7 @@ _task_fn_tx(void *context) } if (txq->ift_db_pending) ifmp_ring_enqueue(txq->ift_br, (void **)&txq, 1, TX_BATCH_SIZE); - else - ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); + ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else { @@ -3718,16 +3717,14 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) DBG_COUNTER_INC(tx_seen); err = ifmp_ring_enqueue(txq->ift_br, (void **)&m, 1, TX_BATCH_SIZE); + GROUPTASK_ENQUEUE(&txq->ift_task); if (err) { - GROUPTASK_ENQUEUE(&txq->ift_task); /* support forthcoming later */ #ifdef DRIVER_BACKPRESSURE txq->ift_closed = TRUE; #endif ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); m_freem(m); - } else if (TXQ_AVAIL(txq) < (txq->ift_size >> 1)) { - GROUPTASK_ENQUEUE(&txq->ift_task); } return (err); Modified: head/sys/net/mp_ring.c ============================================================================== --- head/sys/net/mp_ring.c Sat Sep 23 13:37:02 2017 (r323953) +++ head/sys/net/mp_ring.c Sat Sep 23 16:46:30 2017 (r323954) @@ -454,18 +454,12 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i do { os.state = ns.state = r->state; ns.pidx_tail = pidx_stop; - ns.flags = BUSY; + if (os.flags == IDLE) + ns.flags = ABDICATED; } while (atomic_cmpset_rel_64(&r->state, os.state, ns.state) == 0); critical_exit(); counter_u64_add(r->enqueues, n); - /* - * Turn into a consumer if some other thread isn't active as a consumer - * already. - */ - if (os.flags != BUSY) - drain_ring_lockless(r, ns, os.flags, budget); - return (0); } #endif @@ -476,7 +470,9 @@ ifmp_ring_check_drainage(struct ifmp_ring *r, int budg union ring_state os, ns; os.state = r->state; - if (os.flags != STALLED || os.pidx_head != os.pidx_tail || r->can_drain(r) == 0) + if ((os.flags != STALLED && os.flags != ABDICATED) || // Only continue in STALLED and ABDICATED + os.pidx_head != os.pidx_tail || // Require work to be available + (os.flags != ABDICATED && r->can_drain(r) == 0)) // Can either drain, or everyone left return; MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */ From owner-svn-src-all@freebsd.org Sat Sep 23 16: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 760EEE091D3; Sat, 23 Sep 2017 16:48:52 +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 2A9857CB50; Sat, 23 Sep 2017 16:48:51 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id vnbkd3iNfDJTWvnbldTTTs; Sat, 23 Sep 2017 10:48:49 -0600 X-Authority-Analysis: v=2.2 cv=B4DJ6KlM c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=2JCJgTwv5E4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=9OrMMSz_Y9faLxoPUMAA: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 C8D1411F5; Sat, 23 Sep 2017 09:48:47 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v8NGmlBJ019577; Sat, 23 Sep 2017 09:48:47 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201709231648.v8NGmlBJ019577@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: gljennjohn@gmail.com cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323945 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Gary Jennejohn of "Sat, 23 Sep 2017 10:56:28 +0200." <20170923105628.739240b5@ernst.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 23 Sep 2017 09:48:47 -0700 X-CMAE-Envelope: MS4wfFbH/2fbMO0YO3HwU+bKjbltFsOy8dqU71Wfkzmcu551foIGdDjh/3Nz9s8dzyM3zaoHxIOgYVL51/V0kKTS1mic1i2yzT/KkKmvJ1XPpO62fpBS+7UU QIuNCDNUsMJGO6io4ne6pdu2HTrgdCzuVmaWKkjU/KBTVxjexxV2i0iEourCwkxH9N99M/TvpoPOXnghJlF7SyOCVskau8/7oeAvjt5wESZSD0k+E5f9E5rD /WFIgAMxQXjmDNm6505lbHCLFIclTqNxDnIK6u2xwUm/m3+xEtDyYjyZNqazQ9TnwkdpqTZDtxNhfQyGCHQ0jw== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 16:48:52 -0000 In message <20170923105628.739240b5@ernst.home>, Gary Jennejohn writes: > On Sat, 23 Sep 2017 06:00:17 +0000 (UTC) > Cy Schubert wrote: > > > Author: cy > > Date: Sat Sep 23 06:00:17 2017 > > New Revision: 323945 > > URL: https://svnweb.freebsd.org/changeset/base/323945 > > > > Log: > > Correct two misspellings. Also align */. > > > > Modified: > > head/sys/contrib/ipfilter/netinet/ip_nat.c > > > > Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c > > =========================================================================== > === > > --- head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Sep 23 01:39:16 201 > 7 (r323944) > > +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Sep 23 06:00:17 201 > 7 (r323945) > > @@ -6093,8 +6093,8 @@ ipf_nat_icmpquerytype(icmptype) > > { > > case ICMP_ECHOREPLY: > > case ICMP_ECHO: > > - /* route aedvertisement/solliciation is currently unsupported: */ > > - /* it would require rewriting the ICMP data section */ > > + /* route advertisement/soliciation is currently unsupported: */ > ^^^^^^^^^ still wrong - should b > e solicitation. pfft. Silly me. -- 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 Sep 23 16:59: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 68B87E094C4; Sat, 23 Sep 2017 16:59:39 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 448757CF7B; Sat, 23 Sep 2017 16:59:39 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8NGxcAU044869; Sat, 23 Sep 2017 16:59:38 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NGxbo0044863; Sat, 23 Sep 2017 16:59:37 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201709231659.v8NGxbo0044863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Sat, 23 Sep 2017 16:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323955 - head/sys/dev/bnxt X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/dev/bnxt X-SVN-Commit-Revision: 323955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 16:59:39 -0000 Author: shurd Date: Sat Sep 23 16:59:37 2017 New Revision: 323955 URL: https://svnweb.freebsd.org/changeset/base/323955 Log: bnxt: Choose better HW LRO defaults for performance 1) Choose correct Firmware options for HW LRO for best performance 2) Delete TBD and other comments which are not required. 3) Added sysctl interface to enable / disable / modify different factors of HW LRO. 4) Disabled HW LRO by default to avoid issues with packet forwarding This allows much better control over the LRO configuration via sysctls, and uses much better defaults. Hardware LRO can now be enabled/disabled independantly from the software LRO, and the tuning parameters are exposed. manpage updates coming soon. Submitted by: Bhargava Chenna Marreddy Reviewed by: shurd, sbruno Approved by: sbruno (mentor) Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D12223 Modified: head/sys/dev/bnxt/bnxt.h head/sys/dev/bnxt/bnxt_hwrm.c head/sys/dev/bnxt/bnxt_hwrm.h head/sys/dev/bnxt/bnxt_sysctl.c head/sys/dev/bnxt/bnxt_sysctl.h head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/bnxt.h ============================================================================== --- head/sys/dev/bnxt/bnxt.h Sat Sep 23 16:46:30 2017 (r323954) +++ head/sys/dev/bnxt/bnxt.h Sat Sep 23 16:59:37 2017 (r323955) @@ -526,6 +526,14 @@ struct bnxt_func_qcfg { uint16_t alloc_vnics; }; +struct bnxt_hw_lro { + uint16_t enable; + uint16_t is_mode_gro; + uint16_t max_agg_segs; + uint16_t max_aggs; + uint32_t min_agg_len; +}; + struct bnxt_softc { device_t dev; if_ctx_t ctx; @@ -586,10 +594,13 @@ struct bnxt_softc { struct sysctl_ctx_list hw_stats; struct sysctl_oid *hw_stats_oid; + struct sysctl_ctx_list hw_lro_ctx; + struct sysctl_oid *hw_lro_oid; struct bnxt_ver_info *ver_info; struct bnxt_nvram_info *nvm_info; bool wol; + struct bnxt_hw_lro hw_lro; uint8_t wol_filter_id; uint16_t rx_coal_usecs; uint16_t rx_coal_usecs_irq; Modified: head/sys/dev/bnxt/bnxt_hwrm.c ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.c Sat Sep 23 16:46:30 2017 (r323954) +++ head/sys/dev/bnxt/bnxt_hwrm.c Sat Sep 23 16:59:37 2017 (r323955) @@ -977,29 +977,53 @@ bnxt_cfg_async_cr(struct bnxt_softc *softc) return rc; } +void +bnxt_validate_hw_lro_settings(struct bnxt_softc *softc) +{ + softc->hw_lro.enable = min(softc->hw_lro.enable, 1); + + softc->hw_lro.is_mode_gro = min(softc->hw_lro.is_mode_gro, 1); + + softc->hw_lro.max_agg_segs = min(softc->hw_lro.max_agg_segs, + HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX); + + softc->hw_lro.max_aggs = min(softc->hw_lro.max_aggs, + HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX); + + softc->hw_lro.min_agg_len = min(softc->hw_lro.min_agg_len, BNXT_MAX_MTU); +} + int -bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, - uint32_t flags) +bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc) { struct hwrm_vnic_tpa_cfg_input req = {0}; + uint32_t flags; bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_TPA_CFG); - req.flags = htole32(flags); - req.vnic_id = htole16(vnic->id); - req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS | - HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS | - /* HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER | */ - HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN); - /* TODO: Calculate this based on ring size? */ - req.max_agg_segs = htole16(3); - /* Base this in the allocated TPA start size... */ - req.max_aggs = htole16(7); - /* - * TODO: max_agg_timer? - * req.mag_agg_timer = htole32(XXX); - */ - req.min_agg_len = htole32(0); + if (softc->hw_lro.enable) { + flags = HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA | + HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA | + HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN | + HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ; + + if (softc->hw_lro.is_mode_gro) + flags |= HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO; + else + flags |= HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE; + + req.flags = htole32(flags); + + req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS | + HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS | + HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN); + + req.max_agg_segs = htole16(softc->hw_lro.max_agg_segs); + req.max_aggs = htole16(softc->hw_lro.max_aggs); + req.min_agg_len = htole32(softc->hw_lro.min_agg_len); + } + + req.vnic_id = htole16(softc->vnic_info.id); return hwrm_send_message(softc, &req, sizeof(req)); } Modified: head/sys/dev/bnxt/bnxt_hwrm.h ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.h Sat Sep 23 16:46:30 2017 (r323954) +++ head/sys/dev/bnxt/bnxt_hwrm.h Sat Sep 23 16:59:37 2017 (r323955) @@ -62,8 +62,8 @@ int bnxt_hwrm_set_filter(struct bnxt_softc *softc, str int bnxt_hwrm_rss_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, uint32_t hash_type); int bnxt_cfg_async_cr(struct bnxt_softc *softc); -int bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, - struct bnxt_vnic_info *vnic, uint32_t flags); +int bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc); +void bnxt_validate_hw_lro_settings(struct bnxt_softc *softc); int bnxt_hwrm_nvm_find_dir_entry(struct bnxt_softc *softc, uint16_t type, uint16_t *ordinal, uint16_t ext, uint16_t *index, bool use_index, uint8_t search_opt, uint32_t *data_length, uint32_t *item_length, Modified: head/sys/dev/bnxt/bnxt_sysctl.c ============================================================================== --- head/sys/dev/bnxt/bnxt_sysctl.c Sat Sep 23 16:46:30 2017 (r323954) +++ head/sys/dev/bnxt/bnxt_sysctl.c Sat Sep 23 16:59:37 2017 (r323955) @@ -84,6 +84,16 @@ bnxt_init_sysctl_ctx(struct bnxt_softc *softc) return ENOMEM; } + sysctl_ctx_init(&softc->hw_lro_ctx); + ctx = device_get_sysctl_ctx(softc->dev); + softc->hw_lro_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)), OID_AUTO, + "hw_lro", CTLFLAG_RD, 0, "hardware lro"); + if (!softc->hw_lro_oid) { + sysctl_ctx_free(&softc->hw_lro_ctx); + return ENOMEM; + } + return 0; } @@ -114,6 +124,13 @@ bnxt_free_sysctl_ctx(struct bnxt_softc *softc) else softc->nvm_info->nvm_oid = NULL; } + if (softc->hw_lro_oid != NULL) { + orc = sysctl_ctx_free(&softc->hw_lro_ctx); + if (orc) + rc = orc; + else + softc->hw_lro_oid = NULL; + } return rc; } @@ -1210,6 +1227,74 @@ bnxt_create_config_sysctls_pre(struct bnxt_softc *soft return 0; } +#define BNXT_HW_LRO_FN(fn_name, arg) \ +static int \ +fn_name(SYSCTL_HANDLER_ARGS) { \ + struct bnxt_softc *softc = arg1; \ + int rc; \ + int val; \ + \ + if (softc == NULL) \ + return EBUSY; \ + \ + val = softc->hw_lro.arg; \ + rc = sysctl_handle_int(oidp, &val, 0, req); \ + if (rc || !req->newptr) \ + return rc; \ + \ + if ((if_getdrvflags(iflib_get_ifp(softc->ctx)) & IFF_DRV_RUNNING)) \ + return EBUSY; \ + \ + softc->hw_lro.arg = val; \ + bnxt_validate_hw_lro_settings(softc); \ + rc = bnxt_hwrm_vnic_tpa_cfg(softc); \ + \ + return rc; \ +} + +BNXT_HW_LRO_FN(bnxt_hw_lro_enable_disable, enable) +BNXT_HW_LRO_FN(bnxt_hw_lro_set_mode, is_mode_gro) +BNXT_HW_LRO_FN(bnxt_hw_lro_set_max_agg_segs, max_agg_segs) +BNXT_HW_LRO_FN(bnxt_hw_lro_set_max_aggs, max_aggs) +BNXT_HW_LRO_FN(bnxt_hw_lro_set_min_agg_len, min_agg_len) + +int +bnxt_create_hw_lro_sysctls(struct bnxt_softc *softc) +{ + struct sysctl_oid *oid = softc->hw_lro_oid; + + if (!oid) + return ENOMEM; + + SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "enable", CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, + bnxt_hw_lro_enable_disable, "A", + "Enable or Disable HW LRO: 0 / 1"); + + SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "gro_mode", CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, + bnxt_hw_lro_set_mode, "A", + "Set mode: 1 = GRO mode, 0 = RSC mode"); + + SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "max_agg_segs", CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, + bnxt_hw_lro_set_max_agg_segs, "A", + "Set Max Agg Seg Value (unit is Log2): " + "0 (= 1 seg) / 1 (= 2 segs) / ... / 31 (= 2^31 segs)"); + + SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "max_aggs", CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, + bnxt_hw_lro_set_max_aggs, "A", + "Set Max Aggs Value (unit is Log2): " + "0 (= 1 agg) / 1 (= 2 aggs) / ... / 7 (= 2^7 segs)"); + + SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "min_agg_len", CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, + bnxt_hw_lro_set_min_agg_len, "A", + "Min Agg Len: 1 to 9000"); + + return 0; +} static int bnxt_vlan_only_sysctl(SYSCTL_HANDLER_ARGS) { struct bnxt_softc *softc = arg1; Modified: head/sys/dev/bnxt/bnxt_sysctl.h ============================================================================== --- head/sys/dev/bnxt/bnxt_sysctl.h Sat Sep 23 16:46:30 2017 (r323954) +++ head/sys/dev/bnxt/bnxt_sysctl.h Sat Sep 23 16:59:37 2017 (r323955) @@ -40,3 +40,4 @@ int bnxt_create_ver_sysctls(struct bnxt_softc *softc); int bnxt_create_nvram_sysctls(struct bnxt_nvram_info *ni); int bnxt_create_config_sysctls_pre(struct bnxt_softc *softc); int bnxt_create_config_sysctls_post(struct bnxt_softc *softc); +int bnxt_create_hw_lro_sysctls(struct bnxt_softc *softc); Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Sat Sep 23 16:46:30 2017 (r323954) +++ head/sys/dev/bnxt/if_bnxt.c Sat Sep 23 16:59:37 2017 (r323955) @@ -826,6 +826,17 @@ bnxt_attach_pre(if_ctx_t ctx) /* iflib will map and release this bar */ scctx->isc_msix_bar = pci_msix_table_bar(softc->dev); + /* + * Default settings for HW LRO (TPA): + * Disable HW LRO by default + * Can be enabled after taking care of 'packet forwarding' + */ + softc->hw_lro.enable = 0; + softc->hw_lro.is_mode_gro = 0; + softc->hw_lro.max_agg_segs = 5; /* 2^5 = 32 segs */ + softc->hw_lro.max_aggs = HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX; + softc->hw_lro.min_agg_len = 512; + /* Allocate the default completion ring */ softc->def_cp_ring.stats_ctx_id = HWRM_NA_SIGNATURE; softc->def_cp_ring.ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; @@ -861,6 +872,10 @@ bnxt_attach_pre(if_ctx_t ctx) if (rc) goto failed; + rc = bnxt_create_hw_lro_sysctls(softc); + if (rc) + goto failed; + /* Initialize the vlan list */ SLIST_INIT(&softc->vnic_info.vlan_tags); softc->vnic_info.vlan_tag_list.idi_vaddr = NULL; @@ -1071,15 +1086,7 @@ bnxt_init(if_ctx_t ctx) if (rc) goto fail; - /* - * Enable LRO/TPA/GRO - * TBD: - * Enable / Disable HW_LRO based on - * ifconfig lro / ifconfig -lro setting - */ - rc = bnxt_hwrm_vnic_tpa_cfg(softc, &softc->vnic_info, - (if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ? - HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA : 0); + rc = bnxt_hwrm_vnic_tpa_cfg(softc); if (rc) goto fail; From owner-svn-src-all@freebsd.org Sat Sep 23 17:48: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 9E492E0A368; Sat, 23 Sep 2017 17:48:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74F297DF93; Sat, 23 Sep 2017 17:48:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8NHmnfm066052; Sat, 23 Sep 2017 17:48:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NHmnWh066051; Sat, 23 Sep 2017 17:48:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709231748.v8NHmnWh066051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 23 Sep 2017 17:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323956 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 323956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 17:48:50 -0000 Author: cem Date: Sat Sep 23 17:48:49 2017 New Revision: 323956 URL: https://svnweb.freebsd.org/changeset/base/323956 Log: ddb(4): Add 'show badstacks' command to show witness badstacks Add a DDB command that mirrors sysctl debug.witness.badstacks. Reapply r323935 after fixing trivial deficiency. I forgot to compile with WITNESS enabled. Thanks emaste@ for fixing the build while I was asleep. Reported by: rstone Reviewed by: rstone (previous version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12468 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sat Sep 23 16:59:37 2017 (r323955) +++ head/sys/kern/subr_witness.c Sat Sep 23 17:48:49 2017 (r323956) @@ -2539,31 +2539,18 @@ DB_SHOW_COMMAND(witness, db_witness_display) } #endif -static int -sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS) +static void +sbuf_print_witness_badstacks(struct sbuf *sb, size_t *oldidx) { struct witness_lock_order_data *data1, *data2, *tmp_data1, *tmp_data2; struct witness *tmp_w1, *tmp_w2, *w1, *w2; - struct sbuf *sb; u_int w_rmatrix1, w_rmatrix2; - int error, generation, i, j; + int generation, i, j; tmp_data1 = NULL; tmp_data2 = NULL; tmp_w1 = NULL; tmp_w2 = NULL; - if (witness_watch < 1) { - error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); - return (error); - } - if (witness_cold) { - error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); - return (error); - } - error = 0; - sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND); - if (sb == NULL) - return (ENOMEM); /* Allocate and init temporary storage space. */ tmp_w1 = malloc(sizeof(struct witness), M_TEMP, M_WAITOK | M_ZERO); @@ -2587,7 +2574,7 @@ restart: mtx_unlock_spin(&w_mtx); /* The graph has changed, try again. */ - req->oldidx = 0; + *oldidx = 0; sbuf_clear(sb); goto restart; } @@ -2613,7 +2600,7 @@ restart: mtx_unlock_spin(&w_mtx); /* The graph has changed, try again. */ - req->oldidx = 0; + *oldidx = 0; sbuf_clear(sb); goto restart; } @@ -2672,7 +2659,7 @@ restart: * The graph changed while we were printing stack data, * try again. */ - req->oldidx = 0; + *oldidx = 0; sbuf_clear(sb); goto restart; } @@ -2683,13 +2670,56 @@ restart: free(tmp_data2, M_TEMP); free(tmp_w1, M_TEMP); free(tmp_w2, M_TEMP); +} +static int +sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS) +{ + struct sbuf *sb; + int error; + + if (witness_watch < 1) { + error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); + return (error); + } + if (witness_cold) { + error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); + return (error); + } + error = 0; + sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND); + if (sb == NULL) + return (ENOMEM); + + sbuf_print_witness_badstacks(sb, &req->oldidx); + sbuf_finish(sb); error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return (error); } + +#ifdef DDB +static int +sbuf_db_printf_drain(void *arg __unused, const char *data, int len) +{ + + return (db_printf("%.*s", len, data)); +} + +DB_SHOW_COMMAND(badstacks, db_witness_badstacks) +{ + struct sbuf sb; + char buffer[128]; + size_t dummy; + + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + sbuf_set_drain(&sb, sbuf_db_printf_drain, NULL); + sbuf_print_witness_badstacks(&sb, &dummy); + sbuf_finish(&sb); +} +#endif static int sysctl_debug_witness_channel(SYSCTL_HANDLER_ARGS) From owner-svn-src-all@freebsd.org Sat Sep 23 18:34: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 B8C0CE0C5FB for ; Sat, 23 Sep 2017 18:34:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::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 884447F4DD for ; Sat, 23 Sep 2017 18:34:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id 85so3935945ith.2 for ; Sat, 23 Sep 2017 11:34:32 -0700 (PDT) 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=I2Q/roWrPFiXnlCP7Z7wmK2HG8AW07pZOS44e9Qtjn4=; b=T3W4zhuPm53hxXSpjwMWepP/fzIHWkRUi9Jwih1Y1eo8RemCceYFTUdMznDbSmr0A6 i1vHw+PcSzELIlDxv+vnV4RWf8qN45zyRfQkN+m1ksIOfhFOduGI9GI/vjaK+0E3GzaC R+/VXH8NB7zWIJgw+SwfEKfztxPfAJ9r4hrS3Hc6JH9IzWFquooVss+Q3b3JPqGoZoQ6 uy9xSH/tU6AGkJN4QCQsCNqOay5M8qyFBJdvzWgJmVSmvfM0/QF1ulbsbGROsegZr1/9 Ieic5kJIb4lPolDBcjw6fbci6wsM2e372ZSjkwawaxpkdYL11xSeogfZb3T5jYrch3Ac Fa6A== 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=I2Q/roWrPFiXnlCP7Z7wmK2HG8AW07pZOS44e9Qtjn4=; b=NuMioXzGv2SESZxdIBw0+uLCnifT9rYVTZXGn8mf3zHIndyUYP3Aobbe4mB0VHLlCV 6IwpqhNDUvCenFRUSVhbj2QGgkZJVaTI5RaQ8SEMFKHFdU904ciUVDocGv57X+4bHmEu LXIHkTm1AOZ2rEQsA/LBFota1EmebryocQSyKLhtHf2WfqtLU2gsl63XrDoAO7bOVsk1 Vm4cHc8ZPDE+vg/R5+eAaVbm/5fRnQaGaOf5Hn4xidwVzWVvRCRNi4IOcrEVW+soFQdg D4EPppqHw0hLdiAD0oA7jf5579LoA8uP1L4c7c3A7qJg3azD7uJ5IpC4DZBztjQLno5y j/qg== X-Gm-Message-State: AHPjjUgKM1BXwXm484MlzPipWV7Tt+qYpGcWKoKVo2/hfNXuoVC1gl1h Wwzg1aD9/VYvIQ1wuHOSr7f5ELYDHQnJPwVkB46oYw== X-Google-Smtp-Source: AOwi7QAIAHSFRp2myi4V7lxi9ufm3zyZs+VEyx6HMk2cgg7QoUm2MotoDA0fkyaqISJyLhKZijmAY0nzloNKIBamx1Y= X-Received: by 10.36.6.18 with SMTP id 18mr13003373itv.15.1506191671801; Sat, 23 Sep 2017 11:34:31 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Sat, 23 Sep 2017 11:34:31 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:b191:5184:17d7:e002] In-Reply-To: <32112779.upWhmOh2nn@ralph.baldwin.cx> References: <201709231244.v8NCig1O037355@repo.freebsd.org> <32112779.upWhmOh2nn@ralph.baldwin.cx> From: Warner Losh Date: Sat, 23 Sep 2017 12:34:31 -0600 X-Google-Sender-Auth: OV9W-5fINmF3MVh58SkZB3AJtjs Message-ID: Subject: Re: svn commit: r323952 - head/sys/boot/i386/libi386 To: John Baldwin Cc: Mariusz Zaborski , src-committers , "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: Sat, 23 Sep 2017 18:34:32 -0000 On Sat, Sep 23, 2017 at 9:50 AM, John Baldwin wrote: > On Saturday, September 23, 2017 12:44:42 PM Mariusz Zaborski wrote: > > Author: oshogbo > > Date: Sat Sep 23 12:44:42 2017 > > New Revision: 323952 > > URL: https://svnweb.freebsd.org/changeset/base/323952 > > > > Log: > > After the r317886 support for TFTP and NFS can be enable > simultaneously. > > > > The cleanup of this distinction was done in the r318988, but this > Makefile > > was omitted. > > > > Submitted by: kczekirda@ > > > > Modified: > > head/sys/boot/i386/libi386/Makefile > > > > Modified: head/sys/boot/i386/libi386/Makefile > > ============================================================ > ================== > > --- head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:35:46 2017 > (r323951) > > +++ head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:44:42 2017 > (r323952) > > @@ -12,10 +12,10 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c > biospnp > > .PATH: ${.CURDIR}/../../zfs > > SRCS+= devicename_stubs.c > > > > -# Enable PXE TFTP or NFS support, not both. > > .if defined(LOADER_TFTP_SUPPORT) > > CFLAGS+= -DLOADER_TFTP_SUPPORT > > -.else > > +.endif > > +.if defined(LOADER_NFS_SUPPORT) > > CFLAGS+= -DLOADER_NFS_SUPPORT > > .endif > > Is LOADER_NFS_SUPPORT defined by default? If not, I think you just turned > off NFS > in the default loader. One option would be to add a new > 'LOADER_NO_NFS_SUPPORT' > and include NFS unless that is defined. We could also just always include > NFS > support. Finally, if we want to retain the ability to choose loader bits, > these > should probably change to real src options: WITH/WITHOUT_LOADER_TFTP_SUPPORT > and > WITH/WITHOUT_LOADER_NFS_SUPPORT and have this Makefile check > MK_LOADER_TFTP/NFS_SUPPORT. Then we could choose defaults in src.opts.mk. > I've wanted all the 'ad-hoc' options in the tree to wind up in src.opts.mk. These would be a great addition. Warner From owner-svn-src-all@freebsd.org Sat Sep 23 19:49: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 C3962E0E0B2; Sat, 23 Sep 2017 19:49:13 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9158F812D8; Sat, 23 Sep 2017 19:49:13 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8NJnCWF016166; Sat, 23 Sep 2017 19:49:12 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8NJnCZw016165; Sat, 23 Sep 2017 19:49:12 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201709231949.v8NJnCZw016165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Sat, 23 Sep 2017 19:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323958 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 323958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2017 19:49:13 -0000 Author: fsu Date: Sat Sep 23 19:49:12 2017 New Revision: 323958 URL: https://svnweb.freebsd.org/changeset/base/323958 Log: Add myself as src committer. Approved by: pfg (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Sep 23 18:37:37 2017 (r323957) +++ head/share/misc/committers-src.dot Sat Sep 23 19:49:12 2017 (r323958) @@ -167,6 +167,7 @@ fabient [label="Fabien Thomas\nfabient@FreeBSD.org\n20 fanf [label="Tony Finch\nfanf@FreeBSD.org\n2002/05/05"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] flz [label="Florent Thoumie\nflz@FreeBSD.org\n2006/03/30"] +fsu [label="Fedor Uporov\nfsu@FreeBSD.org\n2017/08/28"] gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2010/02/02"] gad [label="Garance A. Drosehn\ngad@FreeBSD.org\n2000/10/27"] gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n1999/01/15"] @@ -689,6 +690,8 @@ obrien -> groudier obrien -> gshapiro obrien -> kan obrien -> sam + +pfg -> fsu peter -> asmodai peter -> jayanth From owner-svn-src-all@freebsd.org Sat Sep 23 23:33: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 9FE2AE1408C; Sat, 23 Sep 2017 23:33:28 +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 3208D3404; Sat, 23 Sep 2017 23:33:28 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id q124so11265158wmb.0; Sat, 23 Sep 2017 16:33:28 -0700 (PDT) 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=GSmvvxETpbylxZPoJPmFDysvWLT30z5wZLjVfcR7gF4=; b=UDRSV/adcSW7SLh7jRk3poqILr3T77nWIhFrjBTdZLl/PGACd4iSgN8FPX3o5KUwqE HpAcNWMhYEuQFRyW5SQUENxKt0kbE4Z9NEygYbONYlHAA8LoLCMNKvu5vtdJv4Izzf1E HUxRIYmATWmbycmThoeS3HGJr3/m6eIaYm3E9jVzxGkkDbwXoCST8ud/kC0mmQQfn/YD L2qdVdDdt8aJqWUPCMyOy7RWQHj1b5JChRxxlTMs6CMoo0zSj8M4jN20Ow0UPvuBDnrl T0/oNhn/FJu+hc17wp2WpO9yY4dElZHKm4yfwONa1iUMkCimJP+rUFAytchY826x9Sg/ sxJA== 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=GSmvvxETpbylxZPoJPmFDysvWLT30z5wZLjVfcR7gF4=; b=TTgjKuNk6wMwRBzVl1PAZzRowHt39SCPWuuva8Mbs1gKaAiC/wsvuVlngsVkD9xhoQ oZH5E2Cizygv0ny9RFBo+YSal6ZrW/65btY1bEbOq74eacTY4OqXrhGxG9sr9OpwqBmY kb5CjRJrL2nOASfGv7f4cfjhlhx/I1OqspQlCWD9r68JbNXXEemZkaBiDqlqr4kHiQ1A n2gL2179tXR3ncsuEP2Cak9zqYz1yG18bVH1+wT2YJJ1TTV5/bSe7siNzXown/aVfO2S xx27/tdni7eG4tUt308So3GTdV8sO7ms3mtDwJKkIhQllHUl9McG4Vx6osNAaiAF7oQX rmUg== X-Gm-Message-State: AHPjjUgfTSnI14t/3w3rFT9sQchvNAYP4z2GwerEWqJIg9OA7ntR7wSb SepTFkhwrz4NMGrB7CXz+UVZXxyEHuKXjm1h7wcvUO/f X-Google-Smtp-Source: AOwi7QAxbrejgJ1NIDkz0+qztwUJOVFb1v7TGEKhlv3wSJags2pJmyV80dlIwhUD8LGBb3O6gMyDU4foSh846rBj4Tc= X-Received: by 10.28.218.209 with SMTP id r200mr6504066wmg.97.1506209606557; Sat, 23 Sep 2017 16:33:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.157.10 with HTTP; Sat, 23 Sep 2017 16:33:26 -0700 (PDT) In-Reply-To: <6F5DC92C-2CF6-4A33-9663-BFECB7DB65F2@lists.zabbadoz.net> References: <201709230135.v8N1ZE6S063264@repo.freebsd.org> <283397c7-a01e-3776-7ed3-b64d68003d0b@sasktel.net> <6F5DC92C-2CF6-4A33-9663-BFECB7DB65F2@lists.zabbadoz.net> From: Jonathan Looney Date: Sat, 23 Sep 2017 19:33:26 -0400 Message-ID: Subject: Re: svn commit: r323942 - head/sys/net To: "Bjoern A. Zeeb" Cc: Stephen Hurd , Stephen Hurd , 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-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: Sat, 23 Sep 2017 23:33:28 -0000 On Sat, Sep 23, 2017 at 4:37 AM, Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > > Then this makes no sense as we don=E2=80=99t do LRO if forwarding is enab= led on > the machine; > https://svnweb.freebsd.org/base/head/sys/netinet/tcp_lro.c? > annotate=3D317390#l645 Yes, that is true. However, this change still makes a difference. Previously, if LRO was not enabled or the packet was not eligible for LRO, the iflib code would call ifp->if_input() once for each packet. Now, the iflib code will build a chain of packets for which it couldn't do LRO and call ifp->if_input() once for the entire chain. (I agree that was not obvious from the rather short commit message and the diff in the email. The lack of comments or meaningful variable names did not help to alleviate the confusion. Nonetheless, when I looked at the diff with enough surrounding context, it became clear.) Jonathan